From dec2fa225669ee73aa182d019aea6b1e17ebdba0 Mon Sep 17 00:00:00 2001 From: Robin Raju Date: Thu, 23 Nov 2023 09:52:37 +0000 Subject: [PATCH] Update dependencies --- .eslintrc.json | 4 +- deps.txt | 1273 ++ dist/index.js | 42932 ++++++++++++++++++++++++++++++++++---------- dist/licenses.txt | 211 +- package-lock.json | 3378 ++-- package.json | 18 +- 6 files changed, 36784 insertions(+), 11032 deletions(-) create mode 100644 deps.txt diff --git a/.eslintrc.json b/.eslintrc.json index 58de0fc3..ed972dfc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { - "plugins": ["jest", "@typescript-eslint", "github"], - "extends": ["plugin:github/recommended"], + "plugins": ["jest", "@typescript-eslint", "github", "prettier"], + "extends": ["plugin:github/recommended", "plugin:prettier/recommended"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 9, diff --git a/deps.txt b/deps.txt new file mode 100644 index 00000000..e5aa86d8 --- /dev/null +++ b/deps.txt @@ -0,0 +1,1273 @@ +release-downloader@1.0.0 /Users/robinraju/workspace/oss/release-downloader +├─┬ @actions/core@1.10.1 +│ ├─┬ @actions/http-client@2.2.0 +│ │ ├── tunnel@0.0.6 deduped +│ │ └─┬ undici@5.27.2 +│ │ └── @fastify/busboy@2.1.0 +│ └── uuid@8.3.2 +├── @actions/io@1.1.3 +├─┬ @types/jest@29.5.10 +│ ├─┬ expect@29.7.0 +│ │ ├─┬ @jest/expect-utils@29.7.0 +│ │ │ └── jest-get-type@29.6.3 deduped +│ │ ├── jest-get-type@29.6.3 +│ │ ├── jest-matcher-utils@29.7.0 deduped +│ │ ├── jest-message-util@29.7.0 deduped +│ │ └── jest-util@29.7.0 deduped +│ └─┬ pretty-format@29.7.0 +│ ├─┬ @jest/schemas@29.6.3 +│ │ └── @sinclair/typebox@0.27.8 +│ ├── ansi-styles@5.2.0 +│ └── react-is@18.2.0 +├─┬ @types/node@20.9.4 +│ └── undici-types@5.26.5 +├─┬ @types/tar@6.1.10 +│ ├── @types/node@20.9.4 deduped +│ └── minipass@4.2.8 +├─┬ @types/unzipper@0.10.9 +│ └── @types/node@20.9.4 deduped +├─┬ @typescript-eslint/eslint-plugin@6.12.0 +│ ├── @eslint-community/regexpp@4.10.0 +│ ├── @typescript-eslint/parser@6.12.0 deduped +│ ├─┬ @typescript-eslint/scope-manager@6.12.0 +│ │ ├── @typescript-eslint/types@6.12.0 deduped +│ │ └── @typescript-eslint/visitor-keys@6.12.0 deduped +│ ├─┬ @typescript-eslint/type-utils@6.12.0 +│ │ ├── @typescript-eslint/typescript-estree@6.12.0 deduped +│ │ ├── @typescript-eslint/utils@6.12.0 deduped +│ │ ├── debug@4.3.4 deduped +│ │ ├── eslint@8.54.0 deduped +│ │ └── ts-api-utils@1.0.3 deduped +│ ├─┬ @typescript-eslint/utils@6.12.0 +│ │ ├── @eslint-community/eslint-utils@4.4.0 deduped +│ │ ├── @types/json-schema@7.0.15 +│ │ ├── @types/semver@7.5.6 +│ │ ├── @typescript-eslint/scope-manager@6.12.0 deduped +│ │ ├── @typescript-eslint/types@6.12.0 deduped +│ │ ├── @typescript-eslint/typescript-estree@6.12.0 deduped +│ │ ├── eslint@8.54.0 deduped +│ │ └── semver@7.5.4 deduped +│ ├─┬ @typescript-eslint/visitor-keys@6.12.0 +│ │ ├── @typescript-eslint/types@6.12.0 deduped +│ │ └── eslint-visitor-keys@3.4.3 deduped +│ ├─┬ debug@4.3.4 +│ │ └── ms@2.1.2 +│ ├── eslint@8.54.0 deduped +│ ├── graphemer@1.4.0 +│ ├── ignore@5.3.0 +│ ├── natural-compare@1.4.0 +│ ├─┬ semver@7.5.4 +│ │ └─┬ lru-cache@6.0.0 +│ │ └── yallist@4.0.0 +│ └─┬ ts-api-utils@1.0.3 +│ └── typescript@5.3.2 deduped +├─┬ @typescript-eslint/parser@6.12.0 +│ ├── @typescript-eslint/scope-manager@6.12.0 deduped +│ ├── @typescript-eslint/types@6.12.0 +│ ├─┬ @typescript-eslint/typescript-estree@6.12.0 +│ │ ├── @typescript-eslint/types@6.12.0 deduped +│ │ ├── @typescript-eslint/visitor-keys@6.12.0 deduped +│ │ ├── debug@4.3.4 deduped +│ │ ├─┬ globby@11.1.0 +│ │ │ ├── array-union@2.1.0 +│ │ │ ├─┬ dir-glob@3.0.1 +│ │ │ │ └── path-type@4.0.0 +│ │ │ ├─┬ fast-glob@3.3.2 +│ │ │ │ ├── @nodelib/fs.stat@2.0.5 deduped +│ │ │ │ ├── @nodelib/fs.walk@1.2.8 deduped +│ │ │ │ ├─┬ glob-parent@5.1.2 +│ │ │ │ │ └── is-glob@4.0.3 deduped +│ │ │ │ ├── merge2@1.4.1 deduped +│ │ │ │ └── micromatch@4.0.5 deduped +│ │ │ ├── ignore@5.3.0 deduped +│ │ │ ├── merge2@1.4.1 +│ │ │ └── slash@3.0.0 deduped +│ │ ├── is-glob@4.0.3 deduped +│ │ ├── semver@7.5.4 deduped +│ │ └── ts-api-utils@1.0.3 deduped +│ ├── @typescript-eslint/visitor-keys@6.12.0 deduped +│ ├── debug@4.3.4 deduped +│ └── eslint@8.54.0 deduped +├── @vercel/ncc@0.36.1 +├─┬ eslint-plugin-github@4.10.1 +│ ├── @github/browserslist-config@1.0.0 +│ ├── @typescript-eslint/eslint-plugin@6.12.0 deduped +│ ├── @typescript-eslint/parser@6.12.0 deduped +│ ├─┬ aria-query@5.3.0 +│ │ └── dequal@2.0.3 +│ ├─┬ eslint-config-prettier@9.0.0 +│ │ └── eslint@8.54.0 deduped +│ ├─┬ eslint-plugin-escompat@3.4.0 +│ │ ├─┬ browserslist@4.22.1 +│ │ │ ├── caniuse-lite@1.0.30001564 +│ │ │ ├── electron-to-chromium@1.4.592 +│ │ │ ├── node-releases@2.0.13 +│ │ │ └─┬ update-browserslist-db@1.0.13 +│ │ │ ├── browserslist@4.22.1 deduped +│ │ │ ├── escalade@3.1.1 deduped +│ │ │ └── picocolors@1.0.0 deduped +│ │ └── eslint@8.54.0 deduped +│ ├─┬ eslint-plugin-eslint-comments@3.2.0 +│ │ ├── escape-string-regexp@1.0.5 +│ │ ├── eslint@8.54.0 deduped +│ │ └── ignore@5.3.0 deduped +│ ├─┬ eslint-plugin-filenames@1.3.2 +│ │ ├── eslint@8.54.0 deduped +│ │ ├── lodash.camelcase@4.3.0 +│ │ ├── lodash.kebabcase@4.1.1 +│ │ ├── lodash.snakecase@4.1.1 +│ │ └── lodash.upperfirst@4.3.1 +│ ├─┬ eslint-plugin-i18n-text@1.0.1 +│ │ └── eslint@8.54.0 deduped +│ ├─┬ eslint-plugin-import@2.29.0 +│ │ ├─┬ array-includes@3.1.7 +│ │ │ ├─┬ call-bind@1.0.5 +│ │ │ │ ├── function-bind@1.1.2 deduped +│ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ └─┬ set-function-length@1.1.1 +│ │ │ │ ├── define-data-property@1.1.1 deduped +│ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ ├── gopd@1.0.1 deduped +│ │ │ │ └── has-property-descriptors@1.0.1 deduped +│ │ │ ├─┬ define-properties@1.2.1 +│ │ │ │ ├─┬ define-data-property@1.1.1 +│ │ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ │ ├── gopd@1.0.1 deduped +│ │ │ │ │ └── has-property-descriptors@1.0.1 deduped +│ │ │ │ ├── has-property-descriptors@1.0.1 deduped +│ │ │ │ └── object-keys@1.1.1 deduped +│ │ │ ├─┬ es-abstract@1.22.3 +│ │ │ │ ├─┬ array-buffer-byte-length@1.0.0 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ └── is-array-buffer@3.0.2 deduped +│ │ │ │ ├─┬ arraybuffer.prototype.slice@1.0.2 +│ │ │ │ │ ├── array-buffer-byte-length@1.0.0 deduped +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ │ ├── is-array-buffer@3.0.2 deduped +│ │ │ │ │ └── is-shared-array-buffer@1.0.2 deduped +│ │ │ │ ├── available-typed-arrays@1.0.5 +│ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ ├── es-set-tostringtag@2.0.2 deduped +│ │ │ │ ├─┬ es-to-primitive@1.2.1 +│ │ │ │ │ ├── is-callable@1.2.7 deduped +│ │ │ │ │ ├─┬ is-date-object@1.0.5 +│ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped +│ │ │ │ │ └─┬ is-symbol@1.0.4 +│ │ │ │ │ └── has-symbols@1.0.3 deduped +│ │ │ │ ├─┬ function.prototype.name@1.1.6 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ │ │ └── functions-have-names@1.2.3 +│ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ ├─┬ get-symbol-description@1.0.0 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ └── get-intrinsic@1.2.2 deduped +│ │ │ │ ├── globalthis@1.0.3 deduped +│ │ │ │ ├─┬ gopd@1.0.1 +│ │ │ │ │ └── get-intrinsic@1.2.2 deduped +│ │ │ │ ├── has-property-descriptors@1.0.1 deduped +│ │ │ │ ├── has-proto@1.0.1 deduped +│ │ │ │ ├── has-symbols@1.0.3 deduped +│ │ │ │ ├── hasown@2.0.0 deduped +│ │ │ │ ├── internal-slot@1.0.6 deduped +│ │ │ │ ├─┬ is-array-buffer@3.0.2 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ │ └── is-typed-array@1.1.12 deduped +│ │ │ │ ├── is-callable@1.2.7 +│ │ │ │ ├── is-negative-zero@2.0.2 +│ │ │ │ ├─┬ is-regex@1.1.4 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ └── has-tostringtag@1.0.0 deduped +│ │ │ │ ├─┬ is-shared-array-buffer@1.0.2 +│ │ │ │ │ └── call-bind@1.0.5 deduped +│ │ │ │ ├── is-string@1.0.7 deduped +│ │ │ │ ├─┬ is-typed-array@1.1.12 +│ │ │ │ │ └── which-typed-array@1.1.13 deduped +│ │ │ │ ├─┬ is-weakref@1.0.2 +│ │ │ │ │ └── call-bind@1.0.5 deduped +│ │ │ │ ├── object-inspect@1.13.1 deduped +│ │ │ │ ├── object-keys@1.1.1 deduped +│ │ │ │ ├── object.assign@4.1.4 deduped +│ │ │ │ ├─┬ regexp.prototype.flags@1.5.1 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ │ └── set-function-name@2.0.1 deduped +│ │ │ │ ├── safe-array-concat@1.0.1 deduped +│ │ │ │ ├─┬ safe-regex-test@1.0.0 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ │ └── is-regex@1.1.4 deduped +│ │ │ │ ├─┬ string.prototype.trim@1.2.8 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ │ └── es-abstract@1.22.3 deduped +│ │ │ │ ├─┬ string.prototype.trimend@1.0.7 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ │ └── es-abstract@1.22.3 deduped +│ │ │ │ ├─┬ string.prototype.trimstart@1.0.7 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ │ └── es-abstract@1.22.3 deduped +│ │ │ │ ├─┬ typed-array-buffer@1.0.0 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ │ └── is-typed-array@1.1.12 deduped +│ │ │ │ ├─┬ typed-array-byte-length@1.0.0 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├─┬ for-each@0.3.3 +│ │ │ │ │ │ └── is-callable@1.2.7 deduped +│ │ │ │ │ ├── has-proto@1.0.1 deduped +│ │ │ │ │ └── is-typed-array@1.1.12 deduped +│ │ │ │ ├─┬ typed-array-byte-offset@1.0.0 +│ │ │ │ │ ├── available-typed-arrays@1.0.5 deduped +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── for-each@0.3.3 deduped +│ │ │ │ │ ├── has-proto@1.0.1 deduped +│ │ │ │ │ └── is-typed-array@1.1.12 deduped +│ │ │ │ ├─┬ typed-array-length@1.0.4 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── for-each@0.3.3 deduped +│ │ │ │ │ └── is-typed-array@1.1.12 deduped +│ │ │ │ ├─┬ unbox-primitive@1.0.2 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── has-bigints@1.0.2 +│ │ │ │ │ ├── has-symbols@1.0.3 deduped +│ │ │ │ │ └─┬ which-boxed-primitive@1.0.2 +│ │ │ │ │ ├─┬ is-bigint@1.0.4 +│ │ │ │ │ │ └── has-bigints@1.0.2 deduped +│ │ │ │ │ ├─┬ is-boolean-object@1.1.2 +│ │ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped +│ │ │ │ │ ├─┬ is-number-object@1.0.7 +│ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped +│ │ │ │ │ ├── is-string@1.0.7 deduped +│ │ │ │ │ └── is-symbol@1.0.4 deduped +│ │ │ │ └─┬ which-typed-array@1.1.13 +│ │ │ │ ├── available-typed-arrays@1.0.5 deduped +│ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ ├── for-each@0.3.3 deduped +│ │ │ │ ├── gopd@1.0.1 deduped +│ │ │ │ └── has-tostringtag@1.0.0 deduped +│ │ │ ├─┬ get-intrinsic@1.2.2 +│ │ │ │ ├── function-bind@1.1.2 deduped +│ │ │ │ ├── has-proto@1.0.1 deduped +│ │ │ │ ├── has-symbols@1.0.3 deduped +│ │ │ │ └── hasown@2.0.0 deduped +│ │ │ └─┬ is-string@1.0.7 +│ │ │ └─┬ has-tostringtag@1.0.0 +│ │ │ └── has-symbols@1.0.3 deduped +│ │ ├─┬ array.prototype.findlastindex@1.2.3 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ ├─┬ es-shim-unscopables@1.0.2 +│ │ │ │ └── hasown@2.0.0 deduped +│ │ │ └── get-intrinsic@1.2.2 deduped +│ │ ├─┬ array.prototype.flat@1.3.2 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ └── es-shim-unscopables@1.0.2 deduped +│ │ ├─┬ array.prototype.flatmap@1.3.2 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ └── es-shim-unscopables@1.0.2 deduped +│ │ ├─┬ debug@3.2.7 +│ │ │ └── ms@2.1.2 deduped +│ │ ├─┬ doctrine@2.1.0 +│ │ │ └── esutils@2.0.3 deduped +│ │ ├─┬ eslint-import-resolver-node@0.3.9 +│ │ │ ├─┬ debug@3.2.7 +│ │ │ │ └── ms@2.1.2 deduped +│ │ │ ├── is-core-module@2.13.1 deduped +│ │ │ └─┬ resolve@1.22.8 +│ │ │ ├── is-core-module@2.13.1 deduped +│ │ │ ├── path-parse@1.0.7 +│ │ │ └── supports-preserve-symlinks-flag@1.0.0 +│ │ ├─┬ eslint-module-utils@2.8.0 +│ │ │ └─┬ debug@3.2.7 +│ │ │ └── ms@2.1.2 deduped +│ │ ├── eslint@8.54.0 deduped +│ │ ├─┬ hasown@2.0.0 +│ │ │ └── function-bind@1.1.2 +│ │ ├─┬ is-core-module@2.13.1 +│ │ │ └── hasown@2.0.0 deduped +│ │ ├── is-glob@4.0.3 deduped +│ │ ├── minimatch@3.1.2 deduped +│ │ ├─┬ object.fromentries@2.0.7 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ └── es-abstract@1.22.3 deduped +│ │ ├─┬ object.groupby@1.0.1 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ └── get-intrinsic@1.2.2 deduped +│ │ ├─┬ object.values@1.1.7 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ └── es-abstract@1.22.3 deduped +│ │ ├── semver@6.3.1 +│ │ └─┬ tsconfig-paths@3.14.2 +│ │ ├── @types/json5@0.0.29 +│ │ ├─┬ json5@1.0.2 +│ │ │ └── minimist@1.2.8 deduped +│ │ ├── minimist@1.2.8 +│ │ └── strip-bom@3.0.0 +│ ├─┬ eslint-plugin-jsx-a11y@6.8.0 +│ │ ├─┬ @babel/runtime@7.23.4 +│ │ │ └── regenerator-runtime@0.14.0 +│ │ ├── aria-query@5.3.0 deduped +│ │ ├── array-includes@3.1.7 deduped +│ │ ├── array.prototype.flatmap@1.3.2 deduped +│ │ ├── ast-types-flow@0.0.8 +│ │ ├── axe-core@4.7.0 +│ │ ├─┬ axobject-query@3.2.1 +│ │ │ └── dequal@2.0.3 deduped +│ │ ├── damerau-levenshtein@1.0.8 +│ │ ├── emoji-regex@9.2.2 +│ │ ├─┬ es-iterator-helpers@1.0.15 +│ │ │ ├─┬ asynciterator.prototype@1.0.0 +│ │ │ │ └── has-symbols@1.0.3 deduped +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ ├─┬ es-set-tostringtag@2.0.2 +│ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ ├── has-tostringtag@1.0.0 deduped +│ │ │ │ └── hasown@2.0.0 deduped +│ │ │ ├── function-bind@1.1.2 deduped +│ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ ├─┬ globalthis@1.0.3 +│ │ │ │ └── define-properties@1.2.1 deduped +│ │ │ ├─┬ has-property-descriptors@1.0.1 +│ │ │ │ └── get-intrinsic@1.2.2 deduped +│ │ │ ├── has-proto@1.0.1 +│ │ │ ├── has-symbols@1.0.3 +│ │ │ ├─┬ internal-slot@1.0.6 +│ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ ├── hasown@2.0.0 deduped +│ │ │ │ └── side-channel@1.0.4 deduped +│ │ │ ├─┬ iterator.prototype@1.1.2 +│ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ ├── has-symbols@1.0.3 deduped +│ │ │ │ ├─┬ reflect.getprototypeof@1.0.4 +│ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ ├── define-properties@1.2.1 deduped +│ │ │ │ │ ├── es-abstract@1.22.3 deduped +│ │ │ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ │ │ ├── globalthis@1.0.3 deduped +│ │ │ │ │ └─┬ which-builtin-type@1.1.3 +│ │ │ │ │ ├── function.prototype.name@1.1.6 deduped +│ │ │ │ │ ├── has-tostringtag@1.0.0 deduped +│ │ │ │ │ ├─┬ is-async-function@2.0.0 +│ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped +│ │ │ │ │ ├── is-date-object@1.0.5 deduped +│ │ │ │ │ ├─┬ is-finalizationregistry@1.0.2 +│ │ │ │ │ │ └── call-bind@1.0.5 deduped +│ │ │ │ │ ├─┬ is-generator-function@1.0.10 +│ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped +│ │ │ │ │ ├── is-regex@1.1.4 deduped +│ │ │ │ │ ├── is-weakref@1.0.2 deduped +│ │ │ │ │ ├── isarray@2.0.5 deduped +│ │ │ │ │ ├── which-boxed-primitive@1.0.2 deduped +│ │ │ │ │ ├─┬ which-collection@1.0.1 +│ │ │ │ │ │ ├── is-map@2.0.2 +│ │ │ │ │ │ ├── is-set@2.0.2 +│ │ │ │ │ │ ├── is-weakmap@2.0.1 +│ │ │ │ │ │ └─┬ is-weakset@2.0.2 +│ │ │ │ │ │ ├── call-bind@1.0.5 deduped +│ │ │ │ │ │ └── get-intrinsic@1.2.2 deduped +│ │ │ │ │ └── which-typed-array@1.1.13 deduped +│ │ │ │ └─┬ set-function-name@2.0.1 +│ │ │ │ ├── define-data-property@1.1.1 deduped +│ │ │ │ ├── functions-have-names@1.2.3 deduped +│ │ │ │ └── has-property-descriptors@1.0.1 deduped +│ │ │ └─┬ safe-array-concat@1.0.1 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── get-intrinsic@1.2.2 deduped +│ │ │ ├── has-symbols@1.0.3 deduped +│ │ │ └── isarray@2.0.5 +│ │ ├── eslint@8.54.0 deduped +│ │ ├── hasown@2.0.0 deduped +│ │ ├── jsx-ast-utils@3.3.5 deduped +│ │ ├─┬ language-tags@1.0.9 +│ │ │ └── language-subtag-registry@0.3.22 +│ │ ├── minimatch@3.1.2 deduped +│ │ ├─┬ object.entries@1.1.7 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ └── es-abstract@1.22.3 deduped +│ │ └── object.fromentries@2.0.7 deduped +│ ├── eslint-plugin-no-only-tests@3.1.0 +│ ├── eslint-plugin-prettier@5.0.1 deduped +│ ├── eslint-rule-documentation@1.0.23 +│ ├── eslint@8.54.0 deduped +│ ├─┬ jsx-ast-utils@3.3.5 +│ │ ├── array-includes@3.1.7 deduped +│ │ ├── array.prototype.flat@1.3.2 deduped +│ │ ├─┬ object.assign@4.1.4 +│ │ │ ├── call-bind@1.0.5 deduped +│ │ │ ├── define-properties@1.2.1 deduped +│ │ │ ├── has-symbols@1.0.3 deduped +│ │ │ └── object-keys@1.1.1 +│ │ └── object.values@1.1.7 deduped +│ ├── prettier@3.1.0 deduped +│ └── svg-element-attributes@1.3.1 +├─┬ eslint-plugin-jest@27.6.0 +│ ├── @typescript-eslint/eslint-plugin@6.12.0 deduped +│ ├─┬ @typescript-eslint/utils@5.62.0 +│ │ ├── @eslint-community/eslint-utils@4.4.0 deduped +│ │ ├── @types/json-schema@7.0.15 deduped +│ │ ├── @types/semver@7.5.6 deduped +│ │ ├─┬ @typescript-eslint/scope-manager@5.62.0 +│ │ │ ├── @typescript-eslint/types@5.62.0 deduped +│ │ │ └─┬ @typescript-eslint/visitor-keys@5.62.0 +│ │ │ ├── @typescript-eslint/types@5.62.0 deduped +│ │ │ └── eslint-visitor-keys@3.4.3 deduped +│ │ ├── @typescript-eslint/types@5.62.0 +│ │ ├─┬ @typescript-eslint/typescript-estree@5.62.0 +│ │ │ ├── @typescript-eslint/types@5.62.0 deduped +│ │ │ ├── @typescript-eslint/visitor-keys@5.62.0 deduped +│ │ │ ├── debug@4.3.4 deduped +│ │ │ ├── globby@11.1.0 deduped +│ │ │ ├── is-glob@4.0.3 deduped +│ │ │ ├── semver@7.5.4 deduped +│ │ │ └─┬ tsutils@3.21.0 +│ │ │ ├── tslib@1.14.1 +│ │ │ └── typescript@5.3.2 deduped +│ │ ├─┬ eslint-scope@5.1.1 +│ │ │ ├── esrecurse@4.3.0 deduped +│ │ │ └── estraverse@4.3.0 +│ │ ├── eslint@8.54.0 deduped +│ │ └── semver@7.5.4 deduped +│ ├── eslint@8.54.0 deduped +│ └── jest@29.7.0 deduped +├─┬ eslint-plugin-prettier@5.0.1 +│ ├── UNMET OPTIONAL DEPENDENCY @types/eslint@>=8.0.0 +│ ├── eslint@8.54.0 deduped +│ ├─┬ prettier-linter-helpers@1.0.0 +│ │ └── fast-diff@1.3.0 +│ ├── prettier@3.1.0 deduped +│ └─┬ synckit@0.8.5 +│ ├─┬ @pkgr/utils@2.4.2 +│ │ ├── cross-spawn@7.0.3 deduped +│ │ ├── fast-glob@3.3.2 deduped +│ │ ├── is-glob@4.0.3 deduped +│ │ ├─┬ open@9.1.0 +│ │ │ ├─┬ default-browser@4.0.0 +│ │ │ │ ├─┬ bundle-name@3.0.0 +│ │ │ │ │ └─┬ run-applescript@5.0.0 +│ │ │ │ │ └── execa@5.1.1 deduped +│ │ │ │ ├─┬ default-browser-id@3.0.0 +│ │ │ │ │ ├─┬ bplist-parser@0.2.0 +│ │ │ │ │ │ └── big-integer@1.6.52 deduped +│ │ │ │ │ └── untildify@4.0.0 +│ │ │ │ ├─┬ execa@7.2.0 +│ │ │ │ │ ├── cross-spawn@7.0.3 deduped +│ │ │ │ │ ├── get-stream@6.0.1 deduped +│ │ │ │ │ ├── human-signals@4.3.1 +│ │ │ │ │ ├── is-stream@3.0.0 +│ │ │ │ │ ├── merge-stream@2.0.0 deduped +│ │ │ │ │ ├─┬ npm-run-path@5.1.0 +│ │ │ │ │ │ └── path-key@4.0.0 +│ │ │ │ │ ├─┬ onetime@6.0.0 +│ │ │ │ │ │ └── mimic-fn@4.0.0 +│ │ │ │ │ ├── signal-exit@3.0.7 deduped +│ │ │ │ │ └── strip-final-newline@3.0.0 +│ │ │ │ └── titleize@3.0.0 +│ │ │ ├── define-lazy-prop@3.0.0 +│ │ │ ├─┬ is-inside-container@1.0.0 +│ │ │ │ └── is-docker@3.0.0 +│ │ │ └─┬ is-wsl@2.2.0 +│ │ │ └── is-docker@2.2.1 +│ │ ├── picocolors@1.0.0 +│ │ └── tslib@2.6.2 deduped +│ └── tslib@2.6.2 +├─┬ eslint@8.54.0 +│ ├─┬ @eslint-community/eslint-utils@4.4.0 +│ │ ├── eslint-visitor-keys@3.4.3 deduped +│ │ └── eslint@8.54.0 deduped +│ ├── @eslint-community/regexpp@4.10.0 deduped +│ ├─┬ @eslint/eslintrc@2.1.3 +│ │ ├── ajv@6.12.6 deduped +│ │ ├── debug@4.3.4 deduped +│ │ ├── espree@9.6.1 deduped +│ │ ├── globals@13.23.0 deduped +│ │ ├── ignore@5.3.0 deduped +│ │ ├─┬ import-fresh@3.3.0 +│ │ │ ├─┬ parent-module@1.0.1 +│ │ │ │ └── callsites@3.1.0 deduped +│ │ │ └── resolve-from@4.0.0 +│ │ ├── js-yaml@4.1.0 deduped +│ │ ├── minimatch@3.1.2 deduped +│ │ └── strip-json-comments@3.1.1 +│ ├── @eslint/js@8.54.0 +│ ├─┬ @humanwhocodes/config-array@0.11.13 +│ │ ├── @humanwhocodes/object-schema@2.0.1 +│ │ ├── debug@4.3.4 deduped +│ │ └── minimatch@3.1.2 deduped +│ ├── @humanwhocodes/module-importer@1.0.1 +│ ├─┬ @nodelib/fs.walk@1.2.8 +│ │ ├─┬ @nodelib/fs.scandir@2.1.5 +│ │ │ ├── @nodelib/fs.stat@2.0.5 +│ │ │ └─┬ run-parallel@1.2.0 +│ │ │ └── queue-microtask@1.2.3 +│ │ └─┬ fastq@1.15.0 +│ │ └── reusify@1.0.4 +│ ├── @ungap/structured-clone@1.2.0 +│ ├─┬ ajv@6.12.6 +│ │ ├── fast-deep-equal@3.1.3 deduped +│ │ ├── fast-json-stable-stringify@2.1.0 deduped +│ │ ├── json-schema-traverse@0.4.1 +│ │ └─┬ uri-js@4.4.1 +│ │ └── punycode@2.3.1 +│ ├─┬ chalk@4.1.2 +│ │ ├─┬ ansi-styles@4.3.0 +│ │ │ └─┬ color-convert@2.0.1 +│ │ │ └── color-name@1.1.4 +│ │ └─┬ supports-color@7.2.0 +│ │ └── has-flag@4.0.0 +│ ├─┬ cross-spawn@7.0.3 +│ │ ├── path-key@3.1.1 +│ │ ├─┬ shebang-command@2.0.0 +│ │ │ └── shebang-regex@3.0.0 +│ │ └─┬ which@2.0.2 +│ │ └── isexe@2.0.0 +│ ├── debug@4.3.4 deduped +│ ├─┬ doctrine@3.0.0 +│ │ └── esutils@2.0.3 deduped +│ ├── escape-string-regexp@4.0.0 +│ ├─┬ eslint-scope@7.2.2 +│ │ ├─┬ esrecurse@4.3.0 +│ │ │ └── estraverse@5.3.0 deduped +│ │ └── estraverse@5.3.0 +│ ├── eslint-visitor-keys@3.4.3 +│ ├─┬ espree@9.6.1 +│ │ ├─┬ acorn-jsx@5.3.2 +│ │ │ └── acorn@8.11.2 deduped +│ │ ├── acorn@8.11.2 +│ │ └── eslint-visitor-keys@3.4.3 deduped +│ ├─┬ esquery@1.5.0 +│ │ └── estraverse@5.3.0 deduped +│ ├── esutils@2.0.3 +│ ├── fast-deep-equal@3.1.3 +│ ├─┬ file-entry-cache@6.0.1 +│ │ └─┬ flat-cache@3.2.0 +│ │ ├── flatted@3.2.9 +│ │ ├─┬ keyv@4.5.4 +│ │ │ └── json-buffer@3.0.1 +│ │ └─┬ rimraf@3.0.2 +│ │ └── glob@7.2.3 deduped +│ ├─┬ find-up@5.0.0 +│ │ ├─┬ locate-path@6.0.0 +│ │ │ └─┬ p-locate@5.0.0 +│ │ │ └── p-limit@3.1.0 deduped +│ │ └── path-exists@4.0.0 +│ ├─┬ glob-parent@6.0.2 +│ │ └── is-glob@4.0.3 deduped +│ ├─┬ globals@13.23.0 +│ │ └── type-fest@0.20.2 +│ ├── graphemer@1.4.0 deduped +│ ├── ignore@5.3.0 deduped +│ ├── imurmurhash@0.1.4 +│ ├─┬ is-glob@4.0.3 +│ │ └── is-extglob@2.1.1 +│ ├── is-path-inside@3.0.3 +│ ├── js-yaml@4.1.0 deduped +│ ├── json-stable-stringify-without-jsonify@1.0.1 +│ ├─┬ levn@0.4.1 +│ │ ├── prelude-ls@1.2.1 +│ │ └─┬ type-check@0.4.0 +│ │ └── prelude-ls@1.2.1 deduped +│ ├── lodash.merge@4.6.2 +│ ├─┬ minimatch@3.1.2 +│ │ └─┬ brace-expansion@1.1.11 +│ │ ├── balanced-match@1.0.2 +│ │ └── concat-map@0.0.1 +│ ├── natural-compare@1.4.0 deduped +│ ├─┬ optionator@0.9.3 +│ │ ├── @aashutoshrathi/word-wrap@1.2.6 +│ │ ├── deep-is@0.1.4 +│ │ ├── fast-levenshtein@2.0.6 +│ │ ├── levn@0.4.1 deduped +│ │ ├── prelude-ls@1.2.1 deduped +│ │ └── type-check@0.4.0 deduped +│ ├─┬ strip-ansi@6.0.1 +│ │ └── ansi-regex@5.0.1 +│ └── text-table@0.2.0 +├─┬ jest-circus@29.7.0 +│ ├─┬ @jest/environment@29.7.0 +│ │ ├─┬ @jest/fake-timers@29.7.0 +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├─┬ @sinonjs/fake-timers@10.3.0 +│ │ │ │ └─┬ @sinonjs/commons@3.0.0 +│ │ │ │ └── type-detect@4.0.8 +│ │ │ ├── @types/node@20.9.4 deduped +│ │ │ ├── jest-message-util@29.7.0 deduped +│ │ │ ├── jest-mock@29.7.0 deduped +│ │ │ └── jest-util@29.7.0 deduped +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── @types/node@20.9.4 deduped +│ │ └─┬ jest-mock@29.7.0 +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── @types/node@20.9.4 deduped +│ │ └── jest-util@29.7.0 deduped +│ ├─┬ @jest/expect@29.7.0 +│ │ ├── expect@29.7.0 deduped +│ │ └── jest-snapshot@29.7.0 deduped +│ ├─┬ @jest/test-result@29.7.0 +│ │ ├─┬ @jest/console@29.7.0 +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── @types/node@20.9.4 deduped +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── jest-message-util@29.7.0 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ └── slash@3.0.0 deduped +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── @types/istanbul-lib-coverage@2.0.6 +│ │ └── collect-v8-coverage@1.0.2 +│ ├─┬ @jest/types@29.6.3 +│ │ ├── @jest/schemas@29.6.3 deduped +│ │ ├── @types/istanbul-lib-coverage@2.0.6 deduped +│ │ ├─┬ @types/istanbul-reports@3.0.4 +│ │ │ └─┬ @types/istanbul-lib-report@3.0.3 +│ │ │ └── @types/istanbul-lib-coverage@2.0.6 deduped +│ │ ├── @types/node@20.9.4 deduped +│ │ ├─┬ @types/yargs@17.0.32 +│ │ │ └── @types/yargs-parser@21.0.3 +│ │ └── chalk@4.1.2 deduped +│ ├── @types/node@20.9.4 deduped +│ ├── chalk@4.1.2 deduped +│ ├── co@4.6.0 +│ ├─┬ dedent@1.5.1 +│ │ └── UNMET OPTIONAL DEPENDENCY babel-plugin-macros@^3.1.0 +│ ├── is-generator-fn@2.1.0 +│ ├─┬ jest-each@29.7.0 +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── chalk@4.1.2 deduped +│ │ ├── jest-get-type@29.6.3 deduped +│ │ ├── jest-util@29.7.0 deduped +│ │ └── pretty-format@29.7.0 deduped +│ ├─┬ jest-matcher-utils@29.7.0 +│ │ ├── chalk@4.1.2 deduped +│ │ ├─┬ jest-diff@29.7.0 +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── diff-sequences@29.6.3 +│ │ │ ├── jest-get-type@29.6.3 deduped +│ │ │ └── pretty-format@29.7.0 deduped +│ │ ├── jest-get-type@29.6.3 deduped +│ │ └── pretty-format@29.7.0 deduped +│ ├─┬ jest-message-util@29.7.0 +│ │ ├─┬ @babel/code-frame@7.23.4 +│ │ │ ├─┬ @babel/highlight@7.23.4 +│ │ │ │ ├── @babel/helper-validator-identifier@7.22.20 deduped +│ │ │ │ ├─┬ chalk@2.4.2 +│ │ │ │ │ ├─┬ ansi-styles@3.2.1 +│ │ │ │ │ │ └─┬ color-convert@1.9.3 +│ │ │ │ │ │ └── color-name@1.1.3 +│ │ │ │ │ ├── escape-string-regexp@1.0.5 +│ │ │ │ │ └─┬ supports-color@5.5.0 +│ │ │ │ │ └── has-flag@3.0.0 +│ │ │ │ └── js-tokens@4.0.0 +│ │ │ └─┬ chalk@2.4.2 +│ │ │ ├─┬ ansi-styles@3.2.1 +│ │ │ │ └─┬ color-convert@1.9.3 +│ │ │ │ └── color-name@1.1.3 +│ │ │ ├── escape-string-regexp@1.0.5 +│ │ │ └─┬ supports-color@5.5.0 +│ │ │ └── has-flag@3.0.0 +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── @types/stack-utils@2.0.3 +│ │ ├── chalk@4.1.2 deduped +│ │ ├── graceful-fs@4.2.11 deduped +│ │ ├─┬ micromatch@4.0.5 +│ │ │ ├─┬ braces@3.0.2 +│ │ │ │ └─┬ fill-range@7.0.1 +│ │ │ │ └─┬ to-regex-range@5.0.1 +│ │ │ │ └── is-number@7.0.0 +│ │ │ └── picomatch@2.3.1 deduped +│ │ ├── pretty-format@29.7.0 deduped +│ │ ├── slash@3.0.0 deduped +│ │ └── stack-utils@2.0.6 deduped +│ ├─┬ jest-runtime@29.7.0 +│ │ ├── @jest/environment@29.7.0 deduped +│ │ ├── @jest/fake-timers@29.7.0 deduped +│ │ ├─┬ @jest/globals@29.7.0 +│ │ │ ├── @jest/environment@29.7.0 deduped +│ │ │ ├── @jest/expect@29.7.0 deduped +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ └── jest-mock@29.7.0 deduped +│ │ ├─┬ @jest/source-map@29.6.3 +│ │ │ ├─┬ @jridgewell/trace-mapping@0.3.20 +│ │ │ │ ├── @jridgewell/resolve-uri@3.1.1 +│ │ │ │ └── @jridgewell/sourcemap-codec@1.4.15 +│ │ │ ├── callsites@3.1.0 +│ │ │ └── graceful-fs@4.2.11 deduped +│ │ ├── @jest/test-result@29.7.0 deduped +│ │ ├─┬ @jest/transform@29.7.0 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── @jridgewell/trace-mapping@0.3.20 deduped +│ │ │ ├── babel-plugin-istanbul@6.1.1 deduped +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── convert-source-map@2.0.0 deduped +│ │ │ ├── fast-json-stable-stringify@2.1.0 deduped +│ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ ├── jest-haste-map@29.7.0 deduped +│ │ │ ├── jest-regex-util@29.6.3 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ ├── micromatch@4.0.5 deduped +│ │ │ ├── pirates@4.0.6 +│ │ │ ├── slash@3.0.0 deduped +│ │ │ └─┬ write-file-atomic@4.0.2 +│ │ │ ├── imurmurhash@0.1.4 deduped +│ │ │ └── signal-exit@3.0.7 +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── @types/node@20.9.4 deduped +│ │ ├── chalk@4.1.2 deduped +│ │ ├── cjs-module-lexer@1.2.3 +│ │ ├── collect-v8-coverage@1.0.2 deduped +│ │ ├─┬ glob@7.2.3 +│ │ │ ├── fs.realpath@1.0.0 +│ │ │ ├─┬ inflight@1.0.6 +│ │ │ │ ├── once@1.4.0 deduped +│ │ │ │ └── wrappy@1.0.2 +│ │ │ ├── inherits@2.0.4 deduped +│ │ │ ├── minimatch@3.1.2 deduped +│ │ │ ├─┬ once@1.4.0 +│ │ │ │ └── wrappy@1.0.2 deduped +│ │ │ └── path-is-absolute@1.0.1 +│ │ ├── graceful-fs@4.2.11 deduped +│ │ ├─┬ jest-haste-map@29.7.0 +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├─┬ @types/graceful-fs@4.1.9 +│ │ │ │ └── @types/node@20.9.4 deduped +│ │ │ ├── @types/node@20.9.4 deduped +│ │ │ ├─┬ anymatch@3.1.3 +│ │ │ │ ├── normalize-path@3.0.0 +│ │ │ │ └── picomatch@2.3.1 deduped +│ │ │ ├─┬ fb-watchman@2.0.2 +│ │ │ │ └─┬ bser@2.1.1 +│ │ │ │ └── node-int64@0.4.0 +│ │ │ ├── fsevents@2.3.3 +│ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ ├── jest-regex-util@29.6.3 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ ├─┬ jest-worker@29.7.0 +│ │ │ │ ├── @types/node@20.9.4 deduped +│ │ │ │ ├── jest-util@29.7.0 deduped +│ │ │ │ ├── merge-stream@2.0.0 +│ │ │ │ └─┬ supports-color@8.1.1 +│ │ │ │ └── has-flag@4.0.0 deduped +│ │ │ ├── micromatch@4.0.5 deduped +│ │ │ └─┬ walker@1.0.8 +│ │ │ └─┬ makeerror@1.0.12 +│ │ │ └── tmpl@1.0.5 +│ │ ├── jest-message-util@29.7.0 deduped +│ │ ├── jest-mock@29.7.0 deduped +│ │ ├── jest-regex-util@29.6.3 +│ │ ├─┬ jest-resolve@29.7.0 +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ ├── jest-haste-map@29.7.0 deduped +│ │ │ ├─┬ jest-pnp-resolver@1.2.3 +│ │ │ │ └── jest-resolve@29.7.0 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ ├── jest-validate@29.7.0 deduped +│ │ │ ├── resolve.exports@2.0.2 +│ │ │ ├── resolve@1.22.8 deduped +│ │ │ └── slash@3.0.0 deduped +│ │ ├── jest-snapshot@29.7.0 deduped +│ │ ├── jest-util@29.7.0 deduped +│ │ ├── slash@3.0.0 deduped +│ │ └── strip-bom@4.0.0 +│ ├─┬ jest-snapshot@29.7.0 +│ │ ├── @babel/core@7.23.3 deduped +│ │ ├─┬ @babel/generator@7.23.4 +│ │ │ ├── @babel/types@7.23.4 deduped +│ │ │ ├─┬ @jridgewell/gen-mapping@0.3.3 +│ │ │ │ ├── @jridgewell/set-array@1.1.2 +│ │ │ │ ├── @jridgewell/sourcemap-codec@1.4.15 deduped +│ │ │ │ └── @jridgewell/trace-mapping@0.3.20 deduped +│ │ │ ├── @jridgewell/trace-mapping@0.3.20 deduped +│ │ │ └── jsesc@2.5.2 +│ │ ├─┬ @babel/plugin-syntax-jsx@7.23.3 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ └── @babel/helper-plugin-utils@7.22.5 +│ │ ├─┬ @babel/plugin-syntax-typescript@7.23.3 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ ├─┬ @babel/types@7.23.4 +│ │ │ ├── @babel/helper-string-parser@7.23.4 +│ │ │ ├── @babel/helper-validator-identifier@7.22.20 +│ │ │ └── to-fast-properties@2.0.0 +│ │ ├── @jest/expect-utils@29.7.0 deduped +│ │ ├── @jest/transform@29.7.0 deduped +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├─┬ babel-preset-current-node-syntax@1.0.1 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ ├─┬ @babel/plugin-syntax-async-generators@7.8.4 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-bigint@7.8.3 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-class-properties@7.12.13 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-import-meta@7.10.4 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-json-strings@7.8.3 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-logical-assignment-operators@7.10.4 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-nullish-coalescing-operator@7.8.3 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-numeric-separator@7.10.4 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-object-rest-spread@7.8.3 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-optional-catch-binding@7.8.3 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @babel/plugin-syntax-optional-chaining@7.8.3 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ └─┬ @babel/plugin-syntax-top-level-await@7.14.5 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ └── @babel/helper-plugin-utils@7.22.5 deduped +│ │ ├── chalk@4.1.2 deduped +│ │ ├── expect@29.7.0 deduped +│ │ ├── graceful-fs@4.2.11 deduped +│ │ ├── jest-diff@29.7.0 deduped +│ │ ├── jest-get-type@29.6.3 deduped +│ │ ├── jest-matcher-utils@29.7.0 deduped +│ │ ├── jest-message-util@29.7.0 deduped +│ │ ├── jest-util@29.7.0 deduped +│ │ ├── natural-compare@1.4.0 deduped +│ │ ├── pretty-format@29.7.0 deduped +│ │ └── semver@7.5.4 deduped +│ ├─┬ jest-util@29.7.0 +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── @types/node@20.9.4 deduped +│ │ ├── chalk@4.1.2 deduped +│ │ ├── ci-info@3.9.0 +│ │ ├── graceful-fs@4.2.11 deduped +│ │ └── picomatch@2.3.1 +│ ├─┬ p-limit@3.1.0 +│ │ └── yocto-queue@0.1.0 +│ ├── pretty-format@29.7.0 deduped +│ ├── pure-rand@6.0.4 +│ ├── slash@3.0.0 +│ └─┬ stack-utils@2.0.6 +│ └── escape-string-regexp@2.0.0 +├─┬ jest@29.7.0 +│ ├─┬ @jest/core@29.7.0 +│ │ ├── @jest/console@29.7.0 deduped +│ │ ├─┬ @jest/reporters@29.7.0 +│ │ │ ├── @bcoe/v8-coverage@0.2.3 +│ │ │ ├── @jest/console@29.7.0 deduped +│ │ │ ├── @jest/test-result@29.7.0 deduped +│ │ │ ├── @jest/transform@29.7.0 deduped +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── @jridgewell/trace-mapping@0.3.20 deduped +│ │ │ ├── @types/node@20.9.4 deduped +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── collect-v8-coverage@1.0.2 deduped +│ │ │ ├── exit@0.1.2 deduped +│ │ │ ├── glob@7.2.3 deduped +│ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ ├── istanbul-lib-coverage@3.2.2 +│ │ │ ├─┬ istanbul-lib-instrument@6.0.1 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ ├── @babel/parser@7.23.4 deduped +│ │ │ │ ├── @istanbuljs/schema@0.1.3 deduped +│ │ │ │ ├── istanbul-lib-coverage@3.2.2 deduped +│ │ │ │ └── semver@7.5.4 deduped +│ │ │ ├─┬ istanbul-lib-report@3.0.1 +│ │ │ │ ├── istanbul-lib-coverage@3.2.2 deduped +│ │ │ │ ├─┬ make-dir@4.0.0 +│ │ │ │ │ └── semver@7.5.4 deduped +│ │ │ │ └── supports-color@7.2.0 deduped +│ │ │ ├─┬ istanbul-lib-source-maps@4.0.1 +│ │ │ │ ├── debug@4.3.4 deduped +│ │ │ │ ├── istanbul-lib-coverage@3.2.2 deduped +│ │ │ │ └── source-map@0.6.1 +│ │ │ ├─┬ istanbul-reports@3.1.6 +│ │ │ │ ├── html-escaper@2.0.2 +│ │ │ │ └── istanbul-lib-report@3.0.1 deduped +│ │ │ ├── jest-message-util@29.7.0 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ ├── jest-worker@29.7.0 deduped +│ │ │ ├── UNMET OPTIONAL DEPENDENCY node-notifier@^8.0.1 || ^9.0.0 || ^10.0.0 +│ │ │ ├── slash@3.0.0 deduped +│ │ │ ├─┬ string-length@4.0.2 +│ │ │ │ ├── char-regex@1.0.2 +│ │ │ │ └── strip-ansi@6.0.1 deduped +│ │ │ ├── strip-ansi@6.0.1 deduped +│ │ │ └─┬ v8-to-istanbul@9.2.0 +│ │ │ ├── @jridgewell/trace-mapping@0.3.20 deduped +│ │ │ ├── @types/istanbul-lib-coverage@2.0.6 deduped +│ │ │ └── convert-source-map@2.0.0 deduped +│ │ ├── @jest/test-result@29.7.0 deduped +│ │ ├── @jest/transform@29.7.0 deduped +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── @types/node@20.9.4 deduped +│ │ ├─┬ ansi-escapes@4.3.2 +│ │ │ └── type-fest@0.21.3 +│ │ ├── chalk@4.1.2 deduped +│ │ ├── ci-info@3.9.0 deduped +│ │ ├── exit@0.1.2 +│ │ ├── graceful-fs@4.2.11 deduped +│ │ ├─┬ jest-changed-files@29.7.0 +│ │ │ ├─┬ execa@5.1.1 +│ │ │ │ ├── cross-spawn@7.0.3 deduped +│ │ │ │ ├── get-stream@6.0.1 +│ │ │ │ ├── human-signals@2.1.0 +│ │ │ │ ├── is-stream@2.0.1 +│ │ │ │ ├── merge-stream@2.0.0 deduped +│ │ │ │ ├─┬ npm-run-path@4.0.1 +│ │ │ │ │ └── path-key@3.1.1 deduped +│ │ │ │ ├─┬ onetime@5.1.2 +│ │ │ │ │ └── mimic-fn@2.1.0 +│ │ │ │ ├── signal-exit@3.0.7 deduped +│ │ │ │ └── strip-final-newline@2.0.0 +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ └── p-limit@3.1.0 deduped +│ │ ├─┬ jest-config@29.7.0 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ ├─┬ @jest/test-sequencer@29.7.0 +│ │ │ │ ├── @jest/test-result@29.7.0 deduped +│ │ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ │ ├── jest-haste-map@29.7.0 deduped +│ │ │ │ └── slash@3.0.0 deduped +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── @types/node@20.9.4 deduped +│ │ │ ├── babel-jest@29.7.0 deduped +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── ci-info@3.9.0 deduped +│ │ │ ├── deepmerge@4.3.1 +│ │ │ ├── glob@7.2.3 deduped +│ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ ├── jest-circus@29.7.0 deduped +│ │ │ ├─┬ jest-environment-node@29.7.0 +│ │ │ │ ├── @jest/environment@29.7.0 deduped +│ │ │ │ ├── @jest/fake-timers@29.7.0 deduped +│ │ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ │ ├── @types/node@20.9.4 deduped +│ │ │ │ ├── jest-mock@29.7.0 deduped +│ │ │ │ └── jest-util@29.7.0 deduped +│ │ │ ├── jest-get-type@29.6.3 deduped +│ │ │ ├── jest-regex-util@29.6.3 deduped +│ │ │ ├── jest-resolve@29.7.0 deduped +│ │ │ ├── jest-runner@29.7.0 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ ├── jest-validate@29.7.0 deduped +│ │ │ ├── micromatch@4.0.5 deduped +│ │ │ ├─┬ parse-json@5.2.0 +│ │ │ │ ├── @babel/code-frame@7.23.4 deduped +│ │ │ │ ├─┬ error-ex@1.3.2 +│ │ │ │ │ └── is-arrayish@0.2.1 +│ │ │ │ ├── json-parse-even-better-errors@2.3.1 +│ │ │ │ └── lines-and-columns@1.2.4 +│ │ │ ├── pretty-format@29.7.0 deduped +│ │ │ ├── slash@3.0.0 deduped +│ │ │ ├── strip-json-comments@3.1.1 deduped +│ │ │ └── UNMET OPTIONAL DEPENDENCY ts-node@>=9.0.0 +│ │ ├── jest-haste-map@29.7.0 deduped +│ │ ├── jest-message-util@29.7.0 deduped +│ │ ├── jest-regex-util@29.6.3 deduped +│ │ ├─┬ jest-resolve-dependencies@29.7.0 +│ │ │ ├── jest-regex-util@29.6.3 deduped +│ │ │ └── jest-snapshot@29.7.0 deduped +│ │ ├── jest-resolve@29.7.0 deduped +│ │ ├─┬ jest-runner@29.7.0 +│ │ │ ├── @jest/console@29.7.0 deduped +│ │ │ ├── @jest/environment@29.7.0 deduped +│ │ │ ├── @jest/test-result@29.7.0 deduped +│ │ │ ├── @jest/transform@29.7.0 deduped +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── @types/node@20.9.4 deduped +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── emittery@0.13.1 +│ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ ├─┬ jest-docblock@29.7.0 +│ │ │ │ └── detect-newline@3.1.0 +│ │ │ ├── jest-environment-node@29.7.0 deduped +│ │ │ ├── jest-haste-map@29.7.0 deduped +│ │ │ ├─┬ jest-leak-detector@29.7.0 +│ │ │ │ ├── jest-get-type@29.6.3 deduped +│ │ │ │ └── pretty-format@29.7.0 deduped +│ │ │ ├── jest-message-util@29.7.0 deduped +│ │ │ ├── jest-resolve@29.7.0 deduped +│ │ │ ├── jest-runtime@29.7.0 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ ├── jest-watcher@29.7.0 deduped +│ │ │ ├── jest-worker@29.7.0 deduped +│ │ │ ├── p-limit@3.1.0 deduped +│ │ │ └─┬ source-map-support@0.5.13 +│ │ │ ├── buffer-from@1.1.2 +│ │ │ └── source-map@0.6.1 deduped +│ │ ├── jest-runtime@29.7.0 deduped +│ │ ├── jest-snapshot@29.7.0 deduped +│ │ ├── jest-util@29.7.0 deduped +│ │ ├─┬ jest-validate@29.7.0 +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── camelcase@6.3.0 +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── jest-get-type@29.6.3 deduped +│ │ │ ├── leven@3.1.0 +│ │ │ └── pretty-format@29.7.0 deduped +│ │ ├─┬ jest-watcher@29.7.0 +│ │ │ ├── @jest/test-result@29.7.0 deduped +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── @types/node@20.9.4 deduped +│ │ │ ├── ansi-escapes@4.3.2 deduped +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── emittery@0.13.1 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ └── string-length@4.0.2 deduped +│ │ ├── micromatch@4.0.5 deduped +│ │ ├── UNMET OPTIONAL DEPENDENCY node-notifier@^8.0.1 || ^9.0.0 || ^10.0.0 +│ │ ├── pretty-format@29.7.0 deduped +│ │ ├── slash@3.0.0 deduped +│ │ └── strip-ansi@6.0.1 deduped +│ ├── @jest/types@29.6.3 deduped +│ ├─┬ import-local@3.1.0 +│ │ ├─┬ pkg-dir@4.2.0 +│ │ │ └─┬ find-up@4.1.0 +│ │ │ ├─┬ locate-path@5.0.0 +│ │ │ │ └─┬ p-locate@4.1.0 +│ │ │ │ └─┬ p-limit@2.3.0 +│ │ │ │ └── p-try@2.2.0 +│ │ │ └── path-exists@4.0.0 deduped +│ │ └─┬ resolve-cwd@3.0.0 +│ │ └── resolve-from@5.0.0 +│ ├─┬ jest-cli@29.7.0 +│ │ ├── @jest/core@29.7.0 deduped +│ │ ├── @jest/test-result@29.7.0 deduped +│ │ ├── @jest/types@29.6.3 deduped +│ │ ├── chalk@4.1.2 deduped +│ │ ├─┬ create-jest@29.7.0 +│ │ │ ├── @jest/types@29.6.3 deduped +│ │ │ ├── chalk@4.1.2 deduped +│ │ │ ├── exit@0.1.2 deduped +│ │ │ ├── graceful-fs@4.2.11 deduped +│ │ │ ├── jest-config@29.7.0 deduped +│ │ │ ├── jest-util@29.7.0 deduped +│ │ │ └─┬ prompts@2.4.2 +│ │ │ ├── kleur@3.0.3 +│ │ │ └── sisteransi@1.0.5 +│ │ ├── exit@0.1.2 deduped +│ │ ├── import-local@3.1.0 deduped +│ │ ├── jest-config@29.7.0 deduped +│ │ ├── jest-util@29.7.0 deduped +│ │ ├── jest-validate@29.7.0 deduped +│ │ ├── UNMET OPTIONAL DEPENDENCY node-notifier@^8.0.1 || ^9.0.0 || ^10.0.0 +│ │ └─┬ yargs@17.7.2 +│ │ ├─┬ cliui@8.0.1 +│ │ │ ├── string-width@4.2.3 deduped +│ │ │ ├── strip-ansi@6.0.1 deduped +│ │ │ └─┬ wrap-ansi@7.0.0 +│ │ │ ├── ansi-styles@4.3.0 deduped +│ │ │ ├── string-width@4.2.3 deduped +│ │ │ └── strip-ansi@6.0.1 deduped +│ │ ├── escalade@3.1.1 +│ │ ├── get-caller-file@2.0.5 +│ │ ├── require-directory@2.1.1 +│ │ ├─┬ string-width@4.2.3 +│ │ │ ├── emoji-regex@8.0.0 +│ │ │ ├── is-fullwidth-code-point@3.0.0 +│ │ │ └── strip-ansi@6.0.1 deduped +│ │ ├── y18n@5.0.8 +│ │ └── yargs-parser@21.1.1 deduped +│ └── UNMET OPTIONAL DEPENDENCY node-notifier@^8.0.1 || ^9.0.0 || ^10.0.0 +├─┬ js-yaml@4.1.0 +│ └── argparse@2.0.1 +├─┬ nock@13.3.8 +│ ├── debug@4.3.4 deduped +│ ├── json-stringify-safe@5.0.1 +│ └── propagate@2.0.1 +├── prettier@3.1.0 +├─┬ tar@6.2.0 +│ ├── chownr@2.0.0 +│ ├─┬ fs-minipass@2.1.0 +│ │ └─┬ minipass@3.3.6 +│ │ └── yallist@4.0.0 +│ ├── minipass@5.0.0 +│ ├─┬ minizlib@2.1.2 +│ │ ├─┬ minipass@3.3.6 +│ │ │ └── yallist@4.0.0 deduped +│ │ └── yallist@4.0.0 +│ ├── mkdirp@1.0.4 +│ └── yallist@4.0.0 +├─┬ ts-jest@29.1.1 +│ ├─┬ @babel/core@7.23.3 +│ │ ├─┬ @ampproject/remapping@2.2.1 +│ │ │ ├── @jridgewell/gen-mapping@0.3.3 deduped +│ │ │ └── @jridgewell/trace-mapping@0.3.20 deduped +│ │ ├── @babel/code-frame@7.23.4 deduped +│ │ ├── @babel/generator@7.23.4 deduped +│ │ ├─┬ @babel/helper-compilation-targets@7.22.15 +│ │ │ ├── @babel/compat-data@7.23.3 +│ │ │ ├── @babel/helper-validator-option@7.22.15 +│ │ │ ├── browserslist@4.22.1 deduped +│ │ │ ├─┬ lru-cache@5.1.1 +│ │ │ │ └── yallist@3.1.1 +│ │ │ └── semver@6.3.1 +│ │ ├─┬ @babel/helper-module-transforms@7.23.3 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ ├── @babel/helper-environment-visitor@7.22.20 +│ │ │ ├─┬ @babel/helper-module-imports@7.22.15 +│ │ │ │ └── @babel/types@7.23.4 deduped +│ │ │ ├─┬ @babel/helper-simple-access@7.22.5 +│ │ │ │ └── @babel/types@7.23.4 deduped +│ │ │ ├─┬ @babel/helper-split-export-declaration@7.22.6 +│ │ │ │ └── @babel/types@7.23.4 deduped +│ │ │ └── @babel/helper-validator-identifier@7.22.20 deduped +│ │ ├─┬ @babel/helpers@7.23.4 +│ │ │ ├── @babel/template@7.22.15 deduped +│ │ │ ├── @babel/traverse@7.23.4 deduped +│ │ │ └── @babel/types@7.23.4 deduped +│ │ ├── @babel/parser@7.23.4 +│ │ ├─┬ @babel/template@7.22.15 +│ │ │ ├── @babel/code-frame@7.23.4 deduped +│ │ │ ├── @babel/parser@7.23.4 deduped +│ │ │ └── @babel/types@7.23.4 deduped +│ │ ├─┬ @babel/traverse@7.23.4 +│ │ │ ├── @babel/code-frame@7.23.4 deduped +│ │ │ ├── @babel/generator@7.23.4 deduped +│ │ │ ├── @babel/helper-environment-visitor@7.22.20 deduped +│ │ │ ├─┬ @babel/helper-function-name@7.23.0 +│ │ │ │ ├── @babel/template@7.22.15 deduped +│ │ │ │ └── @babel/types@7.23.4 deduped +│ │ │ ├─┬ @babel/helper-hoist-variables@7.22.5 +│ │ │ │ └── @babel/types@7.23.4 deduped +│ │ │ ├── @babel/helper-split-export-declaration@7.22.6 deduped +│ │ │ ├── @babel/parser@7.23.4 deduped +│ │ │ ├── @babel/types@7.23.4 deduped +│ │ │ ├── debug@4.3.4 deduped +│ │ │ └── globals@11.12.0 +│ │ ├── @babel/types@7.23.4 deduped +│ │ ├── convert-source-map@2.0.0 +│ │ ├── debug@4.3.4 deduped +│ │ ├── gensync@1.0.0-beta.2 +│ │ ├── json5@2.2.3 deduped +│ │ └── semver@6.3.1 +│ ├── @jest/types@29.6.3 deduped +│ ├─┬ babel-jest@29.7.0 +│ │ ├── @babel/core@7.23.3 deduped +│ │ ├── @jest/transform@29.7.0 deduped +│ │ ├─┬ @types/babel__core@7.20.5 +│ │ │ ├── @babel/parser@7.23.4 deduped +│ │ │ ├── @babel/types@7.23.4 deduped +│ │ │ ├─┬ @types/babel__generator@7.6.7 +│ │ │ │ └── @babel/types@7.23.4 deduped +│ │ │ ├─┬ @types/babel__template@7.4.4 +│ │ │ │ ├── @babel/parser@7.23.4 deduped +│ │ │ │ └── @babel/types@7.23.4 deduped +│ │ │ └─┬ @types/babel__traverse@7.20.4 +│ │ │ └── @babel/types@7.23.4 deduped +│ │ ├─┬ babel-plugin-istanbul@6.1.1 +│ │ │ ├── @babel/helper-plugin-utils@7.22.5 deduped +│ │ │ ├─┬ @istanbuljs/load-nyc-config@1.1.0 +│ │ │ │ ├── camelcase@5.3.1 +│ │ │ │ ├─┬ find-up@4.1.0 +│ │ │ │ │ ├─┬ locate-path@5.0.0 +│ │ │ │ │ │ └─┬ p-locate@4.1.0 +│ │ │ │ │ │ └─┬ p-limit@2.3.0 +│ │ │ │ │ │ └── p-try@2.2.0 deduped +│ │ │ │ │ └── path-exists@4.0.0 deduped +│ │ │ │ ├── get-package-type@0.1.0 +│ │ │ │ ├─┬ js-yaml@3.14.1 +│ │ │ │ │ ├─┬ argparse@1.0.10 +│ │ │ │ │ │ └── sprintf-js@1.0.3 +│ │ │ │ │ └── esprima@4.0.1 +│ │ │ │ └── resolve-from@5.0.0 +│ │ │ ├── @istanbuljs/schema@0.1.3 +│ │ │ ├─┬ istanbul-lib-instrument@5.2.1 +│ │ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ │ ├── @babel/parser@7.23.4 deduped +│ │ │ │ ├── @istanbuljs/schema@0.1.3 deduped +│ │ │ │ ├── istanbul-lib-coverage@3.2.2 deduped +│ │ │ │ └── semver@6.3.1 +│ │ │ └─┬ test-exclude@6.0.0 +│ │ │ ├── @istanbuljs/schema@0.1.3 deduped +│ │ │ ├── glob@7.2.3 deduped +│ │ │ └── minimatch@3.1.2 deduped +│ │ ├─┬ babel-preset-jest@29.6.3 +│ │ │ ├── @babel/core@7.23.3 deduped +│ │ │ ├─┬ babel-plugin-jest-hoist@29.6.3 +│ │ │ │ ├── @babel/template@7.22.15 deduped +│ │ │ │ ├── @babel/types@7.23.4 deduped +│ │ │ │ ├── @types/babel__core@7.20.5 deduped +│ │ │ │ └── @types/babel__traverse@7.20.4 deduped +│ │ │ └── babel-preset-current-node-syntax@1.0.1 deduped +│ │ ├── chalk@4.1.2 deduped +│ │ ├── graceful-fs@4.2.11 deduped +│ │ └── slash@3.0.0 deduped +│ ├─┬ bs-logger@0.2.6 +│ │ └── fast-json-stable-stringify@2.1.0 deduped +│ ├── fast-json-stable-stringify@2.1.0 +│ ├── jest-util@29.7.0 deduped +│ ├── jest@29.7.0 deduped +│ ├── json5@2.2.3 +│ ├── lodash.memoize@4.1.2 +│ ├── make-error@1.3.6 +│ ├── semver@7.5.4 deduped +│ ├── typescript@5.3.2 deduped +│ └── yargs-parser@21.1.1 +├─┬ typed-rest-client@1.8.11 +│ ├─┬ qs@6.11.2 +│ │ └─┬ side-channel@1.0.4 +│ │ ├── call-bind@1.0.5 deduped +│ │ ├── get-intrinsic@1.2.2 deduped +│ │ └── object-inspect@1.13.1 +│ ├── tunnel@0.0.6 +│ └── underscore@1.13.6 +├── typescript@5.3.2 +└─┬ unzipper@0.10.14 + ├── big-integer@1.6.52 + ├─┬ binary@0.3.0 + │ ├── buffers@0.1.1 + │ └─┬ chainsaw@0.1.0 + │ └── traverse@0.3.9 + ├── bluebird@3.4.7 + ├── buffer-indexof-polyfill@1.0.2 + ├─┬ duplexer2@0.1.4 + │ └── readable-stream@2.3.8 deduped + ├─┬ fstream@1.0.12 + │ ├── graceful-fs@4.2.11 deduped + │ ├── inherits@2.0.4 + │ ├─┬ mkdirp@0.5.6 + │ │ └── minimist@1.2.8 deduped + │ └─┬ rimraf@2.7.1 + │ └── glob@7.2.3 deduped + ├── graceful-fs@4.2.11 + ├── listenercount@1.0.1 + ├─┬ readable-stream@2.3.8 + │ ├── core-util-is@1.0.3 + │ ├── inherits@2.0.4 deduped + │ ├── isarray@1.0.0 + │ ├── process-nextick-args@2.0.1 + │ ├── safe-buffer@5.1.2 + │ ├─┬ string_decoder@1.1.1 + │ │ └── safe-buffer@5.1.2 deduped + │ └── util-deprecate@1.0.2 + └── setimmediate@1.0.5 + diff --git a/dist/index.js b/dist/index.js index 0fd2136b..0e2547d8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1020,7 +1020,7 @@ class OidcClient { .catch(error => { throw new Error(`Failed to get ID Token. \n Error Code : ${error.statusCode}\n - Error Message: ${error.result.message}`); + Error Message: ${error.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { @@ -1552,7 +1552,11 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /* eslint-disable @typescript-eslint/no-explicit-any */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -1565,7 +1569,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -1584,6 +1588,7 @@ const http = __importStar(__nccwpck_require__(3685)); const https = __importStar(__nccwpck_require__(5687)); const pm = __importStar(__nccwpck_require__(9835)); const tunnel = __importStar(__nccwpck_require__(4294)); +const undici_1 = __nccwpck_require__(1773); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -1613,16 +1618,16 @@ var HttpCodes; HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +})(HttpCodes || (exports.HttpCodes = HttpCodes = {})); var Headers; (function (Headers) { Headers["Accept"] = "accept"; Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); +})(Headers || (exports.Headers = Headers = {})); var MediaTypes; (function (MediaTypes) { MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +})(MediaTypes || (exports.MediaTypes = MediaTypes = {})); /** * Returns the proxy URL, depending upon the supplied url and proxy environment variables. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com @@ -1673,6 +1678,19 @@ class HttpClientResponse { })); }); } + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on('data', (chunk) => { + chunks.push(chunk); + }); + this.message.on('end', () => { + resolve(Buffer.concat(chunks)); + }); + })); + }); + } } exports.HttpClientResponse = HttpClientResponse; function isHttps(requestUrl) { @@ -1978,6 +1996,15 @@ class HttpClient { const parsedUrl = new URL(serverUrl); return this._getAgent(parsedUrl); } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } _prepareRequest(method, requestUrl, headers) { const info = {}; info.parsedUrl = requestUrl; @@ -2077,6 +2104,30 @@ class HttpClient { } return agent; } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + // if agent is already assigned use that agent. + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { + token: `${proxyUrl.username}:${proxyUrl.password}` + }))); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } _performExponentialBackoff(retryNumber) { return __awaiter(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); @@ -2177,7 +2228,13 @@ function getProxyUrl(reqUrl) { } })(); if (proxyVar) { - return new URL(proxyVar); + try { + return new URL(proxyVar); + } + catch (_a) { + if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) + return new URL(`http://${proxyVar}`); + } } else { return undefined; @@ -4130,7 +4187,7 @@ var bigInt = (function (undefined) { BigInteger.prototype.toString = function (radix, alphabet) { if (radix === undefined) radix = 10; - if (radix !== 10) return toBaseString(this, radix, alphabet); + if (radix !== 10 || alphabet) return toBaseString(this, radix, alphabet); var v = this.value, l = v.length, str = String(v[--l]), zeros = "0000000", digit; while (--l >= 0) { digit = String(v[l]); @@ -4142,7 +4199,7 @@ var bigInt = (function (undefined) { SmallInteger.prototype.toString = function (radix, alphabet) { if (radix === undefined) radix = 10; - if (radix != 10) return toBaseString(this, radix, alphabet); + if (radix != 10 || alphabet) return toBaseString(this, radix, alphabet); return String(this.value); }; @@ -11081,12 +11138,13 @@ module.exports = function callBoundIntrinsic(name, allowMissing) { var bind = __nccwpck_require__(8334); var GetIntrinsic = __nccwpck_require__(4538); +var setFunctionLength = __nccwpck_require__(4056); +var $TypeError = GetIntrinsic('%TypeError%'); var $apply = GetIntrinsic('%Function.prototype.apply%'); var $call = GetIntrinsic('%Function.prototype.call%'); var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); var $max = GetIntrinsic('%Math.max%'); @@ -11100,19 +11158,15 @@ if ($defineProperty) { } module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty( - func, - 'length', - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); } - return func; + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); }; var applyBind = function applyBind() { @@ -11587,6 +11641,82 @@ function objectToString(o) { } +/***/ }), + +/***/ 4564: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var hasPropertyDescriptors = __nccwpck_require__(176)(); + +var GetIntrinsic = __nccwpck_require__(4538); + +var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var gopd = __nccwpck_require__(8501); + +/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + + /***/ }), /***/ 1932: @@ -15687,43 +15817,75 @@ function rmkidsSync (p, options) { /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; var toStr = Object.prototype.toString; +var max = Math.max; var funcType = '[object Function]'; +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + module.exports = function bind(that) { var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } - var args = slice.call(arguments, 1); + var args = slicy(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, - args.concat(slice.call(arguments)) + concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); } + return target.apply( + that, + concatty(args, arguments) + ); + }; - var boundLength = Math.max(0, target.length - args.length); + var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); + boundArgs[i] = '$' + i; } - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; @@ -15800,18 +15962,23 @@ var ThrowTypeError = $gOPD : throwTypeError; var hasSymbols = __nccwpck_require__(587)(); +var hasProto = __nccwpck_require__(5894)(); -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); var needsEval = {}; -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); var INTRINSICS = { '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, '%Array%': Array, '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, '%AsyncFunction%': needsEval, '%AsyncGenerator%': needsEval, @@ -15841,10 +16008,10 @@ var INTRINSICS = { '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '%isFinite%': isFinite, '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, '%JSON%': typeof JSON === 'object' ? JSON : undefined, '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), '%Math%': Math, '%Number%': Number, '%Object%': Object, @@ -15857,10 +16024,10 @@ var INTRINSICS = { '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '%RegExp%': RegExp, '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, '%Symbol%': hasSymbols ? Symbol : undefined, '%SyntaxError%': $SyntaxError, '%ThrowTypeError%': ThrowTypeError, @@ -15876,12 +16043,14 @@ var INTRINSICS = { '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet }; -try { - null.error; // eslint-disable-line no-unused-expressions -} catch (e) { - // /~https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // /~https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } } var doEval = function doEval(name) { @@ -15899,7 +16068,7 @@ var doEval = function doEval(name) { } } else if (name === '%AsyncIteratorPrototype%') { var gen = doEval('%AsyncGenerator%'); - if (gen) { + if (gen && getProto) { value = getProto(gen.prototype); } } @@ -15964,7 +16133,7 @@ var LEGACY_ALIASES = { }; var bind = __nccwpck_require__(8334); -var hasOwn = __nccwpck_require__(6339); +var hasOwn = __nccwpck_require__(2157); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); @@ -17636,6 +17805,30 @@ GlobSync.prototype._makeAbs = function (f) { } +/***/ }), + +/***/ 8501: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(4538); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + /***/ }), /***/ 7356: @@ -18609,6 +18802,66 @@ function patch (fs) { } +/***/ }), + +/***/ 176: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(4538); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 5894: +/***/ ((module) => { + +"use strict"; + + +var test = { + foo: {} +}; + +var $Object = Object; + +module.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); +}; + + /***/ }), /***/ 587: @@ -18682,15 +18935,18 @@ module.exports = function hasSymbols() { /***/ }), -/***/ 6339: +/***/ 2157: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; var bind = __nccwpck_require__(8334); -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); /***/ }), @@ -19784,222 +20040,653 @@ function regExpEscape (s) { /***/ }), -/***/ 1077: +/***/ 6769: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +// Update with any zlib constants that are added or changed in the future. +// Node v6 didn't export this, so we just hard code the version and rely +// on all the other hard-coded values from zlib v4736. When node v6 +// support drops, we can just export the realZlibConstants object. +const realZlibConstants = (__nccwpck_require__(9796).constants) || + /* istanbul ignore next */ { ZLIB_VERNUM: 4736 } -const proc = - typeof process === 'object' && process - ? process - : { - stdout: null, - stderr: null, - } -const EE = __nccwpck_require__(2361) -const Stream = __nccwpck_require__(2781) -const stringdecoder = __nccwpck_require__(1576) -const SD = stringdecoder.StringDecoder +module.exports = Object.freeze(Object.assign(Object.create(null), { + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + Z_VERSION_ERROR: -6, + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + DEFLATE: 1, + INFLATE: 2, + GZIP: 3, + GUNZIP: 4, + DEFLATERAW: 5, + INFLATERAW: 6, + UNZIP: 7, + BROTLI_DECODE: 8, + BROTLI_ENCODE: 9, + Z_MIN_WINDOWBITS: 8, + Z_MAX_WINDOWBITS: 15, + Z_DEFAULT_WINDOWBITS: 15, + Z_MIN_CHUNK: 64, + Z_MAX_CHUNK: Infinity, + Z_DEFAULT_CHUNK: 16384, + Z_MIN_MEMLEVEL: 1, + Z_MAX_MEMLEVEL: 9, + Z_DEFAULT_MEMLEVEL: 8, + Z_MIN_LEVEL: -1, + Z_MAX_LEVEL: 9, + Z_DEFAULT_LEVEL: -1, + BROTLI_OPERATION_PROCESS: 0, + BROTLI_OPERATION_FLUSH: 1, + BROTLI_OPERATION_FINISH: 2, + BROTLI_OPERATION_EMIT_METADATA: 3, + BROTLI_MODE_GENERIC: 0, + BROTLI_MODE_TEXT: 1, + BROTLI_MODE_FONT: 2, + BROTLI_DEFAULT_MODE: 0, + BROTLI_MIN_QUALITY: 0, + BROTLI_MAX_QUALITY: 11, + BROTLI_DEFAULT_QUALITY: 11, + BROTLI_MIN_WINDOW_BITS: 10, + BROTLI_MAX_WINDOW_BITS: 24, + BROTLI_LARGE_MAX_WINDOW_BITS: 30, + BROTLI_DEFAULT_WINDOW: 22, + BROTLI_MIN_INPUT_BLOCK_BITS: 16, + BROTLI_MAX_INPUT_BLOCK_BITS: 24, + BROTLI_PARAM_MODE: 0, + BROTLI_PARAM_QUALITY: 1, + BROTLI_PARAM_LGWIN: 2, + BROTLI_PARAM_LGBLOCK: 3, + BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, + BROTLI_PARAM_SIZE_HINT: 5, + BROTLI_PARAM_LARGE_WINDOW: 6, + BROTLI_PARAM_NPOSTFIX: 7, + BROTLI_PARAM_NDIRECT: 8, + BROTLI_DECODER_RESULT_ERROR: 0, + BROTLI_DECODER_RESULT_SUCCESS: 1, + BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, + BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, + BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, + BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, + BROTLI_DECODER_NO_ERROR: 0, + BROTLI_DECODER_SUCCESS: 1, + BROTLI_DECODER_NEEDS_MORE_INPUT: 2, + BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, + BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, + BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, + BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, + BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, + BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, + BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, + BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, + BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, + BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, + BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, + BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, + BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, + BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, + BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, + BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, + BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, + BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, + BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, + BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, + BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, + BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, + BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, + BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, + BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, + BROTLI_DECODER_ERROR_UNREACHABLE: -31, +}, realZlibConstants)) -const EOF = Symbol('EOF') -const MAYBE_EMIT_END = Symbol('maybeEmitEnd') -const EMITTED_END = Symbol('emittedEnd') -const EMITTING_END = Symbol('emittingEnd') -const EMITTED_ERROR = Symbol('emittedError') -const CLOSED = Symbol('closed') -const READ = Symbol('read') -const FLUSH = Symbol('flush') -const FLUSHCHUNK = Symbol('flushChunk') -const ENCODING = Symbol('encoding') -const DECODER = Symbol('decoder') -const FLOWING = Symbol('flowing') -const PAUSED = Symbol('paused') -const RESUME = Symbol('resume') -const BUFFER = Symbol('buffer') -const PIPES = Symbol('pipes') -const BUFFERLENGTH = Symbol('bufferLength') -const BUFFERPUSH = Symbol('bufferPush') -const BUFFERSHIFT = Symbol('bufferShift') -const OBJECTMODE = Symbol('objectMode') -// internal event when stream is destroyed -const DESTROYED = Symbol('destroyed') -// internal event when stream has an error -const ERROR = Symbol('error') -const EMITDATA = Symbol('emitData') -const EMITEND = Symbol('emitEnd') -const EMITEND2 = Symbol('emitEnd2') -const ASYNC = Symbol('async') -const ABORT = Symbol('abort') -const ABORTED = Symbol('aborted') -const SIGNAL = Symbol('signal') -const defer = fn => Promise.resolve().then(fn) +/***/ }), -// TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = - (doIter && Symbol.asyncIterator) || Symbol('asyncIterator not implemented') -const ITERATOR = - (doIter && Symbol.iterator) || Symbol('iterator not implemented') +/***/ 3486: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// events that mean 'the stream is over' -// these are treated specially, and re-emitted -// if they are listened for after emitting. -const isEndish = ev => ev === 'end' || ev === 'finish' || ev === 'prefinish' +"use strict"; -const isArrayBuffer = b => - b instanceof ArrayBuffer || - (typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0) -const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) +const assert = __nccwpck_require__(9491) +const Buffer = (__nccwpck_require__(4300).Buffer) +const realZlib = __nccwpck_require__(9796) -class Pipe { - constructor(src, dest, opts) { - this.src = src - this.dest = dest - this.opts = opts - this.ondrain = () => src[RESUME]() - dest.on('drain', this.ondrain) - } - unpipe() { - this.dest.removeListener('drain', this.ondrain) - } - // istanbul ignore next - only here for the prototype - proxyErrors() {} - end() { - this.unpipe() - if (this.opts.end) this.dest.end() - } -} +const constants = exports.constants = __nccwpck_require__(6769) +const Minipass = __nccwpck_require__(7557) -class PipeProxyErrors extends Pipe { - unpipe() { - this.src.removeListener('error', this.proxyErrors) - super.unpipe() +const OriginalBufferConcat = Buffer.concat + +const _superWrite = Symbol('_superWrite') +class ZlibError extends Error { + constructor (err) { + super('zlib: ' + err.message) + this.code = err.code + this.errno = err.errno + /* istanbul ignore if */ + if (!this.code) + this.code = 'ZLIB_ERROR' + + this.message = 'zlib: ' + err.message + Error.captureStackTrace(this, this.constructor) } - constructor(src, dest, opts) { - super(src, dest, opts) - this.proxyErrors = er => dest.emit('error', er) - src.on('error', this.proxyErrors) + + get name () { + return 'ZlibError' } } -class Minipass extends Stream { - constructor(options) { - super() - this[FLOWING] = false - // whether we're explicitly paused - this[PAUSED] = false - this[PIPES] = [] - this[BUFFER] = [] - this[OBJECTMODE] = (options && options.objectMode) || false - if (this[OBJECTMODE]) this[ENCODING] = null - else this[ENCODING] = (options && options.encoding) || null - if (this[ENCODING] === 'buffer') this[ENCODING] = null - this[ASYNC] = (options && !!options.async) || false - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null - this[EOF] = false - this[EMITTED_END] = false - this[EMITTING_END] = false - this[CLOSED] = false - this[EMITTED_ERROR] = null - this.writable = true - this.readable = true - this[BUFFERLENGTH] = 0 - this[DESTROYED] = false - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] }) - } - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, 'pipes', { get: () => this[PIPES] }) - } - this[SIGNAL] = options && options.signal - this[ABORTED] = false - if (this[SIGNAL]) { - this[SIGNAL].addEventListener('abort', () => this[ABORT]()) - if (this[SIGNAL].aborted) { - this[ABORT]() - } - } - } +// the Zlib class they all inherit from +// This thing manages the queue of requests, and returns +// true or false if there is anything in the queue when +// you call the .write() method. +const _opts = Symbol('opts') +const _flushFlag = Symbol('flushFlag') +const _finishFlushFlag = Symbol('finishFlushFlag') +const _fullFlushFlag = Symbol('fullFlushFlag') +const _handle = Symbol('handle') +const _onError = Symbol('onError') +const _sawError = Symbol('sawError') +const _level = Symbol('level') +const _strategy = Symbol('strategy') +const _ended = Symbol('ended') +const _defaultFullFlush = Symbol('_defaultFullFlush') - get bufferLength() { - return this[BUFFERLENGTH] - } +class ZlibBase extends Minipass { + constructor (opts, mode) { + if (!opts || typeof opts !== 'object') + throw new TypeError('invalid options for ZlibBase constructor') - get encoding() { - return this[ENCODING] - } - set encoding(enc) { - if (this[OBJECTMODE]) throw new Error('cannot set encoding in objectMode') + super(opts) + this[_sawError] = false + this[_ended] = false + this[_opts] = opts - if ( - this[ENCODING] && - enc !== this[ENCODING] && - ((this[DECODER] && this[DECODER].lastNeed) || this[BUFFERLENGTH]) - ) - throw new Error('cannot change encoding') + this[_flushFlag] = opts.flush + this[_finishFlushFlag] = opts.finishFlush + // this will throw if any options are invalid for the class selected + try { + this[_handle] = new realZlib[mode](opts) + } catch (er) { + // make sure that all errors get decorated properly + throw new ZlibError(er) + } - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null - if (this[BUFFER].length) - this[BUFFER] = this[BUFFER].map(chunk => this[DECODER].write(chunk)) + this[_onError] = (err) => { + // no sense raising multiple errors, since we abort on the first one. + if (this[_sawError]) + return + + this[_sawError] = true + + // there is no way to cleanly recover. + // continuing only obscures problems. + this.close() + this.emit('error', err) } - this[ENCODING] = enc + this[_handle].on('error', er => this[_onError](new ZlibError(er))) + this.once('end', () => this.close) } - setEncoding(enc) { - this.encoding = enc + close () { + if (this[_handle]) { + this[_handle].close() + this[_handle] = null + this.emit('close') + } } - get objectMode() { - return this[OBJECTMODE] - } - set objectMode(om) { - this[OBJECTMODE] = this[OBJECTMODE] || !!om + reset () { + if (!this[_sawError]) { + assert(this[_handle], 'zlib binding closed') + return this[_handle].reset() + } } - get ['async']() { - return this[ASYNC] - } - set ['async'](a) { - this[ASYNC] = this[ASYNC] || !!a - } + flush (flushFlag) { + if (this.ended) + return - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true - this.emit('abort', this[SIGNAL].reason) - this.destroy(this[SIGNAL].reason) + if (typeof flushFlag !== 'number') + flushFlag = this[_fullFlushFlag] + this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag })) } - get aborted() { - return this[ABORTED] + end (chunk, encoding, cb) { + if (chunk) + this.write(chunk, encoding) + this.flush(this[_finishFlushFlag]) + this[_ended] = true + return super.end(null, null, cb) } - set aborted(_) {} - write(chunk, encoding, cb) { - if (this[ABORTED]) return false - if (this[EOF]) throw new Error('write after end') + get ended () { + return this[_ended] + } + + write (chunk, encoding, cb) { + // process the chunk using the sync process + // then super.write() all the outputted chunks + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (typeof chunk === 'string') + chunk = Buffer.from(chunk, encoding) + + if (this[_sawError]) + return + assert(this[_handle], 'zlib binding closed') + + // _processChunk tries to .close() the native handle after it's done, so we + // intercept that by temporarily making it a no-op. + const nativeHandle = this[_handle]._handle + const originalNativeClose = nativeHandle.close + nativeHandle.close = () => {} + const originalClose = this[_handle].close + this[_handle].close = () => {} + // It also calls `Buffer.concat()` at the end, which may be convenient + // for some, but which we are not interested in as it slows us down. + Buffer.concat = (args) => args + let result + try { + const flushFlag = typeof chunk[_flushFlag] === 'number' + ? chunk[_flushFlag] : this[_flushFlag] + result = this[_handle]._processChunk(chunk, flushFlag) + // if we don't throw, reset it back how it was + Buffer.concat = OriginalBufferConcat + } catch (err) { + // or if we do, put Buffer.concat() back before we emit error + // Error events call into user code, which may call Buffer.concat() + Buffer.concat = OriginalBufferConcat + this[_onError](new ZlibError(err)) + } finally { + if (this[_handle]) { + // Core zlib resets `_handle` to null after attempting to close the + // native handle. Our no-op handler prevented actual closure, but we + // need to restore the `._handle` property. + this[_handle]._handle = nativeHandle + nativeHandle.close = originalNativeClose + this[_handle].close = originalClose + // `_processChunk()` adds an 'error' listener. If we don't remove it + // after each call, these handlers start piling up. + this[_handle].removeAllListeners('error') + // make sure OUR error listener is still attached tho + } + } + + if (this[_handle]) + this[_handle].on('error', er => this[_onError](new ZlibError(er))) + + let writeReturn + if (result) { + if (Array.isArray(result) && result.length > 0) { + // The first buffer is always `handle._outBuffer`, which would be + // re-used for later invocations; so, we always have to copy that one. + writeReturn = this[_superWrite](Buffer.from(result[0])) + for (let i = 1; i < result.length; i++) { + writeReturn = this[_superWrite](result[i]) + } + } else { + writeReturn = this[_superWrite](Buffer.from(result)) + } + } + + if (cb) + cb() + return writeReturn + } + + [_superWrite] (data) { + return super.write(data) + } +} + +class Zlib extends ZlibBase { + constructor (opts, mode) { + opts = opts || {} + + opts.flush = opts.flush || constants.Z_NO_FLUSH + opts.finishFlush = opts.finishFlush || constants.Z_FINISH + super(opts, mode) + + this[_fullFlushFlag] = constants.Z_FULL_FLUSH + this[_level] = opts.level + this[_strategy] = opts.strategy + } + + params (level, strategy) { + if (this[_sawError]) + return + + if (!this[_handle]) + throw new Error('cannot switch params when binding is closed') + + // no way to test this without also not supporting params at all + /* istanbul ignore if */ + if (!this[_handle].params) + throw new Error('not supported in this implementation') + + if (this[_level] !== level || this[_strategy] !== strategy) { + this.flush(constants.Z_SYNC_FLUSH) + assert(this[_handle], 'zlib binding closed') + // .params() calls .flush(), but the latter is always async in the + // core zlib. We override .flush() temporarily to intercept that and + // flush synchronously. + const origFlush = this[_handle].flush + this[_handle].flush = (flushFlag, cb) => { + this.flush(flushFlag) + cb() + } + try { + this[_handle].params(level, strategy) + } finally { + this[_handle].flush = origFlush + } + /* istanbul ignore else */ + if (this[_handle]) { + this[_level] = level + this[_strategy] = strategy + } + } + } +} + +// minimal 2-byte header +class Deflate extends Zlib { + constructor (opts) { + super(opts, 'Deflate') + } +} + +class Inflate extends Zlib { + constructor (opts) { + super(opts, 'Inflate') + } +} + +// gzip - bigger header, same deflate compression +const _portable = Symbol('_portable') +class Gzip extends Zlib { + constructor (opts) { + super(opts, 'Gzip') + this[_portable] = opts && !!opts.portable + } + + [_superWrite] (data) { + if (!this[_portable]) + return super[_superWrite](data) + + // we'll always get the header emitted in one first chunk + // overwrite the OS indicator byte with 0xFF + this[_portable] = false + data[9] = 255 + return super[_superWrite](data) + } +} + +class Gunzip extends Zlib { + constructor (opts) { + super(opts, 'Gunzip') + } +} + +// raw - no header +class DeflateRaw extends Zlib { + constructor (opts) { + super(opts, 'DeflateRaw') + } +} + +class InflateRaw extends Zlib { + constructor (opts) { + super(opts, 'InflateRaw') + } +} + +// auto-detect header. +class Unzip extends Zlib { + constructor (opts) { + super(opts, 'Unzip') + } +} + +class Brotli extends ZlibBase { + constructor (opts, mode) { + opts = opts || {} + + opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS + opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH + + super(opts, mode) + + this[_fullFlushFlag] = constants.BROTLI_OPERATION_FLUSH + } +} + +class BrotliCompress extends Brotli { + constructor (opts) { + super(opts, 'BrotliCompress') + } +} + +class BrotliDecompress extends Brotli { + constructor (opts) { + super(opts, 'BrotliDecompress') + } +} + +exports.Deflate = Deflate +exports.Inflate = Inflate +exports.Gzip = Gzip +exports.Gunzip = Gunzip +exports.DeflateRaw = DeflateRaw +exports.InflateRaw = InflateRaw +exports.Unzip = Unzip +/* istanbul ignore else */ +if (typeof realZlib.BrotliCompress === 'function') { + exports.BrotliCompress = BrotliCompress + exports.BrotliDecompress = BrotliDecompress +} else { + exports.BrotliCompress = exports.BrotliDecompress = class { + constructor () { + throw new Error('Brotli is not supported in this version of Node.js') + } + } +} + + +/***/ }), + +/***/ 7557: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const proc = typeof process === 'object' && process ? process : { + stdout: null, + stderr: null, +} +const EE = __nccwpck_require__(2361) +const Stream = __nccwpck_require__(2781) +const SD = (__nccwpck_require__(1576).StringDecoder) + +const EOF = Symbol('EOF') +const MAYBE_EMIT_END = Symbol('maybeEmitEnd') +const EMITTED_END = Symbol('emittedEnd') +const EMITTING_END = Symbol('emittingEnd') +const EMITTED_ERROR = Symbol('emittedError') +const CLOSED = Symbol('closed') +const READ = Symbol('read') +const FLUSH = Symbol('flush') +const FLUSHCHUNK = Symbol('flushChunk') +const ENCODING = Symbol('encoding') +const DECODER = Symbol('decoder') +const FLOWING = Symbol('flowing') +const PAUSED = Symbol('paused') +const RESUME = Symbol('resume') +const BUFFERLENGTH = Symbol('bufferLength') +const BUFFERPUSH = Symbol('bufferPush') +const BUFFERSHIFT = Symbol('bufferShift') +const OBJECTMODE = Symbol('objectMode') +const DESTROYED = Symbol('destroyed') +const EMITDATA = Symbol('emitData') +const EMITEND = Symbol('emitEnd') +const EMITEND2 = Symbol('emitEnd2') +const ASYNC = Symbol('async') + +const defer = fn => Promise.resolve().then(fn) + +// TODO remove when Node v8 support drops +const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = doIter && Symbol.asyncIterator + || Symbol('asyncIterator not implemented') +const ITERATOR = doIter && Symbol.iterator + || Symbol('iterator not implemented') + +// events that mean 'the stream is over' +// these are treated specially, and re-emitted +// if they are listened for after emitting. +const isEndish = ev => + ev === 'end' || + ev === 'finish' || + ev === 'prefinish' + +const isArrayBuffer = b => b instanceof ArrayBuffer || + typeof b === 'object' && + b.constructor && + b.constructor.name === 'ArrayBuffer' && + b.byteLength >= 0 + +const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) + +class Pipe { + constructor (src, dest, opts) { + this.src = src + this.dest = dest + this.opts = opts + this.ondrain = () => src[RESUME]() + dest.on('drain', this.ondrain) + } + unpipe () { + this.dest.removeListener('drain', this.ondrain) + } + // istanbul ignore next - only here for the prototype + proxyErrors () {} + end () { + this.unpipe() + if (this.opts.end) + this.dest.end() + } +} + +class PipeProxyErrors extends Pipe { + unpipe () { + this.src.removeListener('error', this.proxyErrors) + super.unpipe() + } + constructor (src, dest, opts) { + super(src, dest, opts) + this.proxyErrors = er => dest.emit('error', er) + src.on('error', this.proxyErrors) + } +} + +module.exports = class Minipass extends Stream { + constructor (options) { + super() + this[FLOWING] = false + // whether we're explicitly paused + this[PAUSED] = false + this.pipes = [] + this.buffer = [] + this[OBJECTMODE] = options && options.objectMode || false + if (this[OBJECTMODE]) + this[ENCODING] = null + else + this[ENCODING] = options && options.encoding || null + if (this[ENCODING] === 'buffer') + this[ENCODING] = null + this[ASYNC] = options && !!options.async || false + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null + this[EOF] = false + this[EMITTED_END] = false + this[EMITTING_END] = false + this[CLOSED] = false + this[EMITTED_ERROR] = null + this.writable = true + this.readable = true + this[BUFFERLENGTH] = 0 + this[DESTROYED] = false + } + + get bufferLength () { return this[BUFFERLENGTH] } + + get encoding () { return this[ENCODING] } + set encoding (enc) { + if (this[OBJECTMODE]) + throw new Error('cannot set encoding in objectMode') + + if (this[ENCODING] && enc !== this[ENCODING] && + (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error('cannot change encoding') + + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null + if (this.buffer.length) + this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) + } + + this[ENCODING] = enc + } + + setEncoding (enc) { + this.encoding = enc + } + + get objectMode () { return this[OBJECTMODE] } + set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } + + get ['async'] () { return this[ASYNC] } + set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a } + + write (chunk, encoding, cb) { + if (this[EOF]) + throw new Error('write after end') if (this[DESTROYED]) { - this.emit( - 'error', - Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - ) - ) + this.emit('error', Object.assign( + new Error('Cannot call write after a stream was destroyed'), + { code: 'ERR_STREAM_DESTROYED' } + )) return true } - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' - if (!encoding) encoding = 'utf8' + if (!encoding) + encoding = 'utf8' const fn = this[ASYNC] ? defer : f => f() @@ -20010,7 +20697,8 @@ class Minipass extends Stream { if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { if (isArrayBufferView(chunk)) chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk) + else if (isArrayBuffer(chunk)) + chunk = Buffer.from(chunk) else if (typeof chunk !== 'string') // use the setter so we throw if we have encoding set this.objectMode = true @@ -20020,14 +20708,19 @@ class Minipass extends Stream { // this yields better performance, fewer checks later. if (this[OBJECTMODE]) { /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) + if (this.flowing && this[BUFFERLENGTH] !== 0) + this[FLUSH](true) - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) + if (this.flowing) + this.emit('data', chunk) + else + this[BUFFERPUSH](chunk) - if (this[BUFFERLENGTH] !== 0) this.emit('readable') + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') - if (cb) fn(cb) + if (cb) + fn(cb) return this.flowing } @@ -20035,18 +20728,18 @@ class Minipass extends Stream { // at this point the chunk is a buffer or string // don't buffer it up or send it to the decoder if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - if (cb) fn(cb) + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + if (cb) + fn(cb) return this.flowing } // fast-path writing strings of same encoding to a stream with // an empty buffer, skipping the buffer/decoder dance - if ( - typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed) - ) { + if (typeof chunk === 'string' && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { chunk = Buffer.from(chunk, encoding) } @@ -20054,58 +20747,73 @@ class Minipass extends Stream { chunk = this[DECODER].write(chunk) // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) + if (this.flowing && this[BUFFERLENGTH] !== 0) + this[FLUSH](true) - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) + if (this.flowing) + this.emit('data', chunk) + else + this[BUFFERPUSH](chunk) - if (this[BUFFERLENGTH] !== 0) this.emit('readable') + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') - if (cb) fn(cb) + if (cb) + fn(cb) return this.flowing } - read(n) { - if (this[DESTROYED]) return null + read (n) { + if (this[DESTROYED]) + return null if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { this[MAYBE_EMIT_END]() return null } - if (this[OBJECTMODE]) n = null + if (this[OBJECTMODE]) + n = null - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - if (this.encoding) this[BUFFER] = [this[BUFFER].join('')] - else this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])] + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = [this.buffer.join('')] + else + this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])] } - const ret = this[READ](n || null, this[BUFFER][0]) + const ret = this[READ](n || null, this.buffer[0]) this[MAYBE_EMIT_END]() return ret } - [READ](n, chunk) { - if (n === chunk.length || n === null) this[BUFFERSHIFT]() + [READ] (n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT]() else { - this[BUFFER][0] = chunk.slice(n) + this.buffer[0] = chunk.slice(n) chunk = chunk.slice(0, n) this[BUFFERLENGTH] -= n } this.emit('data', chunk) - if (!this[BUFFER].length && !this[EOF]) this.emit('drain') + if (!this.buffer.length && !this[EOF]) + this.emit('drain') return chunk } - end(chunk, encoding, cb) { - if (typeof chunk === 'function') (cb = chunk), (chunk = null) - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - if (chunk) this.write(chunk, encoding) - if (cb) this.once('end', cb) + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + if (cb) + this.once('end', cb) this[EOF] = true this.writable = false @@ -20113,165 +20821,176 @@ class Minipass extends Stream { // even if we're not reading. // we'll re-emit if a new 'end' listener is added anyway. // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) this[MAYBE_EMIT_END]() + if (this.flowing || !this[PAUSED]) + this[MAYBE_EMIT_END]() return this } // don't let the internal resume be overwritten - [RESUME]() { - if (this[DESTROYED]) return + [RESUME] () { + if (this[DESTROYED]) + return this[PAUSED] = false this[FLOWING] = true this.emit('resume') - if (this[BUFFER].length) this[FLUSH]() - else if (this[EOF]) this[MAYBE_EMIT_END]() - else this.emit('drain') + if (this.buffer.length) + this[FLUSH]() + else if (this[EOF]) + this[MAYBE_EMIT_END]() + else + this.emit('drain') } - resume() { + resume () { return this[RESUME]() } - pause() { + pause () { this[FLOWING] = false this[PAUSED] = true } - get destroyed() { + get destroyed () { return this[DESTROYED] } - get flowing() { + get flowing () { return this[FLOWING] } - get paused() { + get paused () { return this[PAUSED] } - [BUFFERPUSH](chunk) { - if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1 - else this[BUFFERLENGTH] += chunk.length - this[BUFFER].push(chunk) + [BUFFERPUSH] (chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1 + else + this[BUFFERLENGTH] += chunk.length + this.buffer.push(chunk) } - [BUFFERSHIFT]() { - if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1 - else this[BUFFERLENGTH] -= this[BUFFER][0].length - return this[BUFFER].shift() + [BUFFERSHIFT] () { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1 + else + this[BUFFERLENGTH] -= this.buffer[0].length + } + return this.buffer.shift() } - [FLUSH](noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length) + [FLUSH] (noDrain) { + do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) - if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain') + if (!noDrain && !this.buffer.length && !this[EOF]) + this.emit('drain') } - [FLUSHCHUNK](chunk) { - this.emit('data', chunk) - return this.flowing + [FLUSHCHUNK] (chunk) { + return chunk ? (this.emit('data', chunk), this.flowing) : false } - pipe(dest, opts) { - if (this[DESTROYED]) return + pipe (dest, opts) { + if (this[DESTROYED]) + return const ended = this[EMITTED_END] opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) opts.end = false - else opts.end = opts.end !== false + if (dest === proc.stdout || dest === proc.stderr) + opts.end = false + else + opts.end = opts.end !== false opts.proxyErrors = !!opts.proxyErrors // piping an ended stream ends immediately if (ended) { - if (opts.end) dest.end() + if (opts.end) + dest.end() } else { - this[PIPES].push( - !opts.proxyErrors - ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts) - ) - if (this[ASYNC]) defer(() => this[RESUME]()) - else this[RESUME]() + this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) + : new PipeProxyErrors(this, dest, opts)) + if (this[ASYNC]) + defer(() => this[RESUME]()) + else + this[RESUME]() } return dest } - unpipe(dest) { - const p = this[PIPES].find(p => p.dest === dest) + unpipe (dest) { + const p = this.pipes.find(p => p.dest === dest) if (p) { - this[PIPES].splice(this[PIPES].indexOf(p), 1) + this.pipes.splice(this.pipes.indexOf(p), 1) p.unpipe() } } - addListener(ev, fn) { + addListener (ev, fn) { return this.on(ev, fn) } - on(ev, fn) { + on (ev, fn) { const ret = super.on(ev, fn) - if (ev === 'data' && !this[PIPES].length && !this.flowing) this[RESUME]() + if (ev === 'data' && !this.pipes.length && !this.flowing) + this[RESUME]() else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) super.emit('readable') else if (isEndish(ev) && this[EMITTED_END]) { super.emit(ev) this.removeAllListeners(ev) } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])) - else fn.call(this, this[EMITTED_ERROR]) + if (this[ASYNC]) + defer(() => fn.call(this, this[EMITTED_ERROR])) + else + fn.call(this, this[EMITTED_ERROR]) } return ret } - get emittedEnd() { + get emittedEnd () { return this[EMITTED_END] } - [MAYBE_EMIT_END]() { - if ( - !this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this[BUFFER].length === 0 && - this[EOF] - ) { + [MAYBE_EMIT_END] () { + if (!this[EMITTING_END] && + !this[EMITTED_END] && + !this[DESTROYED] && + this.buffer.length === 0 && + this[EOF]) { this[EMITTING_END] = true this.emit('end') this.emit('prefinish') this.emit('finish') - if (this[CLOSED]) this.emit('close') + if (this[CLOSED]) + this.emit('close') this[EMITTING_END] = false } } - emit(ev, data, ...extra) { + emit (ev, data, ...extra) { // error and close are only events allowed after calling destroy() if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) return else if (ev === 'data') { - return !this[OBJECTMODE] && !data - ? false - : this[ASYNC] - ? defer(() => this[EMITDATA](data)) + return !data ? false + : this[ASYNC] ? defer(() => this[EMITDATA](data)) : this[EMITDATA](data) } else if (ev === 'end') { return this[EMITEND]() } else if (ev === 'close') { this[CLOSED] = true // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) return + if (!this[EMITTED_END] && !this[DESTROYED]) + return const ret = super.emit('close') this.removeAllListeners('close') return ret } else if (ev === 'error') { this[EMITTED_ERROR] = data - super.emit(ERROR, data) - const ret = - !this[SIGNAL] || this.listeners('error').length - ? super.emit('error', data) - : false + const ret = super.emit('error', data) this[MAYBE_EMIT_END]() return ret } else if (ev === 'resume') { @@ -20290,36 +21009,40 @@ class Minipass extends Stream { return ret } - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) this.pause() + [EMITDATA] (data) { + for (const p of this.pipes) { + if (p.dest.write(data) === false) + this.pause() } const ret = super.emit('data', data) this[MAYBE_EMIT_END]() return ret } - [EMITEND]() { - if (this[EMITTED_END]) return + [EMITEND] () { + if (this[EMITTED_END]) + return this[EMITTED_END] = true this.readable = false - if (this[ASYNC]) defer(() => this[EMITEND2]()) - else this[EMITEND2]() + if (this[ASYNC]) + defer(() => this[EMITEND2]()) + else + this[EMITEND2]() } - [EMITEND2]() { + [EMITEND2] () { if (this[DECODER]) { const data = this[DECODER].end() if (data) { - for (const p of this[PIPES]) { + for (const p of this.pipes) { p.dest.write(data) } super.emit('data', data) } } - for (const p of this[PIPES]) { + for (const p of this.pipes) { p.end() } const ret = super.emit('end') @@ -20328,34 +21051,33 @@ class Minipass extends Stream { } // const all = await stream.collect() - collect() { + collect () { const buf = [] - if (!this[OBJECTMODE]) buf.dataLength = 0 + if (!this[OBJECTMODE]) + buf.dataLength = 0 // set the promise first, in case an error is raised // by triggering the flow here. const p = this.promise() this.on('data', c => { buf.push(c) - if (!this[OBJECTMODE]) buf.dataLength += c.length + if (!this[OBJECTMODE]) + buf.dataLength += c.length }) return p.then(() => buf) } // const data = await stream.concat() - concat() { + concat () { return this[OBJECTMODE] ? Promise.reject(new Error('cannot concat in objectMode')) : this.collect().then(buf => this[OBJECTMODE] ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] - ? buf.join('') - : Buffer.concat(buf, buf.dataLength) - ) + : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) } // stream.promise().then(() => done, er => emitted error) - promise() { + promise () { return new Promise((resolve, reject) => { this.on(DESTROYED, () => reject(new Error('stream destroyed'))) this.on('error', er => reject(er)) @@ -20364,41 +21086,31 @@ class Minipass extends Stream { } // for await (let chunk of stream) - [ASYNCITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - stopped = true - return Promise.resolve({ done: true }) - } + [ASYNCITERATOR] () { const next = () => { - if (stopped) return stop() const res = this.read() - if (res !== null) return Promise.resolve({ done: false, value: res }) + if (res !== null) + return Promise.resolve({ done: false, value: res }) - if (this[EOF]) return stop() + if (this[EOF]) + return Promise.resolve({ done: true }) let resolve = null let reject = null const onerr = er => { this.removeListener('data', ondata) this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - stop() reject(er) } const ondata = value => { this.removeListener('error', onerr) this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) this.pause() resolve({ value: value, done: !!this[EOF] }) } const onend = () => { this.removeListener('error', onerr) this.removeListener('data', ondata) - this.removeListener(DESTROYED, ondestroy) - stop() resolve({ done: true }) } const ondestroy = () => onerr(new Error('stream destroyed')) @@ -20412,3206 +21124,3129 @@ class Minipass extends Stream { }) } - return { - next, - throw: stop, - return: stop, - [ASYNCITERATOR]() { - return this - }, - } + return { next } } // for (let chunk of stream) - [ITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - this.removeListener(ERROR, stop) - this.removeListener(DESTROYED, stop) - this.removeListener('end', stop) - stopped = true - return { done: true } - } - + [ITERATOR] () { const next = () => { - if (stopped) return stop() const value = this.read() - return value === null ? stop() : { value } - } - this.once('end', stop) - this.once(ERROR, stop) - this.once(DESTROYED, stop) - - return { - next, - throw: stop, - return: stop, - [ITERATOR]() { - return this - }, + const done = value === null + return { value, done } } + return { next } } - destroy(er) { + destroy (er) { if (this[DESTROYED]) { - if (er) this.emit('error', er) - else this.emit(DESTROYED) + if (er) + this.emit('error', er) + else + this.emit(DESTROYED) return this } this[DESTROYED] = true // throw away all buffered data, it's never coming out - this[BUFFER].length = 0 + this.buffer.length = 0 this[BUFFERLENGTH] = 0 - if (typeof this.close === 'function' && !this[CLOSED]) this.close() + if (typeof this.close === 'function' && !this[CLOSED]) + this.close() - if (er) this.emit('error', er) - // if no error to emit, still reject pending promises - else this.emit(DESTROYED) + if (er) + this.emit('error', er) + else // if no error to emit, still reject pending promises + this.emit(DESTROYED) return this } - static isStream(s) { - return ( - !!s && - (s instanceof Minipass || - s instanceof Stream || - (s instanceof EE && - // readable - (typeof s.pipe === 'function' || - // writable - (typeof s.write === 'function' && typeof s.end === 'function')))) - ) + static isStream (s) { + return !!s && (s instanceof Minipass || s instanceof Stream || + s instanceof EE && ( + typeof s.pipe === 'function' || // readable + (typeof s.write === 'function' && typeof s.end === 'function') // writable + )) } } -module.exports = Minipass - /***/ }), -/***/ 6769: +/***/ 6186: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// Update with any zlib constants that are added or changed in the future. -// Node v6 didn't export this, so we just hard code the version and rely -// on all the other hard-coded values from zlib v4736. When node v6 -// support drops, we can just export the realZlibConstants object. -const realZlibConstants = (__nccwpck_require__(9796).constants) || - /* istanbul ignore next */ { ZLIB_VERNUM: 4736 } +const optsArg = __nccwpck_require__(2853) +const pathArg = __nccwpck_require__(2930) -module.exports = Object.freeze(Object.assign(Object.create(null), { - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - Z_VERSION_ERROR: -6, - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - DEFLATE: 1, - INFLATE: 2, - GZIP: 3, - GUNZIP: 4, - DEFLATERAW: 5, - INFLATERAW: 6, - UNZIP: 7, - BROTLI_DECODE: 8, - BROTLI_ENCODE: 9, - Z_MIN_WINDOWBITS: 8, - Z_MAX_WINDOWBITS: 15, - Z_DEFAULT_WINDOWBITS: 15, - Z_MIN_CHUNK: 64, - Z_MAX_CHUNK: Infinity, - Z_DEFAULT_CHUNK: 16384, - Z_MIN_MEMLEVEL: 1, - Z_MAX_MEMLEVEL: 9, - Z_DEFAULT_MEMLEVEL: 8, - Z_MIN_LEVEL: -1, - Z_MAX_LEVEL: 9, - Z_DEFAULT_LEVEL: -1, - BROTLI_OPERATION_PROCESS: 0, - BROTLI_OPERATION_FLUSH: 1, - BROTLI_OPERATION_FINISH: 2, - BROTLI_OPERATION_EMIT_METADATA: 3, - BROTLI_MODE_GENERIC: 0, - BROTLI_MODE_TEXT: 1, - BROTLI_MODE_FONT: 2, - BROTLI_DEFAULT_MODE: 0, - BROTLI_MIN_QUALITY: 0, - BROTLI_MAX_QUALITY: 11, - BROTLI_DEFAULT_QUALITY: 11, - BROTLI_MIN_WINDOW_BITS: 10, - BROTLI_MAX_WINDOW_BITS: 24, - BROTLI_LARGE_MAX_WINDOW_BITS: 30, - BROTLI_DEFAULT_WINDOW: 22, - BROTLI_MIN_INPUT_BLOCK_BITS: 16, - BROTLI_MAX_INPUT_BLOCK_BITS: 24, - BROTLI_PARAM_MODE: 0, - BROTLI_PARAM_QUALITY: 1, - BROTLI_PARAM_LGWIN: 2, - BROTLI_PARAM_LGBLOCK: 3, - BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, - BROTLI_PARAM_SIZE_HINT: 5, - BROTLI_PARAM_LARGE_WINDOW: 6, - BROTLI_PARAM_NPOSTFIX: 7, - BROTLI_PARAM_NDIRECT: 8, - BROTLI_DECODER_RESULT_ERROR: 0, - BROTLI_DECODER_RESULT_SUCCESS: 1, - BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, - BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, - BROTLI_DECODER_NO_ERROR: 0, - BROTLI_DECODER_SUCCESS: 1, - BROTLI_DECODER_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, - BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, - BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, - BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, - BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, - BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, - BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, - BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, - BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, - BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, - BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, - BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, - BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, - BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, - BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, - BROTLI_DECODER_ERROR_UNREACHABLE: -31, -}, realZlibConstants)) +const {mkdirpNative, mkdirpNativeSync} = __nccwpck_require__(4983) +const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(356) +const {useNative, useNativeSync} = __nccwpck_require__(4518) -/***/ }), +const mkdirp = (path, opts) => { + path = pathArg(path) + opts = optsArg(opts) + return useNative(opts) + ? mkdirpNative(path, opts) + : mkdirpManual(path, opts) +} -/***/ 3486: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const mkdirpSync = (path, opts) => { + path = pathArg(path) + opts = optsArg(opts) + return useNativeSync(opts) + ? mkdirpNativeSync(path, opts) + : mkdirpManualSync(path, opts) +} -"use strict"; +mkdirp.sync = mkdirpSync +mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts)) +mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts)) +mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts)) +mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts)) +module.exports = mkdirp -const assert = __nccwpck_require__(9491) -const Buffer = (__nccwpck_require__(4300).Buffer) -const realZlib = __nccwpck_require__(9796) -const constants = exports.constants = __nccwpck_require__(6769) -const Minipass = __nccwpck_require__(7557) +/***/ }), -const OriginalBufferConcat = Buffer.concat +/***/ 4992: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const _superWrite = Symbol('_superWrite') -class ZlibError extends Error { - constructor (err) { - super('zlib: ' + err.message) - this.code = err.code - this.errno = err.errno - /* istanbul ignore if */ - if (!this.code) - this.code = 'ZLIB_ERROR' +const {dirname} = __nccwpck_require__(1017) - this.message = 'zlib: ' + err.message - Error.captureStackTrace(this, this.constructor) - } +const findMade = (opts, parent, path = undefined) => { + // we never want the 'made' return value to be a root directory + if (path === parent) + return Promise.resolve() - get name () { - return 'ZlibError' + return opts.statAsync(parent).then( + st => st.isDirectory() ? path : undefined, // will fail later + er => er.code === 'ENOENT' + ? findMade(opts, dirname(parent), parent) + : undefined + ) +} + +const findMadeSync = (opts, parent, path = undefined) => { + if (path === parent) + return undefined + + try { + return opts.statSync(parent).isDirectory() ? path : undefined + } catch (er) { + return er.code === 'ENOENT' + ? findMadeSync(opts, dirname(parent), parent) + : undefined } } -// the Zlib class they all inherit from -// This thing manages the queue of requests, and returns -// true or false if there is anything in the queue when -// you call the .write() method. -const _opts = Symbol('opts') -const _flushFlag = Symbol('flushFlag') -const _finishFlushFlag = Symbol('finishFlushFlag') -const _fullFlushFlag = Symbol('fullFlushFlag') -const _handle = Symbol('handle') -const _onError = Symbol('onError') -const _sawError = Symbol('sawError') -const _level = Symbol('level') -const _strategy = Symbol('strategy') -const _ended = Symbol('ended') -const _defaultFullFlush = Symbol('_defaultFullFlush') +module.exports = {findMade, findMadeSync} -class ZlibBase extends Minipass { - constructor (opts, mode) { - if (!opts || typeof opts !== 'object') - throw new TypeError('invalid options for ZlibBase constructor') - super(opts) - this[_sawError] = false - this[_ended] = false - this[_opts] = opts +/***/ }), - this[_flushFlag] = opts.flush - this[_finishFlushFlag] = opts.finishFlush - // this will throw if any options are invalid for the class selected - try { - this[_handle] = new realZlib[mode](opts) - } catch (er) { - // make sure that all errors get decorated properly - throw new ZlibError(er) - } +/***/ 356: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this[_onError] = (err) => { - // no sense raising multiple errors, since we abort on the first one. - if (this[_sawError]) - return +const {dirname} = __nccwpck_require__(1017) - this[_sawError] = true +const mkdirpManual = (path, opts, made) => { + opts.recursive = false + const parent = dirname(path) + if (parent === path) { + return opts.mkdirAsync(path, opts).catch(er => { + // swallowed by recursive implementation on posix systems + // any other error is a failure + if (er.code !== 'EISDIR') + throw er + }) + } - // there is no way to cleanly recover. - // continuing only obscures problems. - this.close() - this.emit('error', err) - } + return opts.mkdirAsync(path, opts).then(() => made || path, er => { + if (er.code === 'ENOENT') + return mkdirpManual(parent, opts) + .then(made => mkdirpManual(path, opts, made)) + if (er.code !== 'EEXIST' && er.code !== 'EROFS') + throw er + return opts.statAsync(path).then(st => { + if (st.isDirectory()) + return made + else + throw er + }, () => { throw er }) + }) +} - this[_handle].on('error', er => this[_onError](new ZlibError(er))) - this.once('end', () => this.close) - } +const mkdirpManualSync = (path, opts, made) => { + const parent = dirname(path) + opts.recursive = false - close () { - if (this[_handle]) { - this[_handle].close() - this[_handle] = null - this.emit('close') + if (parent === path) { + try { + return opts.mkdirSync(path, opts) + } catch (er) { + // swallowed by recursive implementation on posix systems + // any other error is a failure + if (er.code !== 'EISDIR') + throw er + else + return } } - reset () { - if (!this[_sawError]) { - assert(this[_handle], 'zlib binding closed') - return this[_handle].reset() + try { + opts.mkdirSync(path, opts) + return made || path + } catch (er) { + if (er.code === 'ENOENT') + return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made)) + if (er.code !== 'EEXIST' && er.code !== 'EROFS') + throw er + try { + if (!opts.statSync(path).isDirectory()) + throw er + } catch (_) { + throw er } } +} - flush (flushFlag) { - if (this.ended) - return +module.exports = {mkdirpManual, mkdirpManualSync} - if (typeof flushFlag !== 'number') - flushFlag = this[_fullFlushFlag] - this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag })) - } - end (chunk, encoding, cb) { - if (chunk) - this.write(chunk, encoding) - this.flush(this[_finishFlushFlag]) - this[_ended] = true - return super.end(null, null, cb) - } +/***/ }), - get ended () { - return this[_ended] - } +/***/ 4983: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - write (chunk, encoding, cb) { - // process the chunk using the sync process - // then super.write() all the outputted chunks - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' +const {dirname} = __nccwpck_require__(1017) +const {findMade, findMadeSync} = __nccwpck_require__(4992) +const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(356) - if (typeof chunk === 'string') - chunk = Buffer.from(chunk, encoding) +const mkdirpNative = (path, opts) => { + opts.recursive = true + const parent = dirname(path) + if (parent === path) + return opts.mkdirAsync(path, opts) - if (this[_sawError]) - return - assert(this[_handle], 'zlib binding closed') + return findMade(opts, path).then(made => + opts.mkdirAsync(path, opts).then(() => made) + .catch(er => { + if (er.code === 'ENOENT') + return mkdirpManual(path, opts) + else + throw er + })) +} - // _processChunk tries to .close() the native handle after it's done, so we - // intercept that by temporarily making it a no-op. - const nativeHandle = this[_handle]._handle - const originalNativeClose = nativeHandle.close - nativeHandle.close = () => {} - const originalClose = this[_handle].close - this[_handle].close = () => {} - // It also calls `Buffer.concat()` at the end, which may be convenient - // for some, but which we are not interested in as it slows us down. - Buffer.concat = (args) => args - let result - try { - const flushFlag = typeof chunk[_flushFlag] === 'number' - ? chunk[_flushFlag] : this[_flushFlag] - result = this[_handle]._processChunk(chunk, flushFlag) - // if we don't throw, reset it back how it was - Buffer.concat = OriginalBufferConcat - } catch (err) { - // or if we do, put Buffer.concat() back before we emit error - // Error events call into user code, which may call Buffer.concat() - Buffer.concat = OriginalBufferConcat - this[_onError](new ZlibError(err)) - } finally { - if (this[_handle]) { - // Core zlib resets `_handle` to null after attempting to close the - // native handle. Our no-op handler prevented actual closure, but we - // need to restore the `._handle` property. - this[_handle]._handle = nativeHandle - nativeHandle.close = originalNativeClose - this[_handle].close = originalClose - // `_processChunk()` adds an 'error' listener. If we don't remove it - // after each call, these handlers start piling up. - this[_handle].removeAllListeners('error') - // make sure OUR error listener is still attached tho - } - } +const mkdirpNativeSync = (path, opts) => { + opts.recursive = true + const parent = dirname(path) + if (parent === path) + return opts.mkdirSync(path, opts) - if (this[_handle]) - this[_handle].on('error', er => this[_onError](new ZlibError(er))) + const made = findMadeSync(opts, path) + try { + opts.mkdirSync(path, opts) + return made + } catch (er) { + if (er.code === 'ENOENT') + return mkdirpManualSync(path, opts) + else + throw er + } +} - let writeReturn - if (result) { - if (Array.isArray(result) && result.length > 0) { - // The first buffer is always `handle._outBuffer`, which would be - // re-used for later invocations; so, we always have to copy that one. - writeReturn = this[_superWrite](Buffer.from(result[0])) - for (let i = 1; i < result.length; i++) { - writeReturn = this[_superWrite](result[i]) - } - } else { - writeReturn = this[_superWrite](Buffer.from(result)) - } - } +module.exports = {mkdirpNative, mkdirpNativeSync} - if (cb) - cb() - return writeReturn - } - [_superWrite] (data) { - return super.write(data) - } -} +/***/ }), -class Zlib extends ZlibBase { - constructor (opts, mode) { - opts = opts || {} +/***/ 2853: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - opts.flush = opts.flush || constants.Z_NO_FLUSH - opts.finishFlush = opts.finishFlush || constants.Z_FINISH - super(opts, mode) +const { promisify } = __nccwpck_require__(3837) +const fs = __nccwpck_require__(7147) +const optsArg = opts => { + if (!opts) + opts = { mode: 0o777, fs } + else if (typeof opts === 'object') + opts = { mode: 0o777, fs, ...opts } + else if (typeof opts === 'number') + opts = { mode: opts, fs } + else if (typeof opts === 'string') + opts = { mode: parseInt(opts, 8), fs } + else + throw new TypeError('invalid options argument') - this[_fullFlushFlag] = constants.Z_FULL_FLUSH - this[_level] = opts.level - this[_strategy] = opts.strategy - } + opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir + opts.mkdirAsync = promisify(opts.mkdir) + opts.stat = opts.stat || opts.fs.stat || fs.stat + opts.statAsync = promisify(opts.stat) + opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync + opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync + return opts +} +module.exports = optsArg - params (level, strategy) { - if (this[_sawError]) - return - if (!this[_handle]) - throw new Error('cannot switch params when binding is closed') +/***/ }), - // no way to test this without also not supporting params at all - /* istanbul ignore if */ - if (!this[_handle].params) - throw new Error('not supported in this implementation') +/***/ 2930: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (this[_level] !== level || this[_strategy] !== strategy) { - this.flush(constants.Z_SYNC_FLUSH) - assert(this[_handle], 'zlib binding closed') - // .params() calls .flush(), but the latter is always async in the - // core zlib. We override .flush() temporarily to intercept that and - // flush synchronously. - const origFlush = this[_handle].flush - this[_handle].flush = (flushFlag, cb) => { - this.flush(flushFlag) - cb() - } - try { - this[_handle].params(level, strategy) - } finally { - this[_handle].flush = origFlush - } - /* istanbul ignore else */ - if (this[_handle]) { - this[_level] = level - this[_strategy] = strategy +const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform +const { resolve, parse } = __nccwpck_require__(1017) +const pathArg = path => { + if (/\0/.test(path)) { + // simulate same failure that node raises + throw Object.assign( + new TypeError('path must be a string without null bytes'), + { + path, + code: 'ERR_INVALID_ARG_VALUE', } - } + ) } -} -// minimal 2-byte header -class Deflate extends Zlib { - constructor (opts) { - super(opts, 'Deflate') + path = resolve(path) + if (platform === 'win32') { + const badWinChars = /[*|"<>?:]/ + const {root} = parse(path) + if (badWinChars.test(path.substr(root.length))) { + throw Object.assign(new Error('Illegal characters in path.'), { + path, + code: 'EINVAL', + }) + } } -} -class Inflate extends Zlib { - constructor (opts) { - super(opts, 'Inflate') - } + return path } +module.exports = pathArg -// gzip - bigger header, same deflate compression -const _portable = Symbol('_portable') -class Gzip extends Zlib { - constructor (opts) { - super(opts, 'Gzip') - this[_portable] = opts && !!opts.portable - } - - [_superWrite] (data) { - if (!this[_portable]) - return super[_superWrite](data) - // we'll always get the header emitted in one first chunk - // overwrite the OS indicator byte with 0xFF - this[_portable] = false - data[9] = 255 - return super[_superWrite](data) - } -} +/***/ }), -class Gunzip extends Zlib { - constructor (opts) { - super(opts, 'Gunzip') - } -} +/***/ 4518: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// raw - no header -class DeflateRaw extends Zlib { - constructor (opts) { - super(opts, 'DeflateRaw') - } -} +const fs = __nccwpck_require__(7147) -class InflateRaw extends Zlib { - constructor (opts) { - super(opts, 'InflateRaw') - } -} +const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version +const versArr = version.replace(/^v/, '').split('.') +const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12 -// auto-detect header. -class Unzip extends Zlib { - constructor (opts) { - super(opts, 'Unzip') - } -} +const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir +const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync -class Brotli extends ZlibBase { - constructor (opts, mode) { - opts = opts || {} +module.exports = {useNative, useNativeSync} - opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS - opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH - super(opts, mode) +/***/ }), - this[_fullFlushFlag] = constants.BROTLI_OPERATION_FLUSH - } -} +/***/ 504: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -class BrotliCompress extends Brotli { - constructor (opts) { - super(opts, 'BrotliCompress') - } -} +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; -class BrotliDecompress extends Brotli { - constructor (opts) { - super(opts, 'BrotliDecompress') - } -} +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); -exports.Deflate = Deflate -exports.Inflate = Inflate -exports.Gzip = Gzip -exports.Gunzip = Gunzip -exports.DeflateRaw = DeflateRaw -exports.InflateRaw = InflateRaw -exports.Unzip = Unzip -/* istanbul ignore else */ -if (typeof realZlib.BrotliCompress === 'function') { - exports.BrotliCompress = BrotliCompress - exports.BrotliDecompress = BrotliDecompress -} else { - exports.BrotliCompress = exports.BrotliDecompress = class { - constructor () { - throw new Error('Brotli is not supported in this version of Node.js') +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; } - } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); } +var utilInspect = __nccwpck_require__(7265); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; -/***/ }), +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; -/***/ 7557: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } -"use strict"; + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; -const proc = typeof process === 'object' && process ? process : { - stdout: null, - stderr: null, -} -const EE = __nccwpck_require__(2361) -const Stream = __nccwpck_require__(2781) -const SD = (__nccwpck_require__(1576).StringDecoder) + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } -const EOF = Symbol('EOF') -const MAYBE_EMIT_END = Symbol('maybeEmitEnd') -const EMITTED_END = Symbol('emittedEnd') -const EMITTING_END = Symbol('emittingEnd') -const EMITTED_ERROR = Symbol('emittedError') -const CLOSED = Symbol('closed') -const READ = Symbol('read') -const FLUSH = Symbol('flush') -const FLUSHCHUNK = Symbol('flushChunk') -const ENCODING = Symbol('encoding') -const DECODER = Symbol('decoder') -const FLOWING = Symbol('flowing') -const PAUSED = Symbol('paused') -const RESUME = Symbol('resume') -const BUFFERLENGTH = Symbol('bufferLength') -const BUFFERPUSH = Symbol('bufferPush') -const BUFFERSHIFT = Symbol('bufferShift') -const OBJECTMODE = Symbol('objectMode') -const DESTROYED = Symbol('destroyed') -const EMITDATA = Symbol('emitData') -const EMITEND = Symbol('emitEnd') -const EMITEND2 = Symbol('emitEnd2') -const ASYNC = Symbol('async') + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } -const defer = fn => Promise.resolve().then(fn) + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } -// TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = doIter && Symbol.asyncIterator - || Symbol('asyncIterator not implemented') -const ITERATOR = doIter && Symbol.iterator - || Symbol('iterator not implemented') + var indent = getIndent(opts, depth); -// events that mean 'the stream is over' -// these are treated specially, and re-emitted -// if they are listened for after emitting. -const isEndish = ev => - ev === 'end' || - ev === 'finish' || - ev === 'prefinish' + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } -const isArrayBuffer = b => b instanceof ArrayBuffer || - typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0 + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } -const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if (obj === global) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; -class Pipe { - constructor (src, dest, opts) { - this.src = src - this.dest = dest - this.opts = opts - this.ondrain = () => src[RESUME]() - dest.on('drain', this.ondrain) - } - unpipe () { - this.dest.removeListener('drain', this.ondrain) - } - // istanbul ignore next - only here for the prototype - proxyErrors () {} - end () { - this.unpipe() - if (this.opts.end) - this.dest.end() - } +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; } -class PipeProxyErrors extends Pipe { - unpipe () { - this.src.removeListener('error', this.proxyErrors) - super.unpipe() - } - constructor (src, dest, opts) { - super(src, dest, opts) - this.proxyErrors = er => dest.emit('error', er) - src.on('error', this.proxyErrors) - } +function quote(s) { + return $replace.call(String(s), /"/g, '"'); } -module.exports = class Minipass extends Stream { - constructor (options) { - super() - this[FLOWING] = false - // whether we're explicitly paused - this[PAUSED] = false - this.pipes = [] - this.buffer = [] - this[OBJECTMODE] = options && options.objectMode || false - if (this[OBJECTMODE]) - this[ENCODING] = null - else - this[ENCODING] = options && options.encoding || null - if (this[ENCODING] === 'buffer') - this[ENCODING] = null - this[ASYNC] = options && !!options.async || false - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null - this[EOF] = false - this[EMITTED_END] = false - this[EMITTING_END] = false - this[CLOSED] = false - this[EMITTED_ERROR] = null - this.writable = true - this.readable = true - this[BUFFERLENGTH] = 0 - this[DESTROYED] = false - } - - get bufferLength () { return this[BUFFERLENGTH] } - - get encoding () { return this[ENCODING] } - set encoding (enc) { - if (this[OBJECTMODE]) - throw new Error('cannot set encoding in objectMode') - - if (this[ENCODING] && enc !== this[ENCODING] && - (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) - throw new Error('cannot change encoding') +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null - if (this.buffer.length) - this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} - this[ENCODING] = enc - } - - setEncoding (enc) { - this.encoding = enc - } - - get objectMode () { return this[OBJECTMODE] } - set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } - - get ['async'] () { return this[ASYNC] } - set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a } - - write (chunk, encoding, cb) { - if (this[EOF]) - throw new Error('write after end') - - if (this[DESTROYED]) { - this.emit('error', Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - )) - return true +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} - if (!encoding) - encoding = 'utf8' +function toStr(obj) { + return objectToString.call(obj); +} - const fn = this[ASYNC] ? defer : f => f() +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} - // convert array buffers and typed array views into buffers - // at some point in the future, we may want to do the opposite! - // leave strings and buffers as-is - // anything else switches us into object mode - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) - chunk = Buffer.from(chunk) - else if (typeof chunk !== 'string') - // use the setter so we throw if we have encoding set - this.objectMode = true +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } } + return -1; +} - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) - - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - - if (cb) - fn(cb) +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} - return this.flowing +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} - // at this point the chunk is a buffer or string - // don't buffer it up or send it to the decoder - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - if (cb) - fn(cb) - return this.flowing +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} - // fast-path writing strings of same encoding to a stream with - // an empty buffer, skipping the buffer/decoder dance - if (typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { - chunk = Buffer.from(chunk, encoding) +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} - if (Buffer.isBuffer(chunk) && this[ENCODING]) - chunk = this[DECODER].write(chunk) +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} - // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} - if (cb) - fn(cb) +function markBoxed(str) { + return 'Object(' + str + ')'; +} - return this.flowing - } +function weakCollectionOf(type) { + return type + ' { ? }'; +} - read (n) { - if (this[DESTROYED]) - return null +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} - if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END]() - return null +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } } + return true; +} - if (this[OBJECTMODE]) - n = null - - if (this.buffer.length > 1 && !this[OBJECTMODE]) { - if (this.encoding) - this.buffer = [this.buffer.join('')] - else - this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])] +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} - const ret = this[READ](n || null, this.buffer[0]) - this[MAYBE_EMIT_END]() - return ret - } +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} - [READ] (n, chunk) { - if (n === chunk.length || n === null) - this[BUFFERSHIFT]() - else { - this.buffer[0] = chunk.slice(n) - chunk = chunk.slice(0, n) - this[BUFFERLENGTH] -= n +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } } - this.emit('data', chunk) + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} - if (!this.buffer.length && !this[EOF]) - this.emit('drain') - return chunk - } +/***/ }), - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - if (cb) - this.once('end', cb) - this[EOF] = true - this.writable = false +/***/ 7265: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // if we haven't written anything, then go ahead and emit, - // even if we're not reading. - // we'll re-emit if a new 'end' listener is added anyway. - // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) - this[MAYBE_EMIT_END]() - return this - } +module.exports = __nccwpck_require__(3837).inspect; - // don't let the internal resume be overwritten - [RESUME] () { - if (this[DESTROYED]) - return - this[PAUSED] = false - this[FLOWING] = true - this.emit('resume') - if (this.buffer.length) - this[FLUSH]() - else if (this[EOF]) - this[MAYBE_EMIT_END]() - else - this.emit('drain') - } +/***/ }), - resume () { - return this[RESUME]() - } +/***/ 1223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - pause () { - this[FLOWING] = false - this[PAUSED] = true - } +var wrappy = __nccwpck_require__(2940) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) - get destroyed () { - return this[DESTROYED] - } +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) - get flowing () { - return this[FLOWING] - } + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) - get paused () { - return this[PAUSED] +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) } + f.called = false + return f +} - [BUFFERPUSH] (chunk) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] += 1 - else - this[BUFFERLENGTH] += chunk.length - this.buffer.push(chunk) +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} - [BUFFERSHIFT] () { - if (this.buffer.length) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] -= 1 - else - this[BUFFERLENGTH] -= this.buffer[0].length - } - return this.buffer.shift() - } - [FLUSH] (noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) +/***/ }), - if (!noDrain && !this.buffer.length && !this[EOF]) - this.emit('drain') - } +/***/ 8714: +/***/ ((module) => { - [FLUSHCHUNK] (chunk) { - return chunk ? (this.emit('data', chunk), this.flowing) : false - } +"use strict"; - pipe (dest, opts) { - if (this[DESTROYED]) - return - const ended = this[EMITTED_END] - opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) - opts.end = false - else - opts.end = opts.end !== false - opts.proxyErrors = !!opts.proxyErrors +function posix(path) { + return path.charAt(0) === '/'; +} - // piping an ended stream ends immediately - if (ended) { - if (opts.end) - dest.end() - } else { - this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts)) - if (this[ASYNC]) - defer(() => this[RESUME]()) - else - this[RESUME]() - } +function win32(path) { + // /~https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); - return dest - } + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} - unpipe (dest) { - const p = this.pipes.find(p => p.dest === dest) - if (p) { - this.pipes.splice(this.pipes.indexOf(p), 1) - p.unpipe() - } - } +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; - addListener (ev, fn) { - return this.on(ev, fn) - } - on (ev, fn) { - const ret = super.on(ev, fn) - if (ev === 'data' && !this.pipes.length && !this.flowing) - this[RESUME]() - else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) - super.emit('readable') - else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev) - this.removeAllListeners(ev) - } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) - defer(() => fn.call(this, this[EMITTED_ERROR])) - else - fn.call(this, this[EMITTED_ERROR]) - } - return ret - } +/***/ }), - get emittedEnd () { - return this[EMITTED_END] - } +/***/ 7810: +/***/ ((module) => { - [MAYBE_EMIT_END] () { - if (!this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this.buffer.length === 0 && - this[EOF]) { - this[EMITTING_END] = true - this.emit('end') - this.emit('prefinish') - this.emit('finish') - if (this[CLOSED]) - this.emit('close') - this[EMITTING_END] = false - } - } +"use strict"; - emit (ev, data, ...extra) { - // error and close are only events allowed after calling destroy() - if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) - return - else if (ev === 'data') { - return !data ? false - : this[ASYNC] ? defer(() => this[EMITDATA](data)) - : this[EMITDATA](data) - } else if (ev === 'end') { - return this[EMITEND]() - } else if (ev === 'close') { - this[CLOSED] = true - // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) - return - const ret = super.emit('close') - this.removeAllListeners('close') - return ret - } else if (ev === 'error') { - this[EMITTED_ERROR] = data - const ret = super.emit('error', data) - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'resume') { - const ret = super.emit('resume') - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'finish' || ev === 'prefinish') { - const ret = super.emit(ev) - this.removeAllListeners(ev) - return ret - } - // Some other unknown event - const ret = super.emit(ev, data, ...extra) - this[MAYBE_EMIT_END]() - return ret - } +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} - [EMITDATA] (data) { - for (const p of this.pipes) { - if (p.dest.write(data) === false) - this.pause() +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]; } - const ret = super.emit('data', data) - this[MAYBE_EMIT_END]() - return ret + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); } +} - [EMITEND] () { - if (this[EMITTED_END]) - return - - this[EMITTED_END] = true - this.readable = false - if (this[ASYNC]) - defer(() => this[EMITEND2]()) - else - this[EMITEND2]() - } - [EMITEND2] () { - if (this[DECODER]) { - const data = this[DECODER].end() - if (data) { - for (const p of this.pipes) { - p.dest.write(data) - } - super.emit('data', data) - } - } - for (const p of this.pipes) { - p.end() - } - const ret = super.emit('end') - this.removeAllListeners('end') - return ret - } +/***/ }), - // const all = await stream.collect() - collect () { - const buf = [] - if (!this[OBJECTMODE]) - buf.dataLength = 0 - // set the promise first, in case an error is raised - // by triggering the flow here. - const p = this.promise() - this.on('data', c => { - buf.push(c) - if (!this[OBJECTMODE]) - buf.dataLength += c.length - }) - return p.then(() => buf) - } +/***/ 4907: +/***/ ((module) => { - // const data = await stream.concat() - concat () { - return this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this.collect().then(buf => - this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) - } +"use strict"; - // stream.promise().then(() => done, er => emitted error) - promise () { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error('stream destroyed'))) - this.on('error', er => reject(er)) - this.on('end', () => resolve()) - }) - } - // for await (let chunk of stream) - [ASYNCITERATOR] () { - const next = () => { - const res = this.read() - if (res !== null) - return Promise.resolve({ done: false, value: res }) +var replace = String.prototype.replace; +var percentTwenties = /%20/g; - if (this[EOF]) - return Promise.resolve({ done: true }) +var Format = { + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; - let resolve = null - let reject = null - const onerr = er => { - this.removeListener('data', ondata) - this.removeListener('end', onend) - reject(er) - } - const ondata = value => { - this.removeListener('error', onerr) - this.removeListener('end', onend) - this.pause() - resolve({ value: value, done: !!this[EOF] }) - } - const onend = () => { - this.removeListener('error', onerr) - this.removeListener('data', ondata) - resolve({ done: true }) - } - const ondestroy = () => onerr(new Error('stream destroyed')) - return new Promise((res, rej) => { - reject = rej - resolve = res - this.once(DESTROYED, ondestroy) - this.once('error', onerr) - this.once('end', onend) - this.once('data', ondata) - }) - } +module.exports = { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 +}; - return { next } - } - // for (let chunk of stream) - [ITERATOR] () { - const next = () => { - const value = this.read() - const done = value === null - return { value, done } - } - return { next } - } +/***/ }), - destroy (er) { - if (this[DESTROYED]) { - if (er) - this.emit('error', er) - else - this.emit(DESTROYED) - return this - } +/***/ 2760: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this[DESTROYED] = true +"use strict"; - // throw away all buffered data, it's never coming out - this.buffer.length = 0 - this[BUFFERLENGTH] = 0 - if (typeof this.close === 'function' && !this[CLOSED]) - this.close() - - if (er) - this.emit('error', er) - else // if no error to emit, still reject pending promises - this.emit(DESTROYED) - - return this - } +var stringify = __nccwpck_require__(9954); +var parse = __nccwpck_require__(3912); +var formats = __nccwpck_require__(4907); - static isStream (s) { - return !!s && (s instanceof Minipass || s instanceof Stream || - s instanceof EE && ( - typeof s.pipe === 'function' || // readable - (typeof s.write === 'function' && typeof s.end === 'function') // writable - )) - } -} +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; /***/ }), -/***/ 6186: +/***/ 3912: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const optsArg = __nccwpck_require__(2853) -const pathArg = __nccwpck_require__(2930) +"use strict"; -const {mkdirpNative, mkdirpNativeSync} = __nccwpck_require__(4983) -const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(356) -const {useNative, useNativeSync} = __nccwpck_require__(4518) +var utils = __nccwpck_require__(2360); -const mkdirp = (path, opts) => { - path = pathArg(path) - opts = optsArg(opts) - return useNative(opts) - ? mkdirpNative(path, opts) - : mkdirpManual(path, opts) -} +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; -const mkdirpSync = (path, opts) => { - path = pathArg(path) - opts = optsArg(opts) - return useNativeSync(opts) - ? mkdirpNativeSync(path, opts) - : mkdirpManualSync(path, opts) -} +var defaults = { + allowDots: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: 'utf-8', + charsetSentinel: false, + comma: false, + decoder: utils.decode, + delimiter: '&', + depth: 5, + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1000, + parseArrays: true, + plainObjects: false, + strictNullHandling: false +}; -mkdirp.sync = mkdirpSync -mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts)) -mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts)) -mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts)) -mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts)) +var interpretNumericEntities = function (str) { + return str.replace(/&#(\d+);/g, function ($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); +}; -module.exports = mkdirp +var parseArrayValue = function (val, options) { + if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { + return val.split(','); + } + return val; +}; -/***/ }), +// This is what browsers will submit when the ✓ character occurs in an +// application/x-www-form-urlencoded body and the encoding of the page containing +// the form is iso-8859-1, or when the submitted form has an accept-charset +// attribute of iso-8859-1. Presumably also with other charsets that do not contain +// the ✓ character, such as us-ascii. +var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') -/***/ 4992: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. +var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') -const {dirname} = __nccwpck_require__(1017) +var parseValues = function parseQueryStringValues(str, options) { + var obj = { __proto__: null }; -const findMade = (opts, parent, path = undefined) => { - // we never want the 'made' return value to be a root directory - if (path === parent) - return Promise.resolve() + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + var skipIndex = -1; // Keep track of where the utf8 sentinel was found + var i; - return opts.statAsync(parent).then( - st => st.isDirectory() ? path : undefined, // will fail later - er => er.code === 'ENOENT' - ? findMade(opts, dirname(parent), parent) - : undefined - ) -} + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8'; + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1'; + } + skipIndex = i; + i = parts.length; // The eslint settings do not allow break; + } + } + } -const findMadeSync = (opts, parent, path = undefined) => { - if (path === parent) - return undefined + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; - try { - return opts.statSync(parent).isDirectory() ? path : undefined - } catch (er) { - return er.code === 'ENOENT' - ? findMadeSync(opts, dirname(parent), parent) - : undefined - } -} + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; -module.exports = {findMade, findMadeSync} + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key'); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options), + function (encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, 'value'); + } + ); + } + if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { + val = interpretNumericEntities(val); + } -/***/ }), + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val; + } -/***/ 356: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (has.call(obj, key)) { + obj[key] = utils.combine(obj[key], val); + } else { + obj[key] = val; + } + } -const {dirname} = __nccwpck_require__(1017) + return obj; +}; -const mkdirpManual = (path, opts, made) => { - opts.recursive = false - const parent = dirname(path) - if (parent === path) { - return opts.mkdirAsync(path, opts).catch(er => { - // swallowed by recursive implementation on posix systems - // any other error is a failure - if (er.code !== 'EISDIR') - throw er - }) - } +var parseObject = function (chain, val, options, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options); - return opts.mkdirAsync(path, opts).then(() => made || path, er => { - if (er.code === 'ENOENT') - return mkdirpManual(parent, opts) - .then(made => mkdirpManual(path, opts, made)) - if (er.code !== 'EEXIST' && er.code !== 'EROFS') - throw er - return opts.statAsync(path).then(st => { - if (st.isDirectory()) - return made - else - throw er - }, () => { throw er }) - }) -} + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; -const mkdirpManualSync = (path, opts, made) => { - const parent = dirname(path) - opts.recursive = false + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else if (cleanRoot !== '__proto__') { + obj[cleanRoot] = leaf; + } + } - if (parent === path) { - try { - return opts.mkdirSync(path, opts) - } catch (er) { - // swallowed by recursive implementation on posix systems - // any other error is a failure - if (er.code !== 'EISDIR') - throw er - else - return + leaf = obj; } - } - try { - opts.mkdirSync(path, opts) - return made || path - } catch (er) { - if (er.code === 'ENOENT') - return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made)) - if (er.code !== 'EEXIST' && er.code !== 'EROFS') - throw er - try { - if (!opts.statSync(path).isDirectory()) - throw er - } catch (_) { - throw er + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; } - } -} -module.exports = {mkdirpManual, mkdirpManualSync} + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + // The regex chunks -/***/ }), + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; -/***/ 4983: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Get the parent -const {dirname} = __nccwpck_require__(1017) -const {findMade, findMadeSync} = __nccwpck_require__(4992) -const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(356) + var segment = options.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; -const mkdirpNative = (path, opts) => { - opts.recursive = true - const parent = dirname(path) - if (parent === path) - return opts.mkdirAsync(path, opts) + // Stash the parent if it exists - return findMade(opts, path).then(made => - opts.mkdirAsync(path, opts).then(() => made) - .catch(er => { - if (er.code === 'ENOENT') - return mkdirpManual(path, opts) - else - throw er - })) -} + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } -const mkdirpNativeSync = (path, opts) => { - opts.recursive = true - const parent = dirname(path) - if (parent === path) - return opts.mkdirSync(path, opts) + keys.push(parent); + } - const made = findMadeSync(opts, path) - try { - opts.mkdirSync(path, opts) - return made - } catch (er) { - if (er.code === 'ENOENT') - return mkdirpManualSync(path, opts) - else - throw er - } -} + // Loop through children appending to the array until we hit depth -module.exports = {mkdirpNative, mkdirpNativeSync} + var i = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + // If there's a remainder, just add whatever is left -/***/ }), + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } -/***/ 2853: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return parseObject(keys, val, options, valuesParsed); +}; -const { promisify } = __nccwpck_require__(3837) -const fs = __nccwpck_require__(7147) -const optsArg = opts => { - if (!opts) - opts = { mode: 0o777, fs } - else if (typeof opts === 'object') - opts = { mode: 0o777, fs, ...opts } - else if (typeof opts === 'number') - opts = { mode: opts, fs } - else if (typeof opts === 'string') - opts = { mode: parseInt(opts, 8), fs } - else - throw new TypeError('invalid options argument') +var normalizeParseOptions = function normalizeParseOptions(opts) { + if (!opts) { + return defaults; + } - opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir - opts.mkdirAsync = promisify(opts.mkdir) - opts.stat = opts.stat || opts.fs.stat || fs.stat - opts.statAsync = promisify(opts.stat) - opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync - opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync - return opts -} -module.exports = optsArg + if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; -/***/ }), + return { + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; -/***/ 2930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +module.exports = function (str, opts) { + var options = normalizeParseOptions(opts); -const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform -const { resolve, parse } = __nccwpck_require__(1017) -const pathArg = path => { - if (/\0/.test(path)) { - // simulate same failure that node raises - throw Object.assign( - new TypeError('path must be a string without null bytes'), - { - path, - code: 'ERR_INVALID_ARG_VALUE', - } - ) - } + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } - path = resolve(path) - if (platform === 'win32') { - const badWinChars = /[*|"<>?:]/ - const {root} = parse(path) - if (badWinChars.test(path.substr(root.length))) { - throw Object.assign(new Error('Illegal characters in path.'), { - path, - code: 'EINVAL', - }) + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); + obj = utils.merge(obj, newObj, options); } - } - return path -} -module.exports = pathArg + if (options.allowSparse === true) { + return obj; + } + + return utils.compact(obj); +}; /***/ }), -/***/ 4518: +/***/ 9954: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const fs = __nccwpck_require__(7147) +"use strict"; -const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version -const versArr = version.replace(/^v/, '').split('.') -const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12 -const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir -const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync +var getSideChannel = __nccwpck_require__(4334); +var utils = __nccwpck_require__(2360); +var formats = __nccwpck_require__(4907); +var has = Object.prototype.hasOwnProperty; -module.exports = {useNative, useNativeSync} +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; +var isArray = Array.isArray; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; -/***/ }), +var toISO = Date.prototype.toISOString; -/***/ 504: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var defaultFormat = formats['default']; +var defaults = { + addQueryPrefix: false, + allowDots: false, + charset: 'utf-8', + charsetSentinel: false, + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; -var hasMap = typeof Map === 'function' && Map.prototype; -var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; -var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; -var mapForEach = hasMap && Map.prototype.forEach; -var hasSet = typeof Set === 'function' && Set.prototype; -var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; -var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; -var setForEach = hasSet && Set.prototype.forEach; -var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; -var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; -var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; -var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; -var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; -var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; -var booleanValueOf = Boolean.prototype.valueOf; -var objectToString = Object.prototype.toString; -var functionToString = Function.prototype.toString; -var $match = String.prototype.match; -var $slice = String.prototype.slice; -var $replace = String.prototype.replace; -var $toUpperCase = String.prototype.toUpperCase; -var $toLowerCase = String.prototype.toLowerCase; -var $test = RegExp.prototype.test; -var $concat = Array.prototype.concat; -var $join = Array.prototype.join; -var $arrSlice = Array.prototype.slice; -var $floor = Math.floor; -var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; -var gOPS = Object.getOwnPropertySymbols; -var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; -var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; -// ie, `has-tostringtag/shams -var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') - ? Symbol.toStringTag - : null; -var isEnumerable = Object.prototype.propertyIsEnumerable; +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; +}; -var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( - [].__proto__ === Array.prototype // eslint-disable-line no-proto - ? function (O) { - return O.__proto__; // eslint-disable-line no-proto - } - : null -); +var sentinel = {}; -function addNumericSeparator(num, str) { - if ( - num === Infinity - || num === -Infinity - || num !== num - || (num && num > -1000 && num < 1000) - || $test.call(/e/, str) - ) { - return str; - } - var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; - if (typeof num === 'number') { - var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) - if (int !== num) { - var intStr = String(int); - var dec = $slice.call(str, intStr.length + 1); - return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); +var stringify = function stringify( + object, + prefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + sideChannel +) { + var obj = object; + + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { + // Where object last appeared in the ref tree + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== 'undefined') { + if (pos === step) { + throw new RangeError('Cyclic object value'); + } else { + findFlag = true; // Break while + } + } + if (typeof tmpSc.get(sentinel) === 'undefined') { + step = 0; } } - return $replace.call(str, sepRegex, '$&_'); -} -var utilInspect = __nccwpck_require__(7265); -var inspectCustom = utilInspect.custom; -var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value) { + if (value instanceof Date) { + return serializeDate(value); + } + return value; + }); + } -module.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; + } - if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - if ( - has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' - ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity - : opts.maxStringLength !== null - ) - ) { - throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - } - var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; - if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { - throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + obj = ''; } - if ( - has(opts, 'indent') - && opts.indent !== null - && opts.indent !== '\t' - && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) - ) { - throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); - } - if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { - throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; } - var numericSeparator = opts.numericSeparator; + + var values = []; if (typeof obj === 'undefined') { - return 'undefined'; - } - if (obj === null) { - return 'null'; - } - if (typeof obj === 'boolean') { - return obj ? 'true' : 'false'; + return values; } - if (typeof obj === 'string') { - return inspectString(obj, opts); - } - if (typeof obj === 'number') { - if (obj === 0) { - return Infinity / obj > 0 ? '0' : '-0'; + var objKeys; + if (generateArrayPrefix === 'comma' && isArray(obj)) { + // we need to join elements in + if (encodeValuesOnly && encoder) { + obj = utils.maybeMap(obj, encoder); } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; - } - if (typeof obj === 'bigint') { - var bigIntStr = String(obj) + 'n'; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; - } - - var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; - if (typeof depth === 'undefined') { depth = 0; } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { - return isArray(obj) ? '[Array]' : '[Object]'; + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; } - var indent = getIndent(opts, depth); + var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; - if (typeof seen === 'undefined') { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return '[Circular]'; - } + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; - function inspect(value, from, noIndent) { - if (from) { - seen = $arrSlice.call(seen); - seen.push(from); - } - if (noIndent) { - var newOpts = { - depth: opts.depth - }; - if (has(opts, 'quoteStyle')) { - newOpts.quoteStyle = opts.quoteStyle; - } - return inspect_(value, newOpts, depth + 1, seen); + if (skipNulls && value === null) { + continue; } - return inspect_(value, opts, depth + 1, seen); - } - if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); - return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); - } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); - return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; - } - if (isElement(obj)) { - var s = '<' + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); - } - s += '>'; - if (obj.childNodes && obj.childNodes.length) { s += '...'; } - s += ''; - return s; + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix + : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); + + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); } - if (isArray(obj)) { - if (obj.length === 0) { return '[]'; } - var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return '[' + indentedJoin(xs, indent) + ']'; - } - return '[ ' + $join.call(xs, ', ') + ' ]'; + + return values; +}; + +var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { + if (!opts) { + return defaults; } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { - return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; - } - if (parts.length === 0) { return '[' + String(obj) + ']'; } - return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + + if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); } - if (typeof obj === 'object' && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { - return obj.inspect(); - } + + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } - if (isMap(obj)) { - var mapParts = []; - if (mapForEach) { - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); - }); + + var format = formats['default']; + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.'); } - return collectionOf('Map', mapSize.call(obj), mapParts, indent); + format = opts.format; } - if (isSet(obj)) { - var setParts = []; - if (setForEach) { - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); - } - return collectionOf('Set', setSize.call(obj), setParts, indent); + var formatter = formats.formatters[format]; + + var filter = defaults.filter; + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter; } - if (isWeakMap(obj)) { - return weakCollectionOf('WeakMap'); + + return { + addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter: filter, + format: format, + formatter: formatter, + serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = normalizeStringifyOptions(opts); + + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; } - if (isWeakSet(obj)) { - return weakCollectionOf('WeakSet'); + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; } - if (isWeakRef(obj)) { - return weakCollectionOf('WeakRef'); + + var arrayFormat; + if (opts && opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if (opts && 'indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { + throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); + var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; + + if (!objKeys) { + objKeys = Object.keys(obj); } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); + + if (options.sort) { + objKeys.sort(options.sort); } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); + + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (options.skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + commaRoundTrip, + options.strictNullHandling, + options.skipNulls, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel + )); } - if (!isDate(obj) && !isRegExp(obj)) { - var ys = arrObjKeys(obj, inspect); - var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; - var protoTag = obj instanceof Object ? '' : 'null prototype'; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; - var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; - var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); - if (ys.length === 0) { return tag + '{}'; } - if (indent) { - return tag + '{' + indentedJoin(ys, indent) + '}'; + + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark + prefix += 'utf8=%26%2310003%3B&'; + } else { + // encodeURIComponent('✓') + prefix += 'utf8=%E2%9C%93&'; } - return tag + '{ ' + $join.call(ys, ', ') + ' }'; } - return String(obj); -}; -function wrapQuotes(s, defaultStyle, opts) { - var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; - return quoteChar + s + quoteChar; -} + return joined.length > 0 ? prefix + joined : ''; +}; -function quote(s) { - return $replace.call(String(s), /"/g, '"'); -} -function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +/***/ }), -// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives -function isSymbol(obj) { - if (hasShammedSymbols) { - return obj && typeof obj === 'object' && obj instanceof Symbol; - } - if (typeof obj === 'symbol') { - return true; - } - if (!obj || typeof obj !== 'object' || !symToString) { - return false; - } - try { - symToString.call(obj); - return true; - } catch (e) {} - return false; -} +/***/ 2360: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function isBigInt(obj) { - if (!obj || typeof obj !== 'object' || !bigIntValueOf) { - return false; - } - try { - bigIntValueOf.call(obj); - return true; - } catch (e) {} - return false; -} +"use strict"; -var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; -function has(obj, key) { - return hasOwn.call(obj, key); -} -function toStr(obj) { - return objectToString.call(obj); -} +var formats = __nccwpck_require__(4907); -function nameOf(f) { - if (f.name) { return f.name; } - var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); - if (m) { return m[1]; } - return null; -} +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; -function indexOf(xs, x) { - if (xs.indexOf) { return xs.indexOf(x); } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { return i; } +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } - return -1; -} -function isMap(x) { - if (!mapSize || !x || typeof x !== 'object') { - return false; + return array; +}()); + +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + + if (isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } } - try { - mapSize.call(x); - try { - setSize.call(x); - } catch (s) { - return true; +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; } - return x instanceof Map; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} + } -function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== 'object') { - return false; + return obj; +}; + +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; } - try { - weakMapHas.call(x, weakMapHas); - try { - weakSetHas.call(x, weakSetHas); - } catch (s) { - return true; + + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; } - return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} -function isWeakRef(x) { - if (!weakRefDeref || !x || typeof x !== 'object') { - return false; + return target; } - try { - weakRefDeref.call(x); - return true; - } catch (e) {} - return false; -} -function isSet(x) { - if (!setSize || !x || typeof x !== 'object') { - return false; + if (!target || typeof target !== 'object') { + return [target].concat(source); } - try { - setSize.call(x); - try { - mapSize.call(x); - } catch (m) { - return true; - } - return x instanceof Set; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} -function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== 'object') { - return false; + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); } - try { - weakSetHas.call(x, weakSetHas); - try { - weakMapHas.call(x, weakMapHas); - } catch (s) { - return true; - } - return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} -function isElement(x) { - if (!x || typeof x !== 'object') { return false; } - if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { - return true; + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; } - return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; -} -function inspectString(str, opts) { - if (str.length > opts.maxStringLength) { - var remaining = str.length - opts.maxStringLength; - var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); - return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; - } - // eslint-disable-next-line no-control-regex - var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, 'single', opts); -} + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; -function lowbyte(c) { - var n = c.charCodeAt(0); - var x = { - 8: 'b', - 9: 't', - 10: 'n', - 12: 'f', - 13: 'r' - }[n]; - if (x) { return '\\' + x; } - return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); -} + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; -function markBoxed(str) { - return 'Object(' + str + ')'; -} +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; -function weakCollectionOf(type) { - return type + ' { ? }'; -} +var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; -function collectionOf(type, size, entries, indent) { - var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); - return type + ' (' + size + ') {' + joinedEntries + '}'; -} +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } -function singleLineValues(xs) { - for (var i = 0; i < xs.length; i++) { - if (indexOf(xs[i], '\n') >= 0) { - return false; - } + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); } - return true; -} -function getIndent(opts, depth) { - var baseIndent; - if (opts.indent === '\t') { - baseIndent = '\t'; - } else if (typeof opts.indent === 'number' && opts.indent > 0) { - baseIndent = $join.call(Array(opts.indent + 1), ' '); - } else { - return null; + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); } - return { - base: baseIndent, - prev: $join.call(Array(depth + 1), baseIndent) - }; -} -function indentedJoin(xs, indent) { - if (xs.length === 0) { return ''; } - var lineJoiner = '\n' + indent.prev + indent.base; - return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; -} + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); -function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); - var xs = []; - if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + out += string.charAt(i); + continue; } - } - var syms = typeof gOPS === 'function' ? gOPS(obj) : []; - var symMap; - if (hasShammedSymbols) { - symMap = {}; - for (var k = 0; k < syms.length; k++) { - symMap['$' + syms[k]] = syms[k]; + + if (c < 0x80) { + out = out + hexTable[c]; + continue; } - } - for (var key in obj) { // eslint-disable-line no-restricted-syntax - if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { - // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section - continue; // eslint-disable-line no-restricted-syntax, no-continue - } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); - } else { - xs.push(key + ': ' + inspect(obj[key], obj)); + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; } - if (typeof gOPS === 'function') { - for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); } } } - return xs; -} + compactQueue(queue); -/***/ }), + return value; +}; -/***/ 7265: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; -module.exports = __nccwpck_require__(3837).inspect; +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +var combine = function combine(a, b) { + return [].concat(a, b); +}; + +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; /***/ }), -/***/ 1223: +/***/ 1359: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var wrappy = __nccwpck_require__(2940) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) +"use strict"; +// 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. -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) +// 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. - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} +/**/ +var pna = __nccwpck_require__(7810); +/**/ -/***/ }), +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ -/***/ 8714: -/***/ ((module) => { +module.exports = Duplex; -"use strict"; +/**/ +var util = Object.create(__nccwpck_require__(5898)); +util.inherits = __nccwpck_require__(4124); +/**/ +var Readable = __nccwpck_require__(1433); +var Writable = __nccwpck_require__(6993); -function posix(path) { - return path.charAt(0) === '/'; +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 win32(path) { - // /~https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} + Readable.call(this, options); + Writable.call(this, options); -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; + 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; -/***/ 7810: -/***/ ((module) => { + this.once('end', onend); +} -"use strict"; +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; -if (typeof process === 'undefined' || - !process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = { nextTick: nextTick }; -} else { - module.exports = process + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); } -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]; +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); + 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); +}; /***/ }), -/***/ 4907: -/***/ ((module) => { +/***/ 1542: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// 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. -var replace = String.prototype.replace; -var percentTwenties = /%20/g; - -var Format = { - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; -module.exports = { - 'default': Format.RFC3986, - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return String(value); - } - }, - RFC1738: Format.RFC1738, - RFC3986: Format.RFC3986 -}; +module.exports = PassThrough; -/***/ }), +var Transform = __nccwpck_require__(4415); -/***/ 2760: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/**/ +var util = Object.create(__nccwpck_require__(5898)); +util.inherits = __nccwpck_require__(4124); +/**/ -"use strict"; +util.inherits(PassThrough, Transform); +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); -var stringify = __nccwpck_require__(9954); -var parse = __nccwpck_require__(3912); -var formats = __nccwpck_require__(4907); + Transform.call(this, options); +} -module.exports = { - formats: formats, - parse: parse, - stringify: stringify +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); }; - /***/ }), -/***/ 3912: +/***/ 1433: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -var utils = __nccwpck_require__(2360); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; -var defaults = { - allowDots: false, - allowPrototypes: false, - allowSparse: false, - arrayLimit: 20, - charset: 'utf-8', - charsetSentinel: false, - comma: false, - decoder: utils.decode, - delimiter: '&', - depth: 5, - ignoreQueryPrefix: false, - interpretNumericEntities: false, - parameterLimit: 1000, - parseArrays: true, - plainObjects: false, - strictNullHandling: false -}; +/**/ -var interpretNumericEntities = function (str) { - return str.replace(/&#(\d+);/g, function ($0, numberStr) { - return String.fromCharCode(parseInt(numberStr, 10)); - }); -}; +var pna = __nccwpck_require__(7810); +/**/ -var parseArrayValue = function (val, options) { - if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { - return val.split(','); - } +module.exports = Readable; - return val; -}; +/**/ +var isArray = __nccwpck_require__(2873); +/**/ -// This is what browsers will submit when the ✓ character occurs in an -// application/x-www-form-urlencoded body and the encoding of the page containing -// the form is iso-8859-1, or when the submitted form has an accept-charset -// attribute of iso-8859-1. Presumably also with other charsets that do not contain -// the ✓ character, such as us-ascii. -var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') +/**/ +var Duplex; +/**/ -// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. -var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') +Readable.ReadableState = ReadableState; -var parseValues = function parseQueryStringValues(str, options) { - var obj = {}; - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split(options.delimiter, limit); - var skipIndex = -1; // Keep track of where the utf8 sentinel was found - var i; +/**/ +var EE = (__nccwpck_require__(2361).EventEmitter); - var charset = options.charset; - if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf('utf8=') === 0) { - if (parts[i] === charsetSentinel) { - charset = 'utf-8'; - } else if (parts[i] === isoSentinel) { - charset = 'iso-8859-1'; - } - skipIndex = i; - i = parts.length; // The eslint settings do not allow break; - } - } - } +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ - for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } - var part = parts[i]; +/**/ +var Stream = __nccwpck_require__(2387); +/**/ - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; +/**/ - var key, val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder, charset, 'key'); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); - val = utils.maybeMap( - parseArrayValue(part.slice(pos + 1), options), - function (encodedVal) { - return options.decoder(encodedVal, defaults.decoder, charset, 'value'); - } - ); - } +var Buffer = (__nccwpck_require__(1867).Buffer); +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} - if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { - val = interpretNumericEntities(val); - } +/**/ - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } +/**/ +var util = Object.create(__nccwpck_require__(5898)); +util.inherits = __nccwpck_require__(4124); +/**/ - if (has.call(obj, key)) { - obj[key] = utils.combine(obj[key], val); - } else { - obj[key] = val; - } - } +/**/ +var debugUtil = __nccwpck_require__(3837); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ - return obj; -}; +var BufferList = __nccwpck_require__(7053); +var destroyImpl = __nccwpck_require__(7049); +var StringDecoder; -var parseObject = function (chain, val, options, valuesParsed) { - var leaf = valuesParsed ? val : parseArrayValue(val, options); +util.inherits(Readable, Stream); - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - if (root === '[]' && options.parseArrays) { - obj = [].concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var index = parseInt(cleanRoot, 10); - if (!options.parseArrays && cleanRoot === '') { - obj = { 0: leaf }; - } else if ( - !isNaN(index) - && root !== cleanRoot - && String(index) === cleanRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else if (cleanRoot !== '__proto__') { - obj[cleanRoot] = leaf; - } - } +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); - leaf = obj; - } + // 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]]; +} - return leaf; -}; +function ReadableState(options, stream) { + Duplex = Duplex || __nccwpck_require__(1359); -var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { - if (!givenKey) { - return; - } + options = options || {}; - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + // 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; - // The regex chunks + // 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; - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - // Get the parent + // 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; - var segment = options.depth > 0 && brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - // Stash the parent if it exists + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } + // 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; - keys.push(parent); - } + // 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; - // Loop through children appending to the array until we hit depth + // 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; - var i = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } + // has it been destroyed + this.destroyed = false; - // If there's a remainder, just add whatever is left + // 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'; - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; - return parseObject(keys, val, options, valuesParsed); -}; + // if true, a maybeReadMore has been scheduled + this.readingMore = false; -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = (__nccwpck_require__(4841)/* .StringDecoder */ .s); + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} - if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } +function Readable(options) { + Duplex = Duplex || __nccwpck_require__(1359); - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; + if (!(this instanceof Readable)) return new Readable(options); - return { - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; + this._readableState = new ReadableState(options, this); -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); + // legacy + this.readable = true; - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } + if (options) { + if (typeof options.read === 'function') this._read = options.read; - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } - // Iterate over the keys and setup the new object + Stream.call(this); +} - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); - obj = utils.merge(obj, newObj, options); +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; } - - if (options.allowSparse === true) { - return obj; + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; } - return utils.compact(obj); -}; + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); - -/***/ }), - -/***/ 9954: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var getSideChannel = __nccwpck_require__(4334); -var utils = __nccwpck_require__(2360); -var formats = __nccwpck_require__(4907); -var has = Object.prototype.hasOwnProperty; - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); }; -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; +// 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; -var toISO = Date.prototype.toISOString; + 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; + } -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - charset: 'utf-8', - charsetSentinel: false, - delimiter: '&', - encode: true, - encoder: utils.encode, - encodeValuesOnly: false, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); }; -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' - || typeof v === 'number' - || typeof v === 'boolean' - || typeof v === 'symbol' - || typeof v === 'bigint'; +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); }; -var sentinel = {}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - commaRoundTrip, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - sideChannel -) { - var obj = object; +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); + } - var tmpSc = sideChannel; - var step = 0; - var findFlag = false; - while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { - // Where object last appeared in the ref tree - var pos = tmpSc.get(object); - step += 1; - if (typeof pos !== 'undefined') { - if (pos === step) { - throw new RangeError('Cyclic object value'); - } else { - findFlag = true; // Break while - } - } - if (typeof tmpSc.get(sentinel) === 'undefined') { - step = 0; + 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; } + } - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = utils.maybeMap(obj, function (value) { - if (value instanceof Date) { - return serializeDate(value); - } - return value; - }); - } + return needMoreData(state); +} - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; - } +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); - obj = ''; - } + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } +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; +} - var values = []; +// 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); +} - if (typeof obj === 'undefined') { - return values; - } +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; - var objKeys; - if (generateArrayPrefix === 'comma' && isArray(obj)) { - // we need to join elements in - if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, encoder); - } - objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; - } else if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = (__nccwpck_require__(4841)/* .StringDecoder */ .s); + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; - var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; +// 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; +} - for (var j = 0; j < objKeys.length; ++j) { - var key = objKeys[j]; - var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; +// 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; +} - if (skipNulls && value === null) { - continue; - } +// 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; - var keyPrefix = isArray(obj) - ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix - : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); + if (n !== 0) state.emittedReadable = false; - sideChannel.set(object, step); - var valueSideChannel = getSideChannel(); - valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify( - value, - keyPrefix, - generateArrayPrefix, - commaRoundTrip, - strictNullHandling, - skipNulls, - generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - valueSideChannel - )); - } + // 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; + } - return values; -}; + n = howMuchToRead(n, state); -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } + // 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; + } - if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } + // 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. - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; + // 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); + } - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } + // 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); + } - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - format: format, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } - var objKeys; - var filter; + 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 (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } - var keys = []; + if (ret !== null) this.emit('data', ret); - if (typeof obj !== 'object' || obj === null) { - return ''; - } + return ret; +}; - var arrayFormat; - if (opts && opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if (opts && 'indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; +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; - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { - throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); - } - var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} - if (!objKeys) { - objKeys = Object.keys(obj); - } +// 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); + } +} - if (options.sort) { - objKeys.sort(options.sort); - } +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} - var sideChannel = getSideChannel(); - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; +// 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); + } +} - if (options.skipNulls && obj[key] === null) { - continue; - } - pushToArray(keys, stringify( - obj[key], - key, - generateArrayPrefix, - commaRoundTrip, - options.strictNullHandling, - options.skipNulls, - options.encode ? options.encoder : null, - options.filter, - options.sort, - options.allowDots, - options.serializeDate, - options.format, - options.formatter, - options.encodeValuesOnly, - options.charset, - sideChannel - )); - } - - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B&'; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93&'; - } - } +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; +} - return joined.length > 0 ? prefix + joined : ''; +// 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; -/***/ }), - -/***/ 2360: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - + 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 formats = __nccwpck_require__(4907); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } } + } - return array; -}()); + function onend() { + debug('onend'); + dest.end(); + } -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; + // 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); - if (isArray(obj)) { - var compacted = []; + 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); - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } + cleanedUp = true; - item.obj[item.prop] = compacted; - } - } -}; + // 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(); + } -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); } + } - return obj; -}; + // 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); + } -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); - if (typeof source !== 'object') { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } + // 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); - return target; - } + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } - if (!target || typeof target !== 'object') { - return [target].concat(source); - } + // tell the dest that it's being piped to + dest.emit('pipe', src); - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; + 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); } + }; +} - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; + // 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; -var decode = function (str, decoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; + if (!dest) dest = state.pipes; -var encode = function encode(str, defaultEncoder, charset, kind, format) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } + // slow case. multiple pipe destinations. - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, { hasUnpiped: false }); + }return this; + } - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) - ) { - out += string.charAt(i); - continue; - } + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } + dest.emit('unpipe', this, unpipeInfo); - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } + return this; +}; - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - /* eslint operator-linebreak: [2, "before"] */ - out += hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; +// 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 out; + return res; }; +Readable.prototype.addListener = Readable.prototype.on; -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; +// 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; +}; - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} - compactQueue(queue); +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } - return value; -}; + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; +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; }; -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; +// 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 combine = function combine(a, b) { - return [].concat(a, b); -}; + var state = this._readableState; + var paused = false; -var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped.push(fn(val[i])); - } - return mapped; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); } - return fn(val); -}; -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - maybeMap: maybeMap, - merge: merge -}; + _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; -/***/ 1359: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// 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. - - - -/**/ - -var pna = __nccwpck_require__(7810); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = Object.create(__nccwpck_require__(5898)); -util.inherits = __nccwpck_require__(4124); -/**/ - -var Readable = __nccwpck_require__(1433); -var Writable = __nccwpck_require__(6993); - -util.inherits(Duplex, Readable); + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); -{ - // 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]; + // 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); + } } -} - -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; + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + // 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(); + } + }; - this.once('end', onend); -} + return this; +}; -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { +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._writableState.highWaterMark; + return this._readableState.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; +// exposed for testing purposes only. +Readable._fromList = fromList; - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); +// 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; } -function onEndNT(self) { - self.end(); +// 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; } -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; +// 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; } - 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; + ++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; +} - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; +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); } -}); +} -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); +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'); + } +} - pna.nextTick(cb, err); -}; +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} /***/ }), -/***/ 1542: +/***/ 4415: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -23636,36 +24271,203 @@ Duplex.prototype._destroy = function (err, cb) { // 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. +// 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. -module.exports = PassThrough; +module.exports = Transform; -var Transform = __nccwpck_require__(4415); +var Duplex = __nccwpck_require__(1359); /**/ var util = Object.create(__nccwpck_require__(5898)); util.inherits = __nccwpck_require__(4124); /**/ -util.inherits(PassThrough, Transform); +util.inherits(Transform, Duplex); -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; - Transform.call(this, options); + 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); + } } -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); +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); +} + /***/ }), -/***/ 1433: +/***/ 6993: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -23690,6 +24492,10 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { // 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. + /**/ @@ -23697,23 +24503,47 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { var pna = __nccwpck_require__(7810); /**/ -module.exports = Readable; +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 isArray = __nccwpck_require__(2873); +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; /**/ /**/ var Duplex; /**/ -Readable.ReadableState = ReadableState; +Writable.WritableState = WritableState; /**/ -var EE = (__nccwpck_require__(2361).EventEmitter); +var util = Object.create(__nccwpck_require__(5898)); +util.inherits = __nccwpck_require__(4124); +/**/ -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; +/**/ +var internalUtil = { + deprecate: __nccwpck_require__(7127) }; /**/ @@ -23734,42 +24564,13 @@ function _isUint8Array(obj) { /**/ -/**/ -var util = Object.create(__nccwpck_require__(5898)); -util.inherits = __nccwpck_require__(4124); -/**/ - -/**/ -var debugUtil = __nccwpck_require__(3837); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = __nccwpck_require__(7053); var destroyImpl = __nccwpck_require__(7049); -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); +util.inherits(Writable, Stream); - // 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 nop() {} -function ReadableState(options, stream) { +function WritableState(options, stream) { Duplex = Duplex || __nccwpck_require__(1359); options = options || {}; @@ -23781,2913 +24582,2328 @@ function ReadableState(options, 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 + // 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.readableObjectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - // 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" + // 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 readableHwm = options.readableHighWaterMark; + var writableHwm = options.writableHighWaterMark; 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; + 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); - // 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; + // if _final has been called + this.finalCalled = false; - // 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; + // 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'; - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; + // 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; - // if true, a maybeReadMore has been scheduled - this.readingMore = false; + // a flag to see when we're in the middle of a write. + this.writing = false; - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(4841)/* .StringDecoder */ .s); - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} + // when true all writes will be buffered until .uncork() call + this.corked = 0; -function Readable(options) { - Duplex = Duplex || __nccwpck_require__(1359); + // 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; - if (!(this instanceof Readable)) return new Readable(options); + // 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; - this._readableState = new ReadableState(options, this); + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; - // legacy - this.readable = true; + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; - if (options) { - if (typeof options.read === 'function') this._read = options.read; + // the amount that is being written when _write is called. + this.writelen = 0; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } + this.bufferedRequest = null; + this.lastBufferedRequest = null; - Stream.call(this); -} + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; -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; - } + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; + // count buffered requests + this.bufferedRequestCount = 0; -// 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; + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} - 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; +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + return out; }; -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); -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); - } +// 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; - 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 object && object._writableState instanceof WritableState; } - } - - return needMoreData(state); + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; } -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); +function Writable(options) { + Duplex = Duplex || __nccwpck_require__(1359); - if (state.needReadable) emitReadable(stream); + // 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); } - 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'); + 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; } - 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); + Stream.call(this); } -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(4841)/* .StringDecoder */ .s); - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); }; -// 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; +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); } -// 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; +// 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 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; + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; } - return state.length; + return valid; } -// 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; +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); - // 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; + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); } - 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; + if (typeof encoding === 'function') { + cb = encoding; + encoding = 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 (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - // 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); - } + if (typeof cb !== 'function') cb = nop; - // 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); + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); } - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } + return ret; +}; - 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; +Writable.prototype.cork = function () { + var state = this._writableState; - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } + state.corked++; +}; - if (ret !== null) this.emit('data', ret); +Writable.prototype.uncork = function () { + var state = this._writableState; - return ret; -}; + if (state.corked) { + state.corked--; -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; - } + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); } - state.ended = true; +}; - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} +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; +}; -// 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 decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); } + return chunk; } -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); +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; } -} +}); -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; +// 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; + } } - state.readingMore = false; -} + var len = state.objectMode ? 1 : chunk.length; -// 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')); -}; + state.length += len; -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; + 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); } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + return ret; +} - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); +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; +} - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; - function onend() { - debug('onend'); - dest.end(); + 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); } +} - // 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); +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} - 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); +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; - cleanedUp = true; + onwriteStateUpdate(state); - // 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 (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 the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); } - } - // 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); + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } } +} - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} - // 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(); +// 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'); } - dest.once('finish', onfinish); +} - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; - // tell the dest that it's being piped to - dest.emit('pipe', src); + 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; - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; - return dest; -}; + doWrite(stream, state, true, state.length, buffer, '', holder.finish); -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); + // 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); } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; + 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; - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; + 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; + } + } - // 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 (entry === null) state.lastBufferedRequest = null; + } - if (!dest) dest = state.pipes; + state.bufferedRequest = entry; + state.bufferProcessing = false; +} - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; - // slow case. multiple pipe destinations. +Writable.prototype._writev = null; - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, { hasUnpiped: false }); - }return this; + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; } - // 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]; + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - dest.emit('unpipe', this, unpipeInfo); + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } - return this; + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); }; -// 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); - } +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'); } } - - 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); +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } } - return this; -}; + return need; +} -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); +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 resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); +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; } - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; } -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'); +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; } - return this; +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); }; -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; +/***/ 7053: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var state = this._readableState; - var paused = false; +"use strict"; - 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); - }); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); +var Buffer = (__nccwpck_require__(1867).Buffer); +var util = __nccwpck_require__(3837); - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); - // 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); - } + this.head = null; + this.tail = null; + this.length = 0; } - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } + 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; + }; - // 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(); - } + 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; }; - return this; -}; + 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; + }; -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; - } -}); + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; -// exposed for testing purposes only. -Readable._fromList = fromList; + 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; + }; -// 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; + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; - 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 BufferList; +}(); - return ret; +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; + }; } -// 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; -} +/***/ 7049: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// 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); +"use strict"; + + +/**/ + +var pna = __nccwpck_require__(7810); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + pna.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, this, err); } - break; } - ++c; + + return this; } - list.length -= c; - return ret; -} -function endReadable(stream) { - var state = stream._readableState; + // 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 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 (this._readableState) { + this._readableState.destroyed = true; + } - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; } + + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + pna.nextTick(emitErrorNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, _this, err); + } + } else if (cb) { + cb(err); + } + }); + + return this; } -function 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 undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; } -} -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; } - return -1; } +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; + /***/ }), -/***/ 4415: +/***/ 2387: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -// 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. +module.exports = __nccwpck_require__(2781); -// 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. +/***/ }), +/***/ 2873: +/***/ ((module) => { -module.exports = Transform; +var toString = {}.toString; -var Duplex = __nccwpck_require__(1359); +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; -/**/ -var util = Object.create(__nccwpck_require__(5898)); -util.inherits = __nccwpck_require__(4124); -/**/ -util.inherits(Transform, Duplex); +/***/ }), -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; +/***/ 1642: +/***/ ((module, exports, __nccwpck_require__) => { - var cb = ts.writecb; +var Stream = __nccwpck_require__(2781); +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 = __nccwpck_require__(1433); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = __nccwpck_require__(6993); + exports.Duplex = __nccwpck_require__(1359); + exports.Transform = __nccwpck_require__(4415); + exports.PassThrough = __nccwpck_require__(1542); +} - 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); +/***/ 1867: +/***/ ((module, exports, __nccwpck_require__) => { - cb(er); +/* eslint-disable node/no-deprecated-api */ +var buffer = __nccwpck_require__(4300) +var Buffer = buffer.Buffer - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); +// 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 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; +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) - if (typeof options.flush === 'function') this._flush = options.flush; +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); + return Buffer(arg, encodingOrOffset, length) } -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); +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 { - done(this, null, null); + buf.fill(0) } + return buf } -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} -// 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; +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') } -}; - -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); + return buffer.SlowBuffer(size) } + /***/ }), -/***/ 6993: +/***/ 4056: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// 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. - - - -/**/ - -var pna = __nccwpck_require__(7810); -/**/ - -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 GetIntrinsic = __nccwpck_require__(4538); +var define = __nccwpck_require__(4564); +var hasDescriptors = __nccwpck_require__(176)(); +var gOPD = __nccwpck_require__(8501); -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ +var $TypeError = GetIntrinsic('%TypeError%'); +var $floor = GetIntrinsic('%Math.floor%'); -/**/ -var Duplex; -/**/ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } -Writable.WritableState = WritableState; + var loose = arguments.length > 2 && !!arguments[2]; -/**/ -var util = Object.create(__nccwpck_require__(5898)); -util.inherits = __nccwpck_require__(4124); -/**/ + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } -/**/ -var internalUtil = { - deprecate: __nccwpck_require__(7127) + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(fn, 'length', length, true, true); + } else { + define(fn, 'length', length); + } + } + return fn; }; -/**/ - -/**/ -var Stream = __nccwpck_require__(2387); -/**/ - -/**/ - -var Buffer = (__nccwpck_require__(1867).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ -var destroyImpl = __nccwpck_require__(7049); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || __nccwpck_require__(1359); - - 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); +/***/ 6062: +/***/ (function() { - // if _final has been called - this.finalCalled = false; +(function (global, undefined) { + "use strict"; - // 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; + if (global.setImmediate) { + return; + } - // has it been destroyed - this.destroyed = false; + var nextHandle = 1; // Spec says greater than zero + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global.document; + var registerImmediate; - // 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; + function setImmediate(callback) { + // Callback can either be a function or a string + if (typeof callback !== "function") { + callback = new Function("" + callback); + } + // Copy function arguments + var args = new Array(arguments.length - 1); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 1]; + } + // Store and register the task + var task = { callback: callback, args: args }; + tasksByHandle[nextHandle] = task; + registerImmediate(nextHandle); + return nextHandle++; + } - // 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'; + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } - // 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; + function run(task) { + var callback = task.callback; + var args = task.args; + switch (args.length) { + case 0: + callback(); + break; + case 1: + callback(args[0]); + break; + case 2: + callback(args[0], args[1]); + break; + case 3: + callback(args[0], args[1], args[2]); + break; + default: + callback.apply(undefined, args); + break; + } + } - // a flag to see when we're in the middle of a write. - this.writing = false; + function runIfPresent(handle) { + // From the spec: "Wait until any invocations of this algorithm started before this one have completed." + // So if we're currently running a task, we'll need to delay this invocation. + if (currentlyRunningATask) { + // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a + // "too much recursion" error. + setTimeout(runIfPresent, 0, handle); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + run(task); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } - // when true all writes will be buffered until .uncork() call - this.corked = 0; + function installNextTickImplementation() { + registerImmediate = function(handle) { + process.nextTick(function () { runIfPresent(handle); }); + }; + } - // 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; + function canUsePostMessage() { + // The test against `importScripts` prevents this implementation from being installed inside a web worker, + // where `global.postMessage` means something completely different and can't be used for this purpose. + if (global.postMessage && !global.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global.onmessage; + global.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global.postMessage("", "*"); + global.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } - // 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; + function installPostMessageImplementation() { + // Installs an event handler on `global` for the `message` event: see + // * https://developer.mozilla.org/en/DOM/window.postMessage + // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global && + typeof event.data === "string" && + event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; + if (global.addEventListener) { + global.addEventListener("message", onGlobalMessage, false); + } else { + global.attachEvent("onmessage", onGlobalMessage); + } - // the amount that is being written when _write is called. - this.writelen = 0; + registerImmediate = function(handle) { + global.postMessage(messagePrefix + handle, "*"); + }; + } - this.bufferedRequest = null; - this.lastBufferedRequest = null; + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; + registerImmediate = function(handle) { + channel.port2.postMessage(handle); + }; + } - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + registerImmediate = function(handle) { + // Create a