From 611216088808d3191a022df7ce454ff202ac621e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 17 Apr 2018 20:50:59 -0400 Subject: [PATCH] [advancedcontentfilter] Removed yet more JS/PHP Composer files - Removed vendor/npm-asset - Removed vendor/slim/slim-skeleton --- advancedcontentfilter/composer.json | 8 +- .../npm-asset/cacheable-request/LICENSE | 21 - .../npm-asset/cacheable-request/README.md | 190 - .../npm-asset/cacheable-request/package.json | 57 - .../npm-asset/cacheable-request/src/index.js | 155 - .../vendor/npm-asset/clone-response/LICENSE | 21 - .../vendor/npm-asset/clone-response/README.md | 62 - .../npm-asset/clone-response/package.json | 44 - .../npm-asset/clone-response/src/index.js | 17 - .../vendor/npm-asset/core-util-is/LICENSE | 19 - .../vendor/npm-asset/core-util-is/README.md | 3 - .../vendor/npm-asset/core-util-is/float.patch | 604 - .../vendor/npm-asset/core-util-is/lib/util.js | 107 - .../npm-asset/core-util-is/package.json | 32 - .../vendor/npm-asset/core-util-is/test.js | 68 - .../npm-asset/decode-uri-component/index.js | 94 - .../npm-asset/decode-uri-component/license | 21 - .../decode-uri-component/package.json | 37 - .../npm-asset/decode-uri-component/readme.md | 70 - .../npm-asset/decompress-response/index.js | 29 - .../npm-asset/decompress-response/license | 21 - .../decompress-response/package.json | 53 - .../npm-asset/decompress-response/readme.md | 31 - .../vendor/npm-asset/duplexer3/LICENSE.md | 26 - .../vendor/npm-asset/duplexer3/README.md | 115 - .../vendor/npm-asset/duplexer3/index.js | 76 - .../vendor/npm-asset/duplexer3/package.json | 28 - .../vendor/npm-asset/from2/.travis.yml | 8 - .../vendor/npm-asset/from2/LICENSE.md | 21 - .../vendor/npm-asset/from2/README.md | 70 - .../vendor/npm-asset/from2/index.js | 103 - .../vendor/npm-asset/from2/package.json | 37 - .../vendor/npm-asset/from2/test.js | 123 - .../npm-asset/get-stream/buffer-stream.js | 51 - .../vendor/npm-asset/get-stream/index.js | 51 - .../vendor/npm-asset/get-stream/license | 21 - .../vendor/npm-asset/get-stream/package.json | 48 - .../vendor/npm-asset/get-stream/readme.md | 117 - .../vendor/npm-asset/got/errors.js | 92 - .../vendor/npm-asset/got/index.js | 661 - .../vendor/npm-asset/got/license | 9 - .../vendor/npm-asset/got/package.json | 95 - .../vendor/npm-asset/got/readme.md | 650 - .../has-symbol-support-x/.editorconfig | 26 - .../has-symbol-support-x/.eslintignore | 1 - .../has-symbol-support-x/.eslintrc.json | 6 - .../npm-asset/has-symbol-support-x/.nvmrc | 1 - .../has-symbol-support-x/.travis.yml | 111 - .../has-symbol-support-x/.uglifyjsrc.json | 17 - .../npm-asset/has-symbol-support-x/LICENSE | 21 - .../npm-asset/has-symbol-support-x/README.md | 36 - .../has-symbol-support-x/badges.html | 20 - .../npm-asset/has-symbol-support-x/index.js | 18 - .../lib/has-symbol-support-x.js | 22 - .../lib/has-symbol-support-x.min.js | 10 - .../lib/has-symbol-support-x.min.js.map | 1 - .../has-symbol-support-x/package.json | 86 - .../has-symbol-support-x/tests/index.html | 34 - .../has-symbol-support-x/tests/run.js | 25 - .../has-symbol-support-x/tests/spec/test.js | 29 - .../has-to-string-tag-x/.editorconfig | 26 - .../has-to-string-tag-x/.eslintignore | 1 - .../has-to-string-tag-x/.eslintrc.json | 6 - .../npm-asset/has-to-string-tag-x/.nvmrc | 1 - .../npm-asset/has-to-string-tag-x/.travis.yml | 93 - .../has-to-string-tag-x/.uglifyjsrc.json | 17 - .../npm-asset/has-to-string-tag-x/LICENSE | 21 - .../npm-asset/has-to-string-tag-x/README.md | 37 - .../npm-asset/has-to-string-tag-x/badges.html | 20 - .../npm-asset/has-to-string-tag-x/index.js | 19 - .../lib/has-to-string-tag-x.js | 43 - .../lib/has-to-string-tag-x.min.js | 18 - .../lib/has-to-string-tag-x.min.js.map | 1 - .../has-to-string-tag-x/package.json | 87 - .../npm-asset/http-cache-semantics/README.md | 177 - .../http-cache-semantics/node4/index.js | 559 - .../http-cache-semantics/package.json | 22 - .../vendor/npm-asset/inherits/LICENSE | 16 - .../vendor/npm-asset/inherits/README.md | 42 - .../vendor/npm-asset/inherits/inherits.js | 7 - .../npm-asset/inherits/inherits_browser.js | 23 - .../vendor/npm-asset/inherits/package.json | 29 - .../vendor/npm-asset/into-stream/index.js | 79 - .../vendor/npm-asset/into-stream/license | 21 - .../vendor/npm-asset/into-stream/package.json | 50 - .../vendor/npm-asset/into-stream/readme.md | 42 - .../vendor/npm-asset/is-object/.jscs.json | 55 - .../vendor/npm-asset/is-object/.npmignore | 15 - .../vendor/npm-asset/is-object/.testem.json | 14 - .../vendor/npm-asset/is-object/.travis.yml | 18 - .../vendor/npm-asset/is-object/LICENSE | 19 - .../vendor/npm-asset/is-object/README.md | 55 - .../vendor/npm-asset/is-object/index.js | 5 - .../vendor/npm-asset/is-object/package.json | 59 - .../vendor/npm-asset/is-object/test/index.js | 23 - .../vendor/npm-asset/is-plain-obj/index.js | 7 - .../vendor/npm-asset/is-plain-obj/license | 21 - .../npm-asset/is-plain-obj/package.json | 36 - .../vendor/npm-asset/is-plain-obj/readme.md | 35 - .../npm-asset/is-retry-allowed/index.js | 60 - .../vendor/npm-asset/is-retry-allowed/license | 21 - .../npm-asset/is-retry-allowed/package.json | 29 - .../npm-asset/is-retry-allowed/readme.md | 42 - .../vendor/npm-asset/isarray/.npmignore | 1 - .../vendor/npm-asset/isarray/.travis.yml | 4 - .../vendor/npm-asset/isarray/Makefile | 6 - .../vendor/npm-asset/isarray/README.md | 60 - .../vendor/npm-asset/isarray/component.json | 19 - .../vendor/npm-asset/isarray/index.js | 5 - .../vendor/npm-asset/isarray/package.json | 45 - .../vendor/npm-asset/isarray/test.js | 20 - .../vendor/npm-asset/isurl/LICENSE | 21 - .../vendor/npm-asset/isurl/README.md | 39 - .../vendor/npm-asset/isurl/index.js | 58 - .../vendor/npm-asset/isurl/package.json | 32 - .../vendor/npm-asset/json-buffer/.npmignore | 3 - .../vendor/npm-asset/json-buffer/.travis.yml | 3 - .../vendor/npm-asset/json-buffer/LICENSE | 22 - .../vendor/npm-asset/json-buffer/README.md | 24 - .../vendor/npm-asset/json-buffer/index.js | 58 - .../vendor/npm-asset/json-buffer/package.json | 34 - .../npm-asset/json-buffer/test/index.js | 63 - .../vendor/npm-asset/keyv/LICENSE | 21 - .../vendor/npm-asset/keyv/README.md | 243 - .../vendor/npm-asset/keyv/package.json | 49 - .../vendor/npm-asset/keyv/src/index.js | 99 - .../vendor/npm-asset/lowercase-keys/index.js | 11 - .../npm-asset/lowercase-keys/package.json | 35 - .../vendor/npm-asset/lowercase-keys/readme.md | 33 - .../vendor/npm-asset/mimic-response/index.js | 33 - .../vendor/npm-asset/mimic-response/license | 9 - .../npm-asset/mimic-response/package.json | 37 - .../vendor/npm-asset/mimic-response/readme.md | 54 - .../vendor/npm-asset/normalize-url/index.js | 163 - .../vendor/npm-asset/normalize-url/license | 9 - .../npm-asset/normalize-url/package.json | 46 - .../vendor/npm-asset/normalize-url/readme.md | 172 - .../vendor/npm-asset/object-assign/index.js | 90 - .../vendor/npm-asset/object-assign/license | 21 - .../npm-asset/object-assign/package.json | 42 - .../vendor/npm-asset/object-assign/readme.md | 61 - .../vendor/npm-asset/p-cancelable/index.js | 88 - .../vendor/npm-asset/p-cancelable/license | 9 - .../npm-asset/p-cancelable/package.json | 47 - .../vendor/npm-asset/p-cancelable/readme.md | 135 - .../vendor/npm-asset/p-finally/index.js | 15 - .../vendor/npm-asset/p-finally/license | 21 - .../vendor/npm-asset/p-finally/package.json | 42 - .../vendor/npm-asset/p-finally/readme.md | 47 - .../vendor/npm-asset/p-is-promise/index.js | 10 - .../vendor/npm-asset/p-is-promise/license | 21 - .../npm-asset/p-is-promise/package.json | 43 - .../vendor/npm-asset/p-is-promise/readme.md | 43 - .../vendor/npm-asset/p-timeout/index.js | 44 - .../vendor/npm-asset/p-timeout/license | 9 - .../vendor/npm-asset/p-timeout/package.json | 43 - .../vendor/npm-asset/p-timeout/readme.md | 89 - .../vendor/npm-asset/pify/index.js | 84 - .../vendor/npm-asset/pify/license | 9 - .../vendor/npm-asset/pify/package.json | 51 - .../vendor/npm-asset/pify/readme.md | 131 - .../vendor/npm-asset/prepend-http/index.js | 15 - .../vendor/npm-asset/prepend-http/license | 9 - .../npm-asset/prepend-http/package.json | 35 - .../vendor/npm-asset/prepend-http/readme.md | 56 - .../npm-asset/process-nextick-args/index.js | 44 - .../npm-asset/process-nextick-args/license.md | 19 - .../process-nextick-args/package.json | 25 - .../npm-asset/process-nextick-args/readme.md | 18 - .../vendor/npm-asset/query-string/index.js | 224 - .../vendor/npm-asset/query-string/license | 9 - .../npm-asset/query-string/package.json | 45 - .../vendor/npm-asset/query-string/readme.md | 224 - .../npm-asset/readable-stream/.travis.yml | 55 - .../npm-asset/readable-stream/CONTRIBUTING.md | 38 - .../npm-asset/readable-stream/GOVERNANCE.md | 136 - .../vendor/npm-asset/readable-stream/LICENSE | 47 - .../npm-asset/readable-stream/README.md | 58 - .../doc/wg-meetings/2015-01-30.md | 60 - .../readable-stream/duplex-browser.js | 1 - .../npm-asset/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 | 687 - .../lib/internal/streams/BufferList.js | 79 - .../lib/internal/streams/destroy.js | 74 - .../lib/internal/streams/stream-browser.js | 1 - .../lib/internal/streams/stream.js | 1 - .../npm-asset/readable-stream/package.json | 52 - .../npm-asset/readable-stream/passthrough.js | 1 - .../readable-stream/readable-browser.js | 7 - .../npm-asset/readable-stream/readable.js | 19 - .../npm-asset/readable-stream/transform.js | 1 - .../readable-stream/writable-browser.js | 1 - .../npm-asset/readable-stream/writable.js | 8 - .../vendor/npm-asset/responselike/LICENSE | 19 - .../vendor/npm-asset/responselike/README.md | 77 - .../npm-asset/responselike/package.json | 38 - .../npm-asset/responselike/src/index.js | 34 - .../vendor/npm-asset/safe-buffer/.travis.yml | 7 - .../vendor/npm-asset/safe-buffer/LICENSE | 21 - .../vendor/npm-asset/safe-buffer/README.md | 584 - .../vendor/npm-asset/safe-buffer/index.js | 62 - .../vendor/npm-asset/safe-buffer/package.json | 37 - .../vendor/npm-asset/safe-buffer/test.js | 101 - .../sindresorhus--is/dist/example.d.ts | 0 .../sindresorhus--is/dist/example.js | 3 - .../sindresorhus--is/dist/example.js.map | 1 - .../sindresorhus--is/dist/index.d.ts | 95 - .../npm-asset/sindresorhus--is/dist/index.js | 215 - .../sindresorhus--is/dist/index.js.map | 1 - .../sindresorhus--is/dist/source/index.d.ts | 59 - .../sindresorhus--is/dist/source/index.js | 182 - .../sindresorhus--is/dist/source/index.js.map | 1 - .../dist/source/tests/test.d.ts | 0 .../dist/source/tests/test.js | 622 - .../dist/source/tests/test.js.map | 1 - .../vendor/npm-asset/sindresorhus--is/license | 9 - .../npm-asset/sindresorhus--is/package.json | 62 - .../npm-asset/sindresorhus--is/readme.md | 323 - .../vendor/npm-asset/sort-keys/index.js | 55 - .../vendor/npm-asset/sort-keys/license | 9 - .../vendor/npm-asset/sort-keys/package.json | 40 - .../vendor/npm-asset/sort-keys/readme.md | 60 - .../npm-asset/strict-uri-encode/index.js | 6 - .../npm-asset/strict-uri-encode/license | 21 - .../npm-asset/strict-uri-encode/package.json | 30 - .../npm-asset/strict-uri-encode/readme.md | 40 - .../npm-asset/string_decoder/.travis.yml | 50 - .../vendor/npm-asset/string_decoder/LICENSE | 48 - .../vendor/npm-asset/string_decoder/README.md | 47 - .../string_decoder/lib/string_decoder.js | 296 - .../npm-asset/string_decoder/package.json | 31 - .../vendor/npm-asset/timed-out/index.js | 55 - .../vendor/npm-asset/timed-out/license | 21 - .../vendor/npm-asset/timed-out/package.json | 36 - .../vendor/npm-asset/timed-out/readme.md | 42 - .../vendor/npm-asset/url-parse-lax/index.js | 12 - .../vendor/npm-asset/url-parse-lax/license | 9 - .../npm-asset/url-parse-lax/package.json | 42 - .../vendor/npm-asset/url-parse-lax/readme.md | 127 - .../vendor/npm-asset/url-to-options/LICENSE | 21 - .../vendor/npm-asset/url-to-options/README.md | 29 - .../vendor/npm-asset/url-to-options/index.js | 28 - .../npm-asset/url-to-options/package.json | 24 - .../npm-asset/util-deprecate/History.md | 16 - .../vendor/npm-asset/util-deprecate/LICENSE | 24 - .../vendor/npm-asset/util-deprecate/README.md | 53 - .../npm-asset/util-deprecate/browser.js | 67 - .../vendor/npm-asset/util-deprecate/node.js | 6 - .../npm-asset/util-deprecate/package.json | 27 - .../vue-resource/.circleci/config.yml | 34 - .../npm-asset/vue-resource/.eslintignore | 3 - .../npm-asset/vue-resource/.eslintrc.js | 44 - .../vue-resource/.github/ISSUE_TEMPLATE.md | 22 - .../vendor/npm-asset/vue-resource/LICENSE | 21 - .../vendor/npm-asset/vue-resource/README.md | 59 - .../npm-asset/vue-resource/dist/README.md | 3 - .../vue-resource/dist/vue-resource.common.js | 1557 --- .../vue-resource/dist/vue-resource.esm.js | 1556 --- .../vue-resource/dist/vue-resource.js | 1563 --- .../vue-resource/dist/vue-resource.min.js | 7 - .../npm-asset/vue-resource/package.json | 59 - .../vue-resource/src/http/client/index.js | 65 - .../vue-resource/src/http/client/jsonp.js | 53 - .../vue-resource/src/http/client/node.js | 38 - .../vue-resource/src/http/client/xdr.js | 38 - .../vue-resource/src/http/client/xhr.js | 74 - .../vue-resource/src/http/headers.js | 75 - .../npm-asset/vue-resource/src/http/index.js | 80 - .../src/http/interceptor/before.js | 13 - .../vue-resource/src/http/interceptor/cors.js | 29 - .../vue-resource/src/http/interceptor/form.js | 17 - .../src/http/interceptor/header.js | 21 - .../vue-resource/src/http/interceptor/json.js | 46 - .../src/http/interceptor/jsonp.js | 13 - .../src/http/interceptor/method.js | 12 - .../vue-resource/src/http/request.js | 38 - .../vue-resource/src/http/response.js | 75 - .../npm-asset/vue-resource/src/index.js | 57 - .../npm-asset/vue-resource/src/lib/promise.js | 177 - .../vue-resource/src/lib/url-template.js | 150 - .../npm-asset/vue-resource/src/promise.js | 77 - .../npm-asset/vue-resource/src/resource.js | 76 - .../npm-asset/vue-resource/src/url/index.js | 135 - .../npm-asset/vue-resource/src/url/query.js | 25 - .../npm-asset/vue-resource/src/url/root.js | 16 - .../vue-resource/src/url/template.js | 16 - .../vendor/npm-asset/vue-resource/src/util.js | 183 - .../vue-resource/test/data/invalid.json | 1 - .../npm-asset/vue-resource/test/data/text.txt | 1 - .../vue-resource/test/data/valid.json | 1 - .../npm-asset/vue-resource/test/http.js | 200 - .../npm-asset/vue-resource/test/http.test.js | 34 - .../npm-asset/vue-resource/test/index.html | 18 - .../npm-asset/vue-resource/test/index.js | 9 - .../npm-asset/vue-resource/test/karma.conf.js | 26 - .../npm-asset/vue-resource/test/promise.js | 125 - .../npm-asset/vue-resource/test/resource.js | 51 - .../npm-asset/vue-resource/test/specs.js | 10662 ---------------- .../vendor/npm-asset/vue-resource/test/url.js | 33 - .../vue-resource/test/webpack.config.js | 17 - .../npm-asset/vue-resource/types/index.d.ts | 94 - .../npm-asset/vue-resource/types/vue.d.ts | 27 - .../vendor/npm-asset/vue-resource/yarn.lock | 6503 ---------- .../vendor/slim/slim-skeleton/.gitignore | 3 - .../vendor/slim/slim-skeleton/CONTRIBUTING.md | 14 - .../vendor/slim/slim-skeleton/README.md | 27 - .../vendor/slim/slim-skeleton/composer.json | 36 - .../slim/slim-skeleton/docker-compose.yml | 18 - .../vendor/slim/slim-skeleton/logs/README.md | 1 - .../vendor/slim/slim-skeleton/phpunit.xml | 7 - .../slim/slim-skeleton/public/.htaccess | 21 - .../slim/slim-skeleton/public/index.php | 30 - .../slim/slim-skeleton/src/dependencies.php | 19 - .../slim/slim-skeleton/src/middleware.php | 4 - .../vendor/slim/slim-skeleton/src/routes.php | 14 - .../slim/slim-skeleton/src/settings.php | 19 - .../slim/slim-skeleton/templates/index.phtml | 38 - .../tests/Functional/BaseTestCase.php | 77 - .../tests/Functional/HomepageTest.php | 40 - 323 files changed, 1 insertion(+), 41410 deletions(-) delete mode 100644 advancedcontentfilter/vendor/npm-asset/cacheable-request/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/cacheable-request/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/cacheable-request/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/cacheable-request/src/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/clone-response/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/clone-response/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/clone-response/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/clone-response/src/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/core-util-is/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/core-util-is/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/core-util-is/float.patch delete mode 100644 advancedcontentfilter/vendor/npm-asset/core-util-is/lib/util.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/core-util-is/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/core-util-is/test.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/decode-uri-component/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/decode-uri-component/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/decode-uri-component/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/decode-uri-component/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/decompress-response/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/decompress-response/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/decompress-response/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/decompress-response/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/duplexer3/LICENSE.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/duplexer3/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/duplexer3/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/duplexer3/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/from2/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/from2/LICENSE.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/from2/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/from2/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/from2/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/from2/test.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/get-stream/buffer-stream.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/get-stream/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/get-stream/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/get-stream/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/get-stream/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/got/errors.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/got/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/got/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/got/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/got/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.editorconfig delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintignore delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintrc.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.nvmrc delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.uglifyjsrc.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/badges.html delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js.map delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/index.html delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/run.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/spec/test.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.editorconfig delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintignore delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintrc.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.nvmrc delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.uglifyjsrc.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/badges.html delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js.map delete mode 100644 advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/http-cache-semantics/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/http-cache-semantics/node4/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/http-cache-semantics/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/inherits/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/inherits/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/inherits/inherits.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/inherits/inherits_browser.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/inherits/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/into-stream/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/into-stream/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/into-stream/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/into-stream/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/.jscs.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/.npmignore delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/.testem.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-object/test/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-plain-obj/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-plain-obj/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-plain-obj/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-plain-obj/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-retry-allowed/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-retry-allowed/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-retry-allowed/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/is-retry-allowed/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/.npmignore delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/Makefile delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/component.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/isarray/test.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/isurl/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/isurl/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/isurl/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/isurl/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/json-buffer/.npmignore delete mode 100644 advancedcontentfilter/vendor/npm-asset/json-buffer/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/json-buffer/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/json-buffer/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/json-buffer/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/json-buffer/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/json-buffer/test/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/keyv/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/keyv/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/keyv/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/keyv/src/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/lowercase-keys/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/lowercase-keys/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/lowercase-keys/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/mimic-response/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/mimic-response/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/mimic-response/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/mimic-response/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/normalize-url/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/normalize-url/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/normalize-url/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/normalize-url/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/object-assign/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/object-assign/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/object-assign/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/object-assign/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-cancelable/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-cancelable/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-cancelable/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-cancelable/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-finally/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-finally/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-finally/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-finally/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-is-promise/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-is-promise/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-is-promise/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-is-promise/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-timeout/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-timeout/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-timeout/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/p-timeout/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/pify/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/pify/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/pify/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/pify/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/prepend-http/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/prepend-http/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/prepend-http/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/prepend-http/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/process-nextick-args/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/process-nextick-args/license.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/process-nextick-args/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/process-nextick-args/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/query-string/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/query-string/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/query-string/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/query-string/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/CONTRIBUTING.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/GOVERNANCE.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/doc/wg-meetings/2015-01-30.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/duplex-browser.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/duplex.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_duplex.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_passthrough.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_readable.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_transform.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_writable.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/BufferList.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/destroy.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream-browser.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/passthrough.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/readable-browser.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/readable.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/transform.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/writable-browser.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/readable-stream/writable.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/responselike/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/responselike/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/responselike/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/responselike/src/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/safe-buffer/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/safe-buffer/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/safe-buffer/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/safe-buffer/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/safe-buffer/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/safe-buffer/test.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.d.ts delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js.map delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.d.ts delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js.map delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.d.ts delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js.map delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.d.ts delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js.map delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/sindresorhus--is/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/sort-keys/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/sort-keys/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/sort-keys/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/sort-keys/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/strict-uri-encode/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/strict-uri-encode/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/strict-uri-encode/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/strict-uri-encode/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/string_decoder/.travis.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/string_decoder/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/string_decoder/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/string_decoder/lib/string_decoder.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/string_decoder/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/timed-out/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/timed-out/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/timed-out/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/timed-out/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-parse-lax/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-parse-lax/license delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-parse-lax/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-parse-lax/readme.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-to-options/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-to-options/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-to-options/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/url-to-options/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/util-deprecate/History.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/util-deprecate/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/util-deprecate/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/util-deprecate/browser.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/util-deprecate/node.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/util-deprecate/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/.circleci/config.yml delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintignore delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintrc.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/.github/ISSUE_TEMPLATE.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/LICENSE delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/dist/README.md delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.common.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.esm.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.min.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/package.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/jsonp.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/node.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xdr.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xhr.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/headers.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/before.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/cors.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/form.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/header.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/json.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/jsonp.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/method.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/request.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/response.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/promise.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/url-template.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/promise.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/resource.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/query.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/root.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/template.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/src/util.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/invalid.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/text.txt delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/valid.json delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.test.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.html delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/karma.conf.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/promise.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/resource.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/specs.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/url.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/test/webpack.config.js delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/types/index.d.ts delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/types/vue.d.ts delete mode 100644 advancedcontentfilter/vendor/npm-asset/vue-resource/yarn.lock delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/.gitignore delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/CONTRIBUTING.md delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/README.md delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/composer.json delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/docker-compose.yml delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/logs/README.md delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/phpunit.xml delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/public/.htaccess delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/public/index.php delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/src/dependencies.php delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/src/middleware.php delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/src/routes.php delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/src/settings.php delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/templates/index.phtml delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/tests/Functional/BaseTestCase.php delete mode 100644 advancedcontentfilter/vendor/slim/slim-skeleton/tests/Functional/HomepageTest.php diff --git a/advancedcontentfilter/composer.json b/advancedcontentfilter/composer.json index b19644f12..576bbce7a 100644 --- a/advancedcontentfilter/composer.json +++ b/advancedcontentfilter/composer.json @@ -20,12 +20,6 @@ "config": { "optimize-autoloader": true, "autoloader-suffix": "AdvancedContentFilterAddon", - "preferred-install": "dist", - "fxp-asset": { - "installer-paths": { - "npm-asset-library": "vendor/asset", - "bower-asset-library": "vendor/asset" - } - } + "preferred-install": "dist" } } diff --git a/advancedcontentfilter/vendor/npm-asset/cacheable-request/LICENSE b/advancedcontentfilter/vendor/npm-asset/cacheable-request/LICENSE deleted file mode 100644 index f27ee9b41..000000000 --- a/advancedcontentfilter/vendor/npm-asset/cacheable-request/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Luke Childs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/cacheable-request/README.md b/advancedcontentfilter/vendor/npm-asset/cacheable-request/README.md deleted file mode 100644 index 84a55682a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/cacheable-request/README.md +++ /dev/null @@ -1,190 +0,0 @@ -# cacheable-request - -> Wrap native HTTP requests with RFC compliant cache support - -[![Build Status](https://travis-ci.org/lukechilds/cacheable-request.svg?branch=master)](https://travis-ci.org/lukechilds/cacheable-request) -[![Coverage Status](https://coveralls.io/repos/github/lukechilds/cacheable-request/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/cacheable-request?branch=master) -[![npm](https://img.shields.io/npm/dm/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request) -[![npm](https://img.shields.io/npm/v/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request) - -[RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching for native Node.js HTTP/HTTPS requests. Caching works out of the box in memory or is easily pluggable with a wide range of storage adapters. - -**Note:** This is a low level wrapper around the core HTTP modules, it's not a high level request library. - -## Features - -- Only stores cacheable responses as defined by RFC 7234 -- Fresh cache entries are served directly from cache -- Stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers -- 304 responses from revalidation requests use cached body -- Updates `Age` header on cached responses -- Can completely bypass cache on a per request basis -- In memory cache by default -- Official support for Redis, MongoDB, SQLite, PostgreSQL and MySQL storage adapters -- Easily plug in your own or third-party storage adapters -- If DB connection fails, cache is automatically bypassed ([disabled by default](#optsautomaticfailover)) -- Adds cache support to any existing HTTP code with minimal changes -- Uses [http-cache-semantics](https://github.com/pornel/http-cache-semantics) internally for HTTP RFC 7234 compliance - -## Install - -```shell -npm install --save cacheable-request -``` - -## Usage - -```js -const http = require('http'); -const CacheableRequest = require('cacheable-request'); - -// Then instead of -const req = http.request('http://example.com', cb); -req.end(); - -// You can do -const cacheableRequest = new CacheableRequest(http.request); -const cacheReq = cacheableRequest('http://example.com', cb); -cacheReq.on('request', req => req.end()); -// Future requests to 'example.com' will be returned from cache if still valid - -// You pass in any other http.request API compatible method to be wrapped with cache support: -const cacheableRequest = new CacheableRequest(https.request); -const cacheableRequest = new CacheableRequest(electron.net); -``` - -## Storage Adapters - -`cacheable-request` uses [Keyv](https://github.com/lukechilds/keyv) to support a wide range of storage adapters. - -For example, to use Redis as a cache backend, you just need to install the official Redis Keyv storage adapter: - -``` -npm install --save @keyv/redis -``` - -And then you can pass `CacheableRequest` your connection string: - -```js -const cacheableRequest = new CacheableRequest(http.request, 'redis://user:pass@localhost:6379'); -``` - -[View all official Keyv storage adapters.](https://github.com/lukechilds/keyv#official-storage-adapters) - -Keyv also supports anything that follows the Map API so it's easy to write your own storage adapter or use a third-party solution. - -e.g The following are all valid storage adapters - -```js -const storageAdapter = new Map(); -// or -const storageAdapter = require('./my-storage-adapter'); -// or -const QuickLRU = require('quick-lru'); -const storageAdapter = new QuickLRU({ maxSize: 1000 }); - -const cacheableRequest = new CacheableRequest(http.request, storageAdapter); -``` - -View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters. - -## API - -### new cacheableRequest(request, [storageAdapter]) - -Returns the provided request function wrapped with cache support. - -#### request - -Type: `function` - -Request function to wrap with cache support. Should be [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) or a similar API compatible request function. - -#### storageAdapter - -Type: `Keyv storage adapter`
-Default: `new Map()` - -A [Keyv](https://github.com/lukechilds/keyv) storage adapter instance, or connection string if using with an official Keyv storage adapter. - -### Instance - -#### cacheableRequest(opts, [cb]) - -Returns an event emitter. - -##### opts - -Type: `object`, `string` - -Any of the default request functions options plus: - -###### opts.cache - -Type: `boolean`
-Default: `true` - -If the cache should be used. Setting this to false will completely bypass the cache for the current request. - -###### opts.strictTtl - -Type: `boolean`
-Default: `false` - -If set to `false`, after a cached resource's TTL expires it is kept in the cache and will be revalidated on the next request with `If-None-Match`/`If-Modified-Since` headers. - -If set to `true` once a cached resource has expired it is deleted and will have to be re-requested. - -###### opts.automaticFailover - -Type: `boolean`
-Default: `false` - -When set to `true`, if the DB connection fails we will automatically fallback to a network request. DB errors will still be emitted to notify you of the problem even though the request callback may succeed. - -##### cb - -Type: `function` - -The callback function which will receive the response as an argument. - -The response can be either a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or a [responselike object](https://github.com/lukechilds/responselike). The response will also have a `fromCache` property set with a boolean value. - -##### .on('request', request) - -`request` event to get the request object of the request. - -**Note:** This event will only fire if an HTTP request is actually made, not when a response is retrieved from cache. However, you should always handle the `request` event to end the request and handle any potential request errors. - -##### .on('response', response) - -`response` event to get the response object from the HTTP request or cache. - -##### .on('error', error) - -`error` event emitted in case of an error with the cache. - -Errors emitted here will be an instance of `CacheableRequest.RequestError` or `CacheableRequest.CacheError`. You will only ever receive a `RequestError` if the request function throws (normally caused by invalid user input). Normal request errors should be handled inside the `request` event. - -To properly handle all error scenarios you should use the following pattern: - -```js -cacheableRequest('example.com', cb) - .on('error', err => { - if (err instanceof CacheableRequest.CacheError) { - handleCacheError(err); // Cache error - } else if (err instanceof CacheableRequest.RequestError) { - handleRequestError(err); // Request function thrown - } - }) - .on('request', req => { - req.on('error', handleRequestError); // Request error emitted - req.end(); - }); -``` - -**Note:** Database connection errors are emitted here, however `cacheable-request` will attempt to re-request the resource and bypass the cache on a connection error. Therefore a database connection error doesn't necessarily mean the request won't be fulfilled. - -## License - -MIT © Luke Childs diff --git a/advancedcontentfilter/vendor/npm-asset/cacheable-request/package.json b/advancedcontentfilter/vendor/npm-asset/cacheable-request/package.json deleted file mode 100644 index 044831242..000000000 --- a/advancedcontentfilter/vendor/npm-asset/cacheable-request/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "cacheable-request", - "version": "2.1.4", - "description": "Wrap native HTTP requests with RFC compliant cache support", - "main": "src/index.js", - "scripts": { - "test": "xo && nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "xo": { - "extends": "xo-lukechilds" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/lukechilds/cacheable-request.git" - }, - "keywords": [ - "HTTP", - "HTTPS", - "cache", - "caching", - "layer", - "cacheable", - "RFC 7234", - "RFC", - "7234", - "compliant" - ], - "author": "Luke Childs (http://lukechilds.co.uk)", - "license": "MIT", - "bugs": { - "url": "https://github.com/lukechilds/cacheable-request/issues" - }, - "homepage": "https://github.com/lukechilds/cacheable-request", - "dependencies": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" - }, - "devDependencies": { - "@keyv/sqlite": "^1.2.6", - "ava": "^0.24.0", - "coveralls": "^3.0.0", - "create-test-server": "^2.0.0", - "delay": "^2.0.0", - "eslint-config-xo-lukechilds": "^1.0.0", - "nyc": "^11.0.2", - "pify": "^3.0.0", - "sqlite3": "^3.1.9", - "this": "^1.0.2", - "xo": "^0.19.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/cacheable-request/src/index.js b/advancedcontentfilter/vendor/npm-asset/cacheable-request/src/index.js deleted file mode 100644 index 1935b2db8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/cacheable-request/src/index.js +++ /dev/null @@ -1,155 +0,0 @@ -'use strict'; - -const EventEmitter = require('events'); -const urlLib = require('url'); -const normalizeUrl = require('normalize-url'); -const getStream = require('get-stream'); -const CachePolicy = require('http-cache-semantics'); -const Response = require('responselike'); -const lowercaseKeys = require('lowercase-keys'); -const cloneResponse = require('clone-response'); -const Keyv = require('keyv'); - -class CacheableRequest { - constructor(request, cacheAdapter) { - if (typeof request !== 'function') { - throw new TypeError('Parameter `request` must be a function'); - } - - this.cache = new Keyv({ - uri: typeof cacheAdapter === 'string' && cacheAdapter, - store: typeof cacheAdapter !== 'string' && cacheAdapter, - namespace: 'cacheable-request' - }); - - return this.createCacheableRequest(request); - } - - createCacheableRequest(request) { - return (opts, cb) => { - if (typeof opts === 'string') { - opts = urlLib.parse(opts); - } - opts = Object.assign({ - headers: {}, - method: 'GET', - cache: true, - strictTtl: false, - automaticFailover: false - }, opts); - opts.headers = lowercaseKeys(opts.headers); - - const ee = new EventEmitter(); - const url = normalizeUrl(urlLib.format(opts)); - const key = `${opts.method}:${url}`; - let revalidate = false; - let madeRequest = false; - - const makeRequest = opts => { - madeRequest = true; - const handler = response => { - if (revalidate) { - const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response); - if (!revalidatedPolicy.modified) { - const headers = revalidatedPolicy.policy.responseHeaders(); - response = new Response(response.statusCode, headers, revalidate.body, revalidate.url); - response.cachePolicy = revalidatedPolicy.policy; - response.fromCache = true; - } - } - - if (!response.fromCache) { - response.cachePolicy = new CachePolicy(opts, response); - response.fromCache = false; - } - - let clonedResponse; - if (opts.cache && response.cachePolicy.storable()) { - clonedResponse = cloneResponse(response); - getStream.buffer(response) - .then(body => { - const value = { - cachePolicy: response.cachePolicy.toObject(), - url: response.url, - statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, - body - }; - const ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined; - return this.cache.set(key, value, ttl); - }) - .catch(err => ee.emit('error', new CacheableRequest.CacheError(err))); - } else if (opts.cache && revalidate) { - this.cache.delete(key) - .catch(err => ee.emit('error', new CacheableRequest.CacheError(err))); - } - - ee.emit('response', clonedResponse || response); - if (typeof cb === 'function') { - cb(clonedResponse || response); - } - }; - - try { - const req = request(opts, handler); - ee.emit('request', req); - } catch (err) { - ee.emit('error', new CacheableRequest.RequestError(err)); - } - }; - - const get = opts => Promise.resolve() - .then(() => opts.cache ? this.cache.get(key) : undefined) - .then(cacheEntry => { - if (typeof cacheEntry === 'undefined') { - return makeRequest(opts); - } - - const policy = CachePolicy.fromObject(cacheEntry.cachePolicy); - if (policy.satisfiesWithoutRevalidation(opts)) { - const headers = policy.responseHeaders(); - const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url); - response.cachePolicy = policy; - response.fromCache = true; - - ee.emit('response', response); - if (typeof cb === 'function') { - cb(response); - } - } else { - revalidate = cacheEntry; - opts.headers = policy.revalidationHeaders(opts); - makeRequest(opts); - } - }); - - this.cache.on('error', err => ee.emit('error', new CacheableRequest.CacheError(err))); - - get(opts).catch(err => { - if (opts.automaticFailover && !madeRequest) { - makeRequest(opts); - } - ee.emit('error', new CacheableRequest.CacheError(err)); - }); - - return ee; - }; - } -} - -CacheableRequest.RequestError = class extends Error { - constructor(err) { - super(err.message); - this.name = 'RequestError'; - Object.assign(this, err); - } -}; - -CacheableRequest.CacheError = class extends Error { - constructor(err) { - super(err.message); - this.name = 'CacheError'; - Object.assign(this, err); - } -}; - -module.exports = CacheableRequest; diff --git a/advancedcontentfilter/vendor/npm-asset/clone-response/LICENSE b/advancedcontentfilter/vendor/npm-asset/clone-response/LICENSE deleted file mode 100644 index f27ee9b41..000000000 --- a/advancedcontentfilter/vendor/npm-asset/clone-response/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Luke Childs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/clone-response/README.md b/advancedcontentfilter/vendor/npm-asset/clone-response/README.md deleted file mode 100644 index d037cfec1..000000000 --- a/advancedcontentfilter/vendor/npm-asset/clone-response/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# clone-response - -> Clone a Node.js HTTP response stream - -[![Build Status](https://travis-ci.org/lukechilds/clone-response.svg?branch=master)](https://travis-ci.org/lukechilds/clone-response) -[![Coverage Status](https://coveralls.io/repos/github/lukechilds/clone-response/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/clone-response?branch=master) -[![npm](https://img.shields.io/npm/dm/clone-response.svg)](https://www.npmjs.com/package/clone-response) -[![npm](https://img.shields.io/npm/v/clone-response.svg)](https://www.npmjs.com/package/clone-response) - -Returns a new stream and copies over all properties and methods from the original response giving you a complete duplicate. - -This is useful in situations where you need to consume the response stream but also want to pass an unconsumed stream somewhere else to be consumed later. - -## Install - -```shell -npm install --save clone-response -``` - -## Usage - -```js -const http = require('http'); -const cloneResponse = require('clone-response'); - -http.get('http://example.com', response => { - const clonedResponse = cloneResponse(response); - response.pipe(process.stdout); - - setImmediate(() => { - // The response stream has already been consumed by the time this executes, - // however the cloned response stream is still available. - doSomethingWithResponse(clonedResponse); - }); -}); -``` - -Please bear in mind that the process of cloning a stream consumes it. However, you can consume a stream multiple times in the same tick, therefore allowing you to create multiple clones. e.g: - -```js -const clone1 = cloneResponse(response); -const clone2 = cloneResponse(response); -// response can still be consumed in this tick but cannot be consumed if passed -// into any async callbacks. clone1 and clone2 can be passed around and be -// consumed in the future. -``` - -## API - -### cloneResponse(response) - -Returns a clone of the passed in response. - -#### response - -Type: `stream` - -A [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) to clone. - -## License - -MIT © Luke Childs diff --git a/advancedcontentfilter/vendor/npm-asset/clone-response/package.json b/advancedcontentfilter/vendor/npm-asset/clone-response/package.json deleted file mode 100644 index 2cb9aa60f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/clone-response/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "clone-response", - "version": "1.0.2", - "description": "Clone a Node.js HTTP response stream", - "main": "src/index.js", - "scripts": { - "test": "xo && nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "xo": { - "extends": "xo-lukechilds" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/lukechilds/clone-response.git" - }, - "keywords": [ - "clone", - "duplicate", - "copy", - "response", - "HTTP", - "stream" - ], - "author": "Luke Childs (http://lukechilds.co.uk)", - "license": "MIT", - "bugs": { - "url": "https://github.com/lukechilds/clone-response/issues" - }, - "homepage": "https://github.com/lukechilds/clone-response", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "devDependencies": { - "ava": "^0.22.0", - "coveralls": "^2.13.1", - "create-test-server": "^2.0.1", - "eslint-config-xo-lukechilds": "^1.0.0", - "get-stream": "^3.0.0", - "nyc": "^11.0.2", - "pify": "^3.0.0", - "xo": "^0.19.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/clone-response/src/index.js b/advancedcontentfilter/vendor/npm-asset/clone-response/src/index.js deleted file mode 100644 index 0285dfffe..000000000 --- a/advancedcontentfilter/vendor/npm-asset/clone-response/src/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -const PassThrough = require('stream').PassThrough; -const mimicResponse = require('mimic-response'); - -const cloneResponse = response => { - if (!(response && response.pipe)) { - throw new TypeError('Parameter `response` must be a response stream.'); - } - - const clone = new PassThrough(); - mimicResponse(response, clone); - - return response.pipe(clone); -}; - -module.exports = cloneResponse; diff --git a/advancedcontentfilter/vendor/npm-asset/core-util-is/LICENSE b/advancedcontentfilter/vendor/npm-asset/core-util-is/LICENSE deleted file mode 100644 index d8d7f9437..000000000 --- a/advancedcontentfilter/vendor/npm-asset/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/core-util-is/README.md b/advancedcontentfilter/vendor/npm-asset/core-util-is/README.md deleted file mode 100644 index 5a76b4149..000000000 --- a/advancedcontentfilter/vendor/npm-asset/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/advancedcontentfilter/vendor/npm-asset/core-util-is/float.patch b/advancedcontentfilter/vendor/npm-asset/core-util-is/float.patch deleted file mode 100644 index a06d5c05f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/core-util-is/lib/util.js b/advancedcontentfilter/vendor/npm-asset/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c0..000000000 --- a/advancedcontentfilter/vendor/npm-asset/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/advancedcontentfilter/vendor/npm-asset/core-util-is/package.json b/advancedcontentfilter/vendor/npm-asset/core-util-is/package.json deleted file mode 100644 index 3368e9519..000000000 --- a/advancedcontentfilter/vendor/npm-asset/core-util-is/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/core-util-is/test.js b/advancedcontentfilter/vendor/npm-asset/core-util-is/test.js deleted file mode 100644 index 1a490c65a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/advancedcontentfilter/vendor/npm-asset/decode-uri-component/index.js b/advancedcontentfilter/vendor/npm-asset/decode-uri-component/index.js deleted file mode 100644 index 691499b0e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decode-uri-component/index.js +++ /dev/null @@ -1,94 +0,0 @@ -'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/advancedcontentfilter/vendor/npm-asset/decode-uri-component/license b/advancedcontentfilter/vendor/npm-asset/decode-uri-component/license deleted file mode 100644 index 78b08554a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decode-uri-component/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 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/advancedcontentfilter/vendor/npm-asset/decode-uri-component/package.json b/advancedcontentfilter/vendor/npm-asset/decode-uri-component/package.json deleted file mode 100644 index 183bd7c6a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decode-uri-component/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "decode-uri-component", - "version": "0.2.0", - "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/advancedcontentfilter/vendor/npm-asset/decode-uri-component/readme.md b/advancedcontentfilter/vendor/npm-asset/decode-uri-component/readme.md deleted file mode 100644 index 795c87ff7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decode-uri-component/readme.md +++ /dev/null @@ -1,70 +0,0 @@ -# decode-uri-component - -[![Build Status](https://travis-ci.org/SamVerschueren/decode-uri-component.svg?branch=master)](https://travis-ci.org/SamVerschueren/decode-uri-component) [![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) diff --git a/advancedcontentfilter/vendor/npm-asset/decompress-response/index.js b/advancedcontentfilter/vendor/npm-asset/decompress-response/index.js deleted file mode 100644 index d8acd4a30..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decompress-response/index.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; -const PassThrough = require('stream').PassThrough; -const zlib = require('zlib'); -const mimicResponse = require('mimic-response'); - -module.exports = response => { - // TODO: Use Array#includes when targeting Node.js 6 - if (['gzip', 'deflate'].indexOf(response.headers['content-encoding']) === -1) { - return response; - } - - const unzip = zlib.createUnzip(); - const stream = new PassThrough(); - - mimicResponse(response, stream); - - unzip.on('error', err => { - if (err.code === 'Z_BUF_ERROR') { - stream.end(); - return; - } - - stream.emit('error', err); - }); - - response.pipe(unzip).pipe(stream); - - return stream; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/decompress-response/license b/advancedcontentfilter/vendor/npm-asset/decompress-response/license deleted file mode 100644 index 32a16ce32..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decompress-response/license +++ /dev/null @@ -1,21 +0,0 @@ -`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/advancedcontentfilter/vendor/npm-asset/decompress-response/package.json b/advancedcontentfilter/vendor/npm-asset/decompress-response/package.json deleted file mode 100644 index 3574dc27f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decompress-response/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "decompress-response", - "version": "3.3.0", - "description": "Decompress a HTTP response if needed", - "license": "MIT", - "repository": "sindresorhus/decompress-response", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - } - ], - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "decompress", - "response", - "http", - "https", - "zlib", - "gzip", - "zip", - "deflate", - "unzip", - "ungzip", - "incoming", - "message", - "stream", - "compressed" - ], - "dependencies": { - "mimic-response": "^1.0.0" - }, - "devDependencies": { - "ava": "*", - "get-stream": "^3.0.0", - "pify": "^3.0.0", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/decompress-response/readme.md b/advancedcontentfilter/vendor/npm-asset/decompress-response/readme.md deleted file mode 100644 index 1b98767f5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/decompress-response/readme.md +++ /dev/null @@ -1,31 +0,0 @@ -# decompress-response [![Build Status](https://travis-ci.org/sindresorhus/decompress-response.svg?branch=master)](https://travis-ci.org/sindresorhus/decompress-response) - -> Decompress a HTTP response if needed - -Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped or deflated, otherwise just passes it through. - -Used by [`got`](https://github.com/sindresorhus/got). - - -## Install - -``` -$ npm install decompress-response -``` - - -## Usage - -```js -const http = require('http'); -const decompressResponse = require('decompress-response'); - -http.get('http://sindresorhus.com', response => { - response = decompressResponse(response); -}); -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/duplexer3/LICENSE.md b/advancedcontentfilter/vendor/npm-asset/duplexer3/LICENSE.md deleted file mode 100644 index 547189a6a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/duplexer3/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Deoxxa Development -====================================== -All rights reserved. --------------------- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Deoxxa Development 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 DEOXXA DEVELOPMENT ''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 DEOXXA DEVELOPMENT 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/advancedcontentfilter/vendor/npm-asset/duplexer3/README.md b/advancedcontentfilter/vendor/npm-asset/duplexer3/README.md deleted file mode 100644 index 9f95ddf53..000000000 --- a/advancedcontentfilter/vendor/npm-asset/duplexer3/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# duplexer3 [![Build Status](https://travis-ci.org/floatdrop/duplexer3.svg?branch=master)](https://travis-ci.org/floatdrop/duplexer3) [![Coverage Status](https://coveralls.io/repos/floatdrop/duplexer3/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/duplexer3?branch=master) - -Like [duplexer2](https://github.com/deoxxa/duplexer2) but using Streams3 without readable-stream dependency - -```javascript -var stream = require("stream"); - -var duplexer3 = require("duplexer3"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer3(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); -``` - -``` -got data "oh, hi there" -finished writing -got finish event -finished ending -got end event -``` - -## Overview - -This is a reimplementation of [duplexer](https://www.npmjs.com/package/duplexer) using the -Streams3 API which is standard in Node as of v4. Everything largely -works the same. - - - -## Installation - -[Available via `npm`](https://docs.npmjs.com/cli/install): - -``` -$ npm i duplexer3 -``` - -## API - -### duplexer3 - -Creates a new `DuplexWrapper` object, which is the actual class that implements -most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. - -```javascript -duplexer3([options], writable, readable) -``` - -```javascript -const duplex = duplexer3(new stream.Writable(), new stream.Readable()); -``` - -Arguments - -* __options__ - an object specifying the regular `stream.Duplex` options, as - well as the properties described below. -* __writable__ - a writable stream -* __readable__ - a readable stream - -Options - -* __bubbleErrors__ - a boolean value that specifies whether to bubble errors - from the underlying readable/writable streams. Default is `true`. - - -## License - -3-clause BSD. [A copy](./LICENSE) is included with the source. - -## Contact - -* GitHub ([deoxxa](http://github.com/deoxxa)) -* Twitter ([@deoxxa](http://twitter.com/deoxxa)) -* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/advancedcontentfilter/vendor/npm-asset/duplexer3/index.js b/advancedcontentfilter/vendor/npm-asset/duplexer3/index.js deleted file mode 100644 index 1339ffc51..000000000 --- a/advancedcontentfilter/vendor/npm-asset/duplexer3/index.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; - -var stream = require("stream"); - -function DuplexWrapper(options, writable, readable) { - if (typeof readable === "undefined") { - readable = writable; - writable = options; - options = null; - } - - stream.Duplex.call(this, options); - - if (typeof readable.read !== "function") { - readable = (new stream.Readable(options)).wrap(readable); - } - - this._writable = writable; - this._readable = readable; - this._waiting = false; - - var self = this; - - writable.once("finish", function() { - self.end(); - }); - - this.once("finish", function() { - writable.end(); - }); - - readable.on("readable", function() { - if (self._waiting) { - self._waiting = false; - self._read(); - } - }); - - readable.once("end", function() { - self.push(null); - }); - - if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) { - writable.on("error", function(err) { - self.emit("error", err); - }); - - readable.on("error", function(err) { - self.emit("error", err); - }); - } -} - -DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); - -DuplexWrapper.prototype._write = function _write(input, encoding, done) { - this._writable.write(input, encoding, done); -}; - -DuplexWrapper.prototype._read = function _read() { - var buf; - var reads = 0; - while ((buf = this._readable.read()) !== null) { - this.push(buf); - reads++; - } - if (reads === 0) { - this._waiting = true; - } -}; - -module.exports = function duplex2(options, writable, readable) { - return new DuplexWrapper(options, writable, readable); -}; - -module.exports.DuplexWrapper = DuplexWrapper; diff --git a/advancedcontentfilter/vendor/npm-asset/duplexer3/package.json b/advancedcontentfilter/vendor/npm-asset/duplexer3/package.json deleted file mode 100644 index 251f78f46..000000000 --- a/advancedcontentfilter/vendor/npm-asset/duplexer3/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "duplexer3", - "version": "0.1.4", - "description": "Like duplexer but using streams3", - "engine": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "scripts": { - "test": "mocha -R tap" - }, - "repository": "floatdrop/duplexer3", - "keywords": [ - "duplex", - "duplexer", - "stream", - "stream3", - "join", - "combine" - ], - "author": "Conrad Pankoff (http://www.fknsrs.biz/)", - "license": "BSD-3-Clause", - "devDependencies": { - "mocha": "^2.2.5" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/from2/.travis.yml b/advancedcontentfilter/vendor/npm-asset/from2/.travis.yml deleted file mode 100644 index b03ffabca..000000000 --- a/advancedcontentfilter/vendor/npm-asset/from2/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -before_install: - - npm install -g npm -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" diff --git a/advancedcontentfilter/vendor/npm-asset/from2/LICENSE.md b/advancedcontentfilter/vendor/npm-asset/from2/LICENSE.md deleted file mode 100644 index 146cb32a7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/from2/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -## The MIT License (MIT) ## - -Copyright (c) 2014 Hugh Kennedy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/from2/README.md b/advancedcontentfilter/vendor/npm-asset/from2/README.md deleted file mode 100644 index 3e041a412..000000000 --- a/advancedcontentfilter/vendor/npm-asset/from2/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # - -`from2` is a high-level module for creating readable streams that properly handle backpressure. - -Convience wrapper for -[readable-stream](http://github.com/isaacs/readable-stream)'s `ReadableStream` -base class, with an API lifted from -[from](http://github.com/dominictarr/from) and -[through2](http://github.com/rvagg/through2). - -## Usage ## - -[![from2](https://nodei.co/npm/from2.png?mini=true)](https://nodei.co/npm/from2) - -### `stream = from2([opts], read)` ### - -Where `opts` are the options to pass on to the `ReadableStream` constructor, -and `read(size, next)` is called when data is requested from the stream. - -* `size` is the recommended amount of data (in bytes) to retrieve. -* `next(err)` should be called when you're ready to emit more data. - -For example, here's a readable stream that emits the contents of a given -string: - -``` javascript -var from = require('from2') - -function fromString(string) { - return from(function(size, next) { - // if there's no more content - // left in the string, close the stream. - if (string.length <= 0) return next(null, null) - - // Pull in a new chunk of text, - // removing it from the string. - var chunk = string.slice(0, size) - string = string.slice(size) - - // Emit "chunk" from the stream. - next(null, chunk) - }) -} - -// pipe "hello world" out -// to stdout. -fromString('hello world').pipe(process.stdout) -``` - -### `stream = from2.obj([opts], read)` ### - -Shorthand for `from2({ objectMode: true }, read)`. - -### `createStream = from2.ctor([opts], read)` ### - -If you're creating similar streams in quick succession you can improve -performance by generating a stream **constructor** that you can reuse instead -of creating one-off streams on each call. - -Takes the same options as `from2`, instead returning a constructor which you -can use to create new streams. - -### See Also - -- [from2-array](https://github.com/binocarlos/from2-array) - Create a from2 stream based on an array of source values. -- [from2-string](https://github.com/yoshuawuyts/from2-string) - Create a stream from a string. Sugary wrapper around from2. - -## License ## - -MIT. See [LICENSE.md](http://github.com/hughsk/from2/blob/master/LICENSE.md) for details. diff --git a/advancedcontentfilter/vendor/npm-asset/from2/index.js b/advancedcontentfilter/vendor/npm-asset/from2/index.js deleted file mode 100644 index cb200c610..000000000 --- a/advancedcontentfilter/vendor/npm-asset/from2/index.js +++ /dev/null @@ -1,103 +0,0 @@ -var Readable = require('readable-stream').Readable -var inherits = require('inherits') - -module.exports = from2 - -from2.ctor = ctor -from2.obj = obj - -var Proto = ctor() - -function toFunction(list) { - list = list.slice() - return function (_, cb) { - var err = null - var item = list.length ? list.shift() : null - if (item instanceof Error) { - err = item - item = null - } - - cb(err, item) - } -} - -function from2(opts, read) { - if (typeof opts !== 'object' || Array.isArray(opts)) { - read = opts - opts = {} - } - - var rs = new Proto(opts) - rs._from = Array.isArray(read) ? toFunction(read) : (read || noop) - return rs -} - -function ctor(opts, read) { - if (typeof opts === 'function') { - read = opts - opts = {} - } - - opts = defaults(opts) - - inherits(Class, Readable) - function Class(override) { - if (!(this instanceof Class)) return new Class(override) - this._reading = false - this._callback = check - this.destroyed = false - Readable.call(this, override || opts) - - var self = this - var hwm = this._readableState.highWaterMark - - function check(err, data) { - if (self.destroyed) return - if (err) return self.destroy(err) - if (data === null) return self.push(null) - self._reading = false - if (self.push(data)) self._read(hwm) - } - } - - Class.prototype._from = read || noop - Class.prototype._read = function(size) { - if (this._reading || this.destroyed) return - this._reading = true - this._from(size, this._callback) - } - - Class.prototype.destroy = function(err) { - if (this.destroyed) return - this.destroyed = true - - var self = this - process.nextTick(function() { - if (err) self.emit('error', err) - self.emit('close') - }) - } - - return Class -} - -function obj(opts, read) { - if (typeof opts === 'function' || Array.isArray(opts)) { - read = opts - opts = {} - } - - opts = defaults(opts) - opts.objectMode = true - opts.highWaterMark = 16 - - return from2(opts, read) -} - -function noop () {} - -function defaults(opts) { - opts = opts || {} - return opts -} diff --git a/advancedcontentfilter/vendor/npm-asset/from2/package.json b/advancedcontentfilter/vendor/npm-asset/from2/package.json deleted file mode 100644 index 943b8a81d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/from2/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "from2", - "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"", - "version": "2.3.0", - "main": "index.js", - "scripts": { - "test": "node test" - }, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - }, - "devDependencies": { - "tape": "^4.0.0" - }, - "author": "Hugh Kennedy (http://hughsk.io/)", - "contributors": [ - "Mathias Buus " - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/from2" - }, - "bugs": { - "url": "https://github.com/hughsk/from2/issues" - }, - "homepage": "https://github.com/hughsk/from2", - "keywords": [ - "from", - "stream", - "readable", - "pull", - "convenience", - "wrapper" - ] -} diff --git a/advancedcontentfilter/vendor/npm-asset/from2/test.js b/advancedcontentfilter/vendor/npm-asset/from2/test.js deleted file mode 100644 index b11bd6cd8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/from2/test.js +++ /dev/null @@ -1,123 +0,0 @@ -var test = require('tape') -var path = require('path') -var from = require('./') -var fs = require('fs') - -var tmp = path.resolve( - __dirname, 'tmp.txt' -) - -function fromString(string) { - return from(function(size, next) { - if (string.length <= 0) return next(null, null) - var chunk = string.slice(0, size) - string = string.slice(size) - next(null, chunk) - }) -} - -test('from2', function(t) { - var contents = fs.readFileSync(__filename, 'utf8') - var stream = fromString(contents) - - stream - .pipe(fs.createWriteStream(tmp)) - .on('close', function() { - t.equal(fs.readFileSync(tmp, 'utf8'), contents) - fs.unlinkSync(tmp) - t.end() - }) -}) - -test('old mode', function(t) { - var contents = fs.readFileSync(__filename, 'utf8') - var stream = fromString(contents) - var buffer = '' - - stream.on('data', function(data) { - buffer += data - }).on('end', function() { - t.equal(buffer, contents) - t.end() - }) -}) - -test('destroy', function(t) { - var stream = from(function(size, next) { - process.nextTick(function() { - next(null, 'no') - }) - }) - - stream.on('data', function(data) { - t.ok(false) - }).on('close', function() { - t.ok(true) - t.end() - }) - - stream.destroy() -}) - -test('arrays', function (t) { - var input = ['a', 'b', 'c'] - var stream = from(input) - var output = [] - stream.on('data', function (letter) { - output.push(letter.toString()) - }) - stream.on('end', function () { - t.deepEqual(input, output) - t.end() - }) -}) - -test('obj arrays', function (t) { - var input = [{foo:'a'}, {foo:'b'}, {foo:'c'}] - var stream = from.obj(input) - var output = [] - stream.on('data', function (letter) { - output.push(letter) - }) - stream.on('end', function () { - t.deepEqual(input, output) - t.end() - }) -}) - - -test('arrays can emit errors', function (t) { - var input = ['a', 'b', new Error('ooops'), 'c'] - var stream = from(input) - var output = [] - stream.on('data', function (letter) { - output.push(letter.toString()) - }) - stream.on('error', function(e){ - t.deepEqual(['a', 'b'], output) - t.equal('ooops', e.message) - t.end() - }) - stream.on('end', function () { - t.fail('the stream should have errored') - }) -}) - -test('obj arrays can emit errors', function (t) { - var input = [{foo:'a'}, {foo:'b'}, new Error('ooops'), {foo:'c'}] - var stream = from.obj(input) - var output = [] - stream.on('data', function (letter) { - output.push(letter) - }) - stream.on('error', function(e){ - t.deepEqual([{foo:'a'}, {foo:'b'}], output) - t.equal('ooops', e.message) - t.end() - }) - stream.on('end', function () { - t.fail('the stream should have errored') - }) -}) - - diff --git a/advancedcontentfilter/vendor/npm-asset/get-stream/buffer-stream.js b/advancedcontentfilter/vendor/npm-asset/get-stream/buffer-stream.js deleted file mode 100644 index ae45d3d9e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/get-stream/buffer-stream.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const PassThrough = require('stream').PassThrough; - -module.exports = opts => { - opts = Object.assign({}, opts); - - const array = opts.array; - let encoding = opts.encoding; - const buffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || buffer); - } else { - encoding = encoding || 'utf8'; - } - - if (buffer) { - encoding = null; - } - - let len = 0; - const ret = []; - const stream = new PassThrough({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - stream.on('data', chunk => { - ret.push(chunk); - - if (objectMode) { - len = ret.length; - } else { - len += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return ret; - } - - return buffer ? Buffer.concat(ret, len) : ret.join(''); - }; - - stream.getBufferedLength = () => len; - - return stream; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/get-stream/index.js b/advancedcontentfilter/vendor/npm-asset/get-stream/index.js deleted file mode 100644 index 2dc5ee96a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/get-stream/index.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const bufferStream = require('./buffer-stream'); - -function getStream(inputStream, opts) { - if (!inputStream) { - return Promise.reject(new Error('Expected a stream')); - } - - opts = Object.assign({maxBuffer: Infinity}, opts); - - const maxBuffer = opts.maxBuffer; - let stream; - let clean; - - const p = new Promise((resolve, reject) => { - const error = err => { - if (err) { // null check - err.bufferedData = stream.getBufferedValue(); - } - - reject(err); - }; - - stream = bufferStream(opts); - inputStream.once('error', error); - inputStream.pipe(stream); - - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - reject(new Error('maxBuffer exceeded')); - } - }); - stream.once('error', error); - stream.on('end', resolve); - - clean = () => { - // some streams doesn't implement the `stream.Readable` interface correctly - if (inputStream.unpipe) { - inputStream.unpipe(stream); - } - }; - }); - - p.then(clean, clean); - - return p.then(() => stream.getBufferedValue()); -} - -module.exports = getStream; -module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'})); -module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true})); diff --git a/advancedcontentfilter/vendor/npm-asset/get-stream/license b/advancedcontentfilter/vendor/npm-asset/get-stream/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/get-stream/license +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/get-stream/package.json b/advancedcontentfilter/vendor/npm-asset/get-stream/package.json deleted file mode 100644 index 2f2adf0d5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/get-stream/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "get-stream", - "version": "3.0.0", - "description": "Get a stream as a string, buffer, or array", - "license": "MIT", - "repository": "sindresorhus/get-stream", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js", - "buffer-stream.js" - ], - "keywords": [ - "get", - "stream", - "promise", - "concat", - "string", - "str", - "text", - "buffer", - "read", - "data", - "consume", - "readable", - "readablestream", - "array", - "object", - "obj" - ], - "devDependencies": { - "ava": "*", - "into-stream": "^3.0.0", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/get-stream/readme.md b/advancedcontentfilter/vendor/npm-asset/get-stream/readme.md deleted file mode 100644 index 73b188fb4..000000000 --- a/advancedcontentfilter/vendor/npm-asset/get-stream/readme.md +++ /dev/null @@ -1,117 +0,0 @@ -# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) - -> Get a stream as a string, buffer, or array - - -## Install - -``` -$ npm install --save get-stream -``` - - -## Usage - -```js -const fs = require('fs'); -const getStream = require('get-stream'); -const stream = fs.createReadStream('unicorn.txt'); - -getStream(stream).then(str => { - console.log(str); - /* - ,,))))))));, - __)))))))))))))), - \|/ -\(((((''''((((((((. - -*-==//////(('' . `)))))), - /|\ ))| o ;-. '((((( ,(, - ( `| / ) ;))))' ,_))^;(~ - | | | ,))((((_ _____------~~~-. %,;(;(>';'~ - o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ - ; ''''```` `: `:::|\,__,%% );`'; ~ - | _ ) / `:|`----' `-' - ______/\/~ | / / - /~;;.____/;;' / ___--,-( `;;;/ - / // _;______;'------~~~~~ /;;/\ / - // | | / ; \;;,\ - (<_ | ; /',/-----' _> - \_| ||_ //~;~~~~~~~~~ - `\_| (,~~ - \~\ - ~~ - */ -}); -``` - - -## API - -The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. - -### getStream(stream, [options]) - -Get the `stream` as a string. - -#### options - -##### encoding - -Type: `string`
-Default: `utf8` - -[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. - -##### maxBuffer - -Type: `number`
-Default: `Infinity` - -Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected. - -### getStream.buffer(stream, [options]) - -Get the `stream` as a buffer. - -It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. - -### getStream.array(stream, [options]) - -Get the `stream` as an array of values. - -It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: - -- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). - -- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. - -- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. - - -## Errors - -If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. - -```js -getStream(streamThatErrorsAtTheEnd('unicorn')) - .catch(err => { - console.log(err.bufferedData); - //=> 'unicorn' - }); -``` - - -## FAQ - -### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? - -This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. - - -## Related - -- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/got/errors.js b/advancedcontentfilter/vendor/npm-asset/got/errors.js deleted file mode 100644 index ad833881f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/got/errors.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; -const urlLib = require('url'); -const http = require('http'); -const PCancelable = require('p-cancelable'); -const is = require('@sindresorhus/is'); - -class GotError extends Error { - constructor(message, error, opts) { - super(message); - Error.captureStackTrace(this, this.constructor); - this.name = 'GotError'; - - if (!is.undefined(error.code)) { - this.code = error.code; - } - - Object.assign(this, { - host: opts.host, - hostname: opts.hostname, - method: opts.method, - path: opts.path, - protocol: opts.protocol, - url: opts.href - }); - } -} - -module.exports.GotError = GotError; - -module.exports.CacheError = class extends GotError { - constructor(error, opts) { - super(error.message, error, opts); - this.name = 'CacheError'; - } -}; - -module.exports.RequestError = class extends GotError { - constructor(error, opts) { - super(error.message, error, opts); - this.name = 'RequestError'; - } -}; - -module.exports.ReadError = class extends GotError { - constructor(error, opts) { - super(error.message, error, opts); - this.name = 'ReadError'; - } -}; - -module.exports.ParseError = class extends GotError { - constructor(error, statusCode, opts, data) { - super(`${error.message} in "${urlLib.format(opts)}": \n${data.slice(0, 77)}...`, error, opts); - this.name = 'ParseError'; - this.statusCode = statusCode; - this.statusMessage = http.STATUS_CODES[this.statusCode]; - } -}; - -module.exports.HTTPError = class extends GotError { - constructor(statusCode, statusMessage, headers, opts) { - if (statusMessage) { - statusMessage = statusMessage.replace(/\r?\n/g, ' ').trim(); - } else { - statusMessage = http.STATUS_CODES[statusCode]; - } - super(`Response code ${statusCode} (${statusMessage})`, {}, opts); - this.name = 'HTTPError'; - this.statusCode = statusCode; - this.statusMessage = statusMessage; - this.headers = headers; - } -}; - -module.exports.MaxRedirectsError = class extends GotError { - constructor(statusCode, redirectUrls, opts) { - super('Redirected 10 times. Aborting.', {}, opts); - this.name = 'MaxRedirectsError'; - this.statusCode = statusCode; - this.statusMessage = http.STATUS_CODES[this.statusCode]; - this.redirectUrls = redirectUrls; - } -}; - -module.exports.UnsupportedProtocolError = class extends GotError { - constructor(opts) { - super(`Unsupported protocol "${opts.protocol}"`, {}, opts); - this.name = 'UnsupportedProtocolError'; - } -}; - -module.exports.CancelError = PCancelable.CancelError; diff --git a/advancedcontentfilter/vendor/npm-asset/got/index.js b/advancedcontentfilter/vendor/npm-asset/got/index.js deleted file mode 100644 index 2ca8862c0..000000000 --- a/advancedcontentfilter/vendor/npm-asset/got/index.js +++ /dev/null @@ -1,661 +0,0 @@ -'use strict'; -const EventEmitter = require('events'); -const http = require('http'); -const https = require('https'); -const PassThrough = require('stream').PassThrough; -const Transform = require('stream').Transform; -const urlLib = require('url'); -const fs = require('fs'); -const querystring = require('querystring'); -const CacheableRequest = require('cacheable-request'); -const duplexer3 = require('duplexer3'); -const intoStream = require('into-stream'); -const is = require('@sindresorhus/is'); -const getStream = require('get-stream'); -const timedOut = require('timed-out'); -const urlParseLax = require('url-parse-lax'); -const urlToOptions = require('url-to-options'); -const lowercaseKeys = require('lowercase-keys'); -const decompressResponse = require('decompress-response'); -const mimicResponse = require('mimic-response'); -const isRetryAllowed = require('is-retry-allowed'); -const isURL = require('isurl'); -const PCancelable = require('p-cancelable'); -const pTimeout = require('p-timeout'); -const pify = require('pify'); -const Buffer = require('safe-buffer').Buffer; -const pkg = require('./package.json'); -const errors = require('./errors'); - -const getMethodRedirectCodes = new Set([300, 301, 302, 303, 304, 305, 307, 308]); -const allMethodRedirectCodes = new Set([300, 303, 307, 308]); - -const isFormData = body => is.nodeStream(body) && is.function(body.getBoundary); - -const getBodySize = opts => { - const body = opts.body; - - if (opts.headers['content-length']) { - return Number(opts.headers['content-length']); - } - - if (!body && !opts.stream) { - return 0; - } - - if (is.string(body)) { - return Buffer.byteLength(body); - } - - if (isFormData(body)) { - return pify(body.getLength.bind(body))(); - } - - if (body instanceof fs.ReadStream) { - return pify(fs.stat)(body.path).then(stat => stat.size); - } - - if (is.nodeStream(body) && is.buffer(body._buffer)) { - return body._buffer.length; - } - - return null; -}; - -function requestAsEventEmitter(opts) { - opts = opts || {}; - - const ee = new EventEmitter(); - const requestUrl = opts.href || urlLib.resolve(urlLib.format(opts), opts.path); - const redirects = []; - const agents = is.object(opts.agent) ? opts.agent : null; - let retryCount = 0; - let redirectUrl; - let uploadBodySize; - let uploaded = 0; - - const get = opts => { - if (opts.protocol !== 'http:' && opts.protocol !== 'https:') { - ee.emit('error', new got.UnsupportedProtocolError(opts)); - return; - } - - let fn = opts.protocol === 'https:' ? https : http; - - if (agents) { - const protocolName = opts.protocol === 'https:' ? 'https' : 'http'; - opts.agent = agents[protocolName] || opts.agent; - } - - if (opts.useElectronNet && process.versions.electron) { - const electron = require('electron'); - fn = electron.net || electron.remote.net; - } - - let progressInterval; - - const cacheableRequest = new CacheableRequest(fn.request, opts.cache); - const cacheReq = cacheableRequest(opts, res => { - clearInterval(progressInterval); - - ee.emit('uploadProgress', { - percent: 1, - transferred: uploaded, - total: uploadBodySize - }); - - const statusCode = res.statusCode; - - res.url = redirectUrl || requestUrl; - res.requestUrl = requestUrl; - - const followRedirect = opts.followRedirect && 'location' in res.headers; - const redirectGet = followRedirect && getMethodRedirectCodes.has(statusCode); - const redirectAll = followRedirect && allMethodRedirectCodes.has(statusCode); - - if (redirectAll || (redirectGet && (opts.method === 'GET' || opts.method === 'HEAD'))) { - res.resume(); - - if (statusCode === 303) { - // Server responded with "see other", indicating that the resource exists at another location, - // and the client should request it from that location via GET or HEAD. - opts.method = 'GET'; - } - - if (redirects.length >= 10) { - ee.emit('error', new got.MaxRedirectsError(statusCode, redirects, opts), null, res); - return; - } - - const bufferString = Buffer.from(res.headers.location, 'binary').toString(); - - redirectUrl = urlLib.resolve(urlLib.format(opts), bufferString); - - redirects.push(redirectUrl); - - const redirectOpts = Object.assign({}, opts, urlLib.parse(redirectUrl)); - - ee.emit('redirect', res, redirectOpts); - - get(redirectOpts); - - return; - } - - setImmediate(() => { - try { - getResponse(res, opts, ee, redirects); - } catch (e) { - ee.emit('error', e); - } - }); - }); - - cacheReq.on('error', err => { - if (err instanceof CacheableRequest.RequestError) { - ee.emit('error', new got.RequestError(err, opts)); - } else { - ee.emit('error', new got.CacheError(err, opts)); - } - }); - - cacheReq.once('request', req => { - let aborted = false; - req.once('abort', _ => { - aborted = true; - }); - - req.once('error', err => { - clearInterval(progressInterval); - - if (aborted) { - return; - } - - const backoff = opts.retries(++retryCount, err); - - if (backoff) { - setTimeout(get, backoff, opts); - return; - } - - ee.emit('error', new got.RequestError(err, opts)); - }); - - ee.once('request', req => { - ee.emit('uploadProgress', { - percent: 0, - transferred: 0, - total: uploadBodySize - }); - - const socket = req.connection; - if (socket) { - // `._connecting` was the old property which was made public in node v6.1.0 - const isConnecting = socket.connecting === undefined ? socket._connecting : socket.connecting; - - const onSocketConnect = () => { - const uploadEventFrequency = 150; - - progressInterval = setInterval(() => { - const lastUploaded = uploaded; - const headersSize = Buffer.byteLength(req._header); - uploaded = socket.bytesWritten - headersSize; - - // Prevent the known issue of `bytesWritten` being larger than body size - if (uploadBodySize && uploaded > uploadBodySize) { - uploaded = uploadBodySize; - } - - // Don't emit events with unchanged progress and - // prevent last event from being emitted, because - // it's emitted when `response` is emitted - if (uploaded === lastUploaded || uploaded === uploadBodySize) { - return; - } - - ee.emit('uploadProgress', { - percent: uploadBodySize ? uploaded / uploadBodySize : 0, - transferred: uploaded, - total: uploadBodySize - }); - }, uploadEventFrequency); - }; - - // Only subscribe to 'connect' event if we're actually connecting a new - // socket, otherwise if we're already connected (because this is a - // keep-alive connection) do not bother. This is important since we won't - // get a 'connect' event for an already connected socket. - if (isConnecting) { - socket.once('connect', onSocketConnect); - } else { - onSocketConnect(); - } - } - }); - - if (opts.gotTimeout) { - clearInterval(progressInterval); - timedOut(req, opts.gotTimeout); - } - - setImmediate(() => { - ee.emit('request', req); - }); - }); - }; - - setImmediate(() => { - Promise.resolve(getBodySize(opts)) - .then(size => { - uploadBodySize = size; - get(opts); - }) - .catch(err => { - ee.emit('error', err); - }); - }); - - return ee; -} - -function getResponse(res, opts, ee, redirects) { - const downloadBodySize = Number(res.headers['content-length']) || null; - let downloaded = 0; - - const progressStream = new Transform({ - transform(chunk, encoding, callback) { - downloaded += chunk.length; - - const percent = downloadBodySize ? downloaded / downloadBodySize : 0; - - // Let flush() be responsible for emitting the last event - if (percent < 1) { - ee.emit('downloadProgress', { - percent, - transferred: downloaded, - total: downloadBodySize - }); - } - - callback(null, chunk); - }, - - flush(callback) { - ee.emit('downloadProgress', { - percent: 1, - transferred: downloaded, - total: downloadBodySize - }); - - callback(); - } - }); - - mimicResponse(res, progressStream); - progressStream.redirectUrls = redirects; - - const response = opts.decompress === true && - is.function(decompressResponse) && - opts.method !== 'HEAD' ? decompressResponse(progressStream) : progressStream; - - if (!opts.decompress && ['gzip', 'deflate'].indexOf(res.headers['content-encoding']) !== -1) { - opts.encoding = null; - } - - ee.emit('response', response); - - ee.emit('downloadProgress', { - percent: 0, - transferred: 0, - total: downloadBodySize - }); - - res.pipe(progressStream); -} - -function asPromise(opts) { - const timeoutFn = requestPromise => opts.gotTimeout && opts.gotTimeout.request ? - pTimeout(requestPromise, opts.gotTimeout.request, new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts)) : - requestPromise; - - const proxy = new EventEmitter(); - - const cancelable = new PCancelable((resolve, reject, onCancel) => { - const ee = requestAsEventEmitter(opts); - let cancelOnRequest = false; - - onCancel(() => { - cancelOnRequest = true; - }); - - ee.on('request', req => { - if (cancelOnRequest) { - req.abort(); - } - - onCancel(() => { - req.abort(); - }); - - if (is.nodeStream(opts.body)) { - opts.body.pipe(req); - opts.body = undefined; - return; - } - - req.end(opts.body); - }); - - ee.on('response', res => { - const stream = is.null(opts.encoding) ? getStream.buffer(res) : getStream(res, opts); - - stream - .catch(err => reject(new got.ReadError(err, opts))) - .then(data => { - const statusCode = res.statusCode; - const limitStatusCode = opts.followRedirect ? 299 : 399; - - res.body = data; - - if (opts.json && res.body) { - try { - res.body = JSON.parse(res.body); - } catch (err) { - if (statusCode >= 200 && statusCode < 300) { - throw new got.ParseError(err, statusCode, opts, data); - } - } - } - - if (opts.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > limitStatusCode)) { - throw new got.HTTPError(statusCode, res.statusMessage, res.headers, opts); - } - - resolve(res); - }) - .catch(err => { - Object.defineProperty(err, 'response', {value: res}); - reject(err); - }); - }); - - ee.once('error', reject); - ee.on('redirect', proxy.emit.bind(proxy, 'redirect')); - ee.on('uploadProgress', proxy.emit.bind(proxy, 'uploadProgress')); - ee.on('downloadProgress', proxy.emit.bind(proxy, 'downloadProgress')); - }); - - // Preserve backwards-compatibility - // TODO: Remove this in the next major version - Object.defineProperty(cancelable, 'canceled', { - get() { - return cancelable.isCanceled; - } - }); - - const promise = timeoutFn(cancelable); - - promise.cancel = cancelable.cancel.bind(cancelable); - - promise.on = (name, fn) => { - proxy.on(name, fn); - return promise; - }; - - return promise; -} - -function asStream(opts) { - opts.stream = true; - - const input = new PassThrough(); - const output = new PassThrough(); - const proxy = duplexer3(input, output); - let timeout; - - if (opts.gotTimeout && opts.gotTimeout.request) { - timeout = setTimeout(() => { - proxy.emit('error', new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts)); - }, opts.gotTimeout.request); - } - - if (opts.json) { - throw new Error('Got can not be used as a stream when the `json` option is used'); - } - - if (opts.body) { - proxy.write = () => { - throw new Error('Got\'s stream is not writable when the `body` option is used'); - }; - } - - const ee = requestAsEventEmitter(opts); - - ee.on('request', req => { - proxy.emit('request', req); - - if (is.nodeStream(opts.body)) { - opts.body.pipe(req); - return; - } - - if (opts.body) { - req.end(opts.body); - return; - } - - if (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') { - input.pipe(req); - return; - } - - req.end(); - }); - - ee.on('response', res => { - clearTimeout(timeout); - - const statusCode = res.statusCode; - - res.on('error', err => { - proxy.emit('error', new got.ReadError(err, opts)); - }); - - res.pipe(output); - - if (opts.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > 299)) { - proxy.emit('error', new got.HTTPError(statusCode, res.statusMessage, res.headers, opts), null, res); - return; - } - - proxy.emit('response', res); - }); - - ee.on('error', proxy.emit.bind(proxy, 'error')); - ee.on('redirect', proxy.emit.bind(proxy, 'redirect')); - ee.on('uploadProgress', proxy.emit.bind(proxy, 'uploadProgress')); - ee.on('downloadProgress', proxy.emit.bind(proxy, 'downloadProgress')); - - return proxy; -} - -function normalizeArguments(url, opts) { - if (!is.string(url) && !is.object(url)) { - throw new TypeError(`Parameter \`url\` must be a string or object, not ${is(url)}`); - } else if (is.string(url)) { - url = url.replace(/^unix:/, 'http://$&'); - - try { - decodeURI(url); - } catch (err) { - throw new Error('Parameter `url` must contain valid UTF-8 character sequences'); - } - - url = urlParseLax(url); - if (url.auth) { - throw new Error('Basic authentication must be done with the `auth` option'); - } - } else if (isURL.lenient(url)) { - url = urlToOptions(url); - } - - opts = Object.assign( - { - path: '', - retries: 2, - cache: false, - decompress: true, - useElectronNet: false, - throwHttpErrors: true - }, - url, - { - protocol: url.protocol || 'http:' // Override both null/undefined with default protocol - }, - opts - ); - - const headers = lowercaseKeys(opts.headers); - for (const key of Object.keys(headers)) { - if (is.nullOrUndefined(headers[key])) { - delete headers[key]; - } - } - - opts.headers = Object.assign({ - 'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)` - }, headers); - - if (opts.decompress) { - opts.headers['accept-encoding'] = 'gzip,deflate'; - } - - const query = opts.query; - - if (query) { - if (!is.string(query)) { - opts.query = querystring.stringify(query); - } - - opts.path = `${opts.path.split('?')[0]}?${opts.query}`; - delete opts.query; - } - - if (opts.json && is.undefined(opts.headers.accept)) { - opts.headers.accept = 'application/json'; - } - - const body = opts.body; - if (is.nullOrUndefined(body)) { - opts.method = (opts.method || 'GET').toUpperCase(); - } else { - const headers = opts.headers; - if (!is.nodeStream(body) && !is.string(body) && !is.buffer(body) && !(opts.form || opts.json)) { - throw new TypeError('The `body` option must be a stream.Readable, string, Buffer or plain Object'); - } - - const canBodyBeStringified = is.plainObject(body) || is.array(body); - if ((opts.form || opts.json) && !canBodyBeStringified) { - throw new TypeError('The `body` option must be a plain Object or Array when the `form` or `json` option is used'); - } - - if (isFormData(body)) { - // Special case for https://github.com/form-data/form-data - headers['content-type'] = headers['content-type'] || `multipart/form-data; boundary=${body.getBoundary()}`; - } else if (opts.form && canBodyBeStringified) { - headers['content-type'] = headers['content-type'] || 'application/x-www-form-urlencoded'; - opts.body = querystring.stringify(body); - } else if (opts.json && canBodyBeStringified) { - headers['content-type'] = headers['content-type'] || 'application/json'; - opts.body = JSON.stringify(body); - } - - if (is.undefined(headers['content-length']) && is.undefined(headers['transfer-encoding']) && !is.nodeStream(body)) { - const length = is.string(opts.body) ? Buffer.byteLength(opts.body) : opts.body.length; - headers['content-length'] = length; - } - - // Convert buffer to stream to receive upload progress events - // see https://github.com/sindresorhus/got/pull/322 - if (is.buffer(body)) { - opts.body = intoStream(body); - opts.body._buffer = body; - } - - opts.method = (opts.method || 'POST').toUpperCase(); - } - - if (opts.hostname === 'unix') { - const matches = /(.+?):(.+)/.exec(opts.path); - - if (matches) { - opts.socketPath = matches[1]; - opts.path = matches[2]; - opts.host = null; - } - } - - if (!is.function(opts.retries)) { - const retries = opts.retries; - - opts.retries = (iter, err) => { - if (iter > retries || !isRetryAllowed(err)) { - return 0; - } - - const noise = Math.random() * 100; - - return ((1 << iter) * 1000) + noise; - }; - } - - if (is.undefined(opts.followRedirect)) { - opts.followRedirect = true; - } - - if (opts.timeout) { - if (is.number(opts.timeout)) { - opts.gotTimeout = {request: opts.timeout}; - } else { - opts.gotTimeout = opts.timeout; - } - delete opts.timeout; - } - - return opts; -} - -function got(url, opts) { - try { - const normalizedArgs = normalizeArguments(url, opts); - - if (normalizedArgs.stream) { - return asStream(normalizedArgs); - } - - return asPromise(normalizedArgs); - } catch (err) { - return Promise.reject(err); - } -} - -got.stream = (url, opts) => asStream(normalizeArguments(url, opts)); - -const methods = [ - 'get', - 'post', - 'put', - 'patch', - 'head', - 'delete' -]; - -for (const method of methods) { - got[method] = (url, opts) => got(url, Object.assign({}, opts, {method})); - got.stream[method] = (url, opts) => got.stream(url, Object.assign({}, opts, {method})); -} - -Object.assign(got, errors); - -module.exports = got; diff --git a/advancedcontentfilter/vendor/npm-asset/got/license b/advancedcontentfilter/vendor/npm-asset/got/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/got/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/got/package.json b/advancedcontentfilter/vendor/npm-asset/got/package.json deleted file mode 100644 index 3ed248b08..000000000 --- a/advancedcontentfilter/vendor/npm-asset/got/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "got", - "version": "8.3.0", - "description": "Simplified HTTP requests", - "license": "MIT", - "repository": "sindresorhus/got", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - { - "name": "Alexander Tesfamichael", - "email": "alex.tesfamichael@gmail.com", - "url": "alextes.me" - } - ], - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && nyc ava", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "index.js", - "errors.js" - ], - "keywords": [ - "http", - "https", - "get", - "got", - "url", - "uri", - "request", - "util", - "utility", - "simple", - "curl", - "wget", - "fetch", - "net", - "network", - "electron" - ], - "dependencies": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" - }, - "devDependencies": { - "ava": "^0.25.0", - "coveralls": "^3.0.0", - "form-data": "^2.1.1", - "get-port": "^3.0.0", - "nyc": "^11.0.2", - "p-event": "^1.3.0", - "pem": "^1.4.4", - "proxyquire": "^1.8.0", - "sinon": "^4.0.0", - "slow-stream": "0.0.4", - "tempfile": "^2.0.0", - "tempy": "^0.2.1", - "universal-url": "1.0.0-alpha", - "xo": "^0.20.0" - }, - "ava": { - "concurrency": 4 - }, - "browser": { - "decompress-response": false, - "electron": false - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/got/readme.md b/advancedcontentfilter/vendor/npm-asset/got/readme.md deleted file mode 100644 index 1691276f8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/got/readme.md +++ /dev/null @@ -1,650 +0,0 @@ -
-
-
- got -
-
-
-

Huge thanks to for sponsoring me! -

-
-
-
- -> Simplified HTTP requests - -[![Build Status](https://travis-ci.org/sindresorhus/got.svg?branch=master)](https://travis-ci.org/sindresorhus/got) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/got/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/got?branch=master) [![Downloads](https://img.shields.io/npm/dm/got.svg)](https://npmjs.com/got) - -A nicer interface to the built-in [`http`](http://nodejs.org/api/http.html) module. - -Created because [`request`](https://github.com/request/request) is bloated *(several megabytes!)*. - - -## Highlights - -- [Promise & stream API](#api) -- [Request cancelation](#aborting-the-request) -- [RFC compliant caching](#cache-adapters) -- [Follows redirects](#followredirect) -- [Retries on network failure](#retries) -- [Progress events](#onuploadprogress-progress) -- [Handles gzip/deflate](#decompress) -- [Timeout handling](#timeout) -- [Errors with metadata](#errors) -- [JSON mode](#json) -- [WHATWG URL support](#url) -- [Electron support](#useelectronnet) - - -## Install - -``` -$ npm install got -``` - - - - - - -## Usage - -```js -const got = require('got'); - -(async () => { - try { - const response = await got('sindresorhus.com'); - console.log(response.body); - //=> ' ...' - } catch (error) { - console.log(error.response.body); - //=> 'Internal server error ...' - } -})(); -``` - -###### Streams - -```js -const fs = require('fs'); -const got = require('got'); - -got.stream('sindresorhus.com').pipe(fs.createWriteStream('index.html')); - -// For POST, PUT, and PATCH methods `got.stream` returns a `stream.Writable` -fs.createReadStream('index.html').pipe(got.stream.post('sindresorhus.com')); -``` - - -### API - -It's a `GET` request by default, but can be changed by using different methods or in the `options`. - -#### got(url, [options]) - -Returns a Promise for a `response` object with a `body` property, a `url` property with the request URL or the final URL after redirects, and a `requestUrl` property with the original request URL. - -The response object will normally be a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage), however if returned from the cache it will be a [responselike object](https://github.com/lukechilds/responselike) which behaves in the same way. - -The response will also have a `fromCache` property set with a boolean value. - -##### url - -Type: `string` `Object` - -The URL to request as simple string, a [`http.request` options](https://nodejs.org/api/http.html#http_http_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url). - -Properties from `options` will override properties in the parsed `url`. - -If no protocol is specified, it will default to `https`. - -##### options - -Type: `Object` - -Any of the [`http.request`](http://nodejs.org/api/http.html#http_http_request_options_callback) options. - -###### stream - -Type: `boolean`
-Default: `false` - -Returns a `Stream` instead of a `Promise`. This is equivalent to calling `got.stream(url, [options])`. - -###### body - -Type: `string` `Buffer` `stream.Readable` - -*This is mutually exclusive with stream mode.* - -Body that will be sent with a `POST` request. - -If present in `options` and `options.method` is not set, `options.method` will be set to `POST`. - -If `content-length` or `transfer-encoding` is not set in `options.headers` and `body` is a string or buffer, `content-length` will be set to the body length. - -###### encoding - -Type: `string` `null`
-Default: `'utf8'` - -[Encoding](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) to be used on `setEncoding` of the response data. If `null`, the body is returned as a [`Buffer`](https://nodejs.org/api/buffer.html) (binary data). - -###### form - -Type: `boolean`
-Default: `false` - -*This is mutually exclusive with stream mode.* - -If set to `true` and `Content-Type` header is not set, it will be set to `application/x-www-form-urlencoded`. - -`body` must be a plain object or array and will be stringified. - -###### json - -Type: `boolean`
-Default: `false` - -*This is mutually exclusive with stream mode.* - -If set to `true` and `Content-Type` header is not set, it will be set to `application/json`. - -Parse response body with `JSON.parse` and set `accept` header to `application/json`. If used in conjunction with the `form` option, the `body` will the stringified as querystring and the response parsed as JSON. - -`body` must be a plain object or array and will be stringified. - -###### query - -Type: `string` `Object`
- -Query string object that will be added to the request URL. This will override the query string in `url`. - -###### timeout - -Type: `number` `Object` - -Milliseconds to wait for the server to end the response before aborting request with `ETIMEDOUT` error. - -This also accepts an object with separate `connect`, `socket`, and `request` fields for connection, socket, and entire request timeouts. - -###### retries - -Type: `number` `Function`
-Default: `2` - -Number of request retries when network errors happens. Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 0). - -Option accepts `function` with `retry` and `error` arguments. Function must return delay in milliseconds (`0` return value cancels retry). - -**Note:** if `retries` is `number`, `ENOTFOUND` and `ENETUNREACH` error will not be retried (see full list in [`is-retry-allowed`](https://github.com/floatdrop/is-retry-allowed/blob/master/index.js#L12) module). - -###### followRedirect - -Type: `boolean`
-Default: `true` - -Defines if redirect responses should be followed automatically. - -Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), got will automatically -request the resource pointed to in the location header via `GET`. This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4). - -###### decompress - -Type: `boolean`
-Default: `true` - -Decompress the response automatically. - -If this is disabled, a compressed response is returned as a `Buffer`. This may be useful if you want to handle decompression yourself or stream the raw compressed data. - -###### cache - -Type: `Object`
-Default: `false` - -[Cache adapter instance](#cache-adapters) for storing cached data. - -###### useElectronNet - -Type: `boolean`
-Default: `false` - -When used in Electron, Got will use [`electron.net`](https://electronjs.org/docs/api/net/) instead of the Node.js `http` module. According to the Electron docs, it should be fully compatible, but it's not entirely. See [#315](https://github.com/sindresorhus/got/issues/315). - -###### throwHttpErrors - -Type: `boolean`
-Default: `true` - -Determines if a `got.HTTPError` is thrown for error responses (non-2xx status codes). - -If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing. This may be useful if you are checking for resource availability and are expecting error responses. - -#### Streams - -#### got.stream(url, [options]) - -`stream` method will return Duplex stream with additional events: - -##### .on('request', request) - -`request` event to get the request object of the request. - -**Tip**: You can use `request` event to abort request: - -```js -got.stream('github.com') - .on('request', req => setTimeout(() => req.abort(), 50)); -``` - -##### .on('response', response) - -`response` event to get the response object of the final request. - -##### .on('redirect', response, nextOptions) - -`redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location. - -##### .on('uploadProgress', progress) -##### .on('downloadProgress', progress) - -Progress events for uploading (sending request) and downloading (receiving response). The `progress` argument is an object like: - -```js -{ - percent: 0.1, - transferred: 1024, - total: 10240 -} -``` - -If it's not possible to retrieve the body size (can happen when streaming), `total` will be `null`. - -**Note**: Progress events can also be used with promises. - -```js -(async () => { - const response = await got('sindresorhus.com') - .on('downloadProgress', progress => { - // Report download progress - }) - .on('uploadProgress', progress => { - // Report upload progress - }); - - console.log(response); -})(); -``` - -##### .on('error', error, body, response) - -`error` event emitted in case of protocol error (like `ENOTFOUND` etc.) or status error (4xx or 5xx). The second argument is the body of the server response in case of status error. The third argument is response object. - -#### got.get(url, [options]) -#### got.post(url, [options]) -#### got.put(url, [options]) -#### got.patch(url, [options]) -#### got.head(url, [options]) -#### got.delete(url, [options]) - -Sets `options.method` to the method name and makes a request. - - -## Errors - -Each error contains (if available) `statusCode`, `statusMessage`, `host`, `hostname`, `method`, `path`, `protocol` and `url` properties to make debugging easier. - -In Promise mode, the `response` is attached to the error. - -#### got.CacheError - -When a cache method fails, for example if the database goes down, or there's a filesystem error. - -#### got.RequestError - -When a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`. - -#### got.ReadError - -When reading from response stream fails. - -#### got.ParseError - -When `json` option is enabled, server response code is 2xx, and `JSON.parse` fails. - -#### got.HTTPError - -When server response code is not 2xx. Includes `statusCode`, `statusMessage`, and `redirectUrls` properties. - -#### got.MaxRedirectsError - -When server redirects you more than 10 times. Includes a `redirectUrls` property, which is an array of the URLs Got was redirected to before giving up. - -#### got.UnsupportedProtocolError - -When given an unsupported protocol. - -#### got.CancelError - -When the request is aborted with `.cancel()`. - - -## Aborting the request - -The promise returned by Got has a [`.cancel()`](https://github.com/sindresorhus/p-cancelable) method which, when called, aborts the request. - -```js -(async () => { - const request = got(url, options); - - … - - // In another part of the code - if (something) { - request.cancel(); - } - - … - - try { - await request; - } catch (error) { - if (request.isCanceled) { // Or `error instanceof got.CancelError` - // Handle cancelation - } - - // Handle other errors - } -})(); -``` - - -## Cache - -Got implements [RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching which works out of the box in memory or is easily pluggable with a wide range of storage adapters. Fresh cache entries are served directly from cache and stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers. You can read more about the underlying cache behaviour in the `cacheable-request` [documentation](https://github.com/lukechilds/cacheable-request). - -You can use the JavaScript `Map` type as an in memory cache: - -```js -const got = require('got'); -const map = new Map(); - -(async () => { - let response = await got('sindresorhus.com', {cache: map}); - console.log(response.fromCache); - //=> false - - response = await got('sindresorhus.com', {cache: map}); - console.log(response.fromCache); - //=> true -})(); -``` - -Got uses [Keyv](https://github.com/lukechilds/keyv) internally to support a wide range of storage adapters. For something more scalable you could use an [official Keyv storage adapter](https://github.com/lukechilds/keyv#official-storage-adapters): - -``` -$ npm install @keyv/redis -``` - -```js -const got = require('got'); -const KeyvRedis = require('@keyv/redis'); - -const redis = new KeyvRedis('redis://user:pass@localhost:6379'); - -got('sindresorhus.com', {cache: redis}); -``` - -Got supports anything that follows the Map API, so it's easy to write your own storage adapter or use a third-party solution. - -For example, the following are all valid storage adapters: - -```js -const storageAdapter = new Map(); -// or -const storageAdapter = require('./my-storage-adapter'); -// or -const QuickLRU = require('quick-lru'); -const storageAdapter = new QuickLRU({maxSize: 1000}); - -got('sindresorhus.com', {cache: storageAdapter}); -``` - -View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters. - - -## Proxies - -You can use the [`tunnel`](https://github.com/koichik/node-tunnel) module with the `agent` option to work with proxies: - -```js -const got = require('got'); -const tunnel = require('tunnel'); - -got('sindresorhus.com', { - agent: tunnel.httpOverHttp({ - proxy: { - host: 'localhost' - } - }) -}); -``` - -If you require different agents for different protocols, you can pass a map of agents to the `agent` option. This is necessary because a request to one protocol might redirect to another. In such a scenario, `got` will switch over to the right protocol agent for you. - -```js -const got = require('got'); -const HttpAgent = require('agentkeepalive'); -const HttpsAgent = HttpAgent.HttpsAgent; - -got('sindresorhus.com', { - agent: { - http: new HttpAgent(), - https: new HttpsAgent() - } -}); -``` - - -## Cookies - -You can use the [`cookie`](https://github.com/jshttp/cookie) module to include cookies in a request: - -```js -const got = require('got'); -const cookie = require('cookie'); - -got('google.com', { - headers: { - cookie: cookie.serialize('foo', 'bar') - } -}); -``` - - -## Form data - -You can use the [`form-data`](https://github.com/form-data/form-data) module to create POST request with form data: - -```js -const fs = require('fs'); -const got = require('got'); -const FormData = require('form-data'); -const form = new FormData(); - -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); - -got.post('google.com', { - body: form -}); -``` - - -## OAuth - -You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create a signed OAuth request: - -```js -const got = require('got'); -const crypto = require('crypto'); -const OAuth = require('oauth-1.0a'); - -const oauth = OAuth({ - consumer: { - key: process.env.CONSUMER_KEY, - secret: process.env.CONSUMER_SECRET - }, - signature_method: 'HMAC-SHA1', - hash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64') -}); - -const token = { - key: process.env.ACCESS_TOKEN, - secret: process.env.ACCESS_TOKEN_SECRET -}; - -const url = 'https://api.twitter.com/1.1/statuses/home_timeline.json'; - -got(url, { - headers: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)), - json: true -}); -``` - - -## Unix Domain Sockets - -Requests can also be sent via [unix domain sockets](http://serverfault.com/questions/124517/whats-the-difference-between-unix-socket-and-tcp-ip-socket). Use the following URL scheme: `PROTOCOL://unix:SOCKET:PATH`. - -- `PROTOCOL` - `http` or `https` *(optional)* -- `SOCKET` - absolute path to a unix domain socket, e.g. `/var/run/docker.sock` -- `PATH` - request path, e.g. `/v2/keys` - -```js -got('http://unix:/var/run/docker.sock:/containers/json'); - -// or without protocol (http by default) -got('unix:/var/run/docker.sock:/containers/json'); -``` - -## AWS - -Requests to AWS services need to have their headers signed. This can be accomplished by using the [`aws4`](https://www.npmjs.com/package/aws4) package. This is an example for querying an ["Elasticsearch Service"](https://aws.amazon.com/elasticsearch-service/) host with a signed request. - -```js -const url = require('url'); -const AWS = require('aws-sdk'); -const aws4 = require('aws4'); -const got = require('got'); -const config = require('./config'); - -// Reads keys from the environment or `~/.aws/credentials`. Could be a plain object. -const awsConfig = new AWS.Config({ region: config.region }); - -function request(uri, options) { - const awsOpts = { - region: awsConfig.region, - headers: { - accept: 'application/json', - 'content-type': 'application/json' - }, - method: 'GET', - json: true - }; - - // We need to parse the URL before passing it to `got` so `aws4` can sign the request - const opts = Object.assign(url.parse(uri), awsOpts, options); - aws4.sign(opts, awsConfig.credentials); - - return got(opts); -} - -request(`https://${config.host}/production/users/1`); - -request(`https://${config.host}/production/`, { - // All usual `got` options -}); -``` - - -## Testing - -You can test your requests by using the [`nock`](https://github.com/node-nock/nock) module to mock an endpoint: - -```js -const got = require('got'); -const nock = require('nock'); - -nock('https://sindresorhus.com') - .get('/') - .reply(200, 'Hello world!'); - -(async () => { - const response = await got('sindresorhus.com'); - console.log(response.body); - //=> 'Hello world!' -})(); -``` - -If you need real integration tests you can use [`create-test-server`](https://github.com/lukechilds/create-test-server): - -```js -const got = require('got'); -const createTestServer = require('create-test-server'); - -(async () => { - const server = await createTestServer(); - server.get('/', 'Hello world!'); - - const response = await got(server.url); - console.log(response.body); - //=> 'Hello world!' - - await server.close(); -})(); -``` - - -## Tips - -### User Agent - -It's a good idea to set the `'user-agent'` header so the provider can more easily see how their resource is used. By default, it's the URL to this repo. - -```js -const got = require('got'); -const pkg = require('./package.json'); - -got('sindresorhus.com', { - headers: { - 'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)` - } -}); -``` - -### 304 Responses - -Bear in mind, if you send an `if-modified-since` header and receive a `304 Not Modified` response, the body will be empty. It's your responsibility to cache and retrieve the body contents. - - -## Related - -- [gh-got](https://github.com/sindresorhus/gh-got) - Got convenience wrapper to interact with the GitHub API -- [gl-got](https://github.com/singapore/gl-got) - Got convenience wrapper to interact with the GitLab API -- [travis-got](https://github.com/samverschueren/travis-got) - Got convenience wrapper to interact with the Travis API -- [graphql-got](https://github.com/kevva/graphql-got) - Got convenience wrapper to interact with GraphQL -- [GotQL](https://github.com/khaosdoctor/gotql) - Got convenience wrapper to interact with GraphQL using JSON-parsed queries instead of strings - - -## Created by - -[![Sindre Sorhus](https://github.com/sindresorhus.png?size=100)](https://sindresorhus.com) | [![Vsevolod Strukchinsky](https://github.com/floatdrop.png?size=100)](https://github.com/floatdrop) | [![Alexander Tesfamichael](https://github.com/AlexTes.png?size=100)](https://github.com/AlexTes) | [![Luke Childs](https://github.com/lukechilds.png?size=100)](https://github.com/lukechilds) ----|---|---|--- -[Sindre Sorhus](https://sindresorhus.com) | [Vsevolod Strukchinsky](https://github.com/floatdrop) | [Alexander Tesfamichael](https://alextes.me) | [Luke Childs](https://github.com/lukechilds) - - -## License - -MIT diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.editorconfig b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.editorconfig deleted file mode 100644 index ec24598cf..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.editorconfig +++ /dev/null @@ -1,26 +0,0 @@ -# This file is for unifying the coding style for different editors and IDEs -# editorconfig.org - -# top-most EditorConfig file -root = true - -# every file -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -# 4 space indentation -[*.py] -indent_style = space -indent_size = 4 - -# Tab indentation (no size specified) -[Makefile] -indent_style = tab - -[*.md] -trim_trailing_whitespace = false diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintignore b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintignore deleted file mode 100644 index cdecab19d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -lib/* diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintrc.json b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintrc.json deleted file mode 100644 index 7d4d3ddf2..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "root": true, - "extends": [ - "@xotic750/eslint-config-standard-x" - ] -} diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.nvmrc b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.nvmrc deleted file mode 100644 index b009dfb9d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -lts/* diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.travis.yml b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.travis.yml deleted file mode 100644 index a45e260b6..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.travis.yml +++ /dev/null @@ -1,111 +0,0 @@ -sudo: false -language: node_js -branches: - only: - - master - - /^greenkeeper/.*$/ -notifications: - email: false -node_js: - - "9.6" - - "9.5" - - "9.4" - - "9.3" - - "9.2" - - "9.1" - - "9.0" - - "8.9" - - "8.8" - - "8.7" - - "8.6" - - "8.5" - - "8.4" - - "8.3" - - "8.2" - - "8.1" - - "8.0" - - "7.10" - - "7.9" - - "7.8" - - "7.7" - - "7.6" - - "7.5" - - "7.4" - - "7.3" - - "7.2" - - "7.1" - - "7.0" - - "6.11" - - "6.10" - - "6.9" - - "6.8" - - "6.7" - - "6.6" - - "6.5" - - "6.4" - - "6.3" - - "6.2" - - "6.1" - - "6.0" - - "5.12" - - "5.11" - - "5.10" - - "5.9" - - "5.8" - - "5.7" - - "5.6" - - "5.5" - - "5.4" - - "5.3" - - "5.2" - - "5.1" - - "5.0" - - "4.8" - - "4.7" - - "4.6" - - "4.5" - - "4.4" - - "4.3" - - "4.2" - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -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; elif [[ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" =~ ^[4-5]+$ ]]; then npm install -g npm@5.3; 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 --delete-prefix "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'npm test' -matrix: - fast_finish: true - allow_failures: - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.6" - - node_js: "0.4" diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.uglifyjsrc.json b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.uglifyjsrc.json deleted file mode 100644 index 2d2627751..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/.uglifyjsrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "warnings": false, - "parse": {}, - "compress": { - "keep_fnames": true - }, - "mangle": false, - "output": { - "ascii_only": true, - "beautify": false, - "comments": "some" - }, - "sourceMap": {}, - "nameCache": null, - "toplevel": false, - "ie8": true -} diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/LICENSE b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/LICENSE deleted file mode 100644 index 0d2b266cc..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -https://opensource.org/licenses/MIT - -Copyright (c) 2015-present Graham Fairweather. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/README.md b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/README.md deleted file mode 100644 index f9503aebb..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/README.md +++ /dev/null @@ -1,36 +0,0 @@ - -Travis status - - -Dependency status - - -devDependency status - - -npm version - - - -## has-symbol-support-x -Tests if ES6 Symbol is supported. - -**Version**: 1.4.2 -**Author**: Xotic750 -**License**: [MIT](<https://opensource.org/licenses/MIT>) -**Copyright**: Xotic750 - - -### `module.exports` : boolean ⏏ -Indicates if `Symbol`exists and creates the correct type. -`true`, if it exists and creates the correct type, otherwise `false`. - -**Kind**: Exported member diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/badges.html b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/badges.html deleted file mode 100644 index a3b8352fd..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/badges.html +++ /dev/null @@ -1,20 +0,0 @@ - -Travis status - - -Dependency status - - -devDependency status - - -npm version - diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/index.js b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/index.js deleted file mode 100644 index 20a9581ea..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @file Tests if ES6 Symbol is supported. - * @version 1.4.2 - * @author Xotic750 - * @copyright Xotic750 - * @license {@link MIT} - * @module has-symbol-support-x - */ - -'use strict'; - -/** - * Indicates if `Symbol`exists and creates the correct type. - * `true`, if it exists and creates the correct type, otherwise `false`. - * - * @type boolean - */ -module.exports = typeof Symbol === 'function' && typeof Symbol('') === 'symbol'; diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.js b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.js deleted file mode 100644 index 62a6b14ed..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.js +++ /dev/null @@ -1,22 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - * @copyright Xotic750 - * @license {@link MIT} - * @module has-symbol-support-x - */ - -'use strict'; - -/** - * Indicates if `Symbol`exists and creates the correct type. - * `true`, if it exists and creates the correct type, otherwise `false`. - * - * @type boolean - */ -module.exports = typeof Symbol === 'function' && typeof Symbol('') === 'symbol'; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js deleted file mode 100644 index 035d36f6d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js +++ /dev/null @@ -1,10 +0,0 @@ -!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o - * @copyright Xotic750 - * @license {@link MIT} - * @module has-symbol-support-x - */ -"use strict";module.exports="function"==typeof Symbol&&"symbol"==typeof Symbol("")},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js.map b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js.map deleted file mode 100644 index b70075547..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/lib/has-symbol-support-x.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/has-symbol-support-x.js"],"names":["f","exports","module","define","amd","window","global","self","this","returnExports","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","_dereq_","Symbol"],"mappings":"CAAA,SAAUA,GAAG,GAAoB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,SAAS,GAAmB,mBAATG,QAAqBA,OAAOC,IAAKD,UAAUH,OAAO,EAA0B,oBAATK,OAAwBA,OAA+B,oBAATC,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYC,MAAOC,cAAgBT,KAAlU,CAAyU,WAAqC,OAAmB,SAASU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATC,SAAqBA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGI,EAAE,OAAOA,EAAEJ,GAAE,GAAI,IAAIf,EAAE,IAAIoB,MAAM,uBAAuBL,EAAE,KAAK,MAAMf,EAAEqB,KAAK,mBAAmBrB,EAAE,IAAIsB,EAAEV,EAAEG,IAAId,YAAYU,EAAEI,GAAG,GAAGQ,KAAKD,EAAErB,QAAQ,SAASS,GAAG,IAAIE,EAAED,EAAEI,GAAG,GAAGL,GAAG,OAAOI,EAAEF,GAAIF,IAAIY,EAAEA,EAAErB,QAAQS,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGd,QAAkD,IAA1C,IAAIkB,EAAkB,mBAATD,SAAqBA,QAAgBH,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAAlc,EAAkdW,GAAG,SAASC,QAAQxB,OAAOD;;;;;;;;;AAUl2B,aAQAC,OAAOD,QAA4B,mBAAX0B,QAA+C,iBAAfA,OAAO,cAEpD,GApB0W,CAoBtW"} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/package.json b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/package.json deleted file mode 100644 index 5e251dfd8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "has-symbol-support-x", - "version": "1.4.2", - "description": "Tests if ES6 Symbol is supported.", - "homepage": "https://github.com/Xotic750/has-symbol-support-x", - "author": { - "name": "Graham Fairweather", - "email": "xotic750@gmail.com" - }, - "copyright": "Copyright (c) 2015-present", - "keywords": [ - "ES6", - "hasSymbolSupport", - "module", - "javascript", - "nodejs", - "browser" - ], - "main": "index.js", - "engines": { - "node": "*" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/Xotic750/has-symbol-support-x.git" - }, - "bugs": { - "url": "https://github.com/Xotic750/has-symbol-support-x/issues" - }, - "dependencies": {}, - "devDependencies": { - "@xotic750/eslint-config-standard-x": "^3.1.1", - "ajv": "^6.1.1", - "browserify": "^16.1.0", - "browserify-derequire": "^0.9.4", - "cross-env": "^5.1.3", - "es5-shim": "^4.5.10", - "es6-shim": "^0.35.3", - "es7-shim": "^6.0.0", - "eslint": "^4.18.1", - "eslint-plugin-compat": "^2.2.0", - "eslint-plugin-css-modules": "^2.7.5", - "eslint-plugin-eslint-comments": "^2.0.2", - "eslint-plugin-jsdoc": "^3.5.0", - "eslint-plugin-json": "^1.2.0", - "eslint-plugin-no-use-extend-native": "^0.3.12", - "husky": "^0.13.4", - "jasmine-node": "^1.14.5", - "jsdoc-to-markdown": "^4.0.1", - "json3": "^3.3.2", - "make-jasmine-spec-runner-html": "^1.3.0", - "ncp": "^2.0.0", - "nodemon": "^1.15.1", - "nsp": "^3.2.1", - "parallelshell": "^3.0.2", - "replace-x": "^1.5.0", - "rimraf": "^2.6.2", - "serve": "^6.4.11", - "uglify-js": "^3.3.12" - }, - "scripts": { - "clean": "rimraf README.md lib/*", - "clean:jasmine": "rimraf tests/index.html tests/run.js", - "clean:all": "npm run clean:jasmine && npm run clean", - "build": "npm run clean && npm run lint && npm run browserify && npm run uglify && npm run docs && npm test && npm run security", - "build:jasmine": "npm run clean:jasmine && make-jasmine-spec-runner-html", - "build:setver": "replace-x \" @version .*\" \" @version $(node -p -e \"require('./package.json').version\")\" index.js", - "build:name": "replace-x \" @module .*\" \" @module $(node -p -e \"require('./package.json').name\")\" index.js", - "build:description": "replace-x \" @file .*\" \" @file $(node -p -e \"require('./package.json').description\")\" index.js", - "build:replace": "npm run build:setver && npm run build:name && npm run build:description", - "production": "npm run clean:all && npm run build:jasmine && npm run build:replace && npm run build", - "start": "parallelshell \"serve\" \"nodemon --watch index.js --exec 'npm run build'\"", - "docs:name": "replace-x \"@{PACKAGE-NAME}\" \"$(node -p -e \"require('./package.json').name\")\" README.md", - "docs:badges": "ncp badges.html README.md && npm run docs:name", - "docs": "npm run docs:badges && jsdoc2md --name-format --example-lang js index.js >> README.md", - "lint": "eslint *.js tests/spec/*.js", - "lint-fix": "npm run lint -- --fix", - "security": "nsp check", - "test": "jasmine-node --matchall tests/spec/", - "browserify": "browserify -p browserify-derequire -e index.js -o lib/has-symbol-support-x.js -u 'crypto' -s returnExports", - "uglify": "uglifyjs lib/has-symbol-support-x.js -o lib/has-symbol-support-x.min.js --config-file .uglifyjsrc.json", - "precommit": "npm run production", - "prepush": "npm run production" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/index.html b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/index.html deleted file mode 100644 index 9c027d416..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Jasmine Spec Runner: has-symbol-support-x - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/run.js b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/run.js deleted file mode 100644 index 76efd6995..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/run.js +++ /dev/null @@ -1,25 +0,0 @@ -/* global window, jasmine */ -/* eslint strict: 0 */ -(function () { - var jasmineEnv = jasmine.getEnv(); - jasmineEnv.updateInterval = 1000; - - var trivialReporter = new jasmine.TrivialReporter(); - - jasmineEnv.addReporter(trivialReporter); - - jasmineEnv.specFilter = function (spec) { - return trivialReporter.specFilter(spec); - }; - - var currentWindowOnload = window.onload; - var execJasmine = function () { - jasmineEnv.execute(); - }; - window.onload = function () { - if (currentWindowOnload) { - currentWindowOnload(); - } - execJasmine(); - }; -}()); diff --git a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/spec/test.js b/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/spec/test.js deleted file mode 100644 index 08689734a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-symbol-support-x/tests/spec/test.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var hasSymbolSupport; -if (typeof module === 'object' && module.exports) { - require('es5-shim'); - require('es5-shim/es5-sham'); - if (typeof JSON === 'undefined') { - JSON = {}; - } - require('json3').runInContext(null, JSON); - require('es6-shim'); - var es7 = require('es7-shim'); - Object.keys(es7).forEach(function (key) { - var obj = es7[key]; - if (typeof obj.shim === 'function') { - obj.shim(); - } - }); - hasSymbolSupport = require('../../index.js'); -} else { - hasSymbolSupport = returnExports; -} - -describe('Basic tests', function () { - it('results should match', function () { - var expected = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; - expect(hasSymbolSupport).toBe(expected); - }); -}); diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.editorconfig b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.editorconfig deleted file mode 100644 index ec24598cf..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.editorconfig +++ /dev/null @@ -1,26 +0,0 @@ -# This file is for unifying the coding style for different editors and IDEs -# editorconfig.org - -# top-most EditorConfig file -root = true - -# every file -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -# 4 space indentation -[*.py] -indent_style = space -indent_size = 4 - -# Tab indentation (no size specified) -[Makefile] -indent_style = tab - -[*.md] -trim_trailing_whitespace = false diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintignore b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintignore deleted file mode 100644 index cdecab19d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -lib/* diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintrc.json b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintrc.json deleted file mode 100644 index 7d4d3ddf2..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "root": true, - "extends": [ - "@xotic750/eslint-config-standard-x" - ] -} diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.nvmrc b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.nvmrc deleted file mode 100644 index b009dfb9d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -lts/* diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.travis.yml b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.travis.yml deleted file mode 100644 index 1304ed4c5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.travis.yml +++ /dev/null @@ -1,93 +0,0 @@ -sudo: false -language: node_js -branches: - only: - - master - - /^greenkeeper/.*$/ -notifications: - email: false -node_js: - - "8.4" - - "8.3" - - "8.2" - - "8.1" - - "8.0" - - "7.10" - - "7.9" - - "7.8" - - "7.7" - - "7.6" - - "7.5" - - "7.4" - - "7.3" - - "7.2" - - "7.1" - - "7.0" - - "6.9" - - "6.8" - - "6.7" - - "6.6" - - "6.5" - - "6.4" - - "6.3" - - "6.2" - - "6.1" - - "6.0" - - "5.12" - - "5.11" - - "5.10" - - "5.9" - - "5.8" - - "5.7" - - "5.6" - - "5.5" - - "5.4" - - "5.3" - - "5.2" - - "5.1" - - "5.0" - - "4.4" - - "4.3" - - "4.2" - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -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%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; 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 --delete-prefix "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'npm test' -matrix: - fast_finish: true - allow_failures: - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.6" - - node_js: "0.4" diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.uglifyjsrc.json b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.uglifyjsrc.json deleted file mode 100644 index 2d2627751..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/.uglifyjsrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "warnings": false, - "parse": {}, - "compress": { - "keep_fnames": true - }, - "mangle": false, - "output": { - "ascii_only": true, - "beautify": false, - "comments": "some" - }, - "sourceMap": {}, - "nameCache": null, - "toplevel": false, - "ie8": true -} diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/LICENSE b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/LICENSE deleted file mode 100644 index 73c46690a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -https://opensource.org/licenses/MIT - -Copyright (c) 2015-2017 Graham Fairweather. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/README.md b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/README.md deleted file mode 100644 index b545e807f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -Travis status - - -Dependency status - - -devDependency status - - -npm version - - - -## has-to-string-tag-x -Tests if ES6 @@toStringTag is supported. - -**See**: [26.3.1 @@toStringTag](http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag) -**Version**: 1.4.1 -**Author**: Xotic750 -**License**: [MIT](<https://opensource.org/licenses/MIT>) -**Copyright**: Xotic750 - - -### `module.exports` : boolean ⏏ -Indicates if `Symbol.toStringTag`exists and is the correct type. -`true`, if it exists and is the correct type, otherwise `false`. - -**Kind**: Exported member diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/badges.html b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/badges.html deleted file mode 100644 index a3b8352fd..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/badges.html +++ /dev/null @@ -1,20 +0,0 @@ - -Travis status - - -Dependency status - - -devDependency status - - -npm version - diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/index.js b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/index.js deleted file mode 100644 index abc608df2..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file Tests if ES6 @@toStringTag is supported. - * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag} - * @version 1.4.1 - * @author Xotic750 - * @copyright Xotic750 - * @license {@link MIT} - * @module has-to-string-tag-x - */ - -'use strict'; - -/** - * Indicates if `Symbol.toStringTag`exists and is the correct type. - * `true`, if it exists and is the correct type, otherwise `false`. - * - * @type boolean - */ -module.exports = require('has-symbol-support-x') && typeof Symbol.toStringTag === 'symbol'; diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.js b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.js deleted file mode 100644 index 52ef84960..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.js +++ /dev/null @@ -1,43 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - * @copyright Xotic750 - * @license {@link MIT} - * @module has-to-string-tag-x - */ - -'use strict'; - -/** - * Indicates if `Symbol.toStringTag`exists and is the correct type. - * `true`, if it exists and is the correct type, otherwise `false`. - * - * @type boolean - */ -module.exports = _dereq_('has-symbol-support-x') && typeof Symbol.toStringTag === 'symbol'; - -},{"has-symbol-support-x":2}],2:[function(_dereq_,module,exports){ -/** - * @file Tests if ES6 Symbol is supported. - * @version 1.4.1 - * @author Xotic750 - * @copyright Xotic750 - * @license {@link MIT} - * @module has-symbol-support-x - */ - -'use strict'; - -/** - * Indicates if `Symbol`exists and creates the correct type. - * `true`, if it exists and creates the correct type, otherwise `false`. - * - * @type boolean - */ -module.exports = typeof Symbol === 'function' && typeof Symbol('') === 'symbol'; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js deleted file mode 100644 index 307f21a66..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js +++ /dev/null @@ -1,18 +0,0 @@ -!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o - * @copyright Xotic750 - * @license {@link MIT} - * @module has-to-string-tag-x - */ -"use strict";module.exports=_dereq_("has-symbol-support-x")&&"symbol"==typeof Symbol.toStringTag},{"has-symbol-support-x":2}],2:[function(_dereq_,module,exports){/** - * @file Tests if ES6 Symbol is supported. - * @version 1.4.1 - * @author Xotic750 - * @copyright Xotic750 - * @license {@link MIT} - * @module has-symbol-support-x - */ -"use strict";module.exports="function"==typeof Symbol&&"symbol"==typeof Symbol("")},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js.map b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js.map deleted file mode 100644 index 772a237b7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/lib/has-to-string-tag-x.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/has-to-string-tag-x.js"],"names":["f","exports","module","define","amd","window","global","self","this","returnExports","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","_dereq_","Symbol","toStringTag","has-symbol-support-x","2"],"mappings":"CAAA,SAAUA,GAAG,GAAoB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,SAAS,GAAmB,mBAATG,QAAqBA,OAAOC,IAAKD,UAAUH,OAAO,EAA0B,oBAATK,OAAwBA,OAA+B,oBAATC,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYC,MAAOC,cAAgBT,KAAlU,CAAyU,WAAqC,OAAO,SAAUU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,mBAATC,SAAqBA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGI,EAAE,OAAOA,EAAEJ,GAAE,GAAI,IAAIf,EAAE,IAAIoB,MAAM,uBAAuBL,EAAE,KAAK,MAAMf,EAAEqB,KAAK,mBAAmBrB,EAAE,IAAIsB,EAAEV,EAAEG,IAAId,YAAYU,EAAEI,GAAG,GAAGQ,KAAKD,EAAErB,QAAQ,SAASS,GAAG,IAAIE,EAAED,EAAEI,GAAG,GAAGL,GAAG,OAAOI,EAAEF,GAAIF,IAAIY,EAAEA,EAAErB,QAAQS,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGd,QAAkD,IAAI,IAA1CkB,EAAkB,mBAATD,SAAqBA,QAAgBH,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAAvb,EAA4bW,GAAG,SAASC,QAAQxB,OAAOD;;;;;;;;;AAW50B,aAQAC,OAAOD,QAAUyB,QAAQ,yBAAyD,iBAAvBC,OAAOC,cAE/DC,uBAAuB,IAAIC,GAAG,SAASJ,QAAQxB,OAAOD;;;;;;;;AAUzD,aAQAC,OAAOD,QAA4B,mBAAX0B,QAA+C,iBAAfA,OAAO,cAEpD,IAAI"} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/package.json b/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/package.json deleted file mode 100644 index 0aaca5201..000000000 --- a/advancedcontentfilter/vendor/npm-asset/has-to-string-tag-x/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "has-to-string-tag-x", - "version": "1.4.1", - "description": "Tests if ES6 @@toStringTag is supported.", - "homepage": "https://github.com/Xotic750/has-to-string-tag-x", - "author": { - "name": "Graham Fairweather", - "email": "xotic750@gmail.com" - }, - "copyright": "Copyright (c) 2015-2017", - "keywords": [ - "ES6", - "hasToStringTag", - "module", - "javascript", - "nodejs", - "browser" - ], - "main": "index.js", - "engines": { - "node": "*" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/Xotic750/has-to-string-tag-x.git" - }, - "bugs": { - "url": "https://github.com/Xotic750/has-to-string-tag-x/issues" - }, - "dependencies": { - "has-symbol-support-x": "^1.4.1" - }, - "devDependencies": { - "@xotic750/eslint-config-standard-x": "^2.2.1", - "browserify": "^14.4.0", - "browserify-derequire": "^0.9.4", - "cross-env": "^5.0.1", - "es5-shim": "^4.5.9", - "es6-shim": "^0.35.3", - "es7-shim": "^6.0.0", - "eslint": "^4.2.0", - "eslint-plugin-compat": "^1.0.4", - "eslint-plugin-css-modules": "^2.7.2", - "eslint-plugin-eslint-comments": "^1.0.2", - "eslint-plugin-jsdoc": "^3.1.1", - "eslint-plugin-json": "^1.2.0", - "eslint-plugin-no-use-extend-native": "^0.3.12", - "husky": "^0.13.4", - "jasmine-node": "^1.14.5", - "jsdoc-to-markdown": "^3.0.0", - "json3": "^3.3.2", - "make-jasmine-spec-runner-html": "^1.3.0", - "ncp": "^2.0.0", - "nodemon": "^1.11.0", - "nsp": "^2.6.3", - "parallelshell": "^3.0.1", - "replace-x": "^1.5.0", - "rimraf": "^2.6.1", - "serve": "^6.0.2", - "uglify-js": "^3.0.24" - }, - "scripts": { - "clean": "rimraf README.md lib/*", - "clean:jasmine": "rimraf tests/index.html tests/run.js", - "clean:all": "npm run clean:jasmine && npm run clean", - "build": "npm run clean && npm run lint && npm run browserify && npm run uglify && npm run docs && npm test && npm run security", - "build:jasmine": "npm run clean:jasmine && make-jasmine-spec-runner-html", - "build:setver": "replace-x \" @version .*\" \" @version $(node -p -e \"require('./package.json').version\")\" index.js", - "build:name": "replace-x \" @module .*\" \" @module $(node -p -e \"require('./package.json').name\")\" index.js", - "build:description": "replace-x \" @file .*\" \" @file $(node -p -e \"require('./package.json').description\")\" index.js", - "build:replace": "npm run build:setver && npm run build:name && npm run build:description", - "production": "npm run clean:all && npm run build:jasmine && npm run build:replace && npm run build", - "start": "parallelshell \"serve\" \"nodemon --watch index.js --exec 'npm run build'\"", - "docs:name": "replace-x \"@{PACKAGE-NAME}\" \"$(node -p -e \"require('./package.json').name\")\" README.md", - "docs:badges": "ncp badges.html README.md && npm run docs:name", - "docs": "npm run docs:badges && jsdoc2md --name-format --example-lang js index.js >> README.md", - "lint": "eslint *.js tests/spec/*.js", - "lint-fix": "npm run lint -- --fix", - "security": "nsp check", - "test": "jasmine-node --matchall tests/spec/", - "browserify": "browserify -p browserify-derequire -e index.js -o lib/has-to-string-tag-x.js -u 'crypto' -s returnExports", - "uglify": "uglifyjs lib/has-to-string-tag-x.js -o lib/has-to-string-tag-x.min.js --config-file .uglifyjsrc.json", - "precommit": "npm run production", - "prepush": "npm run production" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/README.md b/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/README.md deleted file mode 100644 index 99069fc8d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# Can I cache this? [![Build Status](https://travis-ci.org/pornel/http-cache-semantics.svg?branch=master)](https://travis-ci.org/pornel/http-cache-semantics) - -`CachePolicy` tells when responses can be reused from a cache, taking into account [HTTP RFC 7234](http://httpwg.org/specs/rfc7234.html) rules for user agents and shared caches. It's aware of many tricky details such as the `Vary` header, proxy revalidation, and authenticated responses. - -## Usage - -Cacheability of an HTTP response depends on how it was requested, so both `request` and `response` are required to create the policy. - -```js -const policy = new CachePolicy(request, response, options); - -if (!policy.storable()) { - // throw the response away, it's not usable at all - return; -} - -// Cache the data AND the policy object in your cache -// (this is pseudocode, roll your own cache (lru-cache package works)) -letsPretendThisIsSomeCache.set(request.url, {policy, response}, policy.timeToLive()); -``` - -```js -// And later, when you receive a new request: -const {policy, response} = letsPretendThisIsSomeCache.get(newRequest.url); - -// It's not enough that it exists in the cache, it has to match the new request, too: -if (policy && policy.satisfiesWithoutRevalidation(newRequest)) { - // OK, the previous response can be used to respond to the `newRequest`. - // Response headers have to be updated, e.g. to add Age and remove uncacheable headers. - response.headers = policy.responseHeaders(); - return response; -} -``` - -It may be surprising, but it's not enough for an HTTP response to be [fresh](#yo-fresh) to satisfy a request. It may need to match request headers specified in `Vary`. Even a matching fresh response may still not be usable if the new request restricted cacheability, etc. - -The key method is `satisfiesWithoutRevalidation(newRequest)`, which checks whether the `newRequest` is compatible with the original request and whether all caching conditions are met. - -### Constructor options - -Request and response must have a `headers` property with all header names in lower case. `url`, `status` and `method` are optional (defaults are any URL, status `200`, and `GET` method). - -```js -const request = { - url: '/', - method: 'GET', - headers: { - accept: '*/*', - }, -}; - -const response = { - status: 200, - headers: { - 'cache-control': 'public, max-age=7234', - }, -}; - -const options = { - shared: true, - cacheHeuristic: 0.1, - immutableMinTimeToLive: 24*3600*1000, // 24h - ignoreCargoCult: false, -}; -``` - -If `options.shared` is `true` (default), then the response is evaluated from a perspective of a shared cache (i.e. `private` is not cacheable and `s-maxage` is respected). If `options.shared` is `false`, then the response is evaluated from a perspective of a single-user cache (i.e. `private` is cacheable and `s-maxage` is ignored). - -`options.cacheHeuristic` is a fraction of response's age that is used as a fallback cache duration. The default is 0.1 (10%), e.g. if a file hasn't been modified for 100 days, it'll be cached for 100*0.1 = 10 days. - -`options.immutableMinTimeToLive` is a number of milliseconds to assume as the default time to cache responses with `Cache-Control: immutable`. Note that [per RFC](http://httpwg.org/http-extensions/immutable.html) these can become stale, so `max-age` still overrides the default. - -If `options.ignoreCargoCult` is true, common anti-cache directives will be completely ignored if the non-standard `pre-check` and `post-check` directives are present. These two useless directives are most commonly found in bad StackOverflow answers and PHP's "session limiter" defaults. - -### `storable()` - -Returns `true` if the response can be stored in a cache. If it's `false` then you MUST NOT store either the request or the response. - -### `satisfiesWithoutRevalidation(newRequest)` - -This is the most important method. Use this method to check whether the cached response is still fresh in the context of the new request. - -If it returns `true`, then the given `request` matches the original response this cache policy has been created with, and the response can be reused without contacting the server. Note that the old response can't be returned without being updated, see `responseHeaders()`. - -If it returns `false`, then the response may not be matching at all (e.g. it's for a different URL or method), or may require to be refreshed first (see `revalidationHeaders()`). - -### `responseHeaders()` - -Returns updated, filtered set of response headers to return to clients receiving the cached response. This function is necessary, because proxies MUST always remove hop-by-hop headers (such as `TE` and `Connection`) and update response's `Age` to avoid doubling cache time. - -```js -cachedResponse.headers = cachePolicy.responseHeaders(cachedResponse); -``` - -### `timeToLive()` - -Returns approximate time in *milliseconds* until the response becomes stale (i.e. not fresh). - -After that time (when `timeToLive() <= 0`) the response might not be usable without revalidation. However, there are exceptions, e.g. a client can explicitly allow stale responses, so always check with `satisfiesWithoutRevalidation()`. - -### `toObject()`/`fromObject(json)` - -Chances are you'll want to store the `CachePolicy` object along with the cached response. `obj = policy.toObject()` gives a plain JSON-serializable object. `policy = CachePolicy.fromObject(obj)` creates an instance from it. - -### Refreshing stale cache (revalidation) - -When a cached response has expired, it can be made fresh again by making a request to the origin server. The server may respond with status 304 (Not Modified) without sending the response body again, saving bandwidth. - -The following methods help perform the update efficiently and correctly. - -#### `revalidationHeaders(newRequest)` - -Returns updated, filtered set of request headers to send to the origin server to check if the cached response can be reused. These headers allow the origin server to return status 304 indicating the response is still fresh. All headers unrelated to caching are passed through as-is. - -Use this method when updating cache from the origin server. - -```js -updateRequest.headers = cachePolicy.revalidationHeaders(updateRequest); -``` - -#### `revalidatedPolicy(revalidationRequest, revalidationResponse)` - -Use this method to update the cache after receiving a new response from the origin server. It returns an object with two keys: - -* `policy` — A new `CachePolicy` with HTTP headers updated from `revalidationResponse`. You can always replace the old cached `CachePolicy` with the new one. -* `modified` — Boolean indicating whether the response body has changed. - * If `false`, then a valid 304 Not Modified response has been received, and you can reuse the old cached response body. - * If `true`, you should use new response's body (if present), or make another request to the origin server without any conditional headers (i.e. don't use `revalidationHeaders()` this time) to get the new resource. - -```js -// When serving requests from cache: -const {oldPolicy, oldResponse} = letsPretendThisIsSomeCache.get(newRequest.url); - -if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) { - // Change the request to ask the origin server if the cached response can be used - newRequest.headers = oldPolicy.revalidationHeaders(newRequest); - - // Send request to the origin server. The server may respond with status 304 - const newResponse = await makeRequest(newResponse); - - // Create updated policy and combined response from the old and new data - const {policy, modified} = oldPolicy.revalidatedPolicy(newRequest, newResponse); - const response = modified ? newResponse : oldResponse; - - // Update the cache with the newer/fresher response - letsPretendThisIsSomeCache.set(newRequest.url, {policy, response}, policy.timeToLive()); - - // And proceed returning cached response as usual - response.headers = policy.responseHeaders(); - return response; -} -``` - -# Yo, FRESH - -![satisfiesWithoutRevalidation](fresh.jpg) - -## Used by - -* [ImageOptim API](https://imageoptim.com/api), [make-fetch-happen](https://github.com/zkat/make-fetch-happen), [cacheable-request](https://www.npmjs.com/package/cacheable-request), [npm/registry-fetch](https://github.com/npm/registry-fetch), [etc.](https://github.com/pornel/http-cache-semantics/network/dependents) - -## Implemented - -* `Cache-Control` response header with all the quirks. -* `Expires` with check for bad clocks. -* `Pragma` response header. -* `Age` response header. -* `Vary` response header. -* Default cacheability of statuses and methods. -* Requests for stale data. -* Filtering of hop-by-hop headers. -* Basic revalidation request - -## Unimplemented - -* Merging of range requests, If-Range (but correctly supports them as non-cacheable) -* Revalidation of multiple representations diff --git a/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/node4/index.js b/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/node4/index.js deleted file mode 100644 index bcdaebe80..000000000 --- a/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/node4/index.js +++ /dev/null @@ -1,559 +0,0 @@ -'use strict'; -// rfc7231 6.1 - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var statusCodeCacheableByDefault = [200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501]; - -// This implementation does not understand partial responses (206) -var understoodStatuses = [200, 203, 204, 300, 301, 302, 303, 307, 308, 404, 405, 410, 414, 501]; - -var hopByHopHeaders = { 'connection': true, 'keep-alive': true, 'proxy-authenticate': true, 'proxy-authorization': true, 'te': true, 'trailer': true, 'transfer-encoding': true, 'upgrade': true }; -var excludedFromRevalidationUpdate = { - // Since the old body is reused, it doesn't make sense to change properties of the body - 'content-length': true, 'content-encoding': true, 'transfer-encoding': true, - 'content-range': true -}; - -function parseCacheControl(header) { - var cc = {}; - if (!header) return cc; - - // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), - // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale - var parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing - for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var part = _ref; - - var _part$split = part.split(/\s*=\s*/, 2), - k = _part$split[0], - v = _part$split[1]; - - cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting - } - - return cc; -} - -function formatCacheControl(cc) { - var parts = []; - for (var k in cc) { - var v = cc[k]; - parts.push(v === true ? k : k + '=' + v); - } - if (!parts.length) { - return undefined; - } - return parts.join(', '); -} - -module.exports = function () { - function CachePolicy(req, res) { - var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - shared = _ref2.shared, - cacheHeuristic = _ref2.cacheHeuristic, - immutableMinTimeToLive = _ref2.immutableMinTimeToLive, - ignoreCargoCult = _ref2.ignoreCargoCult, - _fromObject = _ref2._fromObject; - - _classCallCheck(this, CachePolicy); - - if (_fromObject) { - this._fromObject(_fromObject); - return; - } - - if (!res || !res.headers) { - throw Error("Response headers missing"); - } - this._assertRequestHasHeaders(req); - - this._responseTime = this.now(); - this._isShared = shared !== false; - this._cacheHeuristic = undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE - this._immutableMinTtl = undefined !== immutableMinTimeToLive ? immutableMinTimeToLive : 24 * 3600 * 1000; - - this._status = 'status' in res ? res.status : 200; - this._resHeaders = res.headers; - this._rescc = parseCacheControl(res.headers['cache-control']); - this._method = 'method' in req ? req.method : 'GET'; - this._url = req.url; - this._host = req.headers.host; - this._noAuthorization = !req.headers.authorization; - this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used - this._reqcc = parseCacheControl(req.headers['cache-control']); - - // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching, - // so there's no point stricly adhering to the blindly copy&pasted directives. - if (ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) { - delete this._rescc['pre-check']; - delete this._rescc['post-check']; - delete this._rescc['no-cache']; - delete this._rescc['no-store']; - delete this._rescc['must-revalidate']; - this._resHeaders = Object.assign({}, this._resHeaders, { 'cache-control': formatCacheControl(this._rescc) }); - delete this._resHeaders.expires; - delete this._resHeaders.pragma; - } - - // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive - // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1). - if (!res.headers['cache-control'] && /no-cache/.test(res.headers.pragma)) { - this._rescc['no-cache'] = true; - } - } - - CachePolicy.prototype.now = function now() { - return Date.now(); - }; - - CachePolicy.prototype.storable = function storable() { - // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it. - return !!(!this._reqcc['no-store'] && ( - // A cache MUST NOT store a response to any request, unless: - // The request method is understood by the cache and defined as being cacheable, and - 'GET' === this._method || 'HEAD' === this._method || 'POST' === this._method && this._hasExplicitExpiration()) && - // the response status code is understood by the cache, and - understoodStatuses.indexOf(this._status) !== -1 && - // the "no-store" cache directive does not appear in request or response header fields, and - !this._rescc['no-store'] && ( - // the "private" response directive does not appear in the response, if the cache is shared, and - !this._isShared || !this._rescc.private) && ( - // the Authorization header field does not appear in the request, if the cache is shared, - !this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && ( - // the response either: - - // contains an Expires header field, or - this._resHeaders.expires || - // contains a max-age response directive, or - // contains a s-maxage response directive and the cache is shared, or - // contains a public response directive. - this._rescc.public || this._rescc['max-age'] || this._rescc['s-maxage'] || - // has a status code that is defined as cacheable by default - statusCodeCacheableByDefault.indexOf(this._status) !== -1)); - }; - - CachePolicy.prototype._hasExplicitExpiration = function _hasExplicitExpiration() { - // 4.2.1 Calculating Freshness Lifetime - return this._isShared && this._rescc['s-maxage'] || this._rescc['max-age'] || this._resHeaders.expires; - }; - - CachePolicy.prototype._assertRequestHasHeaders = function _assertRequestHasHeaders(req) { - if (!req || !req.headers) { - throw Error("Request headers missing"); - } - }; - - CachePolicy.prototype.satisfiesWithoutRevalidation = function satisfiesWithoutRevalidation(req) { - this._assertRequestHasHeaders(req); - - // When presented with a request, a cache MUST NOT reuse a stored response, unless: - // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive, - // unless the stored response is successfully validated (Section 4.3), and - var requestCC = parseCacheControl(req.headers['cache-control']); - if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) { - return false; - } - - if (requestCC['max-age'] && this.age() > requestCC['max-age']) { - return false; - } - - if (requestCC['min-fresh'] && this.timeToLive() < 1000 * requestCC['min-fresh']) { - return false; - } - - // the stored response is either: - // fresh, or allowed to be served stale - if (this.stale()) { - var allowsStale = requestCC['max-stale'] && !this._rescc['must-revalidate'] && (true === requestCC['max-stale'] || requestCC['max-stale'] > this.age() - this.maxAge()); - if (!allowsStale) { - return false; - } - } - - return this._requestMatches(req, false); - }; - - CachePolicy.prototype._requestMatches = function _requestMatches(req, allowHeadMethod) { - // The presented effective request URI and that of the stored response match, and - return (!this._url || this._url === req.url) && this._host === req.headers.host && ( - // the request method associated with the stored response allows it to be used for the presented request, and - !req.method || this._method === req.method || allowHeadMethod && 'HEAD' === req.method) && - // selecting header fields nominated by the stored response (if any) match those presented, and - this._varyMatches(req); - }; - - CachePolicy.prototype._allowsStoringAuthenticated = function _allowsStoringAuthenticated() { - // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage. - return this._rescc['must-revalidate'] || this._rescc.public || this._rescc['s-maxage']; - }; - - CachePolicy.prototype._varyMatches = function _varyMatches(req) { - if (!this._resHeaders.vary) { - return true; - } - - // A Vary header field-value of "*" always fails to match - if (this._resHeaders.vary === '*') { - return false; - } - - var fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/); - for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var name = _ref3; - - if (req.headers[name] !== this._reqHeaders[name]) return false; - } - return true; - }; - - CachePolicy.prototype._copyWithoutHopByHopHeaders = function _copyWithoutHopByHopHeaders(inHeaders) { - var headers = {}; - for (var name in inHeaders) { - if (hopByHopHeaders[name]) continue; - headers[name] = inHeaders[name]; - } - // 9.1. Connection - if (inHeaders.connection) { - var tokens = inHeaders.connection.trim().split(/\s*,\s*/); - for (var _iterator3 = tokens, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var _name = _ref4; - - delete headers[_name]; - } - } - if (headers.warning) { - var warnings = headers.warning.split(/,/).filter(function (warning) { - return !/^\s*1[0-9][0-9]/.test(warning); - }); - if (!warnings.length) { - delete headers.warning; - } else { - headers.warning = warnings.join(',').trim(); - } - } - return headers; - }; - - CachePolicy.prototype.responseHeaders = function responseHeaders() { - var headers = this._copyWithoutHopByHopHeaders(this._resHeaders); - var age = this.age(); - - // A cache SHOULD generate 113 warning if it heuristically chose a freshness - // lifetime greater than 24 hours and the response's age is greater than 24 hours. - if (age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24) { - headers.warning = (headers.warning ? `${headers.warning}, ` : '') + '113 - "rfc7234 5.5.4"'; - } - headers.age = `${Math.round(age)}`; - return headers; - }; - - /** - * Value of the Date response header or current time if Date was demed invalid - * @return timestamp - */ - - - CachePolicy.prototype.date = function date() { - var dateValue = Date.parse(this._resHeaders.date); - var maxClockDrift = 8 * 3600 * 1000; - if (Number.isNaN(dateValue) || dateValue < this._responseTime - maxClockDrift || dateValue > this._responseTime + maxClockDrift) { - return this._responseTime; - } - return dateValue; - }; - - /** - * Value of the Age header, in seconds, updated for the current time. - * May be fractional. - * - * @return Number - */ - - - CachePolicy.prototype.age = function age() { - var age = Math.max(0, (this._responseTime - this.date()) / 1000); - if (this._resHeaders.age) { - var ageValue = this._ageValue(); - if (ageValue > age) age = ageValue; - } - - var residentTime = (this.now() - this._responseTime) / 1000; - return age + residentTime; - }; - - CachePolicy.prototype._ageValue = function _ageValue() { - var ageValue = parseInt(this._resHeaders.age); - return isFinite(ageValue) ? ageValue : 0; - }; - - /** - * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`. - * - * For an up-to-date value, see `timeToLive()`. - * - * @return Number - */ - - - CachePolicy.prototype.maxAge = function maxAge() { - if (!this.storable() || this._rescc['no-cache']) { - return 0; - } - - // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default - // so this implementation requires explicit opt-in via public header - if (this._isShared && this._resHeaders['set-cookie'] && !this._rescc.public && !this._rescc.immutable) { - return 0; - } - - if (this._resHeaders.vary === '*') { - return 0; - } - - if (this._isShared) { - if (this._rescc['proxy-revalidate']) { - return 0; - } - // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field. - if (this._rescc['s-maxage']) { - return parseInt(this._rescc['s-maxage'], 10); - } - } - - // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field. - if (this._rescc['max-age']) { - return parseInt(this._rescc['max-age'], 10); - } - - var defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0; - - var dateValue = this.date(); - if (this._resHeaders.expires) { - var expires = Date.parse(this._resHeaders.expires); - // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). - if (Number.isNaN(expires) || expires < dateValue) { - return 0; - } - return Math.max(defaultMinTtl, (expires - dateValue) / 1000); - } - - if (this._resHeaders['last-modified']) { - var lastModified = Date.parse(this._resHeaders['last-modified']); - if (isFinite(lastModified) && dateValue > lastModified) { - return Math.max(defaultMinTtl, (dateValue - lastModified) / 1000 * this._cacheHeuristic); - } - } - - return defaultMinTtl; - }; - - CachePolicy.prototype.timeToLive = function timeToLive() { - return Math.max(0, this.maxAge() - this.age()) * 1000; - }; - - CachePolicy.prototype.stale = function stale() { - return this.maxAge() <= this.age(); - }; - - CachePolicy.fromObject = function fromObject(obj) { - return new this(undefined, undefined, { _fromObject: obj }); - }; - - CachePolicy.prototype._fromObject = function _fromObject(obj) { - if (this._responseTime) throw Error("Reinitialized"); - if (!obj || obj.v !== 1) throw Error("Invalid serialization"); - - this._responseTime = obj.t; - this._isShared = obj.sh; - this._cacheHeuristic = obj.ch; - this._immutableMinTtl = obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000; - this._status = obj.st; - this._resHeaders = obj.resh; - this._rescc = obj.rescc; - this._method = obj.m; - this._url = obj.u; - this._host = obj.h; - this._noAuthorization = obj.a; - this._reqHeaders = obj.reqh; - this._reqcc = obj.reqcc; - }; - - CachePolicy.prototype.toObject = function toObject() { - return { - v: 1, - t: this._responseTime, - sh: this._isShared, - ch: this._cacheHeuristic, - imm: this._immutableMinTtl, - st: this._status, - resh: this._resHeaders, - rescc: this._rescc, - m: this._method, - u: this._url, - h: this._host, - a: this._noAuthorization, - reqh: this._reqHeaders, - reqcc: this._reqcc - }; - }; - - /** - * Headers for sending to the origin server to revalidate stale response. - * Allows server to return 304 to allow reuse of the previous response. - * - * Hop by hop headers are always stripped. - * Revalidation headers may be added or removed, depending on request. - */ - - - CachePolicy.prototype.revalidationHeaders = function revalidationHeaders(incomingReq) { - this._assertRequestHasHeaders(incomingReq); - var headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); - - // This implementation does not understand range requests - delete headers['if-range']; - - if (!this._requestMatches(incomingReq, true) || !this.storable()) { - // revalidation allowed via HEAD - // not for the same resource, or wasn't allowed to be cached anyway - delete headers['if-none-match']; - delete headers['if-modified-since']; - return headers; - } - - /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */ - if (this._resHeaders.etag) { - headers['if-none-match'] = headers['if-none-match'] ? `${headers['if-none-match']}, ${this._resHeaders.etag}` : this._resHeaders.etag; - } - - // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request. - var forbidsWeakValidators = headers['accept-ranges'] || headers['if-match'] || headers['if-unmodified-since'] || this._method && this._method != 'GET'; - - /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server. - Note: This implementation does not understand partial responses (206) */ - if (forbidsWeakValidators) { - delete headers['if-modified-since']; - - if (headers['if-none-match']) { - var etags = headers['if-none-match'].split(/,/).filter(function (etag) { - return !/^\s*W\//.test(etag); - }); - if (!etags.length) { - delete headers['if-none-match']; - } else { - headers['if-none-match'] = etags.join(',').trim(); - } - } - } else if (this._resHeaders['last-modified'] && !headers['if-modified-since']) { - headers['if-modified-since'] = this._resHeaders['last-modified']; - } - - return headers; - }; - - /** - * Creates new CachePolicy with information combined from the previews response, - * and the new revalidation response. - * - * Returns {policy, modified} where modified is a boolean indicating - * whether the response body has been modified, and old cached body can't be used. - * - * @return {Object} {policy: CachePolicy, modified: Boolean} - */ - - - CachePolicy.prototype.revalidatedPolicy = function revalidatedPolicy(request, response) { - this._assertRequestHasHeaders(request); - if (!response || !response.headers) { - throw Error("Response headers missing"); - } - - // These aren't going to be supported exactly, since one CachePolicy object - // doesn't know about all the other cached objects. - var matches = false; - if (response.status !== undefined && response.status != 304) { - matches = false; - } else if (response.headers.etag && !/^\s*W\//.test(response.headers.etag)) { - // "All of the stored responses with the same strong validator are selected. - // If none of the stored responses contain the same strong validator, - // then the cache MUST NOT use the new response to update any stored responses." - matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, '') === response.headers.etag; - } else if (this._resHeaders.etag && response.headers.etag) { - // "If the new response contains a weak validator and that validator corresponds - // to one of the cache's stored responses, - // then the most recent of those matching stored responses is selected for update." - matches = this._resHeaders.etag.replace(/^\s*W\//, '') === response.headers.etag.replace(/^\s*W\//, ''); - } else if (this._resHeaders['last-modified']) { - matches = this._resHeaders['last-modified'] === response.headers['last-modified']; - } else { - // If the new response does not include any form of validator (such as in the case where - // a client generates an If-Modified-Since request from a source other than the Last-Modified - // response header field), and there is only one stored response, and that stored response also - // lacks a validator, then that stored response is selected for update. - if (!this._resHeaders.etag && !this._resHeaders['last-modified'] && !response.headers.etag && !response.headers['last-modified']) { - matches = true; - } - } - - if (!matches) { - return { - policy: new this.constructor(request, response), - modified: true - }; - } - - // use other header fields provided in the 304 (Not Modified) response to replace all instances - // of the corresponding header fields in the stored response. - var headers = {}; - for (var k in this._resHeaders) { - headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k]; - } - - var newResponse = Object.assign({}, response, { - status: this._status, - method: this._method, - headers - }); - return { - policy: new this.constructor(request, newResponse), - modified: false - }; - }; - - return CachePolicy; -}(); \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/package.json b/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/package.json deleted file mode 100644 index 2c96708af..000000000 --- a/advancedcontentfilter/vendor/npm-asset/http-cache-semantics/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "http-cache-semantics", - "version": "3.8.1", - "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", - "repository": "https://github.com/pornel/http-cache-semantics.git", - "main": "node4/index.js", - "scripts": { - "compile": "babel -d node4/ index.js; babel -d node4/test test", - "prepublish": "npm run compile", - "test": "npm run compile; mocha node4/test" - }, - "files": [ - "node4/index.js" - ], - "author": "Kornel Lesiński (https://kornel.ski/)", - "license": "BSD-2-Clause", - "devDependencies": { - "babel-cli": "^6.24.1", - "babel-preset-env": "^1.6.1", - "mocha": "^3.4.2" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/inherits/LICENSE b/advancedcontentfilter/vendor/npm-asset/inherits/LICENSE deleted file mode 100644 index dea3013d6..000000000 --- a/advancedcontentfilter/vendor/npm-asset/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/inherits/README.md b/advancedcontentfilter/vendor/npm-asset/inherits/README.md deleted file mode 100644 index b1c566585..000000000 --- a/advancedcontentfilter/vendor/npm-asset/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/inherits/inherits.js b/advancedcontentfilter/vendor/npm-asset/inherits/inherits.js deleted file mode 100644 index 3b94763a7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/advancedcontentfilter/vendor/npm-asset/inherits/inherits_browser.js b/advancedcontentfilter/vendor/npm-asset/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/inherits/package.json b/advancedcontentfilter/vendor/npm-asset/inherits/package.json deleted file mode 100644 index 7cf62b95c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/inherits/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", - "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": "node test" - }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ] -} diff --git a/advancedcontentfilter/vendor/npm-asset/into-stream/index.js b/advancedcontentfilter/vendor/npm-asset/into-stream/index.js deleted file mode 100644 index c35f69574..000000000 --- a/advancedcontentfilter/vendor/npm-asset/into-stream/index.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; -const from = require('from2'); -const pIsPromise = require('p-is-promise'); - -module.exports = x => { - if (Array.isArray(x)) { - x = x.slice(); - } - - let promise; - let iterator; - - prepare(x); - - function prepare(value) { - x = value; - promise = pIsPromise(x) ? x : null; - // we don't iterate on strings and buffers since slicing them is ~7x faster - const shouldIterate = !promise && x[Symbol.iterator] && typeof x !== 'string' && !Buffer.isBuffer(x); - iterator = shouldIterate ? x[Symbol.iterator]() : null; - } - - return from(function reader(size, cb) { - if (promise) { - promise.then(prepare).then(() => reader.call(this, size, cb), cb); - return; - } - - if (iterator) { - const obj = iterator.next(); - setImmediate(cb, null, obj.done ? null : obj.value); - return; - } - - if (x.length === 0) { - setImmediate(cb, null, null); - return; - } - - const chunk = x.slice(0, size); - x = x.slice(size); - - setImmediate(cb, null, chunk); - }); -}; - -module.exports.obj = x => { - if (Array.isArray(x)) { - x = x.slice(); - } - - let promise; - let iterator; - - prepare(x); - - function prepare(value) { - x = value; - promise = pIsPromise(x) ? x : null; - iterator = !promise && x[Symbol.iterator] ? x[Symbol.iterator]() : null; - } - - return from.obj(function reader(size, cb) { - if (promise) { - promise.then(prepare).then(() => reader.call(this, size, cb), cb); - return; - } - - if (iterator) { - const obj = iterator.next(); - setImmediate(cb, null, obj.done ? null : obj.value); - return; - } - - this.push(x); - - setImmediate(cb, null, null); - }); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/into-stream/license b/advancedcontentfilter/vendor/npm-asset/into-stream/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/into-stream/license +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/into-stream/package.json b/advancedcontentfilter/vendor/npm-asset/into-stream/package.json deleted file mode 100644 index e0241c998..000000000 --- a/advancedcontentfilter/vendor/npm-asset/into-stream/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "into-stream", - "version": "3.1.0", - "description": "Convert a buffer/string/array/object/iterable/promise into a stream", - "license": "MIT", - "repository": "sindresorhus/into-stream", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "stream", - "buffer", - "string", - "object", - "array", - "iterable", - "promise", - "promises", - "from", - "into", - "to", - "transform", - "convert", - "readable", - "pull", - "gulpfriendly", - "value", - "str" - ], - "dependencies": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - }, - "devDependencies": { - "ava": "*", - "get-stream": "^3.0.0", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/into-stream/readme.md b/advancedcontentfilter/vendor/npm-asset/into-stream/readme.md deleted file mode 100644 index 6c4ed0b6f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/into-stream/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# into-stream [![Build Status](https://travis-ci.org/sindresorhus/into-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/into-stream) - -> Convert a buffer/string/array/object/iterable/promise into a stream - -Correctly chunks up the input and handles backpressure. - - -## Install - -``` -$ npm install --save into-stream -``` - - -## Usage - -```js -const intoStream = require('into-stream'); - -intoStream('unicorn').pipe(process.stdout); -//=> 'unicorn' -``` - - -## API - -### intoStream(input) - -Type: `Buffer` `string` `Iterable` `Promise`
-Returns: [Readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable) - -Adheres to the requested chunk size, except for `array` where each element will be a chunk. - -### intoStream.obj(input) - -Type: `Object`, `Iterable` `Promise`
-Returns: [Readable object stream](https://nodejs.org/api/stream.html#stream_object_mode) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/.jscs.json b/advancedcontentfilter/vendor/npm-asset/is-object/.jscs.json deleted file mode 100644 index 97ab933d4..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/.jscs.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": "allButReserved", - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "validateLineBreaks": "LF", - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "additionalRules": [] -} - diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/.npmignore b/advancedcontentfilter/vendor/npm-asset/is-object/.npmignore deleted file mode 100644 index fd31f5ee6..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript -node_modules diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/.testem.json b/advancedcontentfilter/vendor/npm-asset/is-object/.testem.json deleted file mode 100644 index 287edfe13..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/.testem.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "launchers": { - "node": { - "command": "node ./test" - } - }, - "src_files": [ - "./**/*.js" - ], - "before_tests": "npm run build", - "on_exit": "rm test/static/bundle.js", - "test_page": "test/static/index.html", - "launch_in_dev": ["node", "phantomjs"] -} diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/.travis.yml b/advancedcontentfilter/vendor/npm-asset/is-object/.travis.yml deleted file mode 100644 index 912080aa1..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -before_install: - - '[ "${TRAVIS_NODE_VERSION}" == "0.6" ] || npm install -g npm@~1.4.6' -matrix: - fast_finish: true - allow_failures: - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.6" - - node_js: "0.4" - diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/LICENSE b/advancedcontentfilter/vendor/npm-asset/is-object/LICENSE deleted file mode 100644 index 72d356c12..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013 Colingo. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/README.md b/advancedcontentfilter/vendor/npm-asset/is-object/README.md deleted file mode 100644 index d6e7b7d3e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# is-object [![Version Badge][12]][11] - -[![build status][1]][2] -[![dependency status][3]][4] -[![dev dependency status][9]][10] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][13]][11] - -[![browser support][5]][6] - -Checks whether a value is an object - -Because `typeof null` is a troll. - -## Example - -```js -var isObject = require('is-object'); -var assert = require('assert'); - -assert.equal(isObject(null), false); -assert.equal(isObject({}), true); -``` - -## Installation - -`npm install is-object` - -## Contributors - - - [Raynos][7] - - [Jordan Harband][8] - -## MIT Licensed - - [1]: https://secure.travis-ci.org/ljharb/is-object.svg - [2]: http://travis-ci.org/ljharb/is-object - [3]: http://david-dm.org/ljharb/is-object/status.svg - [4]: http://david-dm.org/ljharb/is-object - [5]: http://ci.testling.com/ljharb/is-object.svg - [6]: http://ci.testling.com/ljharb/is-object - [7]: https://github.com/Raynos - [8]: https://github.com/ljharb - [9]: https://david-dm.org/ljharb/is-object/dev-status.svg - [10]: https://david-dm.org/ljharb/is-object#info=devDependencies - [11]: https://npmjs.org/package/is-object - [12]: http://vb.teelaun.ch/ljharb/is-object.svg - [13]: https://nodei.co/npm/is-object.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-object.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-object.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-object - diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/index.js b/advancedcontentfilter/vendor/npm-asset/is-object/index.js deleted file mode 100644 index e618d113a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = function isObject(x) { - return typeof x === "object" && x !== null; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/package.json b/advancedcontentfilter/vendor/npm-asset/is-object/package.json deleted file mode 100644 index bf7b889ae..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "is-object", - "version": "1.0.1", - "description": "Checks whether a value is an object", - "keywords": [], - "author": "Raynos ", - "repository": "git://github.com/ljharb/is-object.git", - "main": "index", - "homepage": "https://github.com/ljharb/is-object", - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "bugs": { - "url": "https://github.com/ljharb/is-object/issues", - "email": "ljharb@gmail.com" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~2.14.0", - "covert": "~1.0.0", - "jscs": "~1.6.0" - }, - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/ljharb/is-object/raw/master/LICENSE" - } - ], - "scripts": { - "test": "npm run lint && node test/index.js && npm run coverage-quiet", - "coverage": "covert test/index.js", - "coverage-quiet": "covert test/index.js --quiet", - "lint": "jscs *.js */*.js" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/6..latest", - "firefox/3..6", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/10.0", - "opera/11..latest", - "opera/next", - "safari/4..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/is-object/test/index.js b/advancedcontentfilter/vendor/npm-asset/is-object/test/index.js deleted file mode 100644 index 35267a90a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-object/test/index.js +++ /dev/null @@ -1,23 +0,0 @@ -var test = require('tape'); - -var isObject = require('../index'); - -test('returns true for objects', function (assert) { - assert.equal(isObject({}), true); - assert.equal(isObject([]), true); - - assert.end(); -}); - -test('returns false for null', function (assert) { - assert.equal(isObject(null), false); - - assert.end(); -}); - -test('returns false for primitives', function (assert) { - assert.equal(isObject(42), false); - assert.equal(isObject('foo'), false); - - assert.end(); -}); diff --git a/advancedcontentfilter/vendor/npm-asset/is-plain-obj/index.js b/advancedcontentfilter/vendor/npm-asset/is-plain-obj/index.js deleted file mode 100644 index 0d1ba9eeb..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-plain-obj/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -var toString = Object.prototype.toString; - -module.exports = function (x) { - var prototype; - return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/is-plain-obj/license b/advancedcontentfilter/vendor/npm-asset/is-plain-obj/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-plain-obj/license +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/is-plain-obj/package.json b/advancedcontentfilter/vendor/npm-asset/is-plain-obj/package.json deleted file mode 100644 index d331f6e81..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-plain-obj/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "is-plain-obj", - "version": "1.1.0", - "description": "Check if a value is a plain object", - "license": "MIT", - "repository": "sindresorhus/is-plain-obj", - "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": [ - "obj", - "object", - "is", - "check", - "test", - "type", - "plain", - "vanilla", - "pure", - "simple" - ], - "devDependencies": { - "ava": "0.0.4" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/is-plain-obj/readme.md b/advancedcontentfilter/vendor/npm-asset/is-plain-obj/readme.md deleted file mode 100644 index 269e56aef..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-plain-obj/readme.md +++ /dev/null @@ -1,35 +0,0 @@ -# is-plain-obj [![Build Status](https://travis-ci.org/sindresorhus/is-plain-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-plain-obj) - -> Check if a value is a plain object - -An object is plain if it's created by either `{}`, `new Object()` or `Object.create(null)`. - - -## Install - -``` -$ npm install --save is-plain-obj -``` - - -## Usage - -```js -var isPlainObj = require('is-plain-obj'); - -isPlainObj({foo: 'bar'}); -//=> true - -isPlainObj([1, 2, 3]); -//=> false -``` - - -## Related - -- [is-obj](https://github.com/sindresorhus/is-obj) - Check if a value is an object - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/index.js b/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/index.js deleted file mode 100644 index 663ee338f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/index.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var WHITELIST = [ - 'ETIMEDOUT', - 'ECONNRESET', - 'EADDRINUSE', - 'ESOCKETTIMEDOUT', - 'ECONNREFUSED', - 'EPIPE' -]; - -var BLACKLIST = [ - 'ENOTFOUND', - 'ENETUNREACH', - - // SSL errors from https://github.com/nodejs/node/blob/ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac/src/node_crypto.cc#L1950 - 'UNABLE_TO_GET_ISSUER_CERT', - 'UNABLE_TO_GET_CRL', - 'UNABLE_TO_DECRYPT_CERT_SIGNATURE', - 'UNABLE_TO_DECRYPT_CRL_SIGNATURE', - 'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY', - 'CERT_SIGNATURE_FAILURE', - 'CRL_SIGNATURE_FAILURE', - 'CERT_NOT_YET_VALID', - 'CERT_HAS_EXPIRED', - 'CRL_NOT_YET_VALID', - 'CRL_HAS_EXPIRED', - 'ERROR_IN_CERT_NOT_BEFORE_FIELD', - 'ERROR_IN_CERT_NOT_AFTER_FIELD', - 'ERROR_IN_CRL_LAST_UPDATE_FIELD', - 'ERROR_IN_CRL_NEXT_UPDATE_FIELD', - 'OUT_OF_MEM', - 'DEPTH_ZERO_SELF_SIGNED_CERT', - 'SELF_SIGNED_CERT_IN_CHAIN', - 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', - 'UNABLE_TO_VERIFY_LEAF_SIGNATURE', - 'CERT_CHAIN_TOO_LONG', - 'CERT_REVOKED', - 'INVALID_CA', - 'PATH_LENGTH_EXCEEDED', - 'INVALID_PURPOSE', - 'CERT_UNTRUSTED', - 'CERT_REJECTED' -]; - -module.exports = function (err) { - if (!err || !err.code) { - return true; - } - - if (WHITELIST.indexOf(err.code) !== -1) { - return true; - } - - if (BLACKLIST.indexOf(err.code) !== -1) { - return false; - } - - return true; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/license b/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/license deleted file mode 100644 index 1aeb74fd2..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/license +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/package.json b/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/package.json deleted file mode 100644 index 452b76f5a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "is-retry-allowed", - "version": "1.1.0", - "description": "My prime module", - "license": "MIT", - "repository": "floatdrop/is-retry-allowed", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "" - ], - "dependencies": {}, - "devDependencies": { - "ava": "^0.8.0", - "xo": "^0.12.1" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/readme.md b/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/readme.md deleted file mode 100644 index 4212d099b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/is-retry-allowed/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# is-retry-allowed [![Build Status](https://travis-ci.org/floatdrop/is-retry-allowed.svg?branch=master)](https://travis-ci.org/floatdrop/is-retry-allowed) - -Is retry allowed for Error? - - -## Install - -``` -$ npm install --save is-retry-allowed -``` - - -## Usage - -```js -const isRetryAllowed = require('is-retry-allowed'); - -isRetryAllowed({code: 'ETIMEDOUT'}); -//=> true - -isRetryAllowed({code: 'ENOTFOUND'}); -//=> false - -isRetryAllowed({}); -//=> true -``` - - -## API - -### isRetryAllowed(error) - -#### error - -Type: `object` - -Object with `code` property, which will be used to determine retry. - - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/advancedcontentfilter/vendor/npm-asset/isarray/.npmignore b/advancedcontentfilter/vendor/npm-asset/isarray/.npmignore deleted file mode 100644 index 3c3629e64..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/advancedcontentfilter/vendor/npm-asset/isarray/.travis.yml b/advancedcontentfilter/vendor/npm-asset/isarray/.travis.yml deleted file mode 100644 index cc4dba29d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/advancedcontentfilter/vendor/npm-asset/isarray/Makefile b/advancedcontentfilter/vendor/npm-asset/isarray/Makefile deleted file mode 100644 index 787d56e1e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/advancedcontentfilter/vendor/npm-asset/isarray/README.md b/advancedcontentfilter/vendor/npm-asset/isarray/README.md deleted file mode 100644 index 16d2c59c6..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# 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/advancedcontentfilter/vendor/npm-asset/isarray/component.json b/advancedcontentfilter/vendor/npm-asset/isarray/component.json deleted file mode 100644 index 9e31b6838..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/advancedcontentfilter/vendor/npm-asset/isarray/index.js b/advancedcontentfilter/vendor/npm-asset/isarray/index.js deleted file mode 100644 index a57f63495..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/isarray/package.json b/advancedcontentfilter/vendor/npm-asset/isarray/package.json deleted file mode 100644 index 1a4317a9c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "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/advancedcontentfilter/vendor/npm-asset/isarray/test.js b/advancedcontentfilter/vendor/npm-asset/isarray/test.js deleted file mode 100644 index e0c3444d8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/isurl/LICENSE b/advancedcontentfilter/vendor/npm-asset/isurl/LICENSE deleted file mode 100644 index 274147aeb..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isurl/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Steven Vachon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/isurl/README.md b/advancedcontentfilter/vendor/npm-asset/isurl/README.md deleted file mode 100644 index 6903ac709..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isurl/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# isurl [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] - -> Checks whether a value is a WHATWG [`URL`](https://developer.mozilla.org/en/docs/Web/API/URL). - - -Works cross-realm/iframe and despite @@toStringTag. - - -## Installation - -[Node.js](http://nodejs.org/) `>= 4` is required. To install, type this at the command line: -```shell -npm install isurl -``` - - -## Usage - -```js -const isURL = require('isurl'); - -isURL('http://domain/'); //-> false -isURL(new URL('http://domain/')); //-> true -``` - -Optionally, acceptance can be extended to incomplete `URL` implementations that lack `searchParams` (which are common in many modern web browsers): -```js -const url = new URL('http://domain/?query'); - -console.log(url.searchParams); //-> undefined - -isURL.lenient(url); //-> true -``` - - -[npm-image]: https://img.shields.io/npm/v/isurl.svg -[npm-url]: https://npmjs.org/package/isurl -[travis-image]: https://img.shields.io/travis/stevenvachon/isurl.svg -[travis-url]: https://travis-ci.org/stevenvachon/isurl diff --git a/advancedcontentfilter/vendor/npm-asset/isurl/index.js b/advancedcontentfilter/vendor/npm-asset/isurl/index.js deleted file mode 100644 index 70ed1d7ae..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isurl/index.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -const hasToStringTag = require("has-to-string-tag-x"); -const isObject = require("is-object"); - -const toString = Object.prototype.toString; -const urlClass = "[object URL]"; - -const hash = "hash"; -const host = "host"; -const hostname = "hostname"; -const href = "href"; -const password = "password"; -const pathname = "pathname"; -const port = "port"; -const protocol = "protocol"; -const search = "search"; -const username = "username"; - - - -const isURL = (url, supportIncomplete/*=false*/) => -{ - if (!isObject(url)) return false; - - // Native implementation in older browsers - if (!hasToStringTag && toString.call(url) === urlClass) return true; - - if (!(href in url)) return false; - if (!(protocol in url)) return false; - if (!(username in url)) return false; - if (!(password in url)) return false; - if (!(hostname in url)) return false; - if (!(port in url)) return false; - if (!(host in url)) return false; - if (!(pathname in url)) return false; - if (!(search in url)) return false; - if (!(hash in url)) return false; - - if (supportIncomplete !== true) - { - if (!isObject(url.searchParams)) return false; - - // TODO :: write a separate isURLSearchParams ? - } - - return true; -} - - - -isURL.lenient = url => -{ - return isURL(url, true); -}; - - - -module.exports = isURL; diff --git a/advancedcontentfilter/vendor/npm-asset/isurl/package.json b/advancedcontentfilter/vendor/npm-asset/isurl/package.json deleted file mode 100644 index 085272318..000000000 --- a/advancedcontentfilter/vendor/npm-asset/isurl/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "isurl", - "description": "Checks whether a value is a WHATWG URL.", - "version": "1.0.0", - "license": "MIT", - "author": "Steven Vachon (https://www.svachon.com/)", - "repository": "stevenvachon/isurl", - "dependencies": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - }, - "devDependencies": { - "chai": "^4.0.2", - "mocha": "^3.4.2", - "semver": "^5.3.0", - "universal-url": "^1.0.0" - }, - "engines": { - "node": ">= 4" - }, - "scripts": { - "test": "mocha test --check-leaks --bail" - }, - "files": [ - "index.js" - ], - "keywords": [ - "uri", - "url", - "whatwg" - ] -} diff --git a/advancedcontentfilter/vendor/npm-asset/json-buffer/.npmignore b/advancedcontentfilter/vendor/npm-asset/json-buffer/.npmignore deleted file mode 100644 index 13abef4f5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/json-buffer/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/advancedcontentfilter/vendor/npm-asset/json-buffer/.travis.yml b/advancedcontentfilter/vendor/npm-asset/json-buffer/.travis.yml deleted file mode 100644 index 244b7e88e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/json-buffer/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - '0.10' diff --git a/advancedcontentfilter/vendor/npm-asset/json-buffer/LICENSE b/advancedcontentfilter/vendor/npm-asset/json-buffer/LICENSE deleted file mode 100644 index b799ec00c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/json-buffer/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -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. diff --git a/advancedcontentfilter/vendor/npm-asset/json-buffer/README.md b/advancedcontentfilter/vendor/npm-asset/json-buffer/README.md deleted file mode 100644 index 43857bb1a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/json-buffer/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# json-buffer - -JSON functions that can convert buffers! - -[![build status](https://secure.travis-ci.org/dominictarr/json-buffer.png)](http://travis-ci.org/dominictarr/json-buffer) - -[![testling badge](https://ci.testling.com/dominictarr/json-buffer.png)](https://ci.testling.com/dominictarr/json-buffer) - -JSON mangles buffers by converting to an array... -which isn't helpful. json-buffers converts to base64 instead, -and deconverts base64 to a buffer. - -``` js -var JSONB = require('json-buffer') -var Buffer = require('buffer').Buffer - -var str = JSONB.stringify(new Buffer('hello there!')) - -console.log(JSONB.parse(str)) //GET a BUFFER back -``` - -## License - -MIT diff --git a/advancedcontentfilter/vendor/npm-asset/json-buffer/index.js b/advancedcontentfilter/vendor/npm-asset/json-buffer/index.js deleted file mode 100644 index 9cafed821..000000000 --- a/advancedcontentfilter/vendor/npm-asset/json-buffer/index.js +++ /dev/null @@ -1,58 +0,0 @@ -//TODO: handle reviver/dehydrate function like normal -//and handle indentation, like normal. -//if anyone needs this... please send pull request. - -exports.stringify = function stringify (o) { - if('undefined' == typeof o) return o - - if(o && Buffer.isBuffer(o)) - return JSON.stringify(':base64:' + o.toString('base64')) - - if(o && o.toJSON) - o = o.toJSON() - - if(o && 'object' === typeof o) { - var s = '' - var array = Array.isArray(o) - s = array ? '[' : '{' - var first = true - - for(var k in o) { - var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k]) - if(Object.hasOwnProperty.call(o, k) && !ignore) { - if(!first) - s += ',' - first = false - if (array) { - if(o[k] == undefined) - s += 'null' - else - s += stringify(o[k]) - } else if (o[k] !== void(0)) { - s += stringify(k) + ':' + stringify(o[k]) - } - } - } - - s += array ? ']' : '}' - - return s - } else if ('string' === typeof o) { - return JSON.stringify(/^:/.test(o) ? ':' + o : o) - } else if ('undefined' === typeof o) { - return 'null'; - } else - return JSON.stringify(o) -} - -exports.parse = function (s) { - return JSON.parse(s, function (key, value) { - if('string' === typeof value) { - if(/^:base64:/.test(value)) - return new Buffer(value.substring(8), 'base64') - else - return /^:/.test(value) ? value.substring(1) : value - } - return value - }) -} diff --git a/advancedcontentfilter/vendor/npm-asset/json-buffer/package.json b/advancedcontentfilter/vendor/npm-asset/json-buffer/package.json deleted file mode 100644 index 035df500d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/json-buffer/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "json-buffer", - "description": "JSON parse & stringify that supports binary via bops & base64", - "version": "3.0.0", - "homepage": "https://github.com/dominictarr/json-buffer", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/json-buffer.git" - }, - "devDependencies": { - "tape": "^4.6.3" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": "Dominic Tarr (http://dominictarr.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" - ] - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/json-buffer/test/index.js b/advancedcontentfilter/vendor/npm-asset/json-buffer/test/index.js deleted file mode 100644 index 83518042c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/json-buffer/test/index.js +++ /dev/null @@ -1,63 +0,0 @@ - -var test = require('tape') -var _JSON = require('../') - -function clone (o) { - return JSON.parse(JSON.stringify(o)) -} - -var examples = { - simple: { foo: [], bar: {}, baz: new Buffer('some binary data') }, - just_buffer: new Buffer('JUST A BUFFER'), - all_types: { - string:'hello', - number: 3145, - null: null, - object: {}, - array: [], - boolean: true, - boolean2: false - }, - foo: new Buffer('foo'), - foo2: new Buffer('foo2'), - escape: { - buffer: new Buffer('x'), - string: _JSON.stringify(new Buffer('x')) - }, - escape2: { - buffer: new Buffer('x'), - string: ':base64:'+ new Buffer('x').toString('base64') - }, - undefined: { - empty: undefined, test: true - }, - undefined2: { - first: 1, empty: undefined, test: true - }, - undefinedArray: { - array: [undefined, 1, 'two'] - }, - fn: { - fn: function () {} - }, - undefined: undefined -} - -for(k in examples) -(function (value, k) { - test(k, function (t) { - var s = _JSON.stringify(value) - console.log('parse', s) - if(JSON.stringify(value) !== undefined) { - console.log(s) - var _value = _JSON.parse(s) - t.deepEqual(clone(_value), clone(value)) - } - else - t.equal(s, undefined) - t.end() - }) -})(examples[k], k) - - - diff --git a/advancedcontentfilter/vendor/npm-asset/keyv/LICENSE b/advancedcontentfilter/vendor/npm-asset/keyv/LICENSE deleted file mode 100644 index f27ee9b41..000000000 --- a/advancedcontentfilter/vendor/npm-asset/keyv/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Luke Childs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/keyv/README.md b/advancedcontentfilter/vendor/npm-asset/keyv/README.md deleted file mode 100644 index 3c6d6d28c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/keyv/README.md +++ /dev/null @@ -1,243 +0,0 @@ -

- keyv -
-
-

- -> Simple key-value storage with support for multiple backends - -[![Build Status](https://travis-ci.org/lukechilds/keyv.svg?branch=master)](https://travis-ci.org/lukechilds/keyv) -[![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv?branch=master) -[![npm](https://img.shields.io/npm/v/keyv.svg)](https://www.npmjs.com/package/keyv) - -Keyv provides a consistent interface for key-value storage across multiple backends via storage adapters. It supports TTL based expiry, making it suitable as a cache or a persistent key-value store. - -## Features - -There are a few existing modules similar to Keyv, however Keyv is different because it: - -- Isn't bloated -- Has a simple Promise based API -- Suitable as a TTL based cache or persistent key-value store -- [Easily embeddable](#add-cache-support-to-your-module) inside another module -- Works with any storage that implements the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) API -- Handles all JavaScript types (values can be `Buffer`/`null`/`undefined`) -- Supports namespaces -- Wide range of [**efficient, well tested**](#official-storage-adapters) storage adapters -- Connection errors are passed through (db failures won't kill your app) -- Supports the current active LTS version of Node.js or higher - -## Usage - -Install Keyv. - -``` -npm install --save keyv -``` - -By default everything is stored in memory, you can optionally also install a storage adapter. - -``` -npm install --save @keyv/redis -npm install --save @keyv/mongo -npm install --save @keyv/sqlite -npm install --save @keyv/postgres -npm install --save @keyv/mysql -``` - -Create a new Keyv instance, passing your connection string if applicable. Keyv will automatically load the correct storage adapter. - -```js -const Keyv = require('keyv'); - -// One of the following -const keyv = new Keyv(); -const keyv = new Keyv('redis://user:pass@localhost:6379'); -const keyv = new Keyv('mongodb://user:pass@localhost:27017/dbname'); -const keyv = new Keyv('sqlite://path/to/database.sqlite'); -const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname'); -const keyv = new Keyv('mysql://user:pass@localhost:3306/dbname'); - -// Handle DB connection errors -keyv.on('error' err => console.log('Connection Error', err)); - -await keyv.set('foo', 'expires in 1 second', 1000); // true -await keyv.set('foo', 'never expires'); // true -await keyv.get('foo'); // 'never expires' -await keyv.delete('foo'); // true -await keyv.clear(); // undefined -``` - -### Namespaces - -You can namespace your Keyv instance to avoid key collisions and allow you to clear only a certain namespace while using the same database. - -```js -const users = new Keyv('redis://user:pass@localhost:6379', { namespace: 'users' }); -const cache = new Keyv('redis://user:pass@localhost:6379', { namespace: 'cache' }); - -await users.set('foo', 'users'); // true -await cache.set('foo', 'cache'); // true -await users.get('foo'); // 'users' -await cache.get('foo'); // 'cache' -await users.clear(); // undefined -await users.get('foo'); // undefined -await cache.get('foo'); // 'cache' -``` - -## Official Storage Adapters - -The official storage adapters are covered by [over 150 integration tests](https://travis-ci.org/lukechilds/keyv/jobs/260418145) to guarantee consistent behaviour. They are lightweight, efficient wrappers over the DB clients making use of indexes and native TTLs where available. - -Database | Adapter | Native TTL | Status ----|---|---|--- -Redis | [@keyv/redis](https://github.com/lukechilds/keyv-redis) | Yes | [![Build Status](https://travis-ci.org/lukechilds/keyv-redis.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-redis) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-redis/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-redis?branch=master) -MongoDB | [@keyv/mongo](https://github.com/lukechilds/keyv-mongo) | Yes | [![Build Status](https://travis-ci.org/lukechilds/keyv-mongo.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-mongo) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-mongo/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-mongo?branch=master) -SQLite | [@keyv/sqlite](https://github.com/lukechilds/keyv-sqlite) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-sqlite.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-sqlite) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-sqlite/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-sqlite?branch=master) -PostgreSQL | [@keyv/postgres](https://github.com/lukechilds/keyv-postgres) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-postgres.svg?branch=master)](https://travis-ci.org/lukechildskeyv-postgreskeyv) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-postgres/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-postgres?branch=master) -MySQL | [@keyv/mysql](https://github.com/lukechilds/keyv-mysql) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-mysql.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-mysql) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-mysql/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-mysql?branch=master) - -## Third-party Storage Adapters - -You can also use third-party storage adapters or build your own. Keyv will wrap these storage adapters in TTL functionality and handle complex types internally. - -```js -const Keyv = require('keyv'); -const myAdapter = require('./my-storage-adapter'); - -const keyv = new Keyv({ store: myAdapter }); -``` - -Any store that follows the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) api will work. - -```js -new Keyv({ store: new Map() }); -``` - -For example, [`quick-lru`](https://github.com/sindresorhus/quick-lru) is a completely unrelated module that implements the Map API. - -```js -const Keyv = require('keyv'); -const QuickLRU = require('quick-lru'); - -const lru = new QuickLRU({ maxSize: 1000 }); -const keyv = new Keyv({ store: lru }); -``` - -## Add Cache Support to your Module - -Keyv is designed to be easily embedded into other modules to add cache support. The recommended pattern is to expose a `cache` option in your modules options which is passed through to Keyv. Caching will work in memory by default and users have the option to also install a Keyv storage adapter and pass in a connection string, or any other storage that implements the `Map` API. - -You should also set a namespace for your module so you can safely call `.clear()` without clearing unrelated app data. - -Inside your module: - -```js -class AwesomeModule { - constructor(opts) { - this.cache = new Keyv({ - uri: typeof opts.cache === 'string' && opts.cache, - store: typeof opts.cache !== 'string' && opts.cache, - namespace: 'awesome-module' - }); - } -} -``` - -Now it can be consumed like this: - -```js -const AwesomeModule = require('awesome-module'); - -// Caches stuff in memory by default -const awesomeModule = new AwesomeModule(); - -// After npm install --save keyv-redis -const awesomeModule = new AwesomeModule({ cache: 'redis://localhost' }); - -// Some third-party module that implements the Map API -const awesomeModule = new AwesomeModule({ cache: some3rdPartyStore }); -``` - -## API - -### new Keyv([uri], [options]) - -Returns a new Keyv instance. - -The Keyv instance is also an `EventEmitter` that will emit an `'error'` event if the storage adapter connection fails. - -### uri - -Type: `String`
-Default: `undefined` - -The connection string URI. - -Merged into the options object as options.uri. - -### options - -Type: `Object` - -The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options. - -#### options.namespace - -Type: `String`
-Default: `'keyv'` - -Namespace for the current instance. - -#### options.ttl - -Type: `Number`
-Default: `undefined` - -Default TTL. Can be overridden by specififying a TTL on `.set()`. - -#### options.store - -Type: `Storage adapter instance`
-Default: `new Map()` - -The storage adapter instance to be used by Keyv. - -#### options.adapter - -Type: `String`
-Default: `undefined` - -Specify an adapter to use. e.g `'redis'` or `'mongodb'`. - -### Instance - -Keys must always be strings. Values can be of any type. - -#### .set(key, value, [ttl]) - -Set a value. - -By default keys are persistent. You can set an expiry TTL in milliseconds. - -Returns `true`. - -#### .get(key) - -Returns the value. - -#### .delete(key) - -Deletes an entry. - -Returns `true` if the key existed, `false` if not. - -#### .clear() - -Delete all entries in the current namespace. - -Returns `undefined`. - -## License - -MIT © Luke Childs diff --git a/advancedcontentfilter/vendor/npm-asset/keyv/package.json b/advancedcontentfilter/vendor/npm-asset/keyv/package.json deleted file mode 100644 index 39628859e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/keyv/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "keyv", - "version": "3.0.0", - "description": "Simple key-value storage with support for multiple backends", - "main": "src/index.js", - "scripts": { - "test": "xo && nyc ava test/keyv.js", - "test:full": "xo && nyc ava --serial", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "xo": { - "extends": "xo-lukechilds" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/lukechilds/keyv.git" - }, - "keywords": [ - "key", - "value", - "store", - "cache", - "ttl" - ], - "author": "Luke Childs (http://lukechilds.co.uk)", - "license": "MIT", - "bugs": { - "url": "https://github.com/lukechilds/keyv/issues" - }, - "homepage": "https://github.com/lukechilds/keyv", - "dependencies": { - "json-buffer": "3.0.0" - }, - "devDependencies": { - "ava": "^0.22.0", - "coveralls": "^3.0.0", - "eslint-config-xo-lukechilds": "^1.0.0", - "@keyv/mongo": "*", - "@keyv/mysql": "*", - "@keyv/postgres": "*", - "@keyv/redis": "*", - "@keyv/sqlite": "*", - "@keyv/test-suite": "*", - "nyc": "^11.0.3", - "this": "^1.0.2", - "timekeeper": "^2.0.0", - "xo": "^0.19.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/keyv/src/index.js b/advancedcontentfilter/vendor/npm-asset/keyv/src/index.js deleted file mode 100644 index ab714b28b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/keyv/src/index.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; - -const EventEmitter = require('events'); -const JSONB = require('json-buffer'); - -const loadStore = opts => { - const adapters = { - redis: '@keyv/redis', - mongodb: '@keyv/mongo', - mongo: '@keyv/mongo', - sqlite: '@keyv/sqlite', - postgresql: '@keyv/postgres', - postgres: '@keyv/postgres', - mysql: '@keyv/mysql' - }; - if (opts.adapter || opts.uri) { - const adapter = opts.adapter || /^[^:]*/.exec(opts.uri)[0]; - return new (require(adapters[adapter]))(opts); - } - return new Map(); -}; - -class Keyv extends EventEmitter { - constructor(uri, opts) { - super(); - this.opts = Object.assign( - { namespace: 'keyv' }, - (typeof uri === 'string') ? { uri } : uri, - opts - ); - - if (!this.opts.store) { - const adapterOpts = Object.assign({}, this.opts); - this.opts.store = loadStore(adapterOpts); - } - - if (typeof this.opts.store.on === 'function') { - this.opts.store.on('error', err => this.emit('error', err)); - } - - this.opts.store.namespace = this.opts.namespace; - } - - _getKeyPrefix(key) { - return `${this.opts.namespace}:${key}`; - } - - get(key) { - key = this._getKeyPrefix(key); - const store = this.opts.store; - return Promise.resolve() - .then(() => store.get(key)) - .then(data => { - data = (typeof data === 'string') ? JSONB.parse(data) : data; - if (data === undefined) { - return undefined; - } - if (typeof data.expires === 'number' && Date.now() > data.expires) { - this.delete(key); - return undefined; - } - return data.value; - }); - } - - set(key, value, ttl) { - key = this._getKeyPrefix(key); - if (typeof ttl === 'undefined') { - ttl = this.opts.ttl; - } - if (ttl === 0) { - ttl = undefined; - } - const store = this.opts.store; - - return Promise.resolve() - .then(() => { - const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null; - value = { value, expires }; - return store.set(key, JSONB.stringify(value), ttl); - }) - .then(() => true); - } - - delete(key) { - key = this._getKeyPrefix(key); - const store = this.opts.store; - return Promise.resolve() - .then(() => store.delete(key)); - } - - clear() { - const store = this.opts.store; - return Promise.resolve() - .then(() => store.clear()); - } -} - -module.exports = Keyv; diff --git a/advancedcontentfilter/vendor/npm-asset/lowercase-keys/index.js b/advancedcontentfilter/vendor/npm-asset/lowercase-keys/index.js deleted file mode 100644 index b8d889836..000000000 --- a/advancedcontentfilter/vendor/npm-asset/lowercase-keys/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = function (obj) { - var ret = {}; - var keys = Object.keys(Object(obj)); - - for (var i = 0; i < keys.length; i++) { - ret[keys[i].toLowerCase()] = obj[keys[i]]; - } - - return ret; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/lowercase-keys/package.json b/advancedcontentfilter/vendor/npm-asset/lowercase-keys/package.json deleted file mode 100644 index 7e4e396ff..000000000 --- a/advancedcontentfilter/vendor/npm-asset/lowercase-keys/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "lowercase-keys", - "version": "1.0.0", - "description": "Lowercase the keys of an object", - "license": "MIT", - "repository": "sindresorhus/lowercase-keys", - "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": [ - "object", - "assign", - "extend", - "properties", - "lowercase", - "lower-case", - "case", - "keys", - "key" - ], - "devDependencies": { - "ava": "0.0.4" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/lowercase-keys/readme.md b/advancedcontentfilter/vendor/npm-asset/lowercase-keys/readme.md deleted file mode 100644 index dc65770a3..000000000 --- a/advancedcontentfilter/vendor/npm-asset/lowercase-keys/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# lowercase-keys [![Build Status](https://travis-ci.org/sindresorhus/lowercase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/lowercase-keys) - -> Lowercase the keys of an object - - -## Install - -``` -$ npm install --save lowercase-keys -``` - - -## Usage - -```js -var lowercaseKeys = require('lowercase-keys'); - -lowercaseKeys({FOO: true, bAr: false}); -//=> {foo: true, bar: false} -``` - - -## API - -### lowercaseKeys(object) - -Lowercases the keys and returns a new object. - - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/mimic-response/index.js b/advancedcontentfilter/vendor/npm-asset/mimic-response/index.js deleted file mode 100644 index b8ac76976..000000000 --- a/advancedcontentfilter/vendor/npm-asset/mimic-response/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProps = [ - 'destroy', - 'setTimeout', - 'socket', - 'headers', - 'trailers', - 'rawHeaders', - 'statusCode', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'rawTrailers', - 'statusMessage' -]; - -module.exports = (fromStream, toStream) => { - const toProps = Object.keys(toStream); - const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); - - for (const prop of fromProps) { - // Don't overwrite existing properties - if (toProps.indexOf(prop) !== -1) { - continue; - } - - toStream[prop] = typeof fromStream[prop] === 'function' ? fromStream[prop].bind(fromStream) : fromStream[prop]; - } -}; diff --git a/advancedcontentfilter/vendor/npm-asset/mimic-response/license b/advancedcontentfilter/vendor/npm-asset/mimic-response/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/mimic-response/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/mimic-response/package.json b/advancedcontentfilter/vendor/npm-asset/mimic-response/package.json deleted file mode 100644 index 2ba4434a6..000000000 --- a/advancedcontentfilter/vendor/npm-asset/mimic-response/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "mimic-response", - "version": "1.0.0", - "description": "Mimic a Node.js HTTP response stream", - "license": "MIT", - "repository": "sindresorhus/mimic-response", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "mimic", - "response", - "stream", - "http", - "https", - "request", - "get", - "core" - ], - "devDependencies": { - "ava": "*", - "create-test-server": "^0.1.0", - "pify": "^3.0.0", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/mimic-response/readme.md b/advancedcontentfilter/vendor/npm-asset/mimic-response/readme.md deleted file mode 100644 index e07ec661c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/mimic-response/readme.md +++ /dev/null @@ -1,54 +0,0 @@ -# mimic-response [![Build Status](https://travis-ci.org/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-response) - -> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - - -## Install - -``` -$ npm install mimic-response -``` - - -## Usage - -```js -const stream = require('stream'); -const mimicResponse = require('mimic-response'); - -const responseStream = getHttpResponseStream(); -const myStream = new stream.PassThrough(); - -mimicResponse(responseStream, myStream); - -console.log(myStream.statusCode); -//=> 200 -``` - - -## API - -### mimicResponse(from, to) - -#### from - -Type: `Stream` - -[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -#### to - -Type: `Stream` - -Any stream. - - -## Related - -- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one -- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/normalize-url/index.js b/advancedcontentfilter/vendor/npm-asset/normalize-url/index.js deleted file mode 100644 index 76d150a3b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/normalize-url/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; -const url = require('url'); -const punycode = require('punycode'); -const queryString = require('query-string'); -const prependHttp = require('prepend-http'); -const sortKeys = require('sort-keys'); - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443, - 'ftp:': 21 -}; - -// Protocols that always contain a `//`` bit -const slashedProtocol = { - http: true, - https: true, - ftp: true, - gopher: true, - file: true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true -}; - -function testParameter(name, filters) { - return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); -} - -module.exports = (str, opts) => { - opts = Object.assign({ - normalizeProtocol: true, - normalizeHttps: false, - stripFragment: true, - stripWWW: true, - removeQueryParameters: [/^utm_\w+/i], - removeTrailingSlash: true, - removeDirectoryIndex: false, - sortQueryParameters: true - }, opts); - - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - const hasRelativeProtocol = str.startsWith('//'); - - // Prepend protocol - str = prependHttp(str.trim()).replace(/^\/\//, 'http://'); - - const urlObj = url.parse(str); - - if (opts.normalizeHttps && urlObj.protocol === 'https:') { - urlObj.protocol = 'http:'; - } - - if (!urlObj.hostname && !urlObj.pathname) { - throw new Error('Invalid URL'); - } - - // Prevent these from being used by `url.format` - delete urlObj.host; - delete urlObj.query; - - // Remove fragment - if (opts.stripFragment) { - delete urlObj.hash; - } - - // Remove default port - const port = DEFAULT_PORTS[urlObj.protocol]; - if (Number(urlObj.port) === port) { - delete urlObj.port; - } - - // Remove duplicate slashes - if (urlObj.pathname) { - urlObj.pathname = urlObj.pathname.replace(/\/{2,}/g, '/'); - } - - // Decode URI octets - if (urlObj.pathname) { - urlObj.pathname = decodeURI(urlObj.pathname); - } - - // Remove directory index - if (opts.removeDirectoryIndex === true) { - opts.removeDirectoryIndex = [/^index\.[a-z]+$/]; - } - - if (Array.isArray(opts.removeDirectoryIndex) && opts.removeDirectoryIndex.length > 0) { - let pathComponents = urlObj.pathname.split('/'); - const lastComponent = pathComponents[pathComponents.length - 1]; - - if (testParameter(lastComponent, opts.removeDirectoryIndex)) { - pathComponents = pathComponents.slice(0, pathComponents.length - 1); - urlObj.pathname = pathComponents.slice(1).join('/') + '/'; - } - } - - // Resolve relative paths, but only for slashed protocols - if (slashedProtocol[urlObj.protocol]) { - const domain = urlObj.protocol + '//' + urlObj.hostname; - const relative = url.resolve(domain, urlObj.pathname); - urlObj.pathname = relative.replace(domain, ''); - } - - if (urlObj.hostname) { - // IDN to Unicode - urlObj.hostname = punycode.toUnicode(urlObj.hostname).toLowerCase(); - - // Remove trailing dot - urlObj.hostname = urlObj.hostname.replace(/\.$/, ''); - - // Remove `www.` - if (opts.stripWWW) { - urlObj.hostname = urlObj.hostname.replace(/^www\./, ''); - } - } - - // Remove URL with empty query string - if (urlObj.search === '?') { - delete urlObj.search; - } - - const queryParameters = queryString.parse(urlObj.search); - - // Remove query unwanted parameters - if (Array.isArray(opts.removeQueryParameters)) { - for (const key in queryParameters) { - if (testParameter(key, opts.removeQueryParameters)) { - delete queryParameters[key]; - } - } - } - - // Sort query parameters - if (opts.sortQueryParameters) { - urlObj.search = queryString.stringify(sortKeys(queryParameters)); - } - - // Decode query parameters - if (urlObj.search !== null) { - urlObj.search = decodeURIComponent(urlObj.search); - } - - // Take advantage of many of the Node `url` normalizations - str = url.format(urlObj); - - // Remove ending `/` - if (opts.removeTrailingSlash || urlObj.pathname === '/') { - str = str.replace(/\/$/, ''); - } - - // Restore relative protocol, if applicable - if (hasRelativeProtocol && !opts.normalizeProtocol) { - str = str.replace(/^http:\/\//, '//'); - } - - return str; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/normalize-url/license b/advancedcontentfilter/vendor/npm-asset/normalize-url/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/normalize-url/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/normalize-url/package.json b/advancedcontentfilter/vendor/npm-asset/normalize-url/package.json deleted file mode 100644 index c9d834c5b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/normalize-url/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "normalize-url", - "version": "2.0.1", - "description": "Normalize a URL", - "license": "MIT", - "repository": "sindresorhus/normalize-url", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "normalize", - "url", - "uri", - "address", - "string", - "normalization", - "normalisation", - "query", - "querystring", - "unicode", - "simplify", - "strip", - "trim", - "canonical" - ], - "dependencies": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/normalize-url/readme.md b/advancedcontentfilter/vendor/npm-asset/normalize-url/readme.md deleted file mode 100644 index fceee8a1e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/normalize-url/readme.md +++ /dev/null @@ -1,172 +0,0 @@ -# normalize-url [![Build Status](https://travis-ci.org/sindresorhus/normalize-url.svg?branch=master)](https://travis-ci.org/sindresorhus/normalize-url) - -> [Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL - -Useful when you need to display, store, deduplicate, sort, compare, etc, URLs. - - -## Install - -``` -$ npm install normalize-url -``` - - -## Usage - -```js -const normalizeUrl = require('normalize-url'); - -normalizeUrl('sindresorhus.com'); -//=> 'http://sindresorhus.com' - -normalizeUrl('HTTP://xn--xample-hva.com:80/?b=bar&a=foo'); -//=> 'http://êxample.com/?a=foo&b=bar' -``` - - -## API - -### normalizeUrl(url, [options]) - -#### url - -Type: `string` - -URL to normalize. - -#### options - -Type: `Object` - -##### normalizeProtocol - -Type: `boolean`
-Default: `true` - -Prepend `http:` to the URL if it's protocol-relative. - -```js -normalizeUrl('//sindresorhus.com:80/'); -//=> 'http://sindresorhus.com' - -normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false}); -//=> '//sindresorhus.com' -``` - -##### normalizeHttps - -Type: `boolean`
-Default: `false` - -Normalize `https:` URLs to `http:`. - -```js -normalizeUrl('https://sindresorhus.com:80/'); -//=> 'https://sindresorhus.com' - -normalizeUrl('https://sindresorhus.com:80/', {normalizeHttps: true}); -//=> 'http://sindresorhus.com' -``` - -##### stripFragment - -Type: `boolean`
-Default: `true` - -Remove the fragment at the end of the URL. - -```js -normalizeUrl('sindresorhus.com/about.html#contact'); -//=> 'http://sindresorhus.com/about.html' - -normalizeUrl('sindresorhus.com/about.html#contact', {stripFragment: false}); -//=> 'http://sindresorhus.com/about.html#contact' -``` - -##### stripWWW - -Type: `boolean`
-Default: `true` - -Remove `www.` from the URL. - -```js -normalizeUrl('http://www.sindresorhus.com/about.html#contact'); -//=> 'http://sindresorhus.com/about.html#contact' - -normalizeUrl('http://www.sindresorhus.com/about.html#contact', {stripWWW: false}); -//=> 'http://www.sindresorhus.com/about.html#contact' -``` - -##### removeQueryParameters - -Type: `Array`
-Default: `[/^utm_\w+/i]` - -Remove query parameters that matches any of the provided strings or regexes. - -```js -normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', { - removeQueryParameters: ['ref'] -}); -//=> 'http://sindresorhus.com/?foo=bar' -``` - -##### removeTrailingSlash - -Type: `boolean`
-Default: `true` - -Remove trailing slash. - -**Note:** Trailing slash is always removed if the URL doesn't have a pathname. - -```js -normalizeUrl('http://sindresorhus.com/redirect/'); -//=> 'http://sindresorhus.com/redirect' - -normalizeUrl('http://sindresorhus.com/redirect/', {removeTrailingSlash: false}); -//=> 'http://sindresorhus.com/redirect/' - -normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false}); -//=> 'http://sindresorhus.com' -``` - -##### removeDirectoryIndex - -Type: `boolean` `Array`
-Default: `false` - -Remove the default directory index file from path that matches any of the provided strings or regexes. When `true`, the regex `/^index\.[a-z]+$/` is used. - -```js -normalizeUrl('www.sindresorhus.com/foo/default.php', { - removeDirectoryIndex: [/^default\.[a-z]+$/] -}); -//=> 'http://sindresorhus.com/foo' -``` - -##### sortQueryParameters - -Type: `boolean`
-Default: `true` - -Sort the query parameters alphabetically by key. - -```js -normalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', { - sortQueryParameters: false -}); -//=> 'http://sindresorhus.com/?b=two&a=one&c=three' -``` - - -## Related - -- [compare-urls](https://github.com/sindresorhus/compare-urls) - Compare URLs by first normalizing them - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/object-assign/index.js b/advancedcontentfilter/vendor/npm-asset/object-assign/index.js deleted file mode 100644 index 0930cf889..000000000 --- a/advancedcontentfilter/vendor/npm-asset/object-assign/index.js +++ /dev/null @@ -1,90 +0,0 @@ -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - -'use strict'; -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/object-assign/license b/advancedcontentfilter/vendor/npm-asset/object-assign/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/object-assign/license +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/object-assign/package.json b/advancedcontentfilter/vendor/npm-asset/object-assign/package.json deleted file mode 100644 index 503eb1e6d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/object-assign/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "object-assign", - "version": "4.1.1", - "description": "ES2015 `Object.assign()` ponyfill", - "license": "MIT", - "repository": "sindresorhus/object-assign", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava", - "bench": "matcha bench.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "object", - "assign", - "extend", - "properties", - "es2015", - "ecmascript", - "harmony", - "ponyfill", - "prollyfill", - "polyfill", - "shim", - "browser" - ], - "devDependencies": { - "ava": "^0.16.0", - "lodash": "^4.16.4", - "matcha": "^0.7.0", - "xo": "^0.16.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/object-assign/readme.md b/advancedcontentfilter/vendor/npm-asset/object-assign/readme.md deleted file mode 100644 index 1be09d35c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/object-assign/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) - -> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com) - - -## Use the built-in - -Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), -support `Object.assign()` :tada:. If you target only those environments, then by all -means, use `Object.assign()` instead of this package. - - -## Install - -``` -$ npm install --save object-assign -``` - - -## Usage - -```js -const objectAssign = require('object-assign'); - -objectAssign({foo: 0}, {bar: 1}); -//=> {foo: 0, bar: 1} - -// multiple sources -objectAssign({foo: 0}, {bar: 1}, {baz: 2}); -//=> {foo: 0, bar: 1, baz: 2} - -// overwrites equal keys -objectAssign({foo: 0}, {foo: 1}, {foo: 2}); -//=> {foo: 2} - -// ignores null and undefined sources -objectAssign({foo: 0}, null, {bar: 1}, undefined); -//=> {foo: 0, bar: 1} -``` - - -## API - -### objectAssign(target, [source, ...]) - -Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. - - -## Resources - -- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) - - -## Related - -- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/p-cancelable/index.js b/advancedcontentfilter/vendor/npm-asset/p-cancelable/index.js deleted file mode 100644 index cdd0cfa82..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-cancelable/index.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -class CancelError extends Error { - constructor() { - super('Promise was canceled'); - this.name = 'CancelError'; - } - - get isCanceled() { - return true; - } -} - -class PCancelable { - static fn(userFn) { - return function () { - const args = [].slice.apply(arguments); - return new PCancelable((resolve, reject, onCancel) => { - args.push(onCancel); - userFn.apply(null, args).then(resolve, reject); - }); - }; - } - - constructor(executor) { - this._cancelHandlers = []; - this._isPending = true; - this._isCanceled = false; - - this._promise = new Promise((resolve, reject) => { - this._reject = reject; - - return executor( - value => { - this._isPending = false; - resolve(value); - }, - error => { - this._isPending = false; - reject(error); - }, - handler => { - this._cancelHandlers.push(handler); - } - ); - }); - } - - then(onFulfilled, onRejected) { - return this._promise.then(onFulfilled, onRejected); - } - - catch(onRejected) { - return this._promise.catch(onRejected); - } - - finally(onFinally) { - return this._promise.finally(onFinally); - } - - cancel() { - if (!this._isPending || this._isCanceled) { - return; - } - - if (this._cancelHandlers.length > 0) { - try { - for (const handler of this._cancelHandlers) { - handler(); - } - } catch (err) { - this._reject(err); - } - } - - this._isCanceled = true; - this._reject(new CancelError()); - } - - get isCanceled() { - return this._isCanceled; - } -} - -Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); - -module.exports = PCancelable; -module.exports.CancelError = CancelError; diff --git a/advancedcontentfilter/vendor/npm-asset/p-cancelable/license b/advancedcontentfilter/vendor/npm-asset/p-cancelable/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-cancelable/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/p-cancelable/package.json b/advancedcontentfilter/vendor/npm-asset/p-cancelable/package.json deleted file mode 100644 index c17dff858..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-cancelable/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "p-cancelable", - "version": "0.4.1", - "description": "Create a promise that can be canceled", - "license": "MIT", - "repository": "sindresorhus/p-cancelable", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "cancelable", - "cancel", - "canceled", - "canceling", - "cancellable", - "cancellation", - "abort", - "abortable", - "aborting", - "cleanup", - "task", - "token", - "async", - "function", - "await", - "promises", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "promise.prototype.finally": "^3.1.0", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/p-cancelable/readme.md b/advancedcontentfilter/vendor/npm-asset/p-cancelable/readme.md deleted file mode 100644 index 62ec32ee4..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-cancelable/readme.md +++ /dev/null @@ -1,135 +0,0 @@ -# p-cancelable [![Build Status](https://travis-ci.org/sindresorhus/p-cancelable.svg?branch=master)](https://travis-ci.org/sindresorhus/p-cancelable) - -> Create a promise that can be canceled - -Useful for animation, loading resources, long-running async computations, async iteration, etc. - - -## Install - -``` -$ npm install p-cancelable -``` - - -## Usage - -```js -const PCancelable = require('p-cancelable'); - -const cancelablePromise = new PCancelable((resolve, reject, onCancel) => { - const worker = new SomeLongRunningOperation(); - - onCancel(() => { - worker.close(); - }); - - worker.on('finish', resolve); - worker.on('error', reject); -}); - -cancelablePromise - .then(value => { - console.log('Operation finished successfully:', value); - }) - .catch(error => { - if (cancelablePromise.isCanceled) { - // Handle the cancelation here - console.log('Operation was canceled'); - return; - } - - throw error; - }); - -// Cancel the operation after 10 seconds -setTimeout(() => { - cancelablePromise.cancel(); -}, 10000); -``` - - -## API - -### new PCancelable(executor) - -Same as the [`Promise` constructor](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), but with an appended `onCancel` parameter in `executor`. - -`PCancelable` is a subclass of `Promise`. - -#### onCanceled(fn) - -Type: `Function` - -Accepts a function that is called when the promise is canceled. - -You're not required to call this function. You can call this function multiple times to add multiple cancel handlers. - -### PCancelable#cancel() - -Type: `Function` - -Cancel the promise. - -The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing. - -### PCancelable#isCanceled - -Type: `boolean` - -Whether the promise is canceled. - -### PCancelable.CancelError - -Type: `Error` - -Rejection reason when `.cancel()` is called. - -It includes a `.isCanceled` property for convenience. - -### PCancelable.fn(fn) - -Convenience method to make your promise-returning or async function cancelable. - -The function you specify will have `onCancel` appended to its parameters. - -```js -const fn = PCancelable.fn((input, onCancel) => { - const job = new Job(); - - onCancel(() => { - job.cleanup(); - }); - - return job.start(); //=> Promise -}); - -const promise = fn('input'); //=> PCancelable - -// … - -promise.cancel(); -``` - - -## FAQ - -### Cancelable vs. Cancellable - -[In American English, the verb cancel is usually inflected canceled and canceling—with one l.](http://grammarist.com/spelling/cancel/)
Both a [browser API](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable) and the [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises) use this spelling. - -### What about the official [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises)? - -~~It's still an early draft and I don't really like its current direction. It complicates everything and will require deep changes in the ecosystem to adapt to it. And the way you have to use cancel tokens is verbose and convoluted. I much prefer the more pragmatic and less invasive approach in this module.~~ The proposal was withdrawn. - - -## Related - -- [p-progress](https://github.com/sindresorhus/p-progress) - Create a promise that reports progress -- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise that defers execution until `.then()` or `.catch()` is called -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/p-finally/index.js b/advancedcontentfilter/vendor/npm-asset/p-finally/index.js deleted file mode 100644 index 52b7b49c5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-finally/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -module.exports = (promise, onFinally) => { - onFinally = onFinally || (() => {}); - - return promise.then( - val => new Promise(resolve => { - resolve(onFinally()); - }).then(() => val), - err => new Promise(resolve => { - resolve(onFinally()); - }).then(() => { - throw err; - }) - ); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/p-finally/license b/advancedcontentfilter/vendor/npm-asset/p-finally/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-finally/license +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/p-finally/package.json b/advancedcontentfilter/vendor/npm-asset/p-finally/package.json deleted file mode 100644 index b26ab5188..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-finally/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "p-finally", - "version": "1.0.0", - "description": "`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome", - "license": "MIT", - "repository": "sindresorhus/p-finally", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "finally", - "handler", - "function", - "async", - "await", - "promises", - "settled", - "ponyfill", - "polyfill", - "shim", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/p-finally/readme.md b/advancedcontentfilter/vendor/npm-asset/p-finally/readme.md deleted file mode 100644 index 09ef36416..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-finally/readme.md +++ /dev/null @@ -1,47 +0,0 @@ -# p-finally [![Build Status](https://travis-ci.org/sindresorhus/p-finally.svg?branch=master)](https://travis-ci.org/sindresorhus/p-finally) - -> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome - -Useful for cleanup. - - -## Install - -``` -$ npm install --save p-finally -``` - - -## Usage - -```js -const pFinally = require('p-finally'); - -const dir = createTempDir(); - -pFinally(write(dir), () => cleanup(dir)); -``` - - -## API - -### pFinally(promise, [onFinally]) - -Returns a `Promise`. - -#### onFinally - -Type: `Function` - -Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason. - - -## Related - -- [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/p-is-promise/index.js b/advancedcontentfilter/vendor/npm-asset/p-is-promise/index.js deleted file mode 100644 index 8f64f8580..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-is-promise/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -module.exports = x => ( - x instanceof Promise || - ( - x !== null && - typeof x === 'object' && - typeof x.then === 'function' && - typeof x.catch === 'function' - ) -); diff --git a/advancedcontentfilter/vendor/npm-asset/p-is-promise/license b/advancedcontentfilter/vendor/npm-asset/p-is-promise/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-is-promise/license +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/p-is-promise/package.json b/advancedcontentfilter/vendor/npm-asset/p-is-promise/package.json deleted file mode 100644 index 45b9b447d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-is-promise/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "p-is-promise", - "version": "1.1.0", - "description": "Check if something is a promise", - "license": "MIT", - "repository": "sindresorhus/p-is-promise", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "is", - "detect", - "check", - "kind", - "type", - "thenable", - "es2015", - "async", - "await", - "promises", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "bluebird": "^3.4.6", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/p-is-promise/readme.md b/advancedcontentfilter/vendor/npm-asset/p-is-promise/readme.md deleted file mode 100644 index 15edbf2de..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-is-promise/readme.md +++ /dev/null @@ -1,43 +0,0 @@ -# p-is-promise [![Build Status](https://travis-ci.org/sindresorhus/p-is-promise.svg?branch=master)](https://travis-ci.org/sindresorhus/p-is-promise) - -> Check if something is a promise - -Why not [`is-promise`](https://github.com/then/is-promise)? That module [checks for a thenable](https://github.com/then/is-promise/issues/6), not an ES2015 promise. This one is stricter. - -You most likely don't need this. Just pass your value to `Promise.resolve()` and let it handle it. - -Can be useful if you need to create a fast path for a synchronous operation. - - -## Install - -``` -$ npm install --save p-is-promise -``` - - -## Usage - -```js -const pIsPromise = require('p-is-promise'); -const Bluebird = require('bluebird'); - -pIsPromise(Promise.resolve('🦄')); -//=> true - -pIsPromise(Bluebird.resolve('🦄')); -//=> true - -pIsPromise('🦄'); -//=> false -``` - - -## Related - -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/p-timeout/index.js b/advancedcontentfilter/vendor/npm-asset/p-timeout/index.js deleted file mode 100644 index 8393646a8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-timeout/index.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; -const pFinally = require('p-finally'); - -class TimeoutError extends Error { - constructor(message) { - super(message); - this.name = 'TimeoutError'; - } -} - -module.exports = (promise, ms, fallback) => new Promise((resolve, reject) => { - if (typeof ms !== 'number' || ms < 0) { - throw new TypeError('Expected `ms` to be a positive number'); - } - - const timer = setTimeout(() => { - if (typeof fallback === 'function') { - try { - resolve(fallback()); - } catch (err) { - reject(err); - } - return; - } - - const message = typeof fallback === 'string' ? fallback : `Promise timed out after ${ms} milliseconds`; - const err = fallback instanceof Error ? fallback : new TimeoutError(message); - - if (typeof promise.cancel === 'function') { - promise.cancel(); - } - - reject(err); - }, ms); - - pFinally( - promise.then(resolve, reject), - () => { - clearTimeout(timer); - } - ); -}); - -module.exports.TimeoutError = TimeoutError; diff --git a/advancedcontentfilter/vendor/npm-asset/p-timeout/license b/advancedcontentfilter/vendor/npm-asset/p-timeout/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-timeout/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/p-timeout/package.json b/advancedcontentfilter/vendor/npm-asset/p-timeout/package.json deleted file mode 100644 index 48cb322d3..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-timeout/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "p-timeout", - "version": "2.0.1", - "description": "Timeout a promise after a specified amount of time", - "license": "MIT", - "repository": "sindresorhus/p-timeout", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "timeout", - "error", - "invalidate", - "async", - "await", - "promises", - "time", - "out", - "cancel", - "bluebird" - ], - "dependencies": { - "p-finally": "^1.0.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "p-cancelable": "^0.3.0", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/p-timeout/readme.md b/advancedcontentfilter/vendor/npm-asset/p-timeout/readme.md deleted file mode 100644 index 94ff3e391..000000000 --- a/advancedcontentfilter/vendor/npm-asset/p-timeout/readme.md +++ /dev/null @@ -1,89 +0,0 @@ -# p-timeout [![Build Status](https://travis-ci.org/sindresorhus/p-timeout.svg?branch=master)](https://travis-ci.org/sindresorhus/p-timeout) - -> Timeout a promise after a specified amount of time - - -## Install - -``` -$ npm install p-timeout -``` - - -## Usage - -```js -const delay = require('delay'); -const pTimeout = require('p-timeout'); - -const delayedPromise = delay(200); - -pTimeout(delayedPromise, 50).then(() => 'foo'); -//=> [TimeoutError: Promise timed out after 50 milliseconds] -``` - - -## API - -### pTimeout(input, ms, [message | fallback]) - -Returns a decorated `input` that times out after `ms` time. - -If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out. - -#### input - -Type: `Promise` - -Promise to decorate. - -#### ms - -Type: `number` - -Milliseconds before timing out. - -#### message - -Type: `string` `Error`
-Default: `'Promise timed out after 50 milliseconds'` - -Specify a custom error message or error. - -If you do a custom error, it's recommended to sub-class `pTimeout.TimeoutError`. - -#### fallback - -Type: `Function` - -Do something other than rejecting with an error on timeout. - -You could for example retry: - -```js -const delay = require('delay'); -const pTimeout = require('p-timeout'); - -const delayedPromise = () => delay(200); - -pTimeout(delayedPromise(), 50, () => { - return pTimeout(delayedPromise(), 300); -}); -``` - -### pTimeout.TimeoutError - -Exposed for instance checking and sub-classing. - - -## Related - -- [delay](https://github.com/sindresorhus/delay) - Delay a promise a specified amount of time -- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay a promise a minimum amount of time -- [p-retry](https://github.com/sindresorhus/p-retry) - Retry a promise-returning function -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/pify/index.js b/advancedcontentfilter/vendor/npm-asset/pify/index.js deleted file mode 100644 index 1dee43ad0..000000000 --- a/advancedcontentfilter/vendor/npm-asset/pify/index.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -const processFn = (fn, opts) => function () { - const P = opts.promiseModule; - const args = new Array(arguments.length); - - for (let i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - - return new P((resolve, reject) => { - if (opts.errorFirst) { - args.push(function (err, result) { - if (opts.multiArgs) { - const results = new Array(arguments.length - 1); - - for (let i = 1; i < arguments.length; i++) { - results[i - 1] = arguments[i]; - } - - if (err) { - results.unshift(err); - reject(results); - } else { - resolve(results); - } - } else if (err) { - reject(err); - } else { - resolve(result); - } - }); - } else { - args.push(function (result) { - if (opts.multiArgs) { - const results = new Array(arguments.length - 1); - - for (let i = 0; i < arguments.length; i++) { - results[i] = arguments[i]; - } - - resolve(results); - } else { - resolve(result); - } - }); - } - - fn.apply(this, args); - }); -}; - -module.exports = (obj, opts) => { - opts = Object.assign({ - exclude: [/.+(Sync|Stream)$/], - errorFirst: true, - promiseModule: Promise - }, opts); - - const filter = key => { - const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); - return opts.include ? opts.include.some(match) : !opts.exclude.some(match); - }; - - let ret; - if (typeof obj === 'function') { - ret = function () { - if (opts.excludeMain) { - return obj.apply(this, arguments); - } - - return processFn(obj, opts).apply(this, arguments); - }; - } else { - ret = Object.create(Object.getPrototypeOf(obj)); - } - - for (const key in obj) { // eslint-disable-line guard-for-in - const x = obj[key]; - ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; - } - - return ret; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/pify/license b/advancedcontentfilter/vendor/npm-asset/pify/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/pify/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/pify/package.json b/advancedcontentfilter/vendor/npm-asset/pify/package.json deleted file mode 100644 index 468d85760..000000000 --- a/advancedcontentfilter/vendor/npm-asset/pify/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "pify", - "version": "3.0.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": ">=4" - }, - "scripts": { - "test": "xo && ava && npm run optimization-test", - "optimization-test": "node --allow-natives-syntax optimization-test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "promises", - "promisify", - "all", - "denodify", - "denodeify", - "callback", - "cb", - "node", - "then", - "thenify", - "convert", - "transform", - "wrap", - "wrapper", - "bind", - "to", - "async", - "await", - "es2015", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "pinkie-promise": "^2.0.0", - "v8-natives": "^1.0.0", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/pify/readme.md b/advancedcontentfilter/vendor/npm-asset/pify/readme.md deleted file mode 100644 index 376ca4e59..000000000 --- a/advancedcontentfilter/vendor/npm-asset/pify/readme.md +++ /dev/null @@ -1,131 +0,0 @@ -# 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' -}); - -// Promisify all methods in a module -pify(fs).readFile('package.json', 'utf8').then(data => { - console.log(JSON.parse(data).name); - //=> 'pify' -}); -``` - - -## API - -### pify(input, [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. - -#### 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. This also applies to rejections, where it returns an array of all the callback arguments, including the error. - -```js -const request = require('request'); -const pify = require('pify'); - -pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { - const [httpResponse, body] = result; -}); -``` - -##### include - -Type: `string[]` `RegExp[]` - -Methods in a module to promisify. Remaining methods will be left untouched. - -##### exclude - -Type: `string[]` `RegExp[]`
-Default: `[/.+(Sync|Stream)$/]` - -Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. - -##### excludeMain - -Type: `boolean`
-Default: `false` - -If given module is a function itself, it 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(null, data); - }); -}; - -// Promisify methods but not `fn()` -const promiseFn = pify(fn, {excludeMain: true}); - -if (promiseFn()) { - promiseFn.method('hi').then(data => { - console.log(data); - }); -} -``` - -##### errorFirst - -Type: `boolean`
-Default: `true` - -Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc. - -##### 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. - - -## Related - -- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted -- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/prepend-http/index.js b/advancedcontentfilter/vendor/npm-asset/prepend-http/index.js deleted file mode 100644 index 82b3a6b27..000000000 --- a/advancedcontentfilter/vendor/npm-asset/prepend-http/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -module.exports = (url, opts) => { - if (typeof url !== 'string') { - throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof url}\``); - } - - url = url.trim(); - opts = Object.assign({https: false}, opts); - - if (/^\.*\/|^(?!localhost)\w+:/.test(url)) { - return url; - } - - return url.replace(/^(?!(?:\w+:)?\/\/)/, opts.https ? 'https://' : 'http://'); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/prepend-http/license b/advancedcontentfilter/vendor/npm-asset/prepend-http/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/prepend-http/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/prepend-http/package.json b/advancedcontentfilter/vendor/npm-asset/prepend-http/package.json deleted file mode 100644 index cbfac0227..000000000 --- a/advancedcontentfilter/vendor/npm-asset/prepend-http/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "prepend-http", - "version": "2.0.0", - "description": "Prepend `http://` to humanized URLs like todomvc.com and localhost", - "license": "MIT", - "repository": "sindresorhus/prepend-http", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "prepend", - "protocol", - "scheme", - "url", - "uri", - "http", - "https", - "humanized" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/prepend-http/readme.md b/advancedcontentfilter/vendor/npm-asset/prepend-http/readme.md deleted file mode 100644 index 55d640df6..000000000 --- a/advancedcontentfilter/vendor/npm-asset/prepend-http/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# prepend-http [![Build Status](https://travis-ci.org/sindresorhus/prepend-http.svg?branch=master)](https://travis-ci.org/sindresorhus/prepend-http) - -> Prepend `http://` to humanized URLs like `todomvc.com` and `localhost` - - -## Install - -``` -$ npm install prepend-http -``` - - -## Usage - -```js -const prependHttp = require('prepend-http'); - -prependHttp('todomvc.com'); -//=> 'http://todomvc.com' - -prependHttp('localhost'); -//=> 'http://localhost' - -prependHttp('http://todomvc.com'); -//=> 'http://todomvc.com' - -prependHttp('todomvc.com', {https: true}); -//=> 'https://todomvc.com' -``` - - -## API - -### prependHttp(url, [options]) - -#### url - -Type: `string` - -URL to prepend `http://` on. - -#### options - -Type: `Object` - -##### https - -Type: `boolean`
-Default: `false` - -Prepend `https://` instead of `http://`. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/process-nextick-args/index.js b/advancedcontentfilter/vendor/npm-asset/process-nextick-args/index.js deleted file mode 100644 index 5f585e8e7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/process-nextick-args/index.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -if (!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/advancedcontentfilter/vendor/npm-asset/process-nextick-args/license.md b/advancedcontentfilter/vendor/npm-asset/process-nextick-args/license.md deleted file mode 100644 index c67e3532b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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/advancedcontentfilter/vendor/npm-asset/process-nextick-args/package.json b/advancedcontentfilter/vendor/npm-asset/process-nextick-args/package.json deleted file mode 100644 index 42c5b6794..000000000 --- a/advancedcontentfilter/vendor/npm-asset/process-nextick-args/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "process-nextick-args", - "version": "2.0.0", - "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/advancedcontentfilter/vendor/npm-asset/process-nextick-args/readme.md b/advancedcontentfilter/vendor/npm-asset/process-nextick-args/readme.md deleted file mode 100644 index ecb432c9b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/query-string/index.js b/advancedcontentfilter/vendor/npm-asset/query-string/index.js deleted file mode 100644 index 10f156a43..000000000 --- a/advancedcontentfilter/vendor/npm-asset/query-string/index.js +++ /dev/null @@ -1,224 +0,0 @@ -'use strict'; -var strictUriEncode = require('strict-uri-encode'); -var objectAssign = require('object-assign'); -var decodeComponent = require('decode-uri-component'); - -function encoderForArrayFormat(opts) { - switch (opts.arrayFormat) { - case 'index': - return function (key, value, index) { - return value === null ? [ - encode(key, opts), - '[', - index, - ']' - ].join('') : [ - encode(key, opts), - '[', - encode(index, opts), - ']=', - encode(value, opts) - ].join(''); - }; - - case 'bracket': - return function (key, value) { - return value === null ? encode(key, opts) : [ - encode(key, opts), - '[]=', - encode(value, opts) - ].join(''); - }; - - default: - return function (key, value) { - return value === null ? encode(key, opts) : [ - encode(key, opts), - '=', - encode(value, opts) - ].join(''); - }; - } -} - -function parserForArrayFormat(opts) { - var result; - - switch (opts.arrayFormat) { - case 'index': - return function (key, value, accumulator) { - result = /\[(\d*)\]$/.exec(key); - - key = key.replace(/\[\d*\]$/, ''); - - if (!result) { - accumulator[key] = value; - return; - } - - if (accumulator[key] === undefined) { - accumulator[key] = {}; - } - - accumulator[key][result[1]] = value; - }; - - case 'bracket': - return function (key, value, accumulator) { - result = /(\[\])$/.exec(key); - key = key.replace(/\[\]$/, ''); - - if (!result) { - accumulator[key] = value; - return; - } else if (accumulator[key] === undefined) { - accumulator[key] = [value]; - return; - } - - accumulator[key] = [].concat(accumulator[key], value); - }; - - default: - return function (key, value, accumulator) { - if (accumulator[key] === undefined) { - accumulator[key] = value; - return; - } - - accumulator[key] = [].concat(accumulator[key], value); - }; - } -} - -function encode(value, opts) { - if (opts.encode) { - return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); - } - - return value; -} - -function keysSorter(input) { - if (Array.isArray(input)) { - return input.sort(); - } else if (typeof input === 'object') { - return keysSorter(Object.keys(input)).sort(function (a, b) { - return Number(a) - Number(b); - }).map(function (key) { - return input[key]; - }); - } - - return input; -} - -function extract(str) { - var queryStart = str.indexOf('?'); - if (queryStart === -1) { - return ''; - } - return str.slice(queryStart + 1); -} - -function parse(str, opts) { - opts = objectAssign({arrayFormat: 'none'}, opts); - - var formatter = parserForArrayFormat(opts); - - // Create an object with no prototype - // https://github.com/sindresorhus/query-string/issues/47 - var ret = Object.create(null); - - if (typeof str !== 'string') { - return ret; - } - - str = str.trim().replace(/^[?#&]/, ''); - - if (!str) { - return ret; - } - - str.split('&').forEach(function (param) { - var parts = param.replace(/\+/g, ' ').split('='); - // Firefox (pre 40) decodes `%3D` to `=` - // https://github.com/sindresorhus/query-string/pull/37 - var key = parts.shift(); - var val = parts.length > 0 ? parts.join('=') : undefined; - - // missing `=` should be `null`: - // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters - val = val === undefined ? null : decodeComponent(val); - - formatter(decodeComponent(key), val, ret); - }); - - return Object.keys(ret).sort().reduce(function (result, key) { - var val = ret[key]; - if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { - // Sort object keys, not values - result[key] = keysSorter(val); - } else { - result[key] = val; - } - - return result; - }, Object.create(null)); -} - -exports.extract = extract; -exports.parse = parse; - -exports.stringify = function (obj, opts) { - var defaults = { - encode: true, - strict: true, - arrayFormat: 'none' - }; - - opts = objectAssign(defaults, opts); - - if (opts.sort === false) { - opts.sort = function () {}; - } - - var formatter = encoderForArrayFormat(opts); - - return obj ? Object.keys(obj).sort(opts.sort).map(function (key) { - var val = obj[key]; - - if (val === undefined) { - return ''; - } - - if (val === null) { - return encode(key, opts); - } - - if (Array.isArray(val)) { - var result = []; - - val.slice().forEach(function (val2) { - if (val2 === undefined) { - return; - } - - result.push(formatter(key, val2, result.length)); - }); - - return result.join('&'); - } - - return encode(key, opts) + '=' + encode(val, opts); - }).filter(function (x) { - return x.length > 0; - }).join('&') : ''; -}; - -exports.parseUrl = function (str, opts) { - return { - url: str.split('?')[0] || '', - query: parse(extract(str), opts) - }; -}; diff --git a/advancedcontentfilter/vendor/npm-asset/query-string/license b/advancedcontentfilter/vendor/npm-asset/query-string/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/query-string/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/query-string/package.json b/advancedcontentfilter/vendor/npm-asset/query-string/package.json deleted file mode 100644 index 2de4bd3dc..000000000 --- a/advancedcontentfilter/vendor/npm-asset/query-string/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "query-string", - "version": "5.1.1", - "description": "Parse and stringify URL query strings", - "license": "MIT", - "repository": "sindresorhus/query-string", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "browser", - "querystring", - "query", - "string", - "qs", - "param", - "parameter", - "url", - "uri", - "parse", - "stringify", - "encode", - "decode" - ], - "dependencies": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - }, - "devDependencies": { - "ava": "^0.17.0", - "xo": "^0.16.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/query-string/readme.md b/advancedcontentfilter/vendor/npm-asset/query-string/readme.md deleted file mode 100644 index c9273eae0..000000000 --- a/advancedcontentfilter/vendor/npm-asset/query-string/readme.md +++ /dev/null @@ -1,224 +0,0 @@ -# query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string) - -> Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string) - ---- - -

🔥 Want to strengthen your core JavaScript skills and master ES6?
I would personally recommend this awesome ES6 course by Wes Bos.
Also check out his Node.js, React, Sublime courses.

- ---- - - -## Install - -``` -$ npm install query-string -``` - - - - - - -## Usage - -```js -const queryString = require('query-string'); - -console.log(location.search); -//=> '?foo=bar' - -const parsed = queryString.parse(location.search); -console.log(parsed); -//=> {foo: 'bar'} - -console.log(location.hash); -//=> '#token=bada55cafe' - -const parsedHash = queryString.parse(location.hash); -console.log(parsedHash); -//=> {token: 'bada55cafe'} - -parsed.foo = 'unicorn'; -parsed.ilike = 'pizza'; - -const stringified = queryString.stringify(parsed); -//=> 'foo=unicorn&ilike=pizza' - -location.search = stringified; -// note that `location.search` automatically prepends a question mark -console.log(location.search); -//=> '?foo=unicorn&ilike=pizza' -``` - - -## API - -### .parse(*string*, *[options]*) - -Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. - -The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. - -URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). - -#### arrayFormat - -Type: `string`
-Default: `'none'` - -Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. - -- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: - -```js -queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); -//=> foo: [1,2,3] -``` - -- `index`: stands for parsing taking the index into account, such as: - -```js -queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); -//=> foo: [1,2,3] -``` - -- `none`: is the **default** option and removes any bracket representation, such as: - -```js -queryString.parse('foo=1&foo=2&foo=3'); -//=> foo: [1,2,3] -``` - -### .stringify(*object*, *[options]*) - -Stringify an object into a query string, sorting the keys. - -#### strict - -Type: `boolean`
-Default: `true` - -Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) -if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. - -#### encode - -Type: `boolean`
-Default: `true` - -[URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. - -#### arrayFormat - -Type: `string`
-Default: `'none'` - -Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. - -- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: - -```js -queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'bracket'}); -// => foo[]=1&foo[]=2&foo[]=3 -``` - -- `index`: stands for parsing taking the index into account, such as: - -```js -queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'index'}); -// => foo[0]=1&foo[1]=2&foo[3]=3 -``` - -- `none`: is the __default__ option and removes any bracket representation, such as: - -```js -queryString.stringify({foo: [1,2,3]}); -// => foo=1&foo=2&foo=3 -``` - -#### sort - -Type: `Function` `boolean` - -Supports both `Function` as a custom sorting function or `false` to disable sorting. - -```js -const order = ['c', 'a', 'b']; -queryString.stringify({ a: 1, b: 2, c: 3}, { - sort: (m, n) => order.indexOf(m) >= order.indexOf(n) -}); -// => 'c=3&a=1&b=2' -``` - -```js -queryString.stringify({ b: 1, c: 2, a: 3}, {sort: false}); -// => 'c=3&a=1&b=2' -``` - -If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. - -### .extract(*string*) - -Extract a query string from a URL that can be passed into `.parse()`. - -### .parseUrl(*string*, *[options]*) - -Extract the URL and the query string as an object. - -The `options` are the same as for `.parse()`. - -Returns an object with a `url` and `query` property. - -```js -queryString.parseUrl('https://foo.bar?foo=bar'); -//=> {url: 'https://foo.bar', query: {foo: 'bar'}} -``` - - -## Nesting - -This module intentionally doesn't support nesting as it's not spec'd and varies between implementations, which causes a lot of [edge cases](https://github.com/visionmedia/node-querystring/issues). - -You're much better off just converting the object to a JSON string: - -```js -queryString.stringify({ - foo: 'bar', - nested: JSON.stringify({ - unicorn: 'cake' - }) -}); -//=> 'foo=bar&nested=%7B%22unicorn%22%3A%22cake%22%7D' -``` - -However, there is support for multiple instances of the same key: - -```js -queryString.parse('likes=cake&name=bob&likes=icecream'); -//=> {likes: ['cake', 'icecream'], name: 'bob'} - -queryString.stringify({color: ['taupe', 'chartreuse'], id: '515'}); -//=> 'color=chartreuse&color=taupe&id=515' -``` - - -## Falsy values - -Sometimes you want to unset a key, or maybe just make it present without assigning a value to it. Here is how falsy values are stringified: - -```js -queryString.stringify({foo: false}); -//=> 'foo=false' - -queryString.stringify({foo: null}); -//=> 'foo' - -queryString.stringify({foo: undefined}); -//=> '' -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/.travis.yml b/advancedcontentfilter/vendor/npm-asset/readable-stream/.travis.yml deleted file mode 100644 index 40992555b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/CONTRIBUTING.md b/advancedcontentfilter/vendor/npm-asset/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58dc..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# 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/advancedcontentfilter/vendor/npm-asset/readable-stream/GOVERNANCE.md b/advancedcontentfilter/vendor/npm-asset/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f2..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### 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/advancedcontentfilter/vendor/npm-asset/readable-stream/LICENSE b/advancedcontentfilter/vendor/npm-asset/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/readable-stream/README.md b/advancedcontentfilter/vendor/npm-asset/readable-stream/README.md deleted file mode 100644 index 23fe3f3e3..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/doc/wg-meetings/2015-01-30.md b/advancedcontentfilter/vendor/npm-asset/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f192..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# 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/advancedcontentfilter/vendor/npm-asset/readable-stream/duplex-browser.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/duplex.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/duplex.js deleted file mode 100644 index 46924cbfd..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_duplex.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a1ca813e5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_passthrough.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index a9c835884..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_readable.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_readable.js deleted file mode 100644 index bf34ac65e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_transform.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 5d1f8b876..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_writable.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b3f4e85a2..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/BufferList.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/destroy.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream-browser.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fda..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/package.json b/advancedcontentfilter/vendor/npm-asset/readable-stream/package.json deleted file mode 100644 index dbb1da6be..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "readable-stream", - "version": "2.3.6", - "description": "Streams3, a user-land copy of the stream library from Node.js", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "scripts": { - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "license": "MIT" -} diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/passthrough.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/readable-browser.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/readable-browser.js deleted file mode 100644 index e50372592..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/readable-stream/readable.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/readable.js deleted file mode 100644 index ec89ec533..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/readable-stream/transform.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/transform.js deleted file mode 100644 index b1baba26d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/writable-browser.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a85..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/advancedcontentfilter/vendor/npm-asset/readable-stream/writable.js b/advancedcontentfilter/vendor/npm-asset/readable-stream/writable.js deleted file mode 100644 index 3211a6f80..000000000 --- a/advancedcontentfilter/vendor/npm-asset/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/responselike/LICENSE b/advancedcontentfilter/vendor/npm-asset/responselike/LICENSE deleted file mode 100644 index 8829a001a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/responselike/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 Luke Childs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/responselike/README.md b/advancedcontentfilter/vendor/npm-asset/responselike/README.md deleted file mode 100644 index 6361931c1..000000000 --- a/advancedcontentfilter/vendor/npm-asset/responselike/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# responselike - -> A response-like object for mocking a Node.js HTTP response stream - -[![Build Status](https://travis-ci.org/lukechilds/responselike.svg?branch=master)](https://travis-ci.org/lukechilds/responselike) -[![Coverage Status](https://coveralls.io/repos/github/lukechilds/responselike/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/responselike?branch=master) -[![npm](https://img.shields.io/npm/dm/responselike.svg)](https://www.npmjs.com/package/responselike) -[![npm](https://img.shields.io/npm/v/responselike.svg)](https://www.npmjs.com/package/responselike) - -Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage). Useful for formatting cached responses so they can be consumed by code expecting a real response. - -## Install - -```shell -npm install --save responselike -``` - -Or if you're just using for testing you'll want: - -```shell -npm install --save-dev responselike -``` - -## Usage - -```js -const Response = require('responselike'); - -const response = new Response(200, { foo: 'bar' }, Buffer.from('Hi!'), 'https://example.com'); - -response.statusCode; -// 200 -response.headers; -// { foo: 'bar' } -response.body; -// -response.url; -// 'https://example.com' - -response.pipe(process.stdout); -// Hi! -``` - - -## API - -### new Response(statusCode, headers, body, url) - -Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage). - -#### statusCode - -Type: `number` - -HTTP response status code. - -#### headers - -Type: `object` - -HTTP headers object. Keys will be automatically lowercased. - -#### body - -Type: `buffer` - -A Buffer containing the response body. The Buffer contents will be streamable but is also exposed directly as `response.body`. - -#### url - -Type: `string` - -Request URL string. - -## License - -MIT © Luke Childs diff --git a/advancedcontentfilter/vendor/npm-asset/responselike/package.json b/advancedcontentfilter/vendor/npm-asset/responselike/package.json deleted file mode 100644 index 520c8a13a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/responselike/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "responselike", - "version": "1.0.2", - "description": "A response-like object for mocking a Node.js HTTP response stream", - "main": "src/index.js", - "scripts": { - "test": "xo && nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "xo": { - "extends": "xo-lukechilds" - }, - "keywords": [ - "http", - "https", - "response", - "mock", - "request", - "responselike" - ], - "repository": { - "type": "git", - "url": "https://github.com/lukechilds/responselike.git" - }, - "author": "lukechilds", - "license": "MIT", - "devDependencies": { - "ava": "^0.22.0", - "coveralls": "^2.13.1", - "eslint-config-xo-lukechilds": "^1.0.0", - "get-stream": "^3.0.0", - "nyc": "^11.1.0", - "xo": "^0.19.0" - }, - "dependencies": { - "lowercase-keys": "^1.0.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/responselike/src/index.js b/advancedcontentfilter/vendor/npm-asset/responselike/src/index.js deleted file mode 100644 index b17b4813a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/responselike/src/index.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -const Readable = require('stream').Readable; -const lowercaseKeys = require('lowercase-keys'); - -class Response extends Readable { - constructor(statusCode, headers, body, url) { - if (typeof statusCode !== 'number') { - throw new TypeError('Argument `statusCode` should be a number'); - } - if (typeof headers !== 'object') { - throw new TypeError('Argument `headers` should be an object'); - } - if (!(body instanceof Buffer)) { - throw new TypeError('Argument `body` should be a buffer'); - } - if (typeof url !== 'string') { - throw new TypeError('Argument `url` should be a string'); - } - - super(); - this.statusCode = statusCode; - this.headers = lowercaseKeys(headers); - this.body = body; - this.url = url; - } - - _read() { - this.push(this.body); - this.push(null); - } -} - -module.exports = Response; diff --git a/advancedcontentfilter/vendor/npm-asset/safe-buffer/.travis.yml b/advancedcontentfilter/vendor/npm-asset/safe-buffer/.travis.yml deleted file mode 100644 index 7b20f28cb..000000000 --- a/advancedcontentfilter/vendor/npm-asset/safe-buffer/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - 'node' - - '5' - - '4' - - '0.12' - - '0.10' diff --git a/advancedcontentfilter/vendor/npm-asset/safe-buffer/LICENSE b/advancedcontentfilter/vendor/npm-asset/safe-buffer/LICENSE deleted file mode 100644 index 0c068ceec..000000000 --- a/advancedcontentfilter/vendor/npm-asset/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/safe-buffer/README.md b/advancedcontentfilter/vendor/npm-asset/safe-buffer/README.md deleted file mode 100644 index e9a81afd0..000000000 --- a/advancedcontentfilter/vendor/npm-asset/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# 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/advancedcontentfilter/vendor/npm-asset/safe-buffer/index.js b/advancedcontentfilter/vendor/npm-asset/safe-buffer/index.js deleted file mode 100644 index 22438dabb..000000000 --- a/advancedcontentfilter/vendor/npm-asset/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* 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/advancedcontentfilter/vendor/npm-asset/safe-buffer/package.json b/advancedcontentfilter/vendor/npm-asset/safe-buffer/package.json deleted file mode 100644 index 356d8bf20..000000000 --- a/advancedcontentfilter/vendor/npm-asset/safe-buffer/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.1.1", - "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", - "zuul": "^3.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", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test.js" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/safe-buffer/test.js b/advancedcontentfilter/vendor/npm-asset/safe-buffer/test.js deleted file mode 100644 index 4925059c5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/safe-buffer/test.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -var test = require('tape') -var SafeBuffer = require('./').Buffer - -test('new SafeBuffer(value) works just like Buffer', function (t) { - t.deepEqual(new SafeBuffer('hey'), new Buffer('hey')) - t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8')) - t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex')) - t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3])) - t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) - - t.equal(typeof SafeBuffer.isBuffer, 'function') - t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true) - t.equal(Buffer.isBuffer(new SafeBuffer('hey')), true) - t.notOk(SafeBuffer.isBuffer({})) - - t.end() -}) - -test('SafeBuffer.from(value) converts to a Buffer', function (t) { - t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey')) - t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8')) - t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex')) - t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3])) - t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) - - t.end() -}) - -test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) { - for (var i = 0; i < 10; i++) { - var expected1 = new Buffer(1000) - expected1.fill(0) - t.deepEqual(SafeBuffer.alloc(1000), expected1) - - var expected2 = new Buffer(1000 * 1000) - expected2.fill(0) - t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2) - } - t.end() -}) - -test('SafeBuffer.allocUnsafe(number)', function (t) { - var buf = SafeBuffer.allocUnsafe(100) // unitialized memory - t.equal(buf.length, 100) - t.equal(SafeBuffer.isBuffer(buf), true) - t.equal(Buffer.isBuffer(buf), true) - t.end() -}) - -test('SafeBuffer.from() throws with number types', function (t) { - t.plan(5) - t.throws(function () { - SafeBuffer.from(0) - }) - t.throws(function () { - SafeBuffer.from(-1) - }) - t.throws(function () { - SafeBuffer.from(NaN) - }) - t.throws(function () { - SafeBuffer.from(Infinity) - }) - t.throws(function () { - SafeBuffer.from(99) - }) -}) - -test('SafeBuffer.allocUnsafe() throws with non-number types', function (t) { - t.plan(4) - t.throws(function () { - SafeBuffer.allocUnsafe('hey') - }) - t.throws(function () { - SafeBuffer.allocUnsafe('hey', 'utf8') - }) - t.throws(function () { - SafeBuffer.allocUnsafe([1, 2, 3]) - }) - t.throws(function () { - SafeBuffer.allocUnsafe({}) - }) -}) - -test('SafeBuffer.alloc() throws with non-number types', function (t) { - t.plan(4) - t.throws(function () { - SafeBuffer.alloc('hey') - }) - t.throws(function () { - SafeBuffer.alloc('hey', 'utf8') - }) - t.throws(function () { - SafeBuffer.alloc([1, 2, 3]) - }) - t.throws(function () { - SafeBuffer.alloc({}) - }) -}) diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.d.ts b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js deleted file mode 100644 index 4d575fc1a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=example.js.map \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js.map b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js.map deleted file mode 100644 index 1677c0dd4..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/example.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"example.js","sourceRoot":"","sources":["../example.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.d.ts b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.d.ts deleted file mode 100644 index fc54f3aa8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/// -export declare const enum TypeName { - null = "null", - boolean = "boolean", - undefined = "undefined", - string = "string", - number = "number", - symbol = "symbol", - Function = "Function", - Array = "Array", - Buffer = "Buffer", - Object = "Object", - RegExp = "RegExp", - Date = "Date", - Error = "Error", - Map = "Map", - Set = "Set", - WeakMap = "WeakMap", - WeakSet = "WeakSet", - Int8Array = "Int8Array", - Uint8Array = "Uint8Array", - Uint8ClampedArray = "Uint8ClampedArray", - Int16Array = "Int16Array", - Uint16Array = "Uint16Array", - Int32Array = "Int32Array", - Uint32Array = "Uint32Array", - Float32Array = "Float32Array", - Float64Array = "Float64Array", - ArrayBuffer = "ArrayBuffer", - SharedArrayBuffer = "SharedArrayBuffer", - DataView = "DataView", - Promise = "Promise", -} -declare function is(value: any): TypeName; -declare namespace is { - const undefined: (value: any) => boolean; - const string: (value: any) => boolean; - const number: (value: any) => boolean; - const function_: (value: any) => boolean; - const null_: (value: any) => boolean; - const class_: (value: any) => any; - const boolean: (value: any) => boolean; - const symbol: (value: any) => boolean; - const array: (arg: any) => arg is any[]; - const buffer: (obj: any) => obj is Buffer; - const nullOrUndefined: (value: any) => boolean; - const object: (value: any) => boolean; - const iterable: (value: any) => boolean; - const generator: (value: any) => boolean; - const nativePromise: (value: any) => boolean; - const promise: (value: any) => boolean; - const generatorFunction: (value: any) => boolean; - const asyncFunction: (value: any) => boolean; - const boundFunction: (value: any) => boolean; - const regExp: (value: any) => boolean; - const date: (value: any) => boolean; - const error: (value: any) => boolean; - const map: (value: any) => boolean; - const set: (value: any) => boolean; - const weakMap: (value: any) => boolean; - const weakSet: (value: any) => boolean; - const int8Array: (value: any) => boolean; - const uint8Array: (value: any) => boolean; - const uint8ClampedArray: (value: any) => boolean; - const int16Array: (value: any) => boolean; - const uint16Array: (value: any) => boolean; - const int32Array: (value: any) => boolean; - const uint32Array: (value: any) => boolean; - const float32Array: (value: any) => boolean; - const float64Array: (value: any) => boolean; - const arrayBuffer: (value: any) => boolean; - const sharedArrayBuffer: (value: any) => boolean; - const dataView: (value: any) => boolean; - const directInstanceOf: (instance: any, klass: any) => boolean; - const truthy: (value: any) => boolean; - const falsy: (value: any) => boolean; - const nan: (value: any) => boolean; - const primitive: (value: any) => boolean; - const integer: (value: any) => boolean; - const safeInteger: (value: any) => boolean; - const plainObject: (value: any) => boolean; - const typedArray: (value: any) => boolean; - const arrayLike: (value: any) => boolean; - const inRange: (value: number, range: number | number[]) => boolean; - const domElement: (value: any) => boolean; - const nodeStream: (value: any) => boolean; - const infinite: (value: any) => boolean; - const even: (rem: number) => boolean; - const odd: (rem: number) => boolean; - const empty: (value: any) => boolean; - const emptyOrWhitespace: (value: any) => boolean; - function any(...predicate: any[]): any; - function all(...predicate: any[]): any; -} -export default is; diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js deleted file mode 100644 index d613b67a8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js +++ /dev/null @@ -1,215 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util = require("util"); -const toString = Object.prototype.toString; -const isOfType = (type) => (value) => typeof value === type; // tslint:disable-line:strict-type-predicates -const getObjectType = (value) => { - const objectName = toString.call(value).slice(8, -1); - if (objectName) { - return objectName; - } - return null; -}; -const isObjectOfType = (typeName) => (value) => { - return getObjectType(value) === typeName; -}; -function is(value) { - if (value === null) { - return "null" /* null */; - } - if (value === true || value === false) { - return "boolean" /* boolean */; - } - const type = typeof value; - if (type === 'undefined') { - return "undefined" /* undefined */; - } - if (type === 'string') { - return "string" /* string */; - } - if (type === 'number') { - return "number" /* number */; - } - if (type === 'symbol') { - return "symbol" /* symbol */; - } - if (is.function_(value)) { - return "Function" /* Function */; - } - if (Array.isArray(value)) { - return "Array" /* Array */; - } - if (Buffer.isBuffer(value)) { - return "Buffer" /* Buffer */; - } - const tagType = getObjectType(value); - if (tagType) { - return tagType; - } - if (value instanceof String || value instanceof Boolean || value instanceof Number) { - throw new TypeError('Please don\'t use object wrappers for primitive types'); - } - return "Object" /* Object */; -} -(function (is) { - const isObject = (value) => typeof value === 'object'; - // tslint:disable:variable-name - is.undefined = isOfType('undefined'); - is.string = isOfType('string'); - is.number = isOfType('number'); - is.function_ = isOfType('function'); - is.null_ = (value) => value === null; - is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); - is.boolean = (value) => value === true || value === false; - // tslint:enable:variable-name - is.symbol = isOfType('symbol'); - is.array = Array.isArray; - is.buffer = Buffer.isBuffer; - is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); - is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); - is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); - is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); - is.nativePromise = isObjectOfType("Promise" /* Promise */); - const hasPromiseAPI = (value) => !is.null_(value) && - isObject(value) && - is.function_(value.then) && - is.function_(value.catch); - is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); - // TODO: Change to use `isObjectOfType` once Node.js 6 or higher is targeted - const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type; - is.generatorFunction = isFunctionOfType('GeneratorFunction'); - is.asyncFunction = isFunctionOfType('AsyncFunction'); - is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); - is.regExp = isObjectOfType("RegExp" /* RegExp */); - is.date = isObjectOfType("Date" /* Date */); - is.error = isObjectOfType("Error" /* Error */); - is.map = isObjectOfType("Map" /* Map */); - is.set = isObjectOfType("Set" /* Set */); - is.weakMap = isObjectOfType("WeakMap" /* WeakMap */); - is.weakSet = isObjectOfType("WeakSet" /* WeakSet */); - is.int8Array = isObjectOfType("Int8Array" /* Int8Array */); - is.uint8Array = isObjectOfType("Uint8Array" /* Uint8Array */); - is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray" /* Uint8ClampedArray */); - is.int16Array = isObjectOfType("Int16Array" /* Int16Array */); - is.uint16Array = isObjectOfType("Uint16Array" /* Uint16Array */); - is.int32Array = isObjectOfType("Int32Array" /* Int32Array */); - is.uint32Array = isObjectOfType("Uint32Array" /* Uint32Array */); - is.float32Array = isObjectOfType("Float32Array" /* Float32Array */); - is.float64Array = isObjectOfType("Float64Array" /* Float64Array */); - is.arrayBuffer = isObjectOfType("ArrayBuffer" /* ArrayBuffer */); - is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer" /* SharedArrayBuffer */); - is.dataView = isObjectOfType("DataView" /* DataView */); - // TODO: Remove `object` checks when targeting ES2015 or higher - // See `Notes`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf - is.directInstanceOf = (instance, klass) => is.object(instance) && is.object(klass) && Object.getPrototypeOf(instance) === klass.prototype; - is.truthy = (value) => Boolean(value); - is.falsy = (value) => !value; - is.nan = (value) => Number.isNaN(value); - const primitiveTypes = new Set([ - 'undefined', - 'string', - 'number', - 'boolean', - 'symbol' - ]); - is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value); - is.integer = (value) => Number.isInteger(value); - is.safeInteger = (value) => Number.isSafeInteger(value); - is.plainObject = (value) => { - // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js - let prototype; - return getObjectType(value) === "Object" /* Object */ && - (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator - prototype === Object.getPrototypeOf({})); - }; - const typedArrayTypes = new Set([ - "Int8Array" /* Int8Array */, - "Uint8Array" /* Uint8Array */, - "Uint8ClampedArray" /* Uint8ClampedArray */, - "Int16Array" /* Int16Array */, - "Uint16Array" /* Uint16Array */, - "Int32Array" /* Int32Array */, - "Uint32Array" /* Uint32Array */, - "Float32Array" /* Float32Array */, - "Float64Array" /* Float64Array */ - ]); - is.typedArray = (value) => { - const objectType = getObjectType(value); - if (objectType === null) { - return false; - } - return typedArrayTypes.has(objectType); - }; - const isValidLength = (value) => is.safeInteger(value) && value > -1; - is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); - is.inRange = (value, range) => { - if (is.number(range)) { - return value >= Math.min(0, range) && value <= Math.max(range, 0); - } - if (is.array(range) && range.length === 2) { - // TODO: Use spread operator here when targeting Node.js 6 or higher - return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range); - } - throw new TypeError(`Invalid range: ${util.inspect(range)}`); - }; - const NODE_TYPE_ELEMENT = 1; - const DOM_PROPERTIES_TO_CHECK = [ - 'innerHTML', - 'ownerDocument', - 'style', - 'attributes', - 'nodeValue' - ]; - is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && - !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); - is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe); - is.infinite = (value) => value === Infinity || value === -Infinity; - const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value; - is.even = isAbsoluteMod2(0); - is.odd = isAbsoluteMod2(1); - const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; - const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0; - const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0; - const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0; - is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value); - is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value); - const predicateOnArray = (method, predicate, args) => { - // `args` is the calling function's "arguments object". - // We have to do it this way to keep node v4 support. - // So here we convert it to an array and slice off the first item. - const values = Array.prototype.slice.call(args, 1); - if (is.function_(predicate) === false) { - throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`); - } - if (values.length === 0) { - throw new TypeError('Invalid number of values'); - } - return method.call(values, predicate); - }; - function any(predicate) { - return predicateOnArray(Array.prototype.some, predicate, arguments); - } - is.any = any; - function all(predicate) { - return predicateOnArray(Array.prototype.every, predicate, arguments); - } - is.all = all; - // tslint:enable:only-arrow-functions no-function-expression -})(is || (is = {})); -// Some few keywords are reserved, but we'll populate them for Node.js users -// See https://github.com/Microsoft/TypeScript/issues/2536 -Object.defineProperties(is, { - class: { - value: is.class_ - }, - function: { - value: is.function_ - }, - null: { - value: is.null_ - } -}); -exports.default = is; -// For CommonJS default export support -module.exports = is; -module.exports.default = is; diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js.map b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js.map deleted file mode 100644 index 7461e68c1..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAW,CAAC;AAClF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAEvF,YAAY,KAAU;IACrB,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC;IACf,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAE1B,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC;IACpB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,UAAU,CAAC;IACnB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACb,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,YAAY,MAAM,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC;QACpF,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC;AACjB,CAAC;AAED,WAAU,EAAE;IACX,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;IAG9C,YAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,YAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACjC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;IAEvC,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnF,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;IAG5D,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5B,QAAK,GAAG,KAAK,CAAC,OAAO,CAAC;IACtB,SAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IAEzB,kBAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,CAAC;IACnE,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1F,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxF,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/F,gBAAa,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEvD,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CACpC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC;QACb,QAAQ,CAAC,KAAK,CAAC;QACf,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;QACrB,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEX,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAGpF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;IAElI,oBAAiB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC1D,gBAAa,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAElD,SAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEpC,YAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACxD,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAE9C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAExD,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACxC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAE/B,MAAG,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;QAC9B,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;KACR,CAAC,CAAC;IAEU,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;IAE7E,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAClD,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1D,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE;QAEzC,IAAI,SAAS,CAAC;QAEd,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,QAAQ;YACvC,CAAC,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,KAAK,IAAI;gBAC5D,SAAS,KAAK,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;QAC/B,WAAW;QACX,YAAY;QACZ,mBAAmB;QACnB,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,aAAa;QACb,cAAc;QACd,cAAc;KACd,CAAC,CAAC;IACU,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpF,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1D,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAExG,UAAO,GAAG,CAAC,KAAa,EAAE,KAAwB,EAAE,EAAE;QAClE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAe,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAe,EAAE,CAAC,CAAC,CAAC;QACvF,CAAC;QAED,EAAE,CAAC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YAExC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,uBAAuB,GAAG;QAC/B,WAAW;QACX,eAAe;QACf,OAAO;QACP,YAAY;QACZ,WAAW;KACX,CAAC;IAEW,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,iBAAiB,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;QACxH,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;IAExE,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC;IAElF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAA,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAC1F,OAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,MAAG,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,kBAAkB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IACvF,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,GAAA,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACrH,MAAM,eAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAE1E,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACtH,oBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAG3F,MAAM,gBAAgB,GAAG,CAAC,MAAmB,EAAE,SAAc,EAAE,IAAgB,EAAE,EAAE;QAIlF,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAEnD,EAAE,CAAC,CAAC,GAAA,SAAS,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YACpC,MAAM,IAAI,SAAS,CAAC,sBAAsB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACjD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC,CAAC;IAMF,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAFe,MAAG,MAElB,CAAA;IAGD,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAFe,MAAG,MAElB,CAAA;AAEF,CAAC,EA9KS,EAAE,KAAF,EAAE,QA8KX;AAID,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC;AAGlB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.d.ts b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.d.ts deleted file mode 100644 index f5fe7225e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/// -declare function is(value: any): string; -declare namespace is { - const undefined: (value: any) => boolean; - const string: (value: any) => boolean; - const number: (value: any) => boolean; - const function_: (value: any) => boolean; - const null_: (value: any) => boolean; - const class_: (value: any) => any; - const boolean: (value: any) => boolean; - const symbol: (value: any) => boolean; - const array: (arg: any) => arg is any[]; - const buffer: (obj: any) => obj is Buffer; - const nullOrUndefined: (value: any) => boolean; - const object: (value: any) => boolean; - const iterable: (value: any) => boolean; - const generator: (value: any) => boolean; - const nativePromise: (value: any) => boolean; - const promise: (value: any) => boolean; - const generatorFunction: (value: any) => boolean; - const asyncFunction: (value: any) => boolean; - const regExp: (value: any) => boolean; - const date: (value: any) => boolean; - const error: (value: any) => boolean; - const map: (value: any) => boolean; - const set: (value: any) => boolean; - const weakMap: (value: any) => boolean; - const weakSet: (value: any) => boolean; - const int8Array: (value: any) => boolean; - const uint8Array: (value: any) => boolean; - const uint8ClampedArray: (value: any) => boolean; - const int16Array: (value: any) => boolean; - const uint16Array: (value: any) => boolean; - const int32Array: (value: any) => boolean; - const uint32Array: (value: any) => boolean; - const float32Array: (value: any) => boolean; - const float64Array: (value: any) => boolean; - const arrayBuffer: (value: any) => boolean; - const sharedArrayBuffer: (value: any) => boolean; - const truthy: (value: any) => boolean; - const falsy: (value: any) => boolean; - const nan: (value: any) => boolean; - const primitive: (value: any) => boolean; - const integer: (value: any) => boolean; - const safeInteger: (value: any) => boolean; - const plainObject: (value: any) => boolean; - const typedArray: (value: any) => boolean; - const arrayLike: (value: any) => boolean; - const inRange: (value: number, range: number | number[]) => boolean; - const domElement: (value: any) => boolean; - const infinite: (value: any) => boolean; - const even: (rem: number) => boolean; - const odd: (rem: number) => boolean; - const empty: (value: any) => boolean; - const emptyOrWhitespace: (value: any) => boolean; - function any(...predicate: any[]): any; - function all(...predicate: any[]): any; -} -export default is; diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js deleted file mode 100644 index 2ff01c9c7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js +++ /dev/null @@ -1,182 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util = require("util"); -const toString = Object.prototype.toString; -const getObjectType = (value) => toString.call(value).slice(8, -1); -const isOfType = (type) => (value) => typeof value === type; -const isObjectOfType = (type) => (value) => getObjectType(value) === type; -function is(value) { - if (value === null) { - return 'null'; - } - if (value === true || value === false) { - return 'boolean'; - } - const type = typeof value; - if (type === 'undefined') { - return 'undefined'; - } - if (type === 'string') { - return 'string'; - } - if (type === 'number') { - return 'number'; - } - if (type === 'symbol') { - return 'symbol'; - } - if (is.function_(value)) { - return 'Function'; - } - if (Array.isArray(value)) { - return 'Array'; - } - if (Buffer.isBuffer(value)) { - return 'Buffer'; - } - const tagType = getObjectType(value); - if (tagType) { - return tagType; - } - if (value instanceof String || value instanceof Boolean || value instanceof Number) { - throw new TypeError('Please don\'t use object wrappers for primitive types'); - } - return 'Object'; -} -(function (is) { - const isObject = (value) => typeof value === 'object'; - is.undefined = isOfType('undefined'); - is.string = isOfType('string'); - is.number = isOfType('number'); - is.function_ = isOfType('function'); - is.null_ = (value) => value === null; - is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); - is.boolean = (value) => value === true || value === false; - is.symbol = isOfType('symbol'); - is.array = Array.isArray; - is.buffer = Buffer.isBuffer; - is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); - is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); - is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); - is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); - is.nativePromise = isObjectOfType('Promise'); - const hasPromiseAPI = (value) => !is.null_(value) && - isObject(value) && - is.function_(value.then) && - is.function_(value.catch); - is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); - const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type; - is.generatorFunction = isFunctionOfType('GeneratorFunction'); - is.asyncFunction = isFunctionOfType('AsyncFunction'); - is.regExp = isObjectOfType('RegExp'); - is.date = isObjectOfType('Date'); - is.error = isObjectOfType('Error'); - is.map = isObjectOfType('Map'); - is.set = isObjectOfType('Set'); - is.weakMap = isObjectOfType('WeakMap'); - is.weakSet = isObjectOfType('WeakSet'); - is.int8Array = isObjectOfType('Int8Array'); - is.uint8Array = isObjectOfType('Uint8Array'); - is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray'); - is.int16Array = isObjectOfType('Int16Array'); - is.uint16Array = isObjectOfType('Uint16Array'); - is.int32Array = isObjectOfType('Int32Array'); - is.uint32Array = isObjectOfType('Uint32Array'); - is.float32Array = isObjectOfType('Float32Array'); - is.float64Array = isObjectOfType('Float64Array'); - is.arrayBuffer = isObjectOfType('ArrayBuffer'); - is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer'); - is.truthy = (value) => Boolean(value); - is.falsy = (value) => !value; - is.nan = (value) => Number.isNaN(value); - const primitiveTypes = new Set([ - 'undefined', - 'string', - 'number', - 'boolean', - 'symbol' - ]); - is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value); - is.integer = (value) => Number.isInteger(value); - is.safeInteger = (value) => Number.isSafeInteger(value); - is.plainObject = (value) => { - let prototype; - return getObjectType(value) === 'Object' && - (prototype = Object.getPrototypeOf(value), prototype === null || - prototype === Object.getPrototypeOf({})); - }; - const typedArrayTypes = new Set([ - 'Int8Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'Int16Array', - 'Uint16Array', - 'Int32Array', - 'Uint32Array', - 'Float32Array', - 'Float64Array' - ]); - is.typedArray = (value) => typedArrayTypes.has(getObjectType(value)); - const isValidLength = (value) => is.safeInteger(value) && value > -1; - is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); - is.inRange = (value, range) => { - if (is.number(range)) { - return value >= Math.min(0, range) && value <= Math.max(range, 0); - } - if (is.array(range) && range.length === 2) { - return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range); - } - throw new TypeError(`Invalid range: ${util.inspect(range)}`); - }; - const NODE_TYPE_ELEMENT = 1; - const DOM_PROPERTIES_TO_CHECK = [ - 'innerHTML', - 'ownerDocument', - 'style', - 'attributes', - 'nodeValue' - ]; - is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && - !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); - is.infinite = (value) => value === Infinity || value === -Infinity; - const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value; - is.even = isAbsoluteMod2(0); - is.odd = isAbsoluteMod2(1); - const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; - const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0; - const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0; - const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0; - is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value); - is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value); - const predicateOnArray = (method, predicate, args) => { - const values = Array.prototype.slice.call(args, 1); - if (is.function_(predicate) === false) { - throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`); - } - if (values.length === 0) { - throw new TypeError('Invalid number of values'); - } - return method.call(values, predicate); - }; - function any(predicate) { - return predicateOnArray(Array.prototype.some, predicate, arguments); - } - is.any = any; - function all(predicate) { - return predicateOnArray(Array.prototype.every, predicate, arguments); - } - is.all = all; -})(is || (is = {})); -Object.defineProperties(is, { - class: { - value: is.class_ - }, - function: { - value: is.function_ - }, - null: { - value: is.null_ - } -}); -exports.default = is; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js.map b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js.map deleted file mode 100644 index 5cb0e0c87..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/index.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.d.ts b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js deleted file mode 100644 index 7a35b4d9b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js +++ /dev/null @@ -1,622 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const util = require("util"); -const ava_1 = require("ava"); -const jsdom_1 = require("jsdom"); -const __1 = require(".."); -const isNode8orHigher = Number(process.versions.node.split('.')[0]) >= 8; -class ErrorSubclassFixture extends Error { -} -const document = jsdom_1.jsdom(); -const createDomElement = (el) => document.createElement(el); -const types = new Map([ - ['undefined', { - is: __1.default.undefined, - fixtures: [ - undefined - ] - }], - ['null', { - is: __1.default.null_, - fixtures: [ - null - ] - }], - ['string', { - is: __1.default.string, - fixtures: [ - '🦄', - 'hello world', - '' - ] - }], - ['number', { - is: __1.default.number, - fixtures: [ - 6, - 1.4, - 0, - -0, - Infinity, - -Infinity - ] - }], - ['boolean', { - is: __1.default.boolean, - fixtures: [ - true, false - ] - }], - ['symbol', { - is: __1.default.symbol, - fixtures: [ - Symbol('🦄') - ] - }], - ['array', { - is: __1.default.array, - fixtures: [ - [1, 2], - new Array(2) - ] - }], - ['function', { - is: __1.default.function_, - fixtures: [ - function foo() { }, - function () { }, - () => { }, - function () { - return __awaiter(this, void 0, void 0, function* () { }); - }, - function* () { } - ] - }], - ['buffer', { - is: __1.default.buffer, - fixtures: [ - Buffer.from('🦄') - ] - }], - ['object', { - is: __1.default.object, - fixtures: [ - { x: 1 }, - Object.create({ x: 1 }) - ] - }], - ['regExp', { - is: __1.default.regExp, - fixtures: [ - /\w/, - new RegExp('\\w') - ] - }], - ['date', { - is: __1.default.date, - fixtures: [ - new Date() - ] - }], - ['error', { - is: __1.default.error, - fixtures: [ - new Error('🦄'), - new ErrorSubclassFixture() - ] - }], - ['nativePromise', { - is: __1.default.nativePromise, - fixtures: [ - Promise.resolve(), - ] - }], - ['promise', { - is: __1.default.promise, - fixtures: [ - { then() { }, catch() { } } - ] - }], - ['generator', { - is: __1.default.generator, - fixtures: [ - (function* () { yield 4; })() - ] - }], - ['generatorFunction', { - is: __1.default.generatorFunction, - fixtures: [ - function* () { yield 4; } - ] - }], - ['asyncFunction', { - is: __1.default.asyncFunction, - fixtures: [ - function () { - return __awaiter(this, void 0, void 0, function* () { }); - }, - () => __awaiter(this, void 0, void 0, function* () { }) - ] - }], - ['map', { - is: __1.default.map, - fixtures: [ - new Map() - ] - }], - ['set', { - is: __1.default.set, - fixtures: [ - new Set() - ] - }], - ['weakSet', { - is: __1.default.weakSet, - fixtures: [ - new WeakSet() - ] - }], - ['weakMap', { - is: __1.default.weakMap, - fixtures: [ - new WeakMap() - ] - }], - ['int8Array', { - is: __1.default.int8Array, - fixtures: [ - new Int8Array(0) - ] - }], - ['uint8Array', { - is: __1.default.uint8Array, - fixtures: [ - new Uint8Array(0) - ] - }], - ['uint8ClampedArray', { - is: __1.default.uint8ClampedArray, - fixtures: [ - new Uint8ClampedArray(0) - ] - }], - ['int16Array', { - is: __1.default.int16Array, - fixtures: [ - new Int16Array(0) - ] - }], - ['uint16Array', { - is: __1.default.uint16Array, - fixtures: [ - new Uint16Array(0) - ] - }], - ['int32Array', { - is: __1.default.int32Array, - fixtures: [ - new Int32Array(0) - ] - }], - ['uint32Array', { - is: __1.default.uint32Array, - fixtures: [ - new Uint32Array(0) - ] - }], - ['float32Array', { - is: __1.default.float32Array, - fixtures: [ - new Float32Array(0) - ] - }], - ['float64Array', { - is: __1.default.float64Array, - fixtures: [ - new Float64Array(0) - ] - }], - ['arrayBuffer', { - is: __1.default.arrayBuffer, - fixtures: [ - new ArrayBuffer(10) - ] - }], - ['nan', { - is: __1.default.nan, - fixtures: [ - NaN, - Number.NaN - ] - }], - ['nullOrUndefined', { - is: __1.default.nullOrUndefined, - fixtures: [ - null, - undefined - ] - }], - ['plainObject', { - is: __1.default.plainObject, - fixtures: [ - { x: 1 }, - Object.create(null), - new Object() - ] - }], - ['integer', { - is: __1.default.integer, - fixtures: [ - 6 - ] - }], - ['safeInteger', { - is: __1.default.safeInteger, - fixtures: [ - Math.pow(2, 53) - 1, - -Math.pow(2, 53) + 1 - ] - }], - ['domElement', { - is: __1.default.domElement, - fixtures: [ - 'div', - 'input', - 'span', - 'img', - 'canvas', - 'script' - ].map(createDomElement) - } - ], ['non-domElements', { - is: value => !__1.default.domElement(value), - fixtures: [ - document.createTextNode('data'), - document.createProcessingInstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'), - document.createComment('This is a comment'), - document, - document.implementation.createDocumentType('svg:svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'), - document.createDocumentFragment() - ] - }], - ['infinite', { - is: __1.default.infinite, - fixtures: [ - Infinity, - -Infinity - ] - }] -]); -const testType = (t, type, exclude) => { - const testData = types.get(type); - if (testData === undefined) { - t.fail(`is.${type} not defined`); - return; - } - const { is } = testData; - for (const [key, { fixtures }] of types) { - if (exclude && exclude.indexOf(key) !== -1) { - continue; - } - const assert = key === type ? t.true.bind(t) : t.false.bind(t); - for (const fixture of fixtures) { - assert(is(fixture), `Value: ${util.inspect(fixture)}`); - } - } -}; -ava_1.default('is', t => { - t.is(__1.default(null), 'null'); - t.is(__1.default(undefined), 'undefined'); -}); -ava_1.default('is.undefined', t => { - testType(t, 'undefined', ['nullOrUndefined']); -}); -ava_1.default('is.null', t => { - testType(t, 'null', ['nullOrUndefined']); -}); -ava_1.default('is.string', t => { - testType(t, 'string'); -}); -ava_1.default('is.number', t => { - testType(t, 'number', ['nan', 'integer', 'safeInteger', 'infinite']); -}); -ava_1.default('is.boolean', t => { - testType(t, 'boolean'); -}); -ava_1.default('is.symbol', t => { - testType(t, 'symbol'); -}); -ava_1.default('is.array', t => { - testType(t, 'array'); -}); -ava_1.default('is.function', t => { - testType(t, 'function', ['generatorFunction', 'asyncFunction']); -}); -ava_1.default('is.buffer', t => { - testType(t, 'buffer'); -}); -ava_1.default('is.object', t => { - const testData = types.get('object'); - if (testData === undefined) { - t.fail('is.object not defined'); - return; - } - for (const el of testData.fixtures) { - t.true(__1.default.object(el)); - } -}); -ava_1.default('is.regExp', t => { - testType(t, 'regExp'); -}); -ava_1.default('is.date', t => { - testType(t, 'date'); -}); -ava_1.default('is.error', t => { - testType(t, 'error'); -}); -if (isNode8orHigher) { - ava_1.default('is.nativePromise', t => { - testType(t, 'nativePromise'); - }); - ava_1.default('is.promise', t => { - testType(t, 'promise', ['nativePromise']); - }); -} -ava_1.default('is.generator', t => { - testType(t, 'generator'); -}); -ava_1.default('is.generatorFunction', t => { - testType(t, 'generatorFunction', ['function']); -}); -ava_1.default('is.map', t => { - testType(t, 'map'); -}); -ava_1.default('is.set', t => { - testType(t, 'set'); -}); -ava_1.default('is.weakMap', t => { - testType(t, 'weakMap'); -}); -ava_1.default('is.weakSet', t => { - testType(t, 'weakSet'); -}); -ava_1.default('is.int8Array', t => { - testType(t, 'int8Array'); -}); -ava_1.default('is.uint8Array', t => { - testType(t, 'uint8Array', ['buffer']); -}); -ava_1.default('is.uint8ClampedArray', t => { - testType(t, 'uint8ClampedArray'); -}); -ava_1.default('is.int16Array', t => { - testType(t, 'int16Array'); -}); -ava_1.default('is.uint16Array', t => { - testType(t, 'uint16Array'); -}); -ava_1.default('is.int32Array', t => { - testType(t, 'int32Array'); -}); -ava_1.default('is.uint32Array', t => { - testType(t, 'uint32Array'); -}); -ava_1.default('is.float32Array', t => { - testType(t, 'float32Array'); -}); -ava_1.default('is.float64Array', t => { - testType(t, 'float64Array'); -}); -ava_1.default('is.arrayBuffer', t => { - testType(t, 'arrayBuffer'); -}); -ava_1.default('is.dataView', t => { - testType(t, 'arrayBuffer'); -}); -ava_1.default('is.truthy', t => { - t.true(__1.default.truthy('unicorn')); - t.true(__1.default.truthy('🦄')); - t.true(__1.default.truthy(new Set())); - t.true(__1.default.truthy(Symbol('🦄'))); - t.true(__1.default.truthy(true)); -}); -ava_1.default('is.falsy', t => { - t.true(__1.default.falsy(false)); - t.true(__1.default.falsy(0)); - t.true(__1.default.falsy('')); - t.true(__1.default.falsy(null)); - t.true(__1.default.falsy(undefined)); - t.true(__1.default.falsy(NaN)); -}); -ava_1.default('is.nan', t => { - testType(t, 'nan'); -}); -ava_1.default('is.nullOrUndefined', t => { - testType(t, 'nullOrUndefined', ['undefined', 'null']); -}); -ava_1.default('is.primitive', t => { - const primitives = [ - undefined, - null, - '🦄', - 6, - Infinity, - -Infinity, - true, - false, - Symbol('🦄') - ]; - for (const el of primitives) { - t.true(__1.default.primitive(el)); - } -}); -ava_1.default('is.integer', t => { - testType(t, 'integer', ['number', 'safeInteger']); - t.false(__1.default.integer(1.4)); -}); -ava_1.default('is.safeInteger', t => { - testType(t, 'safeInteger', ['number', 'integer']); - t.false(__1.default.safeInteger(Math.pow(2, 53))); - t.false(__1.default.safeInteger(-Math.pow(2, 53))); -}); -ava_1.default('is.plainObject', t => { - testType(t, 'plainObject', ['object', 'promise']); -}); -ava_1.default('is.iterable', t => { - t.true(__1.default.iterable('')); - t.true(__1.default.iterable([])); - t.true(__1.default.iterable(new Map())); - t.false(__1.default.iterable(null)); - t.false(__1.default.iterable(undefined)); - t.false(__1.default.iterable(0)); - t.false(__1.default.iterable(NaN)); - t.false(__1.default.iterable(Infinity)); - t.false(__1.default.iterable({})); -}); -ava_1.default('is.class', t => { - class Foo { - } - const classDeclarations = [ - Foo, - class Bar extends Foo { - } - ]; - for (const x of classDeclarations) { - t.true(__1.default.class_(x)); - } -}); -ava_1.default('is.typedArray', t => { - const typedArrays = [ - new Int8Array(0), - new Uint8Array(0), - new Uint8ClampedArray(0), - new Uint16Array(0), - new Int32Array(0), - new Uint32Array(0), - new Float32Array(0), - new Float64Array(0) - ]; - for (const el of typedArrays) { - t.true(__1.default.typedArray(el)); - } - t.false(__1.default.typedArray(new ArrayBuffer(1))); - t.false(__1.default.typedArray([])); - t.false(__1.default.typedArray({})); -}); -ava_1.default('is.arrayLike', t => { - (() => { - t.true(__1.default.arrayLike(arguments)); - })(); - t.true(__1.default.arrayLike([])); - t.true(__1.default.arrayLike('unicorn')); - t.false(__1.default.arrayLike({})); - t.false(__1.default.arrayLike(() => { })); - t.false(__1.default.arrayLike(new Map())); -}); -ava_1.default('is.inRange', t => { - const x = 3; - t.true(__1.default.inRange(x, [0, 5])); - t.true(__1.default.inRange(x, [5, 0])); - t.true(__1.default.inRange(x, [-5, 5])); - t.true(__1.default.inRange(x, [5, -5])); - t.false(__1.default.inRange(x, [4, 8])); - t.true(__1.default.inRange(-7, [-5, -10])); - t.true(__1.default.inRange(-5, [-5, -10])); - t.true(__1.default.inRange(-10, [-5, -10])); - t.true(__1.default.inRange(x, 10)); - t.true(__1.default.inRange(0, 0)); - t.true(__1.default.inRange(-2, -3)); - t.false(__1.default.inRange(x, 2)); - t.false(__1.default.inRange(-3, -2)); - t.throws(() => { - __1.default.inRange(0, []); - }); - t.throws(() => { - __1.default.inRange(0, [5]); - }); - t.throws(() => { - __1.default.inRange(0, [1, 2, 3]); - }); -}); -ava_1.default('is.domElement', t => { - testType(t, 'domElement'); - t.false(__1.default.domElement({ nodeType: 1, nodeName: 'div' })); -}); -ava_1.default('is.infinite', t => { - testType(t, 'infinite', ['number']); -}); -ava_1.default('is.even', t => { - for (const el of [-6, 2, 4]) { - t.true(__1.default.even(el)); - } - for (const el of [-3, 1, 5]) { - t.false(__1.default.even(el)); - } -}); -ava_1.default('is.odd', t => { - for (const el of [-5, 7, 13]) { - t.true(__1.default.odd(el)); - } - for (const el of [-8, 8, 10]) { - t.false(__1.default.odd(el)); - } -}); -ava_1.default('is.empty', t => { - t.true(__1.default.empty(null)); - t.true(__1.default.empty(undefined)); - t.true(__1.default.empty(false)); - t.false(__1.default.empty(true)); - t.true(__1.default.empty('')); - t.false(__1.default.empty('🦄')); - t.true(__1.default.empty([])); - t.false(__1.default.empty(['🦄'])); - t.true(__1.default.empty({})); - t.false(__1.default.empty({ unicorn: '🦄' })); - const tempMap = new Map(); - t.true(__1.default.empty(tempMap)); - tempMap.set('unicorn', '🦄'); - t.false(__1.default.empty(tempMap)); - const tempSet = new Set(); - t.true(__1.default.empty(tempSet)); - tempSet.add(1); - t.false(__1.default.empty(tempSet)); -}); -ava_1.default('is.emptyOrWhitespace', t => { - t.true(__1.default.emptyOrWhitespace('')); - t.true(__1.default.emptyOrWhitespace(' ')); - t.false(__1.default.emptyOrWhitespace('🦄')); - t.false(__1.default.emptyOrWhitespace('unicorn')); -}); -ava_1.default('is.any', t => { - t.true(__1.default.any(__1.default.string, {}, true, '🦄')); - t.true(__1.default.any(__1.default.object, false, {}, 'unicorns')); - t.false(__1.default.any(__1.default.boolean, '🦄', [], 3)); - t.false(__1.default.any(__1.default.integer, true, 'lol', {})); - t.throws(() => { - __1.default.any(null, true); - }); - t.throws(() => { - __1.default.any(__1.default.string); - }); -}); -ava_1.default('is.all', t => { - t.true(__1.default.all(__1.default.object, {}, new Set(), new Map())); - t.true(__1.default.all(__1.default.boolean, true, false)); - t.false(__1.default.all(__1.default.string, '🦄', [])); - t.false(__1.default.all(__1.default.set, new Map(), {})); - t.throws(() => { - __1.default.all(null, true); - }); - t.throws(() => { - __1.default.all(__1.default.string); - }); -}); -//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js.map b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js.map deleted file mode 100644 index ab9ec1531..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/dist/source/tests/test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../source/tests/test.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/license b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/package.json b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/package.json deleted file mode 100644 index c4a3a24f8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "@sindresorhus/is", - "version": "0.7.0", - "description": "Type check values: `is.string('🦄') //=> true`", - "license": "MIT", - "repository": "sindresorhus/is", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "publishConfig": { - "access": "public" - }, - "main": "dist/index.js", - "engines": { - "node": ">=4" - }, - "scripts": { - "lint": "tslint --format stylish --project .", - "build": "tsc", - "test": "npm run lint && npm run build && ava dist/tests", - "prepublish": "npm run build && del dist/tests" - }, - "files": [ - "dist" - ], - "keywords": [ - "type", - "types", - "is", - "check", - "checking", - "validate", - "validation", - "utility", - "util", - "typeof", - "instanceof", - "object", - "assert", - "assertion", - "test", - "kind", - "primitive", - "verify", - "compare" - ], - "devDependencies": { - "@types/jsdom": "^2.0.31", - "@types/node": "^8.0.47", - "@types/tempy": "^0.1.0", - "ava": "*", - "del-cli": "^1.1.0", - "jsdom": "^9.12.0", - "tempy": "^0.2.1", - "tslint": "^5.8.0", - "tslint-xo": "^0.3.0", - "typescript": "^2.6.1" - }, - "types": "dist/index.d.ts" -} diff --git a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/readme.md b/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/readme.md deleted file mode 100644 index 67fad06e5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sindresorhus--is/readme.md +++ /dev/null @@ -1,323 +0,0 @@ -# is [![Build Status](https://travis-ci.org/sindresorhus/is.svg?branch=master)](https://travis-ci.org/sindresorhus/is) - -> Type check values: `is.string('🦄') //=> true` - - - - -## Install - -``` -$ npm install @sindresorhus/is -``` - - -## Usage - -```js -const is = require('@sindresorhus/is'); - -is('🦄'); -//=> 'string' - -is(new Map()); -//=> 'Map' - -is.number(6); -//=> true -``` - - -## API - -### is(value) - -Returns the type of `value`. - -Primitives are lowercase and object types are camelcase. - -Example: - -- `'undefined'` -- `'null'` -- `'string'` -- `'symbol'` -- `'Array'` -- `'Function'` -- `'Object'` - -Note: It will throw if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`. - -### is.{method} - -All the below methods accept a value and returns a boolean for whether the value is of the desired type. - -#### Primitives - -##### .undefined(value) -##### .null(value) -##### .string(value) -##### .number(value) -##### .boolean(value) -##### .symbol(value) - -#### Built-in types - -##### .array(value) -##### .function(value) -##### .buffer(value) -##### .object(value) - -Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions). - -##### .regExp(value) -##### .date(value) -##### .error(value) -##### .nativePromise(value) -##### .promise(value) - -Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too. - -##### .generator(value) - -Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`. - -##### .generatorFunction(value) - -##### .asyncFunction(value) - -Returns `true` for any `async` function that can be called with the `await` operator. - -```js -is.asyncFunction(async () => {}); -// => true - -is.asyncFunction(() => {}); -// => false -``` - -##### .boundFunction(value) - -Returns `true` for any `bound` function. - -```js -is.boundFunction(() => {}); -// => true - -is.boundFunction(function () {}.bind(null)); -// => true - -is.boundFunction(function () {}); -// => false -``` - -##### .map(value) -##### .set(value) -##### .weakMap(value) -##### .weakSet(value) - -#### Typed arrays - -##### .int8Array(value) -##### .uint8Array(value) -##### .uint8ClampedArray(value) -##### .int16Array(value) -##### .uint16Array(value) -##### .int32Array(value) -##### .uint32Array(value) -##### .float32Array(value) -##### .float64Array(value) - -#### Structured data - -##### .arrayBuffer(value) -##### .sharedArrayBuffer(value) -##### .dataView(value) - -#### Miscellaneous - -##### .directInstanceOf(value, class) - -Returns `true` if `value` is a direct instance of `class`. - -```js -is.directInstanceOf(new Error(), Error); -//=> true - -class UnicornError extends Error {}; - -is.directInstanceOf(new UnicornError(), Error); -//=> false -``` - -##### .truthy(value) - -Returns `true` for all values that evaluate to true in a boolean context: - -```js -is.truthy('🦄'); -//=> true - -is.truthy(undefined); -//=> false -``` - -##### .falsy(value) - -Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`. - -##### .nan(value) -##### .nullOrUndefined(value) -##### .primitive(value) - -JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`. - -##### .integer(value) - -##### .safeInteger(value) - -Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). - -##### .plainObject(value) - -An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`. - -##### .iterable(value) -##### .class(value) - -Returns `true` for instances created by a ES2015 class. - -##### .typedArray(value) - -##### .arrayLike(value) - -A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0. - -```js -is.arrayLike(document.forms); -//=> true - -function () { - is.arrayLike(arguments); - //=> true -} -``` - -##### .inRange(value, range) - -Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order. - -```js -is.inRange(3, [0, 5]); -is.inRange(3, [5, 0]); -is.inRange(0, [-2, 2]); -``` - -##### .inRange(value, upperBound) - -Check if `value` (number) is in the range of `0` to `upperBound`. - -```js -is.inRange(3, 10); -``` - -##### .domElement(value) - -Returns `true` if `value` is a DOM Element. - -##### .nodeStream(value) - -Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html). - -```js -const fs = require('fs'); -is.nodeStream(fs.createReadStream('unicorn.png')); -//=> true -``` - -##### .infinite(value) - -Check if `value` is `Infinity` or `-Infinity`. - -##### .even(value) - -Returns `true` if `value` is an even integer. - -##### .odd(value) - -Returns `true` if `value` is an odd integer. - -##### .empty(value) - -Returns `true` if `value` is falsy or an empty string, array, object, map, or set. - -##### .emptyOrWhitespace(value) - -Returns `true` if `is.empty(value)` or a string that is all whitespace. - - -##### .any(predicate, ...values) - -Returns `true` if **any** of the input `values` returns true in the `predicate`: - -```js -is.any(is.string, {}, true, '🦄'); -//=> true - -is.any(is.boolean, 'unicorns', [], new Map()); -//=> false -``` - -##### .all(predicate, ...values) - -Returns `true` if **all** of the input `values` returns true in the `predicate`: - -```js -is.all(is.object, {}, new Map(), new Set()); -//=> true - -is.all(is.string, '🦄', [], 'unicorns'); -//=> false -``` - -## FAQ - -### Why yet another type checking module? - -There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs: - -- Includes both type methods and ability to get the type -- Types of primitives returned as lowercase and object types as camelcase -- Covers all built-ins -- Unsurprising behavior -- Well-maintained -- Comprehensive test suite - -For the ones I found, pick 3 of these. - -The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive. - - -## Related - -- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream -- [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable -- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array -- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address -- [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted -- [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor -- [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty -- [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data -- [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji - - -## Created by - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Giora Guttsait](https://github.com/gioragutt) -- [Brandon Smith](https://github.com/brandon93s) - - -## License - -MIT diff --git a/advancedcontentfilter/vendor/npm-asset/sort-keys/index.js b/advancedcontentfilter/vendor/npm-asset/sort-keys/index.js deleted file mode 100644 index 53489d788..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sort-keys/index.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; -const isPlainObj = require('is-plain-obj'); - -module.exports = (obj, opts) => { - if (!isPlainObj(obj)) { - throw new TypeError('Expected a plain object'); - } - - opts = opts || {}; - - // DEPRECATED - if (typeof opts === 'function') { - throw new TypeError('Specify the compare function as an option instead'); - } - - const deep = opts.deep; - const seenInput = []; - const seenOutput = []; - - const sortKeys = x => { - const seenIndex = seenInput.indexOf(x); - - if (seenIndex !== -1) { - return seenOutput[seenIndex]; - } - - const ret = {}; - const keys = Object.keys(x).sort(opts.compare); - - seenInput.push(x); - seenOutput.push(ret); - - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const val = x[key]; - - if (deep && Array.isArray(val)) { - const retArr = []; - - for (let j = 0; j < val.length; j++) { - retArr[j] = isPlainObj(val[j]) ? sortKeys(val[j]) : val[j]; - } - - ret[key] = retArr; - continue; - } - - ret[key] = deep && isPlainObj(val) ? sortKeys(val) : val; - } - - return ret; - }; - - return sortKeys(obj); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/sort-keys/license b/advancedcontentfilter/vendor/npm-asset/sort-keys/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sort-keys/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/sort-keys/package.json b/advancedcontentfilter/vendor/npm-asset/sort-keys/package.json deleted file mode 100644 index 3da9c7659..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sort-keys/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "sort-keys", - "version": "2.0.0", - "description": "Sort the keys of an object", - "license": "MIT", - "repository": "sindresorhus/sort-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "sort", - "object", - "keys", - "obj", - "key", - "stable", - "deterministic", - "deep", - "recursive", - "recursively" - ], - "dependencies": { - "is-plain-obj": "^1.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/sort-keys/readme.md b/advancedcontentfilter/vendor/npm-asset/sort-keys/readme.md deleted file mode 100644 index a671ffb3d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/sort-keys/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# sort-keys [![Build Status](https://travis-ci.org/sindresorhus/sort-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/sort-keys) - -> Sort the keys of an object - -Useful to get a deterministically ordered object, as the order of keys can vary between engines. - - -## Install - -``` -$ npm install --save sort-keys -``` - - -## Usage - -```js -const sortKeys = require('sort-keys'); - -sortKeys({c: 0, a: 0, b: 0}); -//=> {a: 0, b: 0, c: 0} - -sortKeys({b: {b: 0, a: 0}, a: 0}, {deep: true}); -//=> {a: 0, b: {a: 0, b: 0}} - -sortKeys({c: 0, a: 0, b: 0}, { - compare: (a, b) => -a.localeCompare(b) -}); -//=> {c: 0, b: 0, a: 0} -``` - - -## API - -### sortKeys(input, [options]) - -Returns a new object with sorted keys. - -#### input - -Type: `Object` - -#### options - -##### deep - -Type: `boolean` - -Recursively sort keys. - -##### compare - -Type: `Function` - -[Compare function.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/index.js b/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/index.js deleted file mode 100644 index 414de96c5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -module.exports = function (str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase(); - }); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/license b/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/license deleted file mode 100644 index e0e915823..000000000 --- a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Kevin Mårtensson (github.com/kevva) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/package.json b/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/package.json deleted file mode 100644 index 0028e1b30..000000000 --- a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "strict-uri-encode", - "version": "1.1.0", - "description": "A stricter URI encode adhering to RFC 3986", - "license": "MIT", - "repository": "kevva/strict-uri-encode", - "author": { - "name": "Kevin Mårtensson", - "email": "kevinmartensson@gmail.com", - "url": "github.com/kevva" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "component", - "encode", - "RFC3986", - "uri" - ], - "devDependencies": { - "ava": "^0.0.4" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/readme.md b/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/readme.md deleted file mode 100644 index 2763272de..000000000 --- a/advancedcontentfilter/vendor/npm-asset/strict-uri-encode/readme.md +++ /dev/null @@ -1,40 +0,0 @@ -# strict-uri-encode [![Build Status](https://travis-ci.org/kevva/strict-uri-encode.svg?branch=master)](https://travis-ci.org/kevva/strict-uri-encode) - -> A stricter URI encode adhering to [RFC 3986](http://tools.ietf.org/html/rfc3986) - - -## Install - -``` -$ npm install --save strict-uri-encode -``` - - -## Usage - -```js -var strictUriEncode = require('strict-uri-encode'); - -strictUriEncode('unicorn!foobar') -//=> 'unicorn%21foobar' - -strictUriEncode('unicorn*foobar') -//=> 'unicorn%2Afoobar' -``` - - -## API - -### strictUriEncode(string) - -#### string - -*Required* -Type: `string`, `number` - -String to URI encode. - - -## License - -MIT © [Kevin Mårtensson](http://github.com/kevva) diff --git a/advancedcontentfilter/vendor/npm-asset/string_decoder/.travis.yml b/advancedcontentfilter/vendor/npm-asset/string_decoder/.travis.yml deleted file mode 100644 index 3347a7254..000000000 --- a/advancedcontentfilter/vendor/npm-asset/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/string_decoder/LICENSE b/advancedcontentfilter/vendor/npm-asset/string_decoder/LICENSE deleted file mode 100644 index 778edb207..000000000 --- a/advancedcontentfilter/vendor/npm-asset/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/string_decoder/README.md b/advancedcontentfilter/vendor/npm-asset/string_decoder/README.md deleted file mode 100644 index 5fd58315e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# 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/advancedcontentfilter/vendor/npm-asset/string_decoder/lib/string_decoder.js b/advancedcontentfilter/vendor/npm-asset/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// 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/advancedcontentfilter/vendor/npm-asset/string_decoder/package.json b/advancedcontentfilter/vendor/npm-asset/string_decoder/package.json deleted file mode 100644 index 518c3eb9f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/string_decoder/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "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/advancedcontentfilter/vendor/npm-asset/timed-out/index.js b/advancedcontentfilter/vendor/npm-asset/timed-out/index.js deleted file mode 100644 index 94007a4ae..000000000 --- a/advancedcontentfilter/vendor/npm-asset/timed-out/index.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -module.exports = function (req, time) { - if (req.timeoutTimer) { - return req; - } - - var delays = isNaN(time) ? time : {socket: time, connect: time}; - var host = req._headers ? (' to ' + req._headers.host) : ''; - - if (delays.connect !== undefined) { - req.timeoutTimer = setTimeout(function timeoutHandler() { - req.abort(); - var e = new Error('Connection timed out on request' + host); - e.code = 'ETIMEDOUT'; - req.emit('error', e); - }, delays.connect); - } - - // Clear the connection timeout timer once a socket is assigned to the - // request and is connected. - req.on('socket', function assign(socket) { - // Socket may come from Agent pool and may be already connected. - if (!(socket.connecting || socket._connecting)) { - connect(); - return; - } - - socket.once('connect', connect); - }); - - function clear() { - if (req.timeoutTimer) { - clearTimeout(req.timeoutTimer); - req.timeoutTimer = null; - } - } - - function connect() { - clear(); - - if (delays.socket !== undefined) { - // Abort the request if there is no activity on the socket for more - // than `delays.socket` milliseconds. - req.setTimeout(delays.socket, function socketTimeoutHandler() { - req.abort(); - var e = new Error('Socket timed out on request' + host); - e.code = 'ESOCKETTIMEDOUT'; - req.emit('error', e); - }); - } - } - - return req.on('error', clear); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/timed-out/license b/advancedcontentfilter/vendor/npm-asset/timed-out/license deleted file mode 100644 index faadd5287..000000000 --- a/advancedcontentfilter/vendor/npm-asset/timed-out/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/timed-out/package.json b/advancedcontentfilter/vendor/npm-asset/timed-out/package.json deleted file mode 100644 index b86baa703..000000000 --- a/advancedcontentfilter/vendor/npm-asset/timed-out/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "timed-out", - "version": "4.0.1", - "description": "Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged", - "license": "MIT", - "repository": "floatdrop/timed-out", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "http", - "https", - "get", - "got", - "url", - "uri", - "request", - "util", - "utility", - "simple" - ], - "devDependencies": { - "mocha": "*", - "xo": "^0.16.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/timed-out/readme.md b/advancedcontentfilter/vendor/npm-asset/timed-out/readme.md deleted file mode 100644 index fa0a03565..000000000 --- a/advancedcontentfilter/vendor/npm-asset/timed-out/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# timed-out [![Build Status](https://travis-ci.org/floatdrop/timed-out.svg?branch=master)](https://travis-ci.org/floatdrop/timed-out) - -> Timeout HTTP/HTTPS requests - -Emit Error object with `code` property equal `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged. - -## Usage - -```js -var get = require('http').get; -var timeout = require('timed-out'); - -var req = get('http://www.google.ru'); -timeout(req, 2000); // Set 2 seconds limit -``` - -### API - -#### timedout(request, time) - -##### request - -*Required* -Type: [`ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) - -The request to watch on. - -##### time - -*Required* -Type: `number` or `object` - -Time in milliseconds to wait for `connect` event on socket and also time to wait on inactive socket. - -Or you can pass Object with following fields: - -- `connect` - time to wait for connection -- `socket` - time to wait for activity on socket - -## License - -MIT © [Vsevolod Strukchinsky](floatdrop@gmail.com) diff --git a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/index.js b/advancedcontentfilter/vendor/npm-asset/url-parse-lax/index.js deleted file mode 100644 index 5c62a589d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; -const url = require('url'); -const prependHttp = require('prepend-http'); - -module.exports = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof input}\` instead.`); - } - - const finalUrl = prependHttp(input, Object.assign({https: true}, options)); - return url.parse(finalUrl); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/license b/advancedcontentfilter/vendor/npm-asset/url-parse-lax/license deleted file mode 100644 index e7af2f771..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/package.json b/advancedcontentfilter/vendor/npm-asset/url-parse-lax/package.json deleted file mode 100644 index b3c58f97d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "url-parse-lax", - "version": "3.0.0", - "description": "Lax url.parse() with support for protocol-less URLs & IPs", - "license": "MIT", - "repository": "sindresorhus/url-parse-lax", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "url", - "uri", - "parse", - "parser", - "loose", - "lax", - "protocol", - "less", - "protocol-less", - "ip", - "ipv4", - "ipv6" - ], - "dependencies": { - "prepend-http": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/readme.md b/advancedcontentfilter/vendor/npm-asset/url-parse-lax/readme.md deleted file mode 100644 index be0d43710..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-parse-lax/readme.md +++ /dev/null @@ -1,127 +0,0 @@ -# url-parse-lax [![Build Status](https://travis-ci.org/sindresorhus/url-parse-lax.svg?branch=master)](https://travis-ci.org/sindresorhus/url-parse-lax) - -> Lax [`url.parse()`](https://nodejs.org/docs/latest/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost) with support for protocol-less URLs & IPs - - -## Install - -``` -$ npm install url-parse-lax -``` - - -## Usage - -```js -const urlParseLax = require('url-parse-lax'); - -urlParseLax('sindresorhus.com'); -/* -{ - protocol: 'https:', - slashes: true, - auth: null, - host: 'sindresorhus.com', - port: null, - hostname: 'sindresorhus.com', - hash: null, - search: null, - query: null, - pathname: '/', - path: '/', - href: 'https://sindresorhus.com/' -} -*/ - -urlParseLax('[2001:db8::]:8000'); -/* -{ - protocol: null, - slashes: true, - auth: null, - host: '[2001:db8::]:8000', - port: '8000', - hostname: '2001:db8::', - hash: null, - search: null, - query: null, - pathname: '/', - path: '/', - href: 'http://[2001:db8::]:8000/' -} -*/ -``` - -And with the built-in `url.parse()`: - -```js -const url = require('url'); - -url.parse('sindresorhus.com'); -/* -{ - protocol: null, - slashes: null, - auth: null, - host: null, - port: null, - hostname: null, - hash: null, - search: null, - query: null, - pathname: 'sindresorhus', - path: 'sindresorhus', - href: 'sindresorhus' -} -*/ - -url.parse('[2001:db8::]:8000'); -/* -{ - protocol: null, - slashes: null, - auth: null, - host: null, - port: null, - hostname: null, - hash: null, - search: null, - query: null, - pathname: '[2001:db8::]:8000', - path: '[2001:db8::]:8000', - href: '[2001:db8::]:8000' -} -*/ -``` - - -## API - -### urlParseLax(url, [options]) - -#### url - -Type: `string` - -URL to parse. - -#### options - -Type: `Object` - -##### https - -Type: `boolean`
-Default: `true` - -Prepend `https://` instead of `http://` to protocol-less URLs. - - -## Related - -- [url-format-lax](https://github.com/sindresorhus/url-format-lax) - Lax `url.format()` that formats a hostname and port into IPv6-compatible socket form of `hostname:port` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/advancedcontentfilter/vendor/npm-asset/url-to-options/LICENSE b/advancedcontentfilter/vendor/npm-asset/url-to-options/LICENSE deleted file mode 100644 index 274147aeb..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-to-options/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Steven Vachon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/url-to-options/README.md b/advancedcontentfilter/vendor/npm-asset/url-to-options/README.md deleted file mode 100644 index 515863607..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-to-options/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# url-to-options [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] - -Convert a WHATWG [URL](https://developer.mozilla.org/en/docs/Web/API/URL) to an `http.request`/`https.request` options object. - - -## Installation - -[Node.js](http://nodejs.org/) `>= 4` is required. To install, type this at the command line: -```shell -npm install url-to-options -``` - - -## Usage - -```js -const urlToOptions = require('url-to-options'); - -const url = new URL('http://user:pass@hostname:8080/'); - -const opts = urlToOptions(url); -//-> { auth:'user:pass', port:8080, … } -``` - - -[npm-image]: https://img.shields.io/npm/v/url-to-options.svg -[npm-url]: https://npmjs.org/package/url-to-options -[travis-image]: https://img.shields.io/travis/stevenvachon/url-to-options.svg -[travis-url]: https://travis-ci.org/stevenvachon/url-to-options diff --git a/advancedcontentfilter/vendor/npm-asset/url-to-options/index.js b/advancedcontentfilter/vendor/npm-asset/url-to-options/index.js deleted file mode 100644 index 25ef0bdc5..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-to-options/index.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - - - -// Copied from https://github.com/nodejs/node/blob/master/lib/internal/url.js - -function urlToOptions(url) { - var options = { - protocol: url.protocol, - hostname: url.hostname, - hash: url.hash, - search: url.search, - pathname: url.pathname, - path: `${url.pathname}${url.search}`, - href: url.href - }; - if (url.port !== '') { - options.port = Number(url.port); - } - if (url.username || url.password) { - options.auth = `${url.username}:${url.password}`; - } - return options; -} - - - -module.exports = urlToOptions; diff --git a/advancedcontentfilter/vendor/npm-asset/url-to-options/package.json b/advancedcontentfilter/vendor/npm-asset/url-to-options/package.json deleted file mode 100644 index 0dce30dd9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/url-to-options/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "url-to-options", - "description": "Convert a WHATWG URL to an http(s).request options object.", - "version": "1.0.1", - "license": "MIT", - "author": "Steven Vachon (https://www.svachon.com/)", - "repository": "stevenvachon/url-to-options", - "devDependencies": { - "universal-url": "^1.0.0-alpha" - }, - "engines": { - "node": ">= 4" - }, - "scripts": { - "test": "node test.js" - }, - "files": ["index.js"], - "keywords": [ - "http", - "https", - "url", - "whatwg" - ] -} diff --git a/advancedcontentfilter/vendor/npm-asset/util-deprecate/History.md b/advancedcontentfilter/vendor/npm-asset/util-deprecate/History.md deleted file mode 100644 index acc867537..000000000 --- a/advancedcontentfilter/vendor/npm-asset/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -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/advancedcontentfilter/vendor/npm-asset/util-deprecate/LICENSE b/advancedcontentfilter/vendor/npm-asset/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c22..000000000 --- a/advancedcontentfilter/vendor/npm-asset/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(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/advancedcontentfilter/vendor/npm-asset/util-deprecate/README.md b/advancedcontentfilter/vendor/npm-asset/util-deprecate/README.md deleted file mode 100644 index 75622fa7c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -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/advancedcontentfilter/vendor/npm-asset/util-deprecate/browser.js b/advancedcontentfilter/vendor/npm-asset/util-deprecate/browser.js deleted file mode 100644 index 549ae2f06..000000000 --- a/advancedcontentfilter/vendor/npm-asset/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * 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/advancedcontentfilter/vendor/npm-asset/util-deprecate/node.js b/advancedcontentfilter/vendor/npm-asset/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/advancedcontentfilter/vendor/npm-asset/util-deprecate/package.json b/advancedcontentfilter/vendor/npm-asset/util-deprecate/package.json deleted file mode 100644 index 2e79f89a9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/util-deprecate/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "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/advancedcontentfilter/vendor/npm-asset/vue-resource/.circleci/config.yml b/advancedcontentfilter/vendor/npm-asset/vue-resource/.circleci/config.yml deleted file mode 100644 index da719a5d0..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/.circleci/config.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: 2 - -defaults: &defaults - docker: - - image: circleci/node:9-browsers - environment: - CHROME_BIN: /usr/bin/google-chrome - working_directory: ~/vue-resource - -jobs: - build: - <<: *defaults - steps: - - run: - name: Update Environment - command: echo 'export PATH=$CIRCLE_WORKING_DIRECTORY/node_modules/.bin:$PATH' >> $BASH_ENV - - checkout - - restore_cache: - key: yarn-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn install --pure-lockfile --cache-folder ~/.yarn - - save_cache: - key: yarn-{{ checksum "yarn.lock" }} - paths: - - ~/.yarn - - run: - name: Run Tests - command: | - yarn test - karma start test/karma.conf.js --single-run --browsers Chrome,Firefox - - run: - name: Build Release - command: yarn run build diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintignore b/advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintignore deleted file mode 100644 index 38c9431b7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules -/dist -/test diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintrc.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintrc.js deleted file mode 100644 index f2bde988f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/.eslintrc.js +++ /dev/null @@ -1,44 +0,0 @@ -module.exports = { - "root":true, - "env": { - "es6": true, - "browser": true, - "commonjs": true, - }, - "extends": [ - "eslint:recommended" - ], - "parserOptions": { - "sourceType": "module" - }, - "rules": { - "brace-style": ["error", "1tbs", {"allowSingleLine": true}], - "comma-style": "error", - "comma-spacing": "error", - "eqeqeq": ["off", "smart"], - "indent": "off", - "indent-legacy": ["error", 4, {"SwitchCase": 1}], - "key-spacing": "error", - "keyword-spacing": "error", - "linebreak-style": ["error", "unix"], - "no-multi-spaces": "error", - "no-trailing-spaces": "error", - "no-lone-blocks": "error", - "no-extend-native": "error", - "no-unused-vars": ["error", {"vars": "local", "args": "none"}], - "no-empty": ["error", {"allowEmptyCatch": true}], - "no-duplicate-imports": "error", - "no-array-constructor": "error", - "no-multiple-empty-lines": "error", - "no-template-curly-in-string": "error", - "no-console": "off", - "object-curly-spacing": "error", - "quotes": ["error", "single", {"avoidEscape": true}], - "semi": ["error", "always"], - "space-infix-ops": "error", - "space-unary-ops": "error", - "space-in-parens": "error", - "space-before-blocks": "error", - "template-curly-spacing": "error" - } -}; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/.github/ISSUE_TEMPLATE.md b/advancedcontentfilter/vendor/npm-asset/vue-resource/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 26a6d3485..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,22 +0,0 @@ - - - -### Reproduction Link - - - -### Steps to reproduce - - -### What is Expected? - -### What is actually happening? diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/LICENSE b/advancedcontentfilter/vendor/npm-asset/vue-resource/LICENSE deleted file mode 100644 index 3bd6217d7..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017 steffans - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/README.md b/advancedcontentfilter/vendor/npm-asset/vue-resource/README.md deleted file mode 100644 index 59a012b55..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# vue-resource [![Build](https://img.shields.io/circleci/project/pagekit/vue-resource/develop.svg)](https://circleci.com/gh/pagekit/vue-resource) [![Downloads](https://img.shields.io/npm/dm/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![jsdelivr](https://data.jsdelivr.com/v1/package/npm/vue-resource/badge?style=rounded)](https://www.jsdelivr.com/package/npm/vue-resource) [![Version](https://img.shields.io/npm/v/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![License](https://img.shields.io/npm/l/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) - -The plugin for [Vue.js](http://vuejs.org) provides services for making web requests and handle responses using a [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) or JSONP. - -## Features - -- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API and [URI Templates](https://medialize.github.io/URI.js/uri-template.html) -- Supports [interceptors](docs/http.md#interceptors) for request and response -- Supports latest Firefox, Chrome, Safari, Opera and IE9+ -- Supports Vue 1.0 & Vue 2.0 -- Compact size 14KB (5.3KB gzipped) - -## Installation -You can install it via [yarn](https://yarnpkg.com/) or [NPM](http://npmjs.org/). -``` -$ yarn add vue-resource -$ npm install vue-resource -``` - -### CDN -Available on [jsdelivr](https://cdn.jsdelivr.net/npm/vue-resource@1.5.0), [unpkg](https://unpkg.com/vue-resource@1.5.0) or [cdnjs](https://cdnjs.com/libraries/vue-resource). -```html - -``` - -## Example -```js -{ - // GET /someUrl - this.$http.get('/someUrl').then(response => { - - // get body data - this.someData = response.body; - - }, response => { - // error callback - }); -} -``` - -## Documentation - -- [Configuration](docs/config.md) -- [HTTP Requests/Response](docs/http.md) -- [Creating Resources](docs/resource.md) -- [Code Recipes](docs/recipes.md) -- [API Reference](docs/api.md) - -## Changelog - -Details changes for each release are documented in the [release notes](https://github.com/pagekit/vue-resource/releases). - -## Contribution - -If you find a bug or want to contribute to the code or documentation, you can help by submitting an [issue](https://github.com/pagekit/vue-resource/issues) or a [pull request](https://github.com/pagekit/vue-resource/pulls). - -## License - -[MIT](http://opensource.org/licenses/MIT) diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/README.md b/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/README.md deleted file mode 100644 index b664d20b1..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# NOTE! - -The `dist` folder contains the standalone build for vue-resource, however files here are only checked-in when a release happens. If you are on the `dev` branch, files here are **NOT** up to date. Only the `master` branch contains the built files for the latest stable version. diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.common.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.common.js deleted file mode 100644 index 9bc863d51..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.common.js +++ /dev/null @@ -1,1557 +0,0 @@ -/*! - * vue-resource v1.5.0 - * https://github.com/pagekit/vue-resource - * Released under the MIT License. - */ - -'use strict'; - -/** - * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) - */ - -var RESOLVED = 0; -var REJECTED = 1; -var PENDING = 2; - -function Promise$1(executor) { - - this.state = PENDING; - this.value = undefined; - this.deferred = []; - - var promise = this; - - try { - executor(function (x) { - promise.resolve(x); - }, function (r) { - promise.reject(r); - }); - } catch (e) { - promise.reject(e); - } -} - -Promise$1.reject = function (r) { - return new Promise$1(function (resolve, reject) { - reject(r); - }); -}; - -Promise$1.resolve = function (x) { - return new Promise$1(function (resolve, reject) { - resolve(x); - }); -}; - -Promise$1.all = function all(iterable) { - return new Promise$1(function (resolve, reject) { - var count = 0, result = []; - - if (iterable.length === 0) { - resolve(result); - } - - function resolver(i) { - return function (x) { - result[i] = x; - count += 1; - - if (count === iterable.length) { - resolve(result); - } - }; - } - - for (var i = 0; i < iterable.length; i += 1) { - Promise$1.resolve(iterable[i]).then(resolver(i), reject); - } - }); -}; - -Promise$1.race = function race(iterable) { - return new Promise$1(function (resolve, reject) { - for (var i = 0; i < iterable.length; i += 1) { - Promise$1.resolve(iterable[i]).then(resolve, reject); - } - }); -}; - -var p = Promise$1.prototype; - -p.resolve = function resolve(x) { - var promise = this; - - if (promise.state === PENDING) { - if (x === promise) { - throw new TypeError('Promise settled with itself.'); - } - - var called = false; - - try { - var then = x && x['then']; - - if (x !== null && typeof x === 'object' && typeof then === 'function') { - then.call(x, function (x) { - if (!called) { - promise.resolve(x); - } - called = true; - - }, function (r) { - if (!called) { - promise.reject(r); - } - called = true; - }); - return; - } - } catch (e) { - if (!called) { - promise.reject(e); - } - return; - } - - promise.state = RESOLVED; - promise.value = x; - promise.notify(); - } -}; - -p.reject = function reject(reason) { - var promise = this; - - if (promise.state === PENDING) { - if (reason === promise) { - throw new TypeError('Promise settled with itself.'); - } - - promise.state = REJECTED; - promise.value = reason; - promise.notify(); - } -}; - -p.notify = function notify() { - var promise = this; - - nextTick(function () { - if (promise.state !== PENDING) { - while (promise.deferred.length) { - var deferred = promise.deferred.shift(), - onResolved = deferred[0], - onRejected = deferred[1], - resolve = deferred[2], - reject = deferred[3]; - - try { - if (promise.state === RESOLVED) { - if (typeof onResolved === 'function') { - resolve(onResolved.call(undefined, promise.value)); - } else { - resolve(promise.value); - } - } else if (promise.state === REJECTED) { - if (typeof onRejected === 'function') { - resolve(onRejected.call(undefined, promise.value)); - } else { - reject(promise.value); - } - } - } catch (e) { - reject(e); - } - } - } - }); -}; - -p.then = function then(onResolved, onRejected) { - var promise = this; - - return new Promise$1(function (resolve, reject) { - promise.deferred.push([onResolved, onRejected, resolve, reject]); - promise.notify(); - }); -}; - -p.catch = function (onRejected) { - return this.then(undefined, onRejected); -}; - -/** - * Promise adapter. - */ - -if (typeof Promise === 'undefined') { - window.Promise = Promise$1; -} - -function PromiseObj(executor, context) { - - if (executor instanceof Promise) { - this.promise = executor; - } else { - this.promise = new Promise(executor.bind(context)); - } - - this.context = context; -} - -PromiseObj.all = function (iterable, context) { - return new PromiseObj(Promise.all(iterable), context); -}; - -PromiseObj.resolve = function (value, context) { - return new PromiseObj(Promise.resolve(value), context); -}; - -PromiseObj.reject = function (reason, context) { - return new PromiseObj(Promise.reject(reason), context); -}; - -PromiseObj.race = function (iterable, context) { - return new PromiseObj(Promise.race(iterable), context); -}; - -var p$1 = PromiseObj.prototype; - -p$1.bind = function (context) { - this.context = context; - return this; -}; - -p$1.then = function (fulfilled, rejected) { - - if (fulfilled && fulfilled.bind && this.context) { - fulfilled = fulfilled.bind(this.context); - } - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.then(fulfilled, rejected), this.context); -}; - -p$1.catch = function (rejected) { - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.catch(rejected), this.context); -}; - -p$1.finally = function (callback) { - - return this.then(function (value) { - callback.call(this); - return value; - }, function (reason) { - callback.call(this); - return Promise.reject(reason); - } - ); -}; - -/** - * Utility functions. - */ - -var ref = {}; -var hasOwnProperty = ref.hasOwnProperty; -var ref$1 = []; -var slice = ref$1.slice; -var debug = false, ntick; - -var inBrowser = typeof window !== 'undefined'; - -function Util (ref) { - var config = ref.config; - var nextTick = ref.nextTick; - - ntick = nextTick; - debug = config.debug || !config.silent; -} - -function warn(msg) { - if (typeof console !== 'undefined' && debug) { - console.warn('[VueResource warn]: ' + msg); - } -} - -function error(msg) { - if (typeof console !== 'undefined') { - console.error(msg); - } -} - -function nextTick(cb, ctx) { - return ntick(cb, ctx); -} - -function trim(str) { - return str ? str.replace(/^\s*|\s*$/g, '') : ''; -} - -function trimEnd(str, chars) { - - if (str && chars === undefined) { - return str.replace(/\s+$/, ''); - } - - if (!str || !chars) { - return str; - } - - return str.replace(new RegExp(("[" + chars + "]+$")), ''); -} - -function toLower(str) { - return str ? str.toLowerCase() : ''; -} - -function toUpper(str) { - return str ? str.toUpperCase() : ''; -} - -var isArray = Array.isArray; - -function isString(val) { - return typeof val === 'string'; -} - -function isFunction(val) { - return typeof val === 'function'; -} - -function isObject(obj) { - return obj !== null && typeof obj === 'object'; -} - -function isPlainObject(obj) { - return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype; -} - -function isBlob(obj) { - return typeof Blob !== 'undefined' && obj instanceof Blob; -} - -function isFormData(obj) { - return typeof FormData !== 'undefined' && obj instanceof FormData; -} - -function when(value, fulfilled, rejected) { - - var promise = PromiseObj.resolve(value); - - if (arguments.length < 2) { - return promise; - } - - return promise.then(fulfilled, rejected); -} - -function options(fn, obj, opts) { - - opts = opts || {}; - - if (isFunction(opts)) { - opts = opts.call(obj); - } - - return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts}); -} - -function each(obj, iterator) { - - var i, key; - - if (isArray(obj)) { - for (i = 0; i < obj.length; i++) { - iterator.call(obj[i], obj[i], i); - } - } else if (isObject(obj)) { - for (key in obj) { - if (hasOwnProperty.call(obj, key)) { - iterator.call(obj[key], obj[key], key); - } - } - } - - return obj; -} - -var assign = Object.assign || _assign; - -function merge(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source, true); - }); - - return target; -} - -function defaults(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - - for (var key in source) { - if (target[key] === undefined) { - target[key] = source[key]; - } - } - - }); - - return target; -} - -function _assign(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source); - }); - - return target; -} - -function _merge(target, source, deep) { - for (var key in source) { - if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { - if (isPlainObject(source[key]) && !isPlainObject(target[key])) { - target[key] = {}; - } - if (isArray(source[key]) && !isArray(target[key])) { - target[key] = []; - } - _merge(target[key], source[key], deep); - } else if (source[key] !== undefined) { - target[key] = source[key]; - } - } -} - -/** - * Root Prefix Transform. - */ - -function root (options$$1, next) { - - var url = next(options$$1); - - if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) { - url = trimEnd(options$$1.root, '/') + '/' + url; - } - - return url; -} - -/** - * Query Parameter Transform. - */ - -function query (options$$1, next) { - - var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1); - - each(options$$1.params, function (value, key) { - if (urlParams.indexOf(key) === -1) { - query[key] = value; - } - }); - - query = Url.params(query); - - if (query) { - url += (url.indexOf('?') == -1 ? '?' : '&') + query; - } - - return url; -} - -/** - * URL Template v2.0.6 (https://github.com/bramstein/url-template) - */ - -function expand(url, params, variables) { - - var tmpl = parse(url), expanded = tmpl.expand(params); - - if (variables) { - variables.push.apply(variables, tmpl.vars); - } - - return expanded; -} - -function parse(template) { - - var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = []; - - return { - vars: variables, - expand: function expand(context) { - return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) { - if (expression) { - - var operator = null, values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - variables.push(tmp[1]); - }); - - if (operator && operator !== '+') { - - var separator = ','; - - if (operator === '?') { - separator = '&'; - } else if (operator !== '#') { - separator = operator; - } - - return (values.length !== 0 ? operator : '') + values.join(separator); - } else { - return values.join(','); - } - - } else { - return encodeReserved(literal); - } - }); - } - }; -} - -function getValues(context, operator, key, modifier) { - - var value = context[key], result = []; - - if (isDefined(value) && value !== '') { - if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { - value = value.toString(); - - if (modifier && modifier !== '*') { - value = value.substring(0, parseInt(modifier, 10)); - } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - } else { - if (modifier === '*') { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - var tmp = []; - - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeURIComponent(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - - if (isKeyOperator(operator)) { - result.push(encodeURIComponent(key) + '=' + tmp.join(',')); - } else if (tmp.length !== 0) { - result.push(tmp.join(',')); - } - } - } - } else { - if (operator === ';') { - result.push(encodeURIComponent(key)); - } else if (value === '' && (operator === '&' || operator === '?')) { - result.push(encodeURIComponent(key) + '='); - } else if (value === '') { - result.push(''); - } - } - - return result; -} - -function isDefined(value) { - return value !== undefined && value !== null; -} - -function isKeyOperator(operator) { - return operator === ';' || operator === '&' || operator === '?'; -} - -function encodeValue(operator, value, key) { - - value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value); - - if (key) { - return encodeURIComponent(key) + '=' + value; - } else { - return value; - } -} - -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part); - } - return part; - }).join(''); -} - -/** - * URL Template (RFC 6570) Transform. - */ - -function template (options) { - - var variables = [], url = expand(options.url, options.params, variables); - - variables.forEach(function (key) { - delete options.params[key]; - }); - - return url; -} - -/** - * Service for URL templating. - */ - -function Url(url, params) { - - var self = this || {}, options$$1 = url, transform; - - if (isString(url)) { - options$$1 = {url: url, params: params}; - } - - options$$1 = merge({}, Url.options, self.$options, options$$1); - - Url.transforms.forEach(function (handler) { - - if (isString(handler)) { - handler = Url.transform[handler]; - } - - if (isFunction(handler)) { - transform = factory(handler, transform, self.$vm); - } - - }); - - return transform(options$$1); -} - -/** - * Url options. - */ - -Url.options = { - url: '', - root: null, - params: {} -}; - -/** - * Url transforms. - */ - -Url.transform = {template: template, query: query, root: root}; -Url.transforms = ['template', 'query', 'root']; - -/** - * Encodes a Url parameter string. - * - * @param {Object} obj - */ - -Url.params = function (obj) { - - var params = [], escape = encodeURIComponent; - - params.add = function (key, value) { - - if (isFunction(value)) { - value = value(); - } - - if (value === null) { - value = ''; - } - - this.push(escape(key) + '=' + escape(value)); - }; - - serialize(params, obj); - - return params.join('&').replace(/%20/g, '+'); -}; - -/** - * Parse a URL and return its components. - * - * @param {String} url - */ - -Url.parse = function (url) { - - var el = document.createElement('a'); - - if (document.documentMode) { - el.href = url; - url = el.href; - } - - el.href = url; - - return { - href: el.href, - protocol: el.protocol ? el.protocol.replace(/:$/, '') : '', - port: el.port, - host: el.host, - hostname: el.hostname, - pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname, - search: el.search ? el.search.replace(/^\?/, '') : '', - hash: el.hash ? el.hash.replace(/^#/, '') : '' - }; -}; - -function factory(handler, next, vm) { - return function (options$$1) { - return handler.call(vm, options$$1, next); - }; -} - -function serialize(params, obj, scope) { - - var array = isArray(obj), plain = isPlainObject(obj), hash; - - each(obj, function (value, key) { - - hash = isObject(value) || isArray(value); - - if (scope) { - key = scope + '[' + (plain || hash ? key : '') + ']'; - } - - if (!scope && array) { - params.add(value.name, value.value); - } else if (hash) { - serialize(params, value, key); - } else { - params.add(key, value); - } - }); -} - -/** - * XDomain client (Internet Explorer). - */ - -function xdrClient (request) { - return new PromiseObj(function (resolve) { - - var xdr = new XDomainRequest(), handler = function (ref) { - var type = ref.type; - - - var status = 0; - - if (type === 'load') { - status = 200; - } else if (type === 'error') { - status = 500; - } - - resolve(request.respondWith(xdr.responseText, {status: status})); - }; - - request.abort = function () { return xdr.abort(); }; - - xdr.open(request.method, request.getUrl()); - - if (request.timeout) { - xdr.timeout = request.timeout; - } - - xdr.onload = handler; - xdr.onabort = handler; - xdr.onerror = handler; - xdr.ontimeout = handler; - xdr.onprogress = function () {}; - xdr.send(request.getBody()); - }); -} - -/** - * CORS Interceptor. - */ - -var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest(); - -function cors (request) { - - if (inBrowser) { - - var orgUrl = Url.parse(location.href); - var reqUrl = Url.parse(request.getUrl()); - - if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) { - - request.crossOrigin = true; - request.emulateHTTP = false; - - if (!SUPPORTS_CORS) { - request.client = xdrClient; - } - } - } - -} - -/** - * Form data Interceptor. - */ - -function form (request) { - - if (isFormData(request.body)) { - request.headers.delete('Content-Type'); - } else if (isObject(request.body) && request.emulateJSON) { - request.body = Url.params(request.body); - request.headers.set('Content-Type', 'application/x-www-form-urlencoded'); - } - -} - -/** - * JSON Interceptor. - */ - -function json (request) { - - var type = request.headers.get('Content-Type') || ''; - - if (isObject(request.body) && type.indexOf('application/json') === 0) { - request.body = JSON.stringify(request.body); - } - - return function (response) { - - return response.bodyText ? when(response.text(), function (text) { - - var type = response.headers.get('Content-Type') || ''; - - if (type.indexOf('application/json') === 0 || isJson(text)) { - - try { - response.body = JSON.parse(text); - } catch (e) { - response.body = null; - } - - } else { - response.body = text; - } - - return response; - - }) : response; - - }; -} - -function isJson(str) { - - var start = str.match(/^\s*(\[|\{)/); - var end = {'[': /]\s*$/, '{': /}\s*$/}; - - return start && end[start[1]].test(str); -} - -/** - * JSONP client (Browser). - */ - -function jsonpClient (request) { - return new PromiseObj(function (resolve) { - - var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script; - - handler = function (ref) { - var type = ref.type; - - - var status = 0; - - if (type === 'load' && body !== null) { - status = 200; - } else if (type === 'error') { - status = 500; - } - - if (status && window[callback]) { - delete window[callback]; - document.body.removeChild(script); - } - - resolve(request.respondWith(body, {status: status})); - }; - - window[callback] = function (result) { - body = JSON.stringify(result); - }; - - request.abort = function () { - handler({type: 'abort'}); - }; - - request.params[name] = callback; - - if (request.timeout) { - setTimeout(request.abort, request.timeout); - } - - script = document.createElement('script'); - script.src = request.getUrl(); - script.type = 'text/javascript'; - script.async = true; - script.onload = handler; - script.onerror = handler; - - document.body.appendChild(script); - }); -} - -/** - * JSONP Interceptor. - */ - -function jsonp (request) { - - if (request.method == 'JSONP') { - request.client = jsonpClient; - } - -} - -/** - * Before Interceptor. - */ - -function before (request) { - - if (isFunction(request.before)) { - request.before.call(this, request); - } - -} - -/** - * HTTP method override Interceptor. - */ - -function method (request) { - - if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) { - request.headers.set('X-HTTP-Method-Override', request.method); - request.method = 'POST'; - } - -} - -/** - * Header Interceptor. - */ - -function header (request) { - - var headers = assign({}, Http.headers.common, - !request.crossOrigin ? Http.headers.custom : {}, - Http.headers[toLower(request.method)] - ); - - each(headers, function (value, name) { - if (!request.headers.has(name)) { - request.headers.set(name, value); - } - }); - -} - -/** - * XMLHttp client (Browser). - */ - -function xhrClient (request) { - return new PromiseObj(function (resolve) { - - var xhr = new XMLHttpRequest(), handler = function (event) { - - var response = request.respondWith( - 'response' in xhr ? xhr.response : xhr.responseText, { - status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug - statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText) - }); - - each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) { - response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1)); - }); - - resolve(response); - }; - - request.abort = function () { return xhr.abort(); }; - - xhr.open(request.method, request.getUrl(), true); - - if (request.timeout) { - xhr.timeout = request.timeout; - } - - if (request.responseType && 'responseType' in xhr) { - xhr.responseType = request.responseType; - } - - if (request.withCredentials || request.credentials) { - xhr.withCredentials = true; - } - - if (!request.crossOrigin) { - request.headers.set('X-Requested-With', 'XMLHttpRequest'); - } - - // deprecated use downloadProgress - if (isFunction(request.progress) && request.method === 'GET') { - xhr.addEventListener('progress', request.progress); - } - - if (isFunction(request.downloadProgress)) { - xhr.addEventListener('progress', request.downloadProgress); - } - - // deprecated use uploadProgress - if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) { - xhr.upload.addEventListener('progress', request.progress); - } - - if (isFunction(request.uploadProgress) && xhr.upload) { - xhr.upload.addEventListener('progress', request.uploadProgress); - } - - request.headers.forEach(function (value, name) { - xhr.setRequestHeader(name, value); - }); - - xhr.onload = handler; - xhr.onabort = handler; - xhr.onerror = handler; - xhr.ontimeout = handler; - xhr.send(request.getBody()); - }); -} - -/** - * Http client (Node). - */ - -function nodeClient (request) { - - var client = require('got'); - - return new PromiseObj(function (resolve) { - - var url = request.getUrl(); - var body = request.getBody(); - var method = request.method; - var headers = {}, handler; - - request.headers.forEach(function (value, name) { - headers[name] = value; - }); - - client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) { - - var response = request.respondWith(resp.body, { - status: resp.statusCode, - statusText: trim(resp.statusMessage) - }); - - each(resp.headers, function (value, name) { - response.headers.set(name, value); - }); - - resolve(response); - - }, function (error$$1) { return handler(error$$1.response); }); - }); -} - -/** - * Base client. - */ - -function Client (context) { - - var reqHandlers = [sendRequest], resHandlers = []; - - if (!isObject(context)) { - context = null; - } - - function Client(request) { - while (reqHandlers.length) { - - var handler = reqHandlers.pop(); - - if (isFunction(handler)) { - - var response = (void 0), next = (void 0); - - response = handler.call(context, request, function (val) { return next = val; }) || next; - - if (isObject(response)) { - return new PromiseObj(function (resolve, reject) { - - resHandlers.forEach(function (handler) { - response = when(response, function (response) { - return handler.call(context, response) || response; - }, reject); - }); - - when(response, resolve, reject); - - }, context); - } - - if (isFunction(response)) { - resHandlers.unshift(response); - } - - } else { - warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function")); - } - } - } - - Client.use = function (handler) { - reqHandlers.push(handler); - }; - - return Client; -} - -function sendRequest(request) { - - var client = request.client || (inBrowser ? xhrClient : nodeClient); - - return client(request); -} - -/** - * HTTP Headers. - */ - -var Headers = function Headers(headers) { - var this$1 = this; - - - this.map = {}; - - each(headers, function (value, name) { return this$1.append(name, value); }); -}; - -Headers.prototype.has = function has (name) { - return getName(this.map, name) !== null; -}; - -Headers.prototype.get = function get (name) { - - var list = this.map[getName(this.map, name)]; - - return list ? list.join() : null; -}; - -Headers.prototype.getAll = function getAll (name) { - return this.map[getName(this.map, name)] || []; -}; - -Headers.prototype.set = function set (name, value) { - this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)]; -}; - -Headers.prototype.append = function append (name, value) { - - var list = this.map[getName(this.map, name)]; - - if (list) { - list.push(trim(value)); - } else { - this.set(name, value); - } -}; - -Headers.prototype.delete = function delete$1 (name) { - delete this.map[getName(this.map, name)]; -}; - -Headers.prototype.deleteAll = function deleteAll () { - this.map = {}; -}; - -Headers.prototype.forEach = function forEach (callback, thisArg) { - var this$1 = this; - - each(this.map, function (list, name) { - each(list, function (value) { return callback.call(thisArg, value, name, this$1); }); - }); -}; - -function getName(map, name) { - return Object.keys(map).reduce(function (prev, curr) { - return toLower(name) === toLower(curr) ? curr : prev; - }, null); -} - -function normalizeName(name) { - - if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { - throw new TypeError('Invalid character in header field name'); - } - - return trim(name); -} - -/** - * HTTP Response. - */ - -var Response = function Response(body, ref) { - var url = ref.url; - var headers = ref.headers; - var status = ref.status; - var statusText = ref.statusText; - - - this.url = url; - this.ok = status >= 200 && status < 300; - this.status = status || 0; - this.statusText = statusText || ''; - this.headers = new Headers(headers); - this.body = body; - - if (isString(body)) { - - this.bodyText = body; - - } else if (isBlob(body)) { - - this.bodyBlob = body; - - if (isBlobText(body)) { - this.bodyText = blobText(body); - } - } -}; - -Response.prototype.blob = function blob () { - return when(this.bodyBlob); -}; - -Response.prototype.text = function text () { - return when(this.bodyText); -}; - -Response.prototype.json = function json () { - return when(this.text(), function (text) { return JSON.parse(text); }); -}; - -Object.defineProperty(Response.prototype, 'data', { - - get: function get() { - return this.body; - }, - - set: function set(body) { - this.body = body; - } - -}); - -function blobText(body) { - return new PromiseObj(function (resolve) { - - var reader = new FileReader(); - - reader.readAsText(body); - reader.onload = function () { - resolve(reader.result); - }; - - }); -} - -function isBlobText(body) { - return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1; -} - -/** - * HTTP Request. - */ - -var Request = function Request(options$$1) { - - this.body = null; - this.params = {}; - - assign(this, options$$1, { - method: toUpper(options$$1.method || 'GET') - }); - - if (!(this.headers instanceof Headers)) { - this.headers = new Headers(this.headers); - } -}; - -Request.prototype.getUrl = function getUrl () { - return Url(this); -}; - -Request.prototype.getBody = function getBody () { - return this.body; -}; - -Request.prototype.respondWith = function respondWith (body, options$$1) { - return new Response(body, assign(options$$1 || {}, {url: this.getUrl()})); -}; - -/** - * Service for sending network requests. - */ - -var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'}; -var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'}; - -function Http(options$$1) { - - var self = this || {}, client = Client(self.$vm); - - defaults(options$$1 || {}, self.$options, Http.options); - - Http.interceptors.forEach(function (handler) { - - if (isString(handler)) { - handler = Http.interceptor[handler]; - } - - if (isFunction(handler)) { - client.use(handler); - } - - }); - - return client(new Request(options$$1)).then(function (response) { - - return response.ok ? response : PromiseObj.reject(response); - - }, function (response) { - - if (response instanceof Error) { - error(response); - } - - return PromiseObj.reject(response); - }); -} - -Http.options = {}; - -Http.headers = { - put: JSON_CONTENT_TYPE, - post: JSON_CONTENT_TYPE, - patch: JSON_CONTENT_TYPE, - delete: JSON_CONTENT_TYPE, - common: COMMON_HEADERS, - custom: {} -}; - -Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors}; -Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors']; - -['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) { - - Http[method$$1] = function (url, options$$1) { - return this(assign(options$$1 || {}, {url: url, method: method$$1})); - }; - -}); - -['post', 'put', 'patch'].forEach(function (method$$1) { - - Http[method$$1] = function (url, body, options$$1) { - return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body})); - }; - -}); - -/** - * Service for interacting with RESTful services. - */ - -function Resource(url, params, actions, options$$1) { - - var self = this || {}, resource = {}; - - actions = assign({}, - Resource.actions, - actions - ); - - each(actions, function (action, name) { - - action = merge({url: url, params: assign({}, params)}, options$$1, action); - - resource[name] = function () { - return (self.$http || Http)(opts(action, arguments)); - }; - }); - - return resource; -} - -function opts(action, args) { - - var options$$1 = assign({}, action), params = {}, body; - - switch (args.length) { - - case 2: - - params = args[0]; - body = args[1]; - - break; - - case 1: - - if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) { - body = args[0]; - } else { - params = args[0]; - } - - break; - - case 0: - - break; - - default: - - throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments'; - } - - options$$1.body = body; - options$$1.params = assign({}, options$$1.params, params); - - return options$$1; -} - -Resource.actions = { - - get: {method: 'GET'}, - save: {method: 'POST'}, - query: {method: 'GET'}, - update: {method: 'PUT'}, - remove: {method: 'DELETE'}, - delete: {method: 'DELETE'} - -}; - -/** - * Install plugin. - */ - -function plugin(Vue) { - - if (plugin.installed) { - return; - } - - Util(Vue); - - Vue.url = Url; - Vue.http = Http; - Vue.resource = Resource; - Vue.Promise = PromiseObj; - - Object.defineProperties(Vue.prototype, { - - $url: { - get: function get() { - return options(Vue.url, this, this.$options.url); - } - }, - - $http: { - get: function get() { - return options(Vue.http, this, this.$options.http); - } - }, - - $resource: { - get: function get() { - return Vue.resource.bind(this); - } - }, - - $promise: { - get: function get() { - var this$1 = this; - - return function (executor) { return new Vue.Promise(executor, this$1); }; - } - } - - }); -} - -if (typeof window !== 'undefined' && window.Vue) { - window.Vue.use(plugin); -} - -module.exports = plugin; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.esm.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.esm.js deleted file mode 100644 index 08303bc8d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.esm.js +++ /dev/null @@ -1,1556 +0,0 @@ -/*! - * vue-resource v1.5.0 - * https://github.com/pagekit/vue-resource - * Released under the MIT License. - */ - -/** - * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) - */ - -var RESOLVED = 0; -var REJECTED = 1; -var PENDING = 2; - -function Promise$1(executor) { - - this.state = PENDING; - this.value = undefined; - this.deferred = []; - - var promise = this; - - try { - executor(function (x) { - promise.resolve(x); - }, function (r) { - promise.reject(r); - }); - } catch (e) { - promise.reject(e); - } -} - -Promise$1.reject = function (r) { - return new Promise$1(function (resolve, reject) { - reject(r); - }); -}; - -Promise$1.resolve = function (x) { - return new Promise$1(function (resolve, reject) { - resolve(x); - }); -}; - -Promise$1.all = function all(iterable) { - return new Promise$1(function (resolve, reject) { - var count = 0, result = []; - - if (iterable.length === 0) { - resolve(result); - } - - function resolver(i) { - return function (x) { - result[i] = x; - count += 1; - - if (count === iterable.length) { - resolve(result); - } - }; - } - - for (var i = 0; i < iterable.length; i += 1) { - Promise$1.resolve(iterable[i]).then(resolver(i), reject); - } - }); -}; - -Promise$1.race = function race(iterable) { - return new Promise$1(function (resolve, reject) { - for (var i = 0; i < iterable.length; i += 1) { - Promise$1.resolve(iterable[i]).then(resolve, reject); - } - }); -}; - -var p = Promise$1.prototype; - -p.resolve = function resolve(x) { - var promise = this; - - if (promise.state === PENDING) { - if (x === promise) { - throw new TypeError('Promise settled with itself.'); - } - - var called = false; - - try { - var then = x && x['then']; - - if (x !== null && typeof x === 'object' && typeof then === 'function') { - then.call(x, function (x) { - if (!called) { - promise.resolve(x); - } - called = true; - - }, function (r) { - if (!called) { - promise.reject(r); - } - called = true; - }); - return; - } - } catch (e) { - if (!called) { - promise.reject(e); - } - return; - } - - promise.state = RESOLVED; - promise.value = x; - promise.notify(); - } -}; - -p.reject = function reject(reason) { - var promise = this; - - if (promise.state === PENDING) { - if (reason === promise) { - throw new TypeError('Promise settled with itself.'); - } - - promise.state = REJECTED; - promise.value = reason; - promise.notify(); - } -}; - -p.notify = function notify() { - var promise = this; - - nextTick(function () { - if (promise.state !== PENDING) { - while (promise.deferred.length) { - var deferred = promise.deferred.shift(), - onResolved = deferred[0], - onRejected = deferred[1], - resolve = deferred[2], - reject = deferred[3]; - - try { - if (promise.state === RESOLVED) { - if (typeof onResolved === 'function') { - resolve(onResolved.call(undefined, promise.value)); - } else { - resolve(promise.value); - } - } else if (promise.state === REJECTED) { - if (typeof onRejected === 'function') { - resolve(onRejected.call(undefined, promise.value)); - } else { - reject(promise.value); - } - } - } catch (e) { - reject(e); - } - } - } - }); -}; - -p.then = function then(onResolved, onRejected) { - var promise = this; - - return new Promise$1(function (resolve, reject) { - promise.deferred.push([onResolved, onRejected, resolve, reject]); - promise.notify(); - }); -}; - -p.catch = function (onRejected) { - return this.then(undefined, onRejected); -}; - -/** - * Promise adapter. - */ - -if (typeof Promise === 'undefined') { - window.Promise = Promise$1; -} - -function PromiseObj(executor, context) { - - if (executor instanceof Promise) { - this.promise = executor; - } else { - this.promise = new Promise(executor.bind(context)); - } - - this.context = context; -} - -PromiseObj.all = function (iterable, context) { - return new PromiseObj(Promise.all(iterable), context); -}; - -PromiseObj.resolve = function (value, context) { - return new PromiseObj(Promise.resolve(value), context); -}; - -PromiseObj.reject = function (reason, context) { - return new PromiseObj(Promise.reject(reason), context); -}; - -PromiseObj.race = function (iterable, context) { - return new PromiseObj(Promise.race(iterable), context); -}; - -var p$1 = PromiseObj.prototype; - -p$1.bind = function (context) { - this.context = context; - return this; -}; - -p$1.then = function (fulfilled, rejected) { - - if (fulfilled && fulfilled.bind && this.context) { - fulfilled = fulfilled.bind(this.context); - } - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.then(fulfilled, rejected), this.context); -}; - -p$1.catch = function (rejected) { - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.catch(rejected), this.context); -}; - -p$1.finally = function (callback) { - - return this.then(function (value) { - callback.call(this); - return value; - }, function (reason) { - callback.call(this); - return Promise.reject(reason); - } - ); -}; - -/** - * Utility functions. - */ - -var ref = {}; -var hasOwnProperty = ref.hasOwnProperty; -var ref$1 = []; -var slice = ref$1.slice; -var debug = false, ntick; - -var inBrowser = typeof window !== 'undefined'; - -function Util (ref) { - var config = ref.config; - var nextTick = ref.nextTick; - - ntick = nextTick; - debug = config.debug || !config.silent; -} - -function warn(msg) { - if (typeof console !== 'undefined' && debug) { - console.warn('[VueResource warn]: ' + msg); - } -} - -function error(msg) { - if (typeof console !== 'undefined') { - console.error(msg); - } -} - -function nextTick(cb, ctx) { - return ntick(cb, ctx); -} - -function trim(str) { - return str ? str.replace(/^\s*|\s*$/g, '') : ''; -} - -function trimEnd(str, chars) { - - if (str && chars === undefined) { - return str.replace(/\s+$/, ''); - } - - if (!str || !chars) { - return str; - } - - return str.replace(new RegExp(("[" + chars + "]+$")), ''); -} - -function toLower(str) { - return str ? str.toLowerCase() : ''; -} - -function toUpper(str) { - return str ? str.toUpperCase() : ''; -} - -var isArray = Array.isArray; - -function isString(val) { - return typeof val === 'string'; -} - -function isFunction(val) { - return typeof val === 'function'; -} - -function isObject(obj) { - return obj !== null && typeof obj === 'object'; -} - -function isPlainObject(obj) { - return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype; -} - -function isBlob(obj) { - return typeof Blob !== 'undefined' && obj instanceof Blob; -} - -function isFormData(obj) { - return typeof FormData !== 'undefined' && obj instanceof FormData; -} - -function when(value, fulfilled, rejected) { - - var promise = PromiseObj.resolve(value); - - if (arguments.length < 2) { - return promise; - } - - return promise.then(fulfilled, rejected); -} - -function options(fn, obj, opts) { - - opts = opts || {}; - - if (isFunction(opts)) { - opts = opts.call(obj); - } - - return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts}); -} - -function each(obj, iterator) { - - var i, key; - - if (isArray(obj)) { - for (i = 0; i < obj.length; i++) { - iterator.call(obj[i], obj[i], i); - } - } else if (isObject(obj)) { - for (key in obj) { - if (hasOwnProperty.call(obj, key)) { - iterator.call(obj[key], obj[key], key); - } - } - } - - return obj; -} - -var assign = Object.assign || _assign; - -function merge(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source, true); - }); - - return target; -} - -function defaults(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - - for (var key in source) { - if (target[key] === undefined) { - target[key] = source[key]; - } - } - - }); - - return target; -} - -function _assign(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source); - }); - - return target; -} - -function _merge(target, source, deep) { - for (var key in source) { - if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { - if (isPlainObject(source[key]) && !isPlainObject(target[key])) { - target[key] = {}; - } - if (isArray(source[key]) && !isArray(target[key])) { - target[key] = []; - } - _merge(target[key], source[key], deep); - } else if (source[key] !== undefined) { - target[key] = source[key]; - } - } -} - -/** - * Root Prefix Transform. - */ - -function root (options$$1, next) { - - var url = next(options$$1); - - if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) { - url = trimEnd(options$$1.root, '/') + '/' + url; - } - - return url; -} - -/** - * Query Parameter Transform. - */ - -function query (options$$1, next) { - - var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1); - - each(options$$1.params, function (value, key) { - if (urlParams.indexOf(key) === -1) { - query[key] = value; - } - }); - - query = Url.params(query); - - if (query) { - url += (url.indexOf('?') == -1 ? '?' : '&') + query; - } - - return url; -} - -/** - * URL Template v2.0.6 (https://github.com/bramstein/url-template) - */ - -function expand(url, params, variables) { - - var tmpl = parse(url), expanded = tmpl.expand(params); - - if (variables) { - variables.push.apply(variables, tmpl.vars); - } - - return expanded; -} - -function parse(template) { - - var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = []; - - return { - vars: variables, - expand: function expand(context) { - return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) { - if (expression) { - - var operator = null, values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - variables.push(tmp[1]); - }); - - if (operator && operator !== '+') { - - var separator = ','; - - if (operator === '?') { - separator = '&'; - } else if (operator !== '#') { - separator = operator; - } - - return (values.length !== 0 ? operator : '') + values.join(separator); - } else { - return values.join(','); - } - - } else { - return encodeReserved(literal); - } - }); - } - }; -} - -function getValues(context, operator, key, modifier) { - - var value = context[key], result = []; - - if (isDefined(value) && value !== '') { - if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { - value = value.toString(); - - if (modifier && modifier !== '*') { - value = value.substring(0, parseInt(modifier, 10)); - } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - } else { - if (modifier === '*') { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - var tmp = []; - - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeURIComponent(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - - if (isKeyOperator(operator)) { - result.push(encodeURIComponent(key) + '=' + tmp.join(',')); - } else if (tmp.length !== 0) { - result.push(tmp.join(',')); - } - } - } - } else { - if (operator === ';') { - result.push(encodeURIComponent(key)); - } else if (value === '' && (operator === '&' || operator === '?')) { - result.push(encodeURIComponent(key) + '='); - } else if (value === '') { - result.push(''); - } - } - - return result; -} - -function isDefined(value) { - return value !== undefined && value !== null; -} - -function isKeyOperator(operator) { - return operator === ';' || operator === '&' || operator === '?'; -} - -function encodeValue(operator, value, key) { - - value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value); - - if (key) { - return encodeURIComponent(key) + '=' + value; - } else { - return value; - } -} - -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part); - } - return part; - }).join(''); -} - -/** - * URL Template (RFC 6570) Transform. - */ - -function template (options) { - - var variables = [], url = expand(options.url, options.params, variables); - - variables.forEach(function (key) { - delete options.params[key]; - }); - - return url; -} - -/** - * Service for URL templating. - */ - -function Url(url, params) { - - var self = this || {}, options$$1 = url, transform; - - if (isString(url)) { - options$$1 = {url: url, params: params}; - } - - options$$1 = merge({}, Url.options, self.$options, options$$1); - - Url.transforms.forEach(function (handler) { - - if (isString(handler)) { - handler = Url.transform[handler]; - } - - if (isFunction(handler)) { - transform = factory(handler, transform, self.$vm); - } - - }); - - return transform(options$$1); -} - -/** - * Url options. - */ - -Url.options = { - url: '', - root: null, - params: {} -}; - -/** - * Url transforms. - */ - -Url.transform = {template: template, query: query, root: root}; -Url.transforms = ['template', 'query', 'root']; - -/** - * Encodes a Url parameter string. - * - * @param {Object} obj - */ - -Url.params = function (obj) { - - var params = [], escape = encodeURIComponent; - - params.add = function (key, value) { - - if (isFunction(value)) { - value = value(); - } - - if (value === null) { - value = ''; - } - - this.push(escape(key) + '=' + escape(value)); - }; - - serialize(params, obj); - - return params.join('&').replace(/%20/g, '+'); -}; - -/** - * Parse a URL and return its components. - * - * @param {String} url - */ - -Url.parse = function (url) { - - var el = document.createElement('a'); - - if (document.documentMode) { - el.href = url; - url = el.href; - } - - el.href = url; - - return { - href: el.href, - protocol: el.protocol ? el.protocol.replace(/:$/, '') : '', - port: el.port, - host: el.host, - hostname: el.hostname, - pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname, - search: el.search ? el.search.replace(/^\?/, '') : '', - hash: el.hash ? el.hash.replace(/^#/, '') : '' - }; -}; - -function factory(handler, next, vm) { - return function (options$$1) { - return handler.call(vm, options$$1, next); - }; -} - -function serialize(params, obj, scope) { - - var array = isArray(obj), plain = isPlainObject(obj), hash; - - each(obj, function (value, key) { - - hash = isObject(value) || isArray(value); - - if (scope) { - key = scope + '[' + (plain || hash ? key : '') + ']'; - } - - if (!scope && array) { - params.add(value.name, value.value); - } else if (hash) { - serialize(params, value, key); - } else { - params.add(key, value); - } - }); -} - -/** - * XDomain client (Internet Explorer). - */ - -function xdrClient (request) { - return new PromiseObj(function (resolve) { - - var xdr = new XDomainRequest(), handler = function (ref) { - var type = ref.type; - - - var status = 0; - - if (type === 'load') { - status = 200; - } else if (type === 'error') { - status = 500; - } - - resolve(request.respondWith(xdr.responseText, {status: status})); - }; - - request.abort = function () { return xdr.abort(); }; - - xdr.open(request.method, request.getUrl()); - - if (request.timeout) { - xdr.timeout = request.timeout; - } - - xdr.onload = handler; - xdr.onabort = handler; - xdr.onerror = handler; - xdr.ontimeout = handler; - xdr.onprogress = function () {}; - xdr.send(request.getBody()); - }); -} - -/** - * CORS Interceptor. - */ - -var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest(); - -function cors (request) { - - if (inBrowser) { - - var orgUrl = Url.parse(location.href); - var reqUrl = Url.parse(request.getUrl()); - - if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) { - - request.crossOrigin = true; - request.emulateHTTP = false; - - if (!SUPPORTS_CORS) { - request.client = xdrClient; - } - } - } - -} - -/** - * Form data Interceptor. - */ - -function form (request) { - - if (isFormData(request.body)) { - request.headers.delete('Content-Type'); - } else if (isObject(request.body) && request.emulateJSON) { - request.body = Url.params(request.body); - request.headers.set('Content-Type', 'application/x-www-form-urlencoded'); - } - -} - -/** - * JSON Interceptor. - */ - -function json (request) { - - var type = request.headers.get('Content-Type') || ''; - - if (isObject(request.body) && type.indexOf('application/json') === 0) { - request.body = JSON.stringify(request.body); - } - - return function (response) { - - return response.bodyText ? when(response.text(), function (text) { - - var type = response.headers.get('Content-Type') || ''; - - if (type.indexOf('application/json') === 0 || isJson(text)) { - - try { - response.body = JSON.parse(text); - } catch (e) { - response.body = null; - } - - } else { - response.body = text; - } - - return response; - - }) : response; - - }; -} - -function isJson(str) { - - var start = str.match(/^\s*(\[|\{)/); - var end = {'[': /]\s*$/, '{': /}\s*$/}; - - return start && end[start[1]].test(str); -} - -/** - * JSONP client (Browser). - */ - -function jsonpClient (request) { - return new PromiseObj(function (resolve) { - - var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script; - - handler = function (ref) { - var type = ref.type; - - - var status = 0; - - if (type === 'load' && body !== null) { - status = 200; - } else if (type === 'error') { - status = 500; - } - - if (status && window[callback]) { - delete window[callback]; - document.body.removeChild(script); - } - - resolve(request.respondWith(body, {status: status})); - }; - - window[callback] = function (result) { - body = JSON.stringify(result); - }; - - request.abort = function () { - handler({type: 'abort'}); - }; - - request.params[name] = callback; - - if (request.timeout) { - setTimeout(request.abort, request.timeout); - } - - script = document.createElement('script'); - script.src = request.getUrl(); - script.type = 'text/javascript'; - script.async = true; - script.onload = handler; - script.onerror = handler; - - document.body.appendChild(script); - }); -} - -/** - * JSONP Interceptor. - */ - -function jsonp (request) { - - if (request.method == 'JSONP') { - request.client = jsonpClient; - } - -} - -/** - * Before Interceptor. - */ - -function before (request) { - - if (isFunction(request.before)) { - request.before.call(this, request); - } - -} - -/** - * HTTP method override Interceptor. - */ - -function method (request) { - - if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) { - request.headers.set('X-HTTP-Method-Override', request.method); - request.method = 'POST'; - } - -} - -/** - * Header Interceptor. - */ - -function header (request) { - - var headers = assign({}, Http.headers.common, - !request.crossOrigin ? Http.headers.custom : {}, - Http.headers[toLower(request.method)] - ); - - each(headers, function (value, name) { - if (!request.headers.has(name)) { - request.headers.set(name, value); - } - }); - -} - -/** - * XMLHttp client (Browser). - */ - -function xhrClient (request) { - return new PromiseObj(function (resolve) { - - var xhr = new XMLHttpRequest(), handler = function (event) { - - var response = request.respondWith( - 'response' in xhr ? xhr.response : xhr.responseText, { - status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug - statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText) - }); - - each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) { - response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1)); - }); - - resolve(response); - }; - - request.abort = function () { return xhr.abort(); }; - - xhr.open(request.method, request.getUrl(), true); - - if (request.timeout) { - xhr.timeout = request.timeout; - } - - if (request.responseType && 'responseType' in xhr) { - xhr.responseType = request.responseType; - } - - if (request.withCredentials || request.credentials) { - xhr.withCredentials = true; - } - - if (!request.crossOrigin) { - request.headers.set('X-Requested-With', 'XMLHttpRequest'); - } - - // deprecated use downloadProgress - if (isFunction(request.progress) && request.method === 'GET') { - xhr.addEventListener('progress', request.progress); - } - - if (isFunction(request.downloadProgress)) { - xhr.addEventListener('progress', request.downloadProgress); - } - - // deprecated use uploadProgress - if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) { - xhr.upload.addEventListener('progress', request.progress); - } - - if (isFunction(request.uploadProgress) && xhr.upload) { - xhr.upload.addEventListener('progress', request.uploadProgress); - } - - request.headers.forEach(function (value, name) { - xhr.setRequestHeader(name, value); - }); - - xhr.onload = handler; - xhr.onabort = handler; - xhr.onerror = handler; - xhr.ontimeout = handler; - xhr.send(request.getBody()); - }); -} - -/** - * Http client (Node). - */ - -function nodeClient (request) { - - var client = require('got'); - - return new PromiseObj(function (resolve) { - - var url = request.getUrl(); - var body = request.getBody(); - var method = request.method; - var headers = {}, handler; - - request.headers.forEach(function (value, name) { - headers[name] = value; - }); - - client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) { - - var response = request.respondWith(resp.body, { - status: resp.statusCode, - statusText: trim(resp.statusMessage) - }); - - each(resp.headers, function (value, name) { - response.headers.set(name, value); - }); - - resolve(response); - - }, function (error$$1) { return handler(error$$1.response); }); - }); -} - -/** - * Base client. - */ - -function Client (context) { - - var reqHandlers = [sendRequest], resHandlers = []; - - if (!isObject(context)) { - context = null; - } - - function Client(request) { - while (reqHandlers.length) { - - var handler = reqHandlers.pop(); - - if (isFunction(handler)) { - - var response = (void 0), next = (void 0); - - response = handler.call(context, request, function (val) { return next = val; }) || next; - - if (isObject(response)) { - return new PromiseObj(function (resolve, reject) { - - resHandlers.forEach(function (handler) { - response = when(response, function (response) { - return handler.call(context, response) || response; - }, reject); - }); - - when(response, resolve, reject); - - }, context); - } - - if (isFunction(response)) { - resHandlers.unshift(response); - } - - } else { - warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function")); - } - } - } - - Client.use = function (handler) { - reqHandlers.push(handler); - }; - - return Client; -} - -function sendRequest(request) { - - var client = request.client || (inBrowser ? xhrClient : nodeClient); - - return client(request); -} - -/** - * HTTP Headers. - */ - -var Headers = function Headers(headers) { - var this$1 = this; - - - this.map = {}; - - each(headers, function (value, name) { return this$1.append(name, value); }); -}; - -Headers.prototype.has = function has (name) { - return getName(this.map, name) !== null; -}; - -Headers.prototype.get = function get (name) { - - var list = this.map[getName(this.map, name)]; - - return list ? list.join() : null; -}; - -Headers.prototype.getAll = function getAll (name) { - return this.map[getName(this.map, name)] || []; -}; - -Headers.prototype.set = function set (name, value) { - this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)]; -}; - -Headers.prototype.append = function append (name, value) { - - var list = this.map[getName(this.map, name)]; - - if (list) { - list.push(trim(value)); - } else { - this.set(name, value); - } -}; - -Headers.prototype.delete = function delete$1 (name) { - delete this.map[getName(this.map, name)]; -}; - -Headers.prototype.deleteAll = function deleteAll () { - this.map = {}; -}; - -Headers.prototype.forEach = function forEach (callback, thisArg) { - var this$1 = this; - - each(this.map, function (list, name) { - each(list, function (value) { return callback.call(thisArg, value, name, this$1); }); - }); -}; - -function getName(map, name) { - return Object.keys(map).reduce(function (prev, curr) { - return toLower(name) === toLower(curr) ? curr : prev; - }, null); -} - -function normalizeName(name) { - - if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { - throw new TypeError('Invalid character in header field name'); - } - - return trim(name); -} - -/** - * HTTP Response. - */ - -var Response = function Response(body, ref) { - var url = ref.url; - var headers = ref.headers; - var status = ref.status; - var statusText = ref.statusText; - - - this.url = url; - this.ok = status >= 200 && status < 300; - this.status = status || 0; - this.statusText = statusText || ''; - this.headers = new Headers(headers); - this.body = body; - - if (isString(body)) { - - this.bodyText = body; - - } else if (isBlob(body)) { - - this.bodyBlob = body; - - if (isBlobText(body)) { - this.bodyText = blobText(body); - } - } -}; - -Response.prototype.blob = function blob () { - return when(this.bodyBlob); -}; - -Response.prototype.text = function text () { - return when(this.bodyText); -}; - -Response.prototype.json = function json () { - return when(this.text(), function (text) { return JSON.parse(text); }); -}; - -Object.defineProperty(Response.prototype, 'data', { - - get: function get() { - return this.body; - }, - - set: function set(body) { - this.body = body; - } - -}); - -function blobText(body) { - return new PromiseObj(function (resolve) { - - var reader = new FileReader(); - - reader.readAsText(body); - reader.onload = function () { - resolve(reader.result); - }; - - }); -} - -function isBlobText(body) { - return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1; -} - -/** - * HTTP Request. - */ - -var Request = function Request(options$$1) { - - this.body = null; - this.params = {}; - - assign(this, options$$1, { - method: toUpper(options$$1.method || 'GET') - }); - - if (!(this.headers instanceof Headers)) { - this.headers = new Headers(this.headers); - } -}; - -Request.prototype.getUrl = function getUrl () { - return Url(this); -}; - -Request.prototype.getBody = function getBody () { - return this.body; -}; - -Request.prototype.respondWith = function respondWith (body, options$$1) { - return new Response(body, assign(options$$1 || {}, {url: this.getUrl()})); -}; - -/** - * Service for sending network requests. - */ - -var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'}; -var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'}; - -function Http(options$$1) { - - var self = this || {}, client = Client(self.$vm); - - defaults(options$$1 || {}, self.$options, Http.options); - - Http.interceptors.forEach(function (handler) { - - if (isString(handler)) { - handler = Http.interceptor[handler]; - } - - if (isFunction(handler)) { - client.use(handler); - } - - }); - - return client(new Request(options$$1)).then(function (response) { - - return response.ok ? response : PromiseObj.reject(response); - - }, function (response) { - - if (response instanceof Error) { - error(response); - } - - return PromiseObj.reject(response); - }); -} - -Http.options = {}; - -Http.headers = { - put: JSON_CONTENT_TYPE, - post: JSON_CONTENT_TYPE, - patch: JSON_CONTENT_TYPE, - delete: JSON_CONTENT_TYPE, - common: COMMON_HEADERS, - custom: {} -}; - -Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors}; -Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors']; - -['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) { - - Http[method$$1] = function (url, options$$1) { - return this(assign(options$$1 || {}, {url: url, method: method$$1})); - }; - -}); - -['post', 'put', 'patch'].forEach(function (method$$1) { - - Http[method$$1] = function (url, body, options$$1) { - return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body})); - }; - -}); - -/** - * Service for interacting with RESTful services. - */ - -function Resource(url, params, actions, options$$1) { - - var self = this || {}, resource = {}; - - actions = assign({}, - Resource.actions, - actions - ); - - each(actions, function (action, name) { - - action = merge({url: url, params: assign({}, params)}, options$$1, action); - - resource[name] = function () { - return (self.$http || Http)(opts(action, arguments)); - }; - }); - - return resource; -} - -function opts(action, args) { - - var options$$1 = assign({}, action), params = {}, body; - - switch (args.length) { - - case 2: - - params = args[0]; - body = args[1]; - - break; - - case 1: - - if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) { - body = args[0]; - } else { - params = args[0]; - } - - break; - - case 0: - - break; - - default: - - throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments'; - } - - options$$1.body = body; - options$$1.params = assign({}, options$$1.params, params); - - return options$$1; -} - -Resource.actions = { - - get: {method: 'GET'}, - save: {method: 'POST'}, - query: {method: 'GET'}, - update: {method: 'PUT'}, - remove: {method: 'DELETE'}, - delete: {method: 'DELETE'} - -}; - -/** - * Install plugin. - */ - -function plugin(Vue) { - - if (plugin.installed) { - return; - } - - Util(Vue); - - Vue.url = Url; - Vue.http = Http; - Vue.resource = Resource; - Vue.Promise = PromiseObj; - - Object.defineProperties(Vue.prototype, { - - $url: { - get: function get() { - return options(Vue.url, this, this.$options.url); - } - }, - - $http: { - get: function get() { - return options(Vue.http, this, this.$options.http); - } - }, - - $resource: { - get: function get() { - return Vue.resource.bind(this); - } - }, - - $promise: { - get: function get() { - var this$1 = this; - - return function (executor) { return new Vue.Promise(executor, this$1); }; - } - } - - }); -} - -if (typeof window !== 'undefined' && window.Vue) { - window.Vue.use(plugin); -} - -export default plugin; -export { Url, Http, Resource }; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.js deleted file mode 100644 index e9dd6397a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.js +++ /dev/null @@ -1,1563 +0,0 @@ -/*! - * vue-resource v1.5.0 - * https://github.com/pagekit/vue-resource - * Released under the MIT License. - */ - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.VueResource = factory()); -}(this, (function () { 'use strict'; - -/** - * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) - */ - -var RESOLVED = 0; -var REJECTED = 1; -var PENDING = 2; - -function Promise$1(executor) { - - this.state = PENDING; - this.value = undefined; - this.deferred = []; - - var promise = this; - - try { - executor(function (x) { - promise.resolve(x); - }, function (r) { - promise.reject(r); - }); - } catch (e) { - promise.reject(e); - } -} - -Promise$1.reject = function (r) { - return new Promise$1(function (resolve, reject) { - reject(r); - }); -}; - -Promise$1.resolve = function (x) { - return new Promise$1(function (resolve, reject) { - resolve(x); - }); -}; - -Promise$1.all = function all(iterable) { - return new Promise$1(function (resolve, reject) { - var count = 0, result = []; - - if (iterable.length === 0) { - resolve(result); - } - - function resolver(i) { - return function (x) { - result[i] = x; - count += 1; - - if (count === iterable.length) { - resolve(result); - } - }; - } - - for (var i = 0; i < iterable.length; i += 1) { - Promise$1.resolve(iterable[i]).then(resolver(i), reject); - } - }); -}; - -Promise$1.race = function race(iterable) { - return new Promise$1(function (resolve, reject) { - for (var i = 0; i < iterable.length; i += 1) { - Promise$1.resolve(iterable[i]).then(resolve, reject); - } - }); -}; - -var p = Promise$1.prototype; - -p.resolve = function resolve(x) { - var promise = this; - - if (promise.state === PENDING) { - if (x === promise) { - throw new TypeError('Promise settled with itself.'); - } - - var called = false; - - try { - var then = x && x['then']; - - if (x !== null && typeof x === 'object' && typeof then === 'function') { - then.call(x, function (x) { - if (!called) { - promise.resolve(x); - } - called = true; - - }, function (r) { - if (!called) { - promise.reject(r); - } - called = true; - }); - return; - } - } catch (e) { - if (!called) { - promise.reject(e); - } - return; - } - - promise.state = RESOLVED; - promise.value = x; - promise.notify(); - } -}; - -p.reject = function reject(reason) { - var promise = this; - - if (promise.state === PENDING) { - if (reason === promise) { - throw new TypeError('Promise settled with itself.'); - } - - promise.state = REJECTED; - promise.value = reason; - promise.notify(); - } -}; - -p.notify = function notify() { - var promise = this; - - nextTick(function () { - if (promise.state !== PENDING) { - while (promise.deferred.length) { - var deferred = promise.deferred.shift(), - onResolved = deferred[0], - onRejected = deferred[1], - resolve = deferred[2], - reject = deferred[3]; - - try { - if (promise.state === RESOLVED) { - if (typeof onResolved === 'function') { - resolve(onResolved.call(undefined, promise.value)); - } else { - resolve(promise.value); - } - } else if (promise.state === REJECTED) { - if (typeof onRejected === 'function') { - resolve(onRejected.call(undefined, promise.value)); - } else { - reject(promise.value); - } - } - } catch (e) { - reject(e); - } - } - } - }); -}; - -p.then = function then(onResolved, onRejected) { - var promise = this; - - return new Promise$1(function (resolve, reject) { - promise.deferred.push([onResolved, onRejected, resolve, reject]); - promise.notify(); - }); -}; - -p.catch = function (onRejected) { - return this.then(undefined, onRejected); -}; - -/** - * Promise adapter. - */ - -if (typeof Promise === 'undefined') { - window.Promise = Promise$1; -} - -function PromiseObj(executor, context) { - - if (executor instanceof Promise) { - this.promise = executor; - } else { - this.promise = new Promise(executor.bind(context)); - } - - this.context = context; -} - -PromiseObj.all = function (iterable, context) { - return new PromiseObj(Promise.all(iterable), context); -}; - -PromiseObj.resolve = function (value, context) { - return new PromiseObj(Promise.resolve(value), context); -}; - -PromiseObj.reject = function (reason, context) { - return new PromiseObj(Promise.reject(reason), context); -}; - -PromiseObj.race = function (iterable, context) { - return new PromiseObj(Promise.race(iterable), context); -}; - -var p$1 = PromiseObj.prototype; - -p$1.bind = function (context) { - this.context = context; - return this; -}; - -p$1.then = function (fulfilled, rejected) { - - if (fulfilled && fulfilled.bind && this.context) { - fulfilled = fulfilled.bind(this.context); - } - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.then(fulfilled, rejected), this.context); -}; - -p$1.catch = function (rejected) { - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.catch(rejected), this.context); -}; - -p$1.finally = function (callback) { - - return this.then(function (value) { - callback.call(this); - return value; - }, function (reason) { - callback.call(this); - return Promise.reject(reason); - } - ); -}; - -/** - * Utility functions. - */ - -var ref = {}; -var hasOwnProperty = ref.hasOwnProperty; -var ref$1 = []; -var slice = ref$1.slice; -var debug = false, ntick; - -var inBrowser = typeof window !== 'undefined'; - -function Util (ref) { - var config = ref.config; - var nextTick = ref.nextTick; - - ntick = nextTick; - debug = config.debug || !config.silent; -} - -function warn(msg) { - if (typeof console !== 'undefined' && debug) { - console.warn('[VueResource warn]: ' + msg); - } -} - -function error(msg) { - if (typeof console !== 'undefined') { - console.error(msg); - } -} - -function nextTick(cb, ctx) { - return ntick(cb, ctx); -} - -function trim(str) { - return str ? str.replace(/^\s*|\s*$/g, '') : ''; -} - -function trimEnd(str, chars) { - - if (str && chars === undefined) { - return str.replace(/\s+$/, ''); - } - - if (!str || !chars) { - return str; - } - - return str.replace(new RegExp(("[" + chars + "]+$")), ''); -} - -function toLower(str) { - return str ? str.toLowerCase() : ''; -} - -function toUpper(str) { - return str ? str.toUpperCase() : ''; -} - -var isArray = Array.isArray; - -function isString(val) { - return typeof val === 'string'; -} - -function isFunction(val) { - return typeof val === 'function'; -} - -function isObject(obj) { - return obj !== null && typeof obj === 'object'; -} - -function isPlainObject(obj) { - return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype; -} - -function isBlob(obj) { - return typeof Blob !== 'undefined' && obj instanceof Blob; -} - -function isFormData(obj) { - return typeof FormData !== 'undefined' && obj instanceof FormData; -} - -function when(value, fulfilled, rejected) { - - var promise = PromiseObj.resolve(value); - - if (arguments.length < 2) { - return promise; - } - - return promise.then(fulfilled, rejected); -} - -function options(fn, obj, opts) { - - opts = opts || {}; - - if (isFunction(opts)) { - opts = opts.call(obj); - } - - return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts}); -} - -function each(obj, iterator) { - - var i, key; - - if (isArray(obj)) { - for (i = 0; i < obj.length; i++) { - iterator.call(obj[i], obj[i], i); - } - } else if (isObject(obj)) { - for (key in obj) { - if (hasOwnProperty.call(obj, key)) { - iterator.call(obj[key], obj[key], key); - } - } - } - - return obj; -} - -var assign = Object.assign || _assign; - -function merge(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source, true); - }); - - return target; -} - -function defaults(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - - for (var key in source) { - if (target[key] === undefined) { - target[key] = source[key]; - } - } - - }); - - return target; -} - -function _assign(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source); - }); - - return target; -} - -function _merge(target, source, deep) { - for (var key in source) { - if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { - if (isPlainObject(source[key]) && !isPlainObject(target[key])) { - target[key] = {}; - } - if (isArray(source[key]) && !isArray(target[key])) { - target[key] = []; - } - _merge(target[key], source[key], deep); - } else if (source[key] !== undefined) { - target[key] = source[key]; - } - } -} - -/** - * Root Prefix Transform. - */ - -function root (options$$1, next) { - - var url = next(options$$1); - - if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) { - url = trimEnd(options$$1.root, '/') + '/' + url; - } - - return url; -} - -/** - * Query Parameter Transform. - */ - -function query (options$$1, next) { - - var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1); - - each(options$$1.params, function (value, key) { - if (urlParams.indexOf(key) === -1) { - query[key] = value; - } - }); - - query = Url.params(query); - - if (query) { - url += (url.indexOf('?') == -1 ? '?' : '&') + query; - } - - return url; -} - -/** - * URL Template v2.0.6 (https://github.com/bramstein/url-template) - */ - -function expand(url, params, variables) { - - var tmpl = parse(url), expanded = tmpl.expand(params); - - if (variables) { - variables.push.apply(variables, tmpl.vars); - } - - return expanded; -} - -function parse(template) { - - var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = []; - - return { - vars: variables, - expand: function expand(context) { - return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) { - if (expression) { - - var operator = null, values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - variables.push(tmp[1]); - }); - - if (operator && operator !== '+') { - - var separator = ','; - - if (operator === '?') { - separator = '&'; - } else if (operator !== '#') { - separator = operator; - } - - return (values.length !== 0 ? operator : '') + values.join(separator); - } else { - return values.join(','); - } - - } else { - return encodeReserved(literal); - } - }); - } - }; -} - -function getValues(context, operator, key, modifier) { - - var value = context[key], result = []; - - if (isDefined(value) && value !== '') { - if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { - value = value.toString(); - - if (modifier && modifier !== '*') { - value = value.substring(0, parseInt(modifier, 10)); - } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - } else { - if (modifier === '*') { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - var tmp = []; - - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeURIComponent(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - - if (isKeyOperator(operator)) { - result.push(encodeURIComponent(key) + '=' + tmp.join(',')); - } else if (tmp.length !== 0) { - result.push(tmp.join(',')); - } - } - } - } else { - if (operator === ';') { - result.push(encodeURIComponent(key)); - } else if (value === '' && (operator === '&' || operator === '?')) { - result.push(encodeURIComponent(key) + '='); - } else if (value === '') { - result.push(''); - } - } - - return result; -} - -function isDefined(value) { - return value !== undefined && value !== null; -} - -function isKeyOperator(operator) { - return operator === ';' || operator === '&' || operator === '?'; -} - -function encodeValue(operator, value, key) { - - value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value); - - if (key) { - return encodeURIComponent(key) + '=' + value; - } else { - return value; - } -} - -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part); - } - return part; - }).join(''); -} - -/** - * URL Template (RFC 6570) Transform. - */ - -function template (options) { - - var variables = [], url = expand(options.url, options.params, variables); - - variables.forEach(function (key) { - delete options.params[key]; - }); - - return url; -} - -/** - * Service for URL templating. - */ - -function Url(url, params) { - - var self = this || {}, options$$1 = url, transform; - - if (isString(url)) { - options$$1 = {url: url, params: params}; - } - - options$$1 = merge({}, Url.options, self.$options, options$$1); - - Url.transforms.forEach(function (handler) { - - if (isString(handler)) { - handler = Url.transform[handler]; - } - - if (isFunction(handler)) { - transform = factory(handler, transform, self.$vm); - } - - }); - - return transform(options$$1); -} - -/** - * Url options. - */ - -Url.options = { - url: '', - root: null, - params: {} -}; - -/** - * Url transforms. - */ - -Url.transform = {template: template, query: query, root: root}; -Url.transforms = ['template', 'query', 'root']; - -/** - * Encodes a Url parameter string. - * - * @param {Object} obj - */ - -Url.params = function (obj) { - - var params = [], escape = encodeURIComponent; - - params.add = function (key, value) { - - if (isFunction(value)) { - value = value(); - } - - if (value === null) { - value = ''; - } - - this.push(escape(key) + '=' + escape(value)); - }; - - serialize(params, obj); - - return params.join('&').replace(/%20/g, '+'); -}; - -/** - * Parse a URL and return its components. - * - * @param {String} url - */ - -Url.parse = function (url) { - - var el = document.createElement('a'); - - if (document.documentMode) { - el.href = url; - url = el.href; - } - - el.href = url; - - return { - href: el.href, - protocol: el.protocol ? el.protocol.replace(/:$/, '') : '', - port: el.port, - host: el.host, - hostname: el.hostname, - pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname, - search: el.search ? el.search.replace(/^\?/, '') : '', - hash: el.hash ? el.hash.replace(/^#/, '') : '' - }; -}; - -function factory(handler, next, vm) { - return function (options$$1) { - return handler.call(vm, options$$1, next); - }; -} - -function serialize(params, obj, scope) { - - var array = isArray(obj), plain = isPlainObject(obj), hash; - - each(obj, function (value, key) { - - hash = isObject(value) || isArray(value); - - if (scope) { - key = scope + '[' + (plain || hash ? key : '') + ']'; - } - - if (!scope && array) { - params.add(value.name, value.value); - } else if (hash) { - serialize(params, value, key); - } else { - params.add(key, value); - } - }); -} - -/** - * XDomain client (Internet Explorer). - */ - -function xdrClient (request) { - return new PromiseObj(function (resolve) { - - var xdr = new XDomainRequest(), handler = function (ref) { - var type = ref.type; - - - var status = 0; - - if (type === 'load') { - status = 200; - } else if (type === 'error') { - status = 500; - } - - resolve(request.respondWith(xdr.responseText, {status: status})); - }; - - request.abort = function () { return xdr.abort(); }; - - xdr.open(request.method, request.getUrl()); - - if (request.timeout) { - xdr.timeout = request.timeout; - } - - xdr.onload = handler; - xdr.onabort = handler; - xdr.onerror = handler; - xdr.ontimeout = handler; - xdr.onprogress = function () {}; - xdr.send(request.getBody()); - }); -} - -/** - * CORS Interceptor. - */ - -var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest(); - -function cors (request) { - - if (inBrowser) { - - var orgUrl = Url.parse(location.href); - var reqUrl = Url.parse(request.getUrl()); - - if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) { - - request.crossOrigin = true; - request.emulateHTTP = false; - - if (!SUPPORTS_CORS) { - request.client = xdrClient; - } - } - } - -} - -/** - * Form data Interceptor. - */ - -function form (request) { - - if (isFormData(request.body)) { - request.headers.delete('Content-Type'); - } else if (isObject(request.body) && request.emulateJSON) { - request.body = Url.params(request.body); - request.headers.set('Content-Type', 'application/x-www-form-urlencoded'); - } - -} - -/** - * JSON Interceptor. - */ - -function json (request) { - - var type = request.headers.get('Content-Type') || ''; - - if (isObject(request.body) && type.indexOf('application/json') === 0) { - request.body = JSON.stringify(request.body); - } - - return function (response) { - - return response.bodyText ? when(response.text(), function (text) { - - var type = response.headers.get('Content-Type') || ''; - - if (type.indexOf('application/json') === 0 || isJson(text)) { - - try { - response.body = JSON.parse(text); - } catch (e) { - response.body = null; - } - - } else { - response.body = text; - } - - return response; - - }) : response; - - }; -} - -function isJson(str) { - - var start = str.match(/^\s*(\[|\{)/); - var end = {'[': /]\s*$/, '{': /}\s*$/}; - - return start && end[start[1]].test(str); -} - -/** - * JSONP client (Browser). - */ - -function jsonpClient (request) { - return new PromiseObj(function (resolve) { - - var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script; - - handler = function (ref) { - var type = ref.type; - - - var status = 0; - - if (type === 'load' && body !== null) { - status = 200; - } else if (type === 'error') { - status = 500; - } - - if (status && window[callback]) { - delete window[callback]; - document.body.removeChild(script); - } - - resolve(request.respondWith(body, {status: status})); - }; - - window[callback] = function (result) { - body = JSON.stringify(result); - }; - - request.abort = function () { - handler({type: 'abort'}); - }; - - request.params[name] = callback; - - if (request.timeout) { - setTimeout(request.abort, request.timeout); - } - - script = document.createElement('script'); - script.src = request.getUrl(); - script.type = 'text/javascript'; - script.async = true; - script.onload = handler; - script.onerror = handler; - - document.body.appendChild(script); - }); -} - -/** - * JSONP Interceptor. - */ - -function jsonp (request) { - - if (request.method == 'JSONP') { - request.client = jsonpClient; - } - -} - -/** - * Before Interceptor. - */ - -function before (request) { - - if (isFunction(request.before)) { - request.before.call(this, request); - } - -} - -/** - * HTTP method override Interceptor. - */ - -function method (request) { - - if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) { - request.headers.set('X-HTTP-Method-Override', request.method); - request.method = 'POST'; - } - -} - -/** - * Header Interceptor. - */ - -function header (request) { - - var headers = assign({}, Http.headers.common, - !request.crossOrigin ? Http.headers.custom : {}, - Http.headers[toLower(request.method)] - ); - - each(headers, function (value, name) { - if (!request.headers.has(name)) { - request.headers.set(name, value); - } - }); - -} - -/** - * XMLHttp client (Browser). - */ - -function xhrClient (request) { - return new PromiseObj(function (resolve) { - - var xhr = new XMLHttpRequest(), handler = function (event) { - - var response = request.respondWith( - 'response' in xhr ? xhr.response : xhr.responseText, { - status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug - statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText) - }); - - each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) { - response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1)); - }); - - resolve(response); - }; - - request.abort = function () { return xhr.abort(); }; - - xhr.open(request.method, request.getUrl(), true); - - if (request.timeout) { - xhr.timeout = request.timeout; - } - - if (request.responseType && 'responseType' in xhr) { - xhr.responseType = request.responseType; - } - - if (request.withCredentials || request.credentials) { - xhr.withCredentials = true; - } - - if (!request.crossOrigin) { - request.headers.set('X-Requested-With', 'XMLHttpRequest'); - } - - // deprecated use downloadProgress - if (isFunction(request.progress) && request.method === 'GET') { - xhr.addEventListener('progress', request.progress); - } - - if (isFunction(request.downloadProgress)) { - xhr.addEventListener('progress', request.downloadProgress); - } - - // deprecated use uploadProgress - if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) { - xhr.upload.addEventListener('progress', request.progress); - } - - if (isFunction(request.uploadProgress) && xhr.upload) { - xhr.upload.addEventListener('progress', request.uploadProgress); - } - - request.headers.forEach(function (value, name) { - xhr.setRequestHeader(name, value); - }); - - xhr.onload = handler; - xhr.onabort = handler; - xhr.onerror = handler; - xhr.ontimeout = handler; - xhr.send(request.getBody()); - }); -} - -/** - * Http client (Node). - */ - -function nodeClient (request) { - - var client = require('got'); - - return new PromiseObj(function (resolve) { - - var url = request.getUrl(); - var body = request.getBody(); - var method = request.method; - var headers = {}, handler; - - request.headers.forEach(function (value, name) { - headers[name] = value; - }); - - client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) { - - var response = request.respondWith(resp.body, { - status: resp.statusCode, - statusText: trim(resp.statusMessage) - }); - - each(resp.headers, function (value, name) { - response.headers.set(name, value); - }); - - resolve(response); - - }, function (error$$1) { return handler(error$$1.response); }); - }); -} - -/** - * Base client. - */ - -function Client (context) { - - var reqHandlers = [sendRequest], resHandlers = []; - - if (!isObject(context)) { - context = null; - } - - function Client(request) { - while (reqHandlers.length) { - - var handler = reqHandlers.pop(); - - if (isFunction(handler)) { - - var response = (void 0), next = (void 0); - - response = handler.call(context, request, function (val) { return next = val; }) || next; - - if (isObject(response)) { - return new PromiseObj(function (resolve, reject) { - - resHandlers.forEach(function (handler) { - response = when(response, function (response) { - return handler.call(context, response) || response; - }, reject); - }); - - when(response, resolve, reject); - - }, context); - } - - if (isFunction(response)) { - resHandlers.unshift(response); - } - - } else { - warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function")); - } - } - } - - Client.use = function (handler) { - reqHandlers.push(handler); - }; - - return Client; -} - -function sendRequest(request) { - - var client = request.client || (inBrowser ? xhrClient : nodeClient); - - return client(request); -} - -/** - * HTTP Headers. - */ - -var Headers = function Headers(headers) { - var this$1 = this; - - - this.map = {}; - - each(headers, function (value, name) { return this$1.append(name, value); }); -}; - -Headers.prototype.has = function has (name) { - return getName(this.map, name) !== null; -}; - -Headers.prototype.get = function get (name) { - - var list = this.map[getName(this.map, name)]; - - return list ? list.join() : null; -}; - -Headers.prototype.getAll = function getAll (name) { - return this.map[getName(this.map, name)] || []; -}; - -Headers.prototype.set = function set (name, value) { - this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)]; -}; - -Headers.prototype.append = function append (name, value) { - - var list = this.map[getName(this.map, name)]; - - if (list) { - list.push(trim(value)); - } else { - this.set(name, value); - } -}; - -Headers.prototype.delete = function delete$1 (name) { - delete this.map[getName(this.map, name)]; -}; - -Headers.prototype.deleteAll = function deleteAll () { - this.map = {}; -}; - -Headers.prototype.forEach = function forEach (callback, thisArg) { - var this$1 = this; - - each(this.map, function (list, name) { - each(list, function (value) { return callback.call(thisArg, value, name, this$1); }); - }); -}; - -function getName(map, name) { - return Object.keys(map).reduce(function (prev, curr) { - return toLower(name) === toLower(curr) ? curr : prev; - }, null); -} - -function normalizeName(name) { - - if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { - throw new TypeError('Invalid character in header field name'); - } - - return trim(name); -} - -/** - * HTTP Response. - */ - -var Response = function Response(body, ref) { - var url = ref.url; - var headers = ref.headers; - var status = ref.status; - var statusText = ref.statusText; - - - this.url = url; - this.ok = status >= 200 && status < 300; - this.status = status || 0; - this.statusText = statusText || ''; - this.headers = new Headers(headers); - this.body = body; - - if (isString(body)) { - - this.bodyText = body; - - } else if (isBlob(body)) { - - this.bodyBlob = body; - - if (isBlobText(body)) { - this.bodyText = blobText(body); - } - } -}; - -Response.prototype.blob = function blob () { - return when(this.bodyBlob); -}; - -Response.prototype.text = function text () { - return when(this.bodyText); -}; - -Response.prototype.json = function json () { - return when(this.text(), function (text) { return JSON.parse(text); }); -}; - -Object.defineProperty(Response.prototype, 'data', { - - get: function get() { - return this.body; - }, - - set: function set(body) { - this.body = body; - } - -}); - -function blobText(body) { - return new PromiseObj(function (resolve) { - - var reader = new FileReader(); - - reader.readAsText(body); - reader.onload = function () { - resolve(reader.result); - }; - - }); -} - -function isBlobText(body) { - return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1; -} - -/** - * HTTP Request. - */ - -var Request = function Request(options$$1) { - - this.body = null; - this.params = {}; - - assign(this, options$$1, { - method: toUpper(options$$1.method || 'GET') - }); - - if (!(this.headers instanceof Headers)) { - this.headers = new Headers(this.headers); - } -}; - -Request.prototype.getUrl = function getUrl () { - return Url(this); -}; - -Request.prototype.getBody = function getBody () { - return this.body; -}; - -Request.prototype.respondWith = function respondWith (body, options$$1) { - return new Response(body, assign(options$$1 || {}, {url: this.getUrl()})); -}; - -/** - * Service for sending network requests. - */ - -var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'}; -var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'}; - -function Http(options$$1) { - - var self = this || {}, client = Client(self.$vm); - - defaults(options$$1 || {}, self.$options, Http.options); - - Http.interceptors.forEach(function (handler) { - - if (isString(handler)) { - handler = Http.interceptor[handler]; - } - - if (isFunction(handler)) { - client.use(handler); - } - - }); - - return client(new Request(options$$1)).then(function (response) { - - return response.ok ? response : PromiseObj.reject(response); - - }, function (response) { - - if (response instanceof Error) { - error(response); - } - - return PromiseObj.reject(response); - }); -} - -Http.options = {}; - -Http.headers = { - put: JSON_CONTENT_TYPE, - post: JSON_CONTENT_TYPE, - patch: JSON_CONTENT_TYPE, - delete: JSON_CONTENT_TYPE, - common: COMMON_HEADERS, - custom: {} -}; - -Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors}; -Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors']; - -['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) { - - Http[method$$1] = function (url, options$$1) { - return this(assign(options$$1 || {}, {url: url, method: method$$1})); - }; - -}); - -['post', 'put', 'patch'].forEach(function (method$$1) { - - Http[method$$1] = function (url, body, options$$1) { - return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body})); - }; - -}); - -/** - * Service for interacting with RESTful services. - */ - -function Resource(url, params, actions, options$$1) { - - var self = this || {}, resource = {}; - - actions = assign({}, - Resource.actions, - actions - ); - - each(actions, function (action, name) { - - action = merge({url: url, params: assign({}, params)}, options$$1, action); - - resource[name] = function () { - return (self.$http || Http)(opts(action, arguments)); - }; - }); - - return resource; -} - -function opts(action, args) { - - var options$$1 = assign({}, action), params = {}, body; - - switch (args.length) { - - case 2: - - params = args[0]; - body = args[1]; - - break; - - case 1: - - if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) { - body = args[0]; - } else { - params = args[0]; - } - - break; - - case 0: - - break; - - default: - - throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments'; - } - - options$$1.body = body; - options$$1.params = assign({}, options$$1.params, params); - - return options$$1; -} - -Resource.actions = { - - get: {method: 'GET'}, - save: {method: 'POST'}, - query: {method: 'GET'}, - update: {method: 'PUT'}, - remove: {method: 'DELETE'}, - delete: {method: 'DELETE'} - -}; - -/** - * Install plugin. - */ - -function plugin(Vue) { - - if (plugin.installed) { - return; - } - - Util(Vue); - - Vue.url = Url; - Vue.http = Http; - Vue.resource = Resource; - Vue.Promise = PromiseObj; - - Object.defineProperties(Vue.prototype, { - - $url: { - get: function get() { - return options(Vue.url, this, this.$options.url); - } - }, - - $http: { - get: function get() { - return options(Vue.http, this, this.$options.http); - } - }, - - $resource: { - get: function get() { - return Vue.resource.bind(this); - } - }, - - $promise: { - get: function get() { - var this$1 = this; - - return function (executor) { return new Vue.Promise(executor, this$1); }; - } - } - - }); -} - -if (typeof window !== 'undefined' && window.Vue) { - window.Vue.use(plugin); -} - -return plugin; - -}))); diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.min.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.min.js deleted file mode 100644 index cc10be748..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/dist/vue-resource.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * vue-resource v1.5.0 - * https://github.com/pagekit/vue-resource - * Released under the MIT License. - */ - -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueResource=e()}(this,function(){"use strict";var t=2;function e(e){this.state=t,this.value=void 0,this.deferred=[];var n=this;try{e(function(t){n.resolve(t)},function(t){n.reject(t)})}catch(t){n.reject(t)}}e.reject=function(t){return new e(function(e,n){n(t)})},e.resolve=function(t){return new e(function(e,n){e(t)})},e.all=function(t){return new e(function(n,o){var r=0,i=[];function s(e){return function(o){i[e]=o,(r+=1)===t.length&&n(i)}}0===t.length&&n(i);for(var u=0;u=200&&a<300,this.status=a||0,this.statusText=c||"",this.headers=new L(u),this.body=t,d(t)?this.bodyText=t:(i=t,"undefined"!=typeof Blob&&i instanceof Blob&&(this.bodyBlob=t,(0===(r=t).type.indexOf("text")||-1!==r.type.indexOf("json"))&&(this.bodyText=(n=t,new o(function(t){var e=new FileReader;e.readAsText(n),e.onload=function(){t(e.result)}})))))};H.prototype.blob=function(){return v(this.bodyBlob)},H.prototype.text=function(){return v(this.bodyText)},H.prototype.json=function(){return v(this.text(),function(t){return JSON.parse(t)})},Object.defineProperty(H.prototype,"data",{get:function(){return this.body},set:function(t){this.body=t}});var B=function(t){var e;this.body=null,this.params={},w(this,t,{method:(e=t.method||"GET",e?e.toUpperCase():"")}),this.headers instanceof L||(this.headers=new L(this.headers))};B.prototype.getUrl=function(){return $(this)},B.prototype.getBody=function(){return this.body},B.prototype.respondWith=function(t,e){return new H(t,w(e||{},{url:this.getUrl()}))};var M={"Content-Type":"application/json;charset=utf-8"};function N(t){var e=this||{},n=function(t){var e=[I],n=[];function r(r){for(;e.length;){var i=e.pop();if(l(i)){var s=void 0,u=void 0;if(m(s=i.call(t,r,function(t){return u=t})||u))return new o(function(e,o){n.forEach(function(e){s=v(s,function(n){return e.call(t,n)||n},o)}),v(s,e,o)},t);l(s)&&n.unshift(s)}else c="Invalid interceptor of type "+typeof i+", must be a function","undefined"!=typeof console&&a&&console.warn("[VueResource warn]: "+c)}var c}return m(t)||(t=null),r.use=function(t){e.push(t)},r}(e.$vm);return function(t){u.call(arguments,1).forEach(function(e){for(var n in e)void 0===t[n]&&(t[n]=e[n])})}(t||{},e.$options,N.options),N.interceptors.forEach(function(t){d(t)&&(t=N.interceptor[t]),l(t)&&n.use(t)}),n(new B(t)).then(function(t){return t.ok?t:o.reject(t)},function(t){var e;return t instanceof Error&&(e=t,"undefined"!=typeof console&&console.error(e)),o.reject(t)})}function D(t,e,n,o){var r=this||{},i={};return g(n=w({},D.actions,n),function(n,s){n=T({url:t,params:w({},e)},o,n),i[s]=function(){return(r.$http||N)(function(t,e){var n,o=w({},t),r={};switch(e.length){case 2:r=e[0],n=e[1];break;case 1:/^(POST|PUT|PATCH)$/i.test(o.method)?n=e[0]:r=e[0];break;case 0:break;default:throw"Expected up to 2 arguments [params, body], got "+e.length+" arguments"}return o.body=n,o.params=w({},o.params,r),o}(n,arguments))}}),i}function J(t){var e,n,r;J.installed||(n=(e=t).config,r=e.nextTick,i=r,a=n.debug||!n.silent,t.url=$,t.http=N,t.resource=D,t.Promise=o,Object.defineProperties(t.prototype,{$url:{get:function(){return b(t.url,this,this.$options.url)}},$http:{get:function(){return b(t.http,this,this.$options.http)}},$resource:{get:function(){return t.resource.bind(this)}},$promise:{get:function(){var e=this;return function(n){return new t.Promise(n,e)}}}}))}return N.options={},N.headers={put:M,post:M,patch:M,delete:M,common:{Accept:"application/json, text/plain, */*"},custom:{}},N.interceptor={before:function(t){l(t.before)&&t.before.call(this,t)},method:function(t){t.emulateHTTP&&/^(PUT|PATCH|DELETE)$/i.test(t.method)&&(t.headers.set("X-HTTP-Method-Override",t.method),t.method="POST")},jsonp:function(t){"JSONP"==t.method&&(t.client=A)},json:function(t){var e=t.headers.get("Content-Type")||"";return m(t.body)&&0===e.indexOf("application/json")&&(t.body=JSON.stringify(t.body)),function(t){return t.bodyText?v(t.text(),function(e){var n,o;if(0===(t.headers.get("Content-Type")||"").indexOf("application/json")||(o=(n=e).match(/^\s*(\[|\{)/))&&{"[":/]\s*$/,"{":/}\s*$/}[o[1]].test(n))try{t.body=JSON.parse(e)}catch(e){t.body=null}else t.body=e;return t}):t}},form:function(t){var e;e=t.body,"undefined"!=typeof FormData&&e instanceof FormData?t.headers.delete("Content-Type"):m(t.body)&&t.emulateJSON&&(t.body=$.params(t.body),t.headers.set("Content-Type","application/x-www-form-urlencoded"))},header:function(t){g(w({},N.headers.common,t.crossOrigin?{}:N.headers.custom,N.headers[p(t.method)]),function(e,n){t.headers.has(n)||t.headers.set(n,e)})},cors:function(t){if(c){var e=$.parse(location.href),n=$.parse(t.getUrl());n.protocol===e.protocol&&n.host===e.host||(t.crossOrigin=!0,t.emulateHTTP=!1,R||(t.client=U))}}},N.interceptors=["before","method","jsonp","json","form","header","cors"],["get","delete","head","jsonp"].forEach(function(t){N[t]=function(e,n){return this(w(n||{},{url:e,method:t}))}}),["post","put","patch"].forEach(function(t){N[t]=function(e,n,o){return this(w(o||{},{url:e,method:t,body:n}))}}),D.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},delete:{method:"DELETE"}},"undefined"!=typeof window&&window.Vue&&window.Vue.use(J),J}); \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/package.json b/advancedcontentfilter/vendor/npm-asset/vue-resource/package.json deleted file mode 100644 index 8501a89d9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "vue-resource", - "version": "1.5.0", - "main": "dist/vue-resource.common.js", - "module": "dist/vue-resource.esm.js", - "unpkg": "dist/vue-resource.min.js", - "jsdelivr": "dist/vue-resource.min.js", - "typings": "types/index.d.ts", - "description": "The HTTP client for Vue.js", - "homepage": "https://github.com/pagekit/vue-resource#readme", - "license": "MIT", - "keywords": [ - "vue", - "xhr", - "http", - "ajax" - ], - "bugs": { - "url": "https://github.com/pagekit/vue-resource/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/pagekit/vue-resource.git" - }, - "scripts": { - "test": "jest --env=node", - "karma": "karma start test/karma.conf.js --single-run", - "build": "node build/build.js", - "release": "node build/release.js", - "webpack": "webpack --config test/webpack.config.js" - }, - "browser": { - "got": false - }, - "dependencies": { - "got": "^8.0.3" - }, - "devDependencies": { - "buble": "^0.19.1", - "buble-loader": "^0.4.1", - "eslint": "^4.17.0", - "generate-release": "^0.14.0", - "jasmine": "^3.0.0", - "jasmine-core": "^3.1.0", - "jest": "^22.2.2", - "karma": "^2.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-firefox-launcher": "^1.1.0", - "karma-jasmine": "^1.1.1", - "karma-safari-launcher": "^1.0.0", - "karma-webpack": "^2.0.9", - "replace-in-file": "^3.1.1", - "rollup": "^0.56.2", - "rollup-plugin-buble": "^0.19.1", - "uglify-js": "^3.3.10", - "vue": "^2.5.13", - "webpack": "^3.11.0" - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/index.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/index.js deleted file mode 100644 index 56cd5993a..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Base client. - */ - -import Promise from '../../promise'; -import xhrClient from './xhr'; -import nodeClient from './node'; -import {warn, when, isObject, isFunction, inBrowser} from '../../util'; - -export default function (context) { - - const reqHandlers = [sendRequest], resHandlers = []; - - if (!isObject(context)) { - context = null; - } - - function Client(request) { - while (reqHandlers.length) { - - const handler = reqHandlers.pop(); - - if (isFunction(handler)) { - - let response, next; - - response = handler.call(context, request, val => next = val) || next; - - if (isObject(response)) { - return new Promise((resolve, reject) => { - - resHandlers.forEach(handler => { - response = when(response, response => { - return handler.call(context, response) || response; - }, reject); - }); - - when(response, resolve, reject); - - }, context); - } - - if (isFunction(response)) { - resHandlers.unshift(response); - } - - } else { - warn(`Invalid interceptor of type ${typeof handler}, must be a function`); - } - } - } - - Client.use = handler => { - reqHandlers.push(handler); - }; - - return Client; -} - -function sendRequest(request) { - - const client = request.client || (inBrowser ? xhrClient : nodeClient); - - return client(request); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/jsonp.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/jsonp.js deleted file mode 100644 index 241e7b405..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/jsonp.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * JSONP client (Browser). - */ - -import Promise from '../../promise'; - -export default function (request) { - return new Promise(resolve => { - - var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script; - - handler = ({type}) => { - - var status = 0; - - if (type === 'load' && body !== null) { - status = 200; - } else if (type === 'error') { - status = 500; - } - - if (status && window[callback]) { - delete window[callback]; - document.body.removeChild(script); - } - - resolve(request.respondWith(body, {status})); - }; - - window[callback] = result => { - body = JSON.stringify(result); - }; - - request.abort = () => { - handler({type: 'abort'}); - }; - - request.params[name] = callback; - - if (request.timeout) { - setTimeout(request.abort, request.timeout); - } - - script = document.createElement('script'); - script.src = request.getUrl(); - script.type = 'text/javascript'; - script.async = true; - script.onload = handler; - script.onerror = handler; - - document.body.appendChild(script); - }); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/node.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/node.js deleted file mode 100644 index d12b33e15..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/node.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Http client (Node). - */ - -import Promise from '../../promise'; -import {each, trim} from '../../util'; - -export default function (request) { - - const client = require('got'); - - return new Promise(resolve => { - - var url = request.getUrl(); - var body = request.getBody(); - var method = request.method; - var headers = {}, handler; - - request.headers.forEach((value, name) => { - headers[name] = value; - }); - - client(url, {body, method, headers}).then(handler = (resp) => { - - var response = request.respondWith(resp.body, { - status: resp.statusCode, - statusText: trim(resp.statusMessage) - }); - - each(resp.headers, (value, name) => { - response.headers.set(name, value); - }); - - resolve(response); - - }, error => handler(error.response)); - }); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xdr.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xdr.js deleted file mode 100644 index 20656c741..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xdr.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * XDomain client (Internet Explorer). - */ - -import Promise from '../../promise'; - -export default function (request) { - return new Promise(resolve => { - - var xdr = new XDomainRequest(), handler = ({type}) => { - - var status = 0; - - if (type === 'load') { - status = 200; - } else if (type === 'error') { - status = 500; - } - - resolve(request.respondWith(xdr.responseText, {status})); - }; - - request.abort = () => xdr.abort(); - - xdr.open(request.method, request.getUrl()); - - if (request.timeout) { - xdr.timeout = request.timeout; - } - - xdr.onload = handler; - xdr.onabort = handler; - xdr.onerror = handler; - xdr.ontimeout = handler; - xdr.onprogress = () => {}; - xdr.send(request.getBody()); - }); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xhr.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xhr.js deleted file mode 100644 index cc771872d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/client/xhr.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * XMLHttp client (Browser). - */ - -import Promise from '../../promise'; -import {each, trim, isFunction} from '../../util'; - -export default function (request) { - return new Promise(resolve => { - - var xhr = new XMLHttpRequest(), handler = (event) => { - - var response = request.respondWith( - 'response' in xhr ? xhr.response : xhr.responseText, { - status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug - statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText) - }); - - each(trim(xhr.getAllResponseHeaders()).split('\n'), row => { - response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1)); - }); - - resolve(response); - }; - - request.abort = () => xhr.abort(); - - xhr.open(request.method, request.getUrl(), true); - - if (request.timeout) { - xhr.timeout = request.timeout; - } - - if (request.responseType && 'responseType' in xhr) { - xhr.responseType = request.responseType; - } - - if (request.withCredentials || request.credentials) { - xhr.withCredentials = true; - } - - if (!request.crossOrigin) { - request.headers.set('X-Requested-With', 'XMLHttpRequest'); - } - - // deprecated use downloadProgress - if (isFunction(request.progress) && request.method === 'GET') { - xhr.addEventListener('progress', request.progress); - } - - if (isFunction(request.downloadProgress)) { - xhr.addEventListener('progress', request.downloadProgress); - } - - // deprecated use uploadProgress - if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) { - xhr.upload.addEventListener('progress', request.progress); - } - - if (isFunction(request.uploadProgress) && xhr.upload) { - xhr.upload.addEventListener('progress', request.uploadProgress); - } - - request.headers.forEach((value, name) => { - xhr.setRequestHeader(name, value); - }); - - xhr.onload = handler; - xhr.onabort = handler; - xhr.onerror = handler; - xhr.ontimeout = handler; - xhr.send(request.getBody()); - }); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/headers.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/headers.js deleted file mode 100644 index 5c3e404fe..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/headers.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * HTTP Headers. - */ - -import {each, trim, toLower} from '../util'; - -export default class Headers { - - constructor(headers) { - - this.map = {}; - - each(headers, (value, name) => this.append(name, value)); - } - - has(name) { - return getName(this.map, name) !== null; - } - - get(name) { - - var list = this.map[getName(this.map, name)]; - - return list ? list.join() : null; - } - - getAll(name) { - return this.map[getName(this.map, name)] || []; - } - - set(name, value) { - this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)]; - } - - append(name, value) { - - var list = this.map[getName(this.map, name)]; - - if (list) { - list.push(trim(value)); - } else { - this.set(name, value); - } - } - - delete(name) { - delete this.map[getName(this.map, name)]; - } - - deleteAll() { - this.map = {}; - } - - forEach(callback, thisArg) { - each(this.map, (list, name) => { - each(list, value => callback.call(thisArg, value, name, this)); - }); - } - -} - -function getName(map, name) { - return Object.keys(map).reduce((prev, curr) => { - return toLower(name) === toLower(curr) ? curr : prev; - }, null); -} - -function normalizeName(name) { - - if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { - throw new TypeError('Invalid character in header field name'); - } - - return trim(name); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/index.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/index.js deleted file mode 100644 index df4743de3..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/index.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Service for sending network requests. - */ - -const COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'}; -const JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'}; - -import cors from './interceptor/cors'; -import form from './interceptor/form'; -import json from './interceptor/json'; -import jsonp from './interceptor/jsonp'; -import before from './interceptor/before'; -import method from './interceptor/method'; -import header from './interceptor/header'; -import Client from './client/index'; -import Request from './request'; -import Promise from '../promise'; -import {assign, defaults, error, isString, isFunction} from '../util'; - -export default function Http(options) { - - var self = this || {}, client = Client(self.$vm); - - defaults(options || {}, self.$options, Http.options); - - Http.interceptors.forEach(handler => { - - if (isString(handler)) { - handler = Http.interceptor[handler]; - } - - if (isFunction(handler)) { - client.use(handler); - } - - }); - - return client(new Request(options)).then(response => { - - return response.ok ? response : Promise.reject(response); - - }, response => { - - if (response instanceof Error) { - error(response); - } - - return Promise.reject(response); - }); -} - -Http.options = {}; - -Http.headers = { - put: JSON_CONTENT_TYPE, - post: JSON_CONTENT_TYPE, - patch: JSON_CONTENT_TYPE, - delete: JSON_CONTENT_TYPE, - common: COMMON_HEADERS, - custom: {} -}; - -Http.interceptor = {before, method, jsonp, json, form, header, cors}; -Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors']; - -['get', 'delete', 'head', 'jsonp'].forEach(method => { - - Http[method] = function (url, options) { - return this(assign(options || {}, {url, method})); - }; - -}); - -['post', 'put', 'patch'].forEach(method => { - - Http[method] = function (url, body, options) { - return this(assign(options || {}, {url, method, body})); - }; - -}); diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/before.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/before.js deleted file mode 100644 index d45c27cad..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/before.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Before Interceptor. - */ - -import {isFunction} from '../../util'; - -export default function (request) { - - if (isFunction(request.before)) { - request.before.call(this, request); - } - -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/cors.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/cors.js deleted file mode 100644 index 5146f70cc..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/cors.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * CORS Interceptor. - */ - -import Url from '../../url/index'; -import xdrClient from '../client/xdr'; -import {inBrowser} from '../../util'; - -const SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest(); - -export default function (request) { - - if (inBrowser) { - - const orgUrl = Url.parse(location.href); - const reqUrl = Url.parse(request.getUrl()); - - if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) { - - request.crossOrigin = true; - request.emulateHTTP = false; - - if (!SUPPORTS_CORS) { - request.client = xdrClient; - } - } - } - -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/form.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/form.js deleted file mode 100644 index 8ff309089..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/form.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Form data Interceptor. - */ - -import Url from '../../url/index'; -import {isObject, isFormData} from '../../util'; - -export default function (request) { - - if (isFormData(request.body)) { - request.headers.delete('Content-Type'); - } else if (isObject(request.body) && request.emulateJSON) { - request.body = Url.params(request.body); - request.headers.set('Content-Type', 'application/x-www-form-urlencoded'); - } - -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/header.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/header.js deleted file mode 100644 index e71c67498..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/header.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Header Interceptor. - */ - -import Http from '../index'; -import {assign, each, toLower} from '../../util'; - -export default function (request) { - - const headers = assign({}, Http.headers.common, - !request.crossOrigin ? Http.headers.custom : {}, - Http.headers[toLower(request.method)] - ); - - each(headers, (value, name) => { - if (!request.headers.has(name)) { - request.headers.set(name, value); - } - }); - -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/json.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/json.js deleted file mode 100644 index 74ca4cfab..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/json.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * JSON Interceptor. - */ - -import {when, isObject} from '../../util'; - -export default function (request) { - - const type = request.headers.get('Content-Type') || ''; - - if (isObject(request.body) && type.indexOf('application/json') === 0) { - request.body = JSON.stringify(request.body); - } - - return response => { - - return response.bodyText ? when(response.text(), text => { - - const type = response.headers.get('Content-Type') || ''; - - if (type.indexOf('application/json') === 0 || isJson(text)) { - - try { - response.body = JSON.parse(text); - } catch (e) { - response.body = null; - } - - } else { - response.body = text; - } - - return response; - - }) : response; - - }; -} - -function isJson(str) { - - const start = str.match(/^\s*(\[|\{)/); - const end = {'[': /]\s*$/, '{': /}\s*$/}; - - return start && end[start[1]].test(str); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/jsonp.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/jsonp.js deleted file mode 100644 index 93202292e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/jsonp.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * JSONP Interceptor. - */ - -import jsonpClient from '../client/jsonp'; - -export default function (request) { - - if (request.method == 'JSONP') { - request.client = jsonpClient; - } - -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/method.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/method.js deleted file mode 100644 index ac088b81b..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/interceptor/method.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * HTTP method override Interceptor. - */ - -export default function (request) { - - if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) { - request.headers.set('X-HTTP-Method-Override', request.method); - request.method = 'POST'; - } - -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/request.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/request.js deleted file mode 100644 index d0298e4a9..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/request.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * HTTP Request. - */ - -import Url from '../url/index'; -import Headers from './headers'; -import Response from './response'; -import {assign, toUpper} from '../util'; - -export default class Request { - - constructor(options) { - - this.body = null; - this.params = {}; - - assign(this, options, { - method: toUpper(options.method || 'GET') - }); - - if (!(this.headers instanceof Headers)) { - this.headers = new Headers(this.headers); - } - } - - getUrl() { - return Url(this); - } - - getBody() { - return this.body; - } - - respondWith(body, options) { - return new Response(body, assign(options || {}, {url: this.getUrl()})); - } - -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/response.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/response.js deleted file mode 100644 index d397a5a5f..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/http/response.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * HTTP Response. - */ - -import Headers from './headers'; -import Promise from '../promise'; -import {when, isBlob, isString} from '../util'; - -export default class Response { - - constructor(body, {url, headers, status, statusText}) { - - this.url = url; - this.ok = status >= 200 && status < 300; - this.status = status || 0; - this.statusText = statusText || ''; - this.headers = new Headers(headers); - this.body = body; - - if (isString(body)) { - - this.bodyText = body; - - } else if (isBlob(body)) { - - this.bodyBlob = body; - - if (isBlobText(body)) { - this.bodyText = blobText(body); - } - } - } - - blob() { - return when(this.bodyBlob); - } - - text() { - return when(this.bodyText); - } - - json() { - return when(this.text(), text => JSON.parse(text)); - } - -} - -Object.defineProperty(Response.prototype, 'data', { - - get() { - return this.body; - }, - - set(body) { - this.body = body; - } - -}); - -function blobText(body) { - return new Promise((resolve) => { - - var reader = new FileReader(); - - reader.readAsText(body); - reader.onload = () => { - resolve(reader.result); - }; - - }); -} - -function isBlobText(body) { - return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1; -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/index.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/index.js deleted file mode 100644 index 7308dee1c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/index.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Install plugin. - */ - -import Url from './url/index'; -import Http from './http/index'; -import Promise from './promise'; -import Resource from './resource'; -import Util, {options} from './util'; - -function plugin(Vue) { - - if (plugin.installed) { - return; - } - - Util(Vue); - - Vue.url = Url; - Vue.http = Http; - Vue.resource = Resource; - Vue.Promise = Promise; - - Object.defineProperties(Vue.prototype, { - - $url: { - get() { - return options(Vue.url, this, this.$options.url); - } - }, - - $http: { - get() { - return options(Vue.http, this, this.$options.http); - } - }, - - $resource: { - get() { - return Vue.resource.bind(this); - } - }, - - $promise: { - get() { - return (executor) => new Vue.Promise(executor, this); - } - } - - }); -} - -if (typeof window !== 'undefined' && window.Vue) { - window.Vue.use(plugin); -} - -export default plugin; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/promise.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/promise.js deleted file mode 100644 index b3cce7461..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/promise.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) - */ - -const RESOLVED = 0; -const REJECTED = 1; -const PENDING = 2; - -import {nextTick} from '../util'; - -export default function Promise(executor) { - - this.state = PENDING; - this.value = undefined; - this.deferred = []; - - var promise = this; - - try { - executor(function (x) { - promise.resolve(x); - }, function (r) { - promise.reject(r); - }); - } catch (e) { - promise.reject(e); - } -} - -Promise.reject = function (r) { - return new Promise(function (resolve, reject) { - reject(r); - }); -}; - -Promise.resolve = function (x) { - return new Promise(function (resolve, reject) { - resolve(x); - }); -}; - -Promise.all = function all(iterable) { - return new Promise(function (resolve, reject) { - var count = 0, result = []; - - if (iterable.length === 0) { - resolve(result); - } - - function resolver(i) { - return function (x) { - result[i] = x; - count += 1; - - if (count === iterable.length) { - resolve(result); - } - }; - } - - for (var i = 0; i < iterable.length; i += 1) { - Promise.resolve(iterable[i]).then(resolver(i), reject); - } - }); -}; - -Promise.race = function race(iterable) { - return new Promise(function (resolve, reject) { - for (var i = 0; i < iterable.length; i += 1) { - Promise.resolve(iterable[i]).then(resolve, reject); - } - }); -}; - -var p = Promise.prototype; - -p.resolve = function resolve(x) { - var promise = this; - - if (promise.state === PENDING) { - if (x === promise) { - throw new TypeError('Promise settled with itself.'); - } - - var called = false; - - try { - var then = x && x['then']; - - if (x !== null && typeof x === 'object' && typeof then === 'function') { - then.call(x, function (x) { - if (!called) { - promise.resolve(x); - } - called = true; - - }, function (r) { - if (!called) { - promise.reject(r); - } - called = true; - }); - return; - } - } catch (e) { - if (!called) { - promise.reject(e); - } - return; - } - - promise.state = RESOLVED; - promise.value = x; - promise.notify(); - } -}; - -p.reject = function reject(reason) { - var promise = this; - - if (promise.state === PENDING) { - if (reason === promise) { - throw new TypeError('Promise settled with itself.'); - } - - promise.state = REJECTED; - promise.value = reason; - promise.notify(); - } -}; - -p.notify = function notify() { - var promise = this; - - nextTick(function () { - if (promise.state !== PENDING) { - while (promise.deferred.length) { - var deferred = promise.deferred.shift(), - onResolved = deferred[0], - onRejected = deferred[1], - resolve = deferred[2], - reject = deferred[3]; - - try { - if (promise.state === RESOLVED) { - if (typeof onResolved === 'function') { - resolve(onResolved.call(undefined, promise.value)); - } else { - resolve(promise.value); - } - } else if (promise.state === REJECTED) { - if (typeof onRejected === 'function') { - resolve(onRejected.call(undefined, promise.value)); - } else { - reject(promise.value); - } - } - } catch (e) { - reject(e); - } - } - } - }); -}; - -p.then = function then(onResolved, onRejected) { - var promise = this; - - return new Promise(function (resolve, reject) { - promise.deferred.push([onResolved, onRejected, resolve, reject]); - promise.notify(); - }); -}; - -p.catch = function (onRejected) { - return this.then(undefined, onRejected); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/url-template.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/url-template.js deleted file mode 100644 index 189d48dcd..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/lib/url-template.js +++ /dev/null @@ -1,150 +0,0 @@ -/** - * URL Template v2.0.6 (https://github.com/bramstein/url-template) - */ - -export function expand(url, params, variables) { - - var tmpl = parse(url), expanded = tmpl.expand(params); - - if (variables) { - variables.push.apply(variables, tmpl.vars); - } - - return expanded; -} - -export function parse(template) { - - var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = []; - - return { - vars: variables, - expand(context) { - return template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expression, literal) => { - if (expression) { - - var operator = null, values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach((variable) => { - var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - variables.push(tmp[1]); - }); - - if (operator && operator !== '+') { - - var separator = ','; - - if (operator === '?') { - separator = '&'; - } else if (operator !== '#') { - separator = operator; - } - - return (values.length !== 0 ? operator : '') + values.join(separator); - } else { - return values.join(','); - } - - } else { - return encodeReserved(literal); - } - }); - } - }; -} - -function getValues(context, operator, key, modifier) { - - var value = context[key], result = []; - - if (isDefined(value) && value !== '') { - if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { - value = value.toString(); - - if (modifier && modifier !== '*') { - value = value.substring(0, parseInt(modifier, 10)); - } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - } else { - if (modifier === '*') { - if (Array.isArray(value)) { - value.filter(isDefined).forEach((value) => { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); - }); - } else { - Object.keys(value).forEach((k) => { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - var tmp = []; - - if (Array.isArray(value)) { - value.filter(isDefined).forEach((value) => { - tmp.push(encodeValue(operator, value)); - }); - } else { - Object.keys(value).forEach((k) => { - if (isDefined(value[k])) { - tmp.push(encodeURIComponent(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - - if (isKeyOperator(operator)) { - result.push(encodeURIComponent(key) + '=' + tmp.join(',')); - } else if (tmp.length !== 0) { - result.push(tmp.join(',')); - } - } - } - } else { - if (operator === ';') { - result.push(encodeURIComponent(key)); - } else if (value === '' && (operator === '&' || operator === '?')) { - result.push(encodeURIComponent(key) + '='); - } else if (value === '') { - result.push(''); - } - } - - return result; -} - -function isDefined(value) { - return value !== undefined && value !== null; -} - -function isKeyOperator(operator) { - return operator === ';' || operator === '&' || operator === '?'; -} - -function encodeValue(operator, value, key) { - - value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value); - - if (key) { - return encodeURIComponent(key) + '=' + value; - } else { - return value; - } -} - -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map((part) => { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part); - } - return part; - }).join(''); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/promise.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/promise.js deleted file mode 100644 index 7311f0833..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/promise.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Promise adapter. - */ - -import PromiseLib from './lib/promise'; - -if (typeof Promise === 'undefined') { - window.Promise = PromiseLib; -} - -export default function PromiseObj(executor, context) { - - if (executor instanceof Promise) { - this.promise = executor; - } else { - this.promise = new Promise(executor.bind(context)); - } - - this.context = context; -} - -PromiseObj.all = function (iterable, context) { - return new PromiseObj(Promise.all(iterable), context); -}; - -PromiseObj.resolve = function (value, context) { - return new PromiseObj(Promise.resolve(value), context); -}; - -PromiseObj.reject = function (reason, context) { - return new PromiseObj(Promise.reject(reason), context); -}; - -PromiseObj.race = function (iterable, context) { - return new PromiseObj(Promise.race(iterable), context); -}; - -var p = PromiseObj.prototype; - -p.bind = function (context) { - this.context = context; - return this; -}; - -p.then = function (fulfilled, rejected) { - - if (fulfilled && fulfilled.bind && this.context) { - fulfilled = fulfilled.bind(this.context); - } - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.then(fulfilled, rejected), this.context); -}; - -p.catch = function (rejected) { - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.catch(rejected), this.context); -}; - -p.finally = function (callback) { - - return this.then(function (value) { - callback.call(this); - return value; - }, function (reason) { - callback.call(this); - return Promise.reject(reason); - } - ); -}; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/resource.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/resource.js deleted file mode 100644 index f99e42b83..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/resource.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Service for interacting with RESTful services. - */ - -import Http from './http/index'; -import {assign, each, merge} from './util'; - -export default function Resource(url, params, actions, options) { - - var self = this || {}, resource = {}; - - actions = assign({}, - Resource.actions, - actions - ); - - each(actions, (action, name) => { - - action = merge({url, params: assign({}, params)}, options, action); - - resource[name] = function () { - return (self.$http || Http)(opts(action, arguments)); - }; - }); - - return resource; -} - -function opts(action, args) { - - var options = assign({}, action), params = {}, body; - - switch (args.length) { - - case 2: - - params = args[0]; - body = args[1]; - - break; - - case 1: - - if (/^(POST|PUT|PATCH)$/i.test(options.method)) { - body = args[0]; - } else { - params = args[0]; - } - - break; - - case 0: - - break; - - default: - - throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments'; - } - - options.body = body; - options.params = assign({}, options.params, params); - - return options; -} - -Resource.actions = { - - get: {method: 'GET'}, - save: {method: 'POST'}, - query: {method: 'GET'}, - update: {method: 'PUT'}, - remove: {method: 'DELETE'}, - delete: {method: 'DELETE'} - -}; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/index.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/index.js deleted file mode 100644 index c4963b931..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/index.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Service for URL templating. - */ - -import root from './root'; -import query from './query'; -import template from './template'; -import {each, merge, isArray, isFunction, isObject, isPlainObject, isString} from '../util'; - -export default function Url(url, params) { - - var self = this || {}, options = url, transform; - - if (isString(url)) { - options = {url, params}; - } - - options = merge({}, Url.options, self.$options, options); - - Url.transforms.forEach(handler => { - - if (isString(handler)) { - handler = Url.transform[handler]; - } - - if (isFunction(handler)) { - transform = factory(handler, transform, self.$vm); - } - - }); - - return transform(options); -} - -/** - * Url options. - */ - -Url.options = { - url: '', - root: null, - params: {} -}; - -/** - * Url transforms. - */ - -Url.transform = {template, query, root}; -Url.transforms = ['template', 'query', 'root']; - -/** - * Encodes a Url parameter string. - * - * @param {Object} obj - */ - -Url.params = function (obj) { - - var params = [], escape = encodeURIComponent; - - params.add = function (key, value) { - - if (isFunction(value)) { - value = value(); - } - - if (value === null) { - value = ''; - } - - this.push(escape(key) + '=' + escape(value)); - }; - - serialize(params, obj); - - return params.join('&').replace(/%20/g, '+'); -}; - -/** - * Parse a URL and return its components. - * - * @param {String} url - */ - -Url.parse = function (url) { - - var el = document.createElement('a'); - - if (document.documentMode) { - el.href = url; - url = el.href; - } - - el.href = url; - - return { - href: el.href, - protocol: el.protocol ? el.protocol.replace(/:$/, '') : '', - port: el.port, - host: el.host, - hostname: el.hostname, - pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname, - search: el.search ? el.search.replace(/^\?/, '') : '', - hash: el.hash ? el.hash.replace(/^#/, '') : '' - }; -}; - -function factory(handler, next, vm) { - return options => { - return handler.call(vm, options, next); - }; -} - -function serialize(params, obj, scope) { - - var array = isArray(obj), plain = isPlainObject(obj), hash; - - each(obj, (value, key) => { - - hash = isObject(value) || isArray(value); - - if (scope) { - key = scope + '[' + (plain || hash ? key : '') + ']'; - } - - if (!scope && array) { - params.add(value.name, value.value); - } else if (hash) { - serialize(params, value, key); - } else { - params.add(key, value); - } - }); -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/query.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/query.js deleted file mode 100644 index 627bbc83c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/query.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Query Parameter Transform. - */ - -import Url from './index'; -import {each} from '../util'; - -export default function (options, next) { - - var urlParams = Object.keys(Url.options.params), query = {}, url = next(options); - - each(options.params, (value, key) => { - if (urlParams.indexOf(key) === -1) { - query[key] = value; - } - }); - - query = Url.params(query); - - if (query) { - url += (url.indexOf('?') == -1 ? '?' : '&') + query; - } - - return url; -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/root.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/root.js deleted file mode 100644 index 9af294c2c..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/root.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Root Prefix Transform. - */ - -import {isString, trimEnd} from '../util'; - -export default function (options, next) { - - var url = next(options); - - if (isString(options.root) && !/^(https?:)?\//.test(url)) { - url = trimEnd(options.root, '/') + '/' + url; - } - - return url; -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/template.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/template.js deleted file mode 100644 index 603c01af4..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/url/template.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * URL Template (RFC 6570) Transform. - */ - -import {expand} from '../lib/url-template'; - -export default function (options) { - - var variables = [], url = expand(options.url, options.params, variables); - - variables.forEach((key) => { - delete options.params[key]; - }); - - return url; -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/util.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/src/util.js deleted file mode 100644 index 2a62f7842..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/src/util.js +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Utility functions. - */ - -import Promise from './promise'; - -var {hasOwnProperty} = {}, {slice} = [], debug = false, ntick; - -export const inBrowser = typeof window !== 'undefined'; - -export default function ({config, nextTick}) { - ntick = nextTick; - debug = config.debug || !config.silent; -} - -export function warn(msg) { - if (typeof console !== 'undefined' && debug) { - console.warn('[VueResource warn]: ' + msg); - } -} - -export function error(msg) { - if (typeof console !== 'undefined') { - console.error(msg); - } -} - -export function nextTick(cb, ctx) { - return ntick(cb, ctx); -} - -export function trim(str) { - return str ? str.replace(/^\s*|\s*$/g, '') : ''; -} - -export function trimEnd(str, chars) { - - if (str && chars === undefined) { - return str.replace(/\s+$/, ''); - } - - if (!str || !chars) { - return str; - } - - return str.replace(new RegExp(`[${chars}]+$`), ''); -} - -export function toLower(str) { - return str ? str.toLowerCase() : ''; -} - -export function toUpper(str) { - return str ? str.toUpperCase() : ''; -} - -export const isArray = Array.isArray; - -export function isString(val) { - return typeof val === 'string'; -} - -export function isBoolean(val) { - return val === true || val === false; -} - -export function isFunction(val) { - return typeof val === 'function'; -} - -export function isObject(obj) { - return obj !== null && typeof obj === 'object'; -} - -export function isPlainObject(obj) { - return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype; -} - -export function isBlob(obj) { - return typeof Blob !== 'undefined' && obj instanceof Blob; -} - -export function isFormData(obj) { - return typeof FormData !== 'undefined' && obj instanceof FormData; -} - -export function when(value, fulfilled, rejected) { - - var promise = Promise.resolve(value); - - if (arguments.length < 2) { - return promise; - } - - return promise.then(fulfilled, rejected); -} - -export function options(fn, obj, opts) { - - opts = opts || {}; - - if (isFunction(opts)) { - opts = opts.call(obj); - } - - return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts}); -} - -export function each(obj, iterator) { - - var i, key; - - if (isArray(obj)) { - for (i = 0; i < obj.length; i++) { - iterator.call(obj[i], obj[i], i); - } - } else if (isObject(obj)) { - for (key in obj) { - if (hasOwnProperty.call(obj, key)) { - iterator.call(obj[key], obj[key], key); - } - } - } - - return obj; -} - -export const assign = Object.assign || _assign; - -export function merge(target) { - - var args = slice.call(arguments, 1); - - args.forEach(source => { - _merge(target, source, true); - }); - - return target; -} - -export function defaults(target) { - - var args = slice.call(arguments, 1); - - args.forEach(source => { - - for (var key in source) { - if (target[key] === undefined) { - target[key] = source[key]; - } - } - - }); - - return target; -} - -function _assign(target) { - - var args = slice.call(arguments, 1); - - args.forEach(source => { - _merge(target, source); - }); - - return target; -} - -function _merge(target, source, deep) { - for (var key in source) { - if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { - if (isPlainObject(source[key]) && !isPlainObject(target[key])) { - target[key] = {}; - } - if (isArray(source[key]) && !isArray(target[key])) { - target[key] = []; - } - _merge(target[key], source[key], deep); - } else if (source[key] !== undefined) { - target[key] = source[key]; - } - } -} diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/invalid.json b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/invalid.json deleted file mode 100644 index e466dcbd8..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/invalid.json +++ /dev/null @@ -1 +0,0 @@ -invalid \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/text.txt b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/text.txt deleted file mode 100644 index f3a34851d..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/text.txt +++ /dev/null @@ -1 +0,0 @@ -text \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/valid.json b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/valid.json deleted file mode 100644 index 18d7acf58..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/data/valid.json +++ /dev/null @@ -1 +0,0 @@ -{"foo": "bar"} \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.js deleted file mode 100644 index d3e249328..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.js +++ /dev/null @@ -1,200 +0,0 @@ -import Vue from 'vue'; - -describe('Vue.http', function () { - - it('get("data/text.txt")', done => { - - Vue.http.get('data/text.txt').then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(res.body).toBe('text'); - expect(res.data).toBe(res.body); - expect(res.headers.get('Content-Type')).toBe('text/plain'); - - done(); - }); - - }); - - it('get("data/valid.json")', done => { - - Vue.http.get('data/valid.json').then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(typeof res.body).toBe('object'); - expect(res.body.foo).toBe('bar'); - - done(); - }); - - }); - - it('get("data/invalid.json")', done => { - - Vue.http.get('data/invalid.json').then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(res.body).toBeNull(); - - done(); - }); - - }); - - it('get("github.com/avatar")', done => { - - Vue.http.get('https://avatars1.githubusercontent.com/u/6128107', {responseType: 'blob'}).then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(res.body instanceof Blob).toBe(true); - expect(res.body.type).toBe('image/png'); - - done(); - }); - - }); - - it('get("cors-api.appspot.com")', done => { - - Vue.http.get('http://server.cors-api.appspot.com/server?id=1&enable=true').then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(typeof res.body).toBe('object'); - expect(res.body.shift().requestType).toBe('cors'); - - if (res.headers.get('Content-Type')) { - expect(res.headers.get('Content-Type')).toBe('application/json'); - } - - done(); - }); - - }); - - it('jsonp("jsfiddle.net/jsonp")', done => { - - Vue.http.jsonp('http://jsfiddle.net/echo/jsonp/', {params: {foo: 'bar'}}).then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(typeof res.body).toBe('object'); - expect(res.body.foo).toBe('bar'); - - done(); - }); - - }); - -}); - -describe('this.$http', function () { - - it('get("data/valid.json")', done => { - - var vm = new Vue({ - - created() { - - this.$http.get('data/valid.json').then(res => { - - expect(this).toBe(vm); - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(typeof res.body).toBe('object'); - expect(res.body.foo).toBe('bar'); - - done(); - - }); - - } - - }); - - }); - - it('get("data/valid.json") with timeout', done => { - - var vm = new Vue({ - - created() { - - var random = Math.random().toString(36).substr(2); - - this.$http.get(`data/valid.json?${random}`, {timeout: 1}).then(res => { - - fail('Callback has been called'); - - }, res => { - - expect(res.ok).toBe(false); - expect(res.status).toBe(0); - - done(); - - }); - - } - - }); - - }); - - it('get("data/valid.json") with abort()', done => { - - var vm = new Vue({ - - created() { - - var random = Math.random().toString(36).substr(2); - - this.$http.get(`data/valid.json?${random}`, { - - before(req) { - setTimeout(() => { - - expect(typeof req.abort).toBe('function'); - - req.abort(); - - }, 0); - } - - }).then(res => { - fail('Callback has been called'); - }, res => { - done(); - }); - } - - }); - - }); - - it('get("data/notfound.json") using catch()', done => { - - var vm = new Vue({ - - created() { - - this.$http.get('data/notfound.json').catch(res => { - - expect(this).toBe(vm); - expect(res.ok).toBe(false); - expect(res.status).toBe(404); - - done(); - }); - - } - - }); - - }); - -}); \ No newline at end of file diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.test.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.test.js deleted file mode 100644 index c01b4c639..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/http.test.js +++ /dev/null @@ -1,34 +0,0 @@ -var Vue = require('vue'); -var VueResource = require('../dist/vue-resource.common.js'); - -Vue.use(VueResource); - -describe('Vue.http', function () { - - it('post("jsfiddle.net/html")', () => { - - return Vue.http.post('http://jsfiddle.net/echo/html/', {html: 'text'}, {emulateJSON: true}).then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(typeof res.body).toBe('string'); - expect(res.body).toBe('text'); - - }); - - }); - - it('post("jsfiddle.net/json")', () => { - - return Vue.http.post('http://jsfiddle.net/echo/json/', {json: JSON.stringify({foo: 'bar'})}, {emulateJSON: true}).then(res => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(typeof res.body).toBe('object'); - expect(res.body.foo).toBe('bar'); - - }); - - }); - -}); diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.html b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.html deleted file mode 100644 index a60aca568..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Vue Resource - Jasmine - - - - - - - - - - - - - diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.js deleted file mode 100644 index 97ea681de..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from 'vue'; -import VueResource from '../src/index'; - -Vue.use(VueResource); - -require('./url'); -require('./http'); -require('./resource'); -require('./promise'); diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/karma.conf.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/karma.conf.js deleted file mode 100644 index cfef42a43..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/karma.conf.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = config => { - - config.set({ - - basePath: __dirname, - - frameworks: ['jasmine'], - - browsers: ['Chrome', 'Safari', 'Firefox'], - - files: [ - 'index.js', - {pattern: 'data/*', included: false}, - ], - - preprocessors: { - 'index.js': ['webpack'] - }, - - proxies: { - '/data/': '/base/data/' - }, - - }); - -}; diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/promise.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/promise.js deleted file mode 100644 index e3a685b35..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/promise.js +++ /dev/null @@ -1,125 +0,0 @@ -import Promise from '../src/promise'; - -describe('Vue.promise ' + (window.Promise !== undefined ? '(native)' : '(polyfill)'), function () { - - it('then fulfill', function (done) { - - Promise.resolve(1).then(function (value) { - expect(value).toBe(1); - done(); - }); - - }); - - it('then reject', function (done) { - - Promise.reject(1).then(undefined, function (value) { - expect(value).toBe(1); - done(); - }); - - }); - - it('catch', function (done) { - - Promise.reject(1).catch(function (value) { - expect(value).toBe(1); - done(); - }); - - }); - - it('finally fulfill', function (done) { - - Promise.resolve(1).finally(function (arg) { - expect(arg).toBe(undefined); - }).then(function (arg) { - expect(arg).toBe(1); - done(); - }); - - }); - - it('finally reject', function (done) { - - Promise.reject(1).finally(function (arg) { - expect(arg).toBe(undefined); - }).catch(function (arg) { - expect(arg).toBe(1); - done(); - }); - - }); - - it('all', function (done) { - - Promise.all([ - - Promise.resolve(1), - Promise.resolve(2) - - ]).then(function (values) { - expect(values[0]).toBe(1); - expect(values[1]).toBe(2); - done(); - }); - - }); - - it('duplicate', function (done) { - - Promise.all([ - - Promise.resolve(1).then(function (value) { - expect(value).toBe(1); - }), - - Promise.resolve(2).then(function (value) { - expect(value).toBe(2); - }) - - ]).then(done); - - }); - - it('context', function (done) { - - var context = {foo: 'bar'}; - - Promise.resolve().bind(context).then(function () { - expect(this).toBe(context); - done(); - }); - - }); - - it('context chain fulfill', function (done) { - - var context = {foo: 'bar'}; - - Promise.resolve().bind(context).catch(undefined).finally(function () { - expect(this).toBe(context); - }).then(function () { - expect(this).toBe(context); - done(); - }); - - }); - - it('context chain reject', function (done) { - - var context = {foo: 'bar'}; - - Promise.reject().bind(context).catch(function () { - expect(this).toBe(context); - return Promise.reject(); - }).finally(function () { - expect(this).toBe(context); - }).catch(function () { - expect(this).toBe(context); - done(); - }); - - }); - -}); diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/resource.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/resource.js deleted file mode 100644 index e874656a4..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/resource.js +++ /dev/null @@ -1,51 +0,0 @@ -import Vue from 'vue'; - -describe('this.$resource', function () { - - it('get({file: "valid.json"})', (done) => { - - var vm = new Vue({ - - created() { - - var resource = this.$resource('data{/file}'); - - resource.get({file: 'valid.json'}).then((res) => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(res.data.foo).toBe('bar'); - - done(); - }); - - } - - }); - - }); - - it('save({file: "valid.json"}, {foo: "bar"})', (done) => { - - var vm = new Vue({ - - created() { - - var resource = this.$resource('data{/file}'); - - resource.save({file: 'valid.json'}, {foo: 'bar'}).then((res) => { - - expect(res.ok).toBe(true); - expect(res.status).toBe(200); - expect(res.data.foo).toBe('bar'); - - done(); - }); - - } - - }); - - }); - -}); diff --git a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/specs.js b/advancedcontentfilter/vendor/npm-asset/vue-resource/test/specs.js deleted file mode 100644 index 76eb0207e..000000000 --- a/advancedcontentfilter/vendor/npm-asset/vue-resource/test/specs.js +++ /dev/null @@ -1,10662 +0,0 @@ -/******/ (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 = 5); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return inBrowser; }); -/* harmony export (immutable) */ __webpack_exports__["u"] = warn; -/* harmony export (immutable) */ __webpack_exports__["e"] = error; -/* harmony export (immutable) */ __webpack_exports__["o"] = nextTick; -/* harmony export (immutable) */ __webpack_exports__["s"] = trim; -/* harmony export (immutable) */ __webpack_exports__["t"] = trimEnd; -/* harmony export (immutable) */ __webpack_exports__["q"] = toLower; -/* harmony export (immutable) */ __webpack_exports__["r"] = toUpper; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isArray; }); -/* harmony export (immutable) */ __webpack_exports__["m"] = isString; -/* unused harmony export isBoolean */ -/* harmony export (immutable) */ __webpack_exports__["j"] = isFunction; -/* harmony export (immutable) */ __webpack_exports__["k"] = isObject; -/* harmony export (immutable) */ __webpack_exports__["l"] = isPlainObject; -/* harmony export (immutable) */ __webpack_exports__["h"] = isBlob; -/* harmony export (immutable) */ __webpack_exports__["i"] = isFormData; -/* harmony export (immutable) */ __webpack_exports__["v"] = when; -/* harmony export (immutable) */ __webpack_exports__["p"] = options; -/* harmony export (immutable) */ __webpack_exports__["d"] = each; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assign; }); -/* harmony export (immutable) */ __webpack_exports__["n"] = merge; -/* harmony export (immutable) */ __webpack_exports__["c"] = defaults; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__promise__ = __webpack_require__(1); -/** - * Utility functions. - */ - - - -var ref = {}; -var hasOwnProperty = ref.hasOwnProperty; -; -var ref$1 = []; -var slice = ref$1.slice; -var debug = false, ntick; - -var inBrowser = typeof window !== 'undefined'; - -/* harmony default export */ __webpack_exports__["b"] = (function (ref) { - var config = ref.config; - var nextTick = ref.nextTick; - - ntick = nextTick; - debug = config.debug || !config.silent; -}); - -function warn(msg) { - if (typeof console !== 'undefined' && debug) { - console.warn('[VueResource warn]: ' + msg); - } -} - -function error(msg) { - if (typeof console !== 'undefined') { - console.error(msg); - } -} - -function nextTick(cb, ctx) { - return ntick(cb, ctx); -} - -function trim(str) { - return str ? str.replace(/^\s*|\s*$/g, '') : ''; -} - -function trimEnd(str, chars) { - - if (str && chars === undefined) { - return str.replace(/\s+$/, ''); - } - - if (!str || !chars) { - return str; - } - - return str.replace(new RegExp(("[" + chars + "]+$")), ''); -} - -function toLower(str) { - return str ? str.toLowerCase() : ''; -} - -function toUpper(str) { - return str ? str.toUpperCase() : ''; -} - -var isArray = Array.isArray; - -function isString(val) { - return typeof val === 'string'; -} - -function isBoolean(val) { - return val === true || val === false; -} - -function isFunction(val) { - return typeof val === 'function'; -} - -function isObject(obj) { - return obj !== null && typeof obj === 'object'; -} - -function isPlainObject(obj) { - return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype; -} - -function isBlob(obj) { - return typeof Blob !== 'undefined' && obj instanceof Blob; -} - -function isFormData(obj) { - return typeof FormData !== 'undefined' && obj instanceof FormData; -} - -function when(value, fulfilled, rejected) { - - var promise = __WEBPACK_IMPORTED_MODULE_0__promise__["a" /* default */].resolve(value); - - if (arguments.length < 2) { - return promise; - } - - return promise.then(fulfilled, rejected); -} - -function options(fn, obj, opts) { - - opts = opts || {}; - - if (isFunction(opts)) { - opts = opts.call(obj); - } - - return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts}); -} - -function each(obj, iterator) { - - var i, key; - - if (isArray(obj)) { - for (i = 0; i < obj.length; i++) { - iterator.call(obj[i], obj[i], i); - } - } else if (isObject(obj)) { - for (key in obj) { - if (hasOwnProperty.call(obj, key)) { - iterator.call(obj[key], obj[key], key); - } - } - } - - return obj; -} - -var assign = Object.assign || _assign; - -function merge(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source, true); - }); - - return target; -} - -function defaults(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - - for (var key in source) { - if (target[key] === undefined) { - target[key] = source[key]; - } - } - - }); - - return target; -} - -function _assign(target) { - - var args = slice.call(arguments, 1); - - args.forEach(function (source) { - _merge(target, source); - }); - - return target; -} - -function _merge(target, source, deep) { - for (var key in source) { - if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { - if (isPlainObject(source[key]) && !isPlainObject(target[key])) { - target[key] = {}; - } - if (isArray(source[key]) && !isArray(target[key])) { - target[key] = []; - } - _merge(target[key], source[key], deep); - } else if (source[key] !== undefined) { - target[key] = source[key]; - } - } -} - - -/***/ }), -/* 1 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXTERNAL MODULE: ./src/util.js -var util = __webpack_require__(0); - -// CONCATENATED MODULE: ./src/lib/promise.js -/** - * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) - */ - -var RESOLVED = 0; -var REJECTED = 1; -var PENDING = 2; - - - -function promise_Promise(executor) { - - this.state = PENDING; - this.value = undefined; - this.deferred = []; - - var promise = this; - - try { - executor(function (x) { - promise.resolve(x); - }, function (r) { - promise.reject(r); - }); - } catch (e) { - promise.reject(e); - } -} - -promise_Promise.reject = function (r) { - return new promise_Promise(function (resolve, reject) { - reject(r); - }); -}; - -promise_Promise.resolve = function (x) { - return new promise_Promise(function (resolve, reject) { - resolve(x); - }); -}; - -promise_Promise.all = function all(iterable) { - return new promise_Promise(function (resolve, reject) { - var count = 0, result = []; - - if (iterable.length === 0) { - resolve(result); - } - - function resolver(i) { - return function (x) { - result[i] = x; - count += 1; - - if (count === iterable.length) { - resolve(result); - } - }; - } - - for (var i = 0; i < iterable.length; i += 1) { - promise_Promise.resolve(iterable[i]).then(resolver(i), reject); - } - }); -}; - -promise_Promise.race = function race(iterable) { - return new promise_Promise(function (resolve, reject) { - for (var i = 0; i < iterable.length; i += 1) { - promise_Promise.resolve(iterable[i]).then(resolve, reject); - } - }); -}; - -var p = promise_Promise.prototype; - -p.resolve = function resolve(x) { - var promise = this; - - if (promise.state === PENDING) { - if (x === promise) { - throw new TypeError('Promise settled with itself.'); - } - - var called = false; - - try { - var then = x && x['then']; - - if (x !== null && typeof x === 'object' && typeof then === 'function') { - then.call(x, function (x) { - if (!called) { - promise.resolve(x); - } - called = true; - - }, function (r) { - if (!called) { - promise.reject(r); - } - called = true; - }); - return; - } - } catch (e) { - if (!called) { - promise.reject(e); - } - return; - } - - promise.state = RESOLVED; - promise.value = x; - promise.notify(); - } -}; - -p.reject = function reject(reason) { - var promise = this; - - if (promise.state === PENDING) { - if (reason === promise) { - throw new TypeError('Promise settled with itself.'); - } - - promise.state = REJECTED; - promise.value = reason; - promise.notify(); - } -}; - -p.notify = function notify() { - var promise = this; - - Object(util["o" /* nextTick */])(function () { - if (promise.state !== PENDING) { - while (promise.deferred.length) { - var deferred = promise.deferred.shift(), - onResolved = deferred[0], - onRejected = deferred[1], - resolve = deferred[2], - reject = deferred[3]; - - try { - if (promise.state === RESOLVED) { - if (typeof onResolved === 'function') { - resolve(onResolved.call(undefined, promise.value)); - } else { - resolve(promise.value); - } - } else if (promise.state === REJECTED) { - if (typeof onRejected === 'function') { - resolve(onRejected.call(undefined, promise.value)); - } else { - reject(promise.value); - } - } - } catch (e) { - reject(e); - } - } - } - }); -}; - -p.then = function then(onResolved, onRejected) { - var promise = this; - - return new promise_Promise(function (resolve, reject) { - promise.deferred.push([onResolved, onRejected, resolve, reject]); - promise.notify(); - }); -}; - -p.catch = function (onRejected) { - return this.then(undefined, onRejected); -}; - -// CONCATENATED MODULE: ./src/promise.js -/* harmony export (immutable) */ __webpack_exports__["a"] = PromiseObj; -/** - * Promise adapter. - */ - - - -if (typeof Promise === 'undefined') { - window.Promise = promise_Promise; -} - -function PromiseObj(executor, context) { - - if (executor instanceof Promise) { - this.promise = executor; - } else { - this.promise = new Promise(executor.bind(context)); - } - - this.context = context; -} - -PromiseObj.all = function (iterable, context) { - return new PromiseObj(Promise.all(iterable), context); -}; - -PromiseObj.resolve = function (value, context) { - return new PromiseObj(Promise.resolve(value), context); -}; - -PromiseObj.reject = function (reason, context) { - return new PromiseObj(Promise.reject(reason), context); -}; - -PromiseObj.race = function (iterable, context) { - return new PromiseObj(Promise.race(iterable), context); -}; - -var promise_p = PromiseObj.prototype; - -promise_p.bind = function (context) { - this.context = context; - return this; -}; - -promise_p.then = function (fulfilled, rejected) { - - if (fulfilled && fulfilled.bind && this.context) { - fulfilled = fulfilled.bind(this.context); - } - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.then(fulfilled, rejected), this.context); -}; - -promise_p.catch = function (rejected) { - - if (rejected && rejected.bind && this.context) { - rejected = rejected.bind(this.context); - } - - return new PromiseObj(this.promise.catch(rejected), this.context); -}; - -promise_p.finally = function (callback) { - - return this.then(function (value) { - callback.call(this); - return value; - }, function (reason) { - callback.call(this); - return Promise.reject(reason); - } - ); -}; - - -/***/ }), -/* 2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process, global, setImmediate) {/*! - * Vue.js v2.5.13 - * (c) 2014-2017 Evan You - * Released under the MIT License. - */ -/* */ - -var emptyObject = Object.freeze({}); - -// these helpers produces better vm code in JS engines due to their -// explicitness and function inlining -function isUndef (v) { - return v === undefined || v === null -} - -function isDef (v) { - return v !== undefined && v !== null -} - -function isTrue (v) { - return v === true -} - -function isFalse (v) { - return v === false -} - -/** - * Check if value is primitive - */ -function isPrimitive (value) { - return ( - typeof value === 'string' || - typeof value === 'number' || - // $flow-disable-line - typeof value === 'symbol' || - typeof value === 'boolean' - ) -} - -/** - * Quick object check - this is primarily used to tell - * Objects from primitive values when we know the value - * is a JSON-compliant type. - */ -function isObject (obj) { - return obj !== null && typeof obj === 'object' -} - -/** - * Get the raw type string of a value e.g. [object Object] - */ -var _toString = Object.prototype.toString; - -function toRawType (value) { - return _toString.call(value).slice(8, -1) -} - -/** - * Strict object type check. Only returns true - * for plain JavaScript objects. - */ -function isPlainObject (obj) { - return _toString.call(obj) === '[object Object]' -} - -function isRegExp (v) { - return _toString.call(v) === '[object RegExp]' -} - -/** - * Check if val is a valid array index. - */ -function isValidArrayIndex (val) { - var n = parseFloat(String(val)); - return n >= 0 && Math.floor(n) === n && isFinite(val) -} - -/** - * Convert a value to a string that is actually rendered. - */ -function toString (val) { - return val == null - ? '' - : typeof val === 'object' - ? JSON.stringify(val, null, 2) - : String(val) -} - -/** - * Convert a input value to a number for persistence. - * If the conversion fails, return original string. - */ -function toNumber (val) { - var n = parseFloat(val); - return isNaN(n) ? val : n -} - -/** - * Make a map and return a function for checking if a key - * is in that map. - */ -function makeMap ( - str, - expectsLowerCase -) { - var map = Object.create(null); - var list = str.split(','); - for (var i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase - ? function (val) { return map[val.toLowerCase()]; } - : function (val) { return map[val]; } -} - -/** - * Check if a tag is a built-in tag. - */ -var isBuiltInTag = makeMap('slot,component', true); - -/** - * Check if a attribute is a reserved attribute. - */ -var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); - -/** - * Remove an item from an array - */ -function remove (arr, item) { - if (arr.length) { - var index = arr.indexOf(item); - if (index > -1) { - return arr.splice(index, 1) - } - } -} - -/** - * Check whether the object has the property. - */ -var hasOwnProperty = Object.prototype.hasOwnProperty; -function hasOwn (obj, key) { - return hasOwnProperty.call(obj, key) -} - -/** - * Create a cached version of a pure function. - */ -function cached (fn) { - var cache = Object.create(null); - return (function cachedFn (str) { - var hit = cache[str]; - return hit || (cache[str] = fn(str)) - }) -} - -/** - * Camelize a hyphen-delimited string. - */ -var camelizeRE = /-(\w)/g; -var camelize = cached(function (str) { - return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) -}); - -/** - * Capitalize a string. - */ -var capitalize = cached(function (str) { - return str.charAt(0).toUpperCase() + str.slice(1) -}); - -/** - * Hyphenate a camelCase string. - */ -var hyphenateRE = /\B([A-Z])/g; -var hyphenate = cached(function (str) { - return str.replace(hyphenateRE, '-$1').toLowerCase() -}); - -/** - * Simple bind, faster than native - */ -function bind (fn, ctx) { - function boundFn (a) { - var l = arguments.length; - return l - ? l > 1 - ? fn.apply(ctx, arguments) - : fn.call(ctx, a) - : fn.call(ctx) - } - // record original fn length - boundFn._length = fn.length; - return boundFn -} - -/** - * Convert an Array-like object to a real Array. - */ -function toArray (list, start) { - start = start || 0; - var i = list.length - start; - var ret = new Array(i); - while (i--) { - ret[i] = list[i + start]; - } - return ret -} - -/** - * Mix properties into target object. - */ -function extend (to, _from) { - for (var key in _from) { - to[key] = _from[key]; - } - return to -} - -/** - * Merge an Array of Objects into a single Object. - */ -function toObject (arr) { - var res = {}; - for (var i = 0; i < arr.length; i++) { - if (arr[i]) { - extend(res, arr[i]); - } - } - return res -} - -/** - * Perform no operation. - * Stubbing args to make Flow happy without leaving useless transpiled code - * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/) - */ -function noop (a, b, c) {} - -/** - * Always return false. - */ -var no = function (a, b, c) { return false; }; - -/** - * Return same value - */ -var identity = function (_) { return _; }; - -/** - * Generate a static keys string from compiler modules. - */ - - -/** - * Check if two values are loosely equal - that is, - * if they are plain objects, do they have the same shape? - */ -function looseEqual (a, b) { - if (a === b) { return true } - var isObjectA = isObject(a); - var isObjectB = isObject(b); - if (isObjectA && isObjectB) { - try { - var isArrayA = Array.isArray(a); - var isArrayB = Array.isArray(b); - if (isArrayA && isArrayB) { - return a.length === b.length && a.every(function (e, i) { - return looseEqual(e, b[i]) - }) - } else if (!isArrayA && !isArrayB) { - var keysA = Object.keys(a); - var keysB = Object.keys(b); - return keysA.length === keysB.length && keysA.every(function (key) { - return looseEqual(a[key], b[key]) - }) - } else { - /* istanbul ignore next */ - return false - } - } catch (e) { - /* istanbul ignore next */ - return false - } - } else if (!isObjectA && !isObjectB) { - return String(a) === String(b) - } else { - return false - } -} - -function looseIndexOf (arr, val) { - for (var i = 0; i < arr.length; i++) { - if (looseEqual(arr[i], val)) { return i } - } - return -1 -} - -/** - * Ensure a function is called only once. - */ -function once (fn) { - var called = false; - return function () { - if (!called) { - called = true; - fn.apply(this, arguments); - } - } -} - -var SSR_ATTR = 'data-server-rendered'; - -var ASSET_TYPES = [ - 'component', - 'directive', - 'filter' -]; - -var LIFECYCLE_HOOKS = [ - 'beforeCreate', - 'created', - 'beforeMount', - 'mounted', - 'beforeUpdate', - 'updated', - 'beforeDestroy', - 'destroyed', - 'activated', - 'deactivated', - 'errorCaptured' -]; - -/* */ - -var config = ({ - /** - * Option merge strategies (used in core/util/options) - */ - // $flow-disable-line - optionMergeStrategies: Object.create(null), - - /** - * Whether to suppress warnings. - */ - silent: false, - - /** - * Show production mode tip message on boot? - */ - productionTip: process.env.NODE_ENV !== 'production', - - /** - * Whether to enable devtools - */ - devtools: process.env.NODE_ENV !== 'production', - - /** - * Whether to record perf - */ - performance: false, - - /** - * Error handler for watcher errors - */ - errorHandler: null, - - /** - * Warn handler for watcher warns - */ - warnHandler: null, - - /** - * Ignore certain custom elements - */ - ignoredElements: [], - - /** - * Custom user key aliases for v-on - */ - // $flow-disable-line - keyCodes: Object.create(null), - - /** - * Check if a tag is reserved so that it cannot be registered as a - * component. This is platform-dependent and may be overwritten. - */ - isReservedTag: no, - - /** - * Check if an attribute is reserved so that it cannot be used as a component - * prop. This is platform-dependent and may be overwritten. - */ - isReservedAttr: no, - - /** - * Check if a tag is an unknown element. - * Platform-dependent. - */ - isUnknownElement: no, - - /** - * Get the namespace of an element - */ - getTagNamespace: noop, - - /** - * Parse the real tag name for the specific platform. - */ - parsePlatformTagName: identity, - - /** - * Check if an attribute must be bound using property, e.g. value - * Platform-dependent. - */ - mustUseProp: no, - - /** - * Exposed for legacy reasons - */ - _lifecycleHooks: LIFECYCLE_HOOKS -}); - -/* */ - -/** - * Check if a string starts with $ or _ - */ -function isReserved (str) { - var c = (str + '').charCodeAt(0); - return c === 0x24 || c === 0x5F -} - -/** - * Define a property. - */ -function def (obj, key, val, enumerable) { - Object.defineProperty(obj, key, { - value: val, - enumerable: !!enumerable, - writable: true, - configurable: true - }); -} - -/** - * Parse simple path. - */ -var bailRE = /[^\w.$]/; -function parsePath (path) { - if (bailRE.test(path)) { - return - } - var segments = path.split('.'); - return function (obj) { - for (var i = 0; i < segments.length; i++) { - if (!obj) { return } - obj = obj[segments[i]]; - } - return obj - } -} - -/* */ - - -// can we use __proto__? -var hasProto = '__proto__' in {}; - -// Browser environment sniffing -var inBrowser = typeof window !== 'undefined'; -var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; -var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); -var UA = inBrowser && window.navigator.userAgent.toLowerCase(); -var isIE = UA && /msie|trident/.test(UA); -var isIE9 = UA && UA.indexOf('msie 9.0') > 0; -var isEdge = UA && UA.indexOf('edge/') > 0; -var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); -var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); -var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; - -// Firefox has a "watch" function on Object.prototype... -var nativeWatch = ({}).watch; - -var supportsPassive = false; -if (inBrowser) { - try { - var opts = {}; - Object.defineProperty(opts, 'passive', ({ - get: function get () { - /* istanbul ignore next */ - supportsPassive = true; - } - })); // https://github.com/facebook/flow/issues/285 - window.addEventListener('test-passive', null, opts); - } catch (e) {} -} - -// this needs to be lazy-evaled because vue may be required before -// vue-server-renderer can set VUE_ENV -var _isServer; -var isServerRendering = function () { - if (_isServer === undefined) { - /* istanbul ignore if */ - if (!inBrowser && typeof global !== 'undefined') { - // detect presence of vue-server-renderer and avoid - // Webpack shimming the process - _isServer = global['process'].env.VUE_ENV === 'server'; - } else { - _isServer = false; - } - } - return _isServer -}; - -// detect devtools -var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; - -/* istanbul ignore next */ -function isNative (Ctor) { - return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) -} - -var hasSymbol = - typeof Symbol !== 'undefined' && isNative(Symbol) && - typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); - -var _Set; -/* istanbul ignore if */ // $flow-disable-line -if (typeof Set !== 'undefined' && isNative(Set)) { - // use native Set when available. - _Set = Set; -} else { - // a non-standard Set polyfill that only works with primitive keys. - _Set = (function () { - function Set () { - this.set = Object.create(null); - } - Set.prototype.has = function has (key) { - return this.set[key] === true - }; - Set.prototype.add = function add (key) { - this.set[key] = true; - }; - Set.prototype.clear = function clear () { - this.set = Object.create(null); - }; - - return Set; - }()); -} - -/* */ - -var warn = noop; -var tip = noop; -var generateComponentTrace = (noop); // work around flow check -var formatComponentName = (noop); - -if (process.env.NODE_ENV !== 'production') { - var hasConsole = typeof console !== 'undefined'; - var classifyRE = /(?:^|[-_])(\w)/g; - var classify = function (str) { return str - .replace(classifyRE, function (c) { return c.toUpperCase(); }) - .replace(/[-_]/g, ''); }; - - warn = function (msg, vm) { - var trace = vm ? generateComponentTrace(vm) : ''; - - if (config.warnHandler) { - config.warnHandler.call(null, msg, vm, trace); - } else if (hasConsole && (!config.silent)) { - console.error(("[Vue warn]: " + msg + trace)); - } - }; - - tip = function (msg, vm) { - if (hasConsole && (!config.silent)) { - console.warn("[Vue tip]: " + msg + ( - vm ? generateComponentTrace(vm) : '' - )); - } - }; - - formatComponentName = function (vm, includeFile) { - if (vm.$root === vm) { - return '' - } - var options = typeof vm === 'function' && vm.cid != null - ? vm.options - : vm._isVue - ? vm.$options || vm.constructor.options - : vm || {}; - var name = options.name || options._componentTag; - var file = options.__file; - if (!name && file) { - var match = file.match(/([^/\\]+)\.vue$/); - name = match && match[1]; - } - - return ( - (name ? ("<" + (classify(name)) + ">") : "") + - (file && includeFile !== false ? (" at " + file) : '') - ) - }; - - var repeat = function (str, n) { - var res = ''; - while (n) { - if (n % 2 === 1) { res += str; } - if (n > 1) { str += str; } - n >>= 1; - } - return res - }; - - generateComponentTrace = function (vm) { - if (vm._isVue && vm.$parent) { - var tree = []; - var currentRecursiveSequence = 0; - while (vm) { - if (tree.length > 0) { - var last = tree[tree.length - 1]; - if (last.constructor === vm.constructor) { - currentRecursiveSequence++; - vm = vm.$parent; - continue - } else if (currentRecursiveSequence > 0) { - tree[tree.length - 1] = [last, currentRecursiveSequence]; - currentRecursiveSequence = 0; - } - } - tree.push(vm); - vm = vm.$parent; - } - return '\n\nfound in\n\n' + tree - .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) - ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") - : formatComponentName(vm))); }) - .join('\n') - } else { - return ("\n\n(found in " + (formatComponentName(vm)) + ")") - } - }; -} - -/* */ - - -var uid$1 = 0; - -/** - * A dep is an observable that can have multiple - * directives subscribing to it. - */ -var Dep = function Dep () { - this.id = uid$1++; - this.subs = []; -}; - -Dep.prototype.addSub = function addSub (sub) { - this.subs.push(sub); -}; - -Dep.prototype.removeSub = function removeSub (sub) { - remove(this.subs, sub); -}; - -Dep.prototype.depend = function depend () { - if (Dep.target) { - Dep.target.addDep(this); - } -}; - -Dep.prototype.notify = function notify () { - // stabilize the subscriber list first - var subs = this.subs.slice(); - for (var i = 0, l = subs.length; i < l; i++) { - subs[i].update(); - } -}; - -// the current target watcher being evaluated. -// this is globally unique because there could be only one -// watcher being evaluated at any time. -Dep.target = null; -var targetStack = []; - -function pushTarget (_target) { - if (Dep.target) { targetStack.push(Dep.target); } - Dep.target = _target; -} - -function popTarget () { - Dep.target = targetStack.pop(); -} - -/* */ - -var VNode = function VNode ( - tag, - data, - children, - text, - elm, - context, - componentOptions, - asyncFactory -) { - this.tag = tag; - this.data = data; - this.children = children; - this.text = text; - this.elm = elm; - this.ns = undefined; - this.context = context; - this.fnContext = undefined; - this.fnOptions = undefined; - this.fnScopeId = undefined; - this.key = data && data.key; - this.componentOptions = componentOptions; - this.componentInstance = undefined; - this.parent = undefined; - this.raw = false; - this.isStatic = false; - this.isRootInsert = true; - this.isComment = false; - this.isCloned = false; - this.isOnce = false; - this.asyncFactory = asyncFactory; - this.asyncMeta = undefined; - this.isAsyncPlaceholder = false; -}; - -var prototypeAccessors = { child: { configurable: true } }; - -// DEPRECATED: alias for componentInstance for backwards compat. -/* istanbul ignore next */ -prototypeAccessors.child.get = function () { - return this.componentInstance -}; - -Object.defineProperties( VNode.prototype, prototypeAccessors ); - -var createEmptyVNode = function (text) { - if ( text === void 0 ) text = ''; - - var node = new VNode(); - node.text = text; - node.isComment = true; - return node -}; - -function createTextVNode (val) { - return new VNode(undefined, undefined, undefined, String(val)) -} - -// optimized shallow clone -// used for static nodes and slot nodes because they may be reused across -// multiple renders, cloning them avoids errors when DOM manipulations rely -// on their elm reference. -function cloneVNode (vnode, deep) { - var componentOptions = vnode.componentOptions; - var cloned = new VNode( - vnode.tag, - vnode.data, - vnode.children, - vnode.text, - vnode.elm, - vnode.context, - componentOptions, - vnode.asyncFactory - ); - cloned.ns = vnode.ns; - cloned.isStatic = vnode.isStatic; - cloned.key = vnode.key; - cloned.isComment = vnode.isComment; - cloned.fnContext = vnode.fnContext; - cloned.fnOptions = vnode.fnOptions; - cloned.fnScopeId = vnode.fnScopeId; - cloned.isCloned = true; - if (deep) { - if (vnode.children) { - cloned.children = cloneVNodes(vnode.children, true); - } - if (componentOptions && componentOptions.children) { - componentOptions.children = cloneVNodes(componentOptions.children, true); - } - } - return cloned -} - -function cloneVNodes (vnodes, deep) { - var len = vnodes.length; - var res = new Array(len); - for (var i = 0; i < len; i++) { - res[i] = cloneVNode(vnodes[i], deep); - } - return res -} - -/* - * not type checking this file because flow doesn't play well with - * dynamically accessing methods on Array prototype - */ - -var arrayProto = Array.prototype; -var arrayMethods = Object.create(arrayProto);[ - 'push', - 'pop', - 'shift', - 'unshift', - 'splice', - 'sort', - 'reverse' -].forEach(function (method) { - // cache original method - var original = arrayProto[method]; - def(arrayMethods, method, function mutator () { - var args = [], len = arguments.length; - while ( len-- ) args[ len ] = arguments[ len ]; - - var result = original.apply(this, args); - var ob = this.__ob__; - var inserted; - switch (method) { - case 'push': - case 'unshift': - inserted = args; - break - case 'splice': - inserted = args.slice(2); - break - } - if (inserted) { ob.observeArray(inserted); } - // notify change - ob.dep.notify(); - return result - }); -}); - -/* */ - -var arrayKeys = Object.getOwnPropertyNames(arrayMethods); - -/** - * By default, when a reactive property is set, the new value is - * also converted to become reactive. However when passing down props, - * we don't want to force conversion because the value may be a nested value - * under a frozen data structure. Converting it would defeat the optimization. - */ -var observerState = { - shouldConvert: true -}; - -/** - * Observer class that are attached to each observed - * object. Once attached, the observer converts target - * object's property keys into getter/setters that - * collect dependencies and dispatches updates. - */ -var Observer = function Observer (value) { - this.value = value; - this.dep = new Dep(); - this.vmCount = 0; - def(value, '__ob__', this); - if (Array.isArray(value)) { - var augment = hasProto - ? protoAugment - : copyAugment; - augment(value, arrayMethods, arrayKeys); - this.observeArray(value); - } else { - this.walk(value); - } -}; - -/** - * Walk through each property and convert them into - * getter/setters. This method should only be called when - * value type is Object. - */ -Observer.prototype.walk = function walk (obj) { - var keys = Object.keys(obj); - for (var i = 0; i < keys.length; i++) { - defineReactive(obj, keys[i], obj[keys[i]]); - } -}; - -/** - * Observe a list of Array items. - */ -Observer.prototype.observeArray = function observeArray (items) { - for (var i = 0, l = items.length; i < l; i++) { - observe(items[i]); - } -}; - -// helpers - -/** - * Augment an target Object or Array by intercepting - * the prototype chain using __proto__ - */ -function protoAugment (target, src, keys) { - /* eslint-disable no-proto */ - target.__proto__ = src; - /* eslint-enable no-proto */ -} - -/** - * Augment an target Object or Array by defining - * hidden properties. - */ -/* istanbul ignore next */ -function copyAugment (target, src, keys) { - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - def(target, key, src[key]); - } -} - -/** - * Attempt to create an observer instance for a value, - * returns the new observer if successfully observed, - * or the existing observer if the value already has one. - */ -function observe (value, asRootData) { - if (!isObject(value) || value instanceof VNode) { - return - } - var ob; - if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { - ob = value.__ob__; - } else if ( - observerState.shouldConvert && - !isServerRendering() && - (Array.isArray(value) || isPlainObject(value)) && - Object.isExtensible(value) && - !value._isVue - ) { - ob = new Observer(value); - } - if (asRootData && ob) { - ob.vmCount++; - } - return ob -} - -/** - * Define a reactive property on an Object. - */ -function defineReactive ( - obj, - key, - val, - customSetter, - shallow -) { - var dep = new Dep(); - - var property = Object.getOwnPropertyDescriptor(obj, key); - if (property && property.configurable === false) { - return - } - - // cater for pre-defined getter/setters - var getter = property && property.get; - var setter = property && property.set; - - var childOb = !shallow && observe(val); - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - get: function reactiveGetter () { - var value = getter ? getter.call(obj) : val; - if (Dep.target) { - dep.depend(); - if (childOb) { - childOb.dep.depend(); - if (Array.isArray(value)) { - dependArray(value); - } - } - } - return value - }, - set: function reactiveSetter (newVal) { - var value = getter ? getter.call(obj) : val; - /* eslint-disable no-self-compare */ - if (newVal === value || (newVal !== newVal && value !== value)) { - return - } - /* eslint-enable no-self-compare */ - if (process.env.NODE_ENV !== 'production' && customSetter) { - customSetter(); - } - if (setter) { - setter.call(obj, newVal); - } else { - val = newVal; - } - childOb = !shallow && observe(newVal); - dep.notify(); - } - }); -} - -/** - * Set a property on an object. Adds the new property and - * triggers change notification if the property doesn't - * already exist. - */ -function set (target, key, val) { - if (Array.isArray(target) && isValidArrayIndex(key)) { - target.length = Math.max(target.length, key); - target.splice(key, 1, val); - return val - } - if (key in target && !(key in Object.prototype)) { - target[key] = val; - return val - } - var ob = (target).__ob__; - if (target._isVue || (ob && ob.vmCount)) { - process.env.NODE_ENV !== 'production' && warn( - 'Avoid adding reactive properties to a Vue instance or its root $data ' + - 'at runtime - declare it upfront in the data option.' - ); - return val - } - if (!ob) { - target[key] = val; - return val - } - defineReactive(ob.value, key, val); - ob.dep.notify(); - return val -} - -/** - * Delete a property and trigger change if necessary. - */ -function del (target, key) { - if (Array.isArray(target) && isValidArrayIndex(key)) { - target.splice(key, 1); - return - } - var ob = (target).__ob__; - if (target._isVue || (ob && ob.vmCount)) { - process.env.NODE_ENV !== 'production' && warn( - 'Avoid deleting properties on a Vue instance or its root $data ' + - '- just set it to null.' - ); - return - } - if (!hasOwn(target, key)) { - return - } - delete target[key]; - if (!ob) { - return - } - ob.dep.notify(); -} - -/** - * Collect dependencies on array elements when the array is touched, since - * we cannot intercept array element access like property getters. - */ -function dependArray (value) { - for (var e = (void 0), i = 0, l = value.length; i < l; i++) { - e = value[i]; - e && e.__ob__ && e.__ob__.dep.depend(); - if (Array.isArray(e)) { - dependArray(e); - } - } -} - -/* */ - -/** - * Option overwriting strategies are functions that handle - * how to merge a parent option value and a child option - * value into the final value. - */ -var strats = config.optionMergeStrategies; - -/** - * Options with restrictions - */ -if (process.env.NODE_ENV !== 'production') { - strats.el = strats.propsData = function (parent, child, vm, key) { - if (!vm) { - warn( - "option \"" + key + "\" can only be used during instance " + - 'creation with the `new` keyword.' - ); - } - return defaultStrat(parent, child) - }; -} - -/** - * Helper that recursively merges two data objects together. - */ -function mergeData (to, from) { - if (!from) { return to } - var key, toVal, fromVal; - var keys = Object.keys(from); - for (var i = 0; i < keys.length; i++) { - key = keys[i]; - toVal = to[key]; - fromVal = from[key]; - if (!hasOwn(to, key)) { - set(to, key, fromVal); - } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { - mergeData(toVal, fromVal); - } - } - return to -} - -/** - * Data - */ -function mergeDataOrFn ( - parentVal, - childVal, - vm -) { - if (!vm) { - // in a Vue.extend merge, both should be functions - if (!childVal) { - return parentVal - } - if (!parentVal) { - return childVal - } - // when parentVal & childVal are both present, - // we need to return a function that returns the - // merged result of both functions... no need to - // check if parentVal is a function here because - // it has to be a function to pass previous merges. - return function mergedDataFn () { - return mergeData( - typeof childVal === 'function' ? childVal.call(this, this) : childVal, - typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal - ) - } - } else { - return function mergedInstanceDataFn () { - // instance merge - var instanceData = typeof childVal === 'function' - ? childVal.call(vm, vm) - : childVal; - var defaultData = typeof parentVal === 'function' - ? parentVal.call(vm, vm) - : parentVal; - if (instanceData) { - return mergeData(instanceData, defaultData) - } else { - return defaultData - } - } - } -} - -strats.data = function ( - parentVal, - childVal, - vm -) { - if (!vm) { - if (childVal && typeof childVal !== 'function') { - process.env.NODE_ENV !== 'production' && warn( - 'The "data" option should be a function ' + - 'that returns a per-instance value in component ' + - 'definitions.', - vm - ); - - return parentVal - } - return mergeDataOrFn(parentVal, childVal) - } - - return mergeDataOrFn(parentVal, childVal, vm) -}; - -/** - * Hooks and props are merged as arrays. - */ -function mergeHook ( - parentVal, - childVal -) { - return childVal - ? parentVal - ? parentVal.concat(childVal) - : Array.isArray(childVal) - ? childVal - : [childVal] - : parentVal -} - -LIFECYCLE_HOOKS.forEach(function (hook) { - strats[hook] = mergeHook; -}); - -/** - * Assets - * - * When a vm is present (instance creation), we need to do - * a three-way merge between constructor options, instance - * options and parent options. - */ -function mergeAssets ( - parentVal, - childVal, - vm, - key -) { - var res = Object.create(parentVal || null); - if (childVal) { - process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm); - return extend(res, childVal) - } else { - return res - } -} - -ASSET_TYPES.forEach(function (type) { - strats[type + 's'] = mergeAssets; -}); - -/** - * Watchers. - * - * Watchers hashes should not overwrite one - * another, so we merge them as arrays. - */ -strats.watch = function ( - parentVal, - childVal, - vm, - key -) { - // work around Firefox's Object.prototype.watch... - if (parentVal === nativeWatch) { parentVal = undefined; } - if (childVal === nativeWatch) { childVal = undefined; } - /* istanbul ignore if */ - if (!childVal) { return Object.create(parentVal || null) } - if (process.env.NODE_ENV !== 'production') { - assertObjectType(key, childVal, vm); - } - if (!parentVal) { return childVal } - var ret = {}; - extend(ret, parentVal); - for (var key$1 in childVal) { - var parent = ret[key$1]; - var child = childVal[key$1]; - if (parent && !Array.isArray(parent)) { - parent = [parent]; - } - ret[key$1] = parent - ? parent.concat(child) - : Array.isArray(child) ? child : [child]; - } - return ret -}; - -/** - * Other object hashes. - */ -strats.props = -strats.methods = -strats.inject = -strats.computed = function ( - parentVal, - childVal, - vm, - key -) { - if (childVal && process.env.NODE_ENV !== 'production') { - assertObjectType(key, childVal, vm); - } - if (!parentVal) { return childVal } - var ret = Object.create(null); - extend(ret, parentVal); - if (childVal) { extend(ret, childVal); } - return ret -}; -strats.provide = mergeDataOrFn; - -/** - * Default strategy. - */ -var defaultStrat = function (parentVal, childVal) { - return childVal === undefined - ? parentVal - : childVal -}; - -/** - * Validate component names - */ -function checkComponents (options) { - for (var key in options.components) { - validateComponentName(key); - } -} - -function validateComponentName (name) { - if (!/^[a-zA-Z][\w-]*$/.test(name)) { - warn( - 'Invalid component name: "' + name + '". Component names ' + - 'can only contain alphanumeric characters and the hyphen, ' + - 'and must start with a letter.' - ); - } - if (isBuiltInTag(name) || config.isReservedTag(name)) { - warn( - 'Do not use built-in or reserved HTML elements as component ' + - 'id: ' + name - ); - } -} - -/** - * Ensure all props option syntax are normalized into the - * Object-based format. - */ -function normalizeProps (options, vm) { - var props = options.props; - if (!props) { return } - var res = {}; - var i, val, name; - if (Array.isArray(props)) { - i = props.length; - while (i--) { - val = props[i]; - if (typeof val === 'string') { - name = camelize(val); - res[name] = { type: null }; - } else if (process.env.NODE_ENV !== 'production') { - warn('props must be strings when using array syntax.'); - } - } - } else if (isPlainObject(props)) { - for (var key in props) { - val = props[key]; - name = camelize(key); - res[name] = isPlainObject(val) - ? val - : { type: val }; - } - } else if (process.env.NODE_ENV !== 'production') { - warn( - "Invalid value for option \"props\": expected an Array or an Object, " + - "but got " + (toRawType(props)) + ".", - vm - ); - } - options.props = res; -} - -/** - * Normalize all injections into Object-based format - */ -function normalizeInject (options, vm) { - var inject = options.inject; - if (!inject) { return } - var normalized = options.inject = {}; - if (Array.isArray(inject)) { - for (var i = 0; i < inject.length; i++) { - normalized[inject[i]] = { from: inject[i] }; - } - } else if (isPlainObject(inject)) { - for (var key in inject) { - var val = inject[key]; - normalized[key] = isPlainObject(val) - ? extend({ from: key }, val) - : { from: val }; - } - } else if (process.env.NODE_ENV !== 'production') { - warn( - "Invalid value for option \"inject\": expected an Array or an Object, " + - "but got " + (toRawType(inject)) + ".", - vm - ); - } -} - -/** - * Normalize raw function directives into object format. - */ -function normalizeDirectives (options) { - var dirs = options.directives; - if (dirs) { - for (var key in dirs) { - var def = dirs[key]; - if (typeof def === 'function') { - dirs[key] = { bind: def, update: def }; - } - } - } -} - -function assertObjectType (name, value, vm) { - if (!isPlainObject(value)) { - warn( - "Invalid value for option \"" + name + "\": expected an Object, " + - "but got " + (toRawType(value)) + ".", - vm - ); - } -} - -/** - * Merge two option objects into a new one. - * Core utility used in both instantiation and inheritance. - */ -function mergeOptions ( - parent, - child, - vm -) { - if (process.env.NODE_ENV !== 'production') { - checkComponents(child); - } - - if (typeof child === 'function') { - child = child.options; - } - - normalizeProps(child, vm); - normalizeInject(child, vm); - normalizeDirectives(child); - var extendsFrom = child.extends; - if (extendsFrom) { - parent = mergeOptions(parent, extendsFrom, vm); - } - if (child.mixins) { - for (var i = 0, l = child.mixins.length; i < l; i++) { - parent = mergeOptions(parent, child.mixins[i], vm); - } - } - var options = {}; - var key; - for (key in parent) { - mergeField(key); - } - for (key in child) { - if (!hasOwn(parent, key)) { - mergeField(key); - } - } - function mergeField (key) { - var strat = strats[key] || defaultStrat; - options[key] = strat(parent[key], child[key], vm, key); - } - return options -} - -/** - * Resolve an asset. - * This function is used because child instances need access - * to assets defined in its ancestor chain. - */ -function resolveAsset ( - options, - type, - id, - warnMissing -) { - /* istanbul ignore if */ - if (typeof id !== 'string') { - return - } - var assets = options[type]; - // check local registration variations first - if (hasOwn(assets, id)) { return assets[id] } - var camelizedId = camelize(id); - if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } - var PascalCaseId = capitalize(camelizedId); - if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } - // fallback to prototype chain - var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; - if (process.env.NODE_ENV !== 'production' && warnMissing && !res) { - warn( - 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, - options - ); - } - return res -} - -/* */ - -function validateProp ( - key, - propOptions, - propsData, - vm -) { - var prop = propOptions[key]; - var absent = !hasOwn(propsData, key); - var value = propsData[key]; - // handle boolean props - if (isType(Boolean, prop.type)) { - if (absent && !hasOwn(prop, 'default')) { - value = false; - } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) { - value = true; - } - } - // check default value - if (value === undefined) { - value = getPropDefaultValue(vm, prop, key); - // since the default value is a fresh copy, - // make sure to observe it. - var prevShouldConvert = observerState.shouldConvert; - observerState.shouldConvert = true; - observe(value); - observerState.shouldConvert = prevShouldConvert; - } - if ( - process.env.NODE_ENV !== 'production' && - // skip validation for weex recycle-list child component props - !(false && isObject(value) && ('@binding' in value)) - ) { - assertProp(prop, key, value, vm, absent); - } - return value -} - -/** - * Get the default value of a prop. - */ -function getPropDefaultValue (vm, prop, key) { - // no default, return undefined - if (!hasOwn(prop, 'default')) { - return undefined - } - var def = prop.default; - // warn against non-factory defaults for Object & Array - if (process.env.NODE_ENV !== 'production' && isObject(def)) { - warn( - 'Invalid default value for prop "' + key + '": ' + - 'Props with type Object/Array must use a factory function ' + - 'to return the default value.', - vm - ); - } - // the raw prop value was also undefined from previous render, - // return previous default value to avoid unnecessary watcher trigger - if (vm && vm.$options.propsData && - vm.$options.propsData[key] === undefined && - vm._props[key] !== undefined - ) { - return vm._props[key] - } - // call factory function for non-Function types - // a value is Function if its prototype is function even across different execution context - return typeof def === 'function' && getType(prop.type) !== 'Function' - ? def.call(vm) - : def -} - -/** - * Assert whether a prop is valid. - */ -function assertProp ( - prop, - name, - value, - vm, - absent -) { - if (prop.required && absent) { - warn( - 'Missing required prop: "' + name + '"', - vm - ); - return - } - if (value == null && !prop.required) { - return - } - var type = prop.type; - var valid = !type || type === true; - var expectedTypes = []; - if (type) { - if (!Array.isArray(type)) { - type = [type]; - } - for (var i = 0; i < type.length && !valid; i++) { - var assertedType = assertType(value, type[i]); - expectedTypes.push(assertedType.expectedType || ''); - valid = assertedType.valid; - } - } - if (!valid) { - warn( - "Invalid prop: type check failed for prop \"" + name + "\"." + - " Expected " + (expectedTypes.map(capitalize).join(', ')) + - ", got " + (toRawType(value)) + ".", - vm - ); - return - } - var validator = prop.validator; - if (validator) { - if (!validator(value)) { - warn( - 'Invalid prop: custom validator check failed for prop "' + name + '".', - vm - ); - } - } -} - -var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; - -function assertType (value, type) { - var valid; - var expectedType = getType(type); - if (simpleCheckRE.test(expectedType)) { - var t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } - } else if (expectedType === 'Object') { - valid = isPlainObject(value); - } else if (expectedType === 'Array') { - valid = Array.isArray(value); - } else { - valid = value instanceof type; - } - return { - valid: valid, - expectedType: expectedType - } -} - -/** - * Use function string name to check built-in types, - * because a simple equality check will fail when running - * across different vms / iframes. - */ -function getType (fn) { - var match = fn && fn.toString().match(/^\s*function (\w+)/); - return match ? match[1] : '' -} - -function isType (type, fn) { - if (!Array.isArray(fn)) { - return getType(fn) === getType(type) - } - for (var i = 0, len = fn.length; i < len; i++) { - if (getType(fn[i]) === getType(type)) { - return true - } - } - /* istanbul ignore next */ - return false -} - -/* */ - -function handleError (err, vm, info) { - if (vm) { - var cur = vm; - while ((cur = cur.$parent)) { - var hooks = cur.$options.errorCaptured; - if (hooks) { - for (var i = 0; i < hooks.length; i++) { - try { - var capture = hooks[i].call(cur, err, vm, info) === false; - if (capture) { return } - } catch (e) { - globalHandleError(e, cur, 'errorCaptured hook'); - } - } - } - } - } - globalHandleError(err, vm, info); -} - -function globalHandleError (err, vm, info) { - if (config.errorHandler) { - try { - return config.errorHandler.call(null, err, vm, info) - } catch (e) { - logError(e, null, 'config.errorHandler'); - } - } - logError(err, vm, info); -} - -function logError (err, vm, info) { - if (process.env.NODE_ENV !== 'production') { - warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); - } - /* istanbul ignore else */ - if ((inBrowser || inWeex) && typeof console !== 'undefined') { - console.error(err); - } else { - throw err - } -} - -/* */ -/* globals MessageChannel */ - -var callbacks = []; -var pending = false; - -function flushCallbacks () { - pending = false; - var copies = callbacks.slice(0); - callbacks.length = 0; - for (var i = 0; i < copies.length; i++) { - copies[i](); - } -} - -// Here we have async deferring wrappers using both micro and macro tasks. -// In < 2.4 we used micro tasks everywhere, but there are some scenarios where -// micro tasks have too high a priority and fires in between supposedly -// sequential events (e.g. #4521, #6690) or even between bubbling of the same -// event (#6566). However, using macro tasks everywhere also has subtle problems -// when state is changed right before repaint (e.g. #6813, out-in transitions). -// Here we use micro task by default, but expose a way to force macro task when -// needed (e.g. in event handlers attached by v-on). -var microTimerFunc; -var macroTimerFunc; -var useMacroTask = false; - -// Determine (macro) Task defer implementation. -// Technically setImmediate should be the ideal choice, but it's only available -// in IE. The only polyfill that consistently queues the callback after all DOM -// events triggered in the same loop is by using MessageChannel. -/* istanbul ignore if */ -if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { - macroTimerFunc = function () { - setImmediate(flushCallbacks); - }; -} else if (typeof MessageChannel !== 'undefined' && ( - isNative(MessageChannel) || - // PhantomJS - MessageChannel.toString() === '[object MessageChannelConstructor]' -)) { - var channel = new MessageChannel(); - var port = channel.port2; - channel.port1.onmessage = flushCallbacks; - macroTimerFunc = function () { - port.postMessage(1); - }; -} else { - /* istanbul ignore next */ - macroTimerFunc = function () { - setTimeout(flushCallbacks, 0); - }; -} - -// Determine MicroTask defer implementation. -/* istanbul ignore next, $flow-disable-line */ -if (typeof Promise !== 'undefined' && isNative(Promise)) { - var p = Promise.resolve(); - microTimerFunc = function () { - p.then(flushCallbacks); - // in problematic UIWebViews, Promise.then doesn't completely break, but - // it can get stuck in a weird state where callbacks are pushed into the - // microtask queue but the queue isn't being flushed, until the browser - // needs to do some other work, e.g. handle a timer. Therefore we can - // "force" the microtask queue to be flushed by adding an empty timer. - if (isIOS) { setTimeout(noop); } - }; -} else { - // fallback to macro - microTimerFunc = macroTimerFunc; -} - -/** - * Wrap a function so that if any code inside triggers state change, - * the changes are queued using a Task instead of a MicroTask. - */ -function withMacroTask (fn) { - return fn._withTask || (fn._withTask = function () { - useMacroTask = true; - var res = fn.apply(null, arguments); - useMacroTask = false; - return res - }) -} - -function nextTick (cb, ctx) { - var _resolve; - callbacks.push(function () { - if (cb) { - try { - cb.call(ctx); - } catch (e) { - handleError(e, ctx, 'nextTick'); - } - } else if (_resolve) { - _resolve(ctx); - } - }); - if (!pending) { - pending = true; - if (useMacroTask) { - macroTimerFunc(); - } else { - microTimerFunc(); - } - } - // $flow-disable-line - if (!cb && typeof Promise !== 'undefined') { - return new Promise(function (resolve) { - _resolve = resolve; - }) - } -} - -/* */ - -/* not type checking this file because flow doesn't play well with Proxy */ - -var initProxy; - -if (process.env.NODE_ENV !== 'production') { - var allowedGlobals = makeMap( - 'Infinity,undefined,NaN,isFinite,isNaN,' + - 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + - 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + - 'require' // for Webpack/Browserify - ); - - var warnNonPresent = function (target, key) { - warn( - "Property or method \"" + key + "\" is not defined on the instance but " + - 'referenced during render. Make sure that this property is reactive, ' + - 'either in the data option, or for class-based components, by ' + - 'initializing the property. ' + - 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', - target - ); - }; - - var hasProxy = - typeof Proxy !== 'undefined' && - Proxy.toString().match(/native code/); - - if (hasProxy) { - var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); - config.keyCodes = new Proxy(config.keyCodes, { - set: function set (target, key, value) { - if (isBuiltInModifier(key)) { - warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); - return false - } else { - target[key] = value; - return true - } - } - }); - } - - var hasHandler = { - has: function has (target, key) { - var has = key in target; - var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; - if (!has && !isAllowed) { - warnNonPresent(target, key); - } - return has || !isAllowed - } - }; - - var getHandler = { - get: function get (target, key) { - if (typeof key === 'string' && !(key in target)) { - warnNonPresent(target, key); - } - return target[key] - } - }; - - initProxy = function initProxy (vm) { - if (hasProxy) { - // determine which proxy handler to use - var options = vm.$options; - var handlers = options.render && options.render._withStripped - ? getHandler - : hasHandler; - vm._renderProxy = new Proxy(vm, handlers); - } else { - vm._renderProxy = vm; - } - }; -} - -/* */ - -var seenObjects = new _Set(); - -/** - * Recursively traverse an object to evoke all converted - * getters, so that every nested property inside the object - * is collected as a "deep" dependency. - */ -function traverse (val) { - _traverse(val, seenObjects); - seenObjects.clear(); -} - -function _traverse (val, seen) { - var i, keys; - var isA = Array.isArray(val); - if ((!isA && !isObject(val)) || Object.isFrozen(val)) { - return - } - if (val.__ob__) { - var depId = val.__ob__.dep.id; - if (seen.has(depId)) { - return - } - seen.add(depId); - } - if (isA) { - i = val.length; - while (i--) { _traverse(val[i], seen); } - } else { - keys = Object.keys(val); - i = keys.length; - while (i--) { _traverse(val[keys[i]], seen); } - } -} - -var mark; -var measure; - -if (process.env.NODE_ENV !== 'production') { - var perf = inBrowser && window.performance; - /* istanbul ignore if */ - if ( - perf && - perf.mark && - perf.measure && - perf.clearMarks && - perf.clearMeasures - ) { - mark = function (tag) { return perf.mark(tag); }; - measure = function (name, startTag, endTag) { - perf.measure(name, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - perf.clearMeasures(name); - }; - } -} - -/* */ - -var normalizeEvent = cached(function (name) { - var passive = name.charAt(0) === '&'; - name = passive ? name.slice(1) : name; - var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first - name = once$$1 ? name.slice(1) : name; - var capture = name.charAt(0) === '!'; - name = capture ? name.slice(1) : name; - return { - name: name, - once: once$$1, - capture: capture, - passive: passive - } -}); - -function createFnInvoker (fns) { - function invoker () { - var arguments$1 = arguments; - - var fns = invoker.fns; - if (Array.isArray(fns)) { - var cloned = fns.slice(); - for (var i = 0; i < cloned.length; i++) { - cloned[i].apply(null, arguments$1); - } - } else { - // return handler return value for single handlers - return fns.apply(null, arguments) - } - } - invoker.fns = fns; - return invoker -} - -function updateListeners ( - on, - oldOn, - add, - remove$$1, - vm -) { - var name, def, cur, old, event; - for (name in on) { - def = cur = on[name]; - old = oldOn[name]; - event = normalizeEvent(name); - /* istanbul ignore if */ - if (isUndef(cur)) { - process.env.NODE_ENV !== 'production' && warn( - "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), - vm - ); - } else if (isUndef(old)) { - if (isUndef(cur.fns)) { - cur = on[name] = createFnInvoker(cur); - } - add(event.name, cur, event.once, event.capture, event.passive, event.params); - } else if (cur !== old) { - old.fns = cur; - on[name] = old; - } - } - for (name in oldOn) { - if (isUndef(on[name])) { - event = normalizeEvent(name); - remove$$1(event.name, oldOn[name], event.capture); - } - } -} - -/* */ - -function mergeVNodeHook (def, hookKey, hook) { - if (def instanceof VNode) { - def = def.data.hook || (def.data.hook = {}); - } - var invoker; - var oldHook = def[hookKey]; - - function wrappedHook () { - hook.apply(this, arguments); - // important: remove merged hook to ensure it's called only once - // and prevent memory leak - remove(invoker.fns, wrappedHook); - } - - if (isUndef(oldHook)) { - // no existing hook - invoker = createFnInvoker([wrappedHook]); - } else { - /* istanbul ignore if */ - if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { - // already a merged invoker - invoker = oldHook; - invoker.fns.push(wrappedHook); - } else { - // existing plain hook - invoker = createFnInvoker([oldHook, wrappedHook]); - } - } - - invoker.merged = true; - def[hookKey] = invoker; -} - -/* */ - -function extractPropsFromVNodeData ( - data, - Ctor, - tag -) { - // we are only extracting raw values here. - // validation and default values are handled in the child - // component itself. - var propOptions = Ctor.options.props; - if (isUndef(propOptions)) { - return - } - var res = {}; - var attrs = data.attrs; - var props = data.props; - if (isDef(attrs) || isDef(props)) { - for (var key in propOptions) { - var altKey = hyphenate(key); - if (process.env.NODE_ENV !== 'production') { - var keyInLowerCase = key.toLowerCase(); - if ( - key !== keyInLowerCase && - attrs && hasOwn(attrs, keyInLowerCase) - ) { - tip( - "Prop \"" + keyInLowerCase + "\" is passed to component " + - (formatComponentName(tag || Ctor)) + ", but the declared prop name is" + - " \"" + key + "\". " + - "Note that HTML attributes are case-insensitive and camelCased " + - "props need to use their kebab-case equivalents when using in-DOM " + - "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." - ); - } - } - checkProp(res, props, key, altKey, true) || - checkProp(res, attrs, key, altKey, false); - } - } - return res -} - -function checkProp ( - res, - hash, - key, - altKey, - preserve -) { - if (isDef(hash)) { - if (hasOwn(hash, key)) { - res[key] = hash[key]; - if (!preserve) { - delete hash[key]; - } - return true - } else if (hasOwn(hash, altKey)) { - res[key] = hash[altKey]; - if (!preserve) { - delete hash[altKey]; - } - return true - } - } - return false -} - -/* */ - -// The template compiler attempts to minimize the need for normalization by -// statically analyzing the template at compile time. -// -// For plain HTML markup, normalization can be completely skipped because the -// generated render function is guaranteed to return Array. There are -// two cases where extra normalization is needed: - -// 1. When the children contains components - because a functional component -// may return an Array instead of a single root. In this case, just a simple -// normalization is needed - if any child is an Array, we flatten the whole -// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep -// because functional components already normalize their own children. -function simpleNormalizeChildren (children) { - for (var i = 0; i < children.length; i++) { - if (Array.isArray(children[i])) { - return Array.prototype.concat.apply([], children) - } - } - return children -} - -// 2. When the children contains constructs that always generated nested Arrays, -// e.g.