From 5ba61cc0e4345343d636e2d300bdb5928c80dcde Mon Sep 17 00:00:00 2001 From: Joe Hildebrand Date: Tue, 9 Feb 2021 10:41:40 -0700 Subject: [PATCH] Switch to monorepo format and clean up all the things --- .github/workflows/node.js.yml | 28 +- .gitignore | 2 + .ncurc.js | 7 + .npmrc | 1 - .yarnrc.yml | 2 + LICENSE.md | 2 +- README.md | 229 +- docs/CborMap.html | 38 +- docs/Commented.html | 6 +- docs/Decoder.html | 14 +- docs/Diagnose.html | 6 +- docs/Encoder.html | 20 +- docs/Simple.html | 14 +- docs/Tagged.html | 10 +- docs/cbor.js.html | 2 +- docs/commented.js.html | 7 +- docs/decoder.js.html | 22 +- docs/diagnose.js.html | 6 +- docs/encoder.js.html | 39 +- docs/example/bignumber.js | 2902 +++++++++++++++++ docs/example/bundle-bf.js | 15 +- docs/example/bundle-wp.js | 943 +----- docs/example/cbor.js | 2 + docs/example/index-bf.html | 1 + docs/example/index-bf.js | 2376 +------------- ...-bf.js.tmp-browserify-16819378988242195128 | 0 docs/example/index-p.78aab2ad.js | 23 + docs/example/index-p.859a6f20.js | 131 - docs/example/index-p.html | 6 +- docs/example/index-plain.html | 50 + docs/example/index-plain.js | 120 + docs/example/index-wp.html | 5 +- docs/example/index.html | 1 + docs/example/inspect.js | 1 + ...{style.80b7dbd2.css => style.84fa17d8.css} | 3 +- docs/global.html | 149 +- docs/index.html | 2 +- docs/map.js.html | 3 +- docs/simple.js.html | 12 +- docs/tagged.js.html | 177 +- docs/utils.js.html | 63 +- examples/browserify-demo/package.json | 20 - examples/webpack-demo/package.json | 28 - package.json | 85 +- .../browserify-demo/.gitignore | 0 {examples => packages}/browserify-demo/.npmrc | 0 {cli => packages/browserify-demo}/LICENSE.md | 2 +- packages/browserify-demo/package.json | 22 + .../browserify-demo/src/index-bf.html | 1 + .../browserify-demo/src/index.js | 3 +- .../browserify-demo/src/style.css | 0 {cli => packages/cbor-cli}/.npmignore | 0 {cli => packages/cbor-cli}/.npmrc | 0 packages/cbor-cli/LICENSE.md | 20 + {cli => packages/cbor-cli}/README.md | 0 {cli => packages/cbor-cli}/bin/cbor.js | 4 +- .../cbor-cli}/bin/cbor2comment.js | 0 {cli => packages/cbor-cli}/bin/cbor2diag.js | 0 {cli => packages/cbor-cli}/bin/cbor2json.js | 0 {cli => packages/cbor-cli}/bin/json2cbor.js | 0 {cli => packages/cbor-cli}/lib/utils.js | 0 {cli => packages/cbor-cli}/man/cbor.1.gz | Bin .../cbor-cli}/man/cbor2comment.1.gz | Bin {cli => packages/cbor-cli}/man/cbor2diag.1.gz | Bin {cli => packages/cbor-cli}/man/cbor2json.1.gz | Bin {cli => packages/cbor-cli}/man/json2cbor.1.gz | Bin {cli => packages/cbor-cli}/man_src/cbor.md | 0 .../cbor-cli}/man_src/cbor2comment.md | 0 .../cbor-cli}/man_src/cbor2diag.md | 0 .../cbor-cli}/man_src/cbor2json.md | 0 .../cbor-cli}/man_src/json2cbor.md | 0 {cli => packages/cbor-cli}/package.json | 8 +- {cli => packages/cbor-cli}/test/exec.ava.js | 1 - {cli => packages/cbor-cli}/test/utils.ava.js | 0 packages/cbor-web/.npmrc | 2 + packages/cbor-web/LICENSE.md | 20 + packages/cbor-web/dist/cbor.js | 2 + packages/cbor-web/dist/cbor.js.LICENSE.txt | 10 + packages/cbor-web/lib/.eslintrc.js | 7 + packages/cbor-web/lib/cbor.js | 1 + packages/cbor-web/package.json | 22 + packages/cbor-web/webpack.config.js | 32 + .../cbor/.checkVersion.js | 0 .dockerignore => packages/cbor/.dockerignore | 0 .jsdoc.conf => packages/cbor/.jsdoc.conf | 2 +- packages/cbor/.ncurc.js | 7 + .npmignore => packages/cbor/.npmignore | 0 packages/cbor/.npmrc | 2 + Dockerfile => packages/cbor/Dockerfile | 0 packages/cbor/LICENSE.md | 20 + packages/cbor/README.md | 221 ++ {lib => packages/cbor/lib}/cbor.js | 0 {lib => packages/cbor/lib}/commented.js | 0 {lib => packages/cbor/lib}/constants.js | 0 {lib => packages/cbor/lib}/decoder.js | 0 {lib => packages/cbor/lib}/diagnose.js | 0 {lib => packages/cbor/lib}/encoder.js | 0 {lib => packages/cbor/lib}/map.js | 0 {lib => packages/cbor/lib}/simple.js | 0 {lib => packages/cbor/lib}/tagged.js | 6 +- {lib => packages/cbor/lib}/utils.js | 0 packages/cbor/package.json | 73 + {test => packages/cbor/test}/cases.js | 0 {test => packages/cbor/test}/commented.ava.js | 0 {test => packages/cbor/test}/constants.ava.js | 0 {test => packages/cbor/test}/decoder.ava.js | 2 +- {test => packages/cbor/test}/diagnose.ava.js | 0 {test => packages/cbor/test}/encoder.ava.js | 0 {test => packages/cbor/test}/garbage.ava.js | 0 .../cbor/test}/implementation_matrix.js | 0 {test => packages/cbor/test}/map.ava.js | 0 {test => packages/cbor/test}/simple.ava.js | 0 {test => packages/cbor/test}/streams.js | 0 {test => packages/cbor/test}/tagged.ava.js | 0 .../cbor/test}/test-vectors.ava.js | 18 +- {test => packages/cbor/test}/utils.ava.js | 0 tsconfig.json => packages/cbor/tsconfig.json | 0 {types => packages/cbor/types}/lib/cbor.d.ts | 0 .../cbor/types}/lib/commented.d.ts | 0 .../cbor/types}/lib/constants.d.ts | 0 .../cbor/types}/lib/decoder.d.ts | 0 .../cbor/types}/lib/diagnose.d.ts | 0 .../cbor/types}/lib/encoder.d.ts | 0 {types => packages/cbor/types}/lib/map.d.ts | 0 .../cbor/types}/lib/simple.d.ts | 0 .../cbor/types}/lib/tagged.d.ts | 0 {types => packages/cbor/types}/lib/utils.d.ts | 0 .../vendor/binary-parse-stream/index.d.ts | 0 .../vendor}/binary-parse-stream/README.md | 0 .../cbor/vendor}/binary-parse-stream/index.js | 0 {examples => packages}/parcel-demo/.gitignore | 0 {examples => packages}/parcel-demo/.npmrc | 0 packages/parcel-demo/LICENSE.md | 20 + .../parcel-demo/package.json | 12 +- .../parcel-demo/src/index-p.html | 3 - .../parcel-demo/src/index-p.js | 10 +- .../parcel-demo/src/style.css | 0 packages/plain-demo/.gitignore | 1 + packages/plain-demo/.npmrc | 2 + packages/plain-demo/build.js | 71 + packages/plain-demo/package.json | 18 + packages/plain-demo/src/index-plain.html | 50 + packages/plain-demo/src/index-plain.js | 120 + .../plain-demo}/src/index.html | 1 + .../plain-demo}/src/style.css | 0 .../webpack-demo/.gitignore | 1 + {examples => packages}/webpack-demo/.npmrc | 0 packages/webpack-demo/LICENSE.md | 20 + packages/webpack-demo/package.json | 24 + .../webpack-demo/src/index-wp.js | 11 +- packages/webpack-demo/src/style.css | 30 + .../webpack-demo/src/webpack.html | 1 + .../webpack-demo/webpack.config.js | 14 +- 153 files changed, 4546 insertions(+), 3944 deletions(-) create mode 100644 .ncurc.js create mode 100644 .yarnrc.yml create mode 100644 docs/example/bignumber.js create mode 100644 docs/example/cbor.js create mode 100644 docs/example/index-bf.js.tmp-browserify-16819378988242195128 create mode 100644 docs/example/index-p.78aab2ad.js delete mode 100644 docs/example/index-p.859a6f20.js create mode 100644 docs/example/index-plain.html create mode 100644 docs/example/index-plain.js create mode 100644 docs/example/inspect.js rename docs/example/{style.80b7dbd2.css => style.84fa17d8.css} (67%) delete mode 100644 examples/browserify-demo/package.json delete mode 100644 examples/webpack-demo/package.json rename {examples => packages}/browserify-demo/.gitignore (100%) rename {examples => packages}/browserify-demo/.npmrc (100%) rename {cli => packages/browserify-demo}/LICENSE.md (96%) create mode 100644 packages/browserify-demo/package.json rename {examples => packages}/browserify-demo/src/index-bf.html (95%) rename {examples => packages}/browserify-demo/src/index.js (96%) rename {examples => packages}/browserify-demo/src/style.css (100%) rename {cli => packages/cbor-cli}/.npmignore (100%) rename {cli => packages/cbor-cli}/.npmrc (100%) create mode 100644 packages/cbor-cli/LICENSE.md rename {cli => packages/cbor-cli}/README.md (100%) rename {cli => packages/cbor-cli}/bin/cbor.js (97%) rename {cli => packages/cbor-cli}/bin/cbor2comment.js (100%) rename {cli => packages/cbor-cli}/bin/cbor2diag.js (100%) rename {cli => packages/cbor-cli}/bin/cbor2json.js (100%) rename {cli => packages/cbor-cli}/bin/json2cbor.js (100%) rename {cli => packages/cbor-cli}/lib/utils.js (100%) rename {cli => packages/cbor-cli}/man/cbor.1.gz (100%) rename {cli => packages/cbor-cli}/man/cbor2comment.1.gz (100%) rename {cli => packages/cbor-cli}/man/cbor2diag.1.gz (100%) rename {cli => packages/cbor-cli}/man/cbor2json.1.gz (100%) rename {cli => packages/cbor-cli}/man/json2cbor.1.gz (100%) rename {cli => packages/cbor-cli}/man_src/cbor.md (100%) rename {cli => packages/cbor-cli}/man_src/cbor2comment.md (100%) rename {cli => packages/cbor-cli}/man_src/cbor2diag.md (100%) rename {cli => packages/cbor-cli}/man_src/cbor2json.md (100%) rename {cli => packages/cbor-cli}/man_src/json2cbor.md (100%) rename {cli => packages/cbor-cli}/package.json (94%) rename {cli => packages/cbor-cli}/test/exec.ava.js (99%) rename {cli => packages/cbor-cli}/test/utils.ava.js (100%) create mode 100644 packages/cbor-web/.npmrc create mode 100644 packages/cbor-web/LICENSE.md create mode 100644 packages/cbor-web/dist/cbor.js create mode 100644 packages/cbor-web/dist/cbor.js.LICENSE.txt create mode 100644 packages/cbor-web/lib/.eslintrc.js create mode 100644 packages/cbor-web/lib/cbor.js create mode 100644 packages/cbor-web/package.json create mode 100644 packages/cbor-web/webpack.config.js rename .checkVersion.js => packages/cbor/.checkVersion.js (100%) rename .dockerignore => packages/cbor/.dockerignore (100%) rename .jsdoc.conf => packages/cbor/.jsdoc.conf (90%) create mode 100644 packages/cbor/.ncurc.js rename .npmignore => packages/cbor/.npmignore (100%) create mode 100644 packages/cbor/.npmrc rename Dockerfile => packages/cbor/Dockerfile (100%) create mode 100644 packages/cbor/LICENSE.md create mode 100644 packages/cbor/README.md rename {lib => packages/cbor/lib}/cbor.js (100%) rename {lib => packages/cbor/lib}/commented.js (100%) rename {lib => packages/cbor/lib}/constants.js (100%) rename {lib => packages/cbor/lib}/decoder.js (100%) rename {lib => packages/cbor/lib}/diagnose.js (100%) rename {lib => packages/cbor/lib}/encoder.js (100%) rename {lib => packages/cbor/lib}/map.js (100%) rename {lib => packages/cbor/lib}/simple.js (100%) rename {lib => packages/cbor/lib}/tagged.js (98%) rename {lib => packages/cbor/lib}/utils.js (100%) create mode 100644 packages/cbor/package.json rename {test => packages/cbor/test}/cases.js (100%) rename {test => packages/cbor/test}/commented.ava.js (100%) rename {test => packages/cbor/test}/constants.ava.js (100%) rename {test => packages/cbor/test}/decoder.ava.js (99%) rename {test => packages/cbor/test}/diagnose.ava.js (100%) rename {test => packages/cbor/test}/encoder.ava.js (100%) rename {test => packages/cbor/test}/garbage.ava.js (100%) rename {test => packages/cbor/test}/implementation_matrix.js (100%) rename {test => packages/cbor/test}/map.ava.js (100%) rename {test => packages/cbor/test}/simple.ava.js (100%) rename {test => packages/cbor/test}/streams.js (100%) rename {test => packages/cbor/test}/tagged.ava.js (100%) rename {test => packages/cbor/test}/test-vectors.ava.js (85%) rename {test => packages/cbor/test}/utils.ava.js (100%) rename tsconfig.json => packages/cbor/tsconfig.json (100%) rename {types => packages/cbor/types}/lib/cbor.d.ts (100%) rename {types => packages/cbor/types}/lib/commented.d.ts (100%) rename {types => packages/cbor/types}/lib/constants.d.ts (100%) rename {types => packages/cbor/types}/lib/decoder.d.ts (100%) rename {types => packages/cbor/types}/lib/diagnose.d.ts (100%) rename {types => packages/cbor/types}/lib/encoder.d.ts (100%) rename {types => packages/cbor/types}/lib/map.d.ts (100%) rename {types => packages/cbor/types}/lib/simple.d.ts (100%) rename {types => packages/cbor/types}/lib/tagged.d.ts (100%) rename {types => packages/cbor/types}/lib/utils.d.ts (100%) rename {types => packages/cbor/types}/vendor/binary-parse-stream/index.d.ts (100%) rename {vendor => packages/cbor/vendor}/binary-parse-stream/README.md (100%) rename {vendor => packages/cbor/vendor}/binary-parse-stream/index.js (100%) rename {examples => packages}/parcel-demo/.gitignore (100%) rename {examples => packages}/parcel-demo/.npmrc (100%) create mode 100644 packages/parcel-demo/LICENSE.md rename {examples => packages}/parcel-demo/package.json (55%) rename {examples => packages}/parcel-demo/src/index-p.html (98%) rename {examples => packages}/parcel-demo/src/index-p.js (91%) rename {examples => packages}/parcel-demo/src/style.css (100%) create mode 100644 packages/plain-demo/.gitignore create mode 100644 packages/plain-demo/.npmrc create mode 100755 packages/plain-demo/build.js create mode 100644 packages/plain-demo/package.json create mode 100644 packages/plain-demo/src/index-plain.html create mode 100644 packages/plain-demo/src/index-plain.js rename {examples/browserify-demo => packages/plain-demo}/src/index.html (90%) rename {examples/webpack-demo => packages/plain-demo}/src/style.css (100%) rename {examples => packages}/webpack-demo/.gitignore (86%) rename {examples => packages}/webpack-demo/.npmrc (100%) create mode 100644 packages/webpack-demo/LICENSE.md create mode 100644 packages/webpack-demo/package.json rename {examples => packages}/webpack-demo/src/index-wp.js (91%) create mode 100644 packages/webpack-demo/src/style.css rename {examples => packages}/webpack-demo/src/webpack.html (94%) rename {examples => packages}/webpack-demo/webpack.config.js (62%) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ed57e4e2..c565cfea 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: @@ -25,29 +25,19 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: Install, production - uses: bahmutov/npm-install@v1 + run: yarn install --no-progress --no-lockfile env: NODE_ENV: production - name: Install test tools - uses: bahmutov/npm-install@v1 - with: - install-command: npm install --no-save ava nyc garbage - - name: Overwrite cli cbor version with .. - run: npm i .. - working-directory: cli - - name: Install cli, production - uses: bahmutov/npm-install@v1 - with: - working-directory: cli - env: - NODE_ENV: production + run: npm install --no-save ava nyc + - name: Install cbor test tools + run: npm install --no-save garbage bignumber.js + working-directory: ./packages/cbor - name: Install cli test tools - uses: bahmutov/npm-install@v1 - with: - working-directory: cli - install-command: npm install --no-save mock-stdio + run: npm install --no-save mock-stdio nofilter + working-directory: ./packages/cbor-cli - name: Test ${{ matrix.node-version }} - run: npm run lcov + run: npm run coverage - name: Coveralls Parallel uses: coverallsapp/github-action@master with: diff --git a/.gitignore b/.gitignore index 29c4a03d..fb1bc1c0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ shrinkwrap.yaml npm-debug.log t.js pnpm-lock.yaml +yarn.lock +yarn-error.log diff --git a/.ncurc.js b/.ncurc.js new file mode 100644 index 00000000..5538f385 --- /dev/null +++ b/.ncurc.js @@ -0,0 +1,7 @@ +'use strict' + +module.exports = { + reject: [ + "marked" + ] +} diff --git a/.npmrc b/.npmrc index 6d2307bb..4c1bf779 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,2 @@ engine-strict=true package-lock=false -link-workspace-packages = true \ No newline at end of file diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 00000000..30824702 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1,2 @@ +changesetIgnorePatterns: + - "./packages/*/test/*.js" diff --git a/LICENSE.md b/LICENSE.md index fa96d094..8dc658b2 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Joe Hildebrand +Copyright (c) 2021 Joe Hildebrand Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 9d2c0cf8..3428348d 100644 --- a/README.md +++ b/README.md @@ -1,221 +1,22 @@ -cbor -==== +# CBOR Encode and parse data in the Concise Binary Object Representation (CBOR) data format ([RFC7049](http://tools.ietf.org/html/rfc7049)). -Supported Node.js versions --------------------------- +## Pointers -This project now only supports versions of Node that the Node team is [currently supporting](https://github.com/nodejs/Release#release-schedule). Ava's [support statement](https://github.com/avajs/ava/blob/master/docs/support-statement.md) is what we will be using as well. Currently, that means Node `10`+ is required. If you need to support an older version of Node (back to version 6), use cbor version 5.2.x, which will get nothing but security updates from here on out. - -Installation: ------------- - -```bash -$ npm install --save cbor -``` - -**NOTE** -This package now requires node.js 8.3 or higher. It will work on node.js 6, in -a less-tested, less-featureful way. Please start upgrading if it is possible -for you. - -Documentation: -------------- -See the full API [documentation](http://hildjj.github.io/node-cbor/). - -For a command-line interface, see [cbor-cli](https://github.com/hildjj/node-cbor/tree/master/cli). - -Example: -```javascript -var cbor = require('cbor'); -var assert = require('assert'); - -var encoded = cbor.encode(true); // returns -cbor.decodeFirst(encoded, function(error, obj) { - // error != null if there was an error - // obj is the unpacked object - assert.ok(obj === true); -}); - -// Use integers as keys? -var m = new Map(); -m.set(1, 2); -encoded = cbor.encode(m); // -``` - -Allows streaming as well: - -```javascript -var cbor = require('cbor'); -var fs = require('fs'); - -var d = new cbor.Decoder(); -d.on('data', function(obj){ - console.log(obj); -}); - -var s = fs.createReadStream('foo'); -s.pipe(d); - -var d2 = new cbor.Decoder({input: '00', encoding: 'hex'}); -d.on('data', function(obj){ - console.log(obj); -}); -``` - -There is also support for synchronous decodes: - -```javascript -try { - console.log(cbor.decodeFirstSync('02')); // 2 - console.log(cbor.decodeAllSync('0202')); // [2, 2] -} catch (e) { - // throws on invalid input -} -``` - -The sync encoding and decoding are exported as a -[leveldb encoding](https://github.com/Level/levelup#custom_encodings), as -`cbor.leveldb`. - -## highWaterMark - -The synchronous routines for encoding and decoding will have problems with -objects that are larger than 16kB, which the default buffer size for Node -streams. There are a few ways to fix this: - -1) pass in a `highWaterMark` option with the value of the largest buffer size you think you will need: - -```javascript -cbor.encodeOne(Buffer.alloc(40000), {highWaterMark: 65535}) -``` - -2) use stream mode. Catch the `data`, `finish`, and `error` events. Make sure to call `end()` when you're done. - -```javascript -const enc = new cbor.Encoder() -enc.on('data', buf => /* send the data somewhere */) -enc.on('error', console.error) -enc.on('finish', () => /* tell the consumer we are finished */) +This is a monorepo that holds a few related packages: -enc.end(['foo', 1, false]) -``` + - [cbor](packages/cbor): a node-centric CBOR processor + - [cbor-web](packages/cbor-web): the `cbor` package compiled for use on the + web, including all of its non-optional dependencies + - [cbor-cli](packages/cbor-cli): a set of command-line tools for working with + the `cbor` package + - Examples: + - [webpack-demo](packages/webpack-demo): bundle `cbor` using [webpack](https://webpack.js.org/) + - [parcel-demo](packages/parcel-demo): bundle `cbor` using [parcel](https://parceljs.org/) + - [browserify-demo](packages/browserify-demo): bundle `cbor` using [browserify](http://browserify.org/) + - [plain-demo](packages/plain-demo): bundle `cbor` by just using `cbor-web` directly -3) use `encodeAsync()`, which uses the approach from approach 2 to return a memory-inefficient promise for a Buffer. +## Supported Node.js versions -## Supported types - -The following types are supported for encoding: - -* boolean -* number (including -0, NaN, and ±Infinity) -* string -* Array, Set (encoded as Array) -* Object (including null), Map -* undefined -* Buffer -* Date, -* RegExp -* url.URL -* BigInt (If your JS version supports them) -* [bignumber](https://github.com/MikeMcl/bignumber.js) - -Decoding supports the above types, including the following CBOR tag numbers: - -| Tag | Generated Type | -|-----|----------------| -| 0 | Date | -| 1 | Date | -| 2 | bignumber | -| 3 | bignumber | -| 4 | bignumber | -| 5 | bignumber | -| 32 | url.URL | -| 35 | RegExp | - -## Adding new Encoders - -There are several ways to add a new encoder: - -### `encodeCBOR` method - -This is the easiest approach, if you can modify the class being encoded. Add an -`encodeCBOR` method to your class, which takes a single parameter of the encoder -currently being used. Your method should return `true` on success, else `false`. -Your method may call `encoder.push(buffer)` or `encoder.pushAny(any)` as needed. - -For example: - -```javascript -class Foo { - constructor () { - this.one = 1 - this.two = 2 - } - encodeCBOR (encoder) { - const tagged = new Tagged(64000, [this.one, this.two]) - return encoder.pushAny(tagged) - } -} -``` - -You can also modify an existing type by monkey-patching an `encodeCBOR` function -onto its prototype, but this isn't recommended. - -### `addSemanticType` - -Sometimes, you want to support an existing type without modification to that -type. In this case, call `addSemanticType(type, encodeFunction)` on an existing -`Encoder` instance. The `encodeFunction` takes an encoder and an object to -encode, for example: - -```javascript -class Bar { - constructor () { - this.three = 3 - } -} -const enc = new Encoder() -enc.addSemanticType(Bar, (encoder, b) => { - encoder.pushAny(b.three) -}) -``` - -## Adding new decoders - -Most of the time, you will want to add support for decoding a new tag type. If -the Decoder class encounters a tag it doesn't support, it will generate a `Tagged` -instance that you can handle or ignore as needed. To have a specific type -generated instead, pass a `tags` option to the `Decoder`'s constructor, consisting -of an object with tag number keys and function values. The function will be -passed the decoded value associated with the tag, and should return the decoded -value. For the `Foo` example above, this might look like: - -```javascript -const d = new Decoder({tags: { 64000: (val) => { - // check val to make sure it's an Array as expected, etc. - const foo = new Foo() - foo.one = val[0] - foo.two = val[1] - return foo -}}}) -``` - -Developers ----------- - -The tests for this package use a set of test vectors from RFC 7049 appendix A by importing a machine readable version of them from https://github.com/cbor/test-vectors. For these tests to work, you will need to use the command `git submodule update --init` after cloning or pulling this code. See https://gist.github.com/gitaarik/8735255#file-git_submodules-md for more information. - -Get a list of build steps with `npm run`. I use `npm run dev`, which rebuilds, -runs tests, and refreshes a browser window with coverage metrics every time I -save a `.js` file. If you don't want to run the fuzz tests every time, set -a `NO_GARBAGE` environment variable: - -``` -env NO_GARBAGE=1 npm run dev -``` - -[![Build Status](https://github.com/hildjj/node-cbor/workflows/Tests/badge.svg)](https://github.com/hildjj/node-cbor/actions?query=workflow%3ATests) -[![Coverage Status](https://coveralls.io/repos/hildjj/node-cbor/badge.svg?branch=master)](https://coveralls.io/r/hildjj/node-cbor?branch=master) -[![Dependency Status](https://david-dm.org/hildjj/node-cbor.svg)](https://david-dm.org/hildjj/node-cbor) +This project now only supports versions of Node that the Node team is [currently supporting](https://github.com/nodejs/Release#release-schedule). Ava's [support statement](https://github.com/avajs/ava/blob/master/docs/support-statement.md) is what we will be using as well. Currently, that means Node `10`+ is required. If you need to support an older version of Node (back to version 6), use cbor version 5.2.x, which will get nothing but security updates from here on out. diff --git a/docs/CborMap.html b/docs/CborMap.html index bd0a3074..24c97eef 100644 --- a/docs/CborMap.html +++ b/docs/CborMap.html @@ -24,7 +24,7 @@
@@ -105,7 +105,7 @@

new CborMapSource:
@@ -217,7 +217,7 @@

deleteSource:
@@ -375,7 +375,7 @@

encodeCBOR<
Source:
@@ -536,7 +536,7 @@

(generator) en
Source:
@@ -641,7 +641,7 @@

forEachSource:
@@ -803,7 +803,7 @@

getSource:
@@ -965,7 +965,7 @@

hasSource:
@@ -1125,7 +1125,7 @@

(generator) keys<
Source:
@@ -1229,7 +1229,7 @@

setSource:
@@ -1421,7 +1421,7 @@

new CborMapSource:
@@ -1589,7 +1589,7 @@

deleteSource:
@@ -1747,7 +1747,7 @@

encodeCBOR<
Source:
@@ -1908,7 +1908,7 @@

(generator) en
Source:
@@ -2013,7 +2013,7 @@

forEachSource:
@@ -2175,7 +2175,7 @@

getSource:
@@ -2337,7 +2337,7 @@

hasSource:
@@ -2497,7 +2497,7 @@

(generator) keys<
Source:
@@ -2601,7 +2601,7 @@

setSource:
diff --git a/docs/Commented.html b/docs/Commented.html index 23001bdf..c064d236 100644 --- a/docs/Commented.html +++ b/docs/Commented.html @@ -24,7 +24,7 @@
@@ -103,7 +103,7 @@

new Commente
Source:
@@ -288,7 +288,7 @@

(static) comm
Source:
diff --git a/docs/Decoder.html b/docs/Decoder.html index 08e4d754..629c7a85 100644 --- a/docs/Decoder.html +++ b/docs/Decoder.html @@ -24,7 +24,7 @@
@@ -291,7 +291,7 @@

(static) de
Source:
@@ -575,7 +575,7 @@

(static) Source:
@@ -819,7 +819,7 @@

(static)
Source:
@@ -1104,7 +1104,7 @@

(static) Source:
@@ -1346,7 +1346,7 @@

(static) nu
Source:
@@ -1516,7 +1516,7 @@

closeSource:
diff --git a/docs/Diagnose.html b/docs/Diagnose.html index adf31eb2..6383205b 100644 --- a/docs/Diagnose.html +++ b/docs/Diagnose.html @@ -24,7 +24,7 @@
@@ -103,7 +103,7 @@

new Diagnose<
Source:
@@ -287,7 +287,7 @@

(static) dia
Source:
diff --git a/docs/Encoder.html b/docs/Encoder.html index 83cf6850..aea83cfa 100644 --- a/docs/Encoder.html +++ b/docs/Encoder.html @@ -24,7 +24,7 @@
@@ -104,7 +104,7 @@

new EncoderSource:
@@ -289,7 +289,7 @@

(static) encod
Source:
@@ -465,7 +465,7 @@

(static)
Source:
@@ -659,7 +659,7 @@

(static) Source:
@@ -834,7 +834,7 @@

(static) Source:
@@ -1118,7 +1118,7 @@

(static) en
Source:
@@ -1339,7 +1339,7 @@

(static)
Source:
@@ -1741,7 +1741,7 @@

pushAnySource:
@@ -1901,7 +1901,7 @@

re
Source:
diff --git a/docs/Simple.html b/docs/Simple.html index 73129d0b..417912f7 100644 --- a/docs/Simple.html +++ b/docs/Simple.html @@ -24,7 +24,7 @@
@@ -103,7 +103,7 @@

new SimpleSource:
@@ -259,7 +259,7 @@

(static) decod
Source:
@@ -532,7 +532,7 @@

(static) isS
Source:
@@ -692,7 +692,7 @@

encodeCBOR<
Source:
@@ -827,7 +827,7 @@

inspectSource:
@@ -935,7 +935,7 @@

toStringSource:
diff --git a/docs/Tagged.html b/docs/Tagged.html index 86140569..7cd6fe37 100644 --- a/docs/Tagged.html +++ b/docs/Tagged.html @@ -24,7 +24,7 @@
@@ -105,7 +105,7 @@

new TaggedSource:
@@ -341,7 +341,7 @@

convertSource:
@@ -503,7 +503,7 @@

encodeCBOR<
Source:
@@ -638,7 +638,7 @@

toStringSource:
diff --git a/docs/cbor.js.html b/docs/cbor.js.html index d32786fc..f30cd392 100644 --- a/docs/cbor.js.html +++ b/docs/cbor.js.html @@ -24,7 +24,7 @@
diff --git a/docs/commented.js.html b/docs/commented.js.html index dfedd824..378a2f73 100644 --- a/docs/commented.js.html +++ b/docs/commented.js.html @@ -24,7 +24,7 @@
@@ -42,12 +42,11 @@

commented.js

'use strict'
 
 const stream = require('stream')
-const util = require('util')
 const utils = require('./utils')
-const Simple = require('./simple')
 const Decoder = require('./decoder')
 const NoFilter = require('nofilter')
-const {BigNumber, MT, NUMBYTES, SYMS} = require('./constants')
+const { MT, NUMBYTES, SYMS } = require('./constants')
+const { Buffer } = require('buffer')
 
 function plural(c) {
   if (c > 1) {
diff --git a/docs/decoder.js.html b/docs/decoder.js.html
index 1d09827c..0abbfc41 100644
--- a/docs/decoder.js.html
+++ b/docs/decoder.js.html
@@ -24,7 +24,7 @@
 
 
 
 
 
@@ -41,16 +41,16 @@

decoder.js

'use strict'
 
-const stream = require('stream')
 const BinaryParseStream = require('../vendor/binary-parse-stream')
 const Tagged = require('./tagged')
 const Simple = require('./simple')
 const utils = require('./utils')
 const NoFilter = require('nofilter')
-const {BigNumber, MT, NUMBYTES, SIMPLE, SYMS, BI, BN} = require('./constants')
+const constants = require('./constants')
+const { MT, NUMBYTES, SYMS, BI } = constants
+const { Buffer } = require('buffer')
 
 const COUNT = Symbol('count')
-const PENDING_KEY = Symbol('pending_key')
 const MAJOR = Symbol('major type')
 const ERROR = Symbol('error')
 const NOT_FOUND = Symbol('not found')
@@ -190,6 +190,7 @@ 

decoder.js

this.preferWeb = preferWeb this.extendedResults = extendedResults this.bigint = bigint + this.required = required if (extendedResults) { this.bs.on('read', this._onRead.bind(this)) @@ -512,9 +513,16 @@

decoder.js

break case MT.NEG_INT: if (val === Number.MAX_SAFE_INTEGER) { - val = this.bigint ? BI.NEG_MAX : BN.NEG_MAX - } else if (val instanceof BigNumber) { - val = BN.MINUS_ONE.minus(val) + if (this.bigint) { + val = BI.NEG_MAX + } else if (constants.BigNumber) { + val = constants.BN.NEG_MAX + } else { + throw new Error('No bigint and no bignumber.js') + } + } else if (constants.BigNumber && + (val instanceof constants.BigNumber)) { + val = constants.BN.MINUS_ONE.minus(val) } else { val = (typeof val === 'bigint') ? BI.MINUS_ONE - val : -1 - val } diff --git a/docs/diagnose.js.html b/docs/diagnose.js.html index a51e215a..eca0f926 100644 --- a/docs/diagnose.js.html +++ b/docs/diagnose.js.html @@ -24,7 +24,7 @@
@@ -42,12 +42,10 @@

diagnose.js

'use strict'
 
 const stream = require('stream')
-const util = require('util')
 const Decoder = require('./decoder')
-const Simple = require('./simple')
 const utils = require('./utils')
 const NoFilter = require('nofilter')
-const {BigNumber, MT, SYMS} = require('./constants')
+const {MT, SYMS} = require('./constants')
 
 /**
   * @typedef DiagnoseOptions
diff --git a/docs/encoder.js.html b/docs/encoder.js.html
index 5d1b3178..4ce859f6 100644
--- a/docs/encoder.js.html
+++ b/docs/encoder.js.html
@@ -24,7 +24,7 @@
 
 
 
 
 
@@ -42,14 +42,13 @@

encoder.js

'use strict'
 
 const stream = require('stream')
-const url = require('url')
 const NoFilter = require('nofilter')
-const Tagged = require('./tagged')
-const Simple = require('./simple')
 const utils = require('./utils')
+const constants = require('./constants')
 const {
-  BigNumber, MT, NUMBYTES, SHIFT32, SIMPLE, SYMS, TAG, BI, BN
-} = require('./constants')
+  MT, NUMBYTES, SHIFT32, SIMPLE, SYMS, TAG, BI
+} = constants
+const { Buffer } = require('buffer')
 
 const HALF = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.TWO
 const FLOAT = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.FOUR
@@ -92,7 +91,7 @@ 

encoder.js

* @typedef EncodingOptions * @property {any[]|Object} [genTypes=[]] - array of pairs of * `type`, `function(Encoder)` for semantic types to be encoded. Not - * needed for Array, Date, Buffer, Map, RegExp, Set, Url, or BigNumber. + * needed for Array, Date, Buffer, Map, RegExp, Set, URL, or BigNumber. * If an object, the keys are the constructor names for the types. * @property {boolean} [canonical=false] - should the output be * canonicalized @@ -176,7 +175,6 @@

encoder.js

NoFilter: this._pushNoFilter, RegExp: this._pushRegexp, Set: this._pushSet, - BigNumber: this._pushBigNumber, ArrayBuffer: this._pushUint8Array, Uint8ClampedArray: this._pushUint8Array, Uint8Array: this._pushUint8Array, @@ -187,9 +185,11 @@

encoder.js

Int32Array: this._pushArray, Float32Array: this._pushFloat32Array, Float64Array: this._pushFloat64Array, - Url: this._pushUrl, URL: this._pushURL } + if (constants.BigNumber) { + this.semanticTypes[constants.BigNumber.name] = this._pushBigNumber + } if (Array.isArray(genTypes)) { for (let i = 0, len = genTypes.length; i < len; i += 2) { @@ -460,16 +460,12 @@

encoder.js

return true } - _pushUrl(gen, obj) { - return gen._pushTag(TAG.URI) && gen.pushAny(obj.format()) - } - _pushURL(gen, obj) { return gen._pushTag(TAG.URI) && gen.pushAny(obj.toString()) } /** - * @param {BigNumber} obj + * @param {constants.BigNumber} obj * @private */ _pushBigint(obj) { @@ -483,14 +479,15 @@

encoder.js

} if (this.collapseBigIntegers && - obj.lte(BN.MAXINT64)) { + obj.lte(constants.BN.MAXINT64)) { // special handiling for 64bits - if (obj.lte(BN.MAXINT32)) { + if (obj.lte(constants.BN.MAXINT32)) { return this._pushInt(obj.toNumber(), m) } return this._pushUInt8((m << 5) | NUMBYTES.EIGHT) && - this._pushUInt32BE(obj.dividedToIntegerBy(BN.SHIFT32).toNumber()) && - this._pushUInt32BE(obj.mod(BN.SHIFT32).toNumber()) + this._pushUInt32BE( + obj.dividedToIntegerBy(constants.BN.SHIFT32).toNumber()) && + this._pushUInt32BE(obj.mod(constants.BN.SHIFT32).toNumber()) } let str = obj.toString(16) if (str.length % 2) { @@ -553,7 +550,7 @@

encoder.js

if (!gen._pushIntNum(-dec)) { return false } - if (slide.abs().isLessThan(BN.MAXINT)) { + if (slide.abs().isLessThan(constants.BN.MAXINT)) { return gen._pushIntNum(slide.toNumber()) } else { return gen._pushBigint(slide) @@ -858,7 +855,9 @@

encoder.js

} obj = this } - const {chunkSize=4096, ...opts} = options + + // TODO: consider other options + const { chunkSize=4096 } = options let ret = true const objType = typeof obj diff --git a/docs/example/bignumber.js b/docs/example/bignumber.js new file mode 100644 index 00000000..846772d0 --- /dev/null +++ b/docs/example/bignumber.js @@ -0,0 +1,2902 @@ +;(function (globalObject) { + 'use strict'; + +/* + * bignumber.js v9.0.1 + * A JavaScript library for arbitrary-precision arithmetic. + * https://github.com/MikeMcl/bignumber.js + * Copyright (c) 2020 Michael Mclaughlin + * MIT Licensed. + * + * BigNumber.prototype methods | BigNumber methods + * | + * absoluteValue abs | clone + * comparedTo | config set + * decimalPlaces dp | DECIMAL_PLACES + * dividedBy div | ROUNDING_MODE + * dividedToIntegerBy idiv | EXPONENTIAL_AT + * exponentiatedBy pow | RANGE + * integerValue | CRYPTO + * isEqualTo eq | MODULO_MODE + * isFinite | POW_PRECISION + * isGreaterThan gt | FORMAT + * isGreaterThanOrEqualTo gte | ALPHABET + * isInteger | isBigNumber + * isLessThan lt | maximum max + * isLessThanOrEqualTo lte | minimum min + * isNaN | random + * isNegative | sum + * isPositive | + * isZero | + * minus | + * modulo mod | + * multipliedBy times | + * negated | + * plus | + * precision sd | + * shiftedBy | + * squareRoot sqrt | + * toExponential | + * toFixed | + * toFormat | + * toFraction | + * toJSON | + * toNumber | + * toPrecision | + * toString | + * valueOf | + * + */ + + + var BigNumber, + isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, + mathceil = Math.ceil, + mathfloor = Math.floor, + + bignumberError = '[BigNumber Error] ', + tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ', + + BASE = 1e14, + LOG_BASE = 14, + MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 + // MAX_INT32 = 0x7fffffff, // 2^31 - 1 + POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], + SQRT_BASE = 1e7, + + // EDITABLE + // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and + // the arguments to toExponential, toFixed, toFormat, and toPrecision. + MAX = 1E9; // 0 to MAX_INT32 + + + /* + * Create and return a BigNumber constructor. + */ + function clone(configObject) { + var div, convertBase, parseNumeric, + P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null }, + ONE = new BigNumber(1), + + + //----------------------------- EDITABLE CONFIG DEFAULTS ------------------------------- + + + // The default values below must be integers within the inclusive ranges stated. + // The values can also be changed at run-time using BigNumber.set. + + // The maximum number of decimal places for operations involving division. + DECIMAL_PLACES = 20, // 0 to MAX + + // The rounding mode used when rounding to the above decimal places, and when using + // toExponential, toFixed, toFormat and toPrecision, and round (default value). + // UP 0 Away from zero. + // DOWN 1 Towards zero. + // CEIL 2 Towards +Infinity. + // FLOOR 3 Towards -Infinity. + // HALF_UP 4 Towards nearest neighbour. If equidistant, up. + // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + ROUNDING_MODE = 4, // 0 to 8 + + // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] + + // The exponent value at and beneath which toString returns exponential notation. + // Number type: -7 + TO_EXP_NEG = -7, // 0 to -MAX + + // The exponent value at and above which toString returns exponential notation. + // Number type: 21 + TO_EXP_POS = 21, // 0 to MAX + + // RANGE : [MIN_EXP, MAX_EXP] + + // The minimum exponent value, beneath which underflow to zero occurs. + // Number type: -324 (5e-324) + MIN_EXP = -1e7, // -1 to -MAX + + // The maximum exponent value, above which overflow to Infinity occurs. + // Number type: 308 (1.7976931348623157e+308) + // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. + MAX_EXP = 1e7, // 1 to MAX + + // Whether to use cryptographically-secure random number generation, if available. + CRYPTO = false, // true or false + + // The modulo mode used when calculating the modulus: a mod n. + // The quotient (q = a / n) is calculated according to the corresponding rounding mode. + // The remainder (r) is calculated as: r = a - n * q. + // + // UP 0 The remainder is positive if the dividend is negative, else is negative. + // DOWN 1 The remainder has the same sign as the dividend. + // This modulo mode is commonly known as 'truncated division' and is + // equivalent to (a % n) in JavaScript. + // FLOOR 3 The remainder has the same sign as the divisor (Python %). + // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. + // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). + // The remainder is always positive. + // + // The truncated division, floored division, Euclidian division and IEEE 754 remainder + // modes are commonly used for the modulus operation. + // Although the other rounding modes can also be used, they may not give useful results. + MODULO_MODE = 1, // 0 to 9 + + // The maximum number of significant digits of the result of the exponentiatedBy operation. + // If POW_PRECISION is 0, there will be unlimited significant digits. + POW_PRECISION = 0, // 0 to MAX + + // The format specification used by the BigNumber.prototype.toFormat method. + FORMAT = { + prefix: '', + groupSize: 3, + secondaryGroupSize: 0, + groupSeparator: ',', + decimalSeparator: '.', + fractionGroupSize: 0, + fractionGroupSeparator: '\xA0', // non-breaking space + suffix: '' + }, + + // The alphabet used for base conversion. It must be at least 2 characters long, with no '+', + // '-', '.', whitespace, or repeated character. + // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_' + ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz'; + + + //------------------------------------------------------------------------------------------ + + + // CONSTRUCTOR + + + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * v {number|string|BigNumber} A numeric value. + * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. + */ + function BigNumber(v, b) { + var alphabet, c, caseChanged, e, i, isNum, len, str, + x = this; + + // Enable constructor call without `new`. + if (!(x instanceof BigNumber)) return new BigNumber(v, b); + + if (b == null) { + + if (v && v._isBigNumber === true) { + x.s = v.s; + + if (!v.c || v.e > MAX_EXP) { + x.c = x.e = null; + } else if (v.e < MIN_EXP) { + x.c = [x.e = 0]; + } else { + x.e = v.e; + x.c = v.c.slice(); + } + + return; + } + + if ((isNum = typeof v == 'number') && v * 0 == 0) { + + // Use `1 / n` to handle minus zero also. + x.s = 1 / v < 0 ? (v = -v, -1) : 1; + + // Fast path for integers, where n < 2147483648 (2**31). + if (v === ~~v) { + for (e = 0, i = v; i >= 10; i /= 10, e++); + + if (e > MAX_EXP) { + x.c = x.e = null; + } else { + x.e = e; + x.c = [v]; + } + + return; + } + + str = String(v); + } else { + + if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum); + + x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1; + } + + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); + + // Exponential form? + if ((i = str.search(/e/i)) > 0) { + + // Determine exponent. + if (e < 0) e = i; + e += +str.slice(i + 1); + str = str.substring(0, i); + } else if (e < 0) { + + // Integer. + e = str.length; + } + + } else { + + // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + intCheck(b, 2, ALPHABET.length, 'Base'); + + // Allow exponential notation to be used with base 10 argument, while + // also rounding to DECIMAL_PLACES as with other bases. + if (b == 10) { + x = new BigNumber(v); + return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE); + } + + str = String(v); + + if (isNum = typeof v == 'number') { + + // Avoid potential interpretation of Infinity and NaN as base 44+ values. + if (v * 0 != 0) return parseNumeric(x, str, isNum, b); + + x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1; + + // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' + if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) { + throw Error + (tooManyDigits + v); + } + } else { + x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1; + } + + alphabet = ALPHABET.slice(0, b); + e = i = 0; + + // Check that str is a valid base b number. + // Don't use RegExp, so alphabet can contain special characters. + for (len = str.length; i < len; i++) { + if (alphabet.indexOf(c = str.charAt(i)) < 0) { + if (c == '.') { + + // If '.' is not the first character and it has not be found before. + if (i > e) { + e = len; + continue; + } + } else if (!caseChanged) { + + // Allow e.g. hexadecimal 'FF' as well as 'ff'. + if (str == str.toUpperCase() && (str = str.toLowerCase()) || + str == str.toLowerCase() && (str = str.toUpperCase())) { + caseChanged = true; + i = -1; + e = 0; + continue; + } + } + + return parseNumeric(x, String(v), isNum, b); + } + } + + // Prevent later check for length on converted number. + isNum = false; + str = convertBase(str, b, 10, x.s); + + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); + else e = str.length; + } + + // Determine leading zeros. + for (i = 0; str.charCodeAt(i) === 48; i++); + + // Determine trailing zeros. + for (len = str.length; str.charCodeAt(--len) === 48;); + + if (str = str.slice(i, ++len)) { + len -= i; + + // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' + if (isNum && BigNumber.DEBUG && + len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) { + throw Error + (tooManyDigits + (x.s * v)); + } + + // Overflow? + if ((e = e - i - 1) > MAX_EXP) { + + // Infinity. + x.c = x.e = null; + + // Underflow? + } else if (e < MIN_EXP) { + + // Zero. + x.c = [x.e = 0]; + } else { + x.e = e; + x.c = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first element of the coefficient array. + i = (e + 1) % LOG_BASE; + if (e < 0) i += LOG_BASE; // i < 1 + + if (i < len) { + if (i) x.c.push(+str.slice(0, i)); + + for (len -= LOG_BASE; i < len;) { + x.c.push(+str.slice(i, i += LOG_BASE)); + } + + i = LOG_BASE - (str = str.slice(i)).length; + } else { + i -= len; + } + + for (; i--; str += '0'); + x.c.push(+str); + } + } else { + + // Zero. + x.c = [x.e = 0]; + } + } + + + // CONSTRUCTOR PROPERTIES + + + BigNumber.clone = clone; + + BigNumber.ROUND_UP = 0; + BigNumber.ROUND_DOWN = 1; + BigNumber.ROUND_CEIL = 2; + BigNumber.ROUND_FLOOR = 3; + BigNumber.ROUND_HALF_UP = 4; + BigNumber.ROUND_HALF_DOWN = 5; + BigNumber.ROUND_HALF_EVEN = 6; + BigNumber.ROUND_HALF_CEIL = 7; + BigNumber.ROUND_HALF_FLOOR = 8; + BigNumber.EUCLID = 9; + + + /* + * Configure infrequently-changing library-wide settings. + * + * Accept an object with the following optional properties (if the value of a property is + * a number, it must be an integer within the inclusive range stated): + * + * DECIMAL_PLACES {number} 0 to MAX + * ROUNDING_MODE {number} 0 to 8 + * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] + * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] + * CRYPTO {boolean} true or false + * MODULO_MODE {number} 0 to 9 + * POW_PRECISION {number} 0 to MAX + * ALPHABET {string} A string of two or more unique characters which does + * not contain '.'. + * FORMAT {object} An object with some of the following properties: + * prefix {string} + * groupSize {number} + * secondaryGroupSize {number} + * groupSeparator {string} + * decimalSeparator {string} + * fractionGroupSize {number} + * fractionGroupSeparator {string} + * suffix {string} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined, except for ALPHABET. + * + * Return an object with the properties current values. + */ + BigNumber.config = BigNumber.set = function (obj) { + var p, v; + + if (obj != null) { + + if (typeof obj == 'object') { + + // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. + // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) { + v = obj[p]; + intCheck(v, 0, MAX, p); + DECIMAL_PLACES = v; + } + + // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. + // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) { + v = obj[p]; + intCheck(v, 0, 8, p); + ROUNDING_MODE = v; + } + + // EXPONENTIAL_AT {number|number[]} + // Integer, -MAX to MAX inclusive or + // [integer -MAX to 0 inclusive, 0 to MAX inclusive]. + // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) { + v = obj[p]; + if (v && v.pop) { + intCheck(v[0], -MAX, 0, p); + intCheck(v[1], 0, MAX, p); + TO_EXP_NEG = v[0]; + TO_EXP_POS = v[1]; + } else { + intCheck(v, -MAX, MAX, p); + TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v); + } + } + + // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. + // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}' + if (obj.hasOwnProperty(p = 'RANGE')) { + v = obj[p]; + if (v && v.pop) { + intCheck(v[0], -MAX, -1, p); + intCheck(v[1], 1, MAX, p); + MIN_EXP = v[0]; + MAX_EXP = v[1]; + } else { + intCheck(v, -MAX, MAX, p); + if (v) { + MIN_EXP = -(MAX_EXP = v < 0 ? -v : v); + } else { + throw Error + (bignumberError + p + ' cannot be zero: ' + v); + } + } + } + + // CRYPTO {boolean} true or false. + // '[BigNumber Error] CRYPTO not true or false: {v}' + // '[BigNumber Error] crypto unavailable' + if (obj.hasOwnProperty(p = 'CRYPTO')) { + v = obj[p]; + if (v === !!v) { + if (v) { + if (typeof crypto != 'undefined' && crypto && + (crypto.getRandomValues || crypto.randomBytes)) { + CRYPTO = v; + } else { + CRYPTO = !v; + throw Error + (bignumberError + 'crypto unavailable'); + } + } else { + CRYPTO = v; + } + } else { + throw Error + (bignumberError + p + ' not true or false: ' + v); + } + } + + // MODULO_MODE {number} Integer, 0 to 9 inclusive. + // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'MODULO_MODE')) { + v = obj[p]; + intCheck(v, 0, 9, p); + MODULO_MODE = v; + } + + // POW_PRECISION {number} Integer, 0 to MAX inclusive. + // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'POW_PRECISION')) { + v = obj[p]; + intCheck(v, 0, MAX, p); + POW_PRECISION = v; + } + + // FORMAT {object} + // '[BigNumber Error] FORMAT not an object: {v}' + if (obj.hasOwnProperty(p = 'FORMAT')) { + v = obj[p]; + if (typeof v == 'object') FORMAT = v; + else throw Error + (bignumberError + p + ' not an object: ' + v); + } + + // ALPHABET {string} + // '[BigNumber Error] ALPHABET invalid: {v}' + if (obj.hasOwnProperty(p = 'ALPHABET')) { + v = obj[p]; + + // Disallow if less than two characters, + // or if it contains '+', '-', '.', whitespace, or a repeated character. + if (typeof v == 'string' && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) { + ALPHABET = v; + } else { + throw Error + (bignumberError + p + ' invalid: ' + v); + } + } + + } else { + + // '[BigNumber Error] Object expected: {v}' + throw Error + (bignumberError + 'Object expected: ' + obj); + } + } + + return { + DECIMAL_PLACES: DECIMAL_PLACES, + ROUNDING_MODE: ROUNDING_MODE, + EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS], + RANGE: [MIN_EXP, MAX_EXP], + CRYPTO: CRYPTO, + MODULO_MODE: MODULO_MODE, + POW_PRECISION: POW_PRECISION, + FORMAT: FORMAT, + ALPHABET: ALPHABET + }; + }; + + + /* + * Return true if v is a BigNumber instance, otherwise return false. + * + * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. + * + * v {any} + * + * '[BigNumber Error] Invalid BigNumber: {v}' + */ + BigNumber.isBigNumber = function (v) { + if (!v || v._isBigNumber !== true) return false; + if (!BigNumber.DEBUG) return true; + + var i, n, + c = v.c, + e = v.e, + s = v.s; + + out: if ({}.toString.call(c) == '[object Array]') { + + if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) { + + // If the first element is zero, the BigNumber value must be zero. + if (c[0] === 0) { + if (e === 0 && c.length === 1) return true; + break out; + } + + // Calculate number of digits that c[0] should have, based on the exponent. + i = (e + 1) % LOG_BASE; + if (i < 1) i += LOG_BASE; + + // Calculate number of digits of c[0]. + //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) { + if (String(c[0]).length == i) { + + for (i = 0; i < c.length; i++) { + n = c[i]; + if (n < 0 || n >= BASE || n !== mathfloor(n)) break out; + } + + // Last element cannot be zero, unless it is the only element. + if (n !== 0) return true; + } + } + + // Infinity/NaN + } else if (c === null && e === null && (s === null || s === 1 || s === -1)) { + return true; + } + + throw Error + (bignumberError + 'Invalid BigNumber: ' + v); + }; + + + /* + * Return a new BigNumber whose value is the maximum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.maximum = BigNumber.max = function () { + return maxOrMin(arguments, P.lt); + }; + + + /* + * Return a new BigNumber whose value is the minimum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.minimum = BigNumber.min = function () { + return maxOrMin(arguments, P.gt); + }; + + + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' + * '[BigNumber Error] crypto unavailable' + */ + BigNumber.random = (function () { + var pow2_53 = 0x20000000000000; + + // Return a 53 bit integer n, where 0 <= n < 9007199254740992. + // Check if Math.random() produces more than 32 bits of randomness. + // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. + // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. + var random53bitInt = (Math.random() * pow2_53) & 0x1fffff + ? function () { return mathfloor(Math.random() * pow2_53); } + : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + + (Math.random() * 0x800000 | 0); }; + + return function (dp) { + var a, b, e, k, v, + i = 0, + c = [], + rand = new BigNumber(ONE); + + if (dp == null) dp = DECIMAL_PLACES; + else intCheck(dp, 0, MAX); + + k = mathceil(dp / LOG_BASE); + + if (CRYPTO) { + + // Browsers supporting crypto.getRandomValues. + if (crypto.getRandomValues) { + + a = crypto.getRandomValues(new Uint32Array(k *= 2)); + + for (; i < k;) { + + // 53 bits: + // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) + // 11111 11111111 11111111 11111111 11100000 00000000 00000000 + // ((Math.pow(2, 32) - 1) >>> 11).toString(2) + // 11111 11111111 11111111 + // 0x20000 is 2^21. + v = a[i] * 0x20000 + (a[i + 1] >>> 11); + + // Rejection sampling: + // 0 <= v < 9007199254740992 + // Probability that v >= 9e15, is + // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 + if (v >= 9e15) { + b = crypto.getRandomValues(new Uint32Array(2)); + a[i] = b[0]; + a[i + 1] = b[1]; + } else { + + // 0 <= v <= 8999999999999999 + // 0 <= (v % 1e14) <= 99999999999999 + c.push(v % 1e14); + i += 2; + } + } + i = k / 2; + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + a = crypto.randomBytes(k *= 7); + + for (; i < k;) { + + // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 + // 0x100000000 is 2^32, 0x1000000 is 2^24 + // 11111 11111111 11111111 11111111 11111111 11111111 11111111 + // 0 <= v < 9007199254740992 + v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) + + (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) + + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]; + + if (v >= 9e15) { + crypto.randomBytes(7).copy(a, i); + } else { + + // 0 <= (v % 1e14) <= 99999999999999 + c.push(v % 1e14); + i += 7; + } + } + i = k / 7; + } else { + CRYPTO = false; + throw Error + (bignumberError + 'crypto unavailable'); + } + } + + // Use Math.random. + if (!CRYPTO) { + + for (; i < k;) { + v = random53bitInt(); + if (v < 9e15) c[i++] = v % 1e14; + } + } + + k = c[--i]; + dp %= LOG_BASE; + + // Convert trailing digits to zeros according to dp. + if (k && dp) { + v = POWS_TEN[LOG_BASE - dp]; + c[i] = mathfloor(k / v) * v; + } + + // Remove trailing elements which are zero. + for (; c[i] === 0; c.pop(), i--); + + // Zero? + if (i < 0) { + c = [e = 0]; + } else { + + // Remove leading elements which are zero and adjust exponent accordingly. + for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE); + + // Count the digits of the first element of c to determine leading zeros, and... + for (i = 1, v = c[0]; v >= 10; v /= 10, i++); + + // adjust the exponent accordingly. + if (i < LOG_BASE) e -= LOG_BASE - i; + } + + rand.e = e; + rand.c = c; + return rand; + }; + })(); + + + /* + * Return a BigNumber whose value is the sum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.sum = function () { + var i = 1, + args = arguments, + sum = new BigNumber(args[0]); + for (; i < args.length;) sum = sum.plus(args[i++]); + return sum; + }; + + + // PRIVATE FUNCTIONS + + + // Called by BigNumber and BigNumber.prototype.toString. + convertBase = (function () { + var decimal = '0123456789'; + + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. toBaseOut('255', 10, 16) returns [15, 15]. + * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. + */ + function toBaseOut(str, baseIn, baseOut, alphabet) { + var j, + arr = [0], + arrL, + i = 0, + len = str.length; + + for (; i < len;) { + for (arrL = arr.length; arrL--; arr[arrL] *= baseIn); + + arr[0] += alphabet.indexOf(str.charAt(i++)); + + for (j = 0; j < arr.length; j++) { + + if (arr[j] > baseOut - 1) { + if (arr[j + 1] == null) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; + } + } + } + + return arr.reverse(); + } + + // Convert a numeric string of baseIn to a numeric string of baseOut. + // If the caller is toString, we are converting from base 10 to baseOut. + // If the caller is BigNumber, we are converting from baseIn to base 10. + return function (str, baseIn, baseOut, sign, callerIsToString) { + var alphabet, d, e, k, r, x, xc, y, + i = str.indexOf('.'), + dp = DECIMAL_PLACES, + rm = ROUNDING_MODE; + + // Non-integer. + if (i >= 0) { + k = POW_PRECISION; + + // Unlimited precision. + POW_PRECISION = 0; + str = str.replace('.', ''); + y = new BigNumber(baseIn); + x = y.pow(str.length - i); + POW_PRECISION = k; + + // Convert str as if an integer, then restore the fraction part by dividing the + // result by its base raised to a power. + + y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'), + 10, baseOut, decimal); + y.e = y.c.length; + } + + // Convert the number as integer. + + xc = toBaseOut(str, baseIn, baseOut, callerIsToString + ? (alphabet = ALPHABET, decimal) + : (alphabet = decimal, ALPHABET)); + + // xc now represents str as an integer and converted to baseOut. e is the exponent. + e = k = xc.length; + + // Remove trailing zeros. + for (; xc[--k] == 0; xc.pop()); + + // Zero? + if (!xc[0]) return alphabet.charAt(0); + + // Does str represent an integer? If so, no need for the division. + if (i < 0) { + --e; + } else { + x.c = xc; + x.e = e; + + // The sign is needed for correct rounding. + x.s = sign; + x = div(x, y, dp, rm, baseOut); + xc = x.c; + r = x.r; + e = x.e; + } + + // xc now represents str converted to baseOut. + + // THe index of the rounding digit. + d = e + dp + 1; + + // The rounding digit: the digit to the right of the digit that may be rounded up. + i = xc[d]; + + // Look at the rounding digits and mode to determine whether to round up. + + k = baseOut / 2; + r = r || d < 0 || xc[d + 1] != null; + + r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 || + rm == (x.s < 0 ? 8 : 7)); + + // If the index of the rounding digit is not greater than zero, or xc represents + // zero, then the result of the base conversion is zero or, if rounding up, a value + // such as 0.00001. + if (d < 1 || !xc[0]) { + + // 1^-dp or 0 + str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0); + } else { + + // Truncate xc to the required number of decimal places. + xc.length = d; + + // Round up? + if (r) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for (--baseOut; ++xc[--d] > baseOut;) { + xc[d] = 0; + + if (!d) { + ++e; + xc = [1].concat(xc); + } + } + } + + // Determine trailing zeros. + for (k = xc.length; !xc[--k];); + + // E.g. [4, 11, 15] becomes 4bf. + for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++])); + + // Add leading zeros, decimal point and trailing zeros as required. + str = toFixedPoint(str, e, alphabet.charAt(0)); + } + + // The caller will add the sign. + return str; + }; + })(); + + + // Perform division in the specified base. Called by div and convertBase. + div = (function () { + + // Assume non-zero x and k. + function multiply(x, k, base) { + var m, temp, xlo, xhi, + carry = 0, + i = x.length, + klo = k % SQRT_BASE, + khi = k / SQRT_BASE | 0; + + for (x = x.slice(); i--;) { + xlo = x[i] % SQRT_BASE; + xhi = x[i] / SQRT_BASE | 0; + m = khi * xlo + xhi * klo; + temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry; + carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi; + x[i] = temp % base; + } + + if (carry) x = [carry].concat(x); + + return x; + } + + function compare(a, b, aL, bL) { + var i, cmp; + + if (aL != bL) { + cmp = aL > bL ? 1 : -1; + } else { + + for (i = cmp = 0; i < aL; i++) { + + if (a[i] != b[i]) { + cmp = a[i] > b[i] ? 1 : -1; + break; + } + } + } + + return cmp; + } + + function subtract(a, b, aL, base) { + var i = 0; + + // Subtract b from a. + for (; aL--;) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for (; !a[0] && a.length > 1; a.splice(0, 1)); + } + + // x: dividend, y: divisor. + return function (x, y, dp, rm, base) { + var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, + yL, yz, + s = x.s == y.s ? 1 : -1, + xc = x.c, + yc = y.c; + + // Either NaN, Infinity or 0? + if (!xc || !xc[0] || !yc || !yc[0]) { + + return new BigNumber( + + // Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : + + // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. + xc && xc[0] == 0 || !yc ? s * 0 : s / 0 + ); + } + + q = new BigNumber(s); + qc = q.c = []; + e = x.e - y.e; + s = dp + e + 1; + + if (!base) { + base = BASE; + e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE); + s = s / LOG_BASE | 0; + } + + // Result exponent may be one less then the current value of e. + // The coefficients of the BigNumbers from convertBase may have trailing zeros. + for (i = 0; yc[i] == (xc[i] || 0); i++); + + if (yc[i] > (xc[i] || 0)) e--; + + if (s < 0) { + qc.push(1); + more = true; + } else { + xL = xc.length; + yL = yc.length; + i = 0; + s += 2; + + // Normalise xc and yc so highest order digit of yc is >= base / 2. + + n = mathfloor(base / (yc[0] + 1)); + + // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1. + // if (n > 1 || n++ == 1 && yc[0] < base / 2) { + if (n > 1) { + yc = multiply(yc, n, base); + xc = multiply(xc, n, base); + yL = yc.length; + xL = xc.length; + } + + xi = yL; + rem = xc.slice(0, yL); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for (; remL < yL; rem[remL++] = 0); + yz = yc.slice(); + yz = [0].concat(yz); + yc0 = yc[0]; + if (yc[1] >= base / 2) yc0++; + // Not necessary, but to prevent trial digit n > base, when using base 3. + // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15; + + do { + n = 0; + + // Compare divisor and remainder. + cmp = compare(yc, rem, yL, remL); + + // If divisor < remainder. + if (cmp < 0) { + + // Calculate trial digit, n. + + rem0 = rem[0]; + if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); + + // n is how many times the divisor goes into the current remainder. + n = mathfloor(rem0 / yc0); + + // Algorithm: + // product = divisor multiplied by trial digit (n). + // Compare product and remainder. + // If product is greater than remainder: + // Subtract divisor from product, decrement trial digit. + // Subtract product from remainder. + // If product was less than remainder at the last compare: + // Compare new remainder and divisor. + // If remainder is greater than divisor: + // Subtract divisor from remainder, increment trial digit. + + if (n > 1) { + + // n may be > base only when base is 3. + if (n >= base) n = base - 1; + + // product = divisor * trial digit. + prod = multiply(yc, n, base); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + // If product > remainder then trial digit n too high. + // n is 1 too high about 5% of the time, and is not known to have + // ever been more than 1 too high. + while (compare(prod, rem, prodL, remL) == 1) { + n--; + + // Subtract divisor from product. + subtract(prod, yL < prodL ? yz : yc, prodL, base); + prodL = prod.length; + cmp = 1; + } + } else { + + // n is 0 or 1, cmp is -1. + // If n is 0, there is no need to compare yc and rem again below, + // so change cmp to 1 to avoid it. + // If n is 1, leave cmp as -1, so yc and rem are compared again. + if (n == 0) { + + // divisor < remainder, so n must be at least 1. + cmp = n = 1; + } + + // product = divisor + prod = yc.slice(); + prodL = prod.length; + } + + if (prodL < remL) prod = [0].concat(prod); + + // Subtract product from remainder. + subtract(rem, prod, remL, base); + remL = rem.length; + + // If product was < remainder. + if (cmp == -1) { + + // Compare divisor and new remainder. + // If divisor < new remainder, subtract divisor from remainder. + // Trial digit n too low. + // n is 1 too low about 5% of the time, and very rarely 2 too low. + while (compare(yc, rem, yL, remL) < 1) { + n++; + + // Subtract divisor from remainder. + subtract(rem, yL < remL ? yz : yc, remL, base); + remL = rem.length; + } + } + } else if (cmp === 0) { + n++; + rem = [0]; + } // else cmp === 1 and n will be 0 + + // Add the next digit, n, to the result array. + qc[i++] = n; + + // Update the remainder. + if (rem[0]) { + rem[remL++] = xc[xi] || 0; + } else { + rem = [xc[xi]]; + remL = 1; + } + } while ((xi++ < xL || rem[0] != null) && s--); + + more = rem[0] != null; + + // Leading zero? + if (!qc[0]) qc.splice(0, 1); + } + + if (base == BASE) { + + // To calculate q.e, first get the number of digits of qc[0]. + for (i = 1, s = qc[0]; s >= 10; s /= 10, i++); + + round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more); + + // Caller is convertBase. + } else { + q.e = e; + q.r = +more; + } + + return q; + }; + })(); + + + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. + * + * n: a BigNumber. + * i: the index of the last digit required (i.e. the digit that may be rounded up). + * rm: the rounding mode. + * id: 1 (toExponential) or 2 (toPrecision). + */ + function format(n, i, rm, id) { + var c0, e, ne, len, str; + + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + if (!n.c) return n.toString(); + + c0 = n.c[0]; + ne = n.e; + + if (i == null) { + str = coeffToString(n.c); + str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) + ? toExponential(str, ne) + : toFixedPoint(str, ne, '0'); + } else { + n = round(new BigNumber(n), i, rm); + + // n.e may have changed if the value was rounded up. + e = n.e; + + str = coeffToString(n.c); + len = str.length; + + // toPrecision returns exponential notation if the number of significant digits + // specified is less than the number of digits necessary to represent the integer + // part of the value in fixed-point notation. + + // Exponential notation. + if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) { + + // Append zeros? + for (; len < i; str += '0', len++); + str = toExponential(str, e); + + // Fixed-point notation. + } else { + i -= ne; + str = toFixedPoint(str, e, '0'); + + // Append zeros? + if (e + 1 > len) { + if (--i > 0) for (str += '.'; i--; str += '0'); + } else { + i += e - len; + if (i > 0) { + if (e + 1 == len) str += '.'; + for (; i--; str += '0'); + } + } + } + } + + return n.s < 0 && c0 ? '-' + str : str; + } + + + // Handle BigNumber.max and BigNumber.min. + function maxOrMin(args, method) { + var n, + i = 1, + m = new BigNumber(args[0]); + + for (; i < args.length; i++) { + n = new BigNumber(args[i]); + + // If any number is NaN, return NaN. + if (!n.s) { + m = n; + break; + } else if (method.call(m, n)) { + m = n; + } + } + + return m; + } + + + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. + */ + function normalise(n, c, e) { + var i = 1, + j = c.length; + + // Remove trailing zeros. + for (; !c[--j]; c.pop()); + + // Calculate the base 10 exponent. First get the number of digits of c[0]. + for (j = c[0]; j >= 10; j /= 10, i++); + + // Overflow? + if ((e = i + e * LOG_BASE - 1) > MAX_EXP) { + + // Infinity. + n.c = n.e = null; + + // Underflow? + } else if (e < MIN_EXP) { + + // Zero. + n.c = [n.e = 0]; + } else { + n.e = e; + n.c = c; + } + + return n; + } + + + // Handle values that fail the validity test in BigNumber. + parseNumeric = (function () { + var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, + dotAfter = /^([^.]+)\.$/, + dotBefore = /^\.([^.]+)$/, + isInfinityOrNaN = /^-?(Infinity|NaN)$/, + whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + + return function (x, str, isNum, b) { + var base, + s = isNum ? str : str.replace(whitespaceOrPlus, ''); + + // No exception on ±Infinity or NaN. + if (isInfinityOrNaN.test(s)) { + x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + } else { + if (!isNum) { + + // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i + s = s.replace(basePrefix, function (m, p1, p2) { + base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8; + return !b || b == base ? p1 : m; + }); + + if (b) { + base = b; + + // E.g. '1.' to '1', '.1' to '0.1' + s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1'); + } + + if (str != s) return new BigNumber(s, base); + } + + // '[BigNumber Error] Not a number: {n}' + // '[BigNumber Error] Not a base {b} number: {n}' + if (BigNumber.DEBUG) { + throw Error + (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); + } + + // NaN + x.s = null; + } + + x.c = x.e = null; + } + })(); + + + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. + */ + function round(x, sd, rm, r) { + var d, i, j, k, n, ni, rd, + xc = x.c, + pows10 = POWS_TEN; + + // if x is not Infinity or NaN... + if (xc) { + + // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. + // n is a base 1e14 number, the value of the element of array x.c containing rd. + // ni is the index of n within x.c. + // d is the number of digits of n. + // i is the index of rd within n including leading zeros. + // j is the actual index of rd within n (if < 0, rd is a leading zero). + out: { + + // Get the number of digits of the first element of xc. + for (d = 1, k = xc[0]; k >= 10; k /= 10, d++); + i = sd - d; + + // If the rounding digit is in the first element of xc... + if (i < 0) { + i += LOG_BASE; + j = sd; + n = xc[ni = 0]; + + // Get the rounding digit at index j of n. + rd = n / pows10[d - j - 1] % 10 | 0; + } else { + ni = mathceil((i + 1) / LOG_BASE); + + if (ni >= xc.length) { + + if (r) { + + // Needed by sqrt. + for (; xc.length <= ni; xc.push(0)); + n = rd = 0; + d = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + n = k = xc[ni]; + + // Get the number of digits of n. + for (d = 1; k >= 10; k /= 10, d++); + + // Get the index of rd within n. + i %= LOG_BASE; + + // Get the index of rd within n, adjusted for leading zeros. + // The number of leading zeros of n is given by LOG_BASE - d. + j = i - LOG_BASE + d; + + // Get the rounding digit at index j of n. + rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0; + } + } + + r = r || sd < 0 || + + // Are there any non-zero digits after the rounding digit? + // The expression n % pows10[d - j - 1] returns all digits of n to the right + // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. + xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]); + + r = rm < 4 + ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 || + rm == (x.s < 0 ? 8 : 7)); + + if (sd < 1 || !xc[0]) { + xc.length = 0; + + if (r) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE]; + x.e = -sd || 0; + } else { + + // Zero. + xc[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if (i == 0) { + xc.length = ni; + k = 1; + ni--; + } else { + xc.length = ni + 1; + k = pows10[LOG_BASE - i]; + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of n. + xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0; + } + + // Round up? + if (r) { + + for (; ;) { + + // If the digit to be rounded up is in the first element of xc... + if (ni == 0) { + + // i will be the length of xc[0] before k is added. + for (i = 1, j = xc[0]; j >= 10; j /= 10, i++); + j = xc[0] += k; + for (k = 1; j >= 10; j /= 10, k++); + + // if i != k the length has increased. + if (i != k) { + x.e++; + if (xc[0] == BASE) xc[0] = 1; + } + + break; + } else { + xc[ni] += k; + if (xc[ni] != BASE) break; + xc[ni--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for (i = xc.length; xc[--i] === 0; xc.pop()); + } + + // Overflow? Infinity. + if (x.e > MAX_EXP) { + x.c = x.e = null; + + // Underflow? Zero. + } else if (x.e < MIN_EXP) { + x.c = [x.e = 0]; + } + } + + return x; + } + + + function valueOf(n) { + var str, + e = n.e; + + if (e === null) return n.toString(); + + str = coeffToString(n.c); + + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential(str, e) + : toFixedPoint(str, e, '0'); + + return n.s < 0 ? '-' + str : str; + } + + + // PROTOTYPE/INSTANCE METHODS + + + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. + */ + P.absoluteValue = P.abs = function () { + var x = new BigNumber(this); + if (x.s < 0) x.s = 1; + return x; + }; + + + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. + */ + P.comparedTo = function (y, b) { + return compare(this, new BigNumber(y, b)); + }; + + + /* + * If dp is undefined or null or true or false, return the number of decimal places of the + * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * + * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * [dp] {number} Decimal places: integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + */ + P.decimalPlaces = P.dp = function (dp, rm) { + var c, n, v, + x = this; + + if (dp != null) { + intCheck(dp, 0, MAX); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + return round(new BigNumber(x), dp + x.e + 1, rm); + } + + if (!(c = x.c)) return null; + n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE; + + // Subtract the number of trailing zeros of the last number. + if (v = c[v]) for (; v % 10 == 0; v /= 10, n--); + if (n < 0) n = 0; + + return n; + }; + + + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.dividedBy = P.div = function (y, b) { + return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); + }; + + + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). + */ + P.dividedToIntegerBy = P.idiv = function (y, b) { + return div(this, new BigNumber(y, b), 0, 1); + }; + + + /* + * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. + * + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are integers, otherwise it + * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. + * + * n {number|string|BigNumber} The exponent. An integer. + * [m] {number|string|BigNumber} The modulus. + * + * '[BigNumber Error] Exponent not an integer: {n}' + */ + P.exponentiatedBy = P.pow = function (n, m) { + var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, + x = this; + + n = new BigNumber(n); + + // Allow NaN and ±Infinity, but not other non-integers. + if (n.c && !n.isInteger()) { + throw Error + (bignumberError + 'Exponent not an integer: ' + valueOf(n)); + } + + if (m != null) m = new BigNumber(m); + + // Exponent of MAX_SAFE_INTEGER is 15. + nIsBig = n.e > 14; + + // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0. + if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) { + + // The sign of the result of pow when x is negative depends on the evenness of n. + // If +n overflows to ±Infinity, the evenness of n would be not be known. + y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n))); + return m ? y.mod(m) : y; + } + + nIsNeg = n.s < 0; + + if (m) { + + // x % m returns NaN if abs(m) is zero, or m is NaN. + if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN); + + isModExp = !nIsNeg && x.isInteger() && m.isInteger(); + + if (isModExp) x = x.mod(m); + + // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15. + // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15. + } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 + // [1, 240000000] + ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 + // [80000000000000] [99999750000000] + : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) { + + // If x is negative and n is odd, k = -0, else k = 0. + k = x.s < 0 && isOdd(n) ? -0 : 0; + + // If x >= 1, k = ±Infinity. + if (x.e > -1) k = 1 / k; + + // If n is negative return ±0, else return ±Infinity. + return new BigNumber(nIsNeg ? 1 / k : k); + + } else if (POW_PRECISION) { + + // Truncating each coefficient array to a length of k after each multiplication + // equates to truncating significant digits to POW_PRECISION + [28, 41], + // i.e. there will be a minimum of 28 guard digits retained. + k = mathceil(POW_PRECISION / LOG_BASE + 2); + } + + if (nIsBig) { + half = new BigNumber(0.5); + if (nIsNeg) n.s = 1; + nIsOdd = isOdd(n); + } else { + i = Math.abs(+valueOf(n)); + nIsOdd = i % 2; + } + + y = new BigNumber(ONE); + + // Performs 54 loop iterations for n of 9007199254740991. + for (; ;) { + + if (nIsOdd) { + y = y.times(x); + if (!y.c) break; + + if (k) { + if (y.c.length > k) y.c.length = k; + } else if (isModExp) { + y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m)); + } + } + + if (i) { + i = mathfloor(i / 2); + if (i === 0) break; + nIsOdd = i % 2; + } else { + n = n.times(half); + round(n, n.e + 1, 1); + + if (n.e > 14) { + nIsOdd = isOdd(n); + } else { + i = +valueOf(n); + if (i === 0) break; + nIsOdd = i % 2; + } + } + + x = x.times(x); + + if (k) { + if (x.c && x.c.length > k) x.c.length = k; + } else if (isModExp) { + x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m)); + } + } + + if (isModExp) return y; + if (nIsNeg) y = ONE.div(y); + + return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer + * using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' + */ + P.integerValue = function (rm) { + var n = new BigNumber(this); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + return round(n, n.e + 1, rm); + }; + + + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise return false. + */ + P.isEqualTo = P.eq = function (y, b) { + return compare(this, new BigNumber(y, b)) === 0; + }; + + + /* + * Return true if the value of this BigNumber is a finite number, otherwise return false. + */ + P.isFinite = function () { + return !!this.c; + }; + + + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise return false. + */ + P.isGreaterThan = P.gt = function (y, b) { + return compare(this, new BigNumber(y, b)) > 0; + }; + + + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise return false. + */ + P.isGreaterThanOrEqualTo = P.gte = function (y, b) { + return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0; + + }; + + + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. + */ + P.isInteger = function () { + return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; + }; + + + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise return false. + */ + P.isLessThan = P.lt = function (y, b) { + return compare(this, new BigNumber(y, b)) < 0; + }; + + + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise return false. + */ + P.isLessThanOrEqualTo = P.lte = function (y, b) { + return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0; + }; + + + /* + * Return true if the value of this BigNumber is NaN, otherwise return false. + */ + P.isNaN = function () { + return !this.s; + }; + + + /* + * Return true if the value of this BigNumber is negative, otherwise return false. + */ + P.isNegative = function () { + return this.s < 0; + }; + + + /* + * Return true if the value of this BigNumber is positive, otherwise return false. + */ + P.isPositive = function () { + return this.s > 0; + }; + + + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise return false. + */ + P.isZero = function () { + return !!this.c && this.c[0] == 0; + }; + + + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). + */ + P.minus = function (y, b) { + var i, j, t, xLTy, + x = this, + a = x.s; + + y = new BigNumber(y, b); + b = y.s; + + // Either NaN? + if (!a || !b) return new BigNumber(NaN); + + // Signs differ? + if (a != b) { + y.s = -b; + return x.plus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if (!xe || !ye) { + + // Either Infinity? + if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN); + + // Either zero? + if (!xc[0] || !yc[0]) { + + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : + + // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity + ROUNDING_MODE == 3 ? -0 : 0); + } + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Determine which is the bigger number. + if (a = xe - ye) { + + if (xLTy = a < 0) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; + } + + t.reverse(); + + // Prepend zeros to equalise exponents. + for (b = a; b--; t.push(0)); + t.reverse(); + } else { + + // Exponents equal. Check digit by digit. + j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b; + + for (a = b = 0; b < j; b++) { + + if (xc[b] != yc[b]) { + xLTy = xc[b] < yc[b]; + break; + } + } + } + + // x < y? Point xc to the array of the bigger number. + if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s; + + b = (j = yc.length) - (i = xc.length); + + // Append zeros to xc if shorter. + // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. + if (b > 0) for (; b--; xc[i++] = 0); + b = BASE - 1; + + // Subtract yc from xc. + for (; j > a;) { + + if (xc[--j] < yc[j]) { + for (i = j; i && !xc[--i]; xc[i] = b); + --xc[i]; + xc[j] += BASE; + } + + xc[j] -= yc[j]; + } + + // Remove leading zeros and adjust exponent accordingly. + for (; xc[0] == 0; xc.splice(0, 1), --ye); + + // Zero? + if (!xc[0]) { + + // Following IEEE 754 (2008) 6.3, + // n - n = +0 but n - n = -0 when rounding towards -Infinity. + y.s = ROUNDING_MODE == 3 ? -1 : 1; + y.c = [y.e = 0]; + return y; + } + + // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity + // for finite x and y. + return normalise(y, xc, ye); + }; + + + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. + */ + P.modulo = P.mod = function (y, b) { + var q, s, + x = this; + + y = new BigNumber(y, b); + + // Return NaN if x is Infinity or NaN, or y is NaN or zero. + if (!x.c || !y.s || y.c && !y.c[0]) { + return new BigNumber(NaN); + + // Return x if y is Infinity or x is zero. + } else if (!y.c || x.c && !x.c[0]) { + return new BigNumber(x); + } + + if (MODULO_MODE == 9) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // r = x - qy where 0 <= r < abs(y) + s = y.s; + y.s = 1; + q = div(x, y, 0, 3); + y.s = s; + q.s *= s; + } else { + q = div(x, y, 0, MODULO_MODE); + } + + y = x.minus(q.times(y)); + + // To match JavaScript %, ensure sign of zero is sign of dividend. + if (!y.c[0] && MODULO_MODE == 1) y.s = x.s; + + return y; + }; + + + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value + * of BigNumber(y, b). + */ + P.multipliedBy = P.times = function (y, b) { + var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, + base, sqrtBase, + x = this, + xc = x.c, + yc = (y = new BigNumber(y, b)).c; + + // Either NaN, ±Infinity or ±0? + if (!xc || !yc || !xc[0] || !yc[0]) { + + // Return NaN if either is NaN, or one is 0 and the other is Infinity. + if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) { + y.c = y.e = y.s = null; + } else { + y.s *= x.s; + + // Return ±Infinity if either is ±Infinity. + if (!xc || !yc) { + y.c = y.e = null; + + // Return ±0 if either is ±0. + } else { + y.c = [0]; + y.e = 0; + } + } + + return y; + } + + e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE); + y.s *= x.s; + xcL = xc.length; + ycL = yc.length; + + // Ensure xc points to longer array and xcL to its length. + if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i; + + // Initialise the result array with zeros. + for (i = xcL + ycL, zc = []; i--; zc.push(0)); + + base = BASE; + sqrtBase = SQRT_BASE; + + for (i = ycL; --i >= 0;) { + c = 0; + ylo = yc[i] % sqrtBase; + yhi = yc[i] / sqrtBase | 0; + + for (k = xcL, j = i + k; j > i;) { + xlo = xc[--k] % sqrtBase; + xhi = xc[k] / sqrtBase | 0; + m = yhi * xlo + xhi * ylo; + xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c; + c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi; + zc[j--] = xlo % base; + } + + zc[j] = c; + } + + if (c) { + ++e; + } else { + zc.splice(0, 1); + } + + return normalise(y, zc, e); + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. + */ + P.negated = function () { + var x = new BigNumber(this); + x.s = -x.s || null; + return x; + }; + + + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). + */ + P.plus = function (y, b) { + var t, + x = this, + a = x.s; + + y = new BigNumber(y, b); + b = y.s; + + // Either NaN? + if (!a || !b) return new BigNumber(NaN); + + // Signs differ? + if (a != b) { + y.s = -b; + return x.minus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if (!xe || !ye) { + + // Return ±Infinity if either ±Infinity. + if (!xc || !yc) return new BigNumber(a / 0); + + // Either zero? + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0); + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. + if (a = xe - ye) { + if (a > 0) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; + } + + t.reverse(); + for (; a--; t.push(0)); + t.reverse(); + } + + a = xc.length; + b = yc.length; + + // Point xc to the longer array, and b to the shorter length. + if (a - b < 0) t = yc, yc = xc, xc = t, b = a; + + // Only start adding at yc.length - 1 as the further digits of xc can be ignored. + for (a = 0; b;) { + a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0; + xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; + } + + if (a) { + xc = [a].concat(xc); + ++ye; + } + + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + // ye = MAX_EXP + 1 possible + return normalise(y, xc, ye); + }; + + + /* + * If sd is undefined or null or true or false, return the number of significant digits of + * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * If sd is true include integer-part trailing zeros in the count. + * + * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. + * boolean: whether to count integer-part trailing zeros: true or false. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + */ + P.precision = P.sd = function (sd, rm) { + var c, n, v, + x = this; + + if (sd != null && sd !== !!sd) { + intCheck(sd, 1, MAX); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + return round(new BigNumber(x), sd, rm); + } + + if (!(c = x.c)) return null; + v = c.length - 1; + n = v * LOG_BASE + 1; + + if (v = c[v]) { + + // Subtract the number of trailing zeros of the last element. + for (; v % 10 == 0; v /= 10, n--); + + // Add the number of digits of the first element. + for (v = c[0]; v >= 10; v /= 10, n++); + } + + if (sd && x.e + 1 > n) n = x.e + 1; + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' + */ + P.shiftedBy = function (k) { + intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); + return this.times('1e' + k); + }; + + + /* + * sqrt(-n) = N + * sqrt(N) = N + * sqrt(-I) = N + * sqrt(I) = I + * sqrt(0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.squareRoot = P.sqrt = function () { + var m, n, r, rep, t, + x = this, + c = x.c, + s = x.s, + e = x.e, + dp = DECIMAL_PLACES + 4, + half = new BigNumber('0.5'); + + // Negative/NaN/Infinity/zero? + if (s !== 1 || !c || !c[0]) { + return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); + } + + // Initial estimate. + s = Math.sqrt(+valueOf(x)); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if (s == 0 || s == 1 / 0) { + n = coeffToString(c); + if ((n.length + e) % 2 == 0) n += '0'; + s = Math.sqrt(+n); + e = bitFloor((e + 1) / 2) - (e < 0 || e % 2); + + if (s == 1 / 0) { + n = '5e' + e; + } else { + n = s.toExponential(); + n = n.slice(0, n.indexOf('e') + 1) + e; + } + + r = new BigNumber(n); + } else { + r = new BigNumber(s + ''); + } + + // Check for zero. + // r could be zero if MIN_EXP is changed after the this value was created. + // This would cause a division by zero (x/t) and hence Infinity below, which would cause + // coeffToString to throw. + if (r.c[0]) { + e = r.e; + s = e + dp; + if (s < 3) s = 0; + + // Newton-Raphson iteration. + for (; ;) { + t = r; + r = half.times(t.plus(div(x, t, dp, 1))); + + if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) { + + // The exponent of r may here be one less than the final result exponent, + // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits + // are indexed correctly. + if (r.e < e) --s; + n = n.slice(s - 3, s + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits + // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the + // iteration. + if (n == '9999' || !rep && n == '4999') { + + // On the first iteration only, check to see if rounding up gives the + // exact result as the nines may infinitely repeat. + if (!rep) { + round(t, t.e + DECIMAL_PLACES + 2, 0); + + if (t.times(t).eq(x)) { + r = t; + break; + } + } + + dp += 4; + s += 4; + rep = 1; + } else { + + // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact + // result. If not, then there are further digits and m will be truthy. + if (!+n || !+n.slice(1) && n.charAt(0) == '5') { + + // Truncate to the first rounding digit. + round(r, r.e + DECIMAL_PLACES + 2, 1); + m = !r.times(r).eq(x); + } + + break; + } + } + } + } + + return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); + }; + + + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + */ + P.toExponential = function (dp, rm) { + if (dp != null) { + intCheck(dp, 0, MAX); + dp++; + } + return format(this, dp, rm, 1); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + */ + P.toFixed = function (dp, rm) { + if (dp != null) { + intCheck(dp, 0, MAX); + dp = dp + this.e + 1; + } + return format(this, dp, rm); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the format or FORMAT object (see BigNumber.set). + * + * The formatting object may contain some or all of the properties shown below. + * + * FORMAT = { + * prefix: '', + * groupSize: 3, + * secondaryGroupSize: 0, + * groupSeparator: ',', + * decimalSeparator: '.', + * fractionGroupSize: 0, + * fractionGroupSeparator: '\xA0', // non-breaking space + * suffix: '' + * }; + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * [format] {object} Formatting options. See FORMAT pbject above. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + * '[BigNumber Error] Argument not an object: {format}' + */ + P.toFormat = function (dp, rm, format) { + var str, + x = this; + + if (format == null) { + if (dp != null && rm && typeof rm == 'object') { + format = rm; + rm = null; + } else if (dp && typeof dp == 'object') { + format = dp; + dp = rm = null; + } else { + format = FORMAT; + } + } else if (typeof format != 'object') { + throw Error + (bignumberError + 'Argument not an object: ' + format); + } + + str = x.toFixed(dp, rm); + + if (x.c) { + var i, + arr = str.split('.'), + g1 = +format.groupSize, + g2 = +format.secondaryGroupSize, + groupSeparator = format.groupSeparator || '', + intPart = arr[0], + fractionPart = arr[1], + isNeg = x.s < 0, + intDigits = isNeg ? intPart.slice(1) : intPart, + len = intDigits.length; + + if (g2) i = g1, g1 = g2, g2 = i, len -= i; + + if (g1 > 0 && len > 0) { + i = len % g1 || g1; + intPart = intDigits.substr(0, i); + for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1); + if (g2 > 0) intPart += groupSeparator + intDigits.slice(i); + if (isNeg) intPart = '-' + intPart; + } + + str = fractionPart + ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize) + ? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'), + '$&' + (format.fractionGroupSeparator || '')) + : fractionPart) + : intPart; + } + + return (format.prefix || '') + str + (format.suffix || ''); + }; + + + /* + * Return an array of two BigNumbers representing the value of this BigNumber as a simple + * fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to the specified + * maximum denominator. If a maximum denominator is not specified, the denominator will be + * the lowest value necessary to represent the number exactly. + * + * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. + * + * '[BigNumber Error] Argument {not an integer|out of range} : {md}' + */ + P.toFraction = function (md) { + var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, + x = this, + xc = x.c; + + if (md != null) { + n = new BigNumber(md); + + // Throw if md is less than one or is not an integer, unless it is Infinity. + if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) { + throw Error + (bignumberError + 'Argument ' + + (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n)); + } + } + + if (!xc) return new BigNumber(x); + + d = new BigNumber(ONE); + n1 = d0 = new BigNumber(ONE); + d1 = n0 = new BigNumber(ONE); + s = coeffToString(xc); + + // Determine initial denominator. + // d is a power of 10 and the minimum max denominator that specifies the value exactly. + e = d.e = s.length - x.e - 1; + d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp]; + md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n; + + exp = MAX_EXP; + MAX_EXP = 1 / 0; + n = new BigNumber(s); + + // n0 = d1 = 0 + n0.c[0] = 0; + + for (; ;) { + q = div(n, d, 0, 1); + d2 = d0.plus(q.times(d1)); + if (d2.comparedTo(md) == 1) break; + d0 = d1; + d1 = d2; + n1 = n0.plus(q.times(d2 = n1)); + n0 = d2; + d = n.minus(q.times(d2 = d)); + n = d2; + } + + d2 = div(md.minus(d0), d1, 0, 1); + n0 = n0.plus(d2.times(n1)); + d0 = d0.plus(d2.times(d1)); + n0.s = n1.s = x.s; + e = e * 2; + + // Determine which fraction is closer to x, n0/d0 or n1/d1 + r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo( + div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; + + MAX_EXP = exp; + + return r; + }; + + + /* + * Return the value of this BigNumber converted to a number primitive. + */ + P.toNumber = function () { + return +valueOf(this); + }; + + + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + */ + P.toPrecision = function (sd, rm) { + if (sd != null) intCheck(sd, 1, MAX); + return format(this, sd, rm, 2); + }; + + + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. + * + * [b] {number} Integer, 2 to ALPHABET.length inclusive. + * + * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + */ + P.toString = function (b) { + var str, + n = this, + s = n.s, + e = n.e; + + // Infinity or NaN? + if (e === null) { + if (s) { + str = 'Infinity'; + if (s < 0) str = '-' + str; + } else { + str = 'NaN'; + } + } else { + if (b == null) { + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential(coeffToString(n.c), e) + : toFixedPoint(coeffToString(n.c), e, '0'); + } else if (b === 10) { + n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE); + str = toFixedPoint(coeffToString(n.c), n.e, '0'); + } else { + intCheck(b, 2, ALPHABET.length, 'Base'); + str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true); + } + + if (s < 0 && n.c[0]) str = '-' + str; + } + + return str; + }; + + + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. + */ + P.valueOf = P.toJSON = function () { + return valueOf(this); + }; + + + P._isBigNumber = true; + + if (configObject != null) BigNumber.set(configObject); + + return BigNumber; + } + + + // PRIVATE HELPER FUNCTIONS + + // These functions don't need access to variables, + // e.g. DECIMAL_PLACES, in the scope of the `clone` function above. + + + function bitFloor(n) { + var i = n | 0; + return n > 0 || n === i ? i : i - 1; + } + + + // Return a coefficient array as a string of base 10 digits. + function coeffToString(a) { + var s, z, + i = 1, + j = a.length, + r = a[0] + ''; + + for (; i < j;) { + s = a[i++] + ''; + z = LOG_BASE - s.length; + for (; z--; s = '0' + s); + r += s; + } + + // Determine trailing zeros. + for (j = r.length; r.charCodeAt(--j) === 48;); + + return r.slice(0, j + 1 || 1); + } + + + // Compare the value of BigNumbers x and y. + function compare(x, y) { + var a, b, + xc = x.c, + yc = y.c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; + + // Either NaN? + if (!i || !j) return null; + + a = xc && !xc[0]; + b = yc && !yc[0]; + + // Either zero? + if (a || b) return a ? b ? 0 : -j : i; + + // Signs differ? + if (i != j) return i; + + a = i < 0; + b = k == l; + + // Either Infinity? + if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1; + + // Compare exponents. + if (!b) return k > l ^ a ? 1 : -1; + + j = (k = xc.length) < (l = yc.length) ? k : l; + + // Compare digit by digit. + for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1; + + // Compare lengths. + return k == l ? 0 : k > l ^ a ? 1 : -1; + } + + + /* + * Check that n is a primitive number, an integer, and in range, otherwise throw. + */ + function intCheck(n, min, max, name) { + if (n < min || n > max || n !== mathfloor(n)) { + throw Error + (bignumberError + (name || 'Argument') + (typeof n == 'number' + ? n < min || n > max ? ' out of range: ' : ' not an integer: ' + : ' not a primitive number: ') + String(n)); + } + } + + + // Assumes finite n. + function isOdd(n) { + var k = n.c.length - 1; + return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0; + } + + + function toExponential(str, e) { + return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) + + (e < 0 ? 'e' : 'e+') + e; + } + + + function toFixedPoint(str, e, z) { + var len, zs; + + // Negative exponent? + if (e < 0) { + + // Prepend zeros. + for (zs = z + '.'; ++e; zs += z); + str = zs + str; + + // Positive exponent + } else { + len = str.length; + + // Append zeros. + if (++e > len) { + for (zs = z, e -= len; --e; zs += z); + str += zs; + } else if (e < len) { + str = str.slice(0, e) + '.' + str.slice(e); + } + } + + return str; + } + + + // EXPORT + + + BigNumber = clone(); + BigNumber['default'] = BigNumber.BigNumber = BigNumber; + + // AMD. + if (typeof define == 'function' && define.amd) { + define(function () { return BigNumber; }); + + // Node.js and other environments that support module.exports. + } else if (typeof module != 'undefined' && module.exports) { + module.exports = BigNumber; + + // Browser. + } else { + if (!globalObject) { + globalObject = typeof self != 'undefined' && self ? self : window; + } + + globalObject.BigNumber = BigNumber; + } +})(this); diff --git a/docs/example/bundle-bf.js b/docs/example/bundle-bf.js index 5aa545f0..488e8946 100644 --- a/docs/example/bundle-bf.js +++ b/docs/example/bundle-bf.js @@ -1,19 +1,12 @@ -!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).cbor=f()}}((function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){return o(e[i][1][r]||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i0?validLen-4:validLen;for(i=0;i>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;ilen2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],4:[function(require,module,exports){},{}],5:[function(require,module,exports){(function(Buffer){(function(){ +!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).cbor=f()}}((function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){return o(e[i][1][r]||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i0?validLen-4:validLen;for(i=0;i>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;ilen2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],4:[function(require,module,exports){!function(globalObject){"use strict";var BigNumber,isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],MAX=1e9;function bitFloor(n){var i=0|n;return n>0||n===i?i:i-1}function coeffToString(a){for(var s,z,i=1,j=a.length,r=a[0]+"";il^a?1:-1;for(j=(k=xc.length)<(l=yc.length)?k:l,i=0;iyc[i]^a?1:-1;return k==l?0:k>l^a?1:-1}function intCheck(n,min,max,name){if(nmax||n!==mathfloor(n))throw Error(bignumberError+(name||"Argument")+("number"==typeof n?nmax?" out of range: ":" not an integer: ":" not a primitive number: ")+String(n))}function isOdd(n){var k=n.c.length-1;return bitFloor(n.e/14)==k&&n.c[k]%2!=0}function toExponential(str,e){return(str.length>1?str.charAt(0)+"."+str.slice(1):str)+(e<0?"e":"e+")+e}function toFixedPoint(str,e,z){var len,zs;if(e<0){for(zs=z+".";++e;zs+=z);str=zs+str}else if(++e>(len=str.length)){for(zs=z,e-=len;--e;zs+=z);str+=zs}else eMAX_EXP?x.c=x.e=null:v.e=10;i/=10,e++);return void(e>MAX_EXP?x.c=x.e=null:(x.e=e,x.c=[v]))}str=String(v)}else{if(!isNumeric.test(str=String(v)))return parseNumeric(x,str,isNum);x.s=45==str.charCodeAt(0)?(str=str.slice(1),-1):1}(e=str.indexOf("."))>-1&&(str=str.replace(".","")),(i=str.search(/e/i))>0?(e<0&&(e=i),e+=+str.slice(i+1),str=str.substring(0,i)):e<0&&(e=str.length)}else{if(intCheck(b,2,ALPHABET.length,"Base"),10==b)return round(x=new BigNumber(v),DECIMAL_PLACES+x.e+1,ROUNDING_MODE);if(str=String(v),isNum="number"==typeof v){if(0*v!=0)return parseNumeric(x,str,isNum,b);if(x.s=1/v<0?(str=str.slice(1),-1):1,BigNumber.DEBUG&&str.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+v)}else x.s=45===str.charCodeAt(0)?(str=str.slice(1),-1):1;for(alphabet=ALPHABET.slice(0,b),e=i=0,len=str.length;ie){e=len;continue}}else if(!caseChanged&&(str==str.toUpperCase()&&(str=str.toLowerCase())||str==str.toLowerCase()&&(str=str.toUpperCase()))){caseChanged=!0,i=-1,e=0;continue}return parseNumeric(x,String(v),isNum,b)}isNum=!1,(e=(str=convertBase(str,b,10,x.s)).indexOf("."))>-1?str=str.replace(".",""):e=str.length}for(i=0;48===str.charCodeAt(i);i++);for(len=str.length;48===str.charCodeAt(--len););if(str=str.slice(i,++len)){if(len-=i,isNum&&BigNumber.DEBUG&&len>15&&(v>9007199254740991||v!==mathfloor(v)))throw Error(tooManyDigits+x.s*v);if((e=e-i-1)>MAX_EXP)x.c=x.e=null;else if(e=TO_EXP_POS)?toExponential(str,ne):toFixedPoint(str,ne,"0");else if(e=(n=round(new BigNumber(n),i,rm)).e,len=(str=coeffToString(n.c)).length,1==id||2==id&&(i<=e||e<=TO_EXP_NEG)){for(;lenlen){if(--i>0)for(str+=".";i--;str+="0");}else if((i+=e-len)>0)for(e+1==len&&(str+=".");i--;str+="0");return n.s<0&&c0?"-"+str:str}function maxOrMin(args,method){for(var n,i=1,m=new BigNumber(args[0]);i=10;j/=10,i++);return(e=i+14*e-1)>MAX_EXP?n.c=n.e=null:e=10;k/=10,d++);if((i=sd-d)<0)i+=14,j=sd,rd=(n=xc[ni=0])/pows10[d-j-1]%10|0;else if((ni=mathceil((i+1)/14))>=xc.length){if(!r)break out;for(;xc.length<=ni;xc.push(0));n=rd=0,d=1,j=(i%=14)-14+1}else{for(n=k=xc[ni],d=1;k>=10;k/=10,d++);rd=(j=(i%=14)-14+d)<0?0:n/pows10[d-j-1]%10|0}if(r=r||sd<0||null!=xc[ni+1]||(j<0?n:n%pows10[d-j-1]),r=rm<4?(rd||r)&&(0==rm||rm==(x.s<0?3:2)):rd>5||5==rd&&(4==rm||r||6==rm&&(i>0?j>0?n/pows10[d-j]:0:xc[ni-1])%10&1||rm==(x.s<0?8:7)),sd<1||!xc[0])return xc.length=0,r?(sd-=x.e+1,xc[0]=pows10[(14-sd%14)%14],x.e=-sd||0):xc[0]=x.e=0,x;if(0==i?(xc.length=ni,k=1,ni--):(xc.length=ni+1,k=pows10[14-i],xc[ni]=j>0?mathfloor(n/pows10[d-j]%pows10[j])*k:0),r)for(;;){if(0==ni){for(i=1,j=xc[0];j>=10;j/=10,i++);for(j=xc[0]+=k,k=1;j>=10;j/=10,k++);i!=k&&(x.e++,xc[0]==BASE&&(xc[0]=1));break}if(xc[ni]+=k,xc[ni]!=BASE)break;xc[ni--]=0,k=1}for(i=xc.length;0===xc[--i];xc.pop());}x.e>MAX_EXP?x.c=x.e=null:x.e=TO_EXP_POS?toExponential(str,e):toFixedPoint(str,e,"0"),n.s<0?"-"+str:str)}return BigNumber.clone=clone,BigNumber.ROUND_UP=0,BigNumber.ROUND_DOWN=1,BigNumber.ROUND_CEIL=2,BigNumber.ROUND_FLOOR=3,BigNumber.ROUND_HALF_UP=4,BigNumber.ROUND_HALF_DOWN=5,BigNumber.ROUND_HALF_EVEN=6,BigNumber.ROUND_HALF_CEIL=7,BigNumber.ROUND_HALF_FLOOR=8,BigNumber.EUCLID=9,BigNumber.config=BigNumber.set=function(obj){var p,v;if(null!=obj){if("object"!=typeof obj)throw Error(bignumberError+"Object expected: "+obj);if(obj.hasOwnProperty(p="DECIMAL_PLACES")&&(intCheck(v=obj[p],0,MAX,p),DECIMAL_PLACES=v),obj.hasOwnProperty(p="ROUNDING_MODE")&&(intCheck(v=obj[p],0,8,p),ROUNDING_MODE=v),obj.hasOwnProperty(p="EXPONENTIAL_AT")&&((v=obj[p])&&v.pop?(intCheck(v[0],-MAX,0,p),intCheck(v[1],0,MAX,p),TO_EXP_NEG=v[0],TO_EXP_POS=v[1]):(intCheck(v,-MAX,MAX,p),TO_EXP_NEG=-(TO_EXP_POS=v<0?-v:v))),obj.hasOwnProperty(p="RANGE"))if((v=obj[p])&&v.pop)intCheck(v[0],-MAX,-1,p),intCheck(v[1],1,MAX,p),MIN_EXP=v[0],MAX_EXP=v[1];else{if(intCheck(v,-MAX,MAX,p),!v)throw Error(bignumberError+p+" cannot be zero: "+v);MIN_EXP=-(MAX_EXP=v<0?-v:v)}if(obj.hasOwnProperty(p="CRYPTO")){if((v=obj[p])!==!!v)throw Error(bignumberError+p+" not true or false: "+v);if(v){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw CRYPTO=!v,Error(bignumberError+"crypto unavailable");CRYPTO=v}else CRYPTO=v}if(obj.hasOwnProperty(p="MODULO_MODE")&&(intCheck(v=obj[p],0,9,p),MODULO_MODE=v),obj.hasOwnProperty(p="POW_PRECISION")&&(intCheck(v=obj[p],0,MAX,p),POW_PRECISION=v),obj.hasOwnProperty(p="FORMAT")){if("object"!=typeof(v=obj[p]))throw Error(bignumberError+p+" not an object: "+v);FORMAT=v}if(obj.hasOwnProperty(p="ALPHABET")){if("string"!=typeof(v=obj[p])||/^.?$|[+\-.\s]|(.).*\1/.test(v))throw Error(bignumberError+p+" invalid: "+v);ALPHABET=v}}return{DECIMAL_PLACES:DECIMAL_PLACES,ROUNDING_MODE:ROUNDING_MODE,EXPONENTIAL_AT:[TO_EXP_NEG,TO_EXP_POS],RANGE:[MIN_EXP,MAX_EXP],CRYPTO:CRYPTO,MODULO_MODE:MODULO_MODE,POW_PRECISION:POW_PRECISION,FORMAT:FORMAT,ALPHABET:ALPHABET}},BigNumber.isBigNumber=function(v){if(!v||!0!==v._isBigNumber)return!1;if(!BigNumber.DEBUG)return!0;var i,n,c=v.c,e=v.e,s=v.s;out:if("[object Array]"=={}.toString.call(c)){if((1===s||-1===s)&&e>=-MAX&&e<=MAX&&e===mathfloor(e)){if(0===c[0]){if(0===e&&1===c.length)return!0;break out}if((i=(e+1)%14)<1&&(i+=14),String(c[0]).length==i){for(i=0;i=BASE||n!==mathfloor(n))break out;if(0!==n)return!0}}}else if(null===c&&null===e&&(null===s||1===s||-1===s))return!0;throw Error(bignumberError+"Invalid BigNumber: "+v)},BigNumber.maximum=BigNumber.max=function(){return maxOrMin(arguments,P.lt)},BigNumber.minimum=BigNumber.min=function(){return maxOrMin(arguments,P.gt)},BigNumber.random=(random53bitInt=9007199254740992*Math.random()&2097151?function(){return mathfloor(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(dp){var a,b,e,k,v,i=0,c=[],rand=new BigNumber(ONE);if(null==dp?dp=DECIMAL_PLACES:intCheck(dp,0,MAX),k=mathceil(dp/14),CRYPTO)if(crypto.getRandomValues){for(a=crypto.getRandomValues(new Uint32Array(k*=2));i>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),a[i]=b[0],a[i+1]=b[1]):(c.push(v%1e14),i+=2);i=k/2}else{if(!crypto.randomBytes)throw CRYPTO=!1,Error(bignumberError+"crypto unavailable");for(a=crypto.randomBytes(k*=7);i=9e15?crypto.randomBytes(7).copy(a,i):(c.push(v%1e14),i+=7);i=k/7}if(!CRYPTO)for(;i=10;v/=10,i++);i<14&&(e-=14-i)}return rand.e=e,rand.c=c,rand}),BigNumber.sum=function(){for(var i=1,args=arguments,sum=new BigNumber(args[0]);ibaseOut-1&&(null==arr[j+1]&&(arr[j+1]=0),arr[j+1]+=arr[j]/baseOut|0,arr[j]%=baseOut)}return arr.reverse()}return function(str,baseIn,baseOut,sign,callerIsToString){var alphabet,d,e,k,r,x,xc,y,i=str.indexOf("."),dp=DECIMAL_PLACES,rm=ROUNDING_MODE;for(i>=0&&(k=POW_PRECISION,POW_PRECISION=0,str=str.replace(".",""),x=(y=new BigNumber(baseIn)).pow(str.length-i),POW_PRECISION=k,y.c=toBaseOut(toFixedPoint(coeffToString(x.c),x.e,"0"),10,baseOut,"0123456789"),y.e=y.c.length),e=k=(xc=toBaseOut(str,baseIn,baseOut,callerIsToString?(alphabet=ALPHABET,"0123456789"):(alphabet="0123456789",ALPHABET))).length;0==xc[--k];xc.pop());if(!xc[0])return alphabet.charAt(0);if(i<0?--e:(x.c=xc,x.e=e,x.s=sign,xc=(x=div(x,y,dp,rm,baseOut)).c,r=x.r,e=x.e),i=xc[d=e+dp+1],k=baseOut/2,r=r||d<0||null!=xc[d+1],r=rm<4?(null!=i||r)&&(0==rm||rm==(x.s<0?3:2)):i>k||i==k&&(4==rm||r||6==rm&&1&xc[d-1]||rm==(x.s<0?8:7)),d<1||!xc[0])str=r?toFixedPoint(alphabet.charAt(1),-dp,alphabet.charAt(0)):alphabet.charAt(0);else{if(xc.length=d,r)for(--baseOut;++xc[--d]>baseOut;)xc[d]=0,d||(++e,xc=[1].concat(xc));for(k=xc.length;!xc[--k];);for(i=0,str="";i<=k;str+=alphabet.charAt(xc[i++]));str=toFixedPoint(str,e,alphabet.charAt(0))}return str}}(),div=function(){function multiply(x,k,base){var m,temp,xlo,xhi,carry=0,i=x.length,klo=k%1e7,khi=k/1e7|0;for(x=x.slice();i--;)carry=((temp=klo*(xlo=x[i]%1e7)+(m=khi*xlo+(xhi=x[i]/1e7|0)*klo)%1e7*1e7+carry)/base|0)+(m/1e7|0)+khi*xhi,x[i]=temp%base;return carry&&(x=[carry].concat(x)),x}function compare(a,b,aL,bL){var i,cmp;if(aL!=bL)cmp=aL>bL?1:-1;else for(i=cmp=0;ib[i]?1:-1;break}return cmp}function subtract(a,b,aL,base){for(var i=0;aL--;)a[aL]-=i,i=a[aL]1;a.splice(0,1));}return function(x,y,dp,rm,base){var cmp,e,i,more,n,prod,prodL,q,qc,rem,remL,rem0,xi,xL,yc0,yL,yz,s=x.s==y.s?1:-1,xc=x.c,yc=y.c;if(!(xc&&xc[0]&&yc&&yc[0]))return new BigNumber(x.s&&y.s&&(xc?!yc||xc[0]!=yc[0]:yc)?xc&&0==xc[0]||!yc?0*s:s/0:NaN);for(qc=(q=new BigNumber(s)).c=[],s=dp+(e=x.e-y.e)+1,base||(base=BASE,e=bitFloor(x.e/14)-bitFloor(y.e/14),s=s/14|0),i=0;yc[i]==(xc[i]||0);i++);if(yc[i]>(xc[i]||0)&&e--,s<0)qc.push(1),more=!0;else{for(xL=xc.length,yL=yc.length,i=0,s+=2,(n=mathfloor(base/(yc[0]+1)))>1&&(yc=multiply(yc,n,base),xc=multiply(xc,n,base),yL=yc.length,xL=xc.length),xi=yL,remL=(rem=xc.slice(0,yL)).length;remL=base/2&&yc0++;do{if(n=0,(cmp=compare(yc,rem,yL,remL))<0){if(rem0=rem[0],yL!=remL&&(rem0=rem0*base+(rem[1]||0)),(n=mathfloor(rem0/yc0))>1)for(n>=base&&(n=base-1),prodL=(prod=multiply(yc,n,base)).length,remL=rem.length;1==compare(prod,rem,prodL,remL);)n--,subtract(prod,yL=10;s/=10,i++);round(q,dp+(q.e=i+14*e-1)+1,rm,more)}else q.e=e,q.r=+more;return q}}(),basePrefix=/^(-?)0([xbo])(?=\w[\w.]*$)/i,dotAfter=/^([^.]+)\.$/,dotBefore=/^\.([^.]+)$/,isInfinityOrNaN=/^-?(Infinity|NaN)$/,whitespaceOrPlus=/^\s*\+(?=[\w.])|^\s+|\s+$/g,parseNumeric=function(x,str,isNum,b){var base,s=isNum?str:str.replace(whitespaceOrPlus,"");if(isInfinityOrNaN.test(s))x.s=isNaN(s)?null:s<0?-1:1;else{if(!isNum&&(s=s.replace(basePrefix,(function(m,p1,p2){return base="x"==(p2=p2.toLowerCase())?16:"b"==p2?2:8,b&&b!=base?m:p1})),b&&(base=b,s=s.replace(dotAfter,"$1").replace(dotBefore,"0.$1")),str!=s))return new BigNumber(s,base);if(BigNumber.DEBUG)throw Error(bignumberError+"Not a"+(b?" base "+b:"")+" number: "+str);x.s=null}x.c=x.e=null},P.absoluteValue=P.abs=function(){var x=new BigNumber(this);return x.s<0&&(x.s=1),x},P.comparedTo=function(y,b){return compare(this,new BigNumber(y,b))},P.decimalPlaces=P.dp=function(dp,rm){var c,n,v,x=this;if(null!=dp)return intCheck(dp,0,MAX),null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(new BigNumber(x),dp+x.e+1,rm);if(!(c=x.c))return null;if(n=14*((v=c.length-1)-bitFloor(this.e/14)),v=c[v])for(;v%10==0;v/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(y,b){return div(this,new BigNumber(y,b),DECIMAL_PLACES,ROUNDING_MODE)},P.dividedToIntegerBy=P.idiv=function(y,b){return div(this,new BigNumber(y,b),0,1)},P.exponentiatedBy=P.pow=function(n,m){var half,isModExp,i,k,nIsBig,nIsNeg,nIsOdd,y,x=this;if((n=new BigNumber(n)).c&&!n.isInteger())throw Error(bignumberError+"Exponent not an integer: "+valueOf(n));if(null!=m&&(m=new BigNumber(m)),nIsBig=n.e>14,!x.c||!x.c[0]||1==x.c[0]&&!x.e&&1==x.c.length||!n.c||!n.c[0])return y=new BigNumber(Math.pow(+valueOf(x),nIsBig?2-isOdd(n):+valueOf(n))),m?y.mod(m):y;if(nIsNeg=n.s<0,m){if(m.c?!m.c[0]:!m.s)return new BigNumber(NaN);(isModExp=!nIsNeg&&x.isInteger()&&m.isInteger())&&(x=x.mod(m))}else{if(n.e>9&&(x.e>0||x.e<-1||(0==x.e?x.c[0]>1||nIsBig&&x.c[1]>=24e7:x.c[0]<8e13||nIsBig&&x.c[0]<=9999975e7)))return k=x.s<0&&isOdd(n)?-0:0,x.e>-1&&(k=1/k),new BigNumber(nIsNeg?1/k:k);POW_PRECISION&&(k=mathceil(POW_PRECISION/14+2))}for(nIsBig?(half=new BigNumber(.5),nIsNeg&&(n.s=1),nIsOdd=isOdd(n)):nIsOdd=(i=Math.abs(+valueOf(n)))%2,y=new BigNumber(ONE);;){if(nIsOdd){if(!(y=y.times(x)).c)break;k?y.c.length>k&&(y.c.length=k):isModExp&&(y=y.mod(m))}if(i){if(0===(i=mathfloor(i/2)))break;nIsOdd=i%2}else if(round(n=n.times(half),n.e+1,1),n.e>14)nIsOdd=isOdd(n);else{if(0===(i=+valueOf(n)))break;nIsOdd=i%2}x=x.times(x),k?x.c&&x.c.length>k&&(x.c.length=k):isModExp&&(x=x.mod(m))}return isModExp?y:(nIsNeg&&(y=ONE.div(y)),m?y.mod(m):k?round(y,POW_PRECISION,ROUNDING_MODE,undefined):y)},P.integerValue=function(rm){var n=new BigNumber(this);return null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(n,n.e+1,rm)},P.isEqualTo=P.eq=function(y,b){return 0===compare(this,new BigNumber(y,b))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(y,b){return compare(this,new BigNumber(y,b))>0},P.isGreaterThanOrEqualTo=P.gte=function(y,b){return 1===(b=compare(this,new BigNumber(y,b)))||0===b},P.isInteger=function(){return!!this.c&&bitFloor(this.e/14)>this.c.length-2},P.isLessThan=P.lt=function(y,b){return compare(this,new BigNumber(y,b))<0},P.isLessThanOrEqualTo=P.lte=function(y,b){return-1===(b=compare(this,new BigNumber(y,b)))||0===b},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(y,b){var i,j,t,xLTy,x=this,a=x.s;if(b=(y=new BigNumber(y,b)).s,!a||!b)return new BigNumber(NaN);if(a!=b)return y.s=-b,x.plus(y);var xe=x.e/14,ye=y.e/14,xc=x.c,yc=y.c;if(!xe||!ye){if(!xc||!yc)return xc?(y.s=-b,y):new BigNumber(yc?x:NaN);if(!xc[0]||!yc[0])return yc[0]?(y.s=-b,y):new BigNumber(xc[0]?x:3==ROUNDING_MODE?-0:0)}if(xe=bitFloor(xe),ye=bitFloor(ye),xc=xc.slice(),a=xe-ye){for((xLTy=a<0)?(a=-a,t=xc):(ye=xe,t=yc),t.reverse(),b=a;b--;t.push(0));t.reverse()}else for(j=(xLTy=(a=xc.length)<(b=yc.length))?a:b,a=b=0;b0)for(;b--;xc[i++]=0);for(b=BASE-1;j>a;){if(xc[--j]=0;){for(c=0,ylo=yc[i]%1e7,yhi=yc[i]/1e7|0,j=i+(k=xcL);j>i;)c=((xlo=ylo*(xlo=xc[--k]%1e7)+(m=yhi*xlo+(xhi=xc[k]/1e7|0)*ylo)%1e7*1e7+zc[j]+c)/base|0)+(m/1e7|0)+yhi*xhi,zc[j--]=xlo%base;zc[j]=c}return c?++e:zc.splice(0,1),normalise(y,zc,e)},P.negated=function(){var x=new BigNumber(this);return x.s=-x.s||null,x},P.plus=function(y,b){var t,x=this,a=x.s;if(b=(y=new BigNumber(y,b)).s,!a||!b)return new BigNumber(NaN);if(a!=b)return y.s=-b,x.minus(y);var xe=x.e/14,ye=y.e/14,xc=x.c,yc=y.c;if(!xe||!ye){if(!xc||!yc)return new BigNumber(a/0);if(!xc[0]||!yc[0])return yc[0]?y:new BigNumber(xc[0]?x:0*a)}if(xe=bitFloor(xe),ye=bitFloor(ye),xc=xc.slice(),a=xe-ye){for(a>0?(ye=xe,t=yc):(a=-a,t=xc),t.reverse();a--;t.push(0));t.reverse()}for((a=xc.length)-(b=yc.length)<0&&(t=yc,yc=xc,xc=t,b=a),a=0;b;)a=(xc[--b]=xc[b]+yc[b]+a)/BASE|0,xc[b]=BASE===xc[b]?0:xc[b]%BASE;return a&&(xc=[a].concat(xc),++ye),normalise(y,xc,ye)},P.precision=P.sd=function(sd,rm){var c,n,v,x=this;if(null!=sd&&sd!==!!sd)return intCheck(sd,1,MAX),null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(new BigNumber(x),sd,rm);if(!(c=x.c))return null;if(n=14*(v=c.length-1)+1,v=c[v]){for(;v%10==0;v/=10,n--);for(v=c[0];v>=10;v/=10,n++);}return sd&&x.e+1>n&&(n=x.e+1),n},P.shiftedBy=function(k){return intCheck(k,-9007199254740991,9007199254740991),this.times("1e"+k)},P.squareRoot=P.sqrt=function(){var m,n,r,rep,t,x=this,c=x.c,s=x.s,e=x.e,dp=DECIMAL_PLACES+4,half=new BigNumber("0.5");if(1!==s||!c||!c[0])return new BigNumber(!s||s<0&&(!c||c[0])?NaN:c?x:1/0);if(0==(s=Math.sqrt(+valueOf(x)))||s==1/0?(((n=coeffToString(c)).length+e)%2==0&&(n+="0"),s=Math.sqrt(+n),e=bitFloor((e+1)/2)-(e<0||e%2),r=new BigNumber(n=s==1/0?"5e"+e:(n=s.toExponential()).slice(0,n.indexOf("e")+1)+e)):r=new BigNumber(s+""),r.c[0])for((s=(e=r.e)+dp)<3&&(s=0);;)if(t=r,r=half.times(t.plus(div(x,t,dp,1))),coeffToString(t.c).slice(0,s)===(n=coeffToString(r.c)).slice(0,s)){if(r.e0&&len>0){for(i=len%g1||g1,intPart=intDigits.substr(0,i);i0&&(intPart+=groupSeparator+intDigits.slice(i)),isNeg&&(intPart="-"+intPart)}str=fractionPart?intPart+(format.decimalSeparator||"")+((g2=+format.fractionGroupSize)?fractionPart.replace(new RegExp("\\d{"+g2+"}\\B","g"),"$&"+(format.fractionGroupSeparator||"")):fractionPart):intPart}return(format.prefix||"")+str+(format.suffix||"")},P.toFraction=function(md){var d,d0,d1,d2,e,exp,n,n0,n1,q,r,s,x=this,xc=x.c;if(null!=md&&(!(n=new BigNumber(md)).isInteger()&&(n.c||1!==n.s)||n.lt(ONE)))throw Error(bignumberError+"Argument "+(n.isInteger()?"out of range: ":"not an integer: ")+valueOf(n));if(!xc)return new BigNumber(x);for(d=new BigNumber(ONE),n1=d0=new BigNumber(ONE),d1=n0=new BigNumber(ONE),s=coeffToString(xc),e=d.e=s.length-x.e-1,d.c[0]=POWS_TEN[(exp=e%14)<0?14+exp:exp],md=!md||n.comparedTo(d)>0?e>0?d:n1:n,exp=MAX_EXP,MAX_EXP=1/0,n=new BigNumber(s),n0.c[0]=0;q=div(n,d,0,1),1!=(d2=d0.plus(q.times(d1))).comparedTo(md);)d0=d1,d1=d2,n1=n0.plus(q.times(d2=n1)),n0=d2,d=n.minus(q.times(d2=d)),n=d2;return d2=div(md.minus(d0),d1,0,1),n0=n0.plus(d2.times(n1)),d0=d0.plus(d2.times(d1)),n0.s=n1.s=x.s,r=div(n1,d1,e*=2,ROUNDING_MODE).minus(x).abs().comparedTo(div(n0,d0,e,ROUNDING_MODE).minus(x).abs())<1?[n1,d1]:[n0,d0],MAX_EXP=exp,r},P.toNumber=function(){return+valueOf(this)},P.toPrecision=function(sd,rm){return null!=sd&&intCheck(sd,1,MAX),format(this,sd,rm,2)},P.toString=function(b){var str,n=this,s=n.s,e=n.e;return null===e?s?(str="Infinity",s<0&&(str="-"+str)):str="NaN":(null==b?str=e<=TO_EXP_NEG||e>=TO_EXP_POS?toExponential(coeffToString(n.c),e):toFixedPoint(coeffToString(n.c),e,"0"):10===b?str=toFixedPoint(coeffToString((n=round(new BigNumber(n),DECIMAL_PLACES+e+1,ROUNDING_MODE)).c),n.e,"0"):(intCheck(b,2,ALPHABET.length,"Base"),str=convertBase(toFixedPoint(coeffToString(n.c),e,"0"),10,b,s,!0)),s<0&&n.c[0]&&(str="-"+str)),str},P.valueOf=P.toJSON=function(){return valueOf(this)},P._isBigNumber=!0,null!=configObject&&BigNumber.set(configObject),BigNumber}()).default=BigNumber.BigNumber=BigNumber,void 0!==module&&module.exports?module.exports=BigNumber:(globalObject||(globalObject="undefined"!=typeof self&&self?self:window),globalObject.BigNumber=BigNumber)}(this)},{}],5:[function(require,module,exports){},{}],6:[function(require,module,exports){(function(Buffer){(function(){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -"use strict";var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=function(length){+length!=length&&(length=0);return Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50;function createBuffer(length){if(length>2147483647)throw new RangeError('The value "'+length+'" is invalid for option "size"');var buf=new Uint8Array(length);return buf.__proto__=Buffer.prototype,buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return function(string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);actual!==length&&(buf=buf.slice(0,actual));return buf}(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayLike(value);if(null==value)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer))return function(array,byteOffset,length){if(byteOffset<0||array.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);var len=string.length,mustMatch=arguments.length>2&&!0===arguments[2];if(!mustMatch&&0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;jremaining&&(length=remaining):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=4096)return String.fromCharCode.apply(String,codePoints);var res="",i=0;for(;imax&&(str+=" ... "),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(this===target)return 0;for(var x=(thisEnd>>>=0)-(thisStart>>>=0),y=(end>>>=0)-(start>>>=0),len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;ilen)&&(end=len);for(var out="",i=start;ilength)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var len=this.length;(start=~~start)<0?(start+=len)<0&&(start=0):start>len&&(start=len),(end=void 0===end?len:~~end)<0?(end+=len)<0&&(end=0):end>len&&(end=len),end>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart=0;--i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(1===val.length){var code=val.charCodeAt(0);("utf8"===encoding&&code<128||"latin1"===encoding)&&(val=code)}}else"number"==typeof val&&(val&=255);if(start<0||this.length>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=(str=str.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!=obj}}).call(this)}).call(this,require("buffer").Buffer)},{"base64-js":3,buffer:5,ieee754:18}],6:[function(require,module,exports){"use strict";var GetIntrinsic=require("get-intrinsic"),callBind=require("./"),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")>-1?callBind(intrinsic):intrinsic}},{"./":7,"get-intrinsic":14}],7:[function(require,module,exports){"use strict";var bind=require("function-bind"),GetIntrinsic=require("get-intrinsic"),$apply=GetIntrinsic("%Function.prototype.apply%"),$call=GetIntrinsic("%Function.prototype.call%"),$reflectApply=GetIntrinsic("%Reflect.apply%",!0)||bind.call($call,$apply),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0),$defineProperty=GetIntrinsic("%Object.defineProperty%",!0),$max=GetIntrinsic("%Math.max%");if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=null}module.exports=function(originalFunction){var func=$reflectApply(bind,$call,arguments);if($gOPD&&$defineProperty){var desc=$gOPD(func,"length");desc.configurable&&$defineProperty(func,"length",{value:1+$max(0,originalFunction.length-(arguments.length-1))})}return func};var applyBind=function(){return $reflectApply(bind,$apply,arguments)};$defineProperty?$defineProperty(module.exports,"apply",{value:applyBind}):module.exports.apply=applyBind},{"function-bind":13,"get-intrinsic":14}],8:[function(require,module,exports){"use strict";var $SyntaxError=SyntaxError,$Function=Function,$TypeError=TypeError,getEvalledConstructor=function(expressionSyntax){try{return Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch(e){}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch(e){$gOPD=null}var throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(calleeThrows){try{return $gOPD(arguments,"callee").get}catch(gOPDthrows){return throwTypeError}}}():throwTypeError,hasSymbols=require("has-symbols")(),getProto=Object.getPrototypeOf||function(x){return x.__proto__},asyncGenFunction=getEvalledConstructor("async function* () {}"),asyncGenFunctionPrototype=asyncGenFunction?asyncGenFunction.prototype:undefined,asyncGenPrototype=asyncGenFunctionPrototype?asyncGenFunctionPrototype.prototype:undefined,TypedArray="undefined"==typeof Uint8Array?undefined:getProto(Uint8Array),INTRINSICS={"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":getEvalledConstructor("async function () {}"),"%AsyncGenerator%":asyncGenFunctionPrototype,"%AsyncGeneratorFunction%":asyncGenFunction,"%AsyncIteratorPrototype%":asyncGenPrototype?getProto(asyncGenPrototype):undefined,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":getEvalledConstructor("function* () {}"),"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require("function-bind"),hasOwn=require("has"),$concat=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace=bind.call(Function.call,String.prototype.replace),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(string){var result=[];return $replace(string,rePropName,(function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar,"$1"):number||match})),result},getBaseIntrinsic=function(name,allowMissing){var alias,intrinsicName=name;if(hasOwn(LEGACY_ALIASES,intrinsicName)&&(intrinsicName="%"+(alias=LEGACY_ALIASES[intrinsicName])[0]+"%"),hasOwn(INTRINSICS,intrinsicName)){var value=INTRINSICS[intrinsicName];if(void 0===value&&!allowMissing)throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!");return{alias:alias,name:intrinsicName,value:value}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module.exports=function(name,allowMissing){if("string"!=typeof name||0===name.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof allowMissing)throw new $TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i=1,isOwn=!0;i=parts.length){var desc=$gOPD(value,part);if(isOwn=!!desc,!allowMissing&&!(part in value))throw new $TypeError("base intrinsic for "+name+" exists, but the property is not available.");value=isOwn&&"get"in desc&&!("originalValue"in desc.get)?desc.get:value[part]}else isOwn=hasOwn(value,part),value=value[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value)}}return value}},{"function-bind":13,has:17,"has-symbols":15}],9:[function(require,module,exports){"use strict";var $gOPD=require("../GetIntrinsic")("%Object.getOwnPropertyDescriptor%");if($gOPD)try{$gOPD([],"length")}catch(e){$gOPD=null}module.exports=$gOPD},{"../GetIntrinsic":8}],10:[function(require,module,exports){"use strict";var ReflectOwnKeys,R="object"==typeof Reflect?Reflect:null,ReflectApply=R&&"function"==typeof R.apply?R.apply:function(target,receiver,args){return Function.prototype.apply.call(target,receiver,args)};ReflectOwnKeys=R&&"function"==typeof R.ownKeys?R.ownKeys:Object.getOwnPropertySymbols?function(target){return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))}:function(target){return Object.getOwnPropertyNames(target)};var NumberIsNaN=Number.isNaN||function(value){return value!=value};function EventEmitter(){EventEmitter.init.call(this)}module.exports=EventEmitter,module.exports.once=function(emitter,name){return new Promise((function(resolve,reject){function eventListener(){void 0!==errorListener&&emitter.removeListener("error",errorListener),resolve([].slice.call(arguments))}var errorListener;"error"!==name&&(errorListener=function(err){emitter.removeListener(name,eventListener),reject(err)},emitter.once("error",errorListener)),emitter.once(name,eventListener)}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(listener){if("function"!=typeof listener)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof listener)}function _getMaxListeners(that){return void 0===that._maxListeners?EventEmitter.defaultMaxListeners:that._maxListeners}function _addListener(target,type,listener,prepend){var m,events,existing,warning;if(checkListener(listener),void 0===(events=target._events)?(events=target._events=Object.create(null),target._eventsCount=0):(void 0!==events.newListener&&(target.emit("newListener",type,listener.listener?listener.listener:listener),events=target._events),existing=events[type]),void 0===existing)existing=events[type]=listener,++target._eventsCount;else if("function"==typeof existing?existing=events[type]=prepend?[listener,existing]:[existing,listener]:prepend?existing.unshift(listener):existing.push(listener),(m=_getMaxListeners(target))>0&&existing.length>m&&!existing.warned){existing.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+" "+String(type)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=target,w.type=type,w.count=existing.length,warning=w,console&&console.warn&&console.warn(warning)}return target}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(target,type,listener){var state={fired:!1,wrapFn:void 0,target:target,type:type,listener:listener},wrapped=onceWrapper.bind(state);return wrapped.listener=listener,state.wrapFn=wrapped,wrapped}function _listeners(target,type,unwrap){var events=target._events;if(void 0===events)return[];var evlistener=events[type];return void 0===evlistener?[]:"function"==typeof evlistener?unwrap?[evlistener.listener||evlistener]:[evlistener]:unwrap?function(arr){for(var ret=new Array(arr.length),i=0;i0&&(er=args[0]),er instanceof Error)throw er;var err=new Error("Unhandled error."+(er?" ("+er.message+")":""));throw err.context=er,err}var handler=events[type];if(void 0===handler)return!1;if("function"==typeof handler)ReflectApply(handler,this,args);else{var len=handler.length,listeners=arrayClone(handler,len);for(i=0;i=0;i--)if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener,position=i;break}if(position<0)return this;0===position?list.shift():function(list,index){for(;index+1=0;i--)this.removeListener(type,listeners[i]);return this},EventEmitter.prototype.listeners=function(type){return _listeners(this,type,!0)},EventEmitter.prototype.rawListeners=function(type){return _listeners(this,type,!1)},EventEmitter.listenerCount=function(emitter,type){return"function"==typeof emitter.listenerCount?emitter.listenerCount(type):listenerCount.call(emitter,type)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]}},{}],11:[function(require,module,exports){var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=function(obj,fn,ctx){if("[object Function]"!==toString.call(fn))throw new TypeError("iterator must be a function");var l=obj.length;if(l===+l)for(var i=0;i1&&"boolean"!=typeof allowMissing)throw new $TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i=1,isOwn=!0;i=parts.length){var desc=$gOPD(value,part);value=(isOwn=!!desc)&&"get"in desc&&!("originalValue"in desc.get)?desc.get:value[part]}else isOwn=hasOwn(value,part),value=value[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value)}}return value}},{"function-bind":13,has:17,"has-symbols":15}],15:[function(require,module,exports){(function(global){(function(){"use strict";var origSymbol=global.Symbol,hasSymbolSham=require("./shams");module.exports=function(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./shams":16}],16:[function(require,module,exports){"use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var obj={},sym=Symbol("test"),symObj=Object(sym);if("string"==typeof sym)return!1;if("[object Symbol]"!==Object.prototype.toString.call(sym))return!1;if("[object Symbol]"!==Object.prototype.toString.call(symObj))return!1;for(sym in obj[sym]=42,obj)return!1;if("function"==typeof Object.keys&&0!==Object.keys(obj).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(obj).length)return!1;var syms=Object.getOwnPropertySymbols(obj);if(1!==syms.length||syms[0]!==sym)return!1;if(!Object.prototype.propertyIsEnumerable.call(obj,sym))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(42!==descriptor.value||!0!==descriptor.enumerable)return!1}return!0}},{}],17:[function(require,module,exports){"use strict";var bind=require("function-bind");module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":13}],18:[function(require,module,exports){ +"use strict";var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=function(length){+length!=length&&(length=0);return Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50;function createBuffer(length){if(length>2147483647)throw new RangeError('The value "'+length+'" is invalid for option "size"');var buf=new Uint8Array(length);return buf.__proto__=Buffer.prototype,buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return function(string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);actual!==length&&(buf=buf.slice(0,actual));return buf}(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayLike(value);if(null==value)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer))return function(array,byteOffset,length){if(byteOffset<0||array.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);var len=string.length,mustMatch=arguments.length>2&&!0===arguments[2];if(!mustMatch&&0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;jremaining&&(length=remaining):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=4096)return String.fromCharCode.apply(String,codePoints);var res="",i=0;for(;imax&&(str+=" ... "),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(this===target)return 0;for(var x=(thisEnd>>>=0)-(thisStart>>>=0),y=(end>>>=0)-(start>>>=0),len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;ilen)&&(end=len);for(var out="",i=start;ilength)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var len=this.length;(start=~~start)<0?(start+=len)<0&&(start=0):start>len&&(start=len),(end=void 0===end?len:~~end)<0?(end+=len)<0&&(end=0):end>len&&(end=len),end>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart=0;--i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(1===val.length){var code=val.charCodeAt(0);("utf8"===encoding&&code<128||"latin1"===encoding)&&(val=code)}}else"number"==typeof val&&(val&=255);if(start<0||this.length>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=(str=str.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!=obj}}).call(this)}).call(this,require("buffer").Buffer)},{"base64-js":3,buffer:6,ieee754:18}],7:[function(require,module,exports){"use strict";var GetIntrinsic=require("get-intrinsic"),callBind=require("./"),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")>-1?callBind(intrinsic):intrinsic}},{"./":8,"get-intrinsic":14}],8:[function(require,module,exports){"use strict";var bind=require("function-bind"),GetIntrinsic=require("get-intrinsic"),$apply=GetIntrinsic("%Function.prototype.apply%"),$call=GetIntrinsic("%Function.prototype.call%"),$reflectApply=GetIntrinsic("%Reflect.apply%",!0)||bind.call($call,$apply),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0),$defineProperty=GetIntrinsic("%Object.defineProperty%",!0),$max=GetIntrinsic("%Math.max%");if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=null}module.exports=function(originalFunction){var func=$reflectApply(bind,$call,arguments);if($gOPD&&$defineProperty){var desc=$gOPD(func,"length");desc.configurable&&$defineProperty(func,"length",{value:1+$max(0,originalFunction.length-(arguments.length-1))})}return func};var applyBind=function(){return $reflectApply(bind,$apply,arguments)};$defineProperty?$defineProperty(module.exports,"apply",{value:applyBind}):module.exports.apply=applyBind},{"function-bind":13,"get-intrinsic":14}],9:[function(require,module,exports){"use strict";var $gOPD=require("get-intrinsic")("%Object.getOwnPropertyDescriptor%");if($gOPD)try{$gOPD([],"length")}catch(e){$gOPD=null}module.exports=$gOPD},{"get-intrinsic":14}],10:[function(require,module,exports){"use strict";var ReflectOwnKeys,R="object"==typeof Reflect?Reflect:null,ReflectApply=R&&"function"==typeof R.apply?R.apply:function(target,receiver,args){return Function.prototype.apply.call(target,receiver,args)};ReflectOwnKeys=R&&"function"==typeof R.ownKeys?R.ownKeys:Object.getOwnPropertySymbols?function(target){return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))}:function(target){return Object.getOwnPropertyNames(target)};var NumberIsNaN=Number.isNaN||function(value){return value!=value};function EventEmitter(){EventEmitter.init.call(this)}module.exports=EventEmitter,module.exports.once=function(emitter,name){return new Promise((function(resolve,reject){function eventListener(){void 0!==errorListener&&emitter.removeListener("error",errorListener),resolve([].slice.call(arguments))}var errorListener;"error"!==name&&(errorListener=function(err){emitter.removeListener(name,eventListener),reject(err)},emitter.once("error",errorListener)),emitter.once(name,eventListener)}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(listener){if("function"!=typeof listener)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof listener)}function _getMaxListeners(that){return void 0===that._maxListeners?EventEmitter.defaultMaxListeners:that._maxListeners}function _addListener(target,type,listener,prepend){var m,events,existing,warning;if(checkListener(listener),void 0===(events=target._events)?(events=target._events=Object.create(null),target._eventsCount=0):(void 0!==events.newListener&&(target.emit("newListener",type,listener.listener?listener.listener:listener),events=target._events),existing=events[type]),void 0===existing)existing=events[type]=listener,++target._eventsCount;else if("function"==typeof existing?existing=events[type]=prepend?[listener,existing]:[existing,listener]:prepend?existing.unshift(listener):existing.push(listener),(m=_getMaxListeners(target))>0&&existing.length>m&&!existing.warned){existing.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+" "+String(type)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=target,w.type=type,w.count=existing.length,warning=w,console&&console.warn&&console.warn(warning)}return target}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(target,type,listener){var state={fired:!1,wrapFn:void 0,target:target,type:type,listener:listener},wrapped=onceWrapper.bind(state);return wrapped.listener=listener,state.wrapFn=wrapped,wrapped}function _listeners(target,type,unwrap){var events=target._events;if(void 0===events)return[];var evlistener=events[type];return void 0===evlistener?[]:"function"==typeof evlistener?unwrap?[evlistener.listener||evlistener]:[evlistener]:unwrap?function(arr){for(var ret=new Array(arr.length),i=0;i0&&(er=args[0]),er instanceof Error)throw er;var err=new Error("Unhandled error."+(er?" ("+er.message+")":""));throw err.context=er,err}var handler=events[type];if(void 0===handler)return!1;if("function"==typeof handler)ReflectApply(handler,this,args);else{var len=handler.length,listeners=arrayClone(handler,len);for(i=0;i=0;i--)if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener,position=i;break}if(position<0)return this;0===position?list.shift():function(list,index){for(;index+1=0;i--)this.removeListener(type,listeners[i]);return this},EventEmitter.prototype.listeners=function(type){return _listeners(this,type,!0)},EventEmitter.prototype.rawListeners=function(type){return _listeners(this,type,!1)},EventEmitter.listenerCount=function(emitter,type){return"function"==typeof emitter.listenerCount?emitter.listenerCount(type):listenerCount.call(emitter,type)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]}},{}],11:[function(require,module,exports){var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=function(obj,fn,ctx){if("[object Function]"!==toString.call(fn))throw new TypeError("iterator must be a function");var l=obj.length;if(l===+l)for(var i=0;i1&&"boolean"!=typeof allowMissing)throw new $TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i=1,isOwn=!0;i=parts.length){var desc=$gOPD(value,part);value=(isOwn=!!desc)&&"get"in desc&&!("originalValue"in desc.get)?desc.get:value[part]}else isOwn=hasOwn(value,part),value=value[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value)}}return value}},{"function-bind":13,has:17,"has-symbols":15}],15:[function(require,module,exports){(function(global){(function(){"use strict";var origSymbol=global.Symbol,hasSymbolSham=require("./shams");module.exports=function(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./shams":16}],16:[function(require,module,exports){"use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var obj={},sym=Symbol("test"),symObj=Object(sym);if("string"==typeof sym)return!1;if("[object Symbol]"!==Object.prototype.toString.call(sym))return!1;if("[object Symbol]"!==Object.prototype.toString.call(symObj))return!1;for(sym in obj[sym]=42,obj)return!1;if("function"==typeof Object.keys&&0!==Object.keys(obj).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(obj).length)return!1;var syms=Object.getOwnPropertySymbols(obj);if(1!==syms.length||syms[0]!==sym)return!1;if(!Object.prototype.propertyIsEnumerable.call(obj,sym))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(42!==descriptor.value||!0!==descriptor.enumerable)return!1}return!0}},{}],17:[function(require,module,exports){"use strict";var bind=require("function-bind");module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":13}],18:[function(require,module,exports){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],19:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}))}:module.exports=function(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}},{}],20:[function(require,module,exports){"use strict";var hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,$toString=require("call-bind/callBound")("Object.prototype.toString"),isStandardArguments=function(value){return!(hasToStringTag&&value&&"object"==typeof value&&Symbol.toStringTag in value)&&"[object Arguments]"===$toString(value)},isLegacyArguments=function(value){return!!isStandardArguments(value)||null!==value&&"object"==typeof value&&"number"==typeof value.length&&value.length>=0&&"[object Array]"!==$toString(value)&&"[object Function]"===$toString(value.callee)},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments,module.exports=supportsStandardArguments?isStandardArguments:isLegacyArguments},{"call-bind/callBound":6}],21:[function(require,module,exports){function isBuffer(obj){return!!obj.constructor&&"function"==typeof obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)} -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ -module.exports=function(obj){return null!=obj&&(isBuffer(obj)||function(obj){return"function"==typeof obj.readFloatLE&&"function"==typeof obj.slice&&isBuffer(obj.slice(0,0))}(obj)||!!obj._isBuffer)}},{}],22:[function(require,module,exports){"use strict";var toStr=Object.prototype.toString,fnToStr=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,getProto=Object.getPrototypeOf,generatorFunc=function(){if(!hasToStringTag)return!1;try{return Function("return function*() {}")()}catch(e){}}(),GeneratorFunction=!(!getProto||!generatorFunc)&&getProto(generatorFunc);module.exports=function(fn){return"function"==typeof fn&&(!!isFnRegex.test(fnToStr.call(fn))||(hasToStringTag?getProto&&getProto(fn)===GeneratorFunction:"[object GeneratorFunction]"===toStr.call(fn)))}},{}],23:[function(require,module,exports){(function(global){(function(){"use strict";var forEach=require("foreach"),availableTypedArrays=require("available-typed-arrays"),callBound=require("call-bind/callBound"),$toString=callBound("Object.prototype.toString"),hasToStringTag=require("has-symbols")()&&"symbol"==typeof Symbol.toStringTag,typedArrays=availableTypedArrays(),$indexOf=callBound("Array.prototype.indexOf",!0)||function(array,value){for(var i=0;i-1}return!!gOPD&&function(value){var anyTrue=!1;return forEach(toStrTags,(function(getter,typedArray){if(!anyTrue)try{anyTrue=getter.call(value)===typedArray}catch(e){}})),anyTrue}(value)}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"available-typed-arrays":2,"call-bind/callBound":6,"es-abstract/helpers/getOwnPropertyDescriptor":9,foreach:11,"has-symbols":15}],24:[function(require,module,exports){var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex1)for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},floor=Math.floor,stringFromCharCode=String.fromCharCode;function error(type){throw new RangeError(errors[type])}function map(array,fn){for(var length=array.length,result=[];length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";return parts.length>1&&(result=parts[0]+"@",string=parts[1]),result+map((string=string.replace(regexSeparators,".")).split("."),fn).join(".")}function ucs2decode(string){for(var value,extra,output=[],counter=0,length=string.length;counter=55296&&value<=56319&&counter65535&&(output+=stringFromCharCode((value-=65536)>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)})).join("")}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/700):delta>>1,delta+=floor(delta/numPoints);delta>455;k+=36)delta=floor(delta/35);return floor(k+36*delta/(delta+38))}function decode(input){var out,basic,j,index,oldi,w,k,digit,t,baseMinusT,codePoint,output=[],inputLength=input.length,i=0,n=128,bias=72;for((basic=input.lastIndexOf("-"))<0&&(basic=0),j=0;j=128&&error("not-basic"),output.push(input.charCodeAt(j));for(index=basic>0?basic+1:0;index=inputLength&&error("invalid-input"),((digit=(codePoint=input.charCodeAt(index++))-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:36)>=36||digit>floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,!(digit<(t=k<=bias?1:k>=bias+26?26:k-bias));k+=36)w>floor(maxInt/(baseMinusT=36-t))&&error("overflow"),w*=baseMinusT;bias=adapt(i-oldi,out=output.length+1,0==oldi),floor(i/out)>maxInt-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(inputLength=(input=ucs2decode(input)).length,n=128,delta=0,bias=72,j=0;j=n&¤tValuefloor((maxInt-delta)/(handledCPCountPlusOne=handledCPCount+1))&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;jmaxInt&&error("overflow"),currentValue==n){for(q=delta,k=36;!(q<(t=k<=bias?1:k>=bias+26?26:k-bias));k+=36)qMinusT=q-t,baseMinusT=36-t,output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0))),q=floor(qMinusT/baseMinusT);output.push(stringFromCharCode(digitToBasic(q,0))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength),delta=0,++handledCPCount}++delta,++n}return output.join("")}if(punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:function(input){return mapDomain(input,(function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string}))},toUnicode:function(input){return mapDomain(input,(function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string}))}},freeExports&&freeModule)if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);else root.punycode=punycode}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],26:[function(require,module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&",eq=eq||"=";var obj={};if("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},{}],27:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){return sep=sep||"&",eq=eq||"=",null===obj&&(obj=void 0),"object"==typeof obj?map(objectKeys(obj),(function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;return isArray(obj[k])?map(obj[k],(function(v){return ks+encodeURIComponent(stringifyPrimitive(v))})).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))})).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj)):""};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)};function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;i>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],19:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}))}:module.exports=function(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}},{}],20:[function(require,module,exports){"use strict";var hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,$toString=require("call-bind/callBound")("Object.prototype.toString"),isStandardArguments=function(value){return!(hasToStringTag&&value&&"object"==typeof value&&Symbol.toStringTag in value)&&"[object Arguments]"===$toString(value)},isLegacyArguments=function(value){return!!isStandardArguments(value)||null!==value&&"object"==typeof value&&"number"==typeof value.length&&value.length>=0&&"[object Array]"!==$toString(value)&&"[object Function]"===$toString(value.callee)},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments,module.exports=supportsStandardArguments?isStandardArguments:isLegacyArguments},{"call-bind/callBound":7}],21:[function(require,module,exports){"use strict";var toStr=Object.prototype.toString,fnToStr=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,getProto=Object.getPrototypeOf,generatorFunc=function(){if(!hasToStringTag)return!1;try{return Function("return function*() {}")()}catch(e){}}(),GeneratorFunction=!(!getProto||!generatorFunc)&&getProto(generatorFunc);module.exports=function(fn){return"function"==typeof fn&&(!!isFnRegex.test(fnToStr.call(fn))||(hasToStringTag?getProto&&getProto(fn)===GeneratorFunction:"[object GeneratorFunction]"===toStr.call(fn)))}},{}],22:[function(require,module,exports){(function(global){(function(){"use strict";var forEach=require("foreach"),availableTypedArrays=require("available-typed-arrays"),callBound=require("call-bind/callBound"),$toString=callBound("Object.prototype.toString"),hasToStringTag=require("has-symbols")()&&"symbol"==typeof Symbol.toStringTag,typedArrays=availableTypedArrays(),$indexOf=callBound("Array.prototype.indexOf",!0)||function(array,value){for(var i=0;i-1}return!!gOPD&&function(value){var anyTrue=!1;return forEach(toStrTags,(function(getter,typedArray){if(!anyTrue)try{anyTrue=getter.call(value)===typedArray}catch(e){}})),anyTrue}(value)}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"available-typed-arrays":2,"call-bind/callBound":7,"es-abstract/helpers/getOwnPropertyDescriptor":9,foreach:11,"has-symbols":15}],23:[function(require,module,exports){var t,e;t=this,e=function(){return(()=>{"use strict";var t={255:(t,e)=>{e.l=class{hexSlice(t=0,e){return Array.prototype.map.call(this.slice(t,e),(t=>("00"+t.toString(16)).slice(-2))).join("")}}},48:(t,e,r)=>{const{internalBinding:n,Array:o,ArrayIsArray:i,ArrayPrototypeFilter:l,ArrayPrototypeForEach:c,ArrayPrototypePush:s,ArrayPrototypePushApply:a,ArrayPrototypeSort:p,ArrayPrototypeUnshift:u,BigIntPrototypeValueOf:y,BooleanPrototypeValueOf:f,DatePrototypeGetTime:g,DatePrototypeToISOString:d,DatePrototypeToString:h,ErrorPrototypeToString:b,FunctionPrototypeCall:m,FunctionPrototypeToString:$,JSONStringify:S,MapPrototypeGetSize:x,MapPrototypeEntries:P,MathFloor:O,MathMax:A,MathMin:v,MathRound:j,MathSqrt:w,Number:E,NumberIsNaN:L,NumberParseFloat:F,NumberParseInt:I,NumberPrototypeValueOf:k,Object:R,ObjectAssign:T,ObjectCreate:z,ObjectDefineProperty:N,ObjectGetOwnPropertyDescriptor:B,ObjectGetOwnPropertyNames:M,ObjectGetOwnPropertySymbols:_,ObjectGetPrototypeOf:D,ObjectIs:C,ObjectKeys:G,ObjectPrototypeHasOwnProperty:H,ObjectPrototypePropertyIsEnumerable:W,ObjectSeal:V,ObjectSetPrototypeOf:U,ReflectOwnKeys:Z,RegExp:Y,RegExpPrototypeTest:K,RegExpPrototypeToString:q,SafeStringIterator:J,SafeMap:Q,SafeSet:X,SetPrototypeGetSize:tt,SetPrototypeValues:et,String:rt,StringPrototypeCharCodeAt:nt,StringPrototypeCodePointAt:ot,StringPrototypeIncludes:it,StringPrototypeNormalize:lt,StringPrototypePadEnd:ct,StringPrototypePadStart:st,StringPrototypeRepeat:at,StringPrototypeReplace:pt,StringPrototypeSlice:ut,StringPrototypeSplit:yt,StringPrototypeToLowerCase:ft,StringPrototypeTrim:gt,StringPrototypeValueOf:dt,SymbolPrototypeToString:ht,SymbolPrototypeValueOf:bt,SymbolIterator:mt,SymbolToStringTag:$t,TypedArrayPrototypeGetLength:St,TypedArrayPrototypeGetSymbolToStringTag:xt,Uint8Array:Pt,uncurryThis:Ot}=r(765),{getOwnNonIndexProperties:At,getPromiseDetails:vt,getProxyDetails:jt,kPending:wt,kRejected:Et,previewEntries:Lt,getConstructorName:Ft,getExternalValue:It,propertyFilter:{ALL_PROPERTIES:kt,ONLY_ENUMERABLE:Rt},Proxy:Tt}=r(891),{customInspectSymbol:zt,isError:Nt,join:Bt,removeColors:Mt}=r(335),{codes:{ERR_INVALID_ARG_TYPE:_t},isStackOverflowError:Dt}=r(101),{isAsyncFunction:Ct,isGeneratorFunction:Gt,isAnyArrayBuffer:Ht,isArrayBuffer:Wt,isArgumentsObject:Vt,isBoxedPrimitive:Ut,isDataView:Zt,isExternal:Yt,isMap:Kt,isMapIterator:qt,isModuleNamespaceObject:Jt,isNativeError:Qt,isPromise:Xt,isSet:te,isSetIterator:ee,isWeakMap:re,isWeakSet:ne,isRegExp:oe,isDate:ie,isTypedArray:le,isStringObject:ce,isNumberObject:se,isBooleanObject:ae,isBigIntObject:pe}=r(63),ue=r(183),{NativeModule:ye}=r(992),{validateObject:fe}=r(356);let ge;const de=new X(l(M(r.g),(t=>K(/^[A-Z][a-zA-Z0-9]+$/,t)))),he=t=>void 0===t&&void 0!==t,be=V({showHidden:!1,depth:2,colors:!1,customInspect:!0,showProxy:!1,maxArrayLength:100,maxStringLength:1e4,breakLength:80,compact:3,sorted:!1,getters:!1}),me=/[\x00-\x1f\x27\x5c\x7f-\x9f]/,$e=/[\x00-\x1f\x27\x5c\x7f-\x9f]/g,Se=/[\x00-\x1f\x5c\x7f-\x9f]/,xe=/[\x00-\x1f\x5c\x7f-\x9f]/g,Pe=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Oe=/^(0|[1-9][0-9]*)$/,Ae=/^ at (?:[^/\\(]+ \(|)node:(.+):\d+:\d+\)?$/,ve=/^ at (?:[^/\\(]+ \(|)((?<~]))","g");let Ie;function ke(t,e){const r={budget:{},indentationLvl:0,seen:[],currentDepth:0,stylize:De,showHidden:be.showHidden,depth:be.depth,colors:be.colors,customInspect:be.customInspect,showProxy:be.showProxy,maxArrayLength:be.maxArrayLength,maxStringLength:be.maxStringLength,breakLength:be.breakLength,compact:be.compact,sorted:be.sorted,getters:be.getters};if(arguments.length>1)if(arguments.length>2&&(void 0!==arguments[2]&&(r.depth=arguments[2]),arguments.length>3&&void 0!==arguments[3]&&(r.colors=arguments[3])),"boolean"==typeof e)r.showHidden=e;else if(e){const t=G(e);for(let n=0;nbe,set:t=>(fe(t,"options"),T(be,t))}),ke.colors=T(z(null),{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],blink:[5,25],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],doubleunderline:[21,24],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],framed:[51,54],overlined:[53,55],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgGray:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}),ze("gray","grey"),ze("gray","blackBright"),ze("bgGray","bgGrey"),ze("bgGray","bgBlackBright"),ze("dim","faint"),ze("strikethrough","crossedout"),ze("strikethrough","strikeThrough"),ze("strikethrough","crossedOut"),ze("hidden","conceal"),ze("inverse","swapColors"),ze("inverse","swapcolors"),ze("doubleunderline","doubleUnderline"),ke.styles=T(z(null),{special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red",module:"underline"});const Be=t=>Le[nt(t)];function Me(t){let e=me,r=$e,n=39;if(it(t,"'")&&(it(t,'"')?it(t,"`")||it(t,"${")||(n=-2):n=-1,39!==n&&(e=Se,r=xe)),t.length<5e3&&!K(e,t))return Ne(t,n);if(t.length>100)return Ne(t=pt(t,r,Be),n);let o="",i=0;const l=t.length;for(let e=0;e126&&r<160)&&(o+=i===e?Le[r]:`${ut(t,i,e)}${Le[r]}`,i=e+1)}return i!==l&&(o+=ut(t,i)),Ne(o,n)}function _e(t,e){const r=ke.styles[e];if(void 0!==r){const e=ke.colors[r];if(void 0!==e)return`[${e[0]}m${t}[${e[1]}m`}return t}function De(t){return t}function Ce(){return[]}function Ge(t,e){try{return t instanceof e}catch{return!1}}function He(t,e,r,n){let o;const i=t;for(;t||he(t);){const l=B(t,"constructor");if(void 0!==l&&"function"==typeof l.value&&""!==l.value.name&&Ge(i,l.value))return void 0===n||o===t&&de.has(l.value.name)||We(e,i,o||i,r,n),l.value.name;t=D(t),void 0===o&&(o=t)}if(null===o)return null;const l=Ft(i);if(r>e.depth&&null!==e.depth)return`${l} `;const c=He(o,e,r+1,n);return null===c?`${l} <${ke(o,{...e,customInspect:!1,depth:-1})}>`:`${l} <${c}>`}function We(t,e,r,n,o){let i,l,a=0;do{if(0!==a||e===r){if(null===(r=D(r)))return;const t=B(r,"constructor");if(void 0!==t&&"function"==typeof t.value&&de.has(t.value.name))return}0===a?l=new X:c(i,(t=>l.add(t))),i=Z(r);for(const c of i){if("constructor"===c||H(e,c)||0!==a&&l.has(c))continue;const i=B(r,c);if("function"==typeof i.value)continue;const p=fr(t,r,n,c,0,i,e);t.colors?s(o,`${p}`):s(o,p)}}while(3!=++a)}function Ve(t,e,r,n=""){return null===t?""!==e&&r!==e?`[${r}${n}: null prototype] [${e}] `:`[${r}${n}: null prototype] `:""!==e&&t!==e?`${t}${n} [${e}] `:`${t}${n} `}function Ue(t,e){let r;const n=_(t);if(e)r=M(t),0!==n.length&&a(r,n);else{try{r=G(t)}catch(e){ue(Qt(e)&&"ReferenceError"===e.name&&Jt(t)),r=M(t)}0!==n.length&&a(r,l(n,(e=>W(t,e))))}return r}function Ze(t,e,r){let n="";return null===e&&(n=Ft(t),n===r&&(n="Object")),Ve(e,r,n)}function Ye(t,e,r,n){if("object"!=typeof e&&"function"!=typeof e&&!he(e))return Qe(t.stylize,e,t);if(null===e)return t.stylize("null","null");const o=e,l=jt(e,!!t.showProxy);if(void 0!==l){if(t.showProxy)return function(t,e,r){if(r>t.depth&&null!==t.depth)return t.stylize("Proxy [Array]","special");r+=1,t.indentationLvl+=2;const n=[Ye(t,e[0],r),Ye(t,e[1],r)];return t.indentationLvl-=2,dr(t,n,"",["Proxy [","]"],2,r)}(t,l,r);e=l}if(t.customInspect){const n=e[zt];if("function"==typeof n&&n!==ke&&(!e.constructor||e.constructor.prototype!==e)){const e=null===t.depth?null:t.depth-r,i=m(n,o,e,function(t,e){const r={stylize:t.stylize,showHidden:t.showHidden,depth:t.depth,colors:t.colors,customInspect:t.customInspect,showProxy:t.showProxy,maxArrayLength:t.maxArrayLength,maxStringLength:t.maxStringLength,breakLength:t.breakLength,compact:t.compact,sorted:t.sorted,getters:t.getters,...t.userOptions};if(e){U(r,null);for(const t of G(r))"object"!=typeof r[t]&&"function"!=typeof r[t]||null===r[t]||delete r[t];r.stylize=U(((e,r)=>{let n;try{n=`${t.stylize(e,r)}`}catch{}return"string"!=typeof n?e:n}),null)}return r}(t,void 0!==l||!(o instanceof R)));if(i!==o)return"string"!=typeof i?Ye(t,i,r):i.replace(/\n/g,`\n${" ".repeat(t.indentationLvl)}`)}}if(t.seen.includes(e)){let r=1;return void 0===t.circular?(t.circular=new Q,t.circular.set(e,r)):(r=t.circular.get(e),void 0===r&&(r=t.circular.size+1,t.circular.set(e,r))),t.stylize(`[Circular *${r}]`,"special")}return function(t,e,r,n){let o,l;t.showHidden&&(r<=t.depth||null===t.depth)&&(l=[]);const c=He(e,t,r,l);void 0!==l&&0===l.length&&(l=void 0);let s=e[$t];("string"!=typeof s||""!==s&&(t.showHidden?H:W)(e,$t))&&(s="");let a,p="",m=Ce,S=!0,O=0;const A=t.showHidden?kt:Rt;let v,j=0;if(e[mt]||null===c)if(S=!1,i(e)){const t="Array"!==c||""!==s?Ve(c,s,"Array",`(${e.length})`):"";if(o=At(e,A),a=[`${t}[`,"]"],0===e.length&&0===o.length&&void 0===l)return`${a[0]}]`;j=2,m=rr}else if(te(e)){const r=tt(e),n=Ve(c,s,"Set",`(${r})`);if(o=Ue(e,t.showHidden),m=null!==c?or.bind(null,e):or.bind(null,et(e)),0===r&&0===o.length&&void 0===l)return`${n}{}`;a=[`${n}{`,"}"]}else if(Kt(e)){const r=x(e),n=Ve(c,s,"Map",`(${r})`);if(o=Ue(e,t.showHidden),m=null!==c?ir.bind(null,e):ir.bind(null,P(e)),0===r&&0===o.length&&void 0===l)return`${n}{}`;a=[`${n}{`,"}"]}else if(le(e)){o=At(e,A);let r=e,n="";null===c&&(n=xt(e),r=new n(e));const i=St(e);if(a=[`${Ve(c,s,n,`(${i})`)}[`,"]"],0===e.length&&0===o.length&&!t.showHidden)return`${a[0]}]`;m=nr.bind(null,r,i),j=2}else qt(e)?(o=Ue(e,t.showHidden),a=Ke("Map",s),m=ur.bind(null,a)):ee(e)?(o=Ue(e,t.showHidden),a=Ke("Set",s),m=ur.bind(null,a)):S=!0;if(S)if(o=Ue(e,t.showHidden),a=["{","}"],"Object"===c){if(Vt(e)?a[0]="[Arguments] {":""!==s&&(a[0]=`${Ve(c,s,"Object")}{`),0===o.length&&void 0===l)return`${a[0]}}`}else if("function"==typeof e){if(p=function(t,e,r){const n=$(t);if("class"===n.slice(0,5)&&n.endsWith("}")){const o=n.slice(5,-1),i=o.indexOf("{");if(-1!==i&&(!o.slice(0,i).includes("(")||we.test(o.replace(Ee))))return function(t,e,r){let n=`class ${H(t,"name")&&t.name||"(anonymous)"}`;if("Function"!==e&&null!==e&&(n+=` [${e}]`),""!==r&&e!==r&&(n+=` [${r}]`),null!==e){const e=D(t).name;e&&(n+=` extends ${e}`)}else n+=" extends [null prototype]";return`[${n}]`}(t,e,r)}let o="Function";Gt(t)&&(o=`Generator${o}`),Ct(t)&&(o=`Async${o}`);let i=`[${o}`;return null===e&&(i+=" (null prototype)"),""===t.name?i+=" (anonymous)":i+=`: ${t.name}`,i+="]",e!==o&&null!==e&&(i+=` ${e}`),""!==r&&e!==r&&(i+=` [${r}]`),i}(e,c,s),0===o.length&&void 0===l)return t.stylize(p,"special")}else if(oe(e)){p=q(null!==c?e:new Y(e));const n=Ve(c,s,"RegExp");if("RegExp "!==n&&(p=`${n}${p}`),0===o.length&&void 0===l||r>t.depth&&null!==t.depth)return t.stylize(p,"regexp")}else if(ie(e)){p=L(g(e))?h(e):d(e);const r=Ve(c,s,"Date");if("Date "!==r&&(p=`${r}${p}`),0===o.length&&void 0===l)return t.stylize(p,"date")}else if(Nt(e)){if(p=function(t,e,r,n,o){const i=null!=t.name?rt(t.name):"Error";let l=i.length,c=t.stack?rt(t.stack):b(t);if(!n.showHidden&&0!==o.length)for(const e of["name","message","stack"]){const r=o.indexOf(e);-1!==r&&c.includes(t[e])&&o.splice(r,1)}if(null===e||i.endsWith("Error")&&c.startsWith(i)&&(c.length===l||":"===c[l]||"\n"===c[l])){let t="Error";if(null===e){const e=c.match(/^([A-Z][a-z_ A-Z0-9[\]()-]+)(?::|\n {4}at)/)||c.match(/^([a-z_A-Z0-9-]*Error)$/);t=e&&e[1]||"",l=t.length,t=t||"Error"}const n=Ve(e,r,t).slice(0,-1);i!==n&&(c=n.includes(i)?0===l?`${n}: ${c}`:`${n}${c.slice(l)}`:`${n} [${i}]${c.slice(l)}`)}let s=t.message&&c.indexOf(t.message)||-1;-1!==s&&(s+=t.message.length);const a=c.indexOf("\n at",s);if(-1===a)c=`[${c}]`;else if(n.colors){let t=c.slice(0,a);const e=c.slice(a+1).split("\n");for(const r of e){const e=r.match(Ae)||r.match(ve);if(null!==e&&ye.exists(e[1]))t+=`\n${n.stylize(r,"undefined")}`;else{let e;t+="\n";let o=0;for(;e=je.exec(r);)t+=r.slice(o,e.index+14),t+=n.stylize(e[1],"module"),o=e.index+e[0].length;t+=0===o?r:r.slice(o)}}c=t}if(0!==n.indentationLvl){const t=" ".repeat(n.indentationLvl);c=c.replace(/\n/g,`\n${t}`)}return c}(e,c,s,t,o),0===o.length&&void 0===l)return p}else if(Ht(e)){const r=Ve(c,s,Wt(e)?"ArrayBuffer":"SharedArrayBuffer");if(void 0===n)m=er;else if(0===o.length&&void 0===l)return r+`{ byteLength: ${qe(t.stylize,e.byteLength)} }`;a[0]=`${r}{`,u(o,"byteLength")}else if(Zt(e))a[0]=`${Ve(c,s,"DataView")}{`,u(o,"byteLength","byteOffset","buffer");else if(Xt(e))a[0]=`${Ve(c,s,"Promise")}{`,m=yr;else if(ne(e))a[0]=`${Ve(c,s,"WeakSet")}{`,m=t.showHidden?ar:sr;else if(re(e))a[0]=`${Ve(c,s,"WeakMap")}{`,m=t.showHidden?pr:sr;else if(Jt(e))a[0]=`${Ve(c,s,"Module")}{`,m=Xe.bind(null,o);else if(Ut(e)){if(p=function(t,e,r,n,o){let i,l;se(t)?(i=k,l="Number"):ce(t)?(i=dt,l="String",r.splice(0,t.length)):ae(t)?(i=f,l="Boolean"):pe(t)?(i=y,l="BigInt"):(i=bt,l="Symbol");let c=`[${l}`;return l!==n&&(c+=null===n?" (null prototype)":` (${n})`),c+=`: ${Qe(De,i(t),e)}]`,""!==o&&o!==n&&(c+=` [${o}]`),0!==r.length||e.stylize===De?c:e.stylize(c,ft(l))}(e,t,o,c,s),0===o.length&&void 0===l)return p}else{if(0===o.length&&void 0===l){if(Yt(e)){const r=It(e).toString(16);return t.stylize(`[External: ${r}]`,"special")}return`${Ze(e,c,s)}{}`}a[0]=`${Ze(e,c,s)}{`}if(r>t.depth&&null!==t.depth){let r=Ze(e,c,s).slice(0,-1);return null!==c&&(r=`[${r}]`),t.stylize(r,"special")}r+=1,t.seen.push(e),t.currentDepth=r;const w=t.indentationLvl;try{for(v=m(t,e,r),O=0;O`,"special");!0!==t.compact?p=""===p?e:`${e} ${p}`:a[0]=`${e} ${a[0]}`}}if(t.seen.pop(),t.sorted){const e=!0===t.sorted?void 0:t.sorted;if(0===j)v=v.sort(e);else if(o.length>1){const t=v.slice(v.length-o.length).sort(e);v.splice(v.length-o.length,o.length,...t)}}const E=dr(t,v,p,a,j,r,e),F=(t.budget[t.indentationLvl]||0)+E.length;return t.budget[t.indentationLvl]=F,F>2**27&&(t.depth=-1),E}(t,e,r,n)}function Ke(t,e){return e!==`${t} Iterator`&&(""!==e&&(e+="] ["),e+=`${t} Iterator`),[`[${e}] {`,"}"]}function qe(t,e){return t(C(e,-0)?"-0":`${e}`,"number")}function Je(t,e){return t(`${e}n`,"bigint")}function Qe(t,e,r){if("string"==typeof e){let n="";if(e.length>r.maxStringLength){const t=e.length-r.maxStringLength;e=e.slice(0,r.maxStringLength),n=`... ${t} more character${t>1?"s":""}`}return!0!==r.compact&&e.length>16&&e.length>r.breakLength-r.indentationLvl-4?e.split(/(?<=\n)/).map((e=>t(Me(e),"string"))).join(` +\n${" ".repeat(r.indentationLvl+2)}`)+n:t(Me(e),"string")+n}return"number"==typeof e?qe(t,e):"bigint"==typeof e?Je(t,e):"boolean"==typeof e?t(`${e}`,"boolean"):void 0===e?t("undefined","undefined"):t(ht(e),"symbol")}function Xe(t,e,r,n){const i=new o(t.length);for(let o=0;o","special")}return t.length=0,i}function tr(t,e,r,n,o,i){const l=G(e);let c=i;for(;i2**32-2)break;if(`${c}`!==s){if(!Oe.test(s))break;const e=a-c,r=`<${e} empty item${e>1?"s":""}>`;if(o.push(t.stylize(r,"undefined")),c=a,o.length===n)break}o.push(fr(t,e,r,s,1)),c++}const s=e.length-c;if(o.length!==n){if(s>0){const e=`<${s} empty item${s>1?"s":""}>`;o.push(t.stylize(e,"undefined"))}}else s>0&&o.push(`... ${s} more item${s>1?"s":""}`);return o}function er(t,e){let n;try{n=new Pt(e)}catch{return[t.stylize("(detached)","special")]}void 0===ge&&(ge=Ot(r(255).l.prototype.hexSlice));let o=gt(pt(ge(n,0,v(t.maxArrayLength,n.length)),/(.{2})/g,"$1 "));const i=n.length-t.maxArrayLength;return i>0&&(o+=` ... ${i} more byte${i>1?"s":""}`),[`${t.stylize("[Uint8Contents]","special")}: <${o}>`]}function rr(t,e,r){const n=e.length,o=v(A(0,t.maxArrayLength),n),i=n-o,l=[];for(let n=0;n0&&l.push(`... ${i} more item${i>1?"s":""}`),l}function nr(t,e,r,n,i){const l=v(A(0,r.maxArrayLength),e),c=t.length-l,a=new o(l),p=t.length>0&&"number"==typeof t[0]?qe:Je;for(let e=0;e0&&(a[l]=`... ${c} more item${c>1?"s":""}`),r.showHidden){r.indentationLvl+=2;for(const e of["BYTES_PER_ELEMENT","length","byteLength","byteOffset","buffer"]){const n=Ye(r,t[e],i,!0);s(a,`[${e}]: ${n}`)}r.indentationLvl-=2}return a}function or(t,e,r,n){const o=[];e.indentationLvl+=2;for(const r of t)s(o,Ye(e,r,n));return e.indentationLvl-=2,o}function ir(t,e,r,n){const o=[];e.indentationLvl+=2;for(const[r,i]of t)o.push(`${Ye(e,r,n)} => `+Ye(e,i,n));return e.indentationLvl-=2,o}function lr(t,e,r,n){const i=A(t.maxArrayLength,0),l=v(i,r.length),c=new o(l);t.indentationLvl+=2;for(let n=0;n0&&s(c,`... ${a} more item${a>1?"s":""}`),c}function cr(t,e,r,n){const i=A(t.maxArrayLength,0),l=r.length/2,c=l-i,s=v(i,l);let a=new o(s),p=0;if(t.indentationLvl+=2,0===n){for(;p ${Ye(t,r[n+1],e)}`}t.sorted||(a=a.sort())}else for(;p0&&a.push(`... ${c} more item${c>1?"s":""}`),a}function sr(t){return[t.stylize("","special")]}function ar(t,e,r){return lr(t,r,Lt(e),0)}function pr(t,e,r){return cr(t,r,Lt(e),0)}function ur(t,e,r,n){const[o,i]=Lt(r,!0);return i?(t[0]=t[0].replace(/ Iterator] {$/," Entries] {"),cr(e,n,o,2)):lr(e,n,o,1)}function yr(t,e,r){let n;const[o,i]=vt(e);if(o===wt)n=[t.stylize("","special")];else{t.indentationLvl+=2;const e=Ye(t,i,r);t.indentationLvl-=2,n=[o===Et?`${t.stylize("","special")} ${e}`:e]}return n}function fr(t,e,r,n,o,i,l=e){let c,s,a=" ";if(void 0!==(i=i||B(e,n)||{value:e[n],enumerable:!0}).value){const e=!0!==t.compact||0!==o?2:3;t.indentationLvl+=e,s=Ye(t,i.value,r),3===e&&t.breakLength`;s=`${n(`[${e}:`,o)} ${r}${n("]",o)}`}else s=t.stylize(`[${e}]`,o)}else s=void 0!==i.set?t.stylize("[Setter]","special"):t.stylize("undefined","undefined");if(1===o)return s;if("symbol"==typeof n){const e=pt(ht(n),$e,Be);c=`[${t.stylize(e,"symbol")}]`}else c=!1===i.enumerable?`[${pt(n,$e,Be)}]`:K(Pe,n)?t.stylize(n,"name"):t.stylize(Me(n),"string");return`${c}:${a}${s}`}function gr(t,e,r,n){let o=e.length+r;if(o+e.length>t.breakLength)return!1;for(let r=0;rt.breakLength)return!1;return""===n||!it(n,"\n")}function dr(t,e,r,n,i,l,c){if(!0!==t.compact){if("number"==typeof t.compact&&t.compact>=1){const a=e.length;if(2===i&&a>6&&(e=function(t,e,r){let n=0,i=0,l=0,c=e.length;t.maxArrayLength5||i<=6)){const o=2.5,i=w(p-n/e.length),l=A(p-3-i,1),u=v(j(w(o*l*c)/l),O((t.breakLength-t.indentationLvl)/p),4*t.compact,15);if(u<=1)return e;const y=[],f=[];for(let t=0;tr&&(r=a[n]);r+=2,f[t]=r}let g=st;if(void 0!==r)for(let t=0;tyt(t.message,"\n",1)[0];let mr;function $r(t){try{return S(t)}catch(t){if(!mr)try{const t={};t.a=t,S(t)}catch(t){mr=br(t)}if("TypeError"===t.name&&br(t)===mr)return"[Circular]";throw t}}function Sr(t,e){const r=e[0];let n=0,o="",i="";if("string"==typeof r){if(1===e.length)return r;let l,c=0;for(let i=0;i=127){n+=t.getStringWidth(e.slice(r).normalize("NFC"));break}n+=o>=32?1:0}return n}}else{Ie=function(r,n=!0){let o=0;n&&(r=xr(r)),r=lt(r,"NFC");for(const n of new J(r)){const r=ot(n,0);t(r)?o+=2:e(r)||o++}return o};const t=t=>t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=12871&&12351!==t||t>=12880&&t<=19903||t>=19968&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510||t>=110592&&t<=110593||t>=127488&&t<=127569||t>=127744&&t<=128591||t>=131072&&t<=262141),e=t=>t<=31||t>=127&&t<=159||t>=768&&t<=879||t>=8203&&t<=8207||t>=8400&&t<=8447||t>=65024&&t<=65039||t>=65056&&t<=65071||t>=917760&&t<=917999}function xr(t){return t.replace(Fe,"")}t.exports={inspect:ke,format:function(...t){return Sr(void 0,t)},formatWithOptions:function(t,...e){if("object"!=typeof t||null===t)throw new _t("inspectOptions","object",t);return Sr(t,e)},stylizeWithColor:_e,stylizeWithHTML(t,e){const r=ke.styles[e];return void 0!==r?`${t}`:t},Proxy:Tt}},183:t=>{t.exports=function(t){if(!t)throw new Error("Assertion failed")}},992:(t,e)=>{e.NativeModule={exists:t=>!t.startsWith("/")}},101:(t,e,r)=>{const{ArrayIsArray:n,ArrayPrototypeIncludes:o,ArrayPrototypeIndexOf:i,ArrayPrototypeJoin:l,ArrayPrototypePop:c,ArrayPrototypePush:s,ArrayPrototypeSplice:a,ErrorCaptureStackTrace:p,ObjectDefineProperty:u,ReflectApply:y,RegExpPrototypeTest:f,SafeMap:g,StringPrototypeEndsWith:d,StringPrototypeIncludes:h,StringPrototypeSlice:b,StringPrototypeToLowerCase:m}=r(765),$=new g,S={},x=/^([A-Z][a-z0-9]*)+$/,P=["string","function","number","object","Function","Object","boolean","bigint","symbol"];let O,A,v=null;function j(){return v||(v=r(48)),v}const w=E((function(t,e,r){(t=L(t)).name=`${e} [${r}]`,t.stack,delete t.name}));function E(t){const e="__node_internal_"+t.name;return u(t,"name",{value:e}),t}const L=E((function(t){return O=Error.stackTraceLimit,Error.stackTraceLimit=1/0,p(t),Error.stackTraceLimit=O,t}));let F,I;var k,R,T,z,N;t.exports={codes:S,hideStackFrames:E,isStackOverflowError:function(t){if(void 0===I)try{!function t(){t()}()}catch(t){I=t.message,F=t.name}return t&&t.name===F&&t.message===I}},k="ERR_INVALID_ARG_TYPE",R=(t,e,r)=>{A("string"==typeof t,"'name' must be a string"),n(e)||(e=[e]);let p="The ";d(t," argument")?p+=`${t} `:p+=`"${t}" ${h(t,".")?"property":"argument"} `,p+="must be ";const u=[],y=[],g=[];for(const t of e)A("string"==typeof t,"All expected entries have to be of type string"),o(P,t)?s(u,m(t)):f(x,t)?s(y,t):(A("object"!==t,'The value "object" should be written as "Object"'),s(g,t));if(y.length>0){const t=i(u,"object");-1!==t&&(a(u,t,1),s(y,"Object"))}if(u.length>0){if(u.length>2){const t=c(u);p+=`one of type ${l(u,", ")}, or ${t}`}else p+=2===u.length?`one of type ${u[0]} or ${u[1]}`:`of type ${u[0]}`;(y.length>0||g.length>0)&&(p+=" or ")}if(y.length>0){if(y.length>2){const t=c(y);p+=`an instance of ${l(y,", ")}, or ${t}`}else p+=`an instance of ${y[0]}`,2===y.length&&(p+=` or ${y[1]}`);g.length>0&&(p+=" or ")}if(g.length>0)if(g.length>2){const t=c(g);p+=`one of ${l(g,", ")}, or ${t}`}else 2===g.length?p+=`one of ${g[0]} or ${g[1]}`:(m(g[0])!==g[0]&&(p+="an "),p+=`${g[0]}`);if(null==r)p+=`. Received ${r}`;else if("function"==typeof r&&r.name)p+=`. Received function ${r.name}`;else if("object"==typeof r)r.constructor&&r.constructor.name?p+=`. Received an instance of ${r.constructor.name}`:p+=`. Received ${j().inspect(r,{depth:-1})}`;else{let t=j().inspect(r,{colors:!1});t.length>25&&(t=`${b(t,0,25)}...`),p+=`. Received type ${typeof r} (${t})`}return p},T=TypeError,$.set(k,R),S[k]=(z=T,N=k,function(...t){const e=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new z;Error.stackTraceLimit=e;const o=function(t,e,n){const o=$.get(t);return void 0===A&&(A=r(183)),A("function"==typeof o),A(o.length<=e.length,`Code: ${t}; The provided arguments length (${e.length}) does not match the required ones (${o.length}).`),y(o,n,e)}(N,t,n);return u(n,"message",{value:o,enumerable:!1,writable:!0,configurable:!0}),u(n,"toString",{value(){return`${this.name} [${N}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}),w(n,z.name,N),n.code=N,n})},335:t=>{const e=/\u001b\[\d\d?m/g;t.exports={customInspectSymbol:Symbol.for("nodejs.util.inspect.custom"),isError:t=>t instanceof Error,join:Array.prototype.join.call.bind(Array.prototype.join),removeColors:t=>String.prototype.replace.call(t,e,"")}},63:(t,e,r)=>{const{getConstructorName:n}=r(891);function o(t,...e){for(const r of e){const e=globalThis[r];if(e&&t instanceof e)return!0}for(;t;){if("object"!=typeof t)return!1;if(e.indexOf(n(t))>=0)return!0;t=Object.getPrototypeOf(t)}return!1}function i(t){return e=>{if(!o(e,t.name))return!1;try{t.prototype.valueOf.call(e)}catch{return!1}return!0}}"object"!=typeof globalThis&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);const l=i(String),c=i(Number),s=i(Boolean),a=i(BigInt),p=i(Symbol);t.exports={isAsyncFunction:t=>"function"==typeof t&&Function.prototype.toString.call(t).startsWith("async"),isGeneratorFunction:t=>"function"==typeof t&&Function.prototype.toString.call(t).match(/^(async\s+)?function *\*/),isAnyArrayBuffer:t=>o(t,"ArrayBuffer","SharedArrayBuffer"),isArrayBuffer:t=>o(t,"ArrayBuffer"),isArgumentsObject:t=>!1,isBoxedPrimitive:t=>c(t)||l(t)||s(t)||a(t)||p(t),isDataView:t=>o(t,"DataView"),isExternal:t=>"object"==typeof t&&Object.isFrozen(t)&&null==Object.getPrototypeOf(t),isMap(t){if(!o(t,"Map"))return!1;try{t.has()}catch{return!1}return!0},isMapIterator:t=>"[object Map Iterator]"===Object.prototype.toString.call(Object.getPrototypeOf(t)),isModuleNamespaceObject:t=>t&&"object"==typeof t&&"Module"===t[Symbol.toStringTag],isNativeError:t=>t instanceof Error&&o(t,"Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","AggregateError"),isPromise:t=>o(t,"Promise"),isSet(t){if(!o(t,"Set"))return!1;try{t.has()}catch{return!1}return!0},isSetIterator:t=>"[object Set Iterator]"===Object.prototype.toString.call(Object.getPrototypeOf(t)),isWeakMap:t=>o(t,"WeakMap"),isWeakSet:t=>o(t,"WeakSet"),isRegExp:t=>o(t,"RegExp"),isDate(t){if(o(t,"Date"))try{return Date.prototype.getTime.call(t),!0}catch{}return!1},isTypedArray:t=>o(t,"Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"),isStringObject:l,isNumberObject:c,isBooleanObject:s,isBigIntObject:a,isSymbolObject:p}},356:(t,e,r)=>{const{hideStackFrames:n,codes:{ERR_INVALID_ARG_TYPE:o}}=r(101);e.validateObject=n(((t,e,{nullable:r=!1}={})=>{if(!r&&null===t||Array.isArray(t)||"object"!=typeof t)throw new o(e,"Object",t)}))},765:t=>{const e=(t,e)=>{class r{constructor(e){this._iterator=t(e)}next(){return e(this._iterator)}[Symbol.iterator](){return this}}return Object.setPrototypeOf(r.prototype,null),Object.freeze(r.prototype),Object.freeze(r),r};function r(t,e){return Function.prototype.call.bind(t.prototype.__lookupGetter__(e))}function n(t){return Function.prototype.call.bind(t)}const o=(t,e)=>{Array.prototype.forEach.call(Reflect.ownKeys(t),(r=>{Reflect.getOwnPropertyDescriptor(e,r)||Reflect.defineProperty(e,r,Reflect.getOwnPropertyDescriptor(t,r))}))},i=(t,r)=>{if(Symbol.iterator in t.prototype){const o=new t;let i;Array.prototype.forEach.call(Reflect.ownKeys(t.prototype),(l=>{if(!Reflect.getOwnPropertyDescriptor(r.prototype,l)){const c=Reflect.getOwnPropertyDescriptor(t.prototype,l);if("function"==typeof c.value&&0===c.value.length&&Symbol.iterator in(Function.prototype.call.call(c.value,o)||{})){const t=n(c.value);null==i&&(i=n(t(o).next));const r=e(t,i);c.value=function(){return new r(this)}}Reflect.defineProperty(r.prototype,l,c)}}))}else o(t.prototype,r.prototype);return o(t,r),Object.setPrototypeOf(r.prototype,null),Object.freeze(r.prototype),Object.freeze(r),r},l=Function.prototype.call.bind(String.prototype[Symbol.iterator]),c=Reflect.getPrototypeOf(l(""));t.exports={makeSafe:i,internalBinding(t){if("config"===t)return{hasIntl:!1};throw new Error(`unknown module: "${t}"`)},Array:Array,ArrayIsArray:Array.isArray,ArrayPrototypeFilter:Function.prototype.call.bind(Array.prototype.filter),ArrayPrototypeForEach:Function.prototype.call.bind(Array.prototype.forEach),ArrayPrototypeIncludes:Function.prototype.call.bind(Array.prototype.includes),ArrayPrototypeIndexOf:Function.prototype.call.bind(Array.prototype.indexOf),ArrayPrototypeJoin:Function.prototype.call.bind(Array.prototype.join),ArrayPrototypePop:Function.prototype.call.bind(Array.prototype.pop),ArrayPrototypePush:Function.prototype.call.bind(Array.prototype.push),ArrayPrototypePushApply:Function.apply.bind(Array.prototype.push),ArrayPrototypeSort:Function.prototype.call.bind(Array.prototype.sort),ArrayPrototypeSplice:Function.prototype.call.bind(Array.prototype.slice),ArrayPrototypeUnshift:Function.prototype.call.bind(Array.prototype.unshift),BigIntPrototypeValueOf:Function.prototype.call.bind(BigInt.prototype.valueOf),BooleanPrototypeValueOf:Function.prototype.call.bind(Boolean.prototype.valueOf),DatePrototypeGetTime:Function.prototype.call.bind(Date.prototype.getTime),DatePrototypeToISOString:Function.prototype.call.bind(Date.prototype.toISOString),DatePrototypeToString:Function.prototype.call.bind(Date.prototype.toString),ErrorCaptureStackTrace:function(t){const e=(new Error).stack;t.stack=e.replace(/.*\n.*/,"$1")},ErrorPrototypeToString:Function.prototype.call.bind(Error.prototype.toString),FunctionPrototypeCall:Function.prototype.call.bind(Function.prototype.call),FunctionPrototypeToString:Function.prototype.call.bind(Function.prototype.toString),JSONStringify:JSON.stringify,MapPrototypeGetSize:r(Map,"size"),MapPrototypeEntries:Function.prototype.call.bind(Map.prototype.entries),MathFloor:Math.floor,MathMax:Math.max,MathMin:Math.min,MathRound:Math.round,MathSqrt:Math.sqrt,Number:Number,NumberIsNaN:Number.isNaN,NumberParseFloat:Number.parseFloat,NumberParseInt:Number.parseInt,NumberPrototypeValueOf:Function.prototype.call.bind(Number.prototype.valueOf),Object:Object,ObjectAssign:Object.assign,ObjectCreate:Object.create,ObjectDefineProperty:Object.defineProperty,ObjectGetOwnPropertyDescriptor:Object.getOwnPropertyDescriptor,ObjectGetOwnPropertyNames:Object.getOwnPropertyNames,ObjectGetOwnPropertySymbols:Object.getOwnPropertySymbols,ObjectGetPrototypeOf:Object.getPrototypeOf,ObjectIs:Object.is,ObjectKeys:Object.keys,ObjectPrototypeHasOwnProperty:Function.prototype.call.bind(Object.prototype.hasOwnProperty),ObjectPrototypePropertyIsEnumerable:Function.prototype.call.bind(Object.prototype.propertyIsEnumerable),ObjectSeal:Object.seal,ObjectSetPrototypeOf:Object.setPrototypeOf,ReflectApply:Reflect.apply,ReflectOwnKeys:Reflect.ownKeys,RegExp:RegExp,RegExpPrototypeTest:Function.prototype.call.bind(RegExp.prototype.test),RegExpPrototypeToString:Function.prototype.call.bind(RegExp.prototype.toString),SafeStringIterator:e(l,Function.prototype.call.bind(c.next)),SafeMap:i(Map,class extends Map{constructor(t){super(t)}}),SafeSet:i(Set,class extends Set{constructor(t){super(t)}}),SetPrototypeGetSize:r(Set,"size"),SetPrototypeValues:Function.prototype.call.bind(Set.prototype.values),String:String,StringPrototypeCharCodeAt:Function.prototype.call.bind(String.prototype.charCodeAt),StringPrototypeCodePointAt:Function.prototype.call.bind(String.prototype.codePointAt),StringPrototypeEndsWith:Function.prototype.call.bind(String.prototype.endsWith),StringPrototypeIncludes:Function.prototype.call.bind(String.prototype.includes),StringPrototypeNormalize:Function.prototype.call.bind(String.prototype.normalize),StringPrototypePadEnd:Function.prototype.call.bind(String.prototype.padEnd),StringPrototypePadStart:Function.prototype.call.bind(String.prototype.padStart),StringPrototypeRepeat:Function.prototype.call.bind(String.prototype.repeat),StringPrototypeReplace:Function.prototype.call.bind(String.prototype.replace),StringPrototypeSlice:Function.prototype.call.bind(String.prototype.slice),StringPrototypeSplit:Function.prototype.call.bind(String.prototype.split),StringPrototypeToLowerCase:Function.prototype.call.bind(String.prototype.toLowerCase),StringPrototypeTrim:Function.prototype.call.bind(String.prototype.trim),StringPrototypeValueOf:Function.prototype.call.bind(String.prototype.valueOf),SymbolPrototypeToString:Function.prototype.call.bind(Symbol.prototype.toString),SymbolPrototypeValueOf:Function.prototype.call.bind(Symbol.prototype.valueOf),SymbolIterator:Symbol.iterator,SymbolFor:Symbol.for,SymbolToStringTag:Symbol.toStringTag,TypedArrayPrototypeGetLength:t=>t.constructor.prototype.__lookupGetter__("length").call(t),Uint8Array:Uint8Array,uncurryThis:n}},161:t=>{const e=new WeakMap;class r{constructor(t,r){const n=new Proxy(t,r);return e.set(n,[t,r]),n}static getProxyDetails(t,r=!0){const n=e.get(t);if(n)return r?n:n[0]}}t.exports={getProxyDetails:r.getProxyDetails.bind(r),Proxy:r}},891:(t,e,r)=>{const n=r(161),o=Symbol("kPending"),i=Symbol("kRejected");t.exports={getOwnNonIndexProperties:function(t,e=2){const r=Object.getOwnPropertyDescriptors(t),n=[];for(const[t,o]of Object.entries(r))if(!/^(0|[1-9][0-9]*)$/.test(t)||parseInt(t,10)>=2**32-1){if(2===e&&!o.enumerable)continue;n.push(t)}for(const r of Object.getOwnPropertySymbols(t)){const o=Object.getOwnPropertyDescriptor(t,r);(2!==e||o.enumerable)&&n.push(r)}return n},getPromiseDetails:()=>[o,void 0],getProxyDetails:n.getProxyDetails,Proxy:n.Proxy,kPending:o,kRejected:i,previewEntries:t=>[[],!1],getConstructorName(t){if(!t||"object"!=typeof t)throw new Error("Invalid object");if(t.constructor&&t.constructor.name)return t.constructor.name;const e=Object.prototype.toString.call(t).match(/^\[object ([^\]]+)\]/);return e?e[1]:"Object"},getExternalValue:()=>BigInt(0),propertyFilter:{ALL_PROPERTIES:0,ONLY_ENUMERABLE:2}}}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(48)})()},"object"==typeof exports&&"object"==typeof module?module.exports=e():"object"==typeof exports?exports.util=e():t.util=e()},{}],24:[function(require,module,exports){"use strict";const stream=require("stream"),{Buffer:Buffer}=require("buffer");"object"!=typeof globalThis&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);let util=null,customInspect=Symbol.for("nodejs.util.inspect.custom");try{util=require("util"),customInspect=util.inspect.custom,"function"!=typeof TextDecoder&&(globalThis.TextDecoder=util.TextDecoder)}catch(ignored){}const td=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class NoFilter extends stream.Transform{constructor(input,inputEncoding,options){let inp,inpE;switch(null==options&&(options={}),typeof input){case"object":Buffer.isBuffer(input)?(inp=input,null!=inputEncoding&&"object"==typeof inputEncoding&&(options=inputEncoding)):options=input;break;case"string":inp=input,null!=inputEncoding&&"object"==typeof inputEncoding?options=inputEncoding:inpE=inputEncoding}null==options&&(options={}),null==inp&&(inp=options.input),null==inpE&&(inpE=options.inputEncoding),delete options.input,delete options.inputEncoding;const watchPipe=null==options.watchPipe||options.watchPipe;delete options.watchPipe;const readError=!!options.readError;delete options.readError,super(options),this.readError=readError,watchPipe&&this.on("pipe",(readable=>{const om=readable._readableState.objectMode;if(this.length>0&&om!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");return this._readableState.objectMode=om,this._writableState.objectMode=om})),null!=inp&&this.end(inp,inpE)}static isNoFilter(obj){return obj instanceof this}static compare(nf1,nf2){if(!(nf1 instanceof this))throw new TypeError("Arguments must be NoFilters");return nf1===nf2?0:nf1.compare(nf2)}static concat(list,length){if(!Array.isArray(list))throw new TypeError("list argument must be an Array of NoFilters");if(0===list.length||0===length)return Buffer.alloc(0);null==length&&(length=list.reduce(((tot,nf)=>{if(!(nf instanceof NoFilter))throw new TypeError("list argument must be an Array of NoFilters");return tot+nf.length}),0));let allBufs=!0,allObjs=!0;const bufs=list.map((nf=>{if(!(nf instanceof NoFilter))throw new TypeError("list argument must be an Array of NoFilters");const buf=nf.slice();return Buffer.isBuffer(buf)?allObjs=!1:allBufs=!1,buf}));if(allBufs)return Buffer.concat(bufs,length);if(allObjs)return[].concat(...bufs).slice(0,length);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(chunk,encoding,callback){this._readableState.objectMode||Buffer.isBuffer(chunk)||(chunk=Buffer.from(chunk,encoding)),this.push(chunk),callback()}_bufArray(){let bufs=this._readableState.buffer;if(!Array.isArray(bufs)){let b=bufs.head;for(bufs=[];null!=b;)bufs.push(b.data),b=b.next}return bufs}read(size){const buf=super.read(size);if(null!=buf){if(this.emit("read",buf),this.readError&&buf.length{this.on("finish",(()=>{const data=this.read();null==cb||done||(done=!0,cb(null,data)),resolve(data)})),this.on("error",(er=>{null==cb||done||(done=!0,cb(er)),reject(er)}))}))}compare(other){if(!(other instanceof NoFilter))throw new TypeError("Arguments must be NoFilters");if(this===other)return 0;{const buf1=this.slice(),buf2=other.slice();if(Buffer.isBuffer(buf1)&&Buffer.isBuffer(buf2))return buf1.compare(buf2);throw new Error("Cannot compare streams in object mode")}}equals(other){return 0===this.compare(other)}slice(start,end){if(this._readableState.objectMode)return this._bufArray().slice(start,end);const bufs=this._bufArray();switch(bufs.length){case 0:return Buffer.alloc(0);case 1:return bufs[0].slice(start,end);default:return Buffer.concat(bufs).slice(start,end)}}get(index){return this.slice()[index]}toJSON(){const b=this.slice();return Buffer.isBuffer(b)?b.toJSON():b}toString(encoding,start,end){const buf=this.slice(start,end);return Buffer.isBuffer(buf)?encoding&&"utf8"!==encoding?buf.toString(encoding,start,end):td.decode(buf):JSON.stringify(buf)}inspect(depth,options){return this[customInspect](depth,options)}[customInspect](depth,options){const hex=this._bufArray().map((b=>Buffer.isBuffer(b)?(null!=options?options.stylize:void 0)?options.stylize(b.toString("hex"),"string"):b.toString("hex"):util?util.inspect(b,options):b.toString())).join(", ");return`${this.constructor.name} [${hex}]`}get length(){return this._readableState.length}writeBigInt(val){let str=val.toString(16);if(val<0){const sz=BigInt(Math.floor(str.length/2));str=(val=(BigInt(1)<1)for(var i=1;i */ -var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(Buffer.prototype),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0!==fill?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},{buffer:5}],30:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;function Stream(){EE.call(this)}require("inherits")(Stream,EE),Stream.Readable=require("readable-stream/lib/_stream_readable.js"),Stream.Writable=require("readable-stream/lib/_stream_writable.js"),Stream.Duplex=require("readable-stream/lib/_stream_duplex.js"),Stream.Transform=require("readable-stream/lib/_stream_transform.js"),Stream.PassThrough=require("readable-stream/lib/_stream_passthrough.js"),Stream.finished=require("readable-stream/lib/internal/streams/end-of-stream.js"),Stream.pipeline=require("readable-stream/lib/internal/streams/pipeline.js"),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&!1===options.end||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},{events:10,inherits:19,"readable-stream/lib/_stream_duplex.js":32,"readable-stream/lib/_stream_passthrough.js":33,"readable-stream/lib/_stream_readable.js":34,"readable-stream/lib/_stream_transform.js":35,"readable-stream/lib/_stream_writable.js":36,"readable-stream/lib/internal/streams/end-of-stream.js":40,"readable-stream/lib/internal/streams/pipeline.js":42}],31:[function(require,module,exports){"use strict";var codes={};function createErrorType(code,message,Base){Base||(Base=Error);var NodeError=function(_Base){var subClass,superClass;function NodeError(arg1,arg2,arg3){return _Base.call(this,function(arg1,arg2,arg3){return"string"==typeof message?message:message(arg1,arg2,arg3)}(arg1,arg2,arg3))||this}return superClass=_Base,(subClass=NodeError).prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass,NodeError}(Base);NodeError.prototype.name=Base.name,NodeError.prototype.code=code,codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;return expected=expected.map((function(i){return String(i)})),len>2?"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(", "),", or ")+expected[len-1]:2===len?"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1]):"of ".concat(thing," ").concat(expected[0])}return"of ".concat(thing," ").concat(String(expected))}createErrorType("ERR_INVALID_OPT_VALUE",(function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"'}),TypeError),createErrorType("ERR_INVALID_ARG_TYPE",(function(name,expected,actual){var determiner,search,pos,msg;if("string"==typeof expected&&(search="not ",expected.substr(!pos||pos<0?0:+pos,search.length)===search)?(determiner="must not be",expected=expected.replace(/^not /,"")):determiner="must be",function(str,search,this_len){return(void 0===this_len||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}(name," argument"))msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,"type"));else{var type=function(str,search,start){return"number"!=typeof start&&(start=0),!(start+search.length>str.length)&&-1!==str.indexOf(search,start)}(name,".")?"property":"argument";msg='The "'.concat(name,'" ').concat(type," ").concat(determiner," ").concat(oneOf(expected,"type"))}return msg+=". Received type ".concat(typeof actual)}),TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(name){return"The "+name+" method is not implemented"})),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",(function(name){return"Cannot call "+name+" after a stream was destroyed"})),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",(function(arg){return"Unknown encoding: "+arg}),TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),module.exports.codes=codes},{}],32:[function(require,module,exports){(function(process){(function(){"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");require("inherits")(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v0)if("string"==typeof chunk||state.objectMode||Object.getPrototypeOf(chunk)===Buffer.prototype||(chunk=function(chunk){return Buffer.from(chunk)}(chunk)),addToFront)state.endEmitted?errorOrDestroy(stream,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(stream,state,chunk,!0);else if(state.ended)errorOrDestroy(stream,new ERR_STREAM_PUSH_AFTER_EOF);else{if(state.destroyed)return!1;state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||0!==chunk.length?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1)}else addToFront||(state.reading=!1,maybeReadMore(stream,state));return!state.ended&&(state.lengthstate.highWaterMark&&(state.highWaterMark=function(n){return n>=1073741824?n=1073741824:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function emitReadable(stream){var state=stream._readableState;debug("emitReadable",state.needReadable,state.emittedReadable),state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,process.nextTick(emitReadable_,stream))}function emitReadable_(stream){var state=stream._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended),state.destroyed||!state.length&&!state.ended||(stream.emit("readable"),state.emittedReadable=!1),state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark,flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(;!state.reading&&!state.ended&&(state.length0,state.resumeScheduled&&!state.paused?state.flowing=!0:self.listenerCount("data")>0&&self.resume()}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume_(stream,state){debug("resume",state.reading),state.reading||stream.read(0),state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){return 0===state.length?null:(state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.first():state.buffer.concat(state.length),state.buffer.clear()):ret=state.buffer.consume(n,state.decoder),ret);var ret}function endReadable(stream){var state=stream._readableState;debug("endReadable",state.endEmitted),state.endEmitted||(state.ended=!0,process.nextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){if(debug("endReadableNT",state.endEmitted,state.length),!state.endEmitted&&0===state.length&&(state.endEmitted=!0,stream.readable=!1,stream.emit("end"),state.autoDestroy)){var wState=stream._writableState;(!wState||wState.autoDestroy&&wState.finished)&&stream.destroy()}}function indexOf(xs,x){for(var i=0,l=xs.length;i=state.highWaterMark:state.length>0)||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(0===(n=howMuchToRead(n,state))&&state.ended)return 0===state.length&&endReadable(this),null;var ret,doRead=state.needReadable;return debug("need readable",doRead),(0===state.length||state.length-n0?fromList(n,state):null)?(state.needReadable=state.length<=state.highWaterMark,n=0):(state.length-=n,state.awaitDrain=0),0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"))},Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var endFn=(!pipeOpts||!1!==pipeOpts.end)&&dest!==process.stdout&&dest!==process.stderr?onend:unpipe;function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&!1===unpipeInfo.hasUnpiped&&(unpipeInfo.hasUnpiped=!0,debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain())}function onend(){debug("onend"),dest.end()}state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=function(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}(src);dest.on("drain",ondrain);var cleanedUp=!1;function ondata(chunk){debug("ondata");var ret=dest.write(chunk);debug("dest.write",ret),!1===ret&&((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&errorOrDestroy(dest,er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}return src.on("data",ondata),function(emitter,event,fn){if("function"==typeof emitter.prependListener)return emitter.prependListener(event,fn);emitter._events&&emitter._events[event]?Array.isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn)}(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes||(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo)),this;if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i0,!1!==state.flowing&&this.resume()):"readable"===ev&&(state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.flowing=!1,state.emittedReadable=!1,debug("on readable",state.length,state.reading),state.length?emitReadable(this):state.reading||process.nextTick(nReadingNextTick,this))),res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(ev,fn){var res=Stream.prototype.removeListener.call(this,ev,fn);return"readable"===ev&&process.nextTick(updateReadableListening,this),res},Readable.prototype.removeAllListeners=function(ev){var res=Stream.prototype.removeAllListeners.apply(this,arguments);return"readable"!==ev&&void 0!==ev||process.nextTick(updateReadableListening,this),res},Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!state.readableListening,function(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(resume_,stream,state))}(this,state)),state.paused=!1,this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(stream){var _this=this,state=this._readableState,paused=!1;for(var i in stream.on("end",(function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk)}_this.push(null)})),stream.on("data",(function(chunk){(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),state.objectMode&&null==chunk)||(state.objectMode||chunk&&chunk.length)&&(_this.push(chunk)||(paused=!0,stream.pause()))})),stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n-1))throw new ERR_UNKNOWN_ENCODING(encoding);return this._writableState.defaultEncoding=encoding,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;return"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!=chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||function(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb));state.ended=!0,stream.writable=!1}(this,state,cb),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){cb(err)}}).call(this)}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":31,"./_stream_duplex":32,"./internal/streams/destroy":39,"./internal/streams/state":43,"./internal/streams/stream":44,_process:24,buffer:5,inherits:19,"util-deprecate":48}],37:[function(require,module,exports){(function(process){(function(){"use strict";var _Object$setPrototypeO;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var finished=require("./end-of-stream"),kLastResolve=Symbol("lastResolve"),kLastReject=Symbol("lastReject"),kError=Symbol("error"),kEnded=Symbol("ended"),kLastPromise=Symbol("lastPromise"),kHandlePromise=Symbol("handlePromise"),kStream=Symbol("stream");function createIterResult(value,done){return{value:value,done:done}}function readAndResolve(iter){var resolve=iter[kLastResolve];if(null!==resolve){var data=iter[kStream].read();null!==data&&(iter[kLastPromise]=null,iter[kLastResolve]=null,iter[kLastReject]=null,resolve(createIterResult(data,!1)))}}function onReadable(iter){process.nextTick(readAndResolve,iter)}var AsyncIteratorPrototype=Object.getPrototypeOf((function(){})),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_defineProperty(_Object$setPrototypeO={get stream(){return this[kStream]},next:function(){var _this=this,error=this[kError];if(null!==error)return Promise.reject(error);if(this[kEnded])return Promise.resolve(createIterResult(void 0,!0));if(this[kStream].destroyed)return new Promise((function(resolve,reject){process.nextTick((function(){_this[kError]?reject(_this[kError]):resolve(createIterResult(void 0,!0))}))}));var promise,lastPromise=this[kLastPromise];if(lastPromise)promise=new Promise(function(lastPromise,iter){return function(resolve,reject){lastPromise.then((function(){iter[kEnded]?resolve(createIterResult(void 0,!0)):iter[kHandlePromise](resolve,reject)}),reject)}}(lastPromise,this));else{var data=this[kStream].read();if(null!==data)return Promise.resolve(createIterResult(data,!1));promise=new Promise(this[kHandlePromise])}return this[kLastPromise]=promise,promise}},Symbol.asyncIterator,(function(){return this})),_defineProperty(_Object$setPrototypeO,"return",(function(){var _this2=this;return new Promise((function(resolve,reject){_this2[kStream].destroy(null,(function(err){err?reject(err):resolve(createIterResult(void 0,!0))}))}))})),_Object$setPrototypeO),AsyncIteratorPrototype);module.exports=function(stream){var _Object$create,iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_defineProperty(_Object$create={},kStream,{value:stream,writable:!0}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:!0}),_defineProperty(_Object$create,kLastReject,{value:null,writable:!0}),_defineProperty(_Object$create,kError,{value:null,writable:!0}),_defineProperty(_Object$create,kEnded,{value:stream._readableState.endEmitted,writable:!0}),_defineProperty(_Object$create,kHandlePromise,{value:function(resolve,reject){var data=iterator[kStream].read();data?(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(data,!1))):(iterator[kLastResolve]=resolve,iterator[kLastReject]=reject)},writable:!0}),_Object$create));return iterator[kLastPromise]=null,finished(stream,(function(err){if(err&&"ERR_STREAM_PREMATURE_CLOSE"!==err.code){var reject=iterator[kLastReject];return null!==reject&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,reject(err)),void(iterator[kError]=err)}var resolve=iterator[kLastResolve];null!==resolve&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(void 0,!0))),iterator[kEnded]=!0})),stream.on("readable",onReadable.bind(null,iterator)),iterator}}).call(this)}).call(this,require("_process"))},{"./end-of-stream":40,_process:24}],38:[function(require,module,exports){"use strict";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _defineProperties(target,props){for(var i=0;i0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length}},{key:"unshift",value:function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length}},{key:"shift",value:function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret}},{key:"concat",value:function(n){if(0===this.length)return Buffer.alloc(0);for(var src,target,offset,ret=Buffer.allocUnsafe(n>>>0),p=this.head,i=0;p;)src=p.data,target=ret,offset=i,Buffer.prototype.copy.call(src,target,offset),i+=p.data.length,p=p.next;return ret}},{key:"consume",value:function(n,hasStrings){var ret;return nstr.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),0==(n-=nb)){nb===str.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=str.slice(nb));break}++c}return this.length-=c,ret}},{key:"_getBuffer",value:function(n){var ret=Buffer.allocUnsafe(n),p=this.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),0==(n-=nb)){nb===buf.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=buf.slice(nb));break}++c}return this.length-=c,ret}},{key:custom,value:function(_,options){return inspect(this,function(target){for(var i=1;i0,(function(err){error||(error=err),err&&destroys.forEach(call),reading||(destroys.forEach(call),callback(error))}))}));return streams.reduce(pipe)}},{"../../../errors":31,"./end-of-stream":40}],43:[function(require,module,exports){"use strict";var ERR_INVALID_OPT_VALUE=require("../../../errors").codes.ERR_INVALID_OPT_VALUE;module.exports={getHighWaterMark:function(state,options,duplexKey,isDuplex){var hwm=function(options,isDuplex,duplexKey){return null!=options.highWaterMark?options.highWaterMark:isDuplex?options[duplexKey]:null}(options,isDuplex,duplexKey);if(null!=hwm){if(!isFinite(hwm)||Math.floor(hwm)!==hwm||hwm<0)throw new ERR_INVALID_OPT_VALUE(isDuplex?duplexKey:"highWaterMark",hwm);return Math.floor(hwm)}return state.objectMode?16:16384}}},{"../../../errors":31}],44:[function(require,module,exports){module.exports=require("events").EventEmitter},{events:10}],45:[function(require,module,exports){"use strict";var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch((encoding=""+encoding)&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function StringDecoder(encoding){var nb;switch(this.encoding=function(enc){var nenc=function(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}(enc);if("string"!=typeof nenc&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}(encoding),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(nb)}function utf8CheckByte(byte){return byte<=127?0:byte>>5==6?2:byte>>4==14?3:byte>>3==30?4:byte>>6==2?-1:-2}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=function(self,buf,p){if(128!=(192&buf[0]))return self.lastNeed=0,"�";if(self.lastNeed>1&&buf.length>1){if(128!=(192&buf[1]))return self.lastNeed=1,"�";if(self.lastNeed>2&&buf.length>2&&128!=(192&buf[2]))return self.lastNeed=2,"�"}}(this,buf);return void 0!==r?r:this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(buf.copy(this.lastChar,p,0,buf.length),void(this.lastNeed-=buf.length))}function utf16Text(buf,i){if((buf.length-i)%2==0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0===n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(void 0===(r=this.fillLast(buf)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return nb>0&&(self.lastNeed=nb-1),nb;if(--j=0)return nb>0&&(self.lastNeed=nb-2),nb;if(--j=0)return nb>0&&(2===nb?nb=0:self.lastNeed=nb-3),nb;return 0}(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)},StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length}},{"safe-buffer":29}],46:[function(require,module,exports){"use strict";var punycode=require("punycode"),util=require("./util");function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}exports.parse=urlParse,exports.resolve=function(source,relative){return urlParse(source,!1,!0).resolve(relative)},exports.resolveObject=function(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative},exports.format=function(obj){util.isString(obj)&&(obj=urlParse(obj));return obj instanceof Url?obj.format():Url.prototype.format.call(obj)},exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,unwise=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=-1!==queryIndex&&queryIndex127?newpart+="x":newpart+=part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==rest[0]&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(i=0,l=autoEscape.length;i0)&&result.host.split("@"))&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift());return result.search=relative.search,result.query=relative.query,util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)"."===(last=srcPath[i])?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var authInHost,isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);psychotic&&(result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"",(authInHost=!!(result.host&&result.host.indexOf("@")>0)&&result.host.split("@"))&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift()));return(mustEndAbs=mustEndAbs||result.host&&srcPath.length)&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(":"!==(port=port[0])&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},{"./util":47,punycode:25,querystring:28}],47:[function(require,module,exports){"use strict";module.exports={isString:function(arg){return"string"==typeof arg},isObject:function(arg){return"object"==typeof arg&&null!==arg},isNull:function(arg){return null===arg},isNullOrUndefined:function(arg){return null==arg}}},{}],48:[function(require,module,exports){(function(global){(function(){function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=function(fn,msg){if(config("noDeprecation"))return fn;var warned=!1;return function(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],49:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],50:[function(require,module,exports){"use strict";var isArgumentsObject=require("is-arguments"),isGeneratorFunction=require("is-generator-function"),whichTypedArray=require("which-typed-array"),isTypedArray=require("is-typed-array");function uncurryThis(f){return f.call.bind(f)}var BigIntSupported="undefined"!=typeof BigInt,SymbolSupported="undefined"!=typeof Symbol,ObjectToString=uncurryThis(Object.prototype.toString),numberValue=uncurryThis(Number.prototype.valueOf),stringValue=uncurryThis(String.prototype.valueOf),booleanValue=uncurryThis(Boolean.prototype.valueOf);if(BigIntSupported)var bigIntValue=uncurryThis(BigInt.prototype.valueOf);if(SymbolSupported)var symbolValue=uncurryThis(Symbol.prototype.valueOf);function checkBoxedPrimitive(value,prototypeValueOf){if("object"!=typeof value)return!1;try{return prototypeValueOf(value),!0}catch(e){return!1}}function isMapToString(value){return"[object Map]"===ObjectToString(value)}function isSetToString(value){return"[object Set]"===ObjectToString(value)}function isWeakMapToString(value){return"[object WeakMap]"===ObjectToString(value)}function isWeakSetToString(value){return"[object WeakSet]"===ObjectToString(value)}function isArrayBufferToString(value){return"[object ArrayBuffer]"===ObjectToString(value)}function isArrayBuffer(value){return"undefined"!=typeof ArrayBuffer&&(isArrayBufferToString.working?isArrayBufferToString(value):value instanceof ArrayBuffer)}function isDataViewToString(value){return"[object DataView]"===ObjectToString(value)}function isDataView(value){return"undefined"!=typeof DataView&&(isDataViewToString.working?isDataViewToString(value):value instanceof DataView)}function isSharedArrayBufferToString(value){return"[object SharedArrayBuffer]"===ObjectToString(value)}function isSharedArrayBuffer(value){return"undefined"!=typeof SharedArrayBuffer&&(isSharedArrayBufferToString.working?isSharedArrayBufferToString(value):value instanceof SharedArrayBuffer)}function isNumberObject(value){return checkBoxedPrimitive(value,numberValue)}function isStringObject(value){return checkBoxedPrimitive(value,stringValue)}function isBooleanObject(value){return checkBoxedPrimitive(value,booleanValue)}function isBigIntObject(value){return BigIntSupported&&checkBoxedPrimitive(value,bigIntValue)}function isSymbolObject(value){return SymbolSupported&&checkBoxedPrimitive(value,symbolValue)}exports.isArgumentsObject=isArgumentsObject,exports.isGeneratorFunction=isGeneratorFunction,exports.isTypedArray=isTypedArray,exports.isPromise=function(input){return"undefined"!=typeof Promise&&input instanceof Promise||null!==input&&"object"==typeof input&&"function"==typeof input.then&&"function"==typeof input.catch},exports.isArrayBufferView=function(value){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(value):isTypedArray(value)||isDataView(value)},exports.isUint8Array=function(value){return"Uint8Array"===whichTypedArray(value)},exports.isUint8ClampedArray=function(value){return"Uint8ClampedArray"===whichTypedArray(value)},exports.isUint16Array=function(value){return"Uint16Array"===whichTypedArray(value)},exports.isUint32Array=function(value){return"Uint32Array"===whichTypedArray(value)},exports.isInt8Array=function(value){return"Int8Array"===whichTypedArray(value)},exports.isInt16Array=function(value){return"Int16Array"===whichTypedArray(value)},exports.isInt32Array=function(value){return"Int32Array"===whichTypedArray(value)},exports.isFloat32Array=function(value){return"Float32Array"===whichTypedArray(value)},exports.isFloat64Array=function(value){return"Float64Array"===whichTypedArray(value)},exports.isBigInt64Array=function(value){return"BigInt64Array"===whichTypedArray(value)},exports.isBigUint64Array=function(value){return"BigUint64Array"===whichTypedArray(value)},isMapToString.working="undefined"!=typeof Map&&isMapToString(new Map),exports.isMap=function(value){return"undefined"!=typeof Map&&(isMapToString.working?isMapToString(value):value instanceof Map)},isSetToString.working="undefined"!=typeof Set&&isSetToString(new Set),exports.isSet=function(value){return"undefined"!=typeof Set&&(isSetToString.working?isSetToString(value):value instanceof Set)},isWeakMapToString.working="undefined"!=typeof WeakMap&&isWeakMapToString(new WeakMap),exports.isWeakMap=function(value){return"undefined"!=typeof WeakMap&&(isWeakMapToString.working?isWeakMapToString(value):value instanceof WeakMap)},isWeakSetToString.working="undefined"!=typeof WeakSet&&isWeakSetToString(new WeakSet),exports.isWeakSet=function(value){return isWeakSetToString(value)},isArrayBufferToString.working="undefined"!=typeof ArrayBuffer&&isArrayBufferToString(new ArrayBuffer),exports.isArrayBuffer=isArrayBuffer,isDataViewToString.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1)),exports.isDataView=isDataView,isSharedArrayBufferToString.working="undefined"!=typeof SharedArrayBuffer&&isSharedArrayBufferToString(new SharedArrayBuffer),exports.isSharedArrayBuffer=isSharedArrayBuffer,exports.isAsyncFunction=function(value){return"[object AsyncFunction]"===ObjectToString(value)},exports.isMapIterator=function(value){return"[object Map Iterator]"===ObjectToString(value)},exports.isSetIterator=function(value){return"[object Set Iterator]"===ObjectToString(value)},exports.isGeneratorObject=function(value){return"[object Generator]"===ObjectToString(value)},exports.isWebAssemblyCompiledModule=function(value){return"[object WebAssembly.Module]"===ObjectToString(value)},exports.isNumberObject=isNumberObject,exports.isStringObject=isStringObject,exports.isBooleanObject=isBooleanObject,exports.isBigIntObject=isBigIntObject,exports.isSymbolObject=isSymbolObject,exports.isBoxedPrimitive=function(value){return isNumberObject(value)||isStringObject(value)||isBooleanObject(value)||isBigIntObject(value)||isSymbolObject(value)},exports.isAnyArrayBuffer=function(value){return"undefined"!=typeof Uint8Array&&(isArrayBuffer(value)||isSharedArrayBuffer(value))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(method){Object.defineProperty(exports,method,{enumerable:!1,value:function(){throw new Error(method+" is not supported in userland")}})}))},{"is-arguments":20,"is-generator-function":22,"is-typed-array":23,"which-typed-array":52}],51:[function(require,module,exports){(function(process){(function(){var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(obj){for(var keys=Object.keys(obj),descriptors={},i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}})),x=args[i];i=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=function(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=function(array){var hash={};return array.forEach((function(val,idx){hash[val]=!0})),hash}(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var output,base="",array=!1,braces=["{","}"];(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value))&&(base=" [Function"+(value.name?": "+value.name:"")+"]");return isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0!==keys.length||array&&0!=value.length?recurseTimes<0?isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special"):(ctx.seen.push(value),output=array?function(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i=0&&0,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}(output,base,braces)):braces[0]+base+braces[1]}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if((desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]}).get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1)).indexOf("\n")>-1&&(str=array?str.split("\n").map((function(line){return" "+line})).join("\n").substr(2):"\n"+str.split("\n").map((function(line){return" "+line})).join("\n")):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}exports.debuglog=function(set){if(set=set.toUpperCase(),!debugs[set])if(debugEnvRegex.test(set)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.types=require("./support/types"),exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.types.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.types.isDate=isDate,exports.isError=isError,exports.types.isNativeError=isError,exports.isFunction=isFunction,exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin};var kCustomPromisifiedSymbol="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function callbackifyOnRejected(reason,cb){if(!reason){var newReason=new Error("Promise was rejected with a falsy value");newReason.reason=reason,reason=newReason}return cb(reason)}exports.promisify=function(original){if("function"!=typeof original)throw new TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&original[kCustomPromisifiedSymbol]){var fn;if("function"!=typeof(fn=original[kCustomPromisifiedSymbol]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:!1,writable:!1,configurable:!0}),fn}function fn(){for(var promiseResolve,promiseReject,promise=new Promise((function(resolve,reject){promiseResolve=resolve,promiseReject=reject})),args=[],i=0;i1?"s":""}class Commented extends stream.Transform{constructor(options={}){const{depth:depth=1,max_depth:max_depth=10,no_summary:no_summary=!1,tags:tags={},bigint:bigint,preferWeb:preferWeb,encoding:encoding,...superOpts}=options;super({...superOpts,readableObjectMode:!1,writableObjectMode:!1}),this.depth=depth,this.max_depth=max_depth,this.all=new NoFilter,tags[24]||(tags[24]=this._tag_24.bind(this)),this.parser=new Decoder({tags:tags,max_depth:max_depth,bigint:bigint,preferWeb:preferWeb,encoding:encoding}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),no_summary||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(v){const c=new Commented({depth:this.depth+1,no_summary:!0});c.on("data",(b=>this.push(b))),c.on("error",(er=>this.emit("error",er))),c.end(v)}_transform(fresh,encoding,cb){this.parser.write(fresh,encoding,cb)}_flush(cb){return this.parser._flush(cb)}static comment(input,options={},cb){if(null==input)throw new Error("input required");({options:options,cb:cb}=function(opts,cb){switch(typeof opts){case"function":return{options:{},cb:opts};case"string":return{options:{encoding:opts},cb:cb};case"number":return{options:{max_depth:opts},cb:cb};case"object":return{options:opts||{},cb:cb};default:throw new TypeError("Unknown option type")}}(options,cb));const bs=new NoFilter,{encoding:encoding="hex",...opts}=options,d=new Commented(opts);let p=null;return"function"==typeof cb?(d.on("end",(()=>{cb(null,bs.toString("utf8"))})),d.on("error",cb)):p=new Promise(((resolve,reject)=>(d.on("end",(()=>{resolve(bs.toString("utf8"))})),d.on("error",reject)))),d.pipe(bs),utils.guessEncoding(input,encoding).pipe(d),p}_on_error(er){this.push("ERROR: "),this.push(er.toString()),this.push("\n")}_on_read(buf){this.all.write(buf);const hex=buf.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(hex);let ind=2*(this.max_depth-this.depth);return ind-=hex.length,ind<1&&(ind=1),this.push(new Array(ind+1).join(" ")),this.push("-- ")}_on_more(mt,len,parent_mt,pos){this.depth++;let desc="";switch(mt){case MT.POS_INT:desc="Positive number,";break;case MT.NEG_INT:desc="Negative number,";break;case MT.ARRAY:desc="Array, length";break;case MT.MAP:desc="Map, count";break;case MT.BYTE_STRING:desc="Bytes, length";break;case MT.UTF8_STRING:desc="String, length";break;case MT.SIMPLE_FLOAT:desc=1===len?"Simple value,":"Float,"}return this.push(desc+" next "+len+" byte"+plural(len)+"\n")}_on_start_string(mt,tag,parent_mt,pos){this.depth++;let desc="";switch(mt){case MT.BYTE_STRING:desc="Bytes, length: "+tag;break;case MT.UTF8_STRING:desc="String, length: "+tag.toString()}return this.push(desc+"\n")}_on_start(mt,tag,parent_mt,pos){switch(this.depth++,parent_mt){case MT.ARRAY:this.push(`[${pos}], `);break;case MT.MAP:pos%2?this.push(`{Val:${Math.floor(pos/2)}}, `):this.push(`{Key:${Math.floor(pos/2)}}, `)}switch(mt){case MT.TAG:this.push(`Tag #${tag}`),24==tag&&this.push(" Encoded CBOR data item");break;case MT.ARRAY:tag===SYMS.STREAM?this.push("Array (streaming)"):this.push(`Array, ${tag} item${plural(tag)}`);break;case MT.MAP:tag===SYMS.STREAM?this.push("Map (streaming)"):this.push(`Map, ${tag} pair${plural(tag)}`);break;case MT.BYTE_STRING:this.push("Bytes (streaming)");break;case MT.UTF8_STRING:this.push("String (streaming)")}return this.push("\n")}_on_stop(mt){return this.depth--}_on_value(val,parent_mt,pos,ai){if(val!==SYMS.BREAK)switch(parent_mt){case MT.ARRAY:this.push(`[${pos}], `);break;case MT.MAP:pos%2?this.push(`{Val:${Math.floor(pos/2)}}, `):this.push(`{Key:${Math.floor(pos/2)}}, `)}const str=utils.cborValueToString(val,-1/0);switch("string"==typeof val||Buffer.isBuffer(val)?(val.length>0&&(this.push(str),this.push("\n")),this.depth--):(this.push(str),this.push("\n")),ai){case NUMBYTES.ONE:case NUMBYTES.TWO:case NUMBYTES.FOUR:case NUMBYTES.EIGHT:this.depth--}}_on_data(){return this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}module.exports=Commented}).call(this)}).call(this,{isBuffer:require("../examples/browserify-demo/node_modules/is-buffer/index.js")})},{"../examples/browserify-demo/node_modules/is-buffer/index.js":21,"./constants":55,"./decoder":56,"./simple":60,"./utils":62,nofilter:64,stream:30,util:51}],55:[function(require,module,exports){"use strict";const{BigNumber:BigNumber}=require("bignumber.js");exports.BigNumber=BigNumber,exports.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},exports.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36},exports.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},exports.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},exports.SYMS={NULL:Symbol("null"),UNDEFINED:Symbol("undef"),PARENT:Symbol("parent"),BREAK:Symbol("break"),STREAM:Symbol("stream")},exports.SHIFT32=4294967296,exports.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(exports.SHIFT32)};const MINUS_ONE=new BigNumber(-1);exports.BN={MINUS_ONE:MINUS_ONE,NEG_MAX:MINUS_ONE.minus(new BigNumber(Number.MAX_SAFE_INTEGER.toString(16),16)),TWO:new BigNumber(2),MAXINT:new BigNumber("0x20000000000000"),MAXINT32:new BigNumber(4294967295),MAXINT64:new BigNumber("0xffffffffffffffff"),SHIFT32:new BigNumber(exports.SHIFT32)}},{"bignumber.js":63}],56:[function(require,module,exports){(function(Buffer){(function(){"use strict";require("stream");const BinaryParseStream=require("../vendor/binary-parse-stream"),Tagged=require("./tagged"),Simple=require("./simple"),utils=require("./utils"),NoFilter=require("nofilter"),{BigNumber:BigNumber,MT:MT,NUMBYTES:NUMBYTES,SIMPLE:SIMPLE,SYMS:SYMS,BI:BI,BN:BN}=require("./constants"),COUNT=Symbol("count"),MAJOR=(Symbol("pending_key"),Symbol("major type")),ERROR=Symbol("error"),NOT_FOUND=Symbol("not found");function parentArray(parent,typ,count){const a=[];return a[COUNT]=count,a[SYMS.PARENT]=parent,a[MAJOR]=typ,a}function parentBufferStream(parent,typ){const b=new NoFilter;return b[COUNT]=-1,b[SYMS.PARENT]=parent,b[MAJOR]=typ,b}function _tag_2(v){return utils.bufferToBigInt(v)}function _tag_3(v){return BI.MINUS_ONE-utils.bufferToBigInt(v)}class UnexpectedDataError extends Error{constructor(byte,value){super(`Unexpected data: 0x${byte.toString(16)}`),this.name="UnexpectedDataError",this.byte=byte,this.value=value}}function normalizeOptions(opts,cb){switch(typeof opts){case"function":return{options:{},cb:opts};case"string":return{options:{encoding:opts},cb:cb};case"object":return{options:opts||{},cb:cb};default:throw new TypeError("Unknown option type")}}class Decoder extends BinaryParseStream{constructor(options={}){const{tags:tags={},max_depth:max_depth=-1,bigint:bigint=!0,preferWeb:preferWeb=!1,required:required=!1,encoding:encoding="hex",extendedResults:extendedResults=!1,...superOpts}=options;super({defaultEncoding:encoding,...superOpts}),this.running=!0,this.max_depth=max_depth,this.tags=tags,this.preferWeb=preferWeb,this.extendedResults=extendedResults,this.bigint=bigint,extendedResults&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new NoFilter),bigint&&(null==this.tags[2]&&(this.tags[2]=_tag_2),null==this.tags[3]&&(this.tags[3]=_tag_3))}static nullcheck(val){switch(val){case SYMS.NULL:return null;case SYMS.UNDEFINED:return;case NOT_FOUND:throw new Error("Value not found");default:return val}}static decodeFirstSync(input,options={}){if(null==input)throw new TypeError("input required");({options:options}=normalizeOptions(options));const{encoding:encoding="hex",...opts}=options,c=new Decoder(opts),s=utils.guessEncoding(input,encoding),parser=c._parse();let val,state=parser.next();for(;!state.done;){const b=s.read(state.value);if(null==b||b.length!==state.value)throw new Error("Insufficient data");c.extendedResults&&c.valueBytes.write(b),state=parser.next(b)}if(c.extendedResults)val=state.value,val.unused=s.read();else if(val=Decoder.nullcheck(state.value),s.length>0){const nextByte=s.read(1);throw s.unshift(nextByte),new UnexpectedDataError(nextByte[0],val)}return val}static decodeAllSync(input,options={}){if(null==input)throw new TypeError("input required");({options:options}=normalizeOptions(options));const{encoding:encoding="hex",...opts}=options,c=new Decoder(opts),s=utils.guessEncoding(input,encoding),res=[];for(;s.length>0;){const parser=c._parse();let state=parser.next();for(;!state.done;){const b=s.read(state.value);if(null==b||b.length!==state.value)throw new Error("Insufficient data");c.extendedResults&&c.valueBytes.write(b),state=parser.next(b)}res.push(Decoder.nullcheck(state.value))}return res}static decodeFirst(input,options={},cb){if(null==input)throw new TypeError("input required");({options:options,cb:cb}=normalizeOptions(options,cb));const{encoding:encoding="hex",required:required=!1,...opts}=options,c=new Decoder(opts);let v=NOT_FOUND;const s=utils.guessEncoding(input,encoding),p=new Promise(((resolve,reject)=>{c.on("data",(val=>{v=Decoder.nullcheck(val),c.close()})),c.once("error",(er=>c.extendedResults&&er instanceof UnexpectedDataError?(v.unused=c.bs.slice(),resolve(v)):(v!==NOT_FOUND&&(er.value=v),v=ERROR,c.close(),reject(er)))),c.once("end",(()=>{switch(v){case NOT_FOUND:return required?reject(new Error("No CBOR found")):resolve(v);case ERROR:return;default:return resolve(v)}}))}));return"function"==typeof cb&&p.then((v=>cb(null,v)),cb),s.pipe(c),p}static decodeAll(input,options={},cb){if(null==input)throw new TypeError("input required");({options:options,cb:cb}=normalizeOptions(options,cb));const{encoding:encoding="hex",...opts}=options,c=new Decoder(opts),vals=[];c.on("data",(val=>vals.push(Decoder.nullcheck(val))));const p=new Promise(((resolve,reject)=>{c.on("error",reject),c.on("end",(()=>resolve(vals)))}));return"function"==typeof cb&&p.then((v=>cb(void 0,v)),(er=>cb(er,void 0))),utils.guessEncoding(input,encoding).pipe(c),p}close(){this.running=!1,this.__fresh=!0}_onRead(data){this.valueBytes.write(data)}*_parse(){let parent=null,depth=0,val=null;for(;;){if(this.max_depth>=0&&depth>this.max_depth)throw new Error("Maximum depth "+this.max_depth+" exceeded");const octet=(yield 1)[0];if(!this.running)throw this.bs.unshift(Buffer.from([octet])),new UnexpectedDataError(octet);const mt=octet>>5,ai=31&octet,parent_major=null!=parent?parent[MAJOR]:void 0,parent_length=null!=parent?parent.length:void 0;switch(ai){case NUMBYTES.ONE:this.emit("more-bytes",mt,1,parent_major,parent_length),val=(yield 1)[0];break;case NUMBYTES.TWO:case NUMBYTES.FOUR:case NUMBYTES.EIGHT:const numbytes=1<this.stream_errors?(er&&this._on_error(er),cb()):cb(er)))}static diagnose(input,options={},cb){if(null==input)throw new Error("input required");({options:options,cb:cb}=function(opts,cb){switch(typeof opts){case"function":return{options:{},cb:opts};case"string":return{options:{encoding:opts},cb:cb};case"object":return{options:opts||{},cb:cb};default:throw new TypeError("Unknown option type")}}(options,cb));const{encoding:encoding="hex",...opts}=options,bs=new NoFilter,d=new Diagnose(opts);let p=null;return"function"==typeof cb?(d.on("end",(()=>cb(null,bs.toString("utf8")))),d.on("error",cb)):p=new Promise(((resolve,reject)=>(d.on("end",(()=>resolve(bs.toString("utf8")))),d.on("error",reject)))),d.pipe(bs),utils.guessEncoding(input,encoding).pipe(d),p}_on_error(er){return this.stream_errors?this.push(er.toString()):this.emit("error",er)}_on_more(mt,len,parent_mt,pos){if(mt===MT.SIMPLE_FLOAT)return this.float_bytes={2:1,4:2,8:3}[len]}_fore(parent_mt,pos){switch(parent_mt){case MT.BYTE_STRING:case MT.UTF8_STRING:case MT.ARRAY:if(pos>0)return this.push(", ");break;case MT.MAP:if(pos>0)return pos%2?this.push(": "):this.push(", ")}}_on_value(val,parent_mt,pos){if(val===SYMS.BREAK)return;this._fore(parent_mt,pos);const fb=this.float_bytes;return this.float_bytes=-1,this.push(utils.cborValueToString(val,fb))}_on_start(mt,tag,parent_mt,pos){switch(this._fore(parent_mt,pos),mt){case MT.TAG:this.push(`${tag}(`);break;case MT.ARRAY:this.push("[");break;case MT.MAP:this.push("{");break;case MT.BYTE_STRING:case MT.UTF8_STRING:this.push("(")}if(tag===SYMS.STREAM)return this.push("_ ")}_on_stop(mt){switch(mt){case MT.TAG:return this.push(")");case MT.ARRAY:return this.push("]");case MT.MAP:return this.push("}");case MT.BYTE_STRING:case MT.UTF8_STRING:return this.push(")")}}_on_data(){return this.push(this.separator)}}module.exports=Diagnose},{"./constants":55,"./decoder":56,"./simple":60,"./utils":62,nofilter:64,stream:30,util:51}],58:[function(require,module,exports){(function(Buffer){(function(){"use strict";const stream=require("stream"),NoFilter=(require("url"),require("nofilter")),utils=(require("./tagged"),require("./simple"),require("./utils")),{BigNumber:BigNumber,MT:MT,NUMBYTES:NUMBYTES,SHIFT32:SHIFT32,SIMPLE:SIMPLE,SYMS:SYMS,TAG:TAG,BI:BI,BN:BN}=require("./constants"),HALF=MT.SIMPLE_FLOAT<<5|NUMBYTES.TWO,FLOAT=MT.SIMPLE_FLOAT<<5|NUMBYTES.FOUR,DOUBLE=MT.SIMPLE_FLOAT<<5|NUMBYTES.EIGHT,TRUE=MT.SIMPLE_FLOAT<<5|SIMPLE.TRUE,FALSE=MT.SIMPLE_FLOAT<<5|SIMPLE.FALSE,UNDEFINED=MT.SIMPLE_FLOAT<<5|SIMPLE.UNDEFINED,NULL=MT.SIMPLE_FLOAT<<5|SIMPLE.NULL,BREAK=Buffer.from([255]),BUF_NAN=Buffer.from("f97e00","hex"),BUF_INF_NEG=Buffer.from("f9fc00","hex"),BUF_INF_POS=Buffer.from("f97c00","hex"),BUF_NEG_ZERO=Buffer.from("f98000","hex"),LOOP_DETECT=Symbol("CBOR_LOOP_DETECT");class Encoder extends stream.Transform{constructor(options={}){const{canonical:canonical=!1,encodeUndefined:encodeUndefined,disallowUndefinedKeys:disallowUndefinedKeys=!1,dateType:dateType="number",collapseBigIntegers:collapseBigIntegers=!1,detectLoops:detectLoops=!1,genTypes:genTypes=[],...superOpts}=options;if(super({...superOpts,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=canonical,this.encodeUndefined=encodeUndefined,this.disallowUndefinedKeys=disallowUndefinedKeys,this.dateType=function(str){if(!str)return"number";switch(str.toLowerCase()){case"number":return"number";case"float":return"float";case"int":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${str}"`)}(dateType),this.collapseBigIntegers=!!this.canonical||collapseBigIntegers,this.detectLoops="symbol"==typeof detectLoops?detectLoops:detectLoops?Symbol("CBOR_DETECT"):null,this.semanticTypes={Array:this._pushArray,Date:this._pushDate,Buffer:this._pushBuffer,Map:this._pushMap,NoFilter:this._pushNoFilter,RegExp:this._pushRegexp,Set:this._pushSet,BigNumber:this._pushBigNumber,ArrayBuffer:this._pushUint8Array,Uint8ClampedArray:this._pushUint8Array,Uint8Array:this._pushUint8Array,Uint16Array:this._pushArray,Uint32Array:this._pushArray,Int8Array:this._pushArray,Int16Array:this._pushArray,Int32Array:this._pushArray,Float32Array:this._pushFloat32Array,Float64Array:this._pushFloat64Array,Url:this._pushUrl,URL:this._pushURL},Array.isArray(genTypes))for(let i=0,len=genTypes.length;i{enc.pushAny(a);const a_cbor=bs.read();enc.pushAny(b);const b_cbor=bs.read();return a_cbor.compare(b_cbor)}));for(const[k,v]of entries){if(gen.disallowUndefinedKeys&&void 0===k)throw new Error("Invalid Map key: undefined");if(!gen.pushAny(k)||!gen.pushAny(v))return!1}}else for(const[k,v]of obj){if(gen.disallowUndefinedKeys&&void 0===k)throw new Error("Invalid Map key: undefined");if(!gen.pushAny(k)||!gen.pushAny(v))return!1}return!(opts.indefinite&&!gen.push(BREAK))}_pushUint8Array(gen,obj){return gen._pushBuffer(gen,Buffer.from(obj))}_pushFloat32Array(gen,obj){const len=obj.length;if(!gen._pushInt(len,MT.ARRAY))return!1;for(let j=0;j"function"!=typeof obj[k])),cbor_keys={};if(this.canonical&&keys.sort(((a,b)=>{const a_cbor=cbor_keys[a]||(cbor_keys[a]=Encoder.encode(a)),b_cbor=cbor_keys[b]||(cbor_keys[b]=Encoder.encode(b));return a_cbor.compare(b_cbor)})),opts.indefinite){if(!this._pushUInt8(MT.MAP<<5|NUMBYTES.INDEFINITE))return!1}else if(!this._pushInt(keys.length,MT.MAP))return!1;let ck;for(let j=0,len2=keys.length;j{const bufs=[],enc=new Encoder(options);enc.on("data",(buf=>bufs.push(buf))),enc.on("error",reject),enc.on("finish",(()=>resolve(Buffer.concat(bufs)))),enc.pushAny(obj),enc.end()}))}}module.exports=Encoder}).call(this)}).call(this,require("buffer").Buffer)},{"./constants":55,"./simple":60,"./tagged":61,"./utils":62,buffer:5,nofilter:64,stream:30,url:46}],59:[function(require,module,exports){(function(Buffer){(function(){"use strict";const encoder=require("./encoder"),decoder=require("./decoder"),MT=require("./constants").MT;class CborMap extends Map{constructor(iterable){super(iterable)}static _encode(key){return encoder.encodeCanonical(key).toString("base64")}static _decode(key){return decoder.decodeFirstSync(key,"base64")}get(key){return super.get(CborMap._encode(key))}set(key,val){return super.set(CborMap._encode(key),val)}delete(key){return super.delete(CborMap._encode(key))}has(key){return super.has(CborMap._encode(key))}*keys(){for(const k of super.keys())yield CborMap._decode(k)}*entries(){for(const kv of super.entries())yield[CborMap._decode(kv[0]),kv[1]]}[Symbol.iterator](){return this.entries()}forEach(fun,thisArg){if("function"!=typeof fun)throw new TypeError("Must be function");for(const kv of super.entries())fun.call(this,kv[1],CborMap._decode(kv[0]),this)}encodeCBOR(gen){if(!gen._pushInt(this.size,MT.MAP))return!1;if(gen.canonical){const entries=Array.from(super.entries()).map((kv=>[Buffer.from(kv[0],"base64"),kv[1]]));entries.sort(((a,b)=>a[0].compare(b[0])));for(const kv of entries)if(!gen.push(kv[0])||!gen.pushAny(kv[1]))return!1}else for(const kv of super.entries())if(!gen.push(Buffer.from(kv[0],"base64"))||!gen.pushAny(kv[1]))return!1;return!0}}module.exports=CborMap}).call(this)}).call(this,require("buffer").Buffer)},{"./constants":55,"./decoder":56,"./encoder":58,buffer:5}],60:[function(require,module,exports){"use strict";const util=require("util"),constants=require("./constants"),MT=constants.MT,SIMPLE=constants.SIMPLE,SYMS=constants.SYMS;class Simple{constructor(value){if("number"!=typeof value)throw new Error("Invalid Simple type: "+typeof value);if(value<0||value>255||(0|value)!==value)throw new Error("value must be a small positive integer: "+value);this.value=value}toString(){return"simple("+this.value+")"}[util.inspect.custom](depth,opts){return"simple("+this.value+")"}inspect(depth,opts){return"simple("+this.value+")"}encodeCBOR(gen){return gen._pushInt(this.value,MT.SIMPLE_FLOAT)}static isSimple(obj){return obj instanceof Simple}static decode(val,has_parent=!0,parent_indefinite=!1){switch(val){case SIMPLE.FALSE:return!1;case SIMPLE.TRUE:return!0;case SIMPLE.NULL:return has_parent?null:SYMS.NULL;case SIMPLE.UNDEFINED:return has_parent?void 0:SYMS.UNDEFINED;case-1:if(!has_parent||!parent_indefinite)throw new Error("Invalid BREAK");return SYMS.BREAK;default:return new Simple(val)}}}module.exports=Simple},{"./constants":55,util:51}],61:[function(require,module,exports){"use strict";const url=require("url"),{BigNumber:BigNumber,BN:BN}=require("./constants"),utils=require("./utils");class Tagged{constructor(tag,value,err){if(this.tag=tag,this.value=value,this.err=err,"number"!=typeof this.tag)throw new Error("Invalid tag type ("+typeof this.tag+")");if(this.tag<0||(0|this.tag)!==this.tag)throw new Error("Tag must be a positive integer: "+this.tag)}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(gen){return gen._pushTag(this.tag),gen.pushAny(this.value)}convert(converters){let f=null!=converters?converters[this.tag]:void 0;if("function"!=typeof f&&(f=Tagged["_tag_"+this.tag],"function"!=typeof f))return this;try{return f.call(Tagged,this.value)}catch(error){return this.err=error,this}}static _tag_0(v){return new Date(v)}static _tag_1(v){return new Date(1e3*v)}static _tag_2(v){return utils.bufferToBignumber(v)}static _tag_3(v){return BN.MINUS_ONE.minus(utils.bufferToBignumber(v))}static _tag_4(v){return new BigNumber(v[1]).shiftedBy(v[0])}static _tag_5(v){return BN.TWO.pow(v[0]).times(v[1])}static _tag_32(v){return url.parse(v)}static _tag_35(v){return new RegExp(v)}}module.exports=Tagged},{"./constants":55,"./utils":62,url:46}],62:[function(require,module,exports){(function(Buffer){(function(){"use strict";const NoFilter=require("nofilter"),stream=require("stream"),util=require("util"),{BigNumber:BigNumber,NUMBYTES:NUMBYTES,SHIFT32:SHIFT32,BI:BI,SYMS:SYMS}=require("./constants"),td=new("function"==typeof TextDecoder?TextDecoder:util.TextDecoder)("utf8",{fatal:!0,ignoreBOM:!0});exports.utf8=buf=>td.decode(buf),exports.utf8.checksUTF8=!0,exports.parseCBORint=function(ai,buf,bigInt=!0){switch(ai){case NUMBYTES.ONE:return buf.readUInt8(0);case NUMBYTES.TWO:return buf.readUInt16BE(0);case NUMBYTES.FOUR:return buf.readUInt32BE(0);case NUMBYTES.EIGHT:const f=buf.readUInt32BE(0),g=buf.readUInt32BE(4);return f>2097151?bigInt?BigInt(f)*BI.SHIFT32+BigInt(g):new BigNumber(f).times(SHIFT32).plus(g):f*SHIFT32+g;default:throw new Error("Invalid additional info for int: "+ai)}},exports.writeHalf=function(buf,half){const u32=Buffer.allocUnsafe(4);u32.writeFloatBE(half,0);const u=u32.readUInt32BE(0);if(0!=(8191&u))return!1;let s16=u>>16&32768;const exp=u>>23&255,mant=8388607&u;if(exp>=113&&exp<=142)s16+=(exp-112<<10)+(mant>>13);else{if(!(exp>=103&&exp<113))return!1;if(mant&(1<<126-exp)-1)return!1;s16+=mant+8388608>>126-exp}return buf.writeUInt16BE(s16),!0},exports.parseHalf=function(buf){const sign=128&buf[0]?-1:1,exp=(124&buf[0])>>2,mant=(3&buf[0])<<8|buf[1];return exp?31===exp?sign*(mant?NaN:Infinity):sign*Math.pow(2,exp-25)*(1024+mant):5.960464477539063e-8*sign*mant},exports.parseCBORfloat=function(buf){switch(buf.length){case 2:return exports.parseHalf(buf);case 4:return buf.readFloatBE(0);case 8:return buf.readDoubleBE(0);default:throw new Error("Invalid float size: "+buf.length)}},exports.hex=function(s){return Buffer.from(s.replace(/^0x/,""),"hex")},exports.bin=function(s){let start=0,end=(s=s.replace(/\s/g,"")).length%8||8;const chunks=[];for(;end<=s.length;)chunks.push(parseInt(s.slice(start,end),2)),start=end,end+=8;return Buffer.from(chunks)},exports.arrayEqual=function(a,b){return null==a&&null==b||null!=a&&null!=b&&(a.length===b.length&&a.every(((elem,i)=>elem===b[i])))},exports.bufferEqual=function(a,b){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)||a.length!==b.length)return!1;const len=a.length;let i,j,ret=!0;for(i=j=0;j0?util.inspect(val)+"_"+float_bytes:util.inspect(val)}if(Buffer.isBuffer(val)){const hex=val.toString("hex");return float_bytes===-1/0?hex:`h'${hex}'`}return BigNumber.isBigNumber(val)?val.toString():util.inspect(val)},exports.guessEncoding=function(input,encoding){if("string"==typeof input)return new NoFilter(input,null!=encoding?encoding:"hex");if(Buffer.isBuffer(input))return new NoFilter(input);if(ArrayBuffer.isView(input))return new NoFilter(Buffer.from(input.buffer,input.byteOffset,input.byteLength));if(input instanceof ArrayBuffer)return new NoFilter(Buffer.from(input));if(input instanceof stream.Readable)return input;throw new Error("Unknown input type")}}).call(this)}).call(this,require("buffer").Buffer)},{"./constants":55,buffer:5,nofilter:64,stream:30,util:51}],63:[function(require,module,exports){!function(globalObject){"use strict";var BigNumber,isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],MAX=1e9;function bitFloor(n){var i=0|n;return n>0||n===i?i:i-1}function coeffToString(a){for(var s,z,i=1,j=a.length,r=a[0]+"";il^a?1:-1;for(j=(k=xc.length)<(l=yc.length)?k:l,i=0;iyc[i]^a?1:-1;return k==l?0:k>l^a?1:-1}function intCheck(n,min,max,name){if(nmax||n!==mathfloor(n))throw Error(bignumberError+(name||"Argument")+("number"==typeof n?nmax?" out of range: ":" not an integer: ":" not a primitive number: ")+String(n))}function isOdd(n){var k=n.c.length-1;return bitFloor(n.e/14)==k&&n.c[k]%2!=0}function toExponential(str,e){return(str.length>1?str.charAt(0)+"."+str.slice(1):str)+(e<0?"e":"e+")+e}function toFixedPoint(str,e,z){var len,zs;if(e<0){for(zs=z+".";++e;zs+=z);str=zs+str}else if(++e>(len=str.length)){for(zs=z,e-=len;--e;zs+=z);str+=zs}else eMAX_EXP?x.c=x.e=null:v.e=10;i/=10,e++);return void(e>MAX_EXP?x.c=x.e=null:(x.e=e,x.c=[v]))}str=String(v)}else{if(!isNumeric.test(str=String(v)))return parseNumeric(x,str,isNum);x.s=45==str.charCodeAt(0)?(str=str.slice(1),-1):1}(e=str.indexOf("."))>-1&&(str=str.replace(".","")),(i=str.search(/e/i))>0?(e<0&&(e=i),e+=+str.slice(i+1),str=str.substring(0,i)):e<0&&(e=str.length)}else{if(intCheck(b,2,ALPHABET.length,"Base"),10==b)return round(x=new BigNumber(v),DECIMAL_PLACES+x.e+1,ROUNDING_MODE);if(str=String(v),isNum="number"==typeof v){if(0*v!=0)return parseNumeric(x,str,isNum,b);if(x.s=1/v<0?(str=str.slice(1),-1):1,BigNumber.DEBUG&&str.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+v)}else x.s=45===str.charCodeAt(0)?(str=str.slice(1),-1):1;for(alphabet=ALPHABET.slice(0,b),e=i=0,len=str.length;ie){e=len;continue}}else if(!caseChanged&&(str==str.toUpperCase()&&(str=str.toLowerCase())||str==str.toLowerCase()&&(str=str.toUpperCase()))){caseChanged=!0,i=-1,e=0;continue}return parseNumeric(x,String(v),isNum,b)}isNum=!1,(e=(str=convertBase(str,b,10,x.s)).indexOf("."))>-1?str=str.replace(".",""):e=str.length}for(i=0;48===str.charCodeAt(i);i++);for(len=str.length;48===str.charCodeAt(--len););if(str=str.slice(i,++len)){if(len-=i,isNum&&BigNumber.DEBUG&&len>15&&(v>9007199254740991||v!==mathfloor(v)))throw Error(tooManyDigits+x.s*v);if((e=e-i-1)>MAX_EXP)x.c=x.e=null;else if(e=TO_EXP_POS)?toExponential(str,ne):toFixedPoint(str,ne,"0");else if(e=(n=round(new BigNumber(n),i,rm)).e,len=(str=coeffToString(n.c)).length,1==id||2==id&&(i<=e||e<=TO_EXP_NEG)){for(;lenlen){if(--i>0)for(str+=".";i--;str+="0");}else if((i+=e-len)>0)for(e+1==len&&(str+=".");i--;str+="0");return n.s<0&&c0?"-"+str:str}function maxOrMin(args,method){for(var n,i=1,m=new BigNumber(args[0]);i=10;j/=10,i++);return(e=i+14*e-1)>MAX_EXP?n.c=n.e=null:e=10;k/=10,d++);if((i=sd-d)<0)i+=14,j=sd,rd=(n=xc[ni=0])/pows10[d-j-1]%10|0;else if((ni=mathceil((i+1)/14))>=xc.length){if(!r)break out;for(;xc.length<=ni;xc.push(0));n=rd=0,d=1,j=(i%=14)-14+1}else{for(n=k=xc[ni],d=1;k>=10;k/=10,d++);rd=(j=(i%=14)-14+d)<0?0:n/pows10[d-j-1]%10|0}if(r=r||sd<0||null!=xc[ni+1]||(j<0?n:n%pows10[d-j-1]),r=rm<4?(rd||r)&&(0==rm||rm==(x.s<0?3:2)):rd>5||5==rd&&(4==rm||r||6==rm&&(i>0?j>0?n/pows10[d-j]:0:xc[ni-1])%10&1||rm==(x.s<0?8:7)),sd<1||!xc[0])return xc.length=0,r?(sd-=x.e+1,xc[0]=pows10[(14-sd%14)%14],x.e=-sd||0):xc[0]=x.e=0,x;if(0==i?(xc.length=ni,k=1,ni--):(xc.length=ni+1,k=pows10[14-i],xc[ni]=j>0?mathfloor(n/pows10[d-j]%pows10[j])*k:0),r)for(;;){if(0==ni){for(i=1,j=xc[0];j>=10;j/=10,i++);for(j=xc[0]+=k,k=1;j>=10;j/=10,k++);i!=k&&(x.e++,xc[0]==BASE&&(xc[0]=1));break}if(xc[ni]+=k,xc[ni]!=BASE)break;xc[ni--]=0,k=1}for(i=xc.length;0===xc[--i];xc.pop());}x.e>MAX_EXP?x.c=x.e=null:x.e=TO_EXP_POS?toExponential(str,e):toFixedPoint(str,e,"0"),n.s<0?"-"+str:str)}return BigNumber.clone=clone,BigNumber.ROUND_UP=0,BigNumber.ROUND_DOWN=1,BigNumber.ROUND_CEIL=2,BigNumber.ROUND_FLOOR=3,BigNumber.ROUND_HALF_UP=4,BigNumber.ROUND_HALF_DOWN=5,BigNumber.ROUND_HALF_EVEN=6,BigNumber.ROUND_HALF_CEIL=7,BigNumber.ROUND_HALF_FLOOR=8,BigNumber.EUCLID=9,BigNumber.config=BigNumber.set=function(obj){var p,v;if(null!=obj){if("object"!=typeof obj)throw Error(bignumberError+"Object expected: "+obj);if(obj.hasOwnProperty(p="DECIMAL_PLACES")&&(intCheck(v=obj[p],0,MAX,p),DECIMAL_PLACES=v),obj.hasOwnProperty(p="ROUNDING_MODE")&&(intCheck(v=obj[p],0,8,p),ROUNDING_MODE=v),obj.hasOwnProperty(p="EXPONENTIAL_AT")&&((v=obj[p])&&v.pop?(intCheck(v[0],-MAX,0,p),intCheck(v[1],0,MAX,p),TO_EXP_NEG=v[0],TO_EXP_POS=v[1]):(intCheck(v,-MAX,MAX,p),TO_EXP_NEG=-(TO_EXP_POS=v<0?-v:v))),obj.hasOwnProperty(p="RANGE"))if((v=obj[p])&&v.pop)intCheck(v[0],-MAX,-1,p),intCheck(v[1],1,MAX,p),MIN_EXP=v[0],MAX_EXP=v[1];else{if(intCheck(v,-MAX,MAX,p),!v)throw Error(bignumberError+p+" cannot be zero: "+v);MIN_EXP=-(MAX_EXP=v<0?-v:v)}if(obj.hasOwnProperty(p="CRYPTO")){if((v=obj[p])!==!!v)throw Error(bignumberError+p+" not true or false: "+v);if(v){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw CRYPTO=!v,Error(bignumberError+"crypto unavailable");CRYPTO=v}else CRYPTO=v}if(obj.hasOwnProperty(p="MODULO_MODE")&&(intCheck(v=obj[p],0,9,p),MODULO_MODE=v),obj.hasOwnProperty(p="POW_PRECISION")&&(intCheck(v=obj[p],0,MAX,p),POW_PRECISION=v),obj.hasOwnProperty(p="FORMAT")){if("object"!=typeof(v=obj[p]))throw Error(bignumberError+p+" not an object: "+v);FORMAT=v}if(obj.hasOwnProperty(p="ALPHABET")){if("string"!=typeof(v=obj[p])||/^.?$|[+\-.\s]|(.).*\1/.test(v))throw Error(bignumberError+p+" invalid: "+v);ALPHABET=v}}return{DECIMAL_PLACES:DECIMAL_PLACES,ROUNDING_MODE:ROUNDING_MODE,EXPONENTIAL_AT:[TO_EXP_NEG,TO_EXP_POS],RANGE:[MIN_EXP,MAX_EXP],CRYPTO:CRYPTO,MODULO_MODE:MODULO_MODE,POW_PRECISION:POW_PRECISION,FORMAT:FORMAT,ALPHABET:ALPHABET}},BigNumber.isBigNumber=function(v){if(!v||!0!==v._isBigNumber)return!1;if(!BigNumber.DEBUG)return!0;var i,n,c=v.c,e=v.e,s=v.s;out:if("[object Array]"=={}.toString.call(c)){if((1===s||-1===s)&&e>=-MAX&&e<=MAX&&e===mathfloor(e)){if(0===c[0]){if(0===e&&1===c.length)return!0;break out}if((i=(e+1)%14)<1&&(i+=14),String(c[0]).length==i){for(i=0;i=BASE||n!==mathfloor(n))break out;if(0!==n)return!0}}}else if(null===c&&null===e&&(null===s||1===s||-1===s))return!0;throw Error(bignumberError+"Invalid BigNumber: "+v)},BigNumber.maximum=BigNumber.max=function(){return maxOrMin(arguments,P.lt)},BigNumber.minimum=BigNumber.min=function(){return maxOrMin(arguments,P.gt)},BigNumber.random=(random53bitInt=9007199254740992*Math.random()&2097151?function(){return mathfloor(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(dp){var a,b,e,k,v,i=0,c=[],rand=new BigNumber(ONE);if(null==dp?dp=DECIMAL_PLACES:intCheck(dp,0,MAX),k=mathceil(dp/14),CRYPTO)if(crypto.getRandomValues){for(a=crypto.getRandomValues(new Uint32Array(k*=2));i>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),a[i]=b[0],a[i+1]=b[1]):(c.push(v%1e14),i+=2);i=k/2}else{if(!crypto.randomBytes)throw CRYPTO=!1,Error(bignumberError+"crypto unavailable");for(a=crypto.randomBytes(k*=7);i=9e15?crypto.randomBytes(7).copy(a,i):(c.push(v%1e14),i+=7);i=k/7}if(!CRYPTO)for(;i=10;v/=10,i++);i<14&&(e-=14-i)}return rand.e=e,rand.c=c,rand}),BigNumber.sum=function(){for(var i=1,args=arguments,sum=new BigNumber(args[0]);ibaseOut-1&&(null==arr[j+1]&&(arr[j+1]=0),arr[j+1]+=arr[j]/baseOut|0,arr[j]%=baseOut)}return arr.reverse()}return function(str,baseIn,baseOut,sign,callerIsToString){var alphabet,d,e,k,r,x,xc,y,i=str.indexOf("."),dp=DECIMAL_PLACES,rm=ROUNDING_MODE;for(i>=0&&(k=POW_PRECISION,POW_PRECISION=0,str=str.replace(".",""),x=(y=new BigNumber(baseIn)).pow(str.length-i),POW_PRECISION=k,y.c=toBaseOut(toFixedPoint(coeffToString(x.c),x.e,"0"),10,baseOut,"0123456789"),y.e=y.c.length),e=k=(xc=toBaseOut(str,baseIn,baseOut,callerIsToString?(alphabet=ALPHABET,"0123456789"):(alphabet="0123456789",ALPHABET))).length;0==xc[--k];xc.pop());if(!xc[0])return alphabet.charAt(0);if(i<0?--e:(x.c=xc,x.e=e,x.s=sign,xc=(x=div(x,y,dp,rm,baseOut)).c,r=x.r,e=x.e),i=xc[d=e+dp+1],k=baseOut/2,r=r||d<0||null!=xc[d+1],r=rm<4?(null!=i||r)&&(0==rm||rm==(x.s<0?3:2)):i>k||i==k&&(4==rm||r||6==rm&&1&xc[d-1]||rm==(x.s<0?8:7)),d<1||!xc[0])str=r?toFixedPoint(alphabet.charAt(1),-dp,alphabet.charAt(0)):alphabet.charAt(0);else{if(xc.length=d,r)for(--baseOut;++xc[--d]>baseOut;)xc[d]=0,d||(++e,xc=[1].concat(xc));for(k=xc.length;!xc[--k];);for(i=0,str="";i<=k;str+=alphabet.charAt(xc[i++]));str=toFixedPoint(str,e,alphabet.charAt(0))}return str}}(),div=function(){function multiply(x,k,base){var m,temp,xlo,xhi,carry=0,i=x.length,klo=k%1e7,khi=k/1e7|0;for(x=x.slice();i--;)carry=((temp=klo*(xlo=x[i]%1e7)+(m=khi*xlo+(xhi=x[i]/1e7|0)*klo)%1e7*1e7+carry)/base|0)+(m/1e7|0)+khi*xhi,x[i]=temp%base;return carry&&(x=[carry].concat(x)),x}function compare(a,b,aL,bL){var i,cmp;if(aL!=bL)cmp=aL>bL?1:-1;else for(i=cmp=0;ib[i]?1:-1;break}return cmp}function subtract(a,b,aL,base){for(var i=0;aL--;)a[aL]-=i,i=a[aL]1;a.splice(0,1));}return function(x,y,dp,rm,base){var cmp,e,i,more,n,prod,prodL,q,qc,rem,remL,rem0,xi,xL,yc0,yL,yz,s=x.s==y.s?1:-1,xc=x.c,yc=y.c;if(!(xc&&xc[0]&&yc&&yc[0]))return new BigNumber(x.s&&y.s&&(xc?!yc||xc[0]!=yc[0]:yc)?xc&&0==xc[0]||!yc?0*s:s/0:NaN);for(qc=(q=new BigNumber(s)).c=[],s=dp+(e=x.e-y.e)+1,base||(base=BASE,e=bitFloor(x.e/14)-bitFloor(y.e/14),s=s/14|0),i=0;yc[i]==(xc[i]||0);i++);if(yc[i]>(xc[i]||0)&&e--,s<0)qc.push(1),more=!0;else{for(xL=xc.length,yL=yc.length,i=0,s+=2,(n=mathfloor(base/(yc[0]+1)))>1&&(yc=multiply(yc,n,base),xc=multiply(xc,n,base),yL=yc.length,xL=xc.length),xi=yL,remL=(rem=xc.slice(0,yL)).length;remL=base/2&&yc0++;do{if(n=0,(cmp=compare(yc,rem,yL,remL))<0){if(rem0=rem[0],yL!=remL&&(rem0=rem0*base+(rem[1]||0)),(n=mathfloor(rem0/yc0))>1)for(n>=base&&(n=base-1),prodL=(prod=multiply(yc,n,base)).length,remL=rem.length;1==compare(prod,rem,prodL,remL);)n--,subtract(prod,yL=10;s/=10,i++);round(q,dp+(q.e=i+14*e-1)+1,rm,more)}else q.e=e,q.r=+more;return q}}(),basePrefix=/^(-?)0([xbo])(?=\w[\w.]*$)/i,dotAfter=/^([^.]+)\.$/,dotBefore=/^\.([^.]+)$/,isInfinityOrNaN=/^-?(Infinity|NaN)$/,whitespaceOrPlus=/^\s*\+(?=[\w.])|^\s+|\s+$/g,parseNumeric=function(x,str,isNum,b){var base,s=isNum?str:str.replace(whitespaceOrPlus,"");if(isInfinityOrNaN.test(s))x.s=isNaN(s)?null:s<0?-1:1;else{if(!isNum&&(s=s.replace(basePrefix,(function(m,p1,p2){return base="x"==(p2=p2.toLowerCase())?16:"b"==p2?2:8,b&&b!=base?m:p1})),b&&(base=b,s=s.replace(dotAfter,"$1").replace(dotBefore,"0.$1")),str!=s))return new BigNumber(s,base);if(BigNumber.DEBUG)throw Error(bignumberError+"Not a"+(b?" base "+b:"")+" number: "+str);x.s=null}x.c=x.e=null},P.absoluteValue=P.abs=function(){var x=new BigNumber(this);return x.s<0&&(x.s=1),x},P.comparedTo=function(y,b){return compare(this,new BigNumber(y,b))},P.decimalPlaces=P.dp=function(dp,rm){var c,n,v,x=this;if(null!=dp)return intCheck(dp,0,MAX),null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(new BigNumber(x),dp+x.e+1,rm);if(!(c=x.c))return null;if(n=14*((v=c.length-1)-bitFloor(this.e/14)),v=c[v])for(;v%10==0;v/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(y,b){return div(this,new BigNumber(y,b),DECIMAL_PLACES,ROUNDING_MODE)},P.dividedToIntegerBy=P.idiv=function(y,b){return div(this,new BigNumber(y,b),0,1)},P.exponentiatedBy=P.pow=function(n,m){var half,isModExp,i,k,nIsBig,nIsNeg,nIsOdd,y,x=this;if((n=new BigNumber(n)).c&&!n.isInteger())throw Error(bignumberError+"Exponent not an integer: "+valueOf(n));if(null!=m&&(m=new BigNumber(m)),nIsBig=n.e>14,!x.c||!x.c[0]||1==x.c[0]&&!x.e&&1==x.c.length||!n.c||!n.c[0])return y=new BigNumber(Math.pow(+valueOf(x),nIsBig?2-isOdd(n):+valueOf(n))),m?y.mod(m):y;if(nIsNeg=n.s<0,m){if(m.c?!m.c[0]:!m.s)return new BigNumber(NaN);(isModExp=!nIsNeg&&x.isInteger()&&m.isInteger())&&(x=x.mod(m))}else{if(n.e>9&&(x.e>0||x.e<-1||(0==x.e?x.c[0]>1||nIsBig&&x.c[1]>=24e7:x.c[0]<8e13||nIsBig&&x.c[0]<=9999975e7)))return k=x.s<0&&isOdd(n)?-0:0,x.e>-1&&(k=1/k),new BigNumber(nIsNeg?1/k:k);POW_PRECISION&&(k=mathceil(POW_PRECISION/14+2))}for(nIsBig?(half=new BigNumber(.5),nIsNeg&&(n.s=1),nIsOdd=isOdd(n)):nIsOdd=(i=Math.abs(+valueOf(n)))%2,y=new BigNumber(ONE);;){if(nIsOdd){if(!(y=y.times(x)).c)break;k?y.c.length>k&&(y.c.length=k):isModExp&&(y=y.mod(m))}if(i){if(0===(i=mathfloor(i/2)))break;nIsOdd=i%2}else if(round(n=n.times(half),n.e+1,1),n.e>14)nIsOdd=isOdd(n);else{if(0===(i=+valueOf(n)))break;nIsOdd=i%2}x=x.times(x),k?x.c&&x.c.length>k&&(x.c.length=k):isModExp&&(x=x.mod(m))}return isModExp?y:(nIsNeg&&(y=ONE.div(y)),m?y.mod(m):k?round(y,POW_PRECISION,ROUNDING_MODE,undefined):y)},P.integerValue=function(rm){var n=new BigNumber(this);return null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(n,n.e+1,rm)},P.isEqualTo=P.eq=function(y,b){return 0===compare(this,new BigNumber(y,b))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(y,b){return compare(this,new BigNumber(y,b))>0},P.isGreaterThanOrEqualTo=P.gte=function(y,b){return 1===(b=compare(this,new BigNumber(y,b)))||0===b},P.isInteger=function(){return!!this.c&&bitFloor(this.e/14)>this.c.length-2},P.isLessThan=P.lt=function(y,b){return compare(this,new BigNumber(y,b))<0},P.isLessThanOrEqualTo=P.lte=function(y,b){return-1===(b=compare(this,new BigNumber(y,b)))||0===b},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(y,b){var i,j,t,xLTy,x=this,a=x.s;if(b=(y=new BigNumber(y,b)).s,!a||!b)return new BigNumber(NaN);if(a!=b)return y.s=-b,x.plus(y);var xe=x.e/14,ye=y.e/14,xc=x.c,yc=y.c;if(!xe||!ye){if(!xc||!yc)return xc?(y.s=-b,y):new BigNumber(yc?x:NaN);if(!xc[0]||!yc[0])return yc[0]?(y.s=-b,y):new BigNumber(xc[0]?x:3==ROUNDING_MODE?-0:0)}if(xe=bitFloor(xe),ye=bitFloor(ye),xc=xc.slice(),a=xe-ye){for((xLTy=a<0)?(a=-a,t=xc):(ye=xe,t=yc),t.reverse(),b=a;b--;t.push(0));t.reverse()}else for(j=(xLTy=(a=xc.length)<(b=yc.length))?a:b,a=b=0;b0)for(;b--;xc[i++]=0);for(b=BASE-1;j>a;){if(xc[--j]=0;){for(c=0,ylo=yc[i]%1e7,yhi=yc[i]/1e7|0,j=i+(k=xcL);j>i;)c=((xlo=ylo*(xlo=xc[--k]%1e7)+(m=yhi*xlo+(xhi=xc[k]/1e7|0)*ylo)%1e7*1e7+zc[j]+c)/base|0)+(m/1e7|0)+yhi*xhi,zc[j--]=xlo%base;zc[j]=c}return c?++e:zc.splice(0,1),normalise(y,zc,e)},P.negated=function(){var x=new BigNumber(this);return x.s=-x.s||null,x},P.plus=function(y,b){var t,x=this,a=x.s;if(b=(y=new BigNumber(y,b)).s,!a||!b)return new BigNumber(NaN);if(a!=b)return y.s=-b,x.minus(y);var xe=x.e/14,ye=y.e/14,xc=x.c,yc=y.c;if(!xe||!ye){if(!xc||!yc)return new BigNumber(a/0);if(!xc[0]||!yc[0])return yc[0]?y:new BigNumber(xc[0]?x:0*a)}if(xe=bitFloor(xe),ye=bitFloor(ye),xc=xc.slice(),a=xe-ye){for(a>0?(ye=xe,t=yc):(a=-a,t=xc),t.reverse();a--;t.push(0));t.reverse()}for((a=xc.length)-(b=yc.length)<0&&(t=yc,yc=xc,xc=t,b=a),a=0;b;)a=(xc[--b]=xc[b]+yc[b]+a)/BASE|0,xc[b]=BASE===xc[b]?0:xc[b]%BASE;return a&&(xc=[a].concat(xc),++ye),normalise(y,xc,ye)},P.precision=P.sd=function(sd,rm){var c,n,v,x=this;if(null!=sd&&sd!==!!sd)return intCheck(sd,1,MAX),null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(new BigNumber(x),sd,rm);if(!(c=x.c))return null;if(n=14*(v=c.length-1)+1,v=c[v]){for(;v%10==0;v/=10,n--);for(v=c[0];v>=10;v/=10,n++);}return sd&&x.e+1>n&&(n=x.e+1),n},P.shiftedBy=function(k){return intCheck(k,-9007199254740991,9007199254740991),this.times("1e"+k)},P.squareRoot=P.sqrt=function(){var m,n,r,rep,t,x=this,c=x.c,s=x.s,e=x.e,dp=DECIMAL_PLACES+4,half=new BigNumber("0.5");if(1!==s||!c||!c[0])return new BigNumber(!s||s<0&&(!c||c[0])?NaN:c?x:1/0);if(0==(s=Math.sqrt(+valueOf(x)))||s==1/0?(((n=coeffToString(c)).length+e)%2==0&&(n+="0"),s=Math.sqrt(+n),e=bitFloor((e+1)/2)-(e<0||e%2),r=new BigNumber(n=s==1/0?"5e"+e:(n=s.toExponential()).slice(0,n.indexOf("e")+1)+e)):r=new BigNumber(s+""),r.c[0])for((s=(e=r.e)+dp)<3&&(s=0);;)if(t=r,r=half.times(t.plus(div(x,t,dp,1))),coeffToString(t.c).slice(0,s)===(n=coeffToString(r.c)).slice(0,s)){if(r.e0&&len>0){for(i=len%g1||g1,intPart=intDigits.substr(0,i);i0&&(intPart+=groupSeparator+intDigits.slice(i)),isNeg&&(intPart="-"+intPart)}str=fractionPart?intPart+(format.decimalSeparator||"")+((g2=+format.fractionGroupSize)?fractionPart.replace(new RegExp("\\d{"+g2+"}\\B","g"),"$&"+(format.fractionGroupSeparator||"")):fractionPart):intPart}return(format.prefix||"")+str+(format.suffix||"")},P.toFraction=function(md){var d,d0,d1,d2,e,exp,n,n0,n1,q,r,s,x=this,xc=x.c;if(null!=md&&(!(n=new BigNumber(md)).isInteger()&&(n.c||1!==n.s)||n.lt(ONE)))throw Error(bignumberError+"Argument "+(n.isInteger()?"out of range: ":"not an integer: ")+valueOf(n));if(!xc)return new BigNumber(x);for(d=new BigNumber(ONE),n1=d0=new BigNumber(ONE),d1=n0=new BigNumber(ONE),s=coeffToString(xc),e=d.e=s.length-x.e-1,d.c[0]=POWS_TEN[(exp=e%14)<0?14+exp:exp],md=!md||n.comparedTo(d)>0?e>0?d:n1:n,exp=MAX_EXP,MAX_EXP=1/0,n=new BigNumber(s),n0.c[0]=0;q=div(n,d,0,1),1!=(d2=d0.plus(q.times(d1))).comparedTo(md);)d0=d1,d1=d2,n1=n0.plus(q.times(d2=n1)),n0=d2,d=n.minus(q.times(d2=d)),n=d2;return d2=div(md.minus(d0),d1,0,1),n0=n0.plus(d2.times(n1)),d0=d0.plus(d2.times(d1)),n0.s=n1.s=x.s,r=div(n1,d1,e*=2,ROUNDING_MODE).minus(x).abs().comparedTo(div(n0,d0,e,ROUNDING_MODE).minus(x).abs())<1?[n1,d1]:[n0,d0],MAX_EXP=exp,r},P.toNumber=function(){return+valueOf(this)},P.toPrecision=function(sd,rm){return null!=sd&&intCheck(sd,1,MAX),format(this,sd,rm,2)},P.toString=function(b){var str,n=this,s=n.s,e=n.e;return null===e?s?(str="Infinity",s<0&&(str="-"+str)):str="NaN":(null==b?str=e<=TO_EXP_NEG||e>=TO_EXP_POS?toExponential(coeffToString(n.c),e):toFixedPoint(coeffToString(n.c),e,"0"):10===b?str=toFixedPoint(coeffToString((n=round(new BigNumber(n),DECIMAL_PLACES+e+1,ROUNDING_MODE)).c),n.e,"0"):(intCheck(b,2,ALPHABET.length,"Base"),str=convertBase(toFixedPoint(coeffToString(n.c),e,"0"),10,b,s,!0)),s<0&&n.c[0]&&(str="-"+str)),str},P.valueOf=P.toJSON=function(){return valueOf(this)},P._isBigNumber=!0,null!=configObject&&BigNumber.set(configObject),BigNumber}()).default=BigNumber.BigNumber=BigNumber,void 0!==module&&module.exports?module.exports=BigNumber:(globalObject||(globalObject="undefined"!=typeof self&&self?self:window),globalObject.BigNumber=BigNumber)}(this)},{}],64:[function(require,module,exports){(function(Buffer){(function(){"use strict";const stream=require("stream"),util=require("util");class NoFilter extends stream.Transform{constructor(input,inputEncoding,options){let inp,inpE;switch(null==options&&(options={}),typeof input){case"object":Buffer.isBuffer(input)?(inp=input,null!=inputEncoding&&"object"==typeof inputEncoding&&(options=inputEncoding)):options=input;break;case"string":inp=input,null!=inputEncoding&&"object"==typeof inputEncoding?options=inputEncoding:inpE=inputEncoding}null==options&&(options={}),null==inp&&(inp=options.input),null==inpE&&(inpE=options.inputEncoding),delete options.input,delete options.inputEncoding;const watchPipe=null==options.watchPipe||options.watchPipe;delete options.watchPipe;const readError=!!options.readError;delete options.readError,super(options),this.readError=readError,watchPipe&&this.on("pipe",(readable=>{const om=readable._readableState.objectMode;if(this.length>0&&om!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");return this._readableState.objectMode=om,this._writableState.objectMode=om})),null!=inp&&this.end(inp,inpE)}static isNoFilter(obj){return obj instanceof this}static compare(nf1,nf2){if(!(nf1 instanceof this))throw new TypeError("Arguments must be NoFilters");return nf1===nf2?0:nf1.compare(nf2)}static concat(list,length){if(!Array.isArray(list))throw new TypeError("list argument must be an Array of NoFilters");if(0===list.length||0===length)return Buffer.alloc(0);null==length&&(length=list.reduce(((tot,nf)=>{if(!(nf instanceof NoFilter))throw new TypeError("list argument must be an Array of NoFilters");return tot+nf.length}),0));let allBufs=!0,allObjs=!0;const bufs=list.map((nf=>{if(!(nf instanceof NoFilter))throw new TypeError("list argument must be an Array of NoFilters");const buf=nf.slice();return Buffer.isBuffer(buf)?allObjs=!1:allBufs=!1,buf}));if(allBufs)return Buffer.concat(bufs,length);if(allObjs)return[].concat(...bufs).slice(0,length);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(chunk,encoding,callback){this._readableState.objectMode||Buffer.isBuffer(chunk)||(chunk=Buffer.from(chunk,encoding)),this.push(chunk),callback()}_bufArray(){let bufs=this._readableState.buffer;if(!Array.isArray(bufs)){let b=bufs.head;for(bufs=[];null!=b;)bufs.push(b.data),b=b.next}return bufs}read(size){const buf=super.read(size);if(null!=buf){if(this.emit("read",buf),this.readError&&buf.length{this.on("finish",(()=>{const data=this.read();null==cb||done||(done=!0,cb(null,data)),resolve(data)})),this.on("error",(er=>{null==cb||done||(done=!0,cb(er)),reject(er)}))}))}compare(other){if(!(other instanceof NoFilter))throw new TypeError("Arguments must be NoFilters");if(this===other)return 0;{const buf1=this.slice(),buf2=other.slice();if(Buffer.isBuffer(buf1)&&Buffer.isBuffer(buf2))return buf1.compare(buf2);throw new Error("Cannot compare streams in object mode")}}equals(other){return 0===this.compare(other)}slice(start,end){if(this._readableState.objectMode)return this._bufArray().slice(start,end);const bufs=this._bufArray();switch(bufs.length){case 0:return Buffer.alloc(0);case 1:return bufs[0].slice(start,end);default:return Buffer.concat(bufs).slice(start,end)}}get(index){return this.slice()[index]}toJSON(){const b=this.slice();return Buffer.isBuffer(b)?b.toJSON():b}toString(encoding,start,end){const buf=this.slice(start,end);if(!Buffer.isBuffer(buf))return JSON.stringify(buf);if((!encoding||"utf8"===encoding)&&util.TextDecoder){return new util.TextDecoder("utf8",{fatal:!0,ignoreBOM:!0}).decode(buf)}return buf.toString(encoding,start,end)}inspect(depth,options){return this[util.inspect.custom](depth,options)}[util.inspect.custom](depth,options){const hex=this._bufArray().map((b=>Buffer.isBuffer(b)?(null!=options?options.stylize:void 0)?options.stylize(b.toString("hex"),"string"):b.toString("hex"):util.inspect(b,options))).join(", ");return`${this.constructor.name} [${hex}]`}get length(){return this._readableState.length}writeBigInt(val){let str=val.toString(16);if(val<0){const sz=BigInt(Math.floor(str.length/2));str=(val=(BigInt(1)<=this.__needed;){let ret;const chunk=null===this.__needed?void 0:this.bs.read(this.__needed);try{ret=this.__parser.next(chunk)}catch(e){return cb(e)}this.__needed&&(this.__fresh=!1),ret.done?(this.push(ret.value),this.__restart()):this.__needed=ret.value||1/0}return cb()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(cb){cb(this.__fresh?null:new Error("unexpected end of input"))}}},{nofilter:64,stream:30}]},{},[53])(53)})); \ No newline at end of file +var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(Buffer.prototype),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0!==fill?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},{buffer:6}],27:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;function Stream(){EE.call(this)}require("inherits")(Stream,EE),Stream.Readable=require("readable-stream/lib/_stream_readable.js"),Stream.Writable=require("readable-stream/lib/_stream_writable.js"),Stream.Duplex=require("readable-stream/lib/_stream_duplex.js"),Stream.Transform=require("readable-stream/lib/_stream_transform.js"),Stream.PassThrough=require("readable-stream/lib/_stream_passthrough.js"),Stream.finished=require("readable-stream/lib/internal/streams/end-of-stream.js"),Stream.pipeline=require("readable-stream/lib/internal/streams/pipeline.js"),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&!1===options.end||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},{events:10,inherits:19,"readable-stream/lib/_stream_duplex.js":29,"readable-stream/lib/_stream_passthrough.js":30,"readable-stream/lib/_stream_readable.js":31,"readable-stream/lib/_stream_transform.js":32,"readable-stream/lib/_stream_writable.js":33,"readable-stream/lib/internal/streams/end-of-stream.js":37,"readable-stream/lib/internal/streams/pipeline.js":39}],28:[function(require,module,exports){"use strict";var codes={};function createErrorType(code,message,Base){Base||(Base=Error);var NodeError=function(_Base){var subClass,superClass;function NodeError(arg1,arg2,arg3){return _Base.call(this,function(arg1,arg2,arg3){return"string"==typeof message?message:message(arg1,arg2,arg3)}(arg1,arg2,arg3))||this}return superClass=_Base,(subClass=NodeError).prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass,NodeError}(Base);NodeError.prototype.name=Base.name,NodeError.prototype.code=code,codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;return expected=expected.map((function(i){return String(i)})),len>2?"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(", "),", or ")+expected[len-1]:2===len?"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1]):"of ".concat(thing," ").concat(expected[0])}return"of ".concat(thing," ").concat(String(expected))}createErrorType("ERR_INVALID_OPT_VALUE",(function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"'}),TypeError),createErrorType("ERR_INVALID_ARG_TYPE",(function(name,expected,actual){var determiner,search,pos,msg;if("string"==typeof expected&&(search="not ",expected.substr(!pos||pos<0?0:+pos,search.length)===search)?(determiner="must not be",expected=expected.replace(/^not /,"")):determiner="must be",function(str,search,this_len){return(void 0===this_len||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}(name," argument"))msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,"type"));else{var type=function(str,search,start){return"number"!=typeof start&&(start=0),!(start+search.length>str.length)&&-1!==str.indexOf(search,start)}(name,".")?"property":"argument";msg='The "'.concat(name,'" ').concat(type," ").concat(determiner," ").concat(oneOf(expected,"type"))}return msg+=". Received type ".concat(typeof actual)}),TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(name){return"The "+name+" method is not implemented"})),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",(function(name){return"Cannot call "+name+" after a stream was destroyed"})),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",(function(arg){return"Unknown encoding: "+arg}),TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),module.exports.codes=codes},{}],29:[function(require,module,exports){(function(process){(function(){"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");require("inherits")(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v0)if("string"==typeof chunk||state.objectMode||Object.getPrototypeOf(chunk)===Buffer.prototype||(chunk=function(chunk){return Buffer.from(chunk)}(chunk)),addToFront)state.endEmitted?errorOrDestroy(stream,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(stream,state,chunk,!0);else if(state.ended)errorOrDestroy(stream,new ERR_STREAM_PUSH_AFTER_EOF);else{if(state.destroyed)return!1;state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||0!==chunk.length?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1)}else addToFront||(state.reading=!1,maybeReadMore(stream,state));return!state.ended&&(state.lengthstate.highWaterMark&&(state.highWaterMark=function(n){return n>=1073741824?n=1073741824:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function emitReadable(stream){var state=stream._readableState;debug("emitReadable",state.needReadable,state.emittedReadable),state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,process.nextTick(emitReadable_,stream))}function emitReadable_(stream){var state=stream._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended),state.destroyed||!state.length&&!state.ended||(stream.emit("readable"),state.emittedReadable=!1),state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark,flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(;!state.reading&&!state.ended&&(state.length0,state.resumeScheduled&&!state.paused?state.flowing=!0:self.listenerCount("data")>0&&self.resume()}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume_(stream,state){debug("resume",state.reading),state.reading||stream.read(0),state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){return 0===state.length?null:(state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.first():state.buffer.concat(state.length),state.buffer.clear()):ret=state.buffer.consume(n,state.decoder),ret);var ret}function endReadable(stream){var state=stream._readableState;debug("endReadable",state.endEmitted),state.endEmitted||(state.ended=!0,process.nextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){if(debug("endReadableNT",state.endEmitted,state.length),!state.endEmitted&&0===state.length&&(state.endEmitted=!0,stream.readable=!1,stream.emit("end"),state.autoDestroy)){var wState=stream._writableState;(!wState||wState.autoDestroy&&wState.finished)&&stream.destroy()}}function indexOf(xs,x){for(var i=0,l=xs.length;i=state.highWaterMark:state.length>0)||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(0===(n=howMuchToRead(n,state))&&state.ended)return 0===state.length&&endReadable(this),null;var ret,doRead=state.needReadable;return debug("need readable",doRead),(0===state.length||state.length-n0?fromList(n,state):null)?(state.needReadable=state.length<=state.highWaterMark,n=0):(state.length-=n,state.awaitDrain=0),0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"))},Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var endFn=(!pipeOpts||!1!==pipeOpts.end)&&dest!==process.stdout&&dest!==process.stderr?onend:unpipe;function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&!1===unpipeInfo.hasUnpiped&&(unpipeInfo.hasUnpiped=!0,debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain())}function onend(){debug("onend"),dest.end()}state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=function(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}(src);dest.on("drain",ondrain);var cleanedUp=!1;function ondata(chunk){debug("ondata");var ret=dest.write(chunk);debug("dest.write",ret),!1===ret&&((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&errorOrDestroy(dest,er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}return src.on("data",ondata),function(emitter,event,fn){if("function"==typeof emitter.prependListener)return emitter.prependListener(event,fn);emitter._events&&emitter._events[event]?Array.isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn)}(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes||(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo)),this;if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i0,!1!==state.flowing&&this.resume()):"readable"===ev&&(state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.flowing=!1,state.emittedReadable=!1,debug("on readable",state.length,state.reading),state.length?emitReadable(this):state.reading||process.nextTick(nReadingNextTick,this))),res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(ev,fn){var res=Stream.prototype.removeListener.call(this,ev,fn);return"readable"===ev&&process.nextTick(updateReadableListening,this),res},Readable.prototype.removeAllListeners=function(ev){var res=Stream.prototype.removeAllListeners.apply(this,arguments);return"readable"!==ev&&void 0!==ev||process.nextTick(updateReadableListening,this),res},Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!state.readableListening,function(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(resume_,stream,state))}(this,state)),state.paused=!1,this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(stream){var _this=this,state=this._readableState,paused=!1;for(var i in stream.on("end",(function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk)}_this.push(null)})),stream.on("data",(function(chunk){(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),state.objectMode&&null==chunk)||(state.objectMode||chunk&&chunk.length)&&(_this.push(chunk)||(paused=!0,stream.pause()))})),stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n-1))throw new ERR_UNKNOWN_ENCODING(encoding);return this._writableState.defaultEncoding=encoding,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;return"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!=chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||function(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb));state.ended=!0,stream.writable=!1}(this,state,cb),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){cb(err)}}).call(this)}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":28,"./_stream_duplex":29,"./internal/streams/destroy":36,"./internal/streams/state":40,"./internal/streams/stream":41,_process:25,buffer:6,inherits:19,"util-deprecate":43}],34:[function(require,module,exports){(function(process){(function(){"use strict";var _Object$setPrototypeO;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var finished=require("./end-of-stream"),kLastResolve=Symbol("lastResolve"),kLastReject=Symbol("lastReject"),kError=Symbol("error"),kEnded=Symbol("ended"),kLastPromise=Symbol("lastPromise"),kHandlePromise=Symbol("handlePromise"),kStream=Symbol("stream");function createIterResult(value,done){return{value:value,done:done}}function readAndResolve(iter){var resolve=iter[kLastResolve];if(null!==resolve){var data=iter[kStream].read();null!==data&&(iter[kLastPromise]=null,iter[kLastResolve]=null,iter[kLastReject]=null,resolve(createIterResult(data,!1)))}}function onReadable(iter){process.nextTick(readAndResolve,iter)}var AsyncIteratorPrototype=Object.getPrototypeOf((function(){})),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_defineProperty(_Object$setPrototypeO={get stream(){return this[kStream]},next:function(){var _this=this,error=this[kError];if(null!==error)return Promise.reject(error);if(this[kEnded])return Promise.resolve(createIterResult(void 0,!0));if(this[kStream].destroyed)return new Promise((function(resolve,reject){process.nextTick((function(){_this[kError]?reject(_this[kError]):resolve(createIterResult(void 0,!0))}))}));var promise,lastPromise=this[kLastPromise];if(lastPromise)promise=new Promise(function(lastPromise,iter){return function(resolve,reject){lastPromise.then((function(){iter[kEnded]?resolve(createIterResult(void 0,!0)):iter[kHandlePromise](resolve,reject)}),reject)}}(lastPromise,this));else{var data=this[kStream].read();if(null!==data)return Promise.resolve(createIterResult(data,!1));promise=new Promise(this[kHandlePromise])}return this[kLastPromise]=promise,promise}},Symbol.asyncIterator,(function(){return this})),_defineProperty(_Object$setPrototypeO,"return",(function(){var _this2=this;return new Promise((function(resolve,reject){_this2[kStream].destroy(null,(function(err){err?reject(err):resolve(createIterResult(void 0,!0))}))}))})),_Object$setPrototypeO),AsyncIteratorPrototype);module.exports=function(stream){var _Object$create,iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_defineProperty(_Object$create={},kStream,{value:stream,writable:!0}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:!0}),_defineProperty(_Object$create,kLastReject,{value:null,writable:!0}),_defineProperty(_Object$create,kError,{value:null,writable:!0}),_defineProperty(_Object$create,kEnded,{value:stream._readableState.endEmitted,writable:!0}),_defineProperty(_Object$create,kHandlePromise,{value:function(resolve,reject){var data=iterator[kStream].read();data?(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(data,!1))):(iterator[kLastResolve]=resolve,iterator[kLastReject]=reject)},writable:!0}),_Object$create));return iterator[kLastPromise]=null,finished(stream,(function(err){if(err&&"ERR_STREAM_PREMATURE_CLOSE"!==err.code){var reject=iterator[kLastReject];return null!==reject&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,reject(err)),void(iterator[kError]=err)}var resolve=iterator[kLastResolve];null!==resolve&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(void 0,!0))),iterator[kEnded]=!0})),stream.on("readable",onReadable.bind(null,iterator)),iterator}}).call(this)}).call(this,require("_process"))},{"./end-of-stream":37,_process:25}],35:[function(require,module,exports){"use strict";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _defineProperties(target,props){for(var i=0;i0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length}},{key:"unshift",value:function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length}},{key:"shift",value:function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret}},{key:"concat",value:function(n){if(0===this.length)return Buffer.alloc(0);for(var src,target,offset,ret=Buffer.allocUnsafe(n>>>0),p=this.head,i=0;p;)src=p.data,target=ret,offset=i,Buffer.prototype.copy.call(src,target,offset),i+=p.data.length,p=p.next;return ret}},{key:"consume",value:function(n,hasStrings){var ret;return nstr.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),0==(n-=nb)){nb===str.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=str.slice(nb));break}++c}return this.length-=c,ret}},{key:"_getBuffer",value:function(n){var ret=Buffer.allocUnsafe(n),p=this.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),0==(n-=nb)){nb===buf.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=buf.slice(nb));break}++c}return this.length-=c,ret}},{key:custom,value:function(_,options){return inspect(this,function(target){for(var i=1;i0,(function(err){error||(error=err),err&&destroys.forEach(call),reading||(destroys.forEach(call),callback(error))}))}));return streams.reduce(pipe)}},{"../../../errors":28,"./end-of-stream":37}],40:[function(require,module,exports){"use strict";var ERR_INVALID_OPT_VALUE=require("../../../errors").codes.ERR_INVALID_OPT_VALUE;module.exports={getHighWaterMark:function(state,options,duplexKey,isDuplex){var hwm=function(options,isDuplex,duplexKey){return null!=options.highWaterMark?options.highWaterMark:isDuplex?options[duplexKey]:null}(options,isDuplex,duplexKey);if(null!=hwm){if(!isFinite(hwm)||Math.floor(hwm)!==hwm||hwm<0)throw new ERR_INVALID_OPT_VALUE(isDuplex?duplexKey:"highWaterMark",hwm);return Math.floor(hwm)}return state.objectMode?16:16384}}},{"../../../errors":28}],41:[function(require,module,exports){module.exports=require("events").EventEmitter},{events:10}],42:[function(require,module,exports){"use strict";var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch((encoding=""+encoding)&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function StringDecoder(encoding){var nb;switch(this.encoding=function(enc){var nenc=function(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}(enc);if("string"!=typeof nenc&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}(encoding),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(nb)}function utf8CheckByte(byte){return byte<=127?0:byte>>5==6?2:byte>>4==14?3:byte>>3==30?4:byte>>6==2?-1:-2}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=function(self,buf,p){if(128!=(192&buf[0]))return self.lastNeed=0,"�";if(self.lastNeed>1&&buf.length>1){if(128!=(192&buf[1]))return self.lastNeed=1,"�";if(self.lastNeed>2&&buf.length>2&&128!=(192&buf[2]))return self.lastNeed=2,"�"}}(this,buf);return void 0!==r?r:this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(buf.copy(this.lastChar,p,0,buf.length),void(this.lastNeed-=buf.length))}function utf16Text(buf,i){if((buf.length-i)%2==0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0===n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(void 0===(r=this.fillLast(buf)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return nb>0&&(self.lastNeed=nb-1),nb;if(--j=0)return nb>0&&(self.lastNeed=nb-2),nb;if(--j=0)return nb>0&&(2===nb?nb=0:self.lastNeed=nb-3),nb;return 0}(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)},StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length}},{"safe-buffer":26}],43:[function(require,module,exports){(function(global){(function(){function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=function(fn,msg){if(config("noDeprecation"))return fn;var warned=!1;return function(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],45:[function(require,module,exports){"use strict";var isArgumentsObject=require("is-arguments"),isGeneratorFunction=require("is-generator-function"),whichTypedArray=require("which-typed-array"),isTypedArray=require("is-typed-array");function uncurryThis(f){return f.call.bind(f)}var BigIntSupported="undefined"!=typeof BigInt,SymbolSupported="undefined"!=typeof Symbol,ObjectToString=uncurryThis(Object.prototype.toString),numberValue=uncurryThis(Number.prototype.valueOf),stringValue=uncurryThis(String.prototype.valueOf),booleanValue=uncurryThis(Boolean.prototype.valueOf);if(BigIntSupported)var bigIntValue=uncurryThis(BigInt.prototype.valueOf);if(SymbolSupported)var symbolValue=uncurryThis(Symbol.prototype.valueOf);function checkBoxedPrimitive(value,prototypeValueOf){if("object"!=typeof value)return!1;try{return prototypeValueOf(value),!0}catch(e){return!1}}function isMapToString(value){return"[object Map]"===ObjectToString(value)}function isSetToString(value){return"[object Set]"===ObjectToString(value)}function isWeakMapToString(value){return"[object WeakMap]"===ObjectToString(value)}function isWeakSetToString(value){return"[object WeakSet]"===ObjectToString(value)}function isArrayBufferToString(value){return"[object ArrayBuffer]"===ObjectToString(value)}function isArrayBuffer(value){return"undefined"!=typeof ArrayBuffer&&(isArrayBufferToString.working?isArrayBufferToString(value):value instanceof ArrayBuffer)}function isDataViewToString(value){return"[object DataView]"===ObjectToString(value)}function isDataView(value){return"undefined"!=typeof DataView&&(isDataViewToString.working?isDataViewToString(value):value instanceof DataView)}function isSharedArrayBufferToString(value){return"[object SharedArrayBuffer]"===ObjectToString(value)}function isSharedArrayBuffer(value){return"undefined"!=typeof SharedArrayBuffer&&(isSharedArrayBufferToString.working?isSharedArrayBufferToString(value):value instanceof SharedArrayBuffer)}function isNumberObject(value){return checkBoxedPrimitive(value,numberValue)}function isStringObject(value){return checkBoxedPrimitive(value,stringValue)}function isBooleanObject(value){return checkBoxedPrimitive(value,booleanValue)}function isBigIntObject(value){return BigIntSupported&&checkBoxedPrimitive(value,bigIntValue)}function isSymbolObject(value){return SymbolSupported&&checkBoxedPrimitive(value,symbolValue)}exports.isArgumentsObject=isArgumentsObject,exports.isGeneratorFunction=isGeneratorFunction,exports.isTypedArray=isTypedArray,exports.isPromise=function(input){return"undefined"!=typeof Promise&&input instanceof Promise||null!==input&&"object"==typeof input&&"function"==typeof input.then&&"function"==typeof input.catch},exports.isArrayBufferView=function(value){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(value):isTypedArray(value)||isDataView(value)},exports.isUint8Array=function(value){return"Uint8Array"===whichTypedArray(value)},exports.isUint8ClampedArray=function(value){return"Uint8ClampedArray"===whichTypedArray(value)},exports.isUint16Array=function(value){return"Uint16Array"===whichTypedArray(value)},exports.isUint32Array=function(value){return"Uint32Array"===whichTypedArray(value)},exports.isInt8Array=function(value){return"Int8Array"===whichTypedArray(value)},exports.isInt16Array=function(value){return"Int16Array"===whichTypedArray(value)},exports.isInt32Array=function(value){return"Int32Array"===whichTypedArray(value)},exports.isFloat32Array=function(value){return"Float32Array"===whichTypedArray(value)},exports.isFloat64Array=function(value){return"Float64Array"===whichTypedArray(value)},exports.isBigInt64Array=function(value){return"BigInt64Array"===whichTypedArray(value)},exports.isBigUint64Array=function(value){return"BigUint64Array"===whichTypedArray(value)},isMapToString.working="undefined"!=typeof Map&&isMapToString(new Map),exports.isMap=function(value){return"undefined"!=typeof Map&&(isMapToString.working?isMapToString(value):value instanceof Map)},isSetToString.working="undefined"!=typeof Set&&isSetToString(new Set),exports.isSet=function(value){return"undefined"!=typeof Set&&(isSetToString.working?isSetToString(value):value instanceof Set)},isWeakMapToString.working="undefined"!=typeof WeakMap&&isWeakMapToString(new WeakMap),exports.isWeakMap=function(value){return"undefined"!=typeof WeakMap&&(isWeakMapToString.working?isWeakMapToString(value):value instanceof WeakMap)},isWeakSetToString.working="undefined"!=typeof WeakSet&&isWeakSetToString(new WeakSet),exports.isWeakSet=function(value){return isWeakSetToString(value)},isArrayBufferToString.working="undefined"!=typeof ArrayBuffer&&isArrayBufferToString(new ArrayBuffer),exports.isArrayBuffer=isArrayBuffer,isDataViewToString.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1)),exports.isDataView=isDataView,isSharedArrayBufferToString.working="undefined"!=typeof SharedArrayBuffer&&isSharedArrayBufferToString(new SharedArrayBuffer),exports.isSharedArrayBuffer=isSharedArrayBuffer,exports.isAsyncFunction=function(value){return"[object AsyncFunction]"===ObjectToString(value)},exports.isMapIterator=function(value){return"[object Map Iterator]"===ObjectToString(value)},exports.isSetIterator=function(value){return"[object Set Iterator]"===ObjectToString(value)},exports.isGeneratorObject=function(value){return"[object Generator]"===ObjectToString(value)},exports.isWebAssemblyCompiledModule=function(value){return"[object WebAssembly.Module]"===ObjectToString(value)},exports.isNumberObject=isNumberObject,exports.isStringObject=isStringObject,exports.isBooleanObject=isBooleanObject,exports.isBigIntObject=isBigIntObject,exports.isSymbolObject=isSymbolObject,exports.isBoxedPrimitive=function(value){return isNumberObject(value)||isStringObject(value)||isBooleanObject(value)||isBigIntObject(value)||isSymbolObject(value)},exports.isAnyArrayBuffer=function(value){return"undefined"!=typeof Uint8Array&&(isArrayBuffer(value)||isSharedArrayBuffer(value))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(method){Object.defineProperty(exports,method,{enumerable:!1,value:function(){throw new Error(method+" is not supported in userland")}})}))},{"is-arguments":20,"is-generator-function":21,"is-typed-array":22,"which-typed-array":47}],46:[function(require,module,exports){(function(process){(function(){var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(obj){for(var keys=Object.keys(obj),descriptors={},i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}})),x=args[i];i=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=function(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=function(array){var hash={};return array.forEach((function(val,idx){hash[val]=!0})),hash}(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var output,base="",array=!1,braces=["{","}"];(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value))&&(base=" [Function"+(value.name?": "+value.name:"")+"]");return isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0!==keys.length||array&&0!=value.length?recurseTimes<0?isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special"):(ctx.seen.push(value),output=array?function(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i=0&&0,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}(output,base,braces)):braces[0]+base+braces[1]}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if((desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]}).get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1)).indexOf("\n")>-1&&(str=array?str.split("\n").map((function(line){return" "+line})).join("\n").substr(2):"\n"+str.split("\n").map((function(line){return" "+line})).join("\n")):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}exports.debuglog=function(set){if(set=set.toUpperCase(),!debugs[set])if(debugEnvRegex.test(set)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.types=require("./support/types"),exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.types.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.types.isDate=isDate,exports.isError=isError,exports.types.isNativeError=isError,exports.isFunction=isFunction,exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin};var kCustomPromisifiedSymbol="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function callbackifyOnRejected(reason,cb){if(!reason){var newReason=new Error("Promise was rejected with a falsy value");newReason.reason=reason,reason=newReason}return cb(reason)}exports.promisify=function(original){if("function"!=typeof original)throw new TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&original[kCustomPromisifiedSymbol]){var fn;if("function"!=typeof(fn=original[kCustomPromisifiedSymbol]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:!1,writable:!1,configurable:!0}),fn}function fn(){for(var promiseResolve,promiseReject,promise=new Promise((function(resolve,reject){promiseResolve=resolve,promiseReject=reject})),args=[],i=0;i1?"s":""}class Commented extends stream.Transform{constructor(options={}){const{depth:depth=1,max_depth:max_depth=10,no_summary:no_summary=!1,tags:tags={},bigint:bigint,preferWeb:preferWeb,encoding:encoding,...superOpts}=options;super({...superOpts,readableObjectMode:!1,writableObjectMode:!1}),this.depth=depth,this.max_depth=max_depth,this.all=new NoFilter,tags[24]||(tags[24]=this._tag_24.bind(this)),this.parser=new Decoder({tags:tags,max_depth:max_depth,bigint:bigint,preferWeb:preferWeb,encoding:encoding}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),no_summary||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(v){const c=new Commented({depth:this.depth+1,no_summary:!0});c.on("data",(b=>this.push(b))),c.on("error",(er=>this.emit("error",er))),c.end(v)}_transform(fresh,encoding,cb){this.parser.write(fresh,encoding,cb)}_flush(cb){return this.parser._flush(cb)}static comment(input,options={},cb){if(null==input)throw new Error("input required");({options:options,cb:cb}=function(opts,cb){switch(typeof opts){case"function":return{options:{},cb:opts};case"string":return{options:{encoding:opts},cb:cb};case"number":return{options:{max_depth:opts},cb:cb};case"object":return{options:opts||{},cb:cb};default:throw new TypeError("Unknown option type")}}(options,cb));const bs=new NoFilter,{encoding:encoding="hex",...opts}=options,d=new Commented(opts);let p=null;return"function"==typeof cb?(d.on("end",(()=>{cb(null,bs.toString("utf8"))})),d.on("error",cb)):p=new Promise(((resolve,reject)=>(d.on("end",(()=>{resolve(bs.toString("utf8"))})),d.on("error",reject)))),d.pipe(bs),utils.guessEncoding(input,encoding).pipe(d),p}_on_error(er){this.push("ERROR: "),this.push(er.toString()),this.push("\n")}_on_read(buf){this.all.write(buf);const hex=buf.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(hex);let ind=2*(this.max_depth-this.depth);return ind-=hex.length,ind<1&&(ind=1),this.push(new Array(ind+1).join(" ")),this.push("-- ")}_on_more(mt,len,parent_mt,pos){this.depth++;let desc="";switch(mt){case MT.POS_INT:desc="Positive number,";break;case MT.NEG_INT:desc="Negative number,";break;case MT.ARRAY:desc="Array, length";break;case MT.MAP:desc="Map, count";break;case MT.BYTE_STRING:desc="Bytes, length";break;case MT.UTF8_STRING:desc="String, length";break;case MT.SIMPLE_FLOAT:desc=1===len?"Simple value,":"Float,"}return this.push(desc+" next "+len+" byte"+plural(len)+"\n")}_on_start_string(mt,tag,parent_mt,pos){this.depth++;let desc="";switch(mt){case MT.BYTE_STRING:desc="Bytes, length: "+tag;break;case MT.UTF8_STRING:desc="String, length: "+tag.toString()}return this.push(desc+"\n")}_on_start(mt,tag,parent_mt,pos){switch(this.depth++,parent_mt){case MT.ARRAY:this.push(`[${pos}], `);break;case MT.MAP:pos%2?this.push(`{Val:${Math.floor(pos/2)}}, `):this.push(`{Key:${Math.floor(pos/2)}}, `)}switch(mt){case MT.TAG:this.push(`Tag #${tag}`),24==tag&&this.push(" Encoded CBOR data item");break;case MT.ARRAY:tag===SYMS.STREAM?this.push("Array (streaming)"):this.push(`Array, ${tag} item${plural(tag)}`);break;case MT.MAP:tag===SYMS.STREAM?this.push("Map (streaming)"):this.push(`Map, ${tag} pair${plural(tag)}`);break;case MT.BYTE_STRING:this.push("Bytes (streaming)");break;case MT.UTF8_STRING:this.push("String (streaming)")}return this.push("\n")}_on_stop(mt){return this.depth--}_on_value(val,parent_mt,pos,ai){if(val!==SYMS.BREAK)switch(parent_mt){case MT.ARRAY:this.push(`[${pos}], `);break;case MT.MAP:pos%2?this.push(`{Val:${Math.floor(pos/2)}}, `):this.push(`{Key:${Math.floor(pos/2)}}, `)}const str=utils.cborValueToString(val,-1/0);switch("string"==typeof val||Buffer.isBuffer(val)?(val.length>0&&(this.push(str),this.push("\n")),this.depth--):(this.push(str),this.push("\n")),ai){case NUMBYTES.ONE:case NUMBYTES.TWO:case NUMBYTES.FOUR:case NUMBYTES.EIGHT:this.depth--}}_on_data(){return this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}module.exports=Commented},{"./constants":50,"./decoder":51,"./utils":57,buffer:6,nofilter:24,stream:27}],50:[function(require,module,exports){"use strict";let bn=null;try{bn=require("bignumber.js").BigNumber}catch(ignored){}if(exports.BigNumber=bn,exports.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},exports.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36},exports.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},exports.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},exports.SYMS={NULL:Symbol("null"),UNDEFINED:Symbol("undef"),PARENT:Symbol("parent"),BREAK:Symbol("break"),STREAM:Symbol("stream")},exports.SHIFT32=4294967296,exports.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(exports.SHIFT32)},exports.BigNumber){const MINUS_ONE=new exports.BigNumber(-1);exports.BN={MINUS_ONE:MINUS_ONE,NEG_MAX:MINUS_ONE.minus(new exports.BigNumber(Number.MAX_SAFE_INTEGER.toString(16),16)),TWO:new exports.BigNumber(2),MAXINT:new exports.BigNumber("0x20000000000000"),MAXINT32:new exports.BigNumber(4294967295),MAXINT64:new exports.BigNumber("0xffffffffffffffff"),SHIFT32:new exports.BigNumber(exports.SHIFT32)}}},{"bignumber.js":4}],51:[function(require,module,exports){"use strict";const BinaryParseStream=require("../vendor/binary-parse-stream"),Tagged=require("./tagged"),Simple=require("./simple"),utils=require("./utils"),NoFilter=require("nofilter"),constants=require("./constants"),{MT:MT,NUMBYTES:NUMBYTES,SYMS:SYMS,BI:BI}=constants,{Buffer:Buffer}=require("buffer"),COUNT=Symbol("count"),MAJOR=Symbol("major type"),ERROR=Symbol("error"),NOT_FOUND=Symbol("not found");function parentArray(parent,typ,count){const a=[];return a[COUNT]=count,a[SYMS.PARENT]=parent,a[MAJOR]=typ,a}function parentBufferStream(parent,typ){const b=new NoFilter;return b[COUNT]=-1,b[SYMS.PARENT]=parent,b[MAJOR]=typ,b}function _tag_2(v){return utils.bufferToBigInt(v)}function _tag_3(v){return BI.MINUS_ONE-utils.bufferToBigInt(v)}class UnexpectedDataError extends Error{constructor(byte,value){super(`Unexpected data: 0x${byte.toString(16)}`),this.name="UnexpectedDataError",this.byte=byte,this.value=value}}function normalizeOptions(opts,cb){switch(typeof opts){case"function":return{options:{},cb:opts};case"string":return{options:{encoding:opts},cb:cb};case"object":return{options:opts||{},cb:cb};default:throw new TypeError("Unknown option type")}}class Decoder extends BinaryParseStream{constructor(options={}){const{tags:tags={},max_depth:max_depth=-1,bigint:bigint=!0,preferWeb:preferWeb=!1,required:required=!1,encoding:encoding="hex",extendedResults:extendedResults=!1,...superOpts}=options;super({defaultEncoding:encoding,...superOpts}),this.running=!0,this.max_depth=max_depth,this.tags=tags,this.preferWeb=preferWeb,this.extendedResults=extendedResults,this.bigint=bigint,this.required=required,extendedResults&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new NoFilter),bigint&&(null==this.tags[2]&&(this.tags[2]=_tag_2),null==this.tags[3]&&(this.tags[3]=_tag_3))}static nullcheck(val){switch(val){case SYMS.NULL:return null;case SYMS.UNDEFINED:return;case NOT_FOUND:throw new Error("Value not found");default:return val}}static decodeFirstSync(input,options={}){if(null==input)throw new TypeError("input required");({options:options}=normalizeOptions(options));const{encoding:encoding="hex",...opts}=options,c=new Decoder(opts),s=utils.guessEncoding(input,encoding),parser=c._parse();let val,state=parser.next();for(;!state.done;){const b=s.read(state.value);if(null==b||b.length!==state.value)throw new Error("Insufficient data");c.extendedResults&&c.valueBytes.write(b),state=parser.next(b)}if(c.extendedResults)val=state.value,val.unused=s.read();else if(val=Decoder.nullcheck(state.value),s.length>0){const nextByte=s.read(1);throw s.unshift(nextByte),new UnexpectedDataError(nextByte[0],val)}return val}static decodeAllSync(input,options={}){if(null==input)throw new TypeError("input required");({options:options}=normalizeOptions(options));const{encoding:encoding="hex",...opts}=options,c=new Decoder(opts),s=utils.guessEncoding(input,encoding),res=[];for(;s.length>0;){const parser=c._parse();let state=parser.next();for(;!state.done;){const b=s.read(state.value);if(null==b||b.length!==state.value)throw new Error("Insufficient data");c.extendedResults&&c.valueBytes.write(b),state=parser.next(b)}res.push(Decoder.nullcheck(state.value))}return res}static decodeFirst(input,options={},cb){if(null==input)throw new TypeError("input required");({options:options,cb:cb}=normalizeOptions(options,cb));const{encoding:encoding="hex",required:required=!1,...opts}=options,c=new Decoder(opts);let v=NOT_FOUND;const s=utils.guessEncoding(input,encoding),p=new Promise(((resolve,reject)=>{c.on("data",(val=>{v=Decoder.nullcheck(val),c.close()})),c.once("error",(er=>c.extendedResults&&er instanceof UnexpectedDataError?(v.unused=c.bs.slice(),resolve(v)):(v!==NOT_FOUND&&(er.value=v),v=ERROR,c.close(),reject(er)))),c.once("end",(()=>{switch(v){case NOT_FOUND:return required?reject(new Error("No CBOR found")):resolve(v);case ERROR:return;default:return resolve(v)}}))}));return"function"==typeof cb&&p.then((v=>cb(null,v)),cb),s.pipe(c),p}static decodeAll(input,options={},cb){if(null==input)throw new TypeError("input required");({options:options,cb:cb}=normalizeOptions(options,cb));const{encoding:encoding="hex",...opts}=options,c=new Decoder(opts),vals=[];c.on("data",(val=>vals.push(Decoder.nullcheck(val))));const p=new Promise(((resolve,reject)=>{c.on("error",reject),c.on("end",(()=>resolve(vals)))}));return"function"==typeof cb&&p.then((v=>cb(void 0,v)),(er=>cb(er,void 0))),utils.guessEncoding(input,encoding).pipe(c),p}close(){this.running=!1,this.__fresh=!0}_onRead(data){this.valueBytes.write(data)}*_parse(){let parent=null,depth=0,val=null;for(;;){if(this.max_depth>=0&&depth>this.max_depth)throw new Error("Maximum depth "+this.max_depth+" exceeded");const octet=(yield 1)[0];if(!this.running)throw this.bs.unshift(Buffer.from([octet])),new UnexpectedDataError(octet);const mt=octet>>5,ai=31&octet,parent_major=null!=parent?parent[MAJOR]:void 0,parent_length=null!=parent?parent.length:void 0;switch(ai){case NUMBYTES.ONE:this.emit("more-bytes",mt,1,parent_major,parent_length),val=(yield 1)[0];break;case NUMBYTES.TWO:case NUMBYTES.FOUR:case NUMBYTES.EIGHT:const numbytes=1<this.stream_errors?(er&&this._on_error(er),cb()):cb(er)))}static diagnose(input,options={},cb){if(null==input)throw new Error("input required");({options:options,cb:cb}=function(opts,cb){switch(typeof opts){case"function":return{options:{},cb:opts};case"string":return{options:{encoding:opts},cb:cb};case"object":return{options:opts||{},cb:cb};default:throw new TypeError("Unknown option type")}}(options,cb));const{encoding:encoding="hex",...opts}=options,bs=new NoFilter,d=new Diagnose(opts);let p=null;return"function"==typeof cb?(d.on("end",(()=>cb(null,bs.toString("utf8")))),d.on("error",cb)):p=new Promise(((resolve,reject)=>(d.on("end",(()=>resolve(bs.toString("utf8")))),d.on("error",reject)))),d.pipe(bs),utils.guessEncoding(input,encoding).pipe(d),p}_on_error(er){return this.stream_errors?this.push(er.toString()):this.emit("error",er)}_on_more(mt,len,parent_mt,pos){if(mt===MT.SIMPLE_FLOAT)return this.float_bytes={2:1,4:2,8:3}[len]}_fore(parent_mt,pos){switch(parent_mt){case MT.BYTE_STRING:case MT.UTF8_STRING:case MT.ARRAY:if(pos>0)return this.push(", ");break;case MT.MAP:if(pos>0)return pos%2?this.push(": "):this.push(", ")}}_on_value(val,parent_mt,pos){if(val===SYMS.BREAK)return;this._fore(parent_mt,pos);const fb=this.float_bytes;return this.float_bytes=-1,this.push(utils.cborValueToString(val,fb))}_on_start(mt,tag,parent_mt,pos){switch(this._fore(parent_mt,pos),mt){case MT.TAG:this.push(`${tag}(`);break;case MT.ARRAY:this.push("[");break;case MT.MAP:this.push("{");break;case MT.BYTE_STRING:case MT.UTF8_STRING:this.push("(")}if(tag===SYMS.STREAM)return this.push("_ ")}_on_stop(mt){switch(mt){case MT.TAG:return this.push(")");case MT.ARRAY:return this.push("]");case MT.MAP:return this.push("}");case MT.BYTE_STRING:case MT.UTF8_STRING:return this.push(")")}}_on_data(){return this.push(this.separator)}}module.exports=Diagnose},{"./constants":50,"./decoder":51,"./utils":57,nofilter:24,stream:27}],53:[function(require,module,exports){"use strict";const stream=require("stream"),NoFilter=require("nofilter"),utils=require("./utils"),constants=require("./constants"),{MT:MT,NUMBYTES:NUMBYTES,SHIFT32:SHIFT32,SIMPLE:SIMPLE,SYMS:SYMS,TAG:TAG,BI:BI}=constants,{Buffer:Buffer}=require("buffer"),HALF=MT.SIMPLE_FLOAT<<5|NUMBYTES.TWO,FLOAT=MT.SIMPLE_FLOAT<<5|NUMBYTES.FOUR,DOUBLE=MT.SIMPLE_FLOAT<<5|NUMBYTES.EIGHT,TRUE=MT.SIMPLE_FLOAT<<5|SIMPLE.TRUE,FALSE=MT.SIMPLE_FLOAT<<5|SIMPLE.FALSE,UNDEFINED=MT.SIMPLE_FLOAT<<5|SIMPLE.UNDEFINED,NULL=MT.SIMPLE_FLOAT<<5|SIMPLE.NULL,BREAK=Buffer.from([255]),BUF_NAN=Buffer.from("f97e00","hex"),BUF_INF_NEG=Buffer.from("f9fc00","hex"),BUF_INF_POS=Buffer.from("f97c00","hex"),BUF_NEG_ZERO=Buffer.from("f98000","hex"),LOOP_DETECT=Symbol("CBOR_LOOP_DETECT");class Encoder extends stream.Transform{constructor(options={}){const{canonical:canonical=!1,encodeUndefined:encodeUndefined,disallowUndefinedKeys:disallowUndefinedKeys=!1,dateType:dateType="number",collapseBigIntegers:collapseBigIntegers=!1,detectLoops:detectLoops=!1,genTypes:genTypes=[],...superOpts}=options;if(super({...superOpts,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=canonical,this.encodeUndefined=encodeUndefined,this.disallowUndefinedKeys=disallowUndefinedKeys,this.dateType=function(str){if(!str)return"number";switch(str.toLowerCase()){case"number":return"number";case"float":return"float";case"int":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${str}"`)}(dateType),this.collapseBigIntegers=!!this.canonical||collapseBigIntegers,this.detectLoops="symbol"==typeof detectLoops?detectLoops:detectLoops?Symbol("CBOR_DETECT"):null,this.semanticTypes={Array:this._pushArray,Date:this._pushDate,Buffer:this._pushBuffer,Map:this._pushMap,NoFilter:this._pushNoFilter,RegExp:this._pushRegexp,Set:this._pushSet,ArrayBuffer:this._pushUint8Array,Uint8ClampedArray:this._pushUint8Array,Uint8Array:this._pushUint8Array,Uint16Array:this._pushArray,Uint32Array:this._pushArray,Int8Array:this._pushArray,Int16Array:this._pushArray,Int32Array:this._pushArray,Float32Array:this._pushFloat32Array,Float64Array:this._pushFloat64Array,URL:this._pushURL},constants.BigNumber&&(this.semanticTypes[constants.BigNumber.name]=this._pushBigNumber),Array.isArray(genTypes))for(let i=0,len=genTypes.length;i{enc.pushAny(a);const a_cbor=bs.read();enc.pushAny(b);const b_cbor=bs.read();return a_cbor.compare(b_cbor)}));for(const[k,v]of entries){if(gen.disallowUndefinedKeys&&void 0===k)throw new Error("Invalid Map key: undefined");if(!gen.pushAny(k)||!gen.pushAny(v))return!1}}else for(const[k,v]of obj){if(gen.disallowUndefinedKeys&&void 0===k)throw new Error("Invalid Map key: undefined");if(!gen.pushAny(k)||!gen.pushAny(v))return!1}return!(opts.indefinite&&!gen.push(BREAK))}_pushUint8Array(gen,obj){return gen._pushBuffer(gen,Buffer.from(obj))}_pushFloat32Array(gen,obj){const len=obj.length;if(!gen._pushInt(len,MT.ARRAY))return!1;for(let j=0;j"function"!=typeof obj[k])),cbor_keys={};if(this.canonical&&keys.sort(((a,b)=>{const a_cbor=cbor_keys[a]||(cbor_keys[a]=Encoder.encode(a)),b_cbor=cbor_keys[b]||(cbor_keys[b]=Encoder.encode(b));return a_cbor.compare(b_cbor)})),opts.indefinite){if(!this._pushUInt8(MT.MAP<<5|NUMBYTES.INDEFINITE))return!1}else if(!this._pushInt(keys.length,MT.MAP))return!1;let ck;for(let j=0,len2=keys.length;j{const bufs=[],enc=new Encoder(options);enc.on("data",(buf=>bufs.push(buf))),enc.on("error",reject),enc.on("finish",(()=>resolve(Buffer.concat(bufs)))),enc.pushAny(obj),enc.end()}))}}module.exports=Encoder},{"./constants":50,"./utils":57,buffer:6,nofilter:24,stream:27}],54:[function(require,module,exports){"use strict";const{Buffer:Buffer}=require("buffer"),encoder=require("./encoder"),decoder=require("./decoder"),MT=require("./constants").MT;class CborMap extends Map{constructor(iterable){super(iterable)}static _encode(key){return encoder.encodeCanonical(key).toString("base64")}static _decode(key){return decoder.decodeFirstSync(key,"base64")}get(key){return super.get(CborMap._encode(key))}set(key,val){return super.set(CborMap._encode(key),val)}delete(key){return super.delete(CborMap._encode(key))}has(key){return super.has(CborMap._encode(key))}*keys(){for(const k of super.keys())yield CborMap._decode(k)}*entries(){for(const kv of super.entries())yield[CborMap._decode(kv[0]),kv[1]]}[Symbol.iterator](){return this.entries()}forEach(fun,thisArg){if("function"!=typeof fun)throw new TypeError("Must be function");for(const kv of super.entries())fun.call(this,kv[1],CborMap._decode(kv[0]),this)}encodeCBOR(gen){if(!gen._pushInt(this.size,MT.MAP))return!1;if(gen.canonical){const entries=Array.from(super.entries()).map((kv=>[Buffer.from(kv[0],"base64"),kv[1]]));entries.sort(((a,b)=>a[0].compare(b[0])));for(const kv of entries)if(!gen.push(kv[0])||!gen.pushAny(kv[1]))return!1}else for(const kv of super.entries())if(!gen.push(Buffer.from(kv[0],"base64"))||!gen.pushAny(kv[1]))return!1;return!0}}module.exports=CborMap},{"./constants":50,"./decoder":51,"./encoder":53,buffer:6}],55:[function(require,module,exports){"use strict";const constants=require("./constants"),MT=constants.MT,SIMPLE=constants.SIMPLE,SYMS=constants.SYMS;class Simple{constructor(value){if("number"!=typeof value)throw new Error("Invalid Simple type: "+typeof value);if(value<0||value>255||(0|value)!==value)throw new Error("value must be a small positive integer: "+value);this.value=value}toString(){return"simple("+this.value+")"}inspect(depth,opts){return"simple("+this.value+")"}encodeCBOR(gen){return gen._pushInt(this.value,MT.SIMPLE_FLOAT)}static isSimple(obj){return obj instanceof Simple}static decode(val,has_parent=!0,parent_indefinite=!1){switch(val){case SIMPLE.FALSE:return!1;case SIMPLE.TRUE:return!0;case SIMPLE.NULL:return has_parent?null:SYMS.NULL;case SIMPLE.UNDEFINED:return has_parent?void 0:SYMS.UNDEFINED;case-1:if(!has_parent||!parent_indefinite)throw new Error("Invalid BREAK");return SYMS.BREAK;default:return new Simple(val)}}}module.exports=Simple},{"./constants":50}],56:[function(require,module,exports){"use strict";const constants=require("./constants"),utils=require("./utils"),{Buffer:Buffer}=require("buffer");function setBuffersToJSON(obj,fn){if(Buffer.isBuffer(obj))obj.toJSON=fn;else if(Array.isArray(obj))for(const v of obj)setBuffersToJSON(v,fn);else if(obj&&"object"==typeof obj&&(!(obj instanceof Tagged)||obj.tag<21||obj.tag>23))for(const v of Object.values(obj))setBuffersToJSON(v,fn)}const INTERNAL_JSON=Symbol("INTERNAL_JSON");class Tagged{constructor(tag,value,err){if(this.tag=tag,this.value=value,this.err=err,"number"!=typeof this.tag)throw new Error("Invalid tag type ("+typeof this.tag+")");if(this.tag<0||(0|this.tag)!==this.tag)throw new Error("Tag must be a positive integer: "+this.tag)}toJSON(){if(this[INTERNAL_JSON])return this[INTERNAL_JSON]();const ret={tag:this.tag,value:this.value};return this.err&&(ret.err=this.err),ret}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(gen){return gen._pushTag(this.tag),gen.pushAny(this.value)}convert(converters){let f=null!=converters?converters[this.tag]:void 0;if("function"!=typeof f&&(f=Tagged["_tag_"+this.tag],"function"!=typeof f))return this;try{return f.call(this,this.value)}catch(error){return error&&error.message?this.err=error.message:this.err=error,this}}static _tag_0(v){return new Date(v)}static _tag_1(v){return new Date(1e3*v)}static _tag_2(v){return utils.bufferToBignumber(v)}static _tag_3(v){const pos=utils.bufferToBignumber(v);return constants.BN.MINUS_ONE.minus(pos)}static _tag_4(v){if(!constants.BigNumber)throw new Error("No bignumber.js");return new constants.BigNumber(v[1]).shiftedBy(v[0])}static _tag_5(v){if(!constants.BigNumber)throw new Error("No bignumber.js");return constants.BN.TWO.pow(v[0]).times(v[1])}static _tag_21(v){return Buffer.isBuffer(v)?this[INTERNAL_JSON]=()=>utils.base64url(v):setBuffersToJSON(v,(function(){return utils.base64url(this)})),this}static _tag_22(v){return Buffer.isBuffer(v)?this[INTERNAL_JSON]=()=>v.toString("base64"):setBuffersToJSON(v,(function(){return this.toString("base64")})),this}static _tag_23(v){return Buffer.isBuffer(v)?this[INTERNAL_JSON]=()=>v.toString("hex"):setBuffersToJSON(v,(function(){return this.toString("hex")})),this}static _tag_32(v){return new URL(v)}static _tag_33(v){if(!v.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const last=v.length%4;if(1===last)throw new Error("Invalid base64url length");if(2===last){if(-1==="AQgw".indexOf(v[v.length-1]))throw new Error("Invalid base64 padding")}else if(3===last&&-1==="AEIMQUYcgkosw048".indexOf(v[v.length-1]))throw new Error("Invalid base64 padding");return this}static _tag_34(v){const m=v.match(/^[a-zA-Z0-9+/]+(={0,2})$/);if(!m)throw new Error("Invalid base64url characters");if(v.length%4!=0)throw new Error("Invalid base64url length");if("="===m[1]){if(-1==="AQgw".indexOf(v[v.length-2]))throw new Error("Invalid base64 padding")}else if("=="===m[1]&&-1==="AEIMQUYcgkosw048".indexOf(v[v.length-3]))throw new Error("Invalid base64 padding");return this}static _tag_35(v){return new RegExp(v)}}Tagged.INTERNAL_JSON=INTERNAL_JSON,module.exports=Tagged},{"./constants":50,"./utils":57,buffer:6}],57:[function(require,module,exports){"use strict";const{Buffer:Buffer}=require("buffer"),NoFilter=require("nofilter"),stream=require("stream"),constants=require("./constants"),{NUMBYTES:NUMBYTES,SHIFT32:SHIFT32,BI:BI,SYMS:SYMS}=constants;let util=null;try{util=require("util")}catch{try{util=require("node-inspect-extracted")}catch{}}exports.inspect=util?util.inspect:null;const td=new("function"==typeof TextDecoder?TextDecoder:util.TextDecoder)("utf8",{fatal:!0,ignoreBOM:!0});exports.utf8=buf=>td.decode(buf),exports.utf8.checksUTF8=!0,exports.parseCBORint=function(ai,buf,bigInt=!0){switch(ai){case NUMBYTES.ONE:return buf.readUInt8(0);case NUMBYTES.TWO:return buf.readUInt16BE(0);case NUMBYTES.FOUR:return buf.readUInt32BE(0);case NUMBYTES.EIGHT:const f=buf.readUInt32BE(0),g=buf.readUInt32BE(4);if(f>2097151){if(bigInt)return BigInt(f)*BI.SHIFT32+BigInt(g);if(!constants.BigNumber)throw new Error("No bigint and no bignumber.js");return new constants.BigNumber(f).times(SHIFT32).plus(g)}return f*SHIFT32+g;default:throw new Error("Invalid additional info for int: "+ai)}},exports.writeHalf=function(buf,half){const u32=Buffer.allocUnsafe(4);u32.writeFloatBE(half,0);const u=u32.readUInt32BE(0);if(0!=(8191&u))return!1;let s16=u>>16&32768;const exp=u>>23&255,mant=8388607&u;if(exp>=113&&exp<=142)s16+=(exp-112<<10)+(mant>>13);else{if(!(exp>=103&&exp<113))return!1;if(mant&(1<<126-exp)-1)return!1;s16+=mant+8388608>>126-exp}return buf.writeUInt16BE(s16),!0},exports.parseHalf=function(buf){const sign=128&buf[0]?-1:1,exp=(124&buf[0])>>2,mant=(3&buf[0])<<8|buf[1];return exp?31===exp?sign*(mant?NaN:Infinity):sign*Math.pow(2,exp-25)*(1024+mant):5.960464477539063e-8*sign*mant},exports.parseCBORfloat=function(buf){switch(buf.length){case 2:return exports.parseHalf(buf);case 4:return buf.readFloatBE(0);case 8:return buf.readDoubleBE(0);default:throw new Error("Invalid float size: "+buf.length)}},exports.hex=function(s){return Buffer.from(s.replace(/^0x/,""),"hex")},exports.bin=function(s){let start=0,end=(s=s.replace(/\s/g,"")).length%8||8;const chunks=[];for(;end<=s.length;)chunks.push(parseInt(s.slice(start,end),2)),start=end,end+=8;return Buffer.from(chunks)},exports.arrayEqual=function(a,b){return null==a&&null==b||null!=a&&null!=b&&(a.length===b.length&&a.every(((elem,i)=>elem===b[i])))},exports.bufferEqual=function(a,b){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)||a.length!==b.length)return!1;const len=a.length;let i,j,ret=!0;for(i=j=0;j0?util.inspect(val)+"_"+float_bytes:util.inspect(val)}if(Buffer.isBuffer(val)){const hex=val.toString("hex");return float_bytes===-1/0?hex:`h'${hex}'`}return constants.BigNumber&&constants.BigNumber.isBigNumber(val)?val.toString():"function"==typeof val.inspect?val.inspect():util.inspect(val)},exports.guessEncoding=function(input,encoding){if("string"==typeof input)return new NoFilter(input,null!=encoding?encoding:"hex");if(Buffer.isBuffer(input))return new NoFilter(input);if(ArrayBuffer.isView(input))return new NoFilter(Buffer.from(input.buffer,input.byteOffset,input.byteLength));if(input instanceof ArrayBuffer)return new NoFilter(Buffer.from(input));if(input instanceof stream.Readable)return input;throw new Error("Unknown input type")};const B64URL_SWAPS={"=":"","+":"-","/":"_"};exports.base64url=function(buf){return buf.toString("base64").replace(/[=+/]/g,(c=>B64URL_SWAPS[c]))}},{"./constants":50,buffer:6,"node-inspect-extracted":23,nofilter:24,stream:27,util:46}],58:[function(require,module,exports){"use strict";const Stream=require("stream"),NoFilter=require("nofilter"),TransformStream=Stream.Transform;module.exports=class extends TransformStream{constructor(options){super(options),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new NoFilter,this.__restart()}_transform(fresh,encoding,cb){for(this.bs.write(fresh);this.bs.length>=this.__needed;){let ret;const chunk=null===this.__needed?void 0:this.bs.read(this.__needed);try{ret=this.__parser.next(chunk)}catch(e){return cb(e)}this.__needed&&(this.__fresh=!1),ret.done?(this.push(ret.value),this.__restart()):this.__needed=ret.value||1/0}return cb()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(cb){cb(this.__fresh?null:new Error("unexpected end of input"))}}},{nofilter:24,stream:27}]},{},[48])(48)})); \ No newline at end of file diff --git a/docs/example/bundle-wp.js b/docs/example/bundle-wp.js index a2d4dbaf..2c5ddb5c 100644 --- a/docs/example/bundle-wp.js +++ b/docs/example/bundle-wp.js @@ -9,817 +9,77 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/array-filter/index.js": -/*!********************************************!*\ - !*** ./node_modules/array-filter/index.js ***! - \********************************************/ -/***/ ((module) => { - -eval("\n/**\n * Array#filter.\n *\n * @param {Array} arr\n * @param {Function} fn\n * @param {Object=} self\n * @return {Array}\n * @throw TypeError\n */\n\nmodule.exports = function (arr, fn, self) {\n if (arr.filter) return arr.filter(fn, self);\n if (void 0 === arr || null === arr) throw new TypeError;\n if ('function' != typeof fn) throw new TypeError;\n var ret = [];\n for (var i = 0; i < arr.length; i++) {\n if (!hasOwn.call(arr, i)) continue;\n var val = arr[i];\n if (fn.call(self, val, i, arr)) ret.push(val);\n }\n return ret;\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/array-filter/index.js?"); - -/***/ }), - -/***/ "./node_modules/assert/build/assert.js": +/***/ "../../node_modules/base64-js/index.js": /*!*********************************************!*\ - !*** ./node_modules/assert/build/assert.js ***! + !*** ../../node_modules/base64-js/index.js ***! \*********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n/* provided dependency */ var console = __webpack_require__(/*! console-browserify */ \"./node_modules/console-browserify/index.js\");\n// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = __webpack_require__(/*! ./internal/errors */ \"./node_modules/assert/build/internal/errors.js\"),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\n\nvar AssertionError = __webpack_require__(/*! ./internal/assert/assertion_error */ \"./node_modules/assert/build/internal/assert/assertion_error.js\");\n\nvar _require2 = __webpack_require__(/*! util/ */ \"./node_modules/util/util.js\"),\n inspect = _require2.inspect;\n\nvar _require$types = __webpack_require__(/*! util/ */ \"./node_modules/util/util.js\").types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\n\nvar objectAssign = Object.assign ? Object.assign : __webpack_require__(/*! es6-object-assign */ \"./node_modules/es6-object-assign/index.js\").assign;\nvar objectIs = Object.is ? Object.is : __webpack_require__(/*! object-is */ \"./node_modules/object-is/index.js\");\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\n\nfunction lazyLoadComparison() {\n var comparison = __webpack_require__(/*! ./internal/util/comparisons */ \"./node_modules/assert/build/internal/util/comparisons.js\");\n\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n} // Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\n\n\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\n\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\n\nvar warned = false; // The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {}; // All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\n\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n\n if (argsLen === 2) operator = '!=';\n }\n\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n\n if (message !== undefined) {\n errArgs.message = message;\n }\n\n var err = new AssertionError(errArgs);\n\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n\n throw err;\n}\n\nassert.fail = fail; // The AssertionError is defined in internal/error.\n\nassert.AssertionError = AssertionError;\n\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n} // Pure assertion tests whether a value is truthy, as determined\n// by !!value.\n\n\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\n\nassert.ok = ok; // The equality assertion tests shallow, coercive equality with ==.\n\n/* eslint-disable no-restricted-properties */\n\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n}; // The non-equality assertion tests for whether two objects are not\n// equal with !=.\n\n\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n}; // The equivalence assertion tests a deep equality relation.\n\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n}; // The non-equivalence assertion tests for any deep inequality.\n\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\n\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\n\nvar Comparison = function Comparison(obj, keys, actual) {\n var _this = this;\n\n _classCallCheck(this, Comparison);\n\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && obj[key].test(actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n};\n\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\n\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return expected.test(actual); // assert.doesNotThrow does not accept objects.\n\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n } // Handle primitives properly.\n\n\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n\n var keys = Object.keys(expected); // Special handle errors to make sure the name and the message are compared\n // as well.\n\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && expected[key].test(actual[key])) {\n return;\n }\n\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n } // Guard instanceof against arrow functions as they don't have a prototype.\n\n\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n\n try {\n fn();\n } catch (e) {\n return e;\n }\n\n return NO_EXCEPTION_SENTINEL;\n}\n\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\n\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn(); // Fail in case no promise is returned.\n\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\n\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\n\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n\n throw actual;\n}\n\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\n\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\n\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\n\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\n\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n }); // Make sure we actually have a stack trace!\n\n var origStack = err.stack;\n\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift(); // Filter all frames existing in err.stack.\n\n var tmp1 = newErr.stack.split('\\n');\n\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n\n throw newErr;\n }\n}; // Expose a strict only variant of assert\n\n\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\n\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/assert/build/assert.js?"); - -/***/ }), - -/***/ "./node_modules/assert/build/internal/assert/assertion_error.js": -/*!**********************************************************************!*\ - !*** ./node_modules/assert/build/internal/assert/assertion_error.js ***! - \**********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _require = __webpack_require__(/*! util/ */ \"./node_modules/util/util.js\"),\n inspect = _require.inspect;\n\nvar _require2 = __webpack_require__(/*! ../errors */ \"./node_modules/assert/build/internal/errors.js\"),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\n\n\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n\n while (count) {\n str += str;\n count--;\n }\n\n str += str.substring(0, maxCount - str.length);\n return str;\n}\n\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n}; // Comparing short primitives should just show === / !== instead of using the\n// diff.\n\nvar kMaxShortLength = 10;\n\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\n\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\n\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = ''; // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n } // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n\n\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length; // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n } // Ignore the first characters.\n\n\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n } // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n\n\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n\n var maxLines = Math.max(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n'); // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the expected line to the cache.\n\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++; // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++; // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2; // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = ''; // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n } // Inspected object to big (Show ~20 rows max)\n\n\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\n\nvar AssertionError =\n/*#__PURE__*/\nfunction (_Error) {\n _inherits(AssertionError, _Error);\n\n function AssertionError(options) {\n var _this;\n\n _classCallCheck(this, AssertionError);\n\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n\n if (message != null) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, String(message)));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n } // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n\n\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, createErrDiff(actual, expected, operator)));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n'); // In case \"actual\" is an object, it should not be reference equal.\n\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n } // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (res.length > 27) {\n res.pop();\n }\n } // Only print a single input.\n\n\n if (res.length === 1) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \" \").concat(res[0])));\n } else {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\")));\n }\n } else {\n var _res = inspectValue(actual);\n\n var other = '';\n var knownOperators = kReadableOperator[operator];\n\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(_res).concat(other)));\n }\n }\n\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n } // Create error message including the error code in the name.\n\n\n _this.stack; // Reset the name.\n\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: inspect.custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread({}, ctx, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n\n return AssertionError;\n}(_wrapNativeSuper(Error));\n\nmodule.exports = AssertionError;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/assert/build/internal/assert/assertion_error.js?"); - -/***/ }), - -/***/ "./node_modules/assert/build/internal/errors.js": -/*!******************************************************!*\ - !*** ./node_modules/assert/build/internal/errors.js ***! - \******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n\n/* eslint node-core/alphabetize-errors: \"error\" */\n\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n // The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar codes = {}; // Lazy loaded\n\nvar assert;\nvar util;\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inherits(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n var _this;\n\n _classCallCheck(this, NodeError);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3)));\n _this.code = code;\n return _this;\n }\n\n return NodeError;\n }(Base);\n\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = __webpack_require__(/*! ../assert */ \"./node_modules/assert/build/assert.js\");\n assert(typeof name === 'string', \"'name' must be a string\"); // determiner: 'must be' or 'must not be'\n\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } // TODO(BridgeAR): Improve the output by showing `null` and similar.\n\n\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = __webpack_require__(/*! util/ */ \"./node_modules/util/util.js\");\n var inspected = util.inspect(value);\n\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (assert === undefined) assert = __webpack_require__(/*! ../assert */ \"./node_modules/assert/build/assert.js\");\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/assert/build/internal/errors.js?"); - -/***/ }), - -/***/ "./node_modules/assert/build/internal/util/comparisons.js": -/*!****************************************************************!*\ - !*** ./node_modules/assert/build/internal/util/comparisons.js ***! - \****************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar regexFlagsSupported = /a/g.flags !== undefined;\n\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\n\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\n\nvar objectIs = Object.is ? Object.is : __webpack_require__(/*! object-is */ \"./node_modules/object-is/index.js\");\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : __webpack_require__(/*! is-nan */ \"./node_modules/is-nan/index.js\");\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\n\nvar _require$types = __webpack_require__(/*! util/ */ \"./node_modules/util/util.js\").types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\n\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n } // The maximum size for an array is 2 ** 32 -1.\n\n\n return key.length === 10 && key >= Math.pow(2, 32);\n}\n\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n} // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}\n\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3; // Check if they have the same source and flags\n\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\n\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\n\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\n\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n} // Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n } // Check more closely if val1 and val2 are equal.\n\n\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n\n return false;\n }\n\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n\n if (val1Tag !== val2Tag) {\n return false;\n }\n\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n } // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n\n\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n } // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n\n\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (_keys.length !== _keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\n\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\n\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2); // The pair must have the same number of owned properties.\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n } // Cheap key test\n\n\n var i = 0;\n\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n\n if (symbolKeysA.length !== 0) {\n var count = 0;\n\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n } // Use memos to handle cycles.\n\n\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n\n memos.position++;\n }\n\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\n\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n\n return false;\n} // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\n\n\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n\n case 'object':\n // Only pass in null as object!\n return undefined;\n\n case 'symbol':\n return false;\n\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n\n }\n\n return true;\n}\n\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\n\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n\n if (altValue != null) {\n return altValue;\n }\n\n var curB = b.get(altValue);\n\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\n\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i]; // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n } // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n\n\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null values.\n\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(val);\n }\n }\n\n if (set !== null) {\n var bValues = arrayFromSet(b);\n\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i]; // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n\n return false;\n}\n\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null\n // keys.\n\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n }\n }\n }\n\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n\n return true;\n }\n }\n } // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n\n\n for (i = 0; i < keys.length; i++) {\n var _key = keys[i];\n\n if (!innerDeepEqual(a[_key], b[_key], strict, memos)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\n\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\n\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/assert/build/internal/util/comparisons.js?"); - -/***/ }), - -/***/ "./node_modules/available-typed-arrays/index.js": -/*!******************************************************!*\ - !*** ./node_modules/available-typed-arrays/index.js ***! - \******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar filter = __webpack_require__(/*! array-filter */ \"./node_modules/array-filter/index.js\");\n\nmodule.exports = function availableTypedArrays() {\n\treturn filter([\n\t\t'BigInt64Array',\n\t\t'BigUint64Array',\n\t\t'Float32Array',\n\t\t'Float64Array',\n\t\t'Int16Array',\n\t\t'Int32Array',\n\t\t'Int8Array',\n\t\t'Uint16Array',\n\t\t'Uint32Array',\n\t\t'Uint8Array',\n\t\t'Uint8ClampedArray'\n\t], function (typedArray) {\n\t\treturn typeof __webpack_require__.g[typedArray] === 'function';\n\t});\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/available-typed-arrays/index.js?"); - -/***/ }), - -/***/ "./node_modules/base64-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/base64-js/index.js ***! - \*****************************************/ /***/ ((__unused_webpack_module, exports) => { "use strict"; -eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/base64-js/index.js?"); - -/***/ }), - -/***/ "./node_modules/bignumber.js/bignumber.js": -/*!************************************************!*\ - !*** ./node_modules/bignumber.js/bignumber.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -eval("var __WEBPACK_AMD_DEFINE_RESULT__;;(function (globalObject) {\r\n 'use strict';\r\n\r\n/*\r\n * bignumber.js v9.0.1\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2020 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\n var BigNumber,\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz';\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, P.lt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, P.gt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n function maxOrMin(args, method) {\r\n var n,\r\n i = 1,\r\n m = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n n = new BigNumber(args[i]);\r\n\r\n // If any number is NaN, return NaN.\r\n if (!n.s) {\r\n m = n;\r\n break;\r\n } else if (method.call(m, n)) {\r\n m = n;\r\n }\r\n }\r\n\r\n return m;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = n / pows10[d - j - 1] % 10 | 0;\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) t = yc, yc = xc, xc = t, b = a;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) i = g1, g1 = g2, g2 = i, len -= i;\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n // These functions don't need access to variables,\r\n // e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\n function intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n }\r\n\r\n\r\n // Assumes finite n.\r\n function isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n }\r\n\r\n\r\n function toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n }\r\n\r\n\r\n function toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = clone();\r\n BigNumber['default'] = BigNumber.BigNumber = BigNumber;\r\n\r\n // AMD.\r\n if (true) {\r\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return BigNumber; }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\r\n // Node.js and other environments that support module.exports.\r\n } else {}\r\n})(this);\r\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/bignumber.js/bignumber.js?"); - -/***/ }), - -/***/ "./node_modules/buffer/index.js": -/*!**************************************!*\ - !*** ./node_modules/buffer/index.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var console = __webpack_require__(/*! console-browserify */ \"./node_modules/console-browserify/index.js\");\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nconst base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nconst ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/buffer/index.js?"); - -/***/ }), - -/***/ "./node_modules/call-bind/callBound.js": -/*!*********************************************!*\ - !*** ./node_modules/call-bind/callBound.js ***! - \*********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \"./node_modules/get-intrinsic/index.js\");\n\nvar callBind = __webpack_require__(/*! ./ */ \"./node_modules/call-bind/index.js\");\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/call-bind/callBound.js?"); - -/***/ }), - -/***/ "./node_modules/call-bind/index.js": -/*!*****************************************!*\ - !*** ./node_modules/call-bind/index.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \"./node_modules/get-intrinsic/index.js\");\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/call-bind/index.js?"); +eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack://webpack-demo/../../node_modules/base64-js/index.js?"); /***/ }), -/***/ "./node_modules/cbor/lib/cbor.js": -/*!***************************************!*\ - !*** ./node_modules/cbor/lib/cbor.js ***! - \***************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -eval("\n\nexports.BigNumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\nexports.Commented = __webpack_require__(/*! ./commented */ \"./node_modules/cbor/lib/commented.js\")\nexports.Diagnose = __webpack_require__(/*! ./diagnose */ \"./node_modules/cbor/lib/diagnose.js\")\nexports.Decoder = __webpack_require__(/*! ./decoder */ \"./node_modules/cbor/lib/decoder.js\")\nexports.Encoder = __webpack_require__(/*! ./encoder */ \"./node_modules/cbor/lib/encoder.js\")\nexports.Simple = __webpack_require__(/*! ./simple */ \"./node_modules/cbor/lib/simple.js\")\nexports.Tagged = __webpack_require__(/*! ./tagged */ \"./node_modules/cbor/lib/tagged.js\")\nexports.Map = __webpack_require__(/*! ./map */ \"./node_modules/cbor/lib/map.js\")\n\n/**\n * Convenience name for {@linkcode Commented.comment}\n */\nexports.comment = exports.Commented.comment\n/**\n * Convenience name for {@linkcode Decoder.decodeAll}\n */\nexports.decodeAll = exports.Decoder.decodeAll\n/**\n * Convenience name for {@linkcode Decoder.decodeFirst}\n */\nexports.decodeFirst = exports.Decoder.decodeFirst\n/**\n * Convenience name for {@linkcode Decoder.decodeAllSync}\n */\nexports.decodeAllSync = exports.Decoder.decodeAllSync\n/**\n * Convenience name for {@linkcode Decoder.decodeFirstSync}\n */\nexports.decodeFirstSync = exports.Decoder.decodeFirstSync\n/**\n * Convenience name for {@linkcode Diagnose.diagnose}\n */\nexports.diagnose = exports.Diagnose.diagnose\n/**\n * Convenience name for {@linkcode Encoder.encode}\n */\nexports.encode = exports.Encoder.encode\n/**\n * Convenience name for {@linkcode Encoder.encodeCanonical}\n */\nexports.encodeCanonical = exports.Encoder.encodeCanonical\n/**\n * Convenience name for {@linkcode Encoder.encodeOne}\n */\nexports.encodeOne = exports.Encoder.encodeOne\n/**\n * Convenience name for {@linkcode Encoder.encodeAsync}\n */\nexports.encodeAsync = exports.Encoder.encodeAsync\n/**\n * Convenience name for {@linkcode Decoder.decodeFirstSync}\n */\nexports.decode = exports.Decoder.decodeFirstSync\n\n/**\n * The codec information for\n * {@link https://github.com/Level/encoding-down encoding-down}, which is a\n * codec framework for leveldb. CBOR is a particularly convenient format for\n * both keys and values, as it can deal with a lot of types that JSON can't\n * handle without losing type information.\n *\n * @example\n * const level = require('level')\n * const cbor = require('cbor')\n *\n * const db = level('./db', {\n * keyEncoding: cbor.leveldb,\n * valueEncoding: cbor.leveldb\n * })\n *\n * await db.put({a:1}, 9857298342094820394820394820398234092834n)\n * const val = await db.get({a:1})) // 9857298342094820394820394820398234092834n\n */\nexports.leveldb = {\n decode: exports.Decoder.decodeFirstSync,\n encode: exports.Encoder.encode,\n buffer: true,\n name: 'cbor'\n}\n\n/**\n * Does this library and runtime support BigInts? Only exported for backward\n * compatibility.\n *\n * @deprecated since version 6.0\n */\nexports.hasBigInt = true\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/cbor.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/commented.js": -/*!********************************************!*\ - !*** ./node_modules/cbor/lib/commented.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\n\nconst stream = __webpack_require__(/*! stream */ \"./node_modules/stream-browserify/index.js\")\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\nconst utils = __webpack_require__(/*! ./utils */ \"./node_modules/cbor/lib/utils.js\")\nconst Simple = __webpack_require__(/*! ./simple */ \"./node_modules/cbor/lib/simple.js\")\nconst Decoder = __webpack_require__(/*! ./decoder */ \"./node_modules/cbor/lib/decoder.js\")\nconst constants = __webpack_require__(/*! ./constants */ \"./node_modules/cbor/lib/constants.js\")\nconst bignumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\nconst NoFilter = __webpack_require__(/*! nofilter */ \"./node_modules/nofilter/lib/index.js\")\n\nconst MT = constants.MT\nconst NUMBYTES = constants.NUMBYTES\nconst SYMS = constants.SYMS\n\nfunction plural(c) {\n if (c > 1) {\n return 's'\n } else {\n return ''\n }\n}\n\n/**\n * Generate the expanded format of RFC 7049, section 2.2.1\n *\n * @extends {stream.Transform}\n */\nclass Commented extends stream.Transform {\n /**\n * Create a CBOR commenter.\n *\n * @param {object} [options={}] - Stream options\n * @param {number} [options.max_depth=10] - how many times to indent\n * the dashes\n * @param {number} [options.depth=1] - initial indentation depth\n * @param {boolean} [options.no_summary=false] - if true, omit the summary\n * of the full bytes read at the end\n * @param {object} [options.tags] - mapping from tag number to function(v),\n * where v is the decoded value that comes after the tag, and where the\n * function returns the correctly-created value for that tag.\n */\n constructor(options) {\n const opts = Object.assign({\n depth: 1,\n max_depth: 10,\n no_summary: false\n }, options, {\n readableObjectMode: false,\n writableObjectMode: false\n })\n const max_depth = opts.max_depth\n delete opts.max_depth\n const depth = opts.depth\n delete opts.depth\n super(opts)\n\n this.depth = depth\n this.max_depth = max_depth\n this.all = new NoFilter()\n\n opts.tags = {\n 24: this._tag_24.bind(this)\n }\n this.parser = new Decoder(opts)\n this.parser.on('value', this._on_value.bind(this))\n this.parser.on('start', this._on_start.bind(this))\n this.parser.on('start-string', this._on_start_string.bind(this))\n this.parser.on('stop', this._on_stop.bind(this))\n this.parser.on('more-bytes', this._on_more.bind(this))\n this.parser.on('error', this._on_error.bind(this))\n if (!opts.no_summary) {\n this.parser.on('data', this._on_data.bind(this))\n }\n this.parser.bs.on('read', this._on_read.bind(this))\n }\n\n /**\n * @private\n */\n _tag_24(v) {\n const c = new Commented({depth: this.depth+1, no_summary: true})\n c.on('data', b => this.push(b))\n c.on('error', er => this.emit('error', er))\n c.end(v)\n }\n\n _transform(fresh, encoding, cb) {\n this.parser.write(fresh, encoding, cb)\n }\n\n _flush(cb) {\n // TODO: find the test that covers this, and look at the return value\n return this.parser._flush(cb)\n }\n\n /**\n * @callback commentCallback\n * @param {Error} [error] - if one was generated\n * @param {string} [commented] - the comment string\n */\n\n /**\n * @typedef CommentOptions\n * @property {number} [max_depth=10] how many times to indent the dashes\n * @property {string} [encoding='hex'] encoding of the input\n */\n /**\n * Comment on an input Buffer or string, creating a string passed to the\n * callback. If callback not specified, a promise is returned.\n *\n * @static\n * @param {string|Buffer|ArrayBuffer|Uint8Array|Uint8ClampedArray\n * |DataView|stream.Readable} input\n * @param {CommentOptions|commentCallback|string} [options] or callback\n * @param {commentCallback=} cb\n * @returns {Promise} if cb not specified\n */\n static comment(input, options, cb) {\n if (input == null) {\n throw new Error('input required')\n }\n let encoding = (typeof input === 'string') ? 'hex' : void 0\n let max_depth = 10\n switch (typeof options) {\n case 'function':\n cb = options\n break\n case 'string':\n encoding = options\n break\n case 'number':\n max_depth = options\n break\n case 'object':\n const ref1 = options.encoding\n const ref2 = options.max_depth\n encoding = (ref1 != null) ? ref1 : encoding\n max_depth = (ref2 != null) ? ref2 : max_depth\n break\n case 'undefined':\n break\n default:\n throw new Error('Unknown option type')\n }\n const bs = new NoFilter()\n const d = new Commented({\n max_depth\n })\n let p = null\n if (typeof cb === 'function') {\n d.on('end', () => {\n cb(null, bs.toString('utf8'))\n })\n d.on('error', cb)\n } else {\n p = new Promise((resolve, reject) => {\n d.on('end', () => {\n resolve(bs.toString('utf8'))\n })\n return d.on('error', reject)\n })\n }\n d.pipe(bs)\n utils.guessEncoding(input, encoding).pipe(d)\n return p\n }\n\n /**\n * @private\n */\n _on_error(er) {\n this.push('ERROR: ')\n this.push(er.toString())\n this.push('\\n')\n }\n\n /**\n * @private\n */\n _on_read(buf) {\n this.all.write(buf)\n const hex = buf.toString('hex')\n this.push(new Array(this.depth + 1).join(' '))\n this.push(hex)\n let ind = (this.max_depth - this.depth) * 2\n ind -= hex.length\n if (ind < 1) {\n ind = 1\n }\n this.push(new Array(ind + 1).join(' '))\n return this.push('-- ')\n }\n\n /**\n * @private\n */\n _on_more(mt, len, parent_mt, pos) {\n this.depth++\n let desc = ''\n switch (mt) {\n case MT.POS_INT:\n desc = 'Positive number,'\n break\n case MT.NEG_INT:\n desc = 'Negative number,'\n break\n case MT.ARRAY:\n desc = 'Array, length'\n break\n case MT.MAP:\n desc = 'Map, count'\n break\n case MT.BYTE_STRING:\n desc = 'Bytes, length'\n break\n case MT.UTF8_STRING:\n desc = 'String, length'\n break\n case MT.SIMPLE_FLOAT:\n if (len === 1) {\n desc = 'Simple value,'\n } else {\n desc = 'Float,'\n }\n break\n }\n return this.push(desc + ' next ' + len + ' byte' + (plural(len)) + '\\n')\n }\n\n /**\n * @private\n */\n _on_start_string(mt, tag, parent_mt, pos) {\n this.depth++\n let desc = ''\n switch (mt) {\n case MT.BYTE_STRING:\n desc = 'Bytes, length: ' + tag\n break\n case MT.UTF8_STRING:\n desc = 'String, length: ' + (tag.toString())\n break\n }\n return this.push(desc + '\\n')\n }\n\n /**\n * @private\n */\n _on_start(mt, tag, parent_mt, pos) {\n this.depth++\n if (tag !== SYMS.BREAK) {\n switch (parent_mt) {\n case MT.ARRAY:\n this.push(`[${pos}], `)\n break\n case MT.MAP:\n if (pos % 2) {\n this.push(`{Val:${Math.floor(pos / 2)}}, `)\n } else {\n this.push(`{Key:${Math.floor(pos / 2)}}, `)\n }\n break\n }\n }\n switch (mt) {\n case MT.TAG:\n this.push(`Tag #${tag}`)\n if (tag == 24) {\n this.push(' Encoded CBOR data item')\n }\n break\n case MT.ARRAY:\n if (tag === SYMS.STREAM) {\n this.push('Array (streaming)')\n } else {\n this.push(`Array, ${tag} item${plural(tag)}`)\n }\n break\n case MT.MAP:\n if (tag === SYMS.STREAM) {\n this.push('Map (streaming)')\n } else {\n this.push(`Map, ${tag} pair${plural(tag)}`)\n }\n break\n case MT.BYTE_STRING:\n this.push('Bytes (streaming)')\n break\n case MT.UTF8_STRING:\n this.push('String (streaming)')\n break\n }\n return this.push('\\n')\n }\n\n /**\n * @private\n */\n _on_stop(mt) {\n return this.depth--\n }\n\n /**\n * @private\n */\n _on_value(val, parent_mt, pos, ai) {\n if (val !== SYMS.BREAK) {\n switch (parent_mt) {\n case MT.ARRAY:\n this.push(`[${pos}], `)\n break\n case MT.MAP:\n if (pos % 2) {\n this.push(`{Val:${Math.floor(pos / 2)}}, `)\n } else {\n this.push(`{Key:${Math.floor(pos / 2)}}, `)\n }\n break\n }\n }\n const str = utils.cborValueToString(val, -Infinity)\n\n if ((typeof val === 'string') ||\n (Buffer.isBuffer(val))) {\n if (val.length > 0) {\n this.push(str)\n this.push('\\n')\n }\n this.depth--\n } else {\n this.push(str)\n this.push('\\n')\n }\n\n switch (ai) {\n case NUMBYTES.ONE:\n case NUMBYTES.TWO:\n case NUMBYTES.FOUR:\n case NUMBYTES.EIGHT:\n this.depth--\n }\n }\n\n /**\n * @private\n */\n _on_data() {\n this.push('0x')\n this.push(this.all.read().toString('hex'))\n return this.push('\\n')\n }\n}\n\nmodule.exports = Commented\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/commented.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/constants.js": -/*!********************************************!*\ - !*** ./node_modules/cbor/lib/constants.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -eval("\nconst bignumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\n\n/**\n * @enum {number}\n */\nexports.MT = {\n POS_INT: 0,\n NEG_INT: 1,\n BYTE_STRING: 2,\n UTF8_STRING: 3,\n ARRAY: 4,\n MAP: 5,\n TAG: 6,\n SIMPLE_FLOAT: 7\n}\n\n/**\n * @enum {number}\n */\nexports.TAG = {\n DATE_STRING: 0,\n DATE_EPOCH: 1,\n POS_BIGINT: 2,\n NEG_BIGINT: 3,\n DECIMAL_FRAC: 4,\n BIGFLOAT: 5,\n BASE64URL_EXPECTED: 21,\n BASE64_EXPECTED: 22,\n BASE16_EXPECTED: 23,\n CBOR: 24,\n URI: 32,\n BASE64URL: 33,\n BASE64: 34,\n REGEXP: 35,\n MIME: 36\n}\n\n/**\n * @enum {number}\n */\nexports.NUMBYTES = {\n ZERO: 0,\n ONE: 24,\n TWO: 25,\n FOUR: 26,\n EIGHT: 27,\n INDEFINITE: 31\n}\n\n/**\n * @enum {number}\n */\nexports.SIMPLE = {\n FALSE: 20,\n TRUE: 21,\n NULL: 22,\n UNDEFINED: 23\n}\n\nexports.SYMS = {\n NULL: Symbol('null'),\n UNDEFINED: Symbol('undef'),\n PARENT: Symbol('parent'),\n BREAK: Symbol('break'),\n STREAM: Symbol('stream')\n}\n\nexports.SHIFT32 = 0x100000000\n\nexports.BI = {\n MINUS_ONE: -1n,\n NEG_MAX: -1n - BigInt(Number.MAX_SAFE_INTEGER),\n MAXINT32: 0xffffffffn,\n MAXINT64: 0xffffffffffffffffn,\n SHIFT32: BigInt(exports.SHIFT32)\n}\n\nconst MINUS_ONE = new bignumber(-1)\nexports.BN = {\n MINUS_ONE,\n NEG_MAX: MINUS_ONE.minus(\n new bignumber(Number.MAX_SAFE_INTEGER.toString(16), 16)),\n MAXINT: new bignumber('0x20000000000000'),\n MAXINT32: new bignumber(0xffffffff),\n MAXINT64: new bignumber('0xffffffffffffffff'),\n SHIFT32: new bignumber(exports.SHIFT32)\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/constants.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/decoder.js": +/***/ "../../node_modules/buffer/index.js": /*!******************************************!*\ - !*** ./node_modules/cbor/lib/decoder.js ***! + !*** ../../node_modules/buffer/index.js ***! \******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\n\nconst stream = __webpack_require__(/*! stream */ \"./node_modules/stream-browserify/index.js\")\nconst BinaryParseStream = __webpack_require__(/*! ../vendor/binary-parse-stream */ \"./node_modules/cbor/vendor/binary-parse-stream/index.js\")\nconst Tagged = __webpack_require__(/*! ./tagged */ \"./node_modules/cbor/lib/tagged.js\")\nconst Simple = __webpack_require__(/*! ./simple */ \"./node_modules/cbor/lib/simple.js\")\nconst utils = __webpack_require__(/*! ./utils */ \"./node_modules/cbor/lib/utils.js\")\nconst bignumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\nconst NoFilter = __webpack_require__(/*! nofilter */ \"./node_modules/nofilter/lib/index.js\")\nconst {MT, NUMBYTES, SIMPLE, SYMS, BI, BN} = __webpack_require__(/*! ./constants */ \"./node_modules/cbor/lib/constants.js\")\n\nconst COUNT = Symbol('count')\nconst PENDING_KEY = Symbol('pending_key')\nconst MAJOR = Symbol('major type')\nconst ERROR = Symbol('error')\nconst NOT_FOUND = Symbol('not found')\n\nfunction parentArray(parent, typ, count) {\n const a = []\n a[COUNT] = count\n a[SYMS.PARENT] = parent\n a[MAJOR] = typ\n return a\n}\n\nfunction parentBufferStream(parent, typ) {\n const b = new NoFilter()\n b[COUNT] = -1\n b[SYMS.PARENT] = parent\n b[MAJOR] = typ\n return b\n}\n\n/**\n * @param {Buffer} v\n * @private\n */\nfunction _tag_2(v) {\n return utils.bufferToBigInt(v)\n}\n\n/**\n * @param {BigInt} v\n * @private\n */\nfunction _tag_3(v) {\n // avoid syntax error on old runtimes\n return BI.MINUS_ONE - utils.bufferToBigInt(v)\n}\n\nclass UnexpectedDataError extends Error {\n constructor(message, value) {\n super(message)\n this.name = 'UnexpectedDataError'\n this.value = value\n }\n}\n\n/**\n * Decode a stream of CBOR bytes by transforming them into equivalent\n * JavaScript data. Because of the limitations of Node object streams,\n * special symbols are emitted instead of NULL or UNDEFINED. Fix those\n * up by calling {@link Decoder.nullcheck}.\n *\n * @extends {BinaryParseStream}\n */\nclass Decoder extends BinaryParseStream {\n\n /**\n * Create a parsing stream.\n *\n * @param {object} [options={}]\n * @param {number} [options.max_depth=-1] - the maximum depth to parse.\n * Use -1 for \"until you run out of memory\". Set this to a finite\n * positive number for un-trusted inputs. Most standard inputs won't nest\n * more than 100 or so levels; I've tested into the millions before\n * running out of memory.\n * @param {object} [options.tags] - mapping from tag number to function(v),\n * where v is the decoded value that comes after the tag, and where the\n * function returns the correctly-created value for that tag.\n * @param {boolean} [options.bigint=true] generate JavaScript BigInt's\n * instead of BigNumbers, when possible.\n */\n constructor(options) {\n options = options || {}\n const tags = options.tags\n delete options.tags\n const max_depth = (options.max_depth != null) ? options.max_depth : -1\n delete options.max_depth\n const bigI = (options.bigint != null) ? options.bigint : true\n delete options.bigint\n super(options)\n\n this.running = true\n this.max_depth = max_depth\n this.tags = tags\n this.bigint = bigI\n if (bigI) {\n if (this.tags == null) {\n this.tags = {}\n }\n if (this.tags[2] == null) {\n this.tags[2] = _tag_2\n }\n if (this.tags[3] == null) {\n this.tags[3] = _tag_3\n }\n }\n }\n\n /**\n * Check the given value for a symbol encoding a NULL or UNDEFINED value in\n * the CBOR stream.\n *\n * @static\n * @param {any} val - the value to check\n * @returns {any} the corrected value\n *\n * @example\n * myDecoder.on('data', function(val) {\n * val = Decoder.nullcheck(val);\n * ...\n * });\n */\n static nullcheck(val) {\n switch (val) {\n case SYMS.NULL:\n return null\n case SYMS.UNDEFINED:\n return undefined\n case NOT_FOUND:\n throw new Error('Value not found')\n default:\n return val\n }\n }\n\n /**\n * @typedef DecodeOptions\n * @property {string} [encoding='hex'] - The encoding of the input.\n * Ignored if input is a Buffer.\n */\n\n /**\n * Decode the first CBOR item in the input, synchronously. This will throw an\n * exception if the input is not valid CBOR.\n *\n * @static\n * @param {string|Buffer|ArrayBuffer|Uint8Array|Uint8ClampedArray\n * |DataView|stream.Readable} input\n * @param {DecodeOptions|string} [options] Options\n * @returns {any} - the decoded value\n */\n static decodeFirstSync(input, options) {\n options = options || { encoding: 'hex' }\n let opts = {}\n let encod\n switch (typeof options) {\n case 'string':\n encod = options\n break\n case 'object':\n opts = utils.extend({}, options)\n encod = opts.encoding\n delete opts.encoding\n break\n }\n const c = new Decoder(opts)\n const s = utils.guessEncoding(input, encod)\n\n // for/of doesn't work when you need to call next() with a value\n // generator created by parser will be \"done\" after each CBOR entity\n // parser will yield numbers of bytes that it wants\n const parser = c._parse()\n let state = parser.next()\n while (!state.done) {\n const b = s.read(state.value)\n if ((b == null) || (b.length !== state.value)) {\n throw new Error('Insufficient data')\n }\n state = parser.next(b)\n }\n const val = Decoder.nullcheck(state.value)\n if (s.length > 0) {\n const nextByte = s.read(1)\n s.unshift(nextByte)\n throw new UnexpectedDataError(\n 'Unexpected data: 0x' + nextByte[0].toString(16),\n val)\n }\n return val\n }\n\n /**\n * Decode all of the CBOR items in the input into an array. This will throw\n * an exception if the input is not valid CBOR; a zero-length input will\n * return an empty array.\n *\n * @static\n * @param {string|Buffer|ArrayBuffer|Uint8Array|Uint8ClampedArray\n * |DataView|stream.Readable} input\n * @param {DecodeOptions|string} [options] Options or encoding string\n * @returns {Array} - Array of all found items\n */\n static decodeAllSync(input, options) {\n options = options || { encoding: 'hex' }\n let opts = {}\n let encod\n switch (typeof options) {\n case 'string':\n encod = options\n break\n case 'object':\n opts = utils.extend({}, options)\n encod = opts.encoding\n delete opts.encoding\n }\n const c = new Decoder(opts)\n const s = utils.guessEncoding(input, encod)\n const res = []\n while (s.length > 0) {\n const parser = c._parse()\n let state = parser.next()\n while (!state.done) {\n const b = s.read(state.value)\n if ((b == null) || (b.length !== state.value)) {\n throw new Error('Insufficient data')\n }\n state = parser.next(b)\n }\n res.push(Decoder.nullcheck(state.value))\n }\n return res\n }\n\n /**\n * @callback decodeCallback\n * @param {Error} [error] - if one was generated\n * @param {any} [value] - the decoded value\n */\n\n /**\n * Decode the first CBOR item in the input. This will error if there are more\n * bytes left over at the end, and optionally if there were no valid CBOR\n * bytes in the input. Emits the {Decoder.NOT_FOUND} Symbol in the callback\n * if no data was found and the `required` option is false.\n *\n * @static\n * @param {string|Buffer|ArrayBuffer|Uint8Array|Uint8ClampedArray\n * |DataView|stream.Readable} input\n * @param {DecodeOptions|decodeCallback|string} [options] - options\n * @param {decodeCallback} [cb] callback\n * @returns {Promise} returned even if callback is specified\n */\n static decodeFirst(input, options, cb) {\n let opts = {}\n let required = false\n let encod = 'hex'\n switch (typeof options) {\n case 'function':\n cb = options\n break\n case 'string':\n encod = options\n break\n case 'object':\n opts = utils.extend({}, options)\n encod = opts.encoding\n delete opts.encoding\n required = (opts.required != null) ? opts.required : false\n delete opts.required\n }\n const c = new Decoder(opts)\n let v = NOT_FOUND\n const p = new Promise((resolve, reject) => {\n c.on('data', (val) => {\n v = Decoder.nullcheck(val)\n c.close()\n })\n c.once('error', (er) => {\n if (v !== NOT_FOUND) {\n er['value'] = v\n }\n v = ERROR\n c.close()\n return reject(er)\n })\n c.once('end', () => {\n switch (v) {\n case NOT_FOUND:\n if (required) {\n return reject(new Error('No CBOR found'))\n } else {\n return resolve(v)\n }\n case ERROR:\n return void 0\n default:\n return resolve(v)\n }\n })\n })\n\n if (typeof cb === 'function') {\n p.then(v => cb(null, v), cb)\n }\n utils.guessEncoding(input, encod).pipe(c)\n return p\n }\n\n /**\n * @callback decodeAllCallback\n * @param {Error} error - if one was generated\n * @param {Array} value - all of the decoded values, wrapped in an Array\n */\n\n /**\n * Decode all of the CBOR items in the input. This will error if there are\n * more bytes left over at the end.\n *\n * @static\n * @param {string|Buffer|ArrayBuffer|Uint8Array|Uint8ClampedArray\n * |DataView|stream.Readable} input\n * @param {string|Object} options - Decoding options.\n * If string, the input encoding.\n * @param {decodeAllCallback} [cb] callback\n * @returns {Promise} even if callback is specified\n */\n static decodeAll(input, options, cb) {\n let opts = {}\n let encod = 'hex'\n switch (typeof options) {\n case 'function':\n cb = options\n break\n case 'string':\n encod = options\n break\n case 'object':\n opts = utils.extend({}, options)\n encod = opts.encoding\n delete opts.encoding\n }\n const c = new Decoder(opts)\n const vals = []\n c.on('data', (val) => {\n return vals.push(Decoder.nullcheck(val))\n })\n const p = new Promise((resolve, reject) => {\n c.on('error', reject)\n c.on('end', () => resolve(vals))\n })\n if (typeof cb === 'function') {\n p.then(v => cb(undefined, v), er => cb(er, undefined))\n }\n utils.guessEncoding(input, encod).pipe(c)\n return p\n }\n\n /**\n * Stop processing\n */\n close() {\n this.running = false\n this.__fresh = true\n }\n\n /**\n * @ignore\n * @returns {Generator}\n */\n *_parse() {\n let parent = null\n let depth = 0\n let val = null\n while (true) {\n if ((this.max_depth >= 0) && (depth > this.max_depth)) {\n throw new Error('Maximum depth ' + this.max_depth + ' exceeded')\n }\n const octet = (yield 1)[0]\n if (!this.running) {\n throw new Error('Unexpected data: 0x' + (octet.toString(16)))\n }\n const mt = octet >> 5\n const ai = octet & 0x1f\n const parent_major = (parent != null) ? parent[MAJOR] : undefined\n const parent_length = (parent != null) ? parent.length : undefined\n switch (ai) {\n case NUMBYTES.ONE:\n this.emit('more-bytes', mt, 1, parent_major, parent_length)\n val = (yield 1)[0]\n break\n case NUMBYTES.TWO:\n case NUMBYTES.FOUR:\n case NUMBYTES.EIGHT:\n const numbytes = 1 << (ai - 24)\n this.emit('more-bytes', mt, numbytes, parent_major, parent_length)\n const buf = yield numbytes\n val = (mt === MT.SIMPLE_FLOAT) ?\n buf :\n utils.parseCBORint(ai, buf, this.bigint)\n break\n case 28:\n case 29:\n case 30:\n this.running = false\n throw new Error('Additional info not implemented: ' + ai)\n case NUMBYTES.INDEFINITE:\n switch (mt) {\n case MT.POS_INT:\n case MT.NEG_INT:\n case MT.TAG:\n throw new Error(`Invalid indefinite encoding for MT ${mt}`)\n }\n val = -1\n break\n default:\n val = ai\n }\n switch (mt) {\n case MT.POS_INT:\n // val already decoded\n break\n case MT.NEG_INT:\n if (val === Number.MAX_SAFE_INTEGER) {\n val = this.bigint ? BI.NEG_MAX : BN.NEG_MAX\n } else if (val instanceof bignumber) {\n val = BN.MINUS_ONE.minus(val)\n } else {\n val = (typeof val === 'bigint') ? -1n - val : -1 - val\n }\n break\n case MT.BYTE_STRING:\n case MT.UTF8_STRING:\n switch (val) {\n case 0:\n this.emit('start-string', mt, val, parent_major, parent_length)\n val = (mt === MT.BYTE_STRING) ? Buffer.allocUnsafe(0) : ''\n break\n case -1:\n this.emit('start', mt, SYMS.STREAM, parent_major, parent_length)\n parent = parentBufferStream(parent, mt)\n depth++\n continue\n default:\n this.emit('start-string', mt, val, parent_major, parent_length)\n val = yield val\n if (mt === MT.UTF8_STRING) {\n val = utils.utf8(val)\n }\n }\n break\n case MT.ARRAY:\n case MT.MAP:\n switch (val) {\n case 0:\n val = (mt === MT.MAP) ? {} : []\n break\n case -1:\n this.emit('start', mt, SYMS.STREAM, parent_major, parent_length)\n parent = parentArray(parent, mt, -1)\n depth++\n continue\n default:\n this.emit('start', mt, val, parent_major, parent_length)\n parent = parentArray(parent, mt, val * (mt - 3))\n depth++\n continue\n }\n break\n case MT.TAG:\n this.emit('start', mt, val, parent_major, parent_length)\n parent = parentArray(parent, mt, 1)\n parent.push(val)\n depth++\n continue\n case MT.SIMPLE_FLOAT:\n if (typeof val === 'number') {\n if ((ai === NUMBYTES.ONE) && (val < 32)) {\n throw new Error(\n `Invalid two-byte encoding of simple value ${val}`\n )\n }\n const hasParent = (parent != null)\n val = Simple.decode(\n val,\n hasParent,\n hasParent && (parent[COUNT] < 0))\n } else {\n val = utils.parseCBORfloat(val)\n }\n }\n this.emit('value', val, parent_major, parent_length, ai)\n let again = false\n while (parent != null) {\n switch (false) {\n case val !== SYMS.BREAK:\n parent[COUNT] = 1\n break\n case !Array.isArray(parent):\n parent.push(val)\n break\n case !(parent instanceof NoFilter):\n const pm = parent[MAJOR]\n if ((pm != null) && (pm !== mt)) {\n this.running = false\n throw new Error('Invalid major type in indefinite encoding')\n }\n parent.write(val)\n }\n if ((--parent[COUNT]) !== 0) {\n again = true\n break\n }\n --depth\n delete parent[COUNT]\n\n if (Array.isArray(parent)) {\n switch (parent[MAJOR]) {\n case MT.ARRAY:\n val = parent\n break\n case MT.MAP:\n let allstrings = true\n if ((parent.length % 2) !== 0) {\n throw new Error('Invalid map length: ' + parent.length)\n }\n for (let i = 0, len = parent.length; i < len; i += 2) {\n if (typeof parent[i] !== 'string') {\n allstrings = false\n break\n }\n }\n if (allstrings) {\n val = {}\n for (let i = 0, len = parent.length; i < len; i += 2) {\n val[parent[i]] = parent[i + 1]\n }\n } else {\n val = new Map\n for (let i = 0, len = parent.length; i < len; i += 2) {\n val.set(parent[i], parent[i + 1])\n }\n }\n break\n case MT.TAG:\n const t = new Tagged(parent[0], parent[1])\n val = t.convert(this.tags)\n break\n }\n } else if (parent instanceof NoFilter) {\n switch (parent[MAJOR]) {\n case MT.BYTE_STRING:\n val = parent.slice()\n break\n case MT.UTF8_STRING:\n val = parent.toString('utf-8')\n break\n }\n }\n this.emit('stop', parent[MAJOR])\n\n const old = parent\n parent = parent[SYMS.PARENT]\n delete old[SYMS.PARENT]\n delete old[MAJOR]\n }\n if (!again) {\n return val\n }\n }\n }\n}\n\nDecoder.NOT_FOUND = NOT_FOUND\nmodule.exports = Decoder\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/decoder.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/diagnose.js": -/*!*******************************************!*\ - !*** ./node_modules/cbor/lib/diagnose.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nconst stream = __webpack_require__(/*! stream */ \"./node_modules/stream-browserify/index.js\")\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\nconst Decoder = __webpack_require__(/*! ./decoder */ \"./node_modules/cbor/lib/decoder.js\")\nconst Simple = __webpack_require__(/*! ./simple */ \"./node_modules/cbor/lib/simple.js\")\nconst utils = __webpack_require__(/*! ./utils */ \"./node_modules/cbor/lib/utils.js\")\nconst constants = __webpack_require__(/*! ./constants */ \"./node_modules/cbor/lib/constants.js\")\nconst bignumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\nconst NoFilter = __webpack_require__(/*! nofilter */ \"./node_modules/nofilter/lib/index.js\")\n\nconst MT = constants.MT\nconst SYMS = constants.SYMS\n\n/**\n * Output the diagnostic format from a stream of CBOR bytes.\n *\n * @extends {stream.Transform}\n */\nclass Diagnose extends stream.Transform {\n\n /**\n * Creates an instance of Diagnose.\n *\n * @param {Object} [options={}] - options for creation\n * @param {string} [options.separator='\\n'] - output between detected objects\n * @param {boolean} [options.stream_errors=false] - put error info into the\n * output stream\n * @param {number} [options.max_depth=-1] - -1 for \"until you run out of\n * memory\". Set this to a finite positive number for un-trusted inputs.\n * Most standard inputs won't nest more than 100 or so levels; I've tested\n * into the millions before running out of memory.\n */\n constructor(options) {\n const opts = Object.assign({\n separator: '\\n',\n stream_errors: false\n }, options, {\n readableObjectMode: false,\n writableObjectMode: false\n })\n const separator = opts.separator\n delete opts.separator\n const stream_errors = opts.stream_errors\n delete opts.stream_errors\n super(opts)\n\n this.float_bytes = -1\n this.separator = separator\n this.stream_errors = stream_errors\n this.parser = new Decoder(opts)\n this.parser.on('more-bytes', this._on_more.bind(this))\n this.parser.on('value', this._on_value.bind(this))\n this.parser.on('start', this._on_start.bind(this))\n this.parser.on('stop', this._on_stop.bind(this))\n this.parser.on('data', this._on_data.bind(this))\n this.parser.on('error', this._on_error.bind(this))\n }\n\n _transform(fresh, encoding, cb) {\n return this.parser.write(fresh, encoding, cb)\n }\n\n _flush(cb) {\n return this.parser._flush((er) => {\n if (this.stream_errors) {\n if (er) {\n this._on_error(er)\n }\n return cb()\n } else {\n return cb(er)\n }\n })\n }\n\n /**\n * Convenience function to return a string in diagnostic format.\n *\n * @param {string|Buffer|ArrayBuffer|Uint8Array|Uint8ClampedArray\n * |DataView|stream.Readable} input - the CBOR bytes to format\n * @param {string} [encoding='hex'] - the encoding of input, ignored if\n * input is not string\n * @param {function(Error, string): undefined} [cb] - callback\n * @returns {Promise} if callback not specified\n */\n static diagnose(input, encoding, cb) {\n if (input == null) {\n throw new Error('input required')\n }\n let opts = {}\n let encod = 'hex'\n switch (typeof encoding) {\n case 'function':\n cb = encoding\n break\n case 'object':\n opts = utils.extend({}, encoding)\n encod = opts.encoding\n delete opts.encoding\n break\n case 'string':\n encod = encoding\n break\n }\n const bs = new NoFilter()\n const d = new Diagnose(opts)\n let p = null\n if (typeof cb === 'function') {\n d.on('end', () => cb(null, bs.toString('utf8')))\n d.on('error', cb)\n } else {\n p = new Promise((resolve, reject) => {\n d.on('end', () => resolve(bs.toString('utf8')))\n return d.on('error', reject)\n })\n }\n d.pipe(bs)\n utils.guessEncoding(input, encod).pipe(d)\n return p\n }\n\n _on_error(er) {\n if (this.stream_errors) {\n return this.push(er.toString())\n } else {\n return this.emit('error', er)\n }\n }\n\n _on_more(mt, len, parent_mt, pos) {\n if (mt === MT.SIMPLE_FLOAT) {\n return this.float_bytes = {\n 2: 1,\n 4: 2,\n 8: 3\n }[len]\n }\n }\n\n _fore(parent_mt, pos) {\n switch (parent_mt) {\n case MT.BYTE_STRING:\n case MT.UTF8_STRING:\n case MT.ARRAY:\n if (pos > 0) {\n return this.push(', ')\n }\n break\n case MT.MAP:\n if (pos > 0) {\n if (pos % 2) {\n return this.push(': ')\n } else {\n return this.push(', ')\n }\n }\n }\n }\n\n _on_value(val, parent_mt, pos) {\n if (val === SYMS.BREAK) {\n return\n }\n this._fore(parent_mt, pos)\n const fb = this.float_bytes\n this.float_bytes = -1\n return this.push(utils.cborValueToString(val, fb))\n }\n\n _on_start(mt, tag, parent_mt, pos) {\n this._fore(parent_mt, pos)\n switch (mt) {\n case MT.TAG:\n this.push(`${tag}(`)\n break\n case MT.ARRAY:\n this.push('[')\n break\n case MT.MAP:\n this.push('{')\n break\n case MT.BYTE_STRING:\n case MT.UTF8_STRING:\n this.push('(')\n break\n }\n if (tag === SYMS.STREAM) {\n return this.push('_ ')\n }\n }\n\n _on_stop(mt) {\n switch (mt) {\n case MT.TAG:\n return this.push(')')\n case MT.ARRAY:\n return this.push(']')\n case MT.MAP:\n return this.push('}')\n case MT.BYTE_STRING:\n case MT.UTF8_STRING:\n return this.push(')')\n }\n }\n\n _on_data() {\n return this.push(this.separator)\n }\n}\n\nmodule.exports = Diagnose\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/diagnose.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/encoder.js": -/*!******************************************!*\ - !*** ./node_modules/cbor/lib/encoder.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\n\nconst stream = __webpack_require__(/*! stream */ \"./node_modules/stream-browserify/index.js\")\nconst url = __webpack_require__(/*! url */ \"./node_modules/url/url.js\")\nconst bignumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\nconst NoFilter = __webpack_require__(/*! nofilter */ \"./node_modules/nofilter/lib/index.js\")\nconst Tagged = __webpack_require__(/*! ./tagged */ \"./node_modules/cbor/lib/tagged.js\")\nconst Simple = __webpack_require__(/*! ./simple */ \"./node_modules/cbor/lib/simple.js\")\nconst utils = __webpack_require__(/*! ./utils */ \"./node_modules/cbor/lib/utils.js\")\nconst {\n MT, NUMBYTES, SHIFT32, SIMPLE, SYMS, TAG, BI, BN\n} = __webpack_require__(/*! ./constants */ \"./node_modules/cbor/lib/constants.js\")\n\nconst HALF = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.TWO\nconst FLOAT = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.FOUR\nconst DOUBLE = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.EIGHT\nconst TRUE = (MT.SIMPLE_FLOAT << 5) | SIMPLE.TRUE\nconst FALSE = (MT.SIMPLE_FLOAT << 5) | SIMPLE.FALSE\nconst UNDEFINED = (MT.SIMPLE_FLOAT << 5) | SIMPLE.UNDEFINED\nconst NULL = (MT.SIMPLE_FLOAT << 5) | SIMPLE.NULL\n\nconst BREAK = Buffer.from([0xff])\nconst BUF_NAN = Buffer.from('f97e00', 'hex')\nconst BUF_INF_NEG = Buffer.from('f9fc00', 'hex')\nconst BUF_INF_POS = Buffer.from('f97c00', 'hex')\nconst BUF_NEG_ZERO = Buffer.from('f98000', 'hex')\nconst LOOP_DETECT = Symbol('CBOR_LOOP_DETECT')\n\n/**\n * @param {string} str\n * @returns {\"number\"|\"float\"|\"int\"|\"string\"}\n */\nfunction parseDateType(str) {\n if (!str) {\n return 'number'\n }\n switch (str.toLowerCase()) {\n // yes, return str would have made more sense, but tsc is pedantic\n case 'number':\n return 'number'\n case 'float':\n return 'float'\n case 'int':\n return 'int'\n case 'string':\n return 'string'\n }\n throw new TypeError(`dateType invalid, got \"${str}\"`)\n}\n\n/**\n * Transform JavaScript values into CBOR bytes. The `Writable` side of\n * the stream is in object mode.\n *\n * @extends {stream.Transform}\n */\nclass Encoder extends stream.Transform {\n\n /**\n * Creates an instance of Encoder.\n *\n * @param {Object} [options={}] - options for the encoder\n * @param {any[]|Object} [options.genTypes=[]] - array of pairs of\n * `type`, `function(Encoder)` for semantic types to be encoded. Not\n * needed for Array, Date, Buffer, Map, RegExp, Set, Url, or bignumber.\n * If an object, the keys are the constructor names for the types.\n * @param {boolean} [options.canonical=false] - should the output be\n * canonicalized\n * @param {boolean|Symbol} [options.detectLoops=false] - should object loops\n * be detected? This will currently modify the encoded object graph by\n * adding a Symbol property to each object. If this bothers you, call\n * `removeLoopDetectors` on the encoded object when done. Do not encode\n * the same object twice on the same encoder, without calling\n * `removeLoopDetectors` in between.\n * @param {(\"number\"|\"float\"|\"int\"|\"string\")} [options.dateType=\"number\"] -\n * how should dates be encoded? \"number\" means float or int, if no\n * fractional seconds.\n * @param {any} [options.encodeUndefined=undefined] - How should an\n * \"undefined\" in the input be encoded. By default, just encode a CBOR\n * undefined. If this is a buffer, use those bytes without re-encoding\n * them. If this is a function, the function will be called (which is a\n * good time to throw an exception, if that's what you want), and the\n * return value will be used according to these rules. Anything else will\n * be encoded as CBOR.\n * @param {boolean} [options.disallowUndefinedKeys=false] - Should\n * \"undefined\" be disallowed as a key in a Map that is serialized? If\n * this is true, encode(new Map([[undefined, 1]])) will throw an\n * exception. Note that it is impossible to get a key of undefined in a\n * normal JS object.\n * @param {boolean} [options.collapseBigIntegers=false] - Should integers\n * that come in as BigNumber integers and ECMAscript bigint's be encoded\n * as normal CBOR integers if they fit, discarding type information?\n */\n constructor(options) {\n const opts = Object.assign({}, options, {\n readableObjectMode: false,\n writableObjectMode: true\n })\n super(opts)\n\n this.canonical = opts.canonical\n this.encodeUndefined = opts.encodeUndefined\n this.disallowUndefinedKeys = !!opts.disallowUndefinedKeys\n this.dateType = parseDateType(opts.dateType)\n this.collapseBigIntegers = this.canonical ?\n true : !!opts.collapseBigIntegers\n\n // new Symbol for each instance. Note: means we can't re-use the same\n // encoder and encoded object\n if (typeof(opts.detectLoops) === 'symbol') {\n this.detectLoops = opts.detectLoops\n } else {\n this.detectLoops = !!opts.detectLoops ? Symbol('CBOR_DETECT') : null\n }\n\n this.semanticTypes = {\n Array: this._pushArray,\n Date: this._pushDate,\n Buffer: this._pushBuffer,\n Map: this._pushMap,\n NoFilter: this._pushNoFilter,\n RegExp: this._pushRegexp,\n Set: this._pushSet,\n BigNumber: this._pushBigNumber,\n ArrayBuffer: this._pushUint8Array,\n Uint8ClampedArray: this._pushUint8Array,\n Uint8Array: this._pushUint8Array,\n Uint16Array: this._pushArray,\n Uint32Array: this._pushArray,\n Int8Array: this._pushArray,\n Int16Array: this._pushArray,\n Int32Array: this._pushArray,\n Float32Array: this._pushFloat32Array,\n Float64Array: this._pushFloat64Array\n }\n\n // tsc doesn't know about old Url\n if (url['Url']) {\n this.addSemanticType('Url', this._pushUrl)\n }\n if (url['URL']) {\n this.addSemanticType('URL', this._pushURL)\n }\n\n const addTypes = opts.genTypes || []\n if (Array.isArray(addTypes)) {\n for (let i = 0, len = addTypes.length; i < len; i += 2) {\n this.addSemanticType(addTypes[i], addTypes[i + 1])\n }\n } else {\n for (const [k, v] of Object.entries(addTypes)) {\n this.addSemanticType(k, v)\n }\n }\n }\n\n _transform(fresh, encoding, cb) {\n const ret = this.pushAny(fresh)\n // Old transformers might not return bool. undefined !== false\n return cb((ret === false) ? new Error('Push Error') : undefined)\n }\n\n _flush(cb) {\n return cb()\n }\n\n /**\n * @callback encodeFunction\n * @param {Encoder} encoder - the encoder to serialize into. Call \"write\"\n * on the encoder as needed.\n * @return {bool} - true on success, else false\n */\n\n /**\n * Add an encoding function to the list of supported semantic types. This is\n * useful for objects for which you can't add an encodeCBOR method\n *\n * @param {any} type\n * @param {any} fun\n * @returns {encodeFunction}\n */\n addSemanticType(type, fun) {\n const typeName = (typeof type === 'string') ? type : type.name\n const old = this.semanticTypes[typeName]\n\n if (fun) {\n if (typeof fun !== 'function') {\n throw new TypeError('fun must be of type function')\n }\n this.semanticTypes[typeName] = fun\n } else if (old) {\n delete this.semanticTypes[typeName]\n }\n return old\n }\n\n _pushUInt8(val) {\n const b = Buffer.allocUnsafe(1)\n b.writeUInt8(val, 0)\n return this.push(b)\n }\n\n _pushUInt16BE(val) {\n const b = Buffer.allocUnsafe(2)\n b.writeUInt16BE(val, 0)\n return this.push(b)\n }\n\n _pushUInt32BE(val) {\n const b = Buffer.allocUnsafe(4)\n b.writeUInt32BE(val, 0)\n return this.push(b)\n }\n\n _pushFloatBE(val) {\n const b = Buffer.allocUnsafe(4)\n b.writeFloatBE(val, 0)\n return this.push(b)\n }\n\n _pushDoubleBE(val) {\n const b = Buffer.allocUnsafe(8)\n b.writeDoubleBE(val, 0)\n return this.push(b)\n }\n\n _pushNaN() {\n return this.push(BUF_NAN)\n }\n\n _pushInfinity(obj) {\n const half = (obj < 0) ? BUF_INF_NEG : BUF_INF_POS\n return this.push(half)\n }\n\n _pushFloat(obj) {\n if (this.canonical) {\n // TODO: is this enough slower to hide behind canonical?\n // It's certainly enough of a hack (see utils.parseHalf)\n\n // From section 3.9:\n // If a protocol allows for IEEE floats, then additional canonicalization\n // rules might need to be added. One example rule might be to have all\n // floats start as a 64-bit float, then do a test conversion to a 32-bit\n // float; if the result is the same numeric value, use the shorter value\n // and repeat the process with a test conversion to a 16-bit float. (This\n // rule selects 16-bit float for positive and negative Infinity as well.)\n\n // which seems pretty much backwards to me.\n const b2 = Buffer.allocUnsafe(2)\n if (utils.writeHalf(b2, obj)) {\n // I have convinced myself that there are no cases where writeHalf\n // will return true but `utils.parseHalf(b2) !== obj)`\n return this._pushUInt8(HALF) && this.push(b2)\n }\n }\n if (Math.fround(obj) === obj) {\n return this._pushUInt8(FLOAT) && this._pushFloatBE(obj)\n }\n\n return this._pushUInt8(DOUBLE) && this._pushDoubleBE(obj)\n }\n\n _pushInt(obj, mt, orig) {\n const m = mt << 5\n switch (false) {\n case !(obj < 24):\n return this._pushUInt8(m | obj)\n case !(obj <= 0xff):\n return this._pushUInt8(m | NUMBYTES.ONE) && this._pushUInt8(obj)\n case !(obj <= 0xffff):\n return this._pushUInt8(m | NUMBYTES.TWO) && this._pushUInt16BE(obj)\n case !(obj <= 0xffffffff):\n return this._pushUInt8(m | NUMBYTES.FOUR) && this._pushUInt32BE(obj)\n case !(obj <= Number.MAX_SAFE_INTEGER):\n return this._pushUInt8(m | NUMBYTES.EIGHT) &&\n this._pushUInt32BE(Math.floor(obj / SHIFT32)) &&\n this._pushUInt32BE(obj % SHIFT32)\n default:\n if (mt === MT.NEG_INT) {\n return this._pushFloat(orig)\n } else {\n return this._pushFloat(obj)\n }\n }\n }\n\n _pushIntNum(obj) {\n if (Object.is(obj, -0)) {\n return this.push(BUF_NEG_ZERO)\n }\n\n if (obj < 0) {\n return this._pushInt(-obj - 1, MT.NEG_INT, obj)\n } else {\n return this._pushInt(obj, MT.POS_INT)\n }\n }\n\n _pushNumber(obj) {\n switch (false) {\n case !isNaN(obj):\n return this._pushNaN()\n case isFinite(obj):\n return this._pushInfinity(obj)\n case Math.round(obj) !== obj:\n return this._pushIntNum(obj)\n default:\n return this._pushFloat(obj)\n }\n }\n\n _pushString(obj) {\n const len = Buffer.byteLength(obj, 'utf8')\n return this._pushInt(len, MT.UTF8_STRING) && this.push(obj, 'utf8')\n }\n\n _pushBoolean(obj) {\n return this._pushUInt8(obj ? TRUE : FALSE)\n }\n\n _pushUndefined(obj) {\n switch (typeof this.encodeUndefined) {\n case 'undefined':\n return this._pushUInt8(UNDEFINED)\n case 'function':\n return this.pushAny(this.encodeUndefined.call(this, obj))\n case 'object':\n if (Buffer.isBuffer(this.encodeUndefined)) {\n return this.push(this.encodeUndefined)\n }\n }\n return this.pushAny(this.encodeUndefined)\n }\n\n _pushNull(obj) {\n return this._pushUInt8(NULL)\n }\n\n _pushArray(gen, obj, opts) {\n opts = Object.assign({\n indefinite: false\n }, opts)\n const len = obj.length\n if (opts.indefinite) {\n if (!gen._pushUInt8((MT.ARRAY << 5) | NUMBYTES.INDEFINITE)) {\n return false\n }\n } else if (!gen._pushInt(len, MT.ARRAY)) {\n return false\n }\n for (let j = 0; j < len; j++) {\n if (!gen.pushAny(obj[j])) {\n return false\n }\n }\n if (opts.indefinite) {\n if (!gen.push(BREAK)) {\n return false\n }\n }\n return true\n }\n\n _pushTag(tag) {\n return this._pushInt(tag, MT.TAG)\n }\n\n _pushDate(gen, obj) {\n switch (gen.dateType) {\n case 'string':\n return gen._pushTag(TAG.DATE_STRING) &&\n gen._pushString(obj.toISOString())\n case 'int':\n case 'integer':\n return gen._pushTag(TAG.DATE_EPOCH) &&\n gen._pushIntNum(Math.round(obj / 1000))\n case 'float':\n // force float\n return gen._pushTag(TAG.DATE_EPOCH) &&\n gen._pushFloat(obj / 1000)\n case 'number':\n default:\n // if we happen to have an integral number of seconds,\n // use integer. Otherwise, use float.\n return gen._pushTag(TAG.DATE_EPOCH) &&\n gen.pushAny(obj / 1000)\n }\n }\n\n _pushBuffer(gen, obj) {\n return gen._pushInt(obj.length, MT.BYTE_STRING) && gen.push(obj)\n }\n\n _pushNoFilter(gen, obj) {\n return gen._pushBuffer(gen, obj.slice())\n }\n\n _pushRegexp(gen, obj) {\n return gen._pushTag(TAG.REGEXP) && gen.pushAny(obj.source)\n }\n\n _pushSet(gen, obj) {\n if (!gen._pushInt(obj.size, MT.ARRAY)) {\n return false\n }\n for (const x of obj) {\n if (!gen.pushAny(x)) {\n return false\n }\n }\n return true\n }\n\n _pushUrl(gen, obj) {\n return gen._pushTag(TAG.URI) && gen.pushAny(obj.format())\n }\n\n _pushURL(gen, obj) {\n return gen._pushTag(TAG.URI) && gen.pushAny(obj.toString())\n }\n\n /**\n * @param {bignumber} obj\n * @private\n */\n _pushBigint(obj) {\n let m = MT.POS_INT\n let tag = TAG.POS_BIGINT\n\n if (obj.isNegative()) {\n obj = obj.negated().minus(1)\n m = MT.NEG_INT\n tag = TAG.NEG_BIGINT\n }\n\n if (this.collapseBigIntegers &&\n obj.lte(BN.MAXINT64)) {\n // special handiling for 64bits\n if (obj.lte(BN.MAXINT32)) {\n return this._pushInt(obj.toNumber(), m)\n }\n return this._pushUInt8((m << 5) | NUMBYTES.EIGHT) &&\n this._pushUInt32BE(obj.dividedToIntegerBy(BN.SHIFT32).toNumber()) &&\n this._pushUInt32BE(obj.mod(BN.SHIFT32).toNumber())\n }\n let str = obj.toString(16)\n if (str.length % 2) {\n str = '0' + str\n }\n const buf = Buffer.from(str, 'hex')\n return this._pushTag(tag) && this._pushBuffer(this, buf)\n }\n\n /**\n * @param {bigint} obj\n * @private\n */\n _pushJSBigint(obj) {\n let m = MT.POS_INT\n let tag = TAG.POS_BIGINT\n // BigInt doesn't have -0\n if (obj < 0) {\n obj = -obj + BI.MINUS_ONE\n m = MT.NEG_INT\n tag = TAG.NEG_BIGINT\n }\n\n if (this.collapseBigIntegers &&\n (obj <= BI.MAXINT64)) {\n // special handiling for 64bits\n if (obj <= 0xffffffff) {\n return this._pushInt(Number(obj), m)\n }\n return this._pushUInt8((m << 5) | NUMBYTES.EIGHT) &&\n this._pushUInt32BE(Number(obj / BI.SHIFT32)) &&\n this._pushUInt32BE(Number(obj % BI.SHIFT32))\n }\n\n let str = obj.toString(16)\n if (str.length % 2) {\n str = '0' + str\n }\n const buf = Buffer.from(str, 'hex')\n return this._pushTag(tag) && this._pushBuffer(this, buf)\n }\n\n _pushBigNumber(gen, obj) {\n if (obj.isNaN()) {\n return gen._pushNaN()\n }\n if (!obj.isFinite()) {\n return gen._pushInfinity(obj.isNegative() ? -Infinity : Infinity)\n }\n if (obj.isInteger()) {\n return gen._pushBigint(obj)\n }\n if (!(gen._pushTag(TAG.DECIMAL_FRAC) &&\n gen._pushInt(2, MT.ARRAY))) {\n return false\n }\n\n const dec = obj.decimalPlaces()\n const slide = obj.shiftedBy(dec)\n if (!gen._pushIntNum(-dec)) {\n return false\n }\n if (slide.abs().isLessThan(BN.MAXINT)) {\n return gen._pushIntNum(slide.toNumber())\n } else {\n return gen._pushBigint(slide)\n }\n }\n\n _pushMap(gen, obj, opts) {\n opts = Object.assign({\n indefinite: false\n }, opts)\n if (opts.indefinite) {\n if (!gen._pushUInt8((MT.MAP << 5) | NUMBYTES.INDEFINITE)) {\n return false\n }\n } else if (!gen._pushInt(obj.size, MT.MAP)) {\n return false\n }\n // memoizing the cbor only helps in certain cases, and hurts in most\n // others. Just avoid it.\n if (gen.canonical) {\n // keep the key/value pairs together, so we don't have to do odd\n // gets with object keys later\n const entries = [...obj.entries()]\n const enc = new Encoder({\n genTypes: this.semanticTypes,\n canonical: this.canonical,\n detectLoops: this.detectLoops,\n dateType: this.dateType,\n disallowUndefinedKeys: this.disallowUndefinedKeys,\n collapseBigIntegers: this.collapseBigIntegers\n })\n const bs = new NoFilter({highWaterMark:this.readableHighWaterMark})\n enc.pipe(bs)\n entries.sort(([a], [b]) => {\n // a, b are the keys\n enc.pushAny(a)\n const a_cbor = bs.read()\n enc.pushAny(b)\n const b_cbor = bs.read()\n return a_cbor.compare(b_cbor)\n })\n for (const [k, v] of entries) {\n if (gen.disallowUndefinedKeys && (typeof k === 'undefined')) {\n throw new Error('Invalid Map key: undefined')\n }\n if (!(gen.pushAny(k) && gen.pushAny(v))) {\n return false\n }\n }\n } else {\n for (const [k, v] of obj) {\n if (gen.disallowUndefinedKeys && (typeof k === 'undefined')) {\n throw new Error('Invalid Map key: undefined')\n }\n if (!(gen.pushAny(k) && gen.pushAny(v))) {\n return false\n }\n }\n }\n if (opts.indefinite) {\n if (!gen.push(BREAK)) {\n return false\n }\n }\n return true\n }\n\n _pushUint8Array(gen, obj) {\n return gen._pushBuffer(gen, Buffer.from(obj))\n }\n\n _pushFloat32Array(gen, obj) {\n const len = obj.length\n if (!gen._pushInt(len, MT.ARRAY)) {\n return false\n }\n for (let j = 0; j < len; j++) {\n if (!gen._pushUInt8(FLOAT) || !gen._pushFloatBE(obj[j])) {\n return false\n }\n }\n return true\n }\n\n _pushFloat64Array(gen, obj) {\n const len = obj.length\n if (!gen._pushInt(len, MT.ARRAY)) {\n return false\n }\n for (let j = 0; j < len; j++) {\n if (!gen._pushUInt8(DOUBLE) || !gen._pushDoubleBE(obj[j])) {\n return false\n }\n }\n return true\n }\n\n /**\n * Remove all of the loop detector additions to the given object.\n *\n * @param {Object} obj - object to clean\n * @returns {boolean} - true when the object was cleaned, else false\n */\n removeLoopDetectors(obj) {\n if (!this.detectLoops) {\n return false\n }\n return Encoder.removeLoopDetectors(obj, this.detectLoops)\n }\n\n /**\n * Remove all of the loop detector additions to the given object.\n * The static version is easier to call when you don't have a full\n * encoder instance available; it uses a good heuristic to figure\n * out the loop detector symbol.\n *\n * @param {Object} obj - object to clean\n * @param {Symbol} [detector=null] - the symbol to clean, or null\n * to use the first detected symbol\n * @returns {boolean} - true when the object was cleaned, else false\n */\n static removeLoopDetectors(obj, detector=null) {\n if ((typeof(obj) !== 'object') || !obj) {\n return false\n }\n const dl = obj[LOOP_DETECT]\n if (!dl) {\n // ironically, use loop marking to detect loops on removal as well\n return false\n }\n if (detector == null) {\n detector = dl\n } else {\n if (detector !== dl) {\n return false\n }\n }\n delete obj[LOOP_DETECT]\n if (Array.isArray(obj)) {\n for (const i of obj) {\n this.removeLoopDetectors(i, detector)\n }\n } else {\n for (const k in obj) {\n this.removeLoopDetectors(obj[k], detector)\n }\n }\n return true\n }\n\n _pushObject(obj, opts) {\n if (!obj) {\n return this._pushNull(obj)\n }\n opts = Object.assign({\n indefinite: false,\n skipTypes: false\n }, opts)\n if (!opts.indefinite) {\n // this will only happen the first time through for indefinite encoding\n if (this.detectLoops) {\n if (obj[LOOP_DETECT] === this.detectLoops) {\n throw new Error('Loop detected while CBOR encoding')\n } else {\n obj[LOOP_DETECT] = this.detectLoops\n }\n }\n }\n if (!opts.skipTypes) {\n const f = obj.encodeCBOR\n if (typeof f === 'function') {\n return f.call(obj, this)\n }\n const converter = this.semanticTypes[obj.constructor.name]\n if (converter) {\n return converter.call(obj, this, obj)\n }\n }\n const keys = Object.keys(obj).filter(k => typeof obj[k] !== 'function')\n const cbor_keys = {}\n if (this.canonical) {\n // note: this can't be a normal sort, because 'b' needs to sort before\n // 'aa'\n keys.sort((a, b) => {\n // Always strings, so don't bother to pass options.\n // hold on to the cbor versions, since there's no need\n // to encode more than once\n const a_cbor = cbor_keys[a] || (cbor_keys[a] = Encoder.encode(a))\n const b_cbor = cbor_keys[b] || (cbor_keys[b] = Encoder.encode(b))\n\n return a_cbor.compare(b_cbor)\n })\n }\n if (opts.indefinite) {\n if (!this._pushUInt8((MT.MAP << 5) | NUMBYTES.INDEFINITE)) {\n return false\n }\n } else if (!this._pushInt(keys.length, MT.MAP)) {\n return false\n }\n let ck\n for (let j = 0, len2 = keys.length; j < len2; j++) {\n const k = keys[j]\n if (this.canonical && ((ck = cbor_keys[k]))) {\n if (!this.push(ck)) { // already a Buffer\n return false\n }\n } else {\n if (!this._pushString(k)) {\n return false\n }\n }\n if (!this.pushAny(obj[k])) {\n return false\n }\n }\n if (opts.indefinite) {\n if (!this.push(BREAK)) {\n return false\n }\n }\n return true\n }\n\n /**\n * Push any supported type onto the encoded stream\n *\n * @param {any} obj\n * @returns {boolean} true on success\n */\n pushAny(obj) {\n switch (typeof obj) {\n case 'number':\n return this._pushNumber(obj)\n case 'bigint':\n return this._pushJSBigint(obj)\n case 'string':\n return this._pushString(obj)\n case 'boolean':\n return this._pushBoolean(obj)\n case 'undefined':\n return this._pushUndefined(obj)\n case 'object':\n return this._pushObject(obj)\n case 'symbol':\n switch (obj) {\n case SYMS.NULL:\n return this._pushNull(null)\n case SYMS.UNDEFINED:\n return this._pushUndefined(void 0)\n // TODO: Add pluggable support for other symbols\n default:\n throw new Error('Unknown symbol: ' + obj.toString())\n }\n default:\n throw new Error(\n 'Unknown type: ' + typeof obj + ', ' +\n (!!obj.toString ? obj.toString() : ''))\n }\n }\n\n /* backwards-compat wrapper */\n _pushAny(obj) {\n // TODO: write deprecation warning\n return this.pushAny(obj)\n }\n\n _encodeAll(objs) {\n const bs = new NoFilter({ highWaterMark:this.readableHighWaterMark })\n this.pipe(bs)\n for (const o of objs) {\n this.pushAny(o)\n }\n this.end()\n return bs.read()\n }\n\n /**\n * Encode the given object with indefinite length. There are apparently\n * some (IMO) broken implementations of poorly-specified protocols that\n * REQUIRE indefinite-encoding. Add this to an object or class as the\n * `encodeCBOR` function to get indefinite encoding:\n * @example\n * const o = {\n * a: true,\n * encodeCBOR: cbor.Encoder.encodeIndefinite\n * }\n * const m = []\n * m.encodeCBOR = cbor.Encoder.encodeIndefinite\n * cbor.encodeOne([o, m])\n *\n * @param {Encoder} gen - the encoder to use\n * @param {String|Buffer|Array|Map|Object} [obj] - the object to encode. If\n * null, use \"this\" instead.\n * @param {Object} [opts=null] - Options for encoding\n * @param {number} [opts.chunkSize=4096] - Number of characters or bytes\n * for each chunk, if obj is a string or Buffer\n * @returns {boolean} - true on success\n */\n static encodeIndefinite(gen, obj, opts) {\n if (obj == null) {\n if (this == null) {\n throw new Error('No object to encode')\n }\n obj = this\n }\n opts = Object.assign({\n chunkSize: 4096\n }, opts)\n\n let ret = true\n const objType = typeof obj\n if (objType === 'string') {\n // TODO: make sure not to split surrogate pairs at the edges of chunks,\n // since such half-surrogates cannot be legally encoded as UTF-8.\n ret = ret && gen._pushUInt8((MT.UTF8_STRING << 5) | NUMBYTES.INDEFINITE)\n let offset = 0\n while (offset < obj.length) {\n const endIndex = offset + opts.chunkSize\n ret = ret && gen._pushString(obj.slice(offset, endIndex))\n offset = endIndex\n }\n ret = ret && gen.push(BREAK)\n } else if (Buffer.isBuffer(obj)) {\n ret = ret && gen._pushUInt8((MT.BYTE_STRING << 5) | NUMBYTES.INDEFINITE)\n let offset = 0\n while (offset < obj.length) {\n const endIndex = offset + opts.chunkSize\n ret = ret && gen._pushBuffer(gen, obj.slice(offset, endIndex))\n offset = endIndex\n }\n ret = ret && gen.push(BREAK)\n } else if (Array.isArray(obj)) {\n ret = ret && gen._pushArray(gen, obj, {\n indefinite: true\n })\n } else if (obj instanceof Map) {\n ret = ret && gen._pushMap(gen, obj, {\n indefinite: true\n })\n } else {\n if (objType !== 'object') {\n throw new Error('Invalid indefinite encoding')\n }\n ret = ret && gen._pushObject(obj, {\n indefinite: true,\n skipTypes: true\n })\n }\n return ret\n }\n\n /**\n * Encode one or more JavaScript objects, and return a Buffer containing the\n * CBOR bytes.\n *\n * @param {...any} objs - the objects to encode\n * @returns {Buffer} - the encoded objects\n */\n static encode(...objs) {\n return new Encoder()._encodeAll(objs)\n }\n\n /**\n * Encode one or more JavaScript objects canonically (slower!), and return\n * a Buffer containing the CBOR bytes.\n *\n * @param {...any} objs - the objects to encode\n * @returns {Buffer} - the encoded objects\n */\n static encodeCanonical(...objs) {\n return new Encoder({\n canonical: true\n })._encodeAll(objs)\n }\n\n /**\n * Encode one JavaScript object using the given options.\n *\n * @static\n * @param {any} obj - the object to encode\n * @param {Object?} options - passed to the Encoder constructor\n * @returns {Buffer} - the encoded objects\n */\n static encodeOne(obj, options) {\n return new Encoder(options)._encodeAll([obj])\n }\n\n /**\n * Encode one JavaScript object using the given options in a way that\n * is more resilient to objects being larger than the highWaterMark\n * number of bytes. As with the other static encode functions, this \n * will still use a large amount of memory. Use a stream-based approach\n * directly if you need to process large and complicated inputs.\n *\n * @param {any} obj - the object to encode\n * @param {Object?} options - passed to the Encoder constructor\n */\n static encodeAsync(obj, options) {\n return new Promise((resolve, reject) => {\n const bufs = []\n const enc = new Encoder(options)\n enc.on('data', buf => bufs.push(buf))\n enc.on('error', reject)\n enc.on('finish', () => resolve(Buffer.concat(bufs)))\n enc.pushAny(obj)\n enc.end()\n })\n }\n}\n\nmodule.exports = Encoder\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/encoder.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/map.js": -/*!**************************************!*\ - !*** ./node_modules/cbor/lib/map.js ***! - \**************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\n\nconst encoder = __webpack_require__(/*! ./encoder */ \"./node_modules/cbor/lib/encoder.js\")\nconst decoder = __webpack_require__(/*! ./decoder */ \"./node_modules/cbor/lib/decoder.js\")\nconst constants = __webpack_require__(/*! ./constants */ \"./node_modules/cbor/lib/constants.js\")\nconst MT = constants.MT\n\n/**\n * Wrapper around a JavaScript Map object that allows the keys to be\n * any complex type. The base Map object allows this, but will only\n * compare the keys by identity, not by value. CborMap translates keys\n * to CBOR first (and base64's them to ensure by-value comparison).\n *\n * This is not a subclass of Object, because it would be tough to get\n * the semantics to be an exact match.\n *\n * @class CborMap\n * @extends {Map}\n */\nclass CborMap extends Map {\n /**\n * Creates an instance of CborMap.\n * @param {Iterable} [iterable] An Array or other iterable\n * object whose elements are key-value pairs (arrays with two elements, e.g.\n * [[ 1, 'one' ],[ 2, 'two' ]]). Each key-value pair is added\n * to the new CborMap; null values are treated as undefined.\n */\n constructor(iterable) {\n super(iterable)\n }\n\n /**\n * @private\n */\n static _encode(key) {\n return encoder.encodeCanonical(key).toString('base64')\n }\n\n /**\n * @private\n */\n static _decode(key) {\n return decoder.decodeFirstSync(key, 'base64')\n }\n\n /**\n * Retrieve a specified element.\n *\n * @param {any} key The key identifying the element to retrieve.\n * Can be any type, which will be serialized into CBOR and compared by\n * value.\n * @returns {any} The element if it exists, or undefined.\n */\n get(key) {\n return super.get(CborMap._encode(key))\n }\n\n /**\n * Adds or updates an element with a specified key and value.\n *\n * @param {any} key The key identifying the element to store.\n * Can be any type, which will be serialized into CBOR and compared by\n * value.\n * @param {any} val The element to store\n */\n set(key, val) {\n return super.set(CborMap._encode(key), val)\n }\n\n /**\n * Removes the specified element.\n *\n * @param {any} key The key identifying the element to delete.\n * Can be any type, which will be serialized into CBOR and compared by\n * value.\n * @returns {boolean}\n */\n delete(key) {\n return super.delete(CborMap._encode(key))\n }\n\n /**\n * Does an element with the specified key exist?\n *\n * @param {any} key The key identifying the element to check.\n * Can be any type, which will be serialized into CBOR and compared by\n * value.\n * @returns {boolean}\n */\n has(key) {\n return super.has(CborMap._encode(key))\n }\n\n /**\n * Returns a new Iterator object that contains the keys for each element\n * in the Map object in insertion order. The keys are decoded into their\n * original format.\n *\n * @returns {IterableIterator}\n */\n *keys() {\n for (const k of super.keys()) {\n yield CborMap._decode(k)\n }\n }\n\n /**\n * Returns a new Iterator object that contains the [key, value] pairs for\n * each element in the Map object in insertion order.\n *\n * @returns {IterableIterator}\n */\n *entries() {\n for (const kv of super.entries()) {\n yield [CborMap._decode(kv[0]), kv[1]]\n }\n }\n\n /**\n * Returns a new Iterator object that contains the [key, value] pairs for\n * each element in the Map object in insertion order.\n *\n * @returns {IterableIterator}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * Executes a provided function once per each key/value pair in the Map\n * object, in insertion order.\n *\n * @param {function(any, any, Map): undefined} fun Function to execute for\n * each element, which takes a value, a key, and the Map being traversed.\n * @param {any} thisArg Value to use as this when executing callback\n */\n forEach(fun, thisArg) {\n if (typeof(fun) !== 'function') {\n throw new TypeError('Must be function')\n }\n for (const kv of super.entries()) {\n fun.call(this, kv[1], CborMap._decode(kv[0]), this)\n }\n }\n\n /**\n * Push the simple value onto the CBOR stream\n *\n * @param {Object} gen The generator to push onto\n * @returns {boolean} true on success\n */\n encodeCBOR(gen) {\n if (!gen._pushInt(this.size, MT.MAP)) {\n return false\n }\n if (gen.canonical) {\n const entries = Array.from(super.entries())\n .map((kv) => [Buffer.from(kv[0], 'base64'), kv[1]])\n entries.sort((a, b) => a[0].compare(b[0]))\n for (const kv of entries) {\n if (!(gen.push(kv[0]) && gen.pushAny(kv[1]))) {\n return false\n }\n }\n } else {\n for (const kv of super.entries()) {\n if (!(gen.push(Buffer.from(kv[0], 'base64')) && gen.pushAny(kv[1]))) {\n return false\n }\n }\n }\n return true\n }\n}\n\nmodule.exports = CborMap\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/map.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/simple.js": -/*!*****************************************!*\ - !*** ./node_modules/cbor/lib/simple.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\nconst constants = __webpack_require__(/*! ./constants */ \"./node_modules/cbor/lib/constants.js\")\nconst MT = constants.MT\nconst SIMPLE = constants.SIMPLE\nconst SYMS = constants.SYMS\n\n/**\n * A CBOR Simple Value that does not map onto a known constant.\n */\nclass Simple {\n /**\n * Creates an instance of Simple.\n *\n * @param {number} value - the simple value's integer value\n */\n constructor(value) {\n if (typeof value !== 'number') {\n throw new Error('Invalid Simple type: ' + (typeof value))\n }\n if ((value < 0) || (value > 255) || ((value|0) !== value)) {\n throw new Error('value must be a small positive integer: ' + value)\n }\n this.value = value\n }\n\n /**\n * Debug string for simple value\n *\n * @returns {string} simple(value)\n */\n toString() {\n return 'simple(' + this.value + ')'\n }\n\n /**\n * Debug string for simple value\n *\n * @returns {string} simple(value)\n */\n [util.inspect.custom](depth, opts) {\n return 'simple(' + this.value + ')'\n }\n\n /**\n * Debug string for simple value (backward-compatibility version)\n *\n * @returns {string} simple(value)\n */\n inspect(depth, opts) {\n return 'simple(' + this.value + ')'\n }\n\n /**\n * Push the simple value onto the CBOR stream\n *\n * @param {Object} gen The generator to push onto\n */\n encodeCBOR(gen) {\n return gen._pushInt(this.value, MT.SIMPLE_FLOAT)\n }\n\n /**\n * Is the given object a Simple?\n *\n * @param {any} obj - object to test\n * @returns {boolean} - is it Simple?\n */\n static isSimple(obj) {\n return obj instanceof Simple\n }\n\n /**\n * Decode from the CBOR additional information into a JavaScript value.\n * If the CBOR item has no parent, return a \"safe\" symbol instead of\n * `null` or `undefined`, so that the value can be passed through a\n * stream in object mode.\n *\n * @param {number} val - the CBOR additional info to convert\n * @param {boolean} [has_parent=true] - Does the CBOR item have a parent?\n * @param {boolean} [parent_indefinite=false] - Is the parent element\n * indefinitely encoded?\n * @returns {(null|undefined|boolean|Symbol|Simple)} - the decoded value\n */\n static decode(val, has_parent=true, parent_indefinite=false) {\n switch (val) {\n case SIMPLE.FALSE:\n return false\n case SIMPLE.TRUE:\n return true\n case SIMPLE.NULL:\n if (has_parent) {\n return null\n } else {\n return SYMS.NULL\n }\n case SIMPLE.UNDEFINED:\n if (has_parent) {\n return void 0\n } else {\n return SYMS.UNDEFINED\n }\n case -1:\n if (!has_parent || !parent_indefinite) {\n throw new Error('Invalid BREAK')\n }\n return SYMS.BREAK\n default:\n return new Simple(val)\n }\n }\n}\n\nmodule.exports = Simple\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/simple.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/tagged.js": -/*!*****************************************!*\ - !*** ./node_modules/cbor/lib/tagged.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nconst bignumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\nconst utils = __webpack_require__(/*! ./utils */ \"./node_modules/cbor/lib/utils.js\")\nconst url = __webpack_require__(/*! url */ \"./node_modules/url/url.js\")\n\nconst MINUS_ONE = new bignumber(-1)\nconst TWO = new bignumber(2)\n\n/**\n * A CBOR tagged item, where the tag does not have semantics specified at the\n * moment, or those semantics threw an error during parsing. Typically this will\n * be an extension point you're not yet expecting.\n */\nclass Tagged {\n\n /**\n * Creates an instance of Tagged.\n *\n * @param {number} tag - the number of the tag\n * @param {any} value - the value inside the tag\n * @param {Error} [err] - the error that was thrown parsing the tag, or null\n */\n constructor(tag, value, err) {\n this.tag = tag\n this.value = value\n this.err = err\n if (typeof this.tag !== 'number') {\n throw new Error('Invalid tag type (' + (typeof this.tag) + ')')\n }\n if ((this.tag < 0) || ((this.tag | 0) !== this.tag)) {\n throw new Error('Tag must be a positive integer: ' + this.tag)\n }\n }\n\n /**\n * Convert to a String\n *\n * @returns {string} string of the form '1(2)'\n */\n toString() {\n return `${this.tag}(${JSON.stringify(this.value)})`\n }\n\n /**\n * Push the simple value onto the CBOR stream\n *\n * @param {Object} gen The generator to push onto\n */\n encodeCBOR(gen) {\n gen._pushTag(this.tag)\n return gen.pushAny(this.value)\n }\n\n /**\n * If we have a converter for this type, do the conversion. Some converters\n * are built-in. Additional ones can be passed in. If you want to remove\n * a built-in converter, pass a converter in whose value is 'null' instead\n * of a function.\n *\n * @param {Object} converters - keys in the object are a tag number, the value\n * is a function that takes the decoded CBOR and returns a JavaScript value\n * of the appropriate type. Throw an exception in the function on errors.\n * @returns {any} - the converted item\n */\n convert(converters) {\n let f = converters != null ? converters[this.tag] : void 0\n if (typeof f !== 'function') {\n f = Tagged['_tag_' + this.tag]\n if (typeof f !== 'function') {\n return this\n }\n }\n try {\n return f.call(Tagged, this.value)\n } catch (error) {\n this.err = error\n return this\n }\n }\n\n static _tag_0(v) {\n return new Date(v)\n }\n\n static _tag_1(v) {\n return new Date(v * 1000)\n }\n\n static _tag_2(v) {\n return utils.bufferToBignumber(v)\n }\n\n static _tag_3(v) {\n return MINUS_ONE.minus(utils.bufferToBignumber(v))\n }\n\n static _tag_4(v) {\n return new bignumber(v[1]).shiftedBy(v[0])\n }\n\n static _tag_5(v) {\n return TWO.pow(v[0]).times(v[1])\n }\n\n static _tag_32(v) {\n return url.parse(v)\n }\n\n static _tag_35(v) {\n return new RegExp(v)\n }\n}\n\nmodule.exports = Tagged\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/tagged.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/lib/utils.js": -/*!****************************************!*\ - !*** ./node_modules/cbor/lib/utils.js ***! - \****************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\n\nconst constants = __webpack_require__(/*! ./constants */ \"./node_modules/cbor/lib/constants.js\")\nconst NoFilter = __webpack_require__(/*! nofilter */ \"./node_modules/nofilter/lib/index.js\")\nconst bignumber = __webpack_require__(/*! bignumber.js */ \"./node_modules/bignumber.js/bignumber.js\").BigNumber\nconst stream = __webpack_require__(/*! stream */ \"./node_modules/stream-browserify/index.js\")\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\n\nconst NUMBYTES = constants.NUMBYTES\nconst SHIFT32 = constants.SHIFT32\nconst MAX_SAFE_HIGH = 0x1fffff\n\n/**\n * Convert a UTF8-encoded Buffer to a JS string. If possible, throw an error\n * on invalid UTF8. Byte Order Marks are not looked at or stripped.\n */\nconst TD = (typeof TextDecoder === 'function') ? TextDecoder : util.TextDecoder\n/* istanbul ignore else */\nif (TD) {\n // node 11+, browsers : node 8.3+\n const td = new TD('utf8', {fatal: true, ignoreBOM: true})\n exports.utf8 = (buf) => td.decode(buf)\n exports.utf8.checksUTF8 = true\n} else {\n // TODO: polyfill a slow one or wait for node6 to die\n exports.utf8 = (buf) => buf.toString('utf8') \n exports.utf8.checksUTF8 = false \n}\n\nexports.parseCBORint = function(ai, buf, bigInt=true) {\n switch (ai) {\n case NUMBYTES.ONE:\n return buf.readUInt8(0)\n case NUMBYTES.TWO:\n return buf.readUInt16BE(0)\n case NUMBYTES.FOUR:\n return buf.readUInt32BE(0)\n case NUMBYTES.EIGHT:\n const f = buf.readUInt32BE(0)\n const g = buf.readUInt32BE(4)\n if (f > MAX_SAFE_HIGH) {\n if (bigInt) {\n return (BigInt(f) * constants.BI.SHIFT32) + BigInt(g)\n }\n return new bignumber(f).times(SHIFT32).plus(g)\n } else {\n return (f * SHIFT32) + g\n }\n default:\n throw new Error('Invalid additional info for int: ' + ai)\n }\n}\n\nexports.writeHalf = function writeHalf(buf, half) {\n // assume 0, -0, NaN, Infinity, and -Infinity have already been caught\n\n // HACK: everyone settle in. This isn't going to be pretty.\n // Translate cn-cbor's C code (from Carsten Borman):\n\n // uint32_t be32;\n // uint16_t be16, u16;\n // union {\n // float f;\n // uint32_t u;\n // } u32;\n // u32.f = float_val;\n\n const u32 = Buffer.allocUnsafe(4)\n u32.writeFloatBE(half, 0)\n const u = u32.readUInt32BE(0)\n\n // if ((u32.u & 0x1FFF) == 0) { /* worth trying half */\n\n // hildjj: If the lower 13 bits aren't 0,\n // we will lose precision in the conversion.\n // mant32 = 24bits, mant16 = 11bits, 24-11 = 13\n if ((u & 0x1FFF) !== 0) {\n return false\n }\n\n // int s16 = (u32.u >> 16) & 0x8000;\n // int exp = (u32.u >> 23) & 0xff;\n // int mant = u32.u & 0x7fffff;\n\n let s16 = (u >> 16) & 0x8000 // top bit is sign\n const exp = (u >> 23) & 0xff // then 5 bits of exponent\n const mant = u & 0x7fffff\n\n // if (exp == 0 && mant == 0)\n // ; /* 0.0, -0.0 */\n\n // hildjj: zeros already handled. Assert if you don't believe me.\n\n // else if (exp >= 113 && exp <= 142) /* normalized */\n // s16 += ((exp - 112) << 10) + (mant >> 13);\n\n if ((exp >= 113) && (exp <= 142)) {\n s16 += ((exp - 112) << 10) + (mant >> 13)\n } else if ((exp >= 103) && (exp < 113)) {\n // else if (exp >= 103 && exp < 113) { /* denorm, exp16 = 0 */\n // if (mant & ((1 << (126 - exp)) - 1))\n // goto float32; /* loss of precision */\n // s16 += ((mant + 0x800000) >> (126 - exp));\n\n if (mant & ((1 << (126 - exp)) - 1)) {\n return false\n }\n s16 += ((mant + 0x800000) >> (126 - exp))\n } else {\n // } else if (exp == 255 && mant == 0) { /* Inf */\n // s16 += 0x7c00;\n\n // hildjj: Infinity already handled\n\n // } else\n // goto float32; /* loss of range */\n\n return false\n }\n\n // ensure_writable(3);\n // u16 = s16;\n // be16 = hton16p((const uint8_t*)&u16);\n buf.writeUInt16BE(s16)\n return true\n}\n\nexports.parseHalf = function parseHalf(buf) {\n const sign = buf[0] & 0x80 ? -1 : 1\n const exp = (buf[0] & 0x7C) >> 2\n const mant = ((buf[0] & 0x03) << 8) | buf[1]\n if (!exp) {\n return sign * 5.9604644775390625e-8 * mant\n } else if (exp === 0x1f) {\n return sign * (mant ? 0 / 0 : 2e308)\n } else {\n return sign * Math.pow(2, exp - 25) * (1024 + mant)\n }\n}\n\nexports.parseCBORfloat = function parseCBORfloat(buf) {\n switch (buf.length) {\n case 2:\n return exports.parseHalf(buf)\n case 4:\n return buf.readFloatBE(0)\n case 8:\n return buf.readDoubleBE(0)\n default:\n throw new Error('Invalid float size: ' + buf.length)\n }\n}\n\nexports.hex = function hex(s) {\n return Buffer.from(s.replace(/^0x/, ''), 'hex')\n}\n\nexports.bin = function bin(s) {\n s = s.replace(/\\s/g, '')\n let start = 0\n let end = (s.length % 8) || 8\n const chunks = []\n while (end <= s.length) {\n chunks.push(parseInt(s.slice(start, end), 2))\n start = end\n end += 8\n }\n return Buffer.from(chunks)\n}\n\nexports.extend = function extend(old={}, ...adds) {\n const len = adds.length\n for (let j = 0; j < len; j++) {\n const a = adds[j]\n for (const k in a) {\n const v = a[k]\n old[k] = v\n }\n }\n return old\n}\n\nexports.arrayEqual = function arrayEqual(a, b) {\n if ((a == null) && (b == null)) {\n return true\n }\n if ((a == null) || (b == null)) {\n return false\n }\n return (a.length === b.length) && a.every((elem, i) => elem === b[i])\n}\n\nexports.bufferEqual = function bufferEqual(a, b) {\n if ((a == null) && (b == null)) {\n return true\n }\n if ((a == null) || (b == null)) {\n return false\n }\n if (!(Buffer.isBuffer(a) && Buffer.isBuffer(b) && (a.length === b.length))) {\n return false\n }\n const len = a.length\n let ret = true\n let i\n let j\n for (i = j = 0; j < len; i = ++j) {\n const byte = a[i]\n ret = ret && (b[i] === byte)\n }\n return !!ret\n}\n\nexports.bufferToBignumber = function bufferToBignumber(buf) {\n return new bignumber(buf.toString('hex'), 16)\n}\n\nexports.bufferToBigInt = function bufferToBigInt(buf) {\n return BigInt('0x' + buf.toString('hex'))\n}\n\nexports.cborValueToString = function cborValueToString(val, float_bytes=-1) {\n switch (typeof val) {\n case 'symbol':\n switch (val) {\n case constants.SYMS.NULL:\n return 'null'\n case constants.SYMS.UNDEFINED:\n return 'undefined'\n case constants.SYMS.BREAK:\n return 'BREAK'\n }\n if (val.description) {\n return val.description\n }\n // on node10, Symbol doesn't have description. Parse it out of the\n // toString value, which looks like `Symbol(foo)`.\n const s = val.toString()\n const m = s.match(/^Symbol\\((.*)\\)/)\n if (m && m[1]) {\n return m[1]\n }\n return 'Symbol'\n case 'string':\n return JSON.stringify(val)\n case 'bigint':\n return val.toString()\n case 'number':\n if (float_bytes > 0) {\n return (util.inspect(val)) + '_' + float_bytes\n }\n return util.inspect(val)\n }\n if (Buffer.isBuffer(val)) {\n const hex = val.toString('hex')\n return (float_bytes === -Infinity) ? hex : `h'${hex}'`\n }\n if (bignumber.isBigNumber(val)) {\n return val.toString()\n }\n return util.inspect(val)\n}\n\nexports.guessEncoding = function guessEncoding(input, encoding) {\n if (typeof input == 'string') {\n return new NoFilter(input, (encoding != null) ? encoding : 'hex')\n } else if (Buffer.isBuffer(input)) {\n return new NoFilter(input)\n } else if (ArrayBuffer.isView(input)) {\n return new NoFilter(\n Buffer.from(input.buffer.slice(\n input.byteOffset,\n input.byteOffset + input.byteLength)))\n } else if (input instanceof ArrayBuffer) {\n return new NoFilter(Buffer.from(input))\n } else if (input instanceof stream.Readable) {\n return input\n }\n throw new Error('Unknown input type')\n}\n\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/lib/utils.js?"); - -/***/ }), - -/***/ "./node_modules/cbor/vendor/binary-parse-stream/index.js": -/*!***************************************************************!*\ - !*** ./node_modules/cbor/vendor/binary-parse-stream/index.js ***! - \***************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("// Tweaked version of nathan7's binary-parse-stream\n// (see https://github.com/nathan7/binary-parse-stream)\n// Uses NoFilter instead of the readable in the original. Removes\n// the ability to read -1, which was odd and un-needed.\n// License for binary-parse-stream: MIT\n\n// binary-parse-stream is now unmaintained, so I'm going to rewrite it as\n// more modern JS so I can get tsc to help check types.\n\n\nconst Stream = __webpack_require__(/*! stream */ \"./node_modules/stream-browserify/index.js\")\nconst NoFilter = __webpack_require__(/*! nofilter */ \"./node_modules/nofilter/lib/index.js\")\nconst TransformStream = Stream.Transform\n\n/**\n * BinaryParseStream is a TransformStream that consumes buffers and outputs\n * objects on the other end. It expects your subclass to implement a `_parse`\n * method that is a generator. When your generator yields a number, it'll be\n * fed a buffer of that length from the input. When your generator returns,\n * the return value will be pushed to the output side.\n *\n * @class BinaryParseStream\n * @extends {TransformStream}\n */\nclass BinaryParseStream extends TransformStream {\n constructor(options) {\n super(options)\n // doesn't work to pass these in as opts, for some reason\n this['_writableState'].objectMode = false\n this['_readableState'].objectMode = true\n\n this.bs = new NoFilter()\n this.__restart()\n }\n\n _transform(fresh, encoding, cb) {\n this.bs.write(fresh)\n\n while (this.bs.length >= this.__needed) {\n let ret\n const chunk = (this.__needed === null) ?\n undefined : this.bs.read(this.__needed)\n\n try {\n ret = this.__parser.next(chunk)\n } catch (e) {\n return cb(e)\n }\n \n if (this.__needed) {\n this.__fresh = false\n }\n\n if (!ret.done) {\n this.__needed = ret.value || 0\n } else {\n this.push(ret.value)\n this.__restart()\n }\n }\n \n return cb()\n }\n\n /**\n * @abstract\n * @protected\n * @returns {Generator}\n */\n /* istanbul ignore next */\n *_parse() {\n throw new Error('Must be implemented in subclass')\n }\n\n __restart() {\n this.__needed = null\n this.__parser = this._parse()\n this.__fresh = true\n }\n\n _flush(cb) {\n cb(this.__fresh ? null : new Error('unexpected end of input'))\n }\n}\n\nmodule.exports = BinaryParseStream\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/cbor/vendor/binary-parse-stream/index.js?"); +eval("/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nconst base64 = __webpack_require__(/*! base64-js */ \"../../node_modules/base64-js/index.js\")\nconst ieee754 = __webpack_require__(/*! ieee754 */ \"../../node_modules/ieee754/index.js\")\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n\n\n//# sourceURL=webpack://webpack-demo/../../node_modules/buffer/index.js?"); /***/ }), -/***/ "./node_modules/console-browserify/index.js": -/*!**************************************************!*\ - !*** ./node_modules/console-browserify/index.js ***! - \**************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -eval("/*global window, global*/\nvar util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\nvar assert = __webpack_require__(/*! assert */ \"./node_modules/assert/build/assert.js\")\nfunction now() { return new Date().getTime() }\n\nvar slice = Array.prototype.slice\nvar console\nvar times = {}\n\nif (typeof __webpack_require__.g !== \"undefined\" && __webpack_require__.g.console) {\n console = __webpack_require__.g.console\n} else if (typeof window !== \"undefined\" && window.console) {\n console = window.console\n} else {\n console = {}\n}\n\nvar functions = [\n [log, \"log\"],\n [info, \"info\"],\n [warn, \"warn\"],\n [error, \"error\"],\n [time, \"time\"],\n [timeEnd, \"timeEnd\"],\n [trace, \"trace\"],\n [dir, \"dir\"],\n [consoleAssert, \"assert\"]\n]\n\nfor (var i = 0; i < functions.length; i++) {\n var tuple = functions[i]\n var f = tuple[0]\n var name = tuple[1]\n\n if (!console[name]) {\n console[name] = f\n }\n}\n\nmodule.exports = console\n\nfunction log() {}\n\nfunction info() {\n console.log.apply(console, arguments)\n}\n\nfunction warn() {\n console.log.apply(console, arguments)\n}\n\nfunction error() {\n console.warn.apply(console, arguments)\n}\n\nfunction time(label) {\n times[label] = now()\n}\n\nfunction timeEnd(label) {\n var time = times[label]\n if (!time) {\n throw new Error(\"No such label: \" + label)\n }\n\n delete times[label]\n var duration = now() - time\n console.log(label + \": \" + duration + \"ms\")\n}\n\nfunction trace() {\n var err = new Error()\n err.name = \"Trace\"\n err.message = util.format.apply(null, arguments)\n console.error(err.stack)\n}\n\nfunction dir(object) {\n console.log(util.inspect(object) + \"\\n\")\n}\n\nfunction consoleAssert(expression) {\n if (!expression) {\n var arr = slice.call(arguments, 1)\n assert.ok(false, util.format.apply(null, arr))\n }\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/console-browserify/index.js?"); - -/***/ }), - -/***/ "./node_modules/css-loader/dist/cjs.js!./src/style.css": -/*!*************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/style.css ***! - \*************************************************************/ +/***/ "../../node_modules/css-loader/dist/cjs.js!./src/style.css": +/*!*****************************************************************!*\ + !*** ../../node_modules/css-loader/dist/cjs.js!./src/style.css ***! + \*****************************************************************/ /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"body {\\n font-family: Arial, Helvetica, sans-serif;\\n background-color:cornsilk;\\n}\\n\\n.container {\\n display: flex;\\n flex-flow: row wrap;\\n align-items: flex-start;\\n}\\n\\n.cmd {\\n margin: 0 10px 5px 10px;\\n}\\n\\n#to {\\n float: right;\\n}\\n\\nh3 {\\n margin: 0 10px 5px 10px;\\n}\\n\\ntextarea {\\n margin: 0 10px 0 10px;\\n}\\n\\n.power {\\n margin: 10px;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://webpack-demo/./src/style.css?./node_modules/css-loader/dist/cjs.js"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"../../node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"body {\\n font-family: Arial, Helvetica, sans-serif;\\n background-color:cornsilk;\\n}\\n\\n.container {\\n display: flex;\\n flex-flow: row wrap;\\n align-items: flex-start;\\n}\\n\\n.cmd {\\n margin: 0 10px 5px 10px;\\n}\\n\\n#to {\\n float: right;\\n}\\n\\nh3 {\\n margin: 0 10px 5px 10px;\\n}\\n\\ntextarea {\\n margin: 0 10px 0 10px;\\n}\\n\\n.power {\\n margin: 10px;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://webpack-demo/./src/style.css?../../node_modules/css-loader/dist/cjs.js"); /***/ }), -/***/ "./node_modules/css-loader/dist/runtime/api.js": -/*!*****************************************************!*\ - !*** ./node_modules/css-loader/dist/runtime/api.js ***! - \*****************************************************/ +/***/ "../../node_modules/css-loader/dist/runtime/api.js": +/*!*********************************************************!*\ + !*** ../../node_modules/css-loader/dist/runtime/api.js ***! + \*********************************************************/ /***/ ((module) => { "use strict"; -eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/css-loader/dist/runtime/api.js?"); - -/***/ }), - -/***/ "./node_modules/define-properties/index.js": -/*!*************************************************!*\ - !*** ./node_modules/define-properties/index.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar keys = __webpack_require__(/*! object-keys */ \"./node_modules/object-keys/index.js\");\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\torigDefineProperty(obj, 'x', { enumerable: false, value: obj });\n\t\t// eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\t\tfor (var _ in obj) { // jscs:ignore disallowUnusedVariables\n\t\t\treturn false;\n\t\t}\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/define-properties/index.js?"); - -/***/ }), - -/***/ "./node_modules/es-abstract/GetIntrinsic.js": -/*!**************************************************!*\ - !*** ./node_modules/es-abstract/GetIntrinsic.js ***! - \**************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\n/* globals\n\tAggregateError,\n\tAtomics,\n\tFinalizationRegistry,\n\tSharedArrayBuffer,\n\tWeakRef,\n*/\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\t// eslint-disable-next-line no-new-func\n\t\treturn Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () { throw new $TypeError(); };\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = __webpack_require__(/*! has-symbols */ \"./node_modules/has-symbols/index.js\")();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar asyncGenFunction = getEvalledConstructor('async function* () {}');\nvar asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;\nvar asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': getEvalledConstructor('async function () {}'),\n\t'%AsyncGenerator%': asyncGenFunctionPrototype,\n\t'%AsyncGeneratorFunction%': asyncGenFunction,\n\t'%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': getEvalledConstructor('function* () {}'),\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar hasOwn = __webpack_require__(/*! has */ \"./node_modules/has/src/index.js\");\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\tif (!allowMissing && !(part in value)) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/es-abstract/GetIntrinsic.js?"); - -/***/ }), - -/***/ "./node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js": -/*!**********************************************************************!*\ - !*** ./node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js ***! - \**********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar GetIntrinsic = __webpack_require__(/*! ../GetIntrinsic */ \"./node_modules/es-abstract/GetIntrinsic.js\");\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%');\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js?"); - -/***/ }), - -/***/ "./node_modules/es6-object-assign/index.js": -/*!*************************************************!*\ - !*** ./node_modules/es6-object-assign/index.js ***! - \*************************************************/ -/***/ ((module) => { - -"use strict"; -eval("/**\n * Code refactored from Mozilla Developer Network:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n */\n\n\n\nfunction assign(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n var to = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n continue;\n }\n\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n}\n\nfunction polyfill() {\n if (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value: assign\n });\n }\n}\n\nmodule.exports = {\n assign: assign,\n polyfill: polyfill\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/es6-object-assign/index.js?"); - -/***/ }), - -/***/ "./node_modules/events/events.js": -/*!***************************************!*\ - !*** ./node_modules/events/events.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var console = __webpack_require__(/*! console-browserify */ \"./node_modules/console-browserify/index.js\");\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function eventListener() {\n if (errorListener !== undefined) {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n var errorListener;\n\n // Adding an error listener is not optional because\n // if an error is thrown on an event emitter we cannot\n // guarantee that the actual event we are waiting will\n // be fired. The result could be a silent way to create\n // memory or file descriptor leaks, which is something\n // we should avoid.\n if (name !== 'error') {\n errorListener = function errorListener(err) {\n emitter.removeListener(name, eventListener);\n reject(err);\n };\n\n emitter.once('error', errorListener);\n }\n\n emitter.once(name, eventListener);\n });\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/events/events.js?"); - -/***/ }), - -/***/ "./node_modules/foreach/index.js": -/*!***************************************!*\ - !*** ./node_modules/foreach/index.js ***! - \***************************************/ -/***/ ((module) => { - -eval("\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/foreach/index.js?"); - -/***/ }), - -/***/ "./node_modules/function-bind/implementation.js": -/*!******************************************************!*\ - !*** ./node_modules/function-bind/implementation.js ***! - \******************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/function-bind/implementation.js?"); - -/***/ }), - -/***/ "./node_modules/function-bind/index.js": -/*!*********************************************!*\ - !*** ./node_modules/function-bind/index.js ***! - \*********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/function-bind/implementation.js\");\n\nmodule.exports = Function.prototype.bind || implementation;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/function-bind/index.js?"); - -/***/ }), - -/***/ "./node_modules/get-intrinsic/index.js": -/*!*********************************************!*\ - !*** ./node_modules/get-intrinsic/index.js ***! - \*********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\n/* globals\n\tAggregateError,\n\tAtomics,\n\tFinalizationRegistry,\n\tSharedArrayBuffer,\n\tWeakRef,\n*/\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\t// eslint-disable-next-line no-new-func\n\t\treturn Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = __webpack_require__(/*! has-symbols */ \"./node_modules/has-symbols/index.js\")();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar asyncGenFunction = getEvalledConstructor('async function* () {}');\nvar asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;\nvar asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': getEvalledConstructor('async function () {}'),\n\t'%AsyncGenerator%': asyncGenFunctionPrototype,\n\t'%AsyncGeneratorFunction%': asyncGenFunction,\n\t'%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': getEvalledConstructor('function* () {}'),\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar hasOwn = __webpack_require__(/*! has */ \"./node_modules/has/src/index.js\");\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/get-intrinsic/index.js?"); - -/***/ }), - -/***/ "./node_modules/has-symbols/index.js": -/*!*******************************************!*\ - !*** ./node_modules/has-symbols/index.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar origSymbol = __webpack_require__.g.Symbol;\nvar hasSymbolSham = __webpack_require__(/*! ./shams */ \"./node_modules/has-symbols/shams.js\");\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/has-symbols/index.js?"); +eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === \"string\") {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, \"\"]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://webpack-demo/../../node_modules/css-loader/dist/runtime/api.js?"); /***/ }), -/***/ "./node_modules/has-symbols/shams.js": +/***/ "../../node_modules/ieee754/index.js": /*!*******************************************!*\ - !*** ./node_modules/has-symbols/shams.js ***! + !*** ../../node_modules/ieee754/index.js ***! \*******************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/has-symbols/shams.js?"); - -/***/ }), - -/***/ "./node_modules/has/src/index.js": -/*!***************************************!*\ - !*** ./node_modules/has/src/index.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/has/src/index.js?"); - -/***/ }), - -/***/ "./node_modules/ieee754/index.js": -/*!***************************************!*\ - !*** ./node_modules/ieee754/index.js ***! - \***************************************/ /***/ ((__unused_webpack_module, exports) => { -eval("/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/ieee754/index.js?"); - -/***/ }), - -/***/ "./node_modules/inherits/inherits_browser.js": -/*!***************************************************!*\ - !*** ./node_modules/inherits/inherits_browser.js ***! - \***************************************************/ -/***/ ((module) => { - -eval("if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/inherits/inherits_browser.js?"); - -/***/ }), - -/***/ "./node_modules/is-arguments/index.js": -/*!********************************************!*\ - !*** ./node_modules/is-arguments/index.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\nvar callBound = __webpack_require__(/*! call-bind/callBound */ \"./node_modules/call-bind/callBound.js\");\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/is-arguments/index.js?"); - -/***/ }), - -/***/ "./node_modules/is-generator-function/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/is-generator-function/index.js ***! - \*****************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar generatorFunc = getGeneratorFunc();\nvar GeneratorFunction = getProto && generatorFunc ? getProto(generatorFunc) : false;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\treturn getProto && getProto(fn) === GeneratorFunction;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/is-generator-function/index.js?"); - -/***/ }), - -/***/ "./node_modules/is-nan/implementation.js": -/*!***********************************************!*\ - !*** ./node_modules/is-nan/implementation.js ***! - \***********************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/is-nan/implementation.js?"); - -/***/ }), - -/***/ "./node_modules/is-nan/index.js": -/*!**************************************!*\ - !*** ./node_modules/is-nan/index.js ***! - \**************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar callBind = __webpack_require__(/*! call-bind */ \"./node_modules/call-bind/index.js\");\nvar define = __webpack_require__(/*! define-properties */ \"./node_modules/define-properties/index.js\");\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/is-nan/implementation.js\");\nvar getPolyfill = __webpack_require__(/*! ./polyfill */ \"./node_modules/is-nan/polyfill.js\");\nvar shim = __webpack_require__(/*! ./shim */ \"./node_modules/is-nan/shim.js\");\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/is-nan/index.js?"); - -/***/ }), - -/***/ "./node_modules/is-nan/polyfill.js": -/*!*****************************************!*\ - !*** ./node_modules/is-nan/polyfill.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/is-nan/implementation.js\");\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/is-nan/polyfill.js?"); - -/***/ }), - -/***/ "./node_modules/is-nan/shim.js": -/*!*************************************!*\ - !*** ./node_modules/is-nan/shim.js ***! - \*************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar define = __webpack_require__(/*! define-properties */ \"./node_modules/define-properties/index.js\");\nvar getPolyfill = __webpack_require__(/*! ./polyfill */ \"./node_modules/is-nan/polyfill.js\");\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/is-nan/shim.js?"); - -/***/ }), - -/***/ "./node_modules/is-typed-array/index.js": -/*!**********************************************!*\ - !*** ./node_modules/is-typed-array/index.js ***! - \**********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar forEach = __webpack_require__(/*! foreach */ \"./node_modules/foreach/index.js\");\nvar availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ \"./node_modules/available-typed-arrays/index.js\");\nvar callBound = __webpack_require__(/*! call-bind/callBound */ \"./node_modules/call-bind/callBound.js\");\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasSymbols = __webpack_require__(/*! has-symbols */ \"./node_modules/has-symbols/index.js\")();\nvar hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';\n\nvar typedArrays = availableTypedArrays();\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = __webpack_require__(/*! es-abstract/helpers/getOwnPropertyDescriptor */ \"./node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js\");\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new __webpack_require__.g[typedArray]();\n\t\tif (!(Symbol.toStringTag in arr)) {\n\t\t\tthrow new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');\n\t\t}\n\t\tvar proto = getPrototypeOf(arr);\n\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\tif (!descriptor) {\n\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t}\n\t\ttoStrTags[typedArray] = descriptor.get;\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar anyTrue = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!anyTrue) {\n\t\t\ttry {\n\t\t\t\tanyTrue = getter.call(value) === typedArray;\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn anyTrue;\n};\n\nmodule.exports = function isTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\treturn $indexOf(typedArrays, tag) > -1;\n\t}\n\tif (!gOPD) { return false; }\n\treturn tryTypedArrays(value);\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/is-typed-array/index.js?"); - -/***/ }), - -/***/ "./node_modules/nofilter/lib/index.js": -/*!********************************************!*\ - !*** ./node_modules/nofilter/lib/index.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\n\nconst stream = __webpack_require__(/*! stream */ \"./node_modules/stream-browserify/index.js\")\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\n\n/**\n * NoFilter stream. Can be used to sink or source data to and from\n * other node streams. Implemented as the \"identity\" Transform stream\n * (hence the name), but allows for inspecting data that is in-flight.\n *\n * Allows passing in source data (input, inputEncoding) at creation\n * time. Source data can also be passed in the options object.\n *\n * @example source\n * const n = new NoFilter('Zm9v', 'base64');\n * n.pipe(process.stdout);\n *\n * @example sink\n * const n = new Nofilter();\n * // NOTE: 'finish' fires when the input is done writing\n * n.on('finish', function() { console.log(n.toString('base64')); });\n * process.stdin.pipe(n);\n */\nclass NoFilter extends stream.Transform {\n /**\n * Create an instance of NoFilter.\n *\n * @param {string|Buffer} [input] - Source data\n * @param {string} [inputEncoding=null] - Encoding name for input,\n * ignored if input is not a String\n * @param {Object} [options={}] - Other options\n * @param {string|Buffer} [options.input=null] - Input source data\n * @param {string} [options.inputEncoding=null] - Encoding name for input,\n * ignored if input is not a String\n * @param {number} [options.highWaterMark=16384] - The maximum number of bytes\n * to store in the internal buffer before ceasing to read from the\n * underlying resource. Default=16kb, or 16 for objectMode streams\n * @param {string} [options.encoding=null] - If specified, then buffers will\n * be decoded to strings using the specified encoding\n * @param {boolean} [options.objectMode=false] - Whether this stream should\n * behave as a stream of objects. Meaning that stream.read(n) returns a\n * single value instead of a Buffer of size n\n * @param {boolean} [options.decodeStrings=true] - Whether or not to decode\n * strings into Buffers before passing them to _write()\n * @param {boolean} [options.watchPipe=true] - Whether to watch for 'pipe'\n * events, setting this stream's objectMode based on the objectMode of the\n * input stream\n * @param {boolean} [options.readError=false] - If true, when a read()\n * underflows, throw an error.\n */\n constructor(input, inputEncoding, options) {\n if (options == null) {\n options = {}\n }\n let inp\n let inpE\n switch (typeof(input)) {\n case 'object':\n if (Buffer.isBuffer(input)) {\n inp = input\n if ((inputEncoding != null) && (typeof(inputEncoding) === 'object')) {\n options = inputEncoding\n }\n } else {\n options = input\n }\n break\n case 'string':\n inp = input\n if ((inputEncoding != null) && (typeof(inputEncoding) === 'object')) {\n options = inputEncoding\n } else {\n inpE = inputEncoding\n }\n break\n }\n\n if ((options == null)) {\n options = {}\n }\n if (inp == null) {\n inp = options.input\n }\n if (inpE == null) {\n inpE = options.inputEncoding\n }\n delete options.input\n delete options.inputEncoding\n const watchPipe = options.watchPipe != null ? options.watchPipe : true\n delete options.watchPipe\n const readError = !! options.readError\n delete options.readError\n super(options)\n\n this.readError = readError\n\n if (watchPipe) {\n this.on('pipe', readable => {\n const om = readable._readableState.objectMode\n if ((this.length > 0) && (om !== this._readableState.objectMode)) {\n throw new Error(\n 'Do not switch objectMode in the middle of the stream')\n }\n\n this._readableState.objectMode = om\n return this._writableState.objectMode = om\n })\n }\n\n if (inp != null) {\n this.end(inp, inpE)\n }\n }\n\n /**\n * Is the given object a {NoFilter}?\n *\n * @param {Object} obj The object to test.\n * @returns {boolean} true if obj is a NoFilter\n */\n static isNoFilter(obj) {\n return obj instanceof this\n }\n\n /**\n * The same as nf1.compare(nf2). Useful for sorting an Array of NoFilters.\n *\n * @param {NoFilter} nf1 - The first object to compare\n * @param {NoFilter} nf2 - The second object to compare\n * @returns {number} -1, 0, 1 for less, equal, greater\n *\n * @example\n * const arr = [new NoFilter('1234'), new NoFilter('0123')];\n * arr.sort(NoFilter.compare);\n */\n static compare(nf1, nf2) {\n if (!(nf1 instanceof this)) {\n throw new TypeError('Arguments must be NoFilters')\n }\n if (nf1 === nf2) {\n return 0\n } else {\n return nf1.compare(nf2)\n }\n }\n\n /**\n * Returns a buffer which is the result of concatenating all the\n * NoFilters in the list together. If the list has no items, or if\n * the totalLength is 0, then it returns a zero-length buffer.\n *\n * If length is not provided, it is read from the buffers in the\n * list. However, this adds an additional loop to the function, so\n * it is faster to provide the length explicitly if you already know it.\n *\n * @param {Array} list Inputs. Must not be all either in object\n * mode, or all not in object mode.\n * @param {number} [length=null] Number of bytes or objects to read\n * @returns {Buffer|Array} The concatenated values as an array if in object\n * mode, otherwise a Buffer\n */\n static concat(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('list argument must be an Array of NoFilters')\n }\n if ((list.length === 0) || (length === 0)) {\n return Buffer.alloc(0)\n }\n if ((length == null)) {\n length = list.reduce((tot, nf) => {\n if (!(nf instanceof NoFilter)) {\n throw new TypeError('list argument must be an Array of NoFilters')\n }\n return tot + nf.length\n }, 0)\n }\n let allBufs = true\n let allObjs = true\n const bufs = list.map(nf => {\n if (!(nf instanceof NoFilter)) {\n throw new TypeError('list argument must be an Array of NoFilters')\n }\n const buf = nf.slice()\n if (Buffer.isBuffer(buf)) {\n allObjs = false\n } else {\n allBufs = false\n }\n return buf\n })\n if (allBufs) {\n return Buffer.concat(bufs, length)\n }\n if (allObjs) {\n return [].concat(...bufs).slice(0, length)\n }\n // TODO: maybe coalesce buffers, counting bytes, and flatten in arrays\n // counting objects? I can't imagine why that would be useful.\n throw new Error('Concatenating mixed object and byte streams not supported')\n }\n\n /**\n * @private\n */\n _transform(chunk, encoding, callback) {\n if (!this._readableState.objectMode && !Buffer.isBuffer(chunk)) {\n chunk = Buffer.from(chunk, encoding)\n }\n this.push(chunk)\n callback()\n }\n\n /**\n * @private\n */\n _bufArray() {\n let bufs = this._readableState.buffer\n // HACK: replace with something else one day. This is what I get for\n // relying on internals.\n if (!Array.isArray(bufs)) {\n let b = bufs.head\n bufs = []\n while (b != null) {\n bufs.push(b.data)\n b = b.next\n }\n }\n return bufs\n }\n\n /**\n * Pulls some data out of the internal buffer and returns it.\n * If there is no data available, then it will return null.\n *\n * If you pass in a size argument, then it will return that many bytes. If\n * size bytes are not available, then it will return null, unless we've\n * ended, in which case it will return the data remaining in the buffer.\n *\n * If you do not specify a size argument, then it will return all the data in\n * the internal buffer.\n *\n * @param {number} [size=null] - Number of bytes to read.\n * @returns {string|Buffer|null} If no data or not enough data, null. If\n * decoding output a string, otherwise a Buffer\n * @throws Error - if readError is true and there was underflow\n * @fires NoFilter#read\n */\n read(size) {\n const buf = super.read(size)\n if (buf != null) {\n /*\n * Read event. Fired whenever anything is read from the stream.\n *\n * @event NoFilter#read\n * @type {Buffer|string|Object}\n *\n */\n this.emit('read', buf)\n if (this.readError && (buf.length < size)) {\n throw new Error(`Read ${buf.length}, wanted ${size}`)\n }\n } else if (this.readError) {\n throw new Error(`No data available, wanted ${size}`)\n }\n return buf\n }\n\n /**\n * Return a promise fulfilled with the full contents, after the 'finish'\n * event fires. Errors on the stream cause the promise to be rejected.\n *\n * @param {function} [cb=null] - finished/error callback used in *addition*\n * to the promise\n * @returns {Promise} fulfilled when complete\n */\n promise(cb) {\n let done = false\n return new Promise((resolve, reject) => {\n this.on('finish', () => {\n const data = this.read()\n if ((cb != null) && !done) {\n done = true\n cb(null, data)\n }\n resolve(data)\n })\n this.on('error', (er) => {\n if ((cb != null) && !done) {\n done = true\n cb(er)\n }\n reject(er)\n })\n })\n }\n\n /**\n * Returns a number indicating whether this comes before or after or is the\n * same as the other NoFilter in sort order.\n *\n * @param {NoFilter} other - The other object to compare\n * @returns {Number} -1, 0, 1 for less, equal, greater\n */\n compare(other) {\n if (!(other instanceof NoFilter)) {\n throw new TypeError('Arguments must be NoFilters')\n }\n if (this === other) {\n return 0\n } else {\n const buf1 = this.slice()\n const buf2 = other.slice()\n // these will both be buffers because of the check above.\n if (Buffer.isBuffer(buf1) && Buffer.isBuffer(buf2)) {\n return buf1.compare(buf2)\n }\n throw new Error('Cannot compare streams in object mode')\n }\n }\n\n /**\n * Do these NoFilter's contain the same bytes? Doesn't work if either is\n * in object mode.\n *\n * @param {NoFilter} other\n * @returns {boolean} Equal?\n */\n equals(other) {\n return this.compare(other) === 0\n }\n\n /**\n * Read bytes or objects without consuming them. Useful for diagnostics.\n * Note: as a side-effect, concatenates multiple writes together into what\n * looks like a single write, so that this concat doesn't have to happen\n * multiple times when you're futzing with the same NoFilter.\n *\n * @param {Number} [start=0] - beginning offset\n * @param {Number} [end=length] - ending offset\n * @returns {Buffer|Array} if in object mode, an array of objects. Otherwise,\n * concatenated array of contents.\n */\n slice(start, end) {\n if (this._readableState.objectMode) {\n return this._bufArray().slice(start, end)\n }\n const bufs = this._bufArray()\n switch (bufs.length) {\n case 0: return Buffer.alloc(0)\n case 1: return bufs[0].slice(start, end)\n default:\n const b = Buffer.concat(bufs)\n // TODO: store the concatented bufs back\n // @_readableState.buffer = [b]\n return b.slice(start, end)\n }\n }\n\n /**\n * Get a byte by offset. I didn't want to get into metaprogramming\n * to give you the `NoFilter[0]` syntax.\n *\n * @param {Number} index - The byte to retrieve\n * @returns {Number} 0-255\n */\n get(index) {\n return this.slice()[index]\n }\n\n /**\n * Return an object compatible with Buffer's toJSON implementation, so\n * that round-tripping will produce a Buffer.\n *\n * @returns {Object}\n *\n * @example output for 'foo'\n * { type: 'Buffer', data: [ 102, 111, 111 ] }\n */\n toJSON() {\n const b = this.slice()\n if (Buffer.isBuffer(b)) {\n return b.toJSON()\n } else {\n return b\n }\n }\n\n /**\n * Decodes and returns a string from buffer data encoded using the specified\n * character set encoding. If encoding is undefined or null, then encoding\n * defaults to 'utf8'. The start and end parameters default to 0 and\n * NoFilter.length when undefined.\n *\n * @param {String} [encoding='utf8'] - Which to use for decoding?\n * @param {Number} [start=0] - Start offset\n * @param {Number} [end=length] - End offset\n * @returns {String}\n */\n toString(encoding, start, end) {\n const buf = this.slice(start, end)\n if (!Buffer.isBuffer(buf)) {\n return JSON.stringify(buf)\n }\n if ((!encoding || (encoding === 'utf8')) && util.TextDecoder) {\n const td = new util.TextDecoder('utf8', {\n fatal: true,\n ignoreBOM: true\n })\n return td.decode(buf)\n }\n return buf.toString(encoding, start, end)\n }\n\n /**\n * @private\n * @deprecated\n */\n inspect(depth, options) {\n return this[util.inspect.custom](depth, options)\n }\n\n /**\n * @private\n */\n [util.inspect.custom](depth, options) {\n const bufs = this._bufArray()\n const hex = bufs.map((b) => {\n if (Buffer.isBuffer(b)) {\n if ((options != null ? options.stylize : undefined)) {\n return options.stylize(b.toString('hex'), 'string')\n } else {\n return b.toString('hex')\n }\n } else {\n return util.inspect(b, options)\n }\n }).join(', ')\n return `${this.constructor.name} [${hex}]`\n }\n\n /**\n * Current readable length, in bytes.\n *\n * @member {number}\n * @readonly\n */\n get length() {\n return this._readableState.length\n }\n\n /**\n * Write a JavaScript BigInt to the stream. Negative numbers will be\n * written as their 2's complement version.\n *\n * @param {bigint} val - The value to write\n * @returns {boolean} true on success\n */\n writeBigInt(val) {\n let str = val.toString(16)\n if (val < 0) {\n // two's complement\n // Note: str always starts with '-' here.\n const sz = BigInt(Math.floor(str.length / 2))\n const mask = BigInt(1) << (sz * BigInt(8))\n val = mask + val\n str = val.toString(16)\n }\n if (str.length % 2) {\n str = '0' + str\n }\n return this.push(Buffer.from(str, 'hex'))\n }\n\n /**\n * Read a variable-sized JavaScript unsigned BigInt from the stream.\n *\n * @param {number} [len=null] - number of bytes to read or all remaining\n * if null\n * @returns {bigint}\n */\n readUBigInt(len) {\n const b = this.read(len)\n if (!Buffer.isBuffer(b)) {\n return null\n }\n return BigInt('0x' + b.toString('hex'))\n }\n\n /**\n * Read a variable-sized JavaScript signed BigInt from the stream in 2's\n * complement format.\n *\n * @param {number} [len=null] - number of bytes to read or all remaining\n * if null\n * @returns {bigint}\n */\n readBigInt(len) {\n const b = this.read(len)\n if (!Buffer.isBuffer(b)) {\n return null\n }\n let ret = BigInt('0x' + b.toString('hex'))\n // negative?\n if (b[0] & 0x80) {\n // two's complement\n const mask = BigInt(1) << (BigInt(b.length) * BigInt(8))\n ret = ret - mask\n }\n return ret\n }\n}\n\n/**\n * @param {string} meth - method to call\n * @param {number} len - number of bytes to write\n * @private\n */\nfunction _read_gen(meth, len) {\n return function(val) {\n const b = this.read(len)\n if (!Buffer.isBuffer(b)) {\n return null\n }\n return b[meth].call(b, 0, true)\n }\n}\n\n/**\n * @param {string} meth - method to call\n * @param {number} len - number of bytes to write\n * @private\n */\nfunction _write_gen(meth, len) {\n return function(val) {\n const b = Buffer.alloc(len)\n b[meth].call(b, val, 0, true)\n return this.push(b)\n }\n}\n\nObject.assign(NoFilter.prototype, {\n /**\n * Write an 8-bit unsigned integer to the stream. Adds 1 byte.\n *\n * @function writeUInt8\n * @memberOf NoFilter\n * @instance\n * @param {Number} value - 0-255\n * @returns {boolean} true on success\n */\n writeUInt8: _write_gen('writeUInt8', 1),\n\n /**\n * Write a little-endian 16-bit unsigned integer to the stream. Adds\n * 2 bytes.\n *\n * @function writeUInt16LE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeUInt16LE: _write_gen('writeUInt16LE', 2),\n\n /**\n * Write a big-endian 16-bit unsigned integer to the stream. Adds\n * 2 bytes.\n *\n * @function writeUInt16BE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeUInt16BE: _write_gen('writeUInt16BE', 2),\n\n /**\n * Write a little-endian 32-bit unsigned integer to the stream. Adds\n * 4 bytes.\n *\n * @function writeUInt32LE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeUInt32LE: _write_gen('writeUInt32LE', 4),\n\n /**\n * Write a big-endian 32-bit unsigned integer to the stream. Adds\n * 4 bytes.\n *\n * @function writeUInt32BE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeUInt32BE: _write_gen('writeUInt32BE', 4),\n\n /**\n * Write a signed 8-bit integer to the stream. Adds 1 byte.\n *\n * @function writeInt8\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeInt8: _write_gen('writeInt8', 1),\n\n /**\n * Write a signed little-endian 16-bit integer to the stream. Adds 2 bytes.\n *\n * @function writeInt16LE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeInt16LE: _write_gen('writeInt16LE', 2),\n\n /**\n * Write a signed big-endian 16-bit integer to the stream. Adds 2 bytes.\n *\n * @function writeInt16BE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeInt16BE: _write_gen('writeInt16BE', 2),\n\n /**\n * Write a signed little-endian 32-bit integer to the stream. Adds 4 bytes.\n *\n * @function writeInt32LE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeInt32LE: _write_gen('writeInt32LE', 4),\n\n /**\n * Write a signed big-endian 32-bit integer to the stream. Adds 4 bytes.\n *\n * @function writeInt32BE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeInt32BE: _write_gen('writeInt32BE', 4),\n\n /**\n * Write a little-endian 32-bit float to the stream. Adds 4 bytes.\n *\n * @function writeFloatLE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeFloatLE: _write_gen('writeFloatLE', 4),\n\n /**\n * Write a big-endian 32-bit float to the stream. Adds 4 bytes.\n *\n * @function writeFloatBE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeFloatBE: _write_gen('writeFloatBE', 4),\n\n /**\n * Write a little-endian 64-bit float to the stream. Adds 8 bytes.\n *\n * @function writeDoubleLE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeDoubleLE: _write_gen('writeDoubleLE', 8),\n\n /**\n * Write a big-endian 64-bit float to the stream. Adds 8 bytes.\n *\n * @function writeDoubleBE\n * @memberOf NoFilter\n * @instance\n * @param {Number} value\n * @returns {boolean} true on success\n */\n writeDoubleBE: _write_gen('writeDoubleBE', 8),\n\n /**\n * Read an unsigned 8-bit integer from the stream. Consumes 1 byte.\n *\n * @function readUInt8\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readUInt8: _read_gen('readUInt8', 1),\n\n /**\n * Read a little-endian unsigned 16-bit integer from the stream.\n * Consumes 2 bytes.\n *\n * @function readUInt16LE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readUInt16LE: _read_gen('readUInt16LE', 2),\n\n /**\n * Read a big-endian unsigned 16-bit integer from the stream.\n * Consumes 2 bytes.\n *\n * @function readUInt16BE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readUInt16BE: _read_gen('readUInt16BE', 2),\n\n /**\n * Read a little-endian unsigned 32-bit integer from the stream.\n * Consumes 4 bytes.\n *\n * @function readUInt32LE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readUInt32LE: _read_gen('readUInt32LE', 4),\n\n /**\n * Read a big-endian unsigned 16-bit integer from the stream.\n * Consumes 4 bytes.\n *\n * @function readUInt32BE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readUInt32BE: _read_gen('readUInt32BE', 4),\n\n /**\n * Read a signed 8-bit integer from the stream.\n * Consumes 1 byte.\n *\n * @function readInt8\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readInt8: _read_gen('readInt8', 1),\n\n /**\n * Read a signed 16-bit little-endian integer from the stream.\n * Consumes 2 bytes.\n *\n * @function readInt16LE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readInt16LE: _read_gen('readInt16LE', 2),\n\n /**\n * Read a signed 16-bit big-endian integer from the stream.\n * Consumes 2 bytes.\n *\n * @function readInt16BE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readInt16BE: _read_gen('readInt16BE', 2),\n\n /**\n * Read a signed 32-bit little-endian integer from the stream.\n * Consumes 4 bytes.\n *\n * @function readInt32LE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readInt32LE: _read_gen('readInt32LE', 4),\n\n /**\n * Read a signed 32-bit big-endian integer from the stream.\n * Consumes 4 bytes.\n *\n * @function readInt32BE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readInt32BE: _read_gen('readInt32BE', 4),\n\n /**\n * Read a 32-bit little-endian float from the stream.\n * Consumes 4 bytes.\n *\n * @function readFloatLE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readFloatLE: _read_gen('readFloatLE', 4),\n\n /**\n * Read a 32-bit big-endian float from the stream.\n * Consumes 4 bytes.\n *\n * @function readFloatBE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readFloatBE: _read_gen('readFloatBE', 4),\n\n /**\n * Read a 64-bit little-endian float from the stream.\n * Consumes 8 bytes.\n *\n * @function readDoubleLE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readDoubleLE: _read_gen('readDoubleLE', 8),\n\n /**\n * Read a 64-bit big-endian float from the stream.\n * Consumes 8 bytes.\n *\n * @function readDoubleBE\n * @memberOf NoFilter\n * @instance\n * @returns {Number} value\n */\n readDoubleBE: _read_gen('readDoubleBE', 8)\n})\n\nmodule.exports = NoFilter\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/nofilter/lib/index.js?"); - -/***/ }), - -/***/ "./node_modules/object-is/implementation.js": -/*!**************************************************!*\ - !*** ./node_modules/object-is/implementation.js ***! - \**************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/object-is/implementation.js?"); - -/***/ }), - -/***/ "./node_modules/object-is/index.js": -/*!*****************************************!*\ - !*** ./node_modules/object-is/index.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar define = __webpack_require__(/*! define-properties */ \"./node_modules/define-properties/index.js\");\nvar callBind = __webpack_require__(/*! call-bind */ \"./node_modules/call-bind/index.js\");\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/object-is/implementation.js\");\nvar getPolyfill = __webpack_require__(/*! ./polyfill */ \"./node_modules/object-is/polyfill.js\");\nvar shim = __webpack_require__(/*! ./shim */ \"./node_modules/object-is/shim.js\");\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/object-is/index.js?"); - -/***/ }), - -/***/ "./node_modules/object-is/polyfill.js": -/*!********************************************!*\ - !*** ./node_modules/object-is/polyfill.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/object-is/implementation.js\");\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/object-is/polyfill.js?"); - -/***/ }), - -/***/ "./node_modules/object-is/shim.js": -/*!****************************************!*\ - !*** ./node_modules/object-is/shim.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar getPolyfill = __webpack_require__(/*! ./polyfill */ \"./node_modules/object-is/polyfill.js\");\nvar define = __webpack_require__(/*! define-properties */ \"./node_modules/define-properties/index.js\");\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/object-is/shim.js?"); - -/***/ }), - -/***/ "./node_modules/object-keys/implementation.js": -/*!****************************************************!*\ - !*** ./node_modules/object-keys/implementation.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = __webpack_require__(/*! ./isArguments */ \"./node_modules/object-keys/isArguments.js\"); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/object-keys/implementation.js?"); - -/***/ }), - -/***/ "./node_modules/object-keys/index.js": -/*!*******************************************!*\ - !*** ./node_modules/object-keys/index.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar slice = Array.prototype.slice;\nvar isArgs = __webpack_require__(/*! ./isArguments */ \"./node_modules/object-keys/isArguments.js\");\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(/*! ./implementation */ \"./node_modules/object-keys/implementation.js\");\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/object-keys/index.js?"); - -/***/ }), - -/***/ "./node_modules/object-keys/isArguments.js": -/*!*************************************************!*\ - !*** ./node_modules/object-keys/isArguments.js ***! - \*************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/object-keys/isArguments.js?"); - -/***/ }), - -/***/ "./node_modules/process/browser.js": -/*!*****************************************!*\ - !*** ./node_modules/process/browser.js ***! - \*****************************************/ -/***/ ((module) => { - -eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/process/browser.js?"); - -/***/ }), - -/***/ "./node_modules/querystring/decode.js": -/*!********************************************!*\ - !*** ./node_modules/querystring/decode.js ***! - \********************************************/ -/***/ ((module) => { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/querystring/decode.js?"); +eval("/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack://webpack-demo/../../node_modules/ieee754/index.js?"); /***/ }), -/***/ "./node_modules/querystring/encode.js": -/*!********************************************!*\ - !*** ./node_modules/querystring/encode.js ***! - \********************************************/ -/***/ ((module) => { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return Object.keys(obj).map(function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/querystring/encode.js?"); - -/***/ }), - -/***/ "./node_modules/querystring/index.js": -/*!*******************************************!*\ - !*** ./node_modules/querystring/index.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -eval("\n\nexports.decode = exports.parse = __webpack_require__(/*! ./decode */ \"./node_modules/querystring/decode.js\");\nexports.encode = exports.stringify = __webpack_require__(/*! ./encode */ \"./node_modules/querystring/encode.js\");\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/querystring/index.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/errors-browser.js": -/*!********************************************************!*\ - !*** ./node_modules/readable-stream/errors-browser.js ***! - \********************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/errors-browser.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_duplex.js": -/*!************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***! - \************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n\n for (var key in obj) {\n keys.push(key);\n }\n\n return keys;\n};\n/**/\n\n\nmodule.exports = Duplex;\n\nvar Readable = __webpack_require__(/*! ./_stream_readable */ \"./node_modules/readable-stream/lib/_stream_readable.js\");\n\nvar Writable = __webpack_require__(/*! ./_stream_writable */ \"./node_modules/readable-stream/lib/_stream_writable.js\");\n\n__webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")(Duplex, Readable);\n\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n process.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/_stream_duplex.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_passthrough.js": +/***/ "../../node_modules/node-inspect-extracted/dist/inspect.js": /*!*****************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***! + !*** ../../node_modules/node-inspect-extracted/dist/inspect.js ***! \*****************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n\nmodule.exports = PassThrough;\n\nvar Transform = __webpack_require__(/*! ./_stream_transform */ \"./node_modules/readable-stream/lib/_stream_transform.js\");\n\n__webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/_stream_passthrough.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_readable.js": -/*!**************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_readable.js ***! - \**************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\nmodule.exports = Readable;\n/**/\n\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n/**/\n\nvar EE = __webpack_require__(/*! events */ \"./node_modules/events/events.js\").EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\n\n\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/**/\n\n\nvar Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\").Buffer;\n\nvar OurUint8Array = __webpack_require__.g.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n\nvar debugUtil = __webpack_require__(/*! util */ \"?0bed\");\n\nvar debug;\n\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\n\nvar BufferList = __webpack_require__(/*! ./internal/streams/buffer_list */ \"./node_modules/readable-stream/lib/internal/streams/buffer_list.js\");\n\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/readable-stream/lib/internal/streams/destroy.js\");\n\nvar _require = __webpack_require__(/*! ./internal/streams/state */ \"./node_modules/readable-stream/lib/internal/streams/state.js\"),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = __webpack_require__(/*! ../errors */ \"./node_modules/readable-stream/errors-browser.js\").codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.\n\n\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\n\n__webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")(Readable, Stream);\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n\n this.sync = true; // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')\n\n this.autoDestroy = !!options.autoDestroy; // has it been destroyed\n\n this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"./node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex); // legacy\n\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n}; // Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n } // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n\n\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n\n return er;\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"./node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8\n\n this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:\n\n var p = this._readableState.buffer.head;\n var content = '';\n\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n\n this._readableState.buffer.clear();\n\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n}; // Don't raise the hwm > 1GB\n\n\nvar MAX_HWM = 0x40000000;\n\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n\n return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.\n\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n } // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n // if we need a readable event, then we need to do some reading.\n\n\n var doRead = state.needReadable;\n debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n } // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n\n\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true; // if the length is currently zero, then we *need* a readable event.\n\n if (state.length === 0) state.needReadable = true; // call internal read method\n\n this._read(state.highWaterMark);\n\n state.sync = false; // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.\n\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n\n if (state.decoder) {\n var chunk = state.decoder.end();\n\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n\n state.ended = true;\n\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n} // Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\n\n\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\n\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n } // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n\n\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n} // at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\n\n\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length) // didn't get any data, stop spinning.\n break;\n }\n\n state.readingMore = false;\n} // abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\n\n\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n\n default:\n state.pipes.push(dest);\n break;\n }\n\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n } // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n\n\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n\n function cleanup() {\n debug('cleanup'); // cleanup event handlers once the pipe is broken\n\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true; // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n src.on('data', ondata);\n\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n\n src.pause();\n }\n } // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n\n\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.\n\n\n prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n\n dest.once('close', onclose);\n\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n } // tell the dest that it's being piped to\n\n\n dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n }; // if we're not piping anywhere, then do nothing.\n\n if (state.pipesCount === 0) return this; // just one destination. most common case.\n\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes; // got a match.\n\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n } // slow case. multiple pipe destinations.\n\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n }\n\n return this;\n } // try to find the right one.\n\n\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused\n\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n\n return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true; // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n var state = this._readableState;\n\n if (!state.flowing) {\n debug('resume'); // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n\n state.paused = false;\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n\n if (!state.reading) {\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n\n this._readableState.paused = true;\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n\n while (state.flowing && stream.read() !== null) {\n ;\n }\n} // wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\n\n\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n\n if (!ret) {\n paused = true;\n stream.pause();\n }\n }); // proxy all the other methods.\n // important when wrapping filters and duplexes.\n\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n } // proxy certain important events.\n\n\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n } // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n\n\n this._read = function (n) {\n debug('wrapped _read', n);\n\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = __webpack_require__(/*! ./internal/streams/async_iterator */ \"./node_modules/readable-stream/lib/internal/streams/async_iterator.js\");\n }\n\n return createReadableStreamAsyncIterator(this);\n };\n}\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n}); // Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.\n\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\n\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = __webpack_require__(/*! ./internal/streams/from */ \"./node_modules/readable-stream/lib/internal/streams/from-browser.js\");\n }\n\n return from(Readable, iterable, opts);\n };\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n\n return -1;\n}\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/_stream_readable.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_transform.js": -/*!***************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_transform.js ***! - \***************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ (function(module) { -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n\nmodule.exports = Transform;\n\nvar _require$codes = __webpack_require__(/*! ../errors */ \"./node_modules/readable-stream/errors-browser.js\").codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\n\nvar Duplex = __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n__webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }; // start out asking for a readable event once data is transformed.\n\n this._readableState.needReadable = true; // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n } // When the writable side finishes, then flush out anything remaining.\n\n\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n}; // This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n}; // Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\n\n\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data); // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/_stream_transform.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_writable.js": -/*!**************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_writable.js ***! - \**************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\nmodule.exports = Writable;\n/* */\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n} // It seems a linked list but it is not\n// there will be only 2 of these for each stream\n\n\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\n\n\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n/**/\n\nvar internalUtil = {\n deprecate: __webpack_require__(/*! util-deprecate */ \"./node_modules/util-deprecate/browser.js\")\n};\n/**/\n\n/**/\n\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/**/\n\n\nvar Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\").Buffer;\n\nvar OurUint8Array = __webpack_require__.g.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/readable-stream/lib/internal/streams/destroy.js\");\n\nvar _require = __webpack_require__(/*! ./internal/streams/state */ \"./node_modules/readable-stream/lib/internal/streams/state.js\"),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = __webpack_require__(/*! ../errors */ \"./node_modules/readable-stream/errors-browser.js\").codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\n\n__webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called\n\n this.finalCalled = false; // drain event flag.\n\n this.needDrain = false; // at the start of calling end()\n\n this.ending = false; // when end() has been called, and returned\n\n this.ended = false; // when 'finish' is emitted\n\n this.finished = false; // has it been destroyed\n\n this.destroyed = false; // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n\n this.length = 0; // a flag to see when we're in the middle of a write.\n\n this.writing = false; // when true all writes will be buffered until .uncork() call\n\n this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n\n this.sync = true; // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n\n this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)\n\n this.onwrite = function (er) {\n onwrite(stream, er);\n }; // the callback that the user supplies to write(chunk,encoding,cb)\n\n\n this.writecb = null; // the amount that is being written when _write is called.\n\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null; // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n\n this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n\n this.prefinished = false; // True if the error was already emitted and should not be thrown again\n\n this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')\n\n this.autoDestroy = !!options.autoDestroy; // count buffered requests\n\n this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n\n while (current) {\n out.push(current);\n current = current.next;\n }\n\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})(); // Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\n\n\nvar realHasInstance;\n\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\"); // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex); // legacy.\n\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n} // Otherwise people can pipe Writable streams, which is just wrong.\n\n\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb\n\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n} // Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\n\n\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n\n return true;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\n\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n}); // if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\n\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er); // this can emit finish, and it will always happen\n // after error\n\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er); // this can emit finish, but finish must\n // always follow error\n\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n} // Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\n\n\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it\n\n\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n\n state.pendingcb++;\n state.lastBufferedRequest = null;\n\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks\n\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n } // ignore unnecessary end() calls.\n\n\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n\n if (err) {\n errorOrDestroy(stream, err);\n }\n\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n\n if (need) {\n prefinish(stream, state);\n\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n } // reuse the free corkReq.\n\n\n state.corkedRequestsFree.next = corkReq;\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\n\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/_stream_writable.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/async_iterator.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/async_iterator.js ***! - \*****************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n\n\nvar _Object$setPrototypeO;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar finished = __webpack_require__(/*! ./end-of-stream */ \"./node_modules/readable-stream/lib/internal/streams/end-of-stream.js\");\n\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\n\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\n\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n\n if (resolve !== null) {\n var data = iter[kStream].read(); // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\n\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\n\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\n\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n\n next: function next() {\n var _this = this;\n\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n\n if (error !== null) {\n return Promise.reject(error);\n }\n\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n } // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n\n\n var lastPromise = this[kLastPromise];\n var promise;\n\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n\n promise = new Promise(this[kHandlePromise]);\n }\n\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\n\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n\n iterator[kError] = err;\n return;\n }\n\n var resolve = iterator[kLastResolve];\n\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\n\nmodule.exports = createReadableStreamAsyncIterator;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/async_iterator.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/buffer_list.js": -/*!**************************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/buffer_list.js ***! - \**************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\"),\n Buffer = _require.Buffer;\n\nvar _require2 = __webpack_require__(/*! util */ \"?0bed\"),\n inspect = _require2.inspect;\n\nvar custom = inspect && inspect.custom || 'inspect';\n\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n\n while (p = p.next) {\n ret += s + p.data;\n }\n\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n\n return ret;\n } // Consumes a specified amount of bytes or characters from the buffered data.\n\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n } // Consumes a specified amount of characters from the buffered data.\n\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Consumes a specified amount of bytes from the buffered data.\n\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Make sure the linked list only shows the minimal necessary information.\n\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread({}, options, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n\n return BufferList;\n}();\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/buffer_list.js?"); +eval("!function(t,e){ true?module.exports=e():0}(this,(function(){return(()=>{\"use strict\";var t={255:(t,e)=>{e.l=class{hexSlice(t=0,e){return Array.prototype.map.call(this.slice(t,e),(t=>(\"00\"+t.toString(16)).slice(-2))).join(\"\")}}},48:(t,e,r)=>{const{internalBinding:n,Array:o,ArrayIsArray:i,ArrayPrototypeFilter:l,ArrayPrototypeForEach:c,ArrayPrototypePush:s,ArrayPrototypePushApply:a,ArrayPrototypeSort:p,ArrayPrototypeUnshift:u,BigIntPrototypeValueOf:y,BooleanPrototypeValueOf:f,DatePrototypeGetTime:g,DatePrototypeToISOString:d,DatePrototypeToString:h,ErrorPrototypeToString:b,FunctionPrototypeCall:m,FunctionPrototypeToString:$,JSONStringify:S,MapPrototypeGetSize:x,MapPrototypeEntries:P,MathFloor:O,MathMax:A,MathMin:v,MathRound:j,MathSqrt:w,Number:E,NumberIsNaN:L,NumberParseFloat:F,NumberParseInt:I,NumberPrototypeValueOf:k,Object:R,ObjectAssign:T,ObjectCreate:z,ObjectDefineProperty:N,ObjectGetOwnPropertyDescriptor:B,ObjectGetOwnPropertyNames:M,ObjectGetOwnPropertySymbols:_,ObjectGetPrototypeOf:D,ObjectIs:C,ObjectKeys:G,ObjectPrototypeHasOwnProperty:H,ObjectPrototypePropertyIsEnumerable:W,ObjectSeal:V,ObjectSetPrototypeOf:U,ReflectOwnKeys:Z,RegExp:Y,RegExpPrototypeTest:K,RegExpPrototypeToString:q,SafeStringIterator:J,SafeMap:Q,SafeSet:X,SetPrototypeGetSize:tt,SetPrototypeValues:et,String:rt,StringPrototypeCharCodeAt:nt,StringPrototypeCodePointAt:ot,StringPrototypeIncludes:it,StringPrototypeNormalize:lt,StringPrototypePadEnd:ct,StringPrototypePadStart:st,StringPrototypeRepeat:at,StringPrototypeReplace:pt,StringPrototypeSlice:ut,StringPrototypeSplit:yt,StringPrototypeToLowerCase:ft,StringPrototypeTrim:gt,StringPrototypeValueOf:dt,SymbolPrototypeToString:ht,SymbolPrototypeValueOf:bt,SymbolIterator:mt,SymbolToStringTag:$t,TypedArrayPrototypeGetLength:St,TypedArrayPrototypeGetSymbolToStringTag:xt,Uint8Array:Pt,uncurryThis:Ot}=r(765),{getOwnNonIndexProperties:At,getPromiseDetails:vt,getProxyDetails:jt,kPending:wt,kRejected:Et,previewEntries:Lt,getConstructorName:Ft,getExternalValue:It,propertyFilter:{ALL_PROPERTIES:kt,ONLY_ENUMERABLE:Rt},Proxy:Tt}=r(891),{customInspectSymbol:zt,isError:Nt,join:Bt,removeColors:Mt}=r(335),{codes:{ERR_INVALID_ARG_TYPE:_t},isStackOverflowError:Dt}=r(101),{isAsyncFunction:Ct,isGeneratorFunction:Gt,isAnyArrayBuffer:Ht,isArrayBuffer:Wt,isArgumentsObject:Vt,isBoxedPrimitive:Ut,isDataView:Zt,isExternal:Yt,isMap:Kt,isMapIterator:qt,isModuleNamespaceObject:Jt,isNativeError:Qt,isPromise:Xt,isSet:te,isSetIterator:ee,isWeakMap:re,isWeakSet:ne,isRegExp:oe,isDate:ie,isTypedArray:le,isStringObject:ce,isNumberObject:se,isBooleanObject:ae,isBigIntObject:pe}=r(63),ue=r(183),{NativeModule:ye}=r(992),{validateObject:fe}=r(356);let ge;const de=new X(l(M(r.g),(t=>K(/^[A-Z][a-zA-Z0-9]+$/,t)))),he=t=>void 0===t&&void 0!==t,be=V({showHidden:!1,depth:2,colors:!1,customInspect:!0,showProxy:!1,maxArrayLength:100,maxStringLength:1e4,breakLength:80,compact:3,sorted:!1,getters:!1}),me=/[\\x00-\\x1f\\x27\\x5c\\x7f-\\x9f]/,$e=/[\\x00-\\x1f\\x27\\x5c\\x7f-\\x9f]/g,Se=/[\\x00-\\x1f\\x5c\\x7f-\\x9f]/,xe=/[\\x00-\\x1f\\x5c\\x7f-\\x9f]/g,Pe=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Oe=/^(0|[1-9][0-9]*)$/,Ae=/^ at (?:[^/\\\\(]+ \\(|)node:(.+):\\d+:\\d+\\)?$/,ve=/^ at (?:[^/\\\\(]+ \\(|)((?<~]))\",\"g\");let Ie;function ke(t,e){const r={budget:{},indentationLvl:0,seen:[],currentDepth:0,stylize:De,showHidden:be.showHidden,depth:be.depth,colors:be.colors,customInspect:be.customInspect,showProxy:be.showProxy,maxArrayLength:be.maxArrayLength,maxStringLength:be.maxStringLength,breakLength:be.breakLength,compact:be.compact,sorted:be.sorted,getters:be.getters};if(arguments.length>1)if(arguments.length>2&&(void 0!==arguments[2]&&(r.depth=arguments[2]),arguments.length>3&&void 0!==arguments[3]&&(r.colors=arguments[3])),\"boolean\"==typeof e)r.showHidden=e;else if(e){const t=G(e);for(let n=0;nbe,set:t=>(fe(t,\"options\"),T(be,t))});const Re=39,Te=49;function ze(t,e){N(ke.colors,e,{get(){return this[t]},set(e){this[t]=e},configurable:!0,enumerable:!1})}function Ne(t,e){return-1===e?`\"${t}\"`:-2===e?`\\`${t}\\``:`'${t}'`}ke.colors=T(z(null),{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],blink:[5,25],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],doubleunderline:[21,24],black:[30,Re],red:[31,Re],green:[32,Re],yellow:[33,Re],blue:[34,Re],magenta:[35,Re],cyan:[36,Re],white:[37,Re],bgBlack:[40,Te],bgRed:[41,Te],bgGreen:[42,Te],bgYellow:[43,Te],bgBlue:[44,Te],bgMagenta:[45,Te],bgCyan:[46,Te],bgWhite:[47,Te],framed:[51,54],overlined:[53,55],gray:[90,Re],redBright:[91,Re],greenBright:[92,Re],yellowBright:[93,Re],blueBright:[94,Re],magentaBright:[95,Re],cyanBright:[96,Re],whiteBright:[97,Re],bgGray:[100,Te],bgRedBright:[101,Te],bgGreenBright:[102,Te],bgYellowBright:[103,Te],bgBlueBright:[104,Te],bgMagentaBright:[105,Te],bgCyanBright:[106,Te],bgWhiteBright:[107,Te]}),ze(\"gray\",\"grey\"),ze(\"gray\",\"blackBright\"),ze(\"bgGray\",\"bgGrey\"),ze(\"bgGray\",\"bgBlackBright\"),ze(\"dim\",\"faint\"),ze(\"strikethrough\",\"crossedout\"),ze(\"strikethrough\",\"strikeThrough\"),ze(\"strikethrough\",\"crossedOut\"),ze(\"hidden\",\"conceal\"),ze(\"inverse\",\"swapColors\"),ze(\"inverse\",\"swapcolors\"),ze(\"doubleunderline\",\"doubleUnderline\"),ke.styles=T(z(null),{special:\"cyan\",number:\"yellow\",bigint:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",symbol:\"green\",date:\"magenta\",regexp:\"red\",module:\"underline\"});const Be=t=>Le[nt(t)];function Me(t){let e=me,r=$e,n=39;if(it(t,\"'\")&&(it(t,'\"')?it(t,\"`\")||it(t,\"${\")||(n=-2):n=-1,39!==n&&(e=Se,r=xe)),t.length<5e3&&!K(e,t))return Ne(t,n);if(t.length>100)return Ne(t=pt(t,r,Be),n);let o=\"\",i=0;const l=t.length;for(let e=0;e126&&r<160)&&(o+=i===e?Le[r]:`${ut(t,i,e)}${Le[r]}`,i=e+1)}return i!==l&&(o+=ut(t,i)),Ne(o,n)}function _e(t,e){const r=ke.styles[e];if(void 0!==r){const e=ke.colors[r];if(void 0!==e)return`\u001b[${e[0]}m${t}\u001b[${e[1]}m`}return t}function De(t){return t}function Ce(){return[]}function Ge(t,e){try{return t instanceof e}catch{return!1}}function He(t,e,r,n){let o;const i=t;for(;t||he(t);){const l=B(t,\"constructor\");if(void 0!==l&&\"function\"==typeof l.value&&\"\"!==l.value.name&&Ge(i,l.value))return void 0===n||o===t&&de.has(l.value.name)||We(e,i,o||i,r,n),l.value.name;t=D(t),void 0===o&&(o=t)}if(null===o)return null;const l=Ft(i);if(r>e.depth&&null!==e.depth)return`${l} `;const c=He(o,e,r+1,n);return null===c?`${l} <${ke(o,{...e,customInspect:!1,depth:-1})}>`:`${l} <${c}>`}function We(t,e,r,n,o){let i,l,a=0;do{if(0!==a||e===r){if(null===(r=D(r)))return;const t=B(r,\"constructor\");if(void 0!==t&&\"function\"==typeof t.value&&de.has(t.value.name))return}0===a?l=new X:c(i,(t=>l.add(t))),i=Z(r);for(const c of i){if(\"constructor\"===c||H(e,c)||0!==a&&l.has(c))continue;const i=B(r,c);if(\"function\"==typeof i.value)continue;const p=fr(t,r,n,c,0,i,e);t.colors?s(o,`\u001b[2m${p}\u001b[22m`):s(o,p)}}while(3!=++a)}function Ve(t,e,r,n=\"\"){return null===t?\"\"!==e&&r!==e?`[${r}${n}: null prototype] [${e}] `:`[${r}${n}: null prototype] `:\"\"!==e&&t!==e?`${t}${n} [${e}] `:`${t}${n} `}function Ue(t,e){let r;const n=_(t);if(e)r=M(t),0!==n.length&&a(r,n);else{try{r=G(t)}catch(e){ue(Qt(e)&&\"ReferenceError\"===e.name&&Jt(t)),r=M(t)}0!==n.length&&a(r,l(n,(e=>W(t,e))))}return r}function Ze(t,e,r){let n=\"\";return null===e&&(n=Ft(t),n===r&&(n=\"Object\")),Ve(e,r,n)}function Ye(t,e,r,n){if(\"object\"!=typeof e&&\"function\"!=typeof e&&!he(e))return Qe(t.stylize,e,t);if(null===e)return t.stylize(\"null\",\"null\");const o=e,l=jt(e,!!t.showProxy);if(void 0!==l){if(t.showProxy)return function(t,e,r){if(r>t.depth&&null!==t.depth)return t.stylize(\"Proxy [Array]\",\"special\");r+=1,t.indentationLvl+=2;const n=[Ye(t,e[0],r),Ye(t,e[1],r)];return t.indentationLvl-=2,dr(t,n,\"\",[\"Proxy [\",\"]\"],2,r)}(t,l,r);e=l}if(t.customInspect){const n=e[zt];if(\"function\"==typeof n&&n!==ke&&(!e.constructor||e.constructor.prototype!==e)){const e=null===t.depth?null:t.depth-r,i=m(n,o,e,function(t,e){const r={stylize:t.stylize,showHidden:t.showHidden,depth:t.depth,colors:t.colors,customInspect:t.customInspect,showProxy:t.showProxy,maxArrayLength:t.maxArrayLength,maxStringLength:t.maxStringLength,breakLength:t.breakLength,compact:t.compact,sorted:t.sorted,getters:t.getters,...t.userOptions};if(e){U(r,null);for(const t of G(r))\"object\"!=typeof r[t]&&\"function\"!=typeof r[t]||null===r[t]||delete r[t];r.stylize=U(((e,r)=>{let n;try{n=`${t.stylize(e,r)}`}catch{}return\"string\"!=typeof n?e:n}),null)}return r}(t,void 0!==l||!(o instanceof R)));if(i!==o)return\"string\"!=typeof i?Ye(t,i,r):i.replace(/\\n/g,`\\n${\" \".repeat(t.indentationLvl)}`)}}if(t.seen.includes(e)){let r=1;return void 0===t.circular?(t.circular=new Q,t.circular.set(e,r)):(r=t.circular.get(e),void 0===r&&(r=t.circular.size+1,t.circular.set(e,r))),t.stylize(`[Circular *${r}]`,\"special\")}return function(t,e,r,n){let o,l;t.showHidden&&(r<=t.depth||null===t.depth)&&(l=[]);const c=He(e,t,r,l);void 0!==l&&0===l.length&&(l=void 0);let s=e[$t];(\"string\"!=typeof s||\"\"!==s&&(t.showHidden?H:W)(e,$t))&&(s=\"\");let a,p=\"\",m=Ce,S=!0,O=0;const A=t.showHidden?kt:Rt;let v,j=0;if(e[mt]||null===c)if(S=!1,i(e)){const t=\"Array\"!==c||\"\"!==s?Ve(c,s,\"Array\",`(${e.length})`):\"\";if(o=At(e,A),a=[`${t}[`,\"]\"],0===e.length&&0===o.length&&void 0===l)return`${a[0]}]`;j=2,m=rr}else if(te(e)){const r=tt(e),n=Ve(c,s,\"Set\",`(${r})`);if(o=Ue(e,t.showHidden),m=null!==c?or.bind(null,e):or.bind(null,et(e)),0===r&&0===o.length&&void 0===l)return`${n}{}`;a=[`${n}{`,\"}\"]}else if(Kt(e)){const r=x(e),n=Ve(c,s,\"Map\",`(${r})`);if(o=Ue(e,t.showHidden),m=null!==c?ir.bind(null,e):ir.bind(null,P(e)),0===r&&0===o.length&&void 0===l)return`${n}{}`;a=[`${n}{`,\"}\"]}else if(le(e)){o=At(e,A);let r=e,n=\"\";null===c&&(n=xt(e),r=new n(e));const i=St(e);if(a=[`${Ve(c,s,n,`(${i})`)}[`,\"]\"],0===e.length&&0===o.length&&!t.showHidden)return`${a[0]}]`;m=nr.bind(null,r,i),j=2}else qt(e)?(o=Ue(e,t.showHidden),a=Ke(\"Map\",s),m=ur.bind(null,a)):ee(e)?(o=Ue(e,t.showHidden),a=Ke(\"Set\",s),m=ur.bind(null,a)):S=!0;if(S)if(o=Ue(e,t.showHidden),a=[\"{\",\"}\"],\"Object\"===c){if(Vt(e)?a[0]=\"[Arguments] {\":\"\"!==s&&(a[0]=`${Ve(c,s,\"Object\")}{`),0===o.length&&void 0===l)return`${a[0]}}`}else if(\"function\"==typeof e){if(p=function(t,e,r){const n=$(t);if(\"class\"===n.slice(0,5)&&n.endsWith(\"}\")){const o=n.slice(5,-1),i=o.indexOf(\"{\");if(-1!==i&&(!o.slice(0,i).includes(\"(\")||we.test(o.replace(Ee))))return function(t,e,r){let n=`class ${H(t,\"name\")&&t.name||\"(anonymous)\"}`;if(\"Function\"!==e&&null!==e&&(n+=` [${e}]`),\"\"!==r&&e!==r&&(n+=` [${r}]`),null!==e){const e=D(t).name;e&&(n+=` extends ${e}`)}else n+=\" extends [null prototype]\";return`[${n}]`}(t,e,r)}let o=\"Function\";Gt(t)&&(o=`Generator${o}`),Ct(t)&&(o=`Async${o}`);let i=`[${o}`;return null===e&&(i+=\" (null prototype)\"),\"\"===t.name?i+=\" (anonymous)\":i+=`: ${t.name}`,i+=\"]\",e!==o&&null!==e&&(i+=` ${e}`),\"\"!==r&&e!==r&&(i+=` [${r}]`),i}(e,c,s),0===o.length&&void 0===l)return t.stylize(p,\"special\")}else if(oe(e)){p=q(null!==c?e:new Y(e));const n=Ve(c,s,\"RegExp\");if(\"RegExp \"!==n&&(p=`${n}${p}`),0===o.length&&void 0===l||r>t.depth&&null!==t.depth)return t.stylize(p,\"regexp\")}else if(ie(e)){p=L(g(e))?h(e):d(e);const r=Ve(c,s,\"Date\");if(\"Date \"!==r&&(p=`${r}${p}`),0===o.length&&void 0===l)return t.stylize(p,\"date\")}else if(Nt(e)){if(p=function(t,e,r,n,o){const i=null!=t.name?rt(t.name):\"Error\";let l=i.length,c=t.stack?rt(t.stack):b(t);if(!n.showHidden&&0!==o.length)for(const e of[\"name\",\"message\",\"stack\"]){const r=o.indexOf(e);-1!==r&&c.includes(t[e])&&o.splice(r,1)}if(null===e||i.endsWith(\"Error\")&&c.startsWith(i)&&(c.length===l||\":\"===c[l]||\"\\n\"===c[l])){let t=\"Error\";if(null===e){const e=c.match(/^([A-Z][a-z_ A-Z0-9[\\]()-]+)(?::|\\n {4}at)/)||c.match(/^([a-z_A-Z0-9-]*Error)$/);t=e&&e[1]||\"\",l=t.length,t=t||\"Error\"}const n=Ve(e,r,t).slice(0,-1);i!==n&&(c=n.includes(i)?0===l?`${n}: ${c}`:`${n}${c.slice(l)}`:`${n} [${i}]${c.slice(l)}`)}let s=t.message&&c.indexOf(t.message)||-1;-1!==s&&(s+=t.message.length);const a=c.indexOf(\"\\n at\",s);if(-1===a)c=`[${c}]`;else if(n.colors){let t=c.slice(0,a);const e=c.slice(a+1).split(\"\\n\");for(const r of e){const e=r.match(Ae)||r.match(ve);if(null!==e&&ye.exists(e[1]))t+=`\\n${n.stylize(r,\"undefined\")}`;else{let e;t+=\"\\n\";let o=0;for(;e=je.exec(r);)t+=r.slice(o,e.index+14),t+=n.stylize(e[1],\"module\"),o=e.index+e[0].length;t+=0===o?r:r.slice(o)}}c=t}if(0!==n.indentationLvl){const t=\" \".repeat(n.indentationLvl);c=c.replace(/\\n/g,`\\n${t}`)}return c}(e,c,s,t,o),0===o.length&&void 0===l)return p}else if(Ht(e)){const r=Ve(c,s,Wt(e)?\"ArrayBuffer\":\"SharedArrayBuffer\");if(void 0===n)m=er;else if(0===o.length&&void 0===l)return r+`{ byteLength: ${qe(t.stylize,e.byteLength)} }`;a[0]=`${r}{`,u(o,\"byteLength\")}else if(Zt(e))a[0]=`${Ve(c,s,\"DataView\")}{`,u(o,\"byteLength\",\"byteOffset\",\"buffer\");else if(Xt(e))a[0]=`${Ve(c,s,\"Promise\")}{`,m=yr;else if(ne(e))a[0]=`${Ve(c,s,\"WeakSet\")}{`,m=t.showHidden?ar:sr;else if(re(e))a[0]=`${Ve(c,s,\"WeakMap\")}{`,m=t.showHidden?pr:sr;else if(Jt(e))a[0]=`${Ve(c,s,\"Module\")}{`,m=Xe.bind(null,o);else if(Ut(e)){if(p=function(t,e,r,n,o){let i,l;se(t)?(i=k,l=\"Number\"):ce(t)?(i=dt,l=\"String\",r.splice(0,t.length)):ae(t)?(i=f,l=\"Boolean\"):pe(t)?(i=y,l=\"BigInt\"):(i=bt,l=\"Symbol\");let c=`[${l}`;return l!==n&&(c+=null===n?\" (null prototype)\":` (${n})`),c+=`: ${Qe(De,i(t),e)}]`,\"\"!==o&&o!==n&&(c+=` [${o}]`),0!==r.length||e.stylize===De?c:e.stylize(c,ft(l))}(e,t,o,c,s),0===o.length&&void 0===l)return p}else{if(0===o.length&&void 0===l){if(Yt(e)){const r=It(e).toString(16);return t.stylize(`[External: ${r}]`,\"special\")}return`${Ze(e,c,s)}{}`}a[0]=`${Ze(e,c,s)}{`}if(r>t.depth&&null!==t.depth){let r=Ze(e,c,s).slice(0,-1);return null!==c&&(r=`[${r}]`),t.stylize(r,\"special\")}r+=1,t.seen.push(e),t.currentDepth=r;const w=t.indentationLvl;try{for(v=m(t,e,r),O=0;O`,\"special\");!0!==t.compact?p=\"\"===p?e:`${e} ${p}`:a[0]=`${e} ${a[0]}`}}if(t.seen.pop(),t.sorted){const e=!0===t.sorted?void 0:t.sorted;if(0===j)v=v.sort(e);else if(o.length>1){const t=v.slice(v.length-o.length).sort(e);v.splice(v.length-o.length,o.length,...t)}}const E=dr(t,v,p,a,j,r,e),F=(t.budget[t.indentationLvl]||0)+E.length;return t.budget[t.indentationLvl]=F,F>2**27&&(t.depth=-1),E}(t,e,r,n)}function Ke(t,e){return e!==`${t} Iterator`&&(\"\"!==e&&(e+=\"] [\"),e+=`${t} Iterator`),[`[${e}] {`,\"}\"]}function qe(t,e){return t(C(e,-0)?\"-0\":`${e}`,\"number\")}function Je(t,e){return t(`${e}n`,\"bigint\")}function Qe(t,e,r){if(\"string\"==typeof e){let n=\"\";if(e.length>r.maxStringLength){const t=e.length-r.maxStringLength;e=e.slice(0,r.maxStringLength),n=`... ${t} more character${t>1?\"s\":\"\"}`}return!0!==r.compact&&e.length>16&&e.length>r.breakLength-r.indentationLvl-4?e.split(/(?<=\\n)/).map((e=>t(Me(e),\"string\"))).join(` +\\n${\" \".repeat(r.indentationLvl+2)}`)+n:t(Me(e),\"string\")+n}return\"number\"==typeof e?qe(t,e):\"bigint\"==typeof e?Je(t,e):\"boolean\"==typeof e?t(`${e}`,\"boolean\"):void 0===e?t(\"undefined\",\"undefined\"):t(ht(e),\"symbol\")}function Xe(t,e,r,n){const i=new o(t.length);for(let o=0;o\",\"special\")}return t.length=0,i}function tr(t,e,r,n,o,i){const l=G(e);let c=i;for(;i2**32-2)break;if(`${c}`!==s){if(!Oe.test(s))break;const e=a-c,r=`<${e} empty item${e>1?\"s\":\"\"}>`;if(o.push(t.stylize(r,\"undefined\")),c=a,o.length===n)break}o.push(fr(t,e,r,s,1)),c++}const s=e.length-c;if(o.length!==n){if(s>0){const e=`<${s} empty item${s>1?\"s\":\"\"}>`;o.push(t.stylize(e,\"undefined\"))}}else s>0&&o.push(`... ${s} more item${s>1?\"s\":\"\"}`);return o}function er(t,e){let n;try{n=new Pt(e)}catch{return[t.stylize(\"(detached)\",\"special\")]}void 0===ge&&(ge=Ot(r(255).l.prototype.hexSlice));let o=gt(pt(ge(n,0,v(t.maxArrayLength,n.length)),/(.{2})/g,\"$1 \"));const i=n.length-t.maxArrayLength;return i>0&&(o+=` ... ${i} more byte${i>1?\"s\":\"\"}`),[`${t.stylize(\"[Uint8Contents]\",\"special\")}: <${o}>`]}function rr(t,e,r){const n=e.length,o=v(A(0,t.maxArrayLength),n),i=n-o,l=[];for(let n=0;n0&&l.push(`... ${i} more item${i>1?\"s\":\"\"}`),l}function nr(t,e,r,n,i){const l=v(A(0,r.maxArrayLength),e),c=t.length-l,a=new o(l),p=t.length>0&&\"number\"==typeof t[0]?qe:Je;for(let e=0;e0&&(a[l]=`... ${c} more item${c>1?\"s\":\"\"}`),r.showHidden){r.indentationLvl+=2;for(const e of[\"BYTES_PER_ELEMENT\",\"length\",\"byteLength\",\"byteOffset\",\"buffer\"]){const n=Ye(r,t[e],i,!0);s(a,`[${e}]: ${n}`)}r.indentationLvl-=2}return a}function or(t,e,r,n){const o=[];e.indentationLvl+=2;for(const r of t)s(o,Ye(e,r,n));return e.indentationLvl-=2,o}function ir(t,e,r,n){const o=[];e.indentationLvl+=2;for(const[r,i]of t)o.push(`${Ye(e,r,n)} => `+Ye(e,i,n));return e.indentationLvl-=2,o}function lr(t,e,r,n){const i=A(t.maxArrayLength,0),l=v(i,r.length),c=new o(l);t.indentationLvl+=2;for(let n=0;n0&&s(c,`... ${a} more item${a>1?\"s\":\"\"}`),c}function cr(t,e,r,n){const i=A(t.maxArrayLength,0),l=r.length/2,c=l-i,s=v(i,l);let a=new o(s),p=0;if(t.indentationLvl+=2,0===n){for(;p ${Ye(t,r[n+1],e)}`}t.sorted||(a=a.sort())}else for(;p0&&a.push(`... ${c} more item${c>1?\"s\":\"\"}`),a}function sr(t){return[t.stylize(\"\",\"special\")]}function ar(t,e,r){return lr(t,r,Lt(e),0)}function pr(t,e,r){return cr(t,r,Lt(e),0)}function ur(t,e,r,n){const[o,i]=Lt(r,!0);return i?(t[0]=t[0].replace(/ Iterator] {$/,\" Entries] {\"),cr(e,n,o,2)):lr(e,n,o,1)}function yr(t,e,r){let n;const[o,i]=vt(e);if(o===wt)n=[t.stylize(\"\",\"special\")];else{t.indentationLvl+=2;const e=Ye(t,i,r);t.indentationLvl-=2,n=[o===Et?`${t.stylize(\"\",\"special\")} ${e}`:e]}return n}function fr(t,e,r,n,o,i,l=e){let c,s,a=\" \";if(void 0!==(i=i||B(e,n)||{value:e[n],enumerable:!0}).value){const e=!0!==t.compact||0!==o?2:3;t.indentationLvl+=e,s=Ye(t,i.value,r),3===e&&t.breakLength`;s=`${n(`[${e}:`,o)} ${r}${n(\"]\",o)}`}else s=t.stylize(`[${e}]`,o)}else s=void 0!==i.set?t.stylize(\"[Setter]\",\"special\"):t.stylize(\"undefined\",\"undefined\");if(1===o)return s;if(\"symbol\"==typeof n){const e=pt(ht(n),$e,Be);c=`[${t.stylize(e,\"symbol\")}]`}else c=!1===i.enumerable?`[${pt(n,$e,Be)}]`:K(Pe,n)?t.stylize(n,\"name\"):t.stylize(Me(n),\"string\");return`${c}:${a}${s}`}function gr(t,e,r,n){let o=e.length+r;if(o+e.length>t.breakLength)return!1;for(let r=0;rt.breakLength)return!1;return\"\"===n||!it(n,\"\\n\")}function dr(t,e,r,n,i,l,c){if(!0!==t.compact){if(\"number\"==typeof t.compact&&t.compact>=1){const a=e.length;if(2===i&&a>6&&(e=function(t,e,r){let n=0,i=0,l=0,c=e.length;t.maxArrayLength5||i<=6)){const o=2.5,i=w(p-n/e.length),l=A(p-3-i,1),u=v(j(w(o*l*c)/l),O((t.breakLength-t.indentationLvl)/p),4*t.compact,15);if(u<=1)return e;const y=[],f=[];for(let t=0;tr&&(r=a[n]);r+=2,f[t]=r}let g=st;if(void 0!==r)for(let t=0;tyt(t.message,\"\\n\",1)[0];let mr;function $r(t){try{return S(t)}catch(t){if(!mr)try{const t={};t.a=t,S(t)}catch(t){mr=br(t)}if(\"TypeError\"===t.name&&br(t)===mr)return\"[Circular]\";throw t}}function Sr(t,e){const r=e[0];let n=0,o=\"\",i=\"\";if(\"string\"==typeof r){if(1===e.length)return r;let l,c=0;for(let i=0;i=127){n+=t.getStringWidth(e.slice(r).normalize(\"NFC\"));break}n+=o>=32?1:0}return n}}else{Ie=function(r,n=!0){let o=0;n&&(r=xr(r)),r=lt(r,\"NFC\");for(const n of new J(r)){const r=ot(n,0);t(r)?o+=2:e(r)||o++}return o};const t=t=>t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=12871&&12351!==t||t>=12880&&t<=19903||t>=19968&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510||t>=110592&&t<=110593||t>=127488&&t<=127569||t>=127744&&t<=128591||t>=131072&&t<=262141),e=t=>t<=31||t>=127&&t<=159||t>=768&&t<=879||t>=8203&&t<=8207||t>=8400&&t<=8447||t>=65024&&t<=65039||t>=65056&&t<=65071||t>=917760&&t<=917999}function xr(t){return t.replace(Fe,\"\")}t.exports={inspect:ke,format:function(...t){return Sr(void 0,t)},formatWithOptions:function(t,...e){if(\"object\"!=typeof t||null===t)throw new _t(\"inspectOptions\",\"object\",t);return Sr(t,e)},stylizeWithColor:_e,stylizeWithHTML(t,e){const r=ke.styles[e];return void 0!==r?`${t}`:t},Proxy:Tt}},183:t=>{t.exports=function(t){if(!t)throw new Error(\"Assertion failed\")}},992:(t,e)=>{e.NativeModule={exists:t=>!t.startsWith(\"/\")}},101:(t,e,r)=>{const{ArrayIsArray:n,ArrayPrototypeIncludes:o,ArrayPrototypeIndexOf:i,ArrayPrototypeJoin:l,ArrayPrototypePop:c,ArrayPrototypePush:s,ArrayPrototypeSplice:a,ErrorCaptureStackTrace:p,ObjectDefineProperty:u,ReflectApply:y,RegExpPrototypeTest:f,SafeMap:g,StringPrototypeEndsWith:d,StringPrototypeIncludes:h,StringPrototypeSlice:b,StringPrototypeToLowerCase:m}=r(765),$=new g,S={},x=/^([A-Z][a-z0-9]*)+$/,P=[\"string\",\"function\",\"number\",\"object\",\"Function\",\"Object\",\"boolean\",\"bigint\",\"symbol\"];let O,A,v=null;function j(){return v||(v=r(48)),v}const w=E((function(t,e,r){(t=L(t)).name=`${e} [${r}]`,t.stack,delete t.name}));function E(t){const e=\"__node_internal_\"+t.name;return u(t,\"name\",{value:e}),t}const L=E((function(t){return O=Error.stackTraceLimit,Error.stackTraceLimit=1/0,p(t),Error.stackTraceLimit=O,t}));let F,I;var k,R,T,z,N;t.exports={codes:S,hideStackFrames:E,isStackOverflowError:function(t){if(void 0===I)try{!function t(){t()}()}catch(t){I=t.message,F=t.name}return t&&t.name===F&&t.message===I}},k=\"ERR_INVALID_ARG_TYPE\",R=(t,e,r)=>{A(\"string\"==typeof t,\"'name' must be a string\"),n(e)||(e=[e]);let p=\"The \";d(t,\" argument\")?p+=`${t} `:p+=`\"${t}\" ${h(t,\".\")?\"property\":\"argument\"} `,p+=\"must be \";const u=[],y=[],g=[];for(const t of e)A(\"string\"==typeof t,\"All expected entries have to be of type string\"),o(P,t)?s(u,m(t)):f(x,t)?s(y,t):(A(\"object\"!==t,'The value \"object\" should be written as \"Object\"'),s(g,t));if(y.length>0){const t=i(u,\"object\");-1!==t&&(a(u,t,1),s(y,\"Object\"))}if(u.length>0){if(u.length>2){const t=c(u);p+=`one of type ${l(u,\", \")}, or ${t}`}else p+=2===u.length?`one of type ${u[0]} or ${u[1]}`:`of type ${u[0]}`;(y.length>0||g.length>0)&&(p+=\" or \")}if(y.length>0){if(y.length>2){const t=c(y);p+=`an instance of ${l(y,\", \")}, or ${t}`}else p+=`an instance of ${y[0]}`,2===y.length&&(p+=` or ${y[1]}`);g.length>0&&(p+=\" or \")}if(g.length>0)if(g.length>2){const t=c(g);p+=`one of ${l(g,\", \")}, or ${t}`}else 2===g.length?p+=`one of ${g[0]} or ${g[1]}`:(m(g[0])!==g[0]&&(p+=\"an \"),p+=`${g[0]}`);if(null==r)p+=`. Received ${r}`;else if(\"function\"==typeof r&&r.name)p+=`. Received function ${r.name}`;else if(\"object\"==typeof r)r.constructor&&r.constructor.name?p+=`. Received an instance of ${r.constructor.name}`:p+=`. Received ${j().inspect(r,{depth:-1})}`;else{let t=j().inspect(r,{colors:!1});t.length>25&&(t=`${b(t,0,25)}...`),p+=`. Received type ${typeof r} (${t})`}return p},T=TypeError,$.set(k,R),S[k]=(z=T,N=k,function(...t){const e=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new z;Error.stackTraceLimit=e;const o=function(t,e,n){const o=$.get(t);return void 0===A&&(A=r(183)),A(\"function\"==typeof o),A(o.length<=e.length,`Code: ${t}; The provided arguments length (${e.length}) does not match the required ones (${o.length}).`),y(o,n,e)}(N,t,n);return u(n,\"message\",{value:o,enumerable:!1,writable:!0,configurable:!0}),u(n,\"toString\",{value(){return`${this.name} [${N}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}),w(n,z.name,N),n.code=N,n})},335:t=>{const e=/\\u001b\\[\\d\\d?m/g;t.exports={customInspectSymbol:Symbol.for(\"nodejs.util.inspect.custom\"),isError:t=>t instanceof Error,join:Array.prototype.join.call.bind(Array.prototype.join),removeColors:t=>String.prototype.replace.call(t,e,\"\")}},63:(t,e,r)=>{const{getConstructorName:n}=r(891);function o(t,...e){for(const r of e){const e=globalThis[r];if(e&&t instanceof e)return!0}for(;t;){if(\"object\"!=typeof t)return!1;if(e.indexOf(n(t))>=0)return!0;t=Object.getPrototypeOf(t)}return!1}function i(t){return e=>{if(!o(e,t.name))return!1;try{t.prototype.valueOf.call(e)}catch{return!1}return!0}}\"object\"!=typeof globalThis&&(Object.defineProperty(Object.prototype,\"__magic__\",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);const l=i(String),c=i(Number),s=i(Boolean),a=i(BigInt),p=i(Symbol);t.exports={isAsyncFunction:t=>\"function\"==typeof t&&Function.prototype.toString.call(t).startsWith(\"async\"),isGeneratorFunction:t=>\"function\"==typeof t&&Function.prototype.toString.call(t).match(/^(async\\s+)?function *\\*/),isAnyArrayBuffer:t=>o(t,\"ArrayBuffer\",\"SharedArrayBuffer\"),isArrayBuffer:t=>o(t,\"ArrayBuffer\"),isArgumentsObject:t=>!1,isBoxedPrimitive:t=>c(t)||l(t)||s(t)||a(t)||p(t),isDataView:t=>o(t,\"DataView\"),isExternal:t=>\"object\"==typeof t&&Object.isFrozen(t)&&null==Object.getPrototypeOf(t),isMap(t){if(!o(t,\"Map\"))return!1;try{t.has()}catch{return!1}return!0},isMapIterator:t=>\"[object Map Iterator]\"===Object.prototype.toString.call(Object.getPrototypeOf(t)),isModuleNamespaceObject:t=>t&&\"object\"==typeof t&&\"Module\"===t[Symbol.toStringTag],isNativeError:t=>t instanceof Error&&o(t,\"Error\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"AggregateError\"),isPromise:t=>o(t,\"Promise\"),isSet(t){if(!o(t,\"Set\"))return!1;try{t.has()}catch{return!1}return!0},isSetIterator:t=>\"[object Set Iterator]\"===Object.prototype.toString.call(Object.getPrototypeOf(t)),isWeakMap:t=>o(t,\"WeakMap\"),isWeakSet:t=>o(t,\"WeakSet\"),isRegExp:t=>o(t,\"RegExp\"),isDate(t){if(o(t,\"Date\"))try{return Date.prototype.getTime.call(t),!0}catch{}return!1},isTypedArray:t=>o(t,\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"),isStringObject:l,isNumberObject:c,isBooleanObject:s,isBigIntObject:a,isSymbolObject:p}},356:(t,e,r)=>{const{hideStackFrames:n,codes:{ERR_INVALID_ARG_TYPE:o}}=r(101);e.validateObject=n(((t,e,{nullable:r=!1}={})=>{if(!r&&null===t||Array.isArray(t)||\"object\"!=typeof t)throw new o(e,\"Object\",t)}))},765:t=>{const e=(t,e)=>{class r{constructor(e){this._iterator=t(e)}next(){return e(this._iterator)}[Symbol.iterator](){return this}}return Object.setPrototypeOf(r.prototype,null),Object.freeze(r.prototype),Object.freeze(r),r};function r(t,e){return Function.prototype.call.bind(t.prototype.__lookupGetter__(e))}function n(t){return Function.prototype.call.bind(t)}const o=(t,e)=>{Array.prototype.forEach.call(Reflect.ownKeys(t),(r=>{Reflect.getOwnPropertyDescriptor(e,r)||Reflect.defineProperty(e,r,Reflect.getOwnPropertyDescriptor(t,r))}))},i=(t,r)=>{if(Symbol.iterator in t.prototype){const o=new t;let i;Array.prototype.forEach.call(Reflect.ownKeys(t.prototype),(l=>{if(!Reflect.getOwnPropertyDescriptor(r.prototype,l)){const c=Reflect.getOwnPropertyDescriptor(t.prototype,l);if(\"function\"==typeof c.value&&0===c.value.length&&Symbol.iterator in(Function.prototype.call.call(c.value,o)||{})){const t=n(c.value);null==i&&(i=n(t(o).next));const r=e(t,i);c.value=function(){return new r(this)}}Reflect.defineProperty(r.prototype,l,c)}}))}else o(t.prototype,r.prototype);return o(t,r),Object.setPrototypeOf(r.prototype,null),Object.freeze(r.prototype),Object.freeze(r),r},l=Function.prototype.call.bind(String.prototype[Symbol.iterator]),c=Reflect.getPrototypeOf(l(\"\"));t.exports={makeSafe:i,internalBinding(t){if(\"config\"===t)return{hasIntl:!1};throw new Error(`unknown module: \"${t}\"`)},Array,ArrayIsArray:Array.isArray,ArrayPrototypeFilter:Function.prototype.call.bind(Array.prototype.filter),ArrayPrototypeForEach:Function.prototype.call.bind(Array.prototype.forEach),ArrayPrototypeIncludes:Function.prototype.call.bind(Array.prototype.includes),ArrayPrototypeIndexOf:Function.prototype.call.bind(Array.prototype.indexOf),ArrayPrototypeJoin:Function.prototype.call.bind(Array.prototype.join),ArrayPrototypePop:Function.prototype.call.bind(Array.prototype.pop),ArrayPrototypePush:Function.prototype.call.bind(Array.prototype.push),ArrayPrototypePushApply:Function.apply.bind(Array.prototype.push),ArrayPrototypeSort:Function.prototype.call.bind(Array.prototype.sort),ArrayPrototypeSplice:Function.prototype.call.bind(Array.prototype.slice),ArrayPrototypeUnshift:Function.prototype.call.bind(Array.prototype.unshift),BigIntPrototypeValueOf:Function.prototype.call.bind(BigInt.prototype.valueOf),BooleanPrototypeValueOf:Function.prototype.call.bind(Boolean.prototype.valueOf),DatePrototypeGetTime:Function.prototype.call.bind(Date.prototype.getTime),DatePrototypeToISOString:Function.prototype.call.bind(Date.prototype.toISOString),DatePrototypeToString:Function.prototype.call.bind(Date.prototype.toString),ErrorCaptureStackTrace:function(t){const e=(new Error).stack;t.stack=e.replace(/.*\\n.*/,\"$1\")},ErrorPrototypeToString:Function.prototype.call.bind(Error.prototype.toString),FunctionPrototypeCall:Function.prototype.call.bind(Function.prototype.call),FunctionPrototypeToString:Function.prototype.call.bind(Function.prototype.toString),JSONStringify:JSON.stringify,MapPrototypeGetSize:r(Map,\"size\"),MapPrototypeEntries:Function.prototype.call.bind(Map.prototype.entries),MathFloor:Math.floor,MathMax:Math.max,MathMin:Math.min,MathRound:Math.round,MathSqrt:Math.sqrt,Number,NumberIsNaN:Number.isNaN,NumberParseFloat:Number.parseFloat,NumberParseInt:Number.parseInt,NumberPrototypeValueOf:Function.prototype.call.bind(Number.prototype.valueOf),Object,ObjectAssign:Object.assign,ObjectCreate:Object.create,ObjectDefineProperty:Object.defineProperty,ObjectGetOwnPropertyDescriptor:Object.getOwnPropertyDescriptor,ObjectGetOwnPropertyNames:Object.getOwnPropertyNames,ObjectGetOwnPropertySymbols:Object.getOwnPropertySymbols,ObjectGetPrototypeOf:Object.getPrototypeOf,ObjectIs:Object.is,ObjectKeys:Object.keys,ObjectPrototypeHasOwnProperty:Function.prototype.call.bind(Object.prototype.hasOwnProperty),ObjectPrototypePropertyIsEnumerable:Function.prototype.call.bind(Object.prototype.propertyIsEnumerable),ObjectSeal:Object.seal,ObjectSetPrototypeOf:Object.setPrototypeOf,ReflectApply:Reflect.apply,ReflectOwnKeys:Reflect.ownKeys,RegExp,RegExpPrototypeTest:Function.prototype.call.bind(RegExp.prototype.test),RegExpPrototypeToString:Function.prototype.call.bind(RegExp.prototype.toString),SafeStringIterator:e(l,Function.prototype.call.bind(c.next)),SafeMap:i(Map,class extends Map{constructor(t){super(t)}}),SafeSet:i(Set,class extends Set{constructor(t){super(t)}}),SetPrototypeGetSize:r(Set,\"size\"),SetPrototypeValues:Function.prototype.call.bind(Set.prototype.values),String,StringPrototypeCharCodeAt:Function.prototype.call.bind(String.prototype.charCodeAt),StringPrototypeCodePointAt:Function.prototype.call.bind(String.prototype.codePointAt),StringPrototypeEndsWith:Function.prototype.call.bind(String.prototype.endsWith),StringPrototypeIncludes:Function.prototype.call.bind(String.prototype.includes),StringPrototypeNormalize:Function.prototype.call.bind(String.prototype.normalize),StringPrototypePadEnd:Function.prototype.call.bind(String.prototype.padEnd),StringPrototypePadStart:Function.prototype.call.bind(String.prototype.padStart),StringPrototypeRepeat:Function.prototype.call.bind(String.prototype.repeat),StringPrototypeReplace:Function.prototype.call.bind(String.prototype.replace),StringPrototypeSlice:Function.prototype.call.bind(String.prototype.slice),StringPrototypeSplit:Function.prototype.call.bind(String.prototype.split),StringPrototypeToLowerCase:Function.prototype.call.bind(String.prototype.toLowerCase),StringPrototypeTrim:Function.prototype.call.bind(String.prototype.trim),StringPrototypeValueOf:Function.prototype.call.bind(String.prototype.valueOf),SymbolPrototypeToString:Function.prototype.call.bind(Symbol.prototype.toString),SymbolPrototypeValueOf:Function.prototype.call.bind(Symbol.prototype.valueOf),SymbolIterator:Symbol.iterator,SymbolFor:Symbol.for,SymbolToStringTag:Symbol.toStringTag,TypedArrayPrototypeGetLength:(\"length\",t=>t.constructor.prototype.__lookupGetter__(\"length\").call(t)),Uint8Array,uncurryThis:n}},161:t=>{const e=new WeakMap;class r{constructor(t,r){const n=new Proxy(t,r);return e.set(n,[t,r]),n}static getProxyDetails(t,r=!0){const n=e.get(t);if(n)return r?n:n[0]}}t.exports={getProxyDetails:r.getProxyDetails.bind(r),Proxy:r}},891:(t,e,r)=>{const n=r(161),o=Symbol(\"kPending\"),i=Symbol(\"kRejected\");t.exports={getOwnNonIndexProperties:function(t,e=2){const r=Object.getOwnPropertyDescriptors(t),n=[];for(const[t,o]of Object.entries(r))if(!/^(0|[1-9][0-9]*)$/.test(t)||parseInt(t,10)>=2**32-1){if(2===e&&!o.enumerable)continue;n.push(t)}for(const r of Object.getOwnPropertySymbols(t)){const o=Object.getOwnPropertyDescriptor(t,r);(2!==e||o.enumerable)&&n.push(r)}return n},getPromiseDetails:()=>[o,void 0],getProxyDetails:n.getProxyDetails,Proxy:n.Proxy,kPending:o,kRejected:i,previewEntries:t=>[[],!1],getConstructorName(t){if(!t||\"object\"!=typeof t)throw new Error(\"Invalid object\");if(t.constructor&&t.constructor.name)return t.constructor.name;const e=Object.prototype.toString.call(t).match(/^\\[object ([^\\]]+)\\]/);return e?e[1]:\"Object\"},getExternalValue:()=>BigInt(0),propertyFilter:{ALL_PROPERTIES:0,ONLY_ENUMERABLE:2}}}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return r.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),r(48)})()}));\n\n//# sourceURL=webpack://webpack-demo/../../node_modules/node-inspect-extracted/dist/inspect.js?"); /***/ }), -/***/ "./node_modules/readable-stream/lib/internal/streams/destroy.js": -/*!**********************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***! - \**********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n // undocumented cb() API, needed for core, not for public API\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n\n return this;\n}\n\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\n\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/destroy.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/end-of-stream.js": -/*!****************************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/end-of-stream.js ***! - \****************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n\nvar ERR_STREAM_PREMATURE_CLOSE = __webpack_require__(/*! ../../../errors */ \"./node_modules/readable-stream/errors-browser.js\").codes.ERR_STREAM_PREMATURE_CLOSE;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n callback.apply(this, args);\n };\n}\n\nfunction noop() {}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n\n var writableEnded = stream._writableState && stream._writableState.finished;\n\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n\n var onclose = function onclose() {\n var err;\n\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\n\nmodule.exports = eos;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/end-of-stream.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/from-browser.js": -/*!***************************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/from-browser.js ***! - \***************************************************************************/ +/***/ "../../node_modules/process/browser.js": +/*!*********************************************!*\ + !*** ../../node_modules/process/browser.js ***! + \*********************************************/ /***/ ((module) => { -eval("module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/from-browser.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/pipeline.js": -/*!***********************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/pipeline.js ***! - \***********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n\nvar eos;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\n\nvar _require$codes = __webpack_require__(/*! ../../../errors */ \"./node_modules/readable-stream/errors-browser.js\").codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\n\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = __webpack_require__(/*! ./end-of-stream */ \"./node_modules/readable-stream/lib/internal/streams/end-of-stream.js\");\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true; // request.destroy just do .end - .abort is what we want\n\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\n\nfunction call(fn) {\n fn();\n}\n\nfunction pipe(from, to) {\n return from.pipe(to);\n}\n\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\n\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\n\nmodule.exports = pipeline;\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/pipeline.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/state.js": -/*!********************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/state.js ***! - \********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar ERR_INVALID_OPT_VALUE = __webpack_require__(/*! ../../../errors */ \"./node_modules/readable-stream/errors-browser.js\").codes.ERR_INVALID_OPT_VALUE;\n\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\n\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n\n return Math.floor(hwm);\n } // Default value\n\n\n return state.objectMode ? 16 : 16 * 1024;\n}\n\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/state.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***! - \*****************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -eval("module.exports = __webpack_require__(/*! events */ \"./node_modules/events/events.js\").EventEmitter;\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/readable-stream/lib/internal/streams/stream-browser.js?"); - -/***/ }), - -/***/ "./node_modules/safe-buffer/index.js": -/*!*******************************************!*\ - !*** ./node_modules/safe-buffer/index.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -eval("/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/safe-buffer/index.js?"); - -/***/ }), - -/***/ "./node_modules/stream-browserify/index.js": -/*!*************************************************!*\ - !*** ./node_modules/stream-browserify/index.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = __webpack_require__(/*! events */ \"./node_modules/events/events.js\").EventEmitter;\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n\ninherits(Stream, EE);\nStream.Readable = __webpack_require__(/*! readable-stream/lib/_stream_readable.js */ \"./node_modules/readable-stream/lib/_stream_readable.js\");\nStream.Writable = __webpack_require__(/*! readable-stream/lib/_stream_writable.js */ \"./node_modules/readable-stream/lib/_stream_writable.js\");\nStream.Duplex = __webpack_require__(/*! readable-stream/lib/_stream_duplex.js */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\nStream.Transform = __webpack_require__(/*! readable-stream/lib/_stream_transform.js */ \"./node_modules/readable-stream/lib/_stream_transform.js\");\nStream.PassThrough = __webpack_require__(/*! readable-stream/lib/_stream_passthrough.js */ \"./node_modules/readable-stream/lib/_stream_passthrough.js\");\nStream.finished = __webpack_require__(/*! readable-stream/lib/internal/streams/end-of-stream.js */ \"./node_modules/readable-stream/lib/internal/streams/end-of-stream.js\")\nStream.pipeline = __webpack_require__(/*! readable-stream/lib/internal/streams/pipeline.js */ \"./node_modules/readable-stream/lib/internal/streams/pipeline.js\")\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n\n\n//# sourceURL=webpack://webpack-demo/./node_modules/stream-browserify/index.js?"); - -/***/ }), - -/***/ "./node_modules/string_decoder/lib/string_decoder.js": -/*!***********************************************************!*\ - !*** ./node_modules/string_decoder/lib/string_decoder.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/**/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}\n\n//# sourceURL=webpack://webpack-demo/./node_modules/string_decoder/lib/string_decoder.js?"); +eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://webpack-demo/../../node_modules/process/browser.js?"); /***/ }), @@ -830,102 +90,28 @@ eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./style.css */ \"./node_modules/css-loader/dist/cjs.js!./src/style.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://webpack-demo/./src/style.css?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./style.css */ \"../../node_modules/css-loader/dist/cjs.js!./src/style.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://webpack-demo/./src/style.css?"); /***/ }), -/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": -/*!****************************************************************************!*\ - !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! - \****************************************************************************/ +/***/ "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": +/*!********************************************************************************!*\ + !*** ../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! + \********************************************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -eval("\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = true ? __webpack_require__.nc : 0;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of