diff --git a/.eslintrc.js b/.eslintrc.js index 9ca3b49f2..81fc8dc04 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,8 +4,8 @@ module.exports = { }, extends: [ 'plugin:@typescript-eslint/recommended', - // 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'prettier' + //'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'plugin:prettier/recommended' ], parser: '@typescript-eslint/parser', parserOptions: { @@ -18,6 +18,6 @@ module.exports = { '@typescript-eslint' ], rules: { - "@typescript-eslint/ban-ts-comment": "warn" + '@typescript-eslint/ban-ts-comment': 'warn' } }; diff --git a/.github/workflows/ci-casper-client-sdk.yml b/.github/workflows/ci-casper-client-sdk.yml index 31a121f6b..d9c5d7515 100644 --- a/.github/workflows/ci-casper-client-sdk.yml +++ b/.github/workflows/ci-casper-client-sdk.yml @@ -25,8 +25,10 @@ jobs: steps: - name: Set release tag run: | - if [ ${{ github.ref }} == 'refs/heads/next' ]; then - echo "release_tag=next" >> $GITHUB_ENV + echo ${{ github.ref }} + if [ ${{ github.ref }} == 'refs/heads/legacy' ]; then + echo "release_tag=legacy" >> $GITHUB_ENV + else echo "release_tag=latest" >> $GITHUB_ENV fi diff --git a/.gitignore b/.gitignore index 4b7b64faa..af778baac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ node_modules /dist/ .eslintcache +.nyc_output docs/ .DS_Store + diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a683be06..db113ac74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,45 +4,231 @@ All notable changes to casper-js-sdk. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 2.7.6 + +### Changed + +- Version 2.0 is now @latest. +- README updated. + +## 2.7.6 + +### Fixed + +- Fixes wrong logic in newTransferWithOptionalTransferId() method. + +## 2.7.5 + +### Fixed + +- Fixes problems with Lists containing multiple Keys containing Hash or ByteArray. +- Fixes problem with ByteArray with size different than 32 bytes. + +## 2.7.4 + +### Fixed + +- Fixes problems with `getBlockInfo` and mixed case block hashes. + +## 2.7.3 + +### Added + +- Added types missing in OpenRPC library + +## 2.7.2 + +### Fixed + +- Fix for bundling all of the existing types defined in the library. + +## 2.7.1 + +### Fixed + +- Added support for mixed case hex representation of public keys introduced in `casper-node` `1.4.2`. + +## 2.7.0 + +### Changed + +- Now `target` in transfer is represented by `PublicKey` instead of `account-hash`. + +## 2.6.2 + +### Added + +- Now minimal bundle without any polyfills included is a part of distribution package. + +## 2.6.1 + +### Fixed + +- Added workaround for historical deploys with invalid serialized `0`. + +## 2.6.0 + +### Added + +- Added `CasperProvider` + +## 2.5.2 + +### Fixed + +- Problem when serializing U128, U256 ad U512 `toBytes`. + +## 2.5.1 + +### Fixed + +- Added stronger validation to `PublicKey.fromHex` method +- Fix for deploy's `execution_result` type signatures +- Fix instanceof problem in `CLValueParser` which caused problems when two different versions of SDK was used in one project +- Signer methods fixes + +## 2.5.0 + +### Added + +- `signMessage` - added method to sign arbitrary string message +- `verifyMessageSignature` - added method to verify signature of arbitrary string message + +## 2.4.1 + +### Fixed + +- `EventStream` - fixed problems with multiple data chunks parsing + +## 2.4.0 + +### Added + +- `DeployWatcher` added + +## 2.3.0 + +### Added + +- `state_get_dictionary_item` with URef support in `getDictionaryItemByURef` implemented + +## 2.2.3 + +### Fixed + +- `StoredValue` parsing access param hotfixed + +## 2.2.2 + +### Fixed + +- `CLMap` fix for empty maps from bytes +- `CLMap` replaced problematic Map implementation + +## 2.2.1 + +### Fixed + +- `EventStream` now properly handle invalid JSONs + +## 2.2.0 + +### Added + +- `EventStream` added + +## 2.1.0 + +### Fixed + +- `state-get-item` due to RPC changes +- `CLList` as empty list initialization from JSON + +### Added + +- `getBlockTransfers`, `getEraInfoBySwitchBlock`, `getEraInfoBySwitchBlockHeight` methods to `CasperServiceByJsonRPC` + +## 2.0.1 + +### Changed + +- `DeployUtil.deployFromJson` returns now `Result` instead of `Deploy | undefined`. `Error` has a `message` inside. + +## 2.0.0 + +### Changed + +- Caution! This release contains rewritten CLValue from scratch, there are some breaking changes so consider it before upgrading. +- Removed `CLTypedAndToBytesHelper` to have consistent way of creating new CLValues by using `new CLBool(true)` or `CLValueBuilder.bool(true)` +- Removed `CLTypeHelper` have consistent way of creating new CLValues by using `new CLBoolType()` or `CLTypeBuilder.bool()` +- `CLValue` static methods now are moved to `CLValueBuilder` eg. `CLValueBuilder.u512` +- Every class inheriting from `CLValue` is now named with `CL` prefix, bigger naming changes: + - `StringValue` -> `CLString` + - `KeyValue` -> `CLKey` + - `MapValue` -> `CLMap` + - `Option` -> `CLOption` +- There are API changes in `CLResult` + +``` +const myTypesComplex = { + ok: new CLListType(new CLListType(new CLU8Type())), + err: new CLOptionType(new CLListType(new CLListType(new CLU8Type()))) +}; + +const myOkComplexRes = new CLResult( Ok(new CLList([new CLList([new CLU8(5), new CLU8(10), new CLU8(15)])])), myTypesComplex ); +``` + +- There are API changes in `CLOption` - now it requires `Some` or `None` wrappers as argument (from `ts-result` library). +- Now all the serialization methods are not connected to `CLValue` anymore - `toJSON`, `fromJSON`, `toBytes`, `fromBytes` needs to be called with `CLValueParsers` eg. `CLValueParser.toJSON(CLValueBuilder.string("ABC"))` +- Renamed methods in `CLPublicKey`: + - `toAccountHex` -> `toHex` - old name led to misunderstandings as in fact this is hex representation of `public-key` prefixed with key-type. + - added method `toAccountHashStr` - this methods returns string containing account hash in hex form prefixed with `account-hash-`. + +## 1.4.4 + +### Changed + +- Experimental release with `@next` tag. + ## 1.4.3 -## Changed +### Changed - Changed repo name and npm package name from `casper-client-sdk` to `casper-js-sdk`. ## 1.4.2 -## Added +### Added - `newTransferWithoutObligatoryId` renamed to `newTransferWithOptionalTransferId` ## 1.4.1 -## Added +### Added - `newTransferWithoutObligatoryId` restores the function that gives abilitity to send transfer without providing id. ## 1.4.0 -## Changed +### Changed - `Signer.sign` now requires deploy in JSON format, `public-key hex` of a sender and `public-key hex` of a target. ## 1.3.4 -## Added +### Added - `Signer.getVersion` returns running version of Signer. ## 1.3.3 -## Fixed +### Fixed - `Keys.SECP256K1.new()` and other SECP256K1 releated methods now can work in a browser environment. ## 1.3.2 -## Added +### Added - `DeployUtil.deployToBytes(deploy)` returns an `Uint8Array`, which is a byte representation of a deploy. @@ -236,4 +422,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed -- Changed CLValue's `value` to `value()` and `remainder` to `remainder()`. +g Changed CLValue's `value` to `value()` and `remainder` to `remainder()`. diff --git a/README.md b/README.md index 8728803cf..786085e14 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,6 @@ ## Installation -If you start new project it's recommended to use `2.x` version which contains some breaking changes (the `1.x` will stop being supported in a few months). - -```bash -# Basic Node.JS installation -npm install casper-js-sdk@next --save -``` - -To use the legacy version run - ```bash # Basic Node.JS installation npm install casper-js-sdk --save @@ -18,7 +9,7 @@ npm install casper-js-sdk --save ## Documentation -Documentation generated from code for [`2.x`](https://casper-ecosystem.github.io/casper-js-sdk/next) and [`1.x`](https://casper-ecosystem.github.io/casper-js-sdk/latest/). +Documentation generated from code for [`2.x`](https://casper-ecosystem.github.io/casper-js-sdk/latest) and [`1.x`](https://casper-ecosystem.github.io/casper-js-sdk/legacy/). ## Tests diff --git a/index.js b/index.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/package-lock.json b/package-lock.json index ad659ed7f..88a942c6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,9283 @@ { "name": "casper-js-sdk", - "version": "1.3.2", - "lockfileVersion": 1, + "version": "2.7.6", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "casper-js-sdk", + "version": "2.7.5", + "license": "Apache 2.0", + "dependencies": { + "@ethersproject/bignumber": "^5.0.8", + "@ethersproject/bytes": "^5.0.5", + "@ethersproject/constants": "^5.0.5", + "@open-rpc/client-js": "^1.6.2", + "@types/eccrypto": "^1.1.2", + "@types/ws": "^8.2.2", + "blakejs": "^1.1.0", + "eccrypto": "^1.1.6", + "eslint-plugin-prettier": "^3.4.0", + "ethereum-cryptography": "^0.1.3", + "glob": "^7.1.6", + "humanize-duration": "^3.24.0", + "key-encoder": "^2.0.3", + "reflect-metadata": "^0.1.13", + "ts-results": "^3.2.1", + "tweetnacl-ts": "^1.0.3", + "tweetnacl-util": "^0.15.0", + "typedjson": "^1.6.0-rc2", + "webpack": "^5.24.3" + }, + "devDependencies": { + "@types/chai": "^4.1.7", + "@types/express": "^4.17.0", + "@types/humanize-duration": "^3.18.1", + "@types/mocha": "^5.2.7", + "@types/node": "^14.14.31", + "@typescript-eslint/eslint-plugin": "^4.16.1", + "@typescript-eslint/parser": "^4.16.1", + "assert": "^2.0.0", + "buffer": "^6.0.3", + "chai": "^4.2.0", + "concurrently": "^6.0.0", + "copy-webpack-plugin": "^9.0.1", + "crypto-browserify": "^3.12.0", + "eslint": "^7.21.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-jsdoc": "^32.2.0", + "eslint-plugin-prefer-arrow": "^1.2.3", + "gh-pages": "^3.1.0", + "husky": "^4.3.8", + "lint-staged": "^10.5.4", + "minimist": ">=1.2.3", + "mocha": "^6.2.3", + "nodemon": "^2.0.2", + "nyc": "^15.1.0", + "prettier": "^1.18.2", + "pretty-quick": "^1.11.1", + "process": "^0.11.10", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "ts-loader": "^8.0.17", + "ts-node": "^8.4.1", + "ts-protoc-gen": "^0.10.0", + "tsconfig-paths": "^3.9.0", + "tslint": "^6.1.3", + "typedoc": "^0.17.8", + "typescript": "^3.9.9", + "url": "^0.11.0", + "webpack-cli": "^4.5.0", + "webpack-node-externals": "^2.5.2" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.15.tgz", + "integrity": "sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA==", + "dev": true + }, + "node_modules/@babel/core": { + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.16.tgz", + "integrity": "sha512-sXHpixBiWWFti0AV2Zq7avpTasr6sIAu7Y396c608541qAU2ui4a193m0KSQmfPSKFZLnQ3cvlKDOm3XkuXm3Q==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.16", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.13.14", + "@babel/helpers": "^7.13.16", + "@babel/parser": "^7.13.16", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.15", + "@babel/types": "^7.13.16", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/generator": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", + "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.14.1", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/core/node_modules/@babel/generator/node_modules/@babel/types": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", + "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.0", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@babel/core/node_modules/@babel/helper-validator-identifier": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/core/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.13.15", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", + "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "dev": true, + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", + "dev": true + }, + "node_modules/@babel/helpers": { + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.17.tgz", + "integrity": "sha512-Eal4Gce4kGijo1/TGJdqp3WuhllaMLSrW6XcL0ulyUAQOuxHcCafZE8KHg9857gcTehsm/v7RcOx2+jp0Ryjsg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.17", + "@babel/types": "^7.13.17" + } + }, + "node_modules/@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.16.tgz", + "integrity": "sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/traverse": { + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.17.tgz", + "integrity": "sha512-BMnZn0R+X6ayqm3C3To7o1j7Q020gWdqdyP50KEoVqaCO2c/Im7sYZSmVgvefp8TTMQ+9CtwuBp0Z1CZ8V3Pvg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.16", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.13.16", + "@babel/types": "^7.13.17", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", + "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.14.1", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator/node_modules/@babel/types": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", + "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.0", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "dev": true + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/traverse/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/types": { + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.17.tgz", + "integrity": "sha512-RawydLgxbOPDlTLJNtoIypwdmAy//uQIzlKt2+iBiJaRlVuI6QLUxVAyWGNfOzp8Yu4L4lLIacoCyTNtpb4wiA==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz", + "integrity": "sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.1.1.tgz", + "integrity": "sha512-AVz5iqz7+70RIqoQTznsdJ6DOVBYciNlvO+AlQmPTB6ofCvoihI9bQdr6wljsX+d5W7Yc4nyvQvP4JMzg0Agig==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.1.0", + "@ethersproject/logger": "^5.1.0", + "bn.js": "^4.4.0" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.1.0.tgz", + "integrity": "sha512-sGTxb+LVjFxJcJeUswAIK6ncgOrh3D8c192iEJd7mLr95V6du119rRfYT/b87WPkZ5I3gRBUYIYXtdgCWACe8g==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.1.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.1.0.tgz", + "integrity": "sha512-0/SuHrxc8R8k+JiLmJymxHJbojUDWBQqO+b+XFdwaP0jGzqC09YDy/CAlSZB6qHsBifY8X3I89HcK/oMqxRdBw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.1.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.1.0.tgz", + "integrity": "sha512-wtUaD1lBX10HBXjjKV9VHCBnTdUaKQnQ2XSET1ezglqLdPdllNOIlLfhyCRqXm5xwcjExVI5ETokOYfjPtaAlw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@open-rpc/client-js": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.6.3.tgz", + "integrity": "sha512-KNlYB258FgMUopHUXqPAU4JZMAO/8HnGN7LcL/mXnwH/Qcd0GAMVwLLIXc5d9BBqtmDox8wxxAXGBCajRhyczA==", + "dependencies": { + "isomorphic-fetch": "^3.0.0", + "isomorphic-ws": "^4.0.1", + "strict-event-emitter-types": "^2.0.0", + "ws": "^7.0.0" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", + "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "dev": true + }, + "node_modules/@types/connect": { + "version": "3.4.34", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.34.tgz", + "integrity": "sha512-ePPA/JuI+X0vb+gSWlPKOY0NdNAie/rPUqX2GUPpbZwiKTkSPhjXWuee47E4MtE54QVzGCQMQkAL6JhV2E1+cQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/eccrypto": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/eccrypto/-/eccrypto-1.1.2.tgz", + "integrity": "sha512-qmB/iGIoqDdCMHAcJiOKI4ZBI1Z3kBQGYQCkgNP/Z9ge5w/EVx5uxQYkGOFpllm6l2N/B3qXcn9vjqXGaV1vRQ==", + "dependencies": { + "@types/expect": "^1.20.4", + "@types/node": "*" + } + }, + "node_modules/@types/elliptic": { + "version": "6.4.12", + "resolved": "https://registry.npmjs.org/@types/elliptic/-/elliptic-6.4.12.tgz", + "integrity": "sha512-gP1KsqoouLJGH6IJa28x7PXb3cRqh83X8HCLezd2dF+XcAIMKYv53KV+9Zn6QA561E120uOqZBQ+Jy/cl+fviw==", + "dependencies": { + "@types/bn.js": "*" + } + }, + "node_modules/@types/eslint": { + "version": "7.2.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.10.tgz", + "integrity": "sha512-kUEPnMKrqbtpCq/KTaGFFKAcz6Ethm2EjCoKIDaCmfRBWLbFuTcOJfTlorwbnboXBzahqWLgUp1BQeKHiJzPUQ==", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.0.tgz", + "integrity": "sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw==", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.47", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", + "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==" + }, + "node_modules/@types/expect": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", + "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==" + }, + "node_modules/@types/express": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.11.tgz", + "integrity": "sha512-no+R6rW60JEc59977wIxreQVsIEOAYwgCqldrA/vkpCnbD7MqTefO97lmoBe4WE0F156bC4uLSP1XHDOySnChg==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.18", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.19.tgz", + "integrity": "sha512-DJOSHzX7pCiSElWaGR8kCprwibCB/3yW6vcT8VG3P0SJjnv19gnWG/AZMfM60Xj/YJIp/YCaDHyvzsFVeniARA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "node_modules/@types/humanize-duration": { + "version": "3.18.1", + "resolved": "https://registry.npmjs.org/@types/humanize-duration/-/humanize-duration-3.18.1.tgz", + "integrity": "sha512-MUgbY3CF7hg/a/jogixmAufLjJBQT7WEf8Q+kYJkOc47ytngg1IuZobCngdTjAgY83JWEogippge5O5fplaQlw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", + "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "dev": true + }, + "node_modules/@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "14.14.41", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz", + "integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-0/HnwIfW4ki2D8L8c9GVcG5I72s9jP5GSLVF0VIXDW00kmIpA6O33G7a8n59Tmh7Nz0WUC3rSb7PTY/sdW2JzA==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", + "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==", + "dev": true + }, + "node_modules/@types/secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-QMg+9v0bbNJ2peLuHRWxzmy0HRJIG6gFZNhaRSp7S3ggSbCCxiqQB2/ybvhXyhHOCequpNkrx7OavNhrWOsW0A==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.13.9", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.9.tgz", + "integrity": "sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz", + "integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", + "integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.22.0", + "@typescript-eslint/scope-manager": "4.22.0", + "debug": "^4.1.1", + "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.15", + "regexpp": "^3.0.0", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", + "integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", + "integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", + "debug": "^4.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", + "integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", + "integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", + "integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", + "integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.22.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.0.tgz", + "integrity": "sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg==", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz", + "integrity": "sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA==" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz", + "integrity": "sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w==" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz", + "integrity": "sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA==" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz", + "integrity": "sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ==", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.0", + "@webassemblyjs/helper-api-error": "1.11.0", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz", + "integrity": "sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA==" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz", + "integrity": "sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew==", + "dependencies": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz", + "integrity": "sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA==", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.0.tgz", + "integrity": "sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g==", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.0.tgz", + "integrity": "sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw==" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz", + "integrity": "sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ==", + "dependencies": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/helper-wasm-section": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0", + "@webassemblyjs/wasm-opt": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0", + "@webassemblyjs/wast-printer": "1.11.0" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz", + "integrity": "sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ==", + "dependencies": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/ieee754": "1.11.0", + "@webassemblyjs/leb128": "1.11.0", + "@webassemblyjs/utf8": "1.11.0" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz", + "integrity": "sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg==", + "dependencies": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz", + "integrity": "sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw==", + "dependencies": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-api-error": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/ieee754": "1.11.0", + "@webassemblyjs/leb128": "1.11.0", + "@webassemblyjs/utf8": "1.11.0" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz", + "integrity": "sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ==", + "dependencies": { + "@webassemblyjs/ast": "1.11.0", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.2.tgz", + "integrity": "sha512-3OBzV2fBGZ5TBfdW50cha1lHDVf9vlvRXnjpVbJBa20pSZQaSkMJZiwA8V2vD9ogyeXn8nU5s5A6mHyf5jhMzA==", + "dev": true, + "peerDependencies": { + "webpack": "4.x.x || 5.x.x", + "webpack-cli": "4.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.3.tgz", + "integrity": "sha512-lLek3/T7u40lTqzCGpC6CAbY6+vXhdhmwFRxZLMnRm6/sIF/7qMpT8MocXCRQfz0JAh63wpbXLMnsQ5162WS7Q==", + "dev": true, + "dependencies": { + "envinfo": "^7.7.3" + }, + "peerDependencies": { + "webpack-cli": "4.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.3.1.tgz", + "integrity": "sha512-0qXvpeYO6vaNoRBI52/UsbcaBydJCggoBBnIo/ovQQdn6fug0BgwsjorV1hVS7fMqGVTZGcVxv8334gjmbj5hw==", + "dev": true, + "peerDependencies": { + "webpack-cli": "4.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.1.tgz", + "integrity": "sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "dependencies": { + "string-width": "^3.0.0" + } + }, + "node_modules/ansi-align/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-align/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/ansi-align/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-align/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-align/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-differ": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-2.1.0.tgz", + "integrity": "sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/array-filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", + "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "dev": true, + "dependencies": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", + "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", + "dev": true, + "dependencies": { + "array-filter": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "optional": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-rsa/node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "node_modules/browserslist": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.4.tgz", + "integrity": "sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==", + "dependencies": { + "caniuse-lite": "^1.0.30001208", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.712", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "node_modules/caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001214", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001214.tgz", + "integrity": "sha512-O2/SCpuaU3eASWVaesQirZv1MSjUNOvmugaD8zNSJqw6Vv5SGwoOpA9LJs3pNPfM745nxqPvfZY3MQKY4AKHYg==" + }, + "node_modules/chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/comment-parser": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.2.tgz", + "integrity": "sha512-AOdq0i8ghZudnYv8RUnHrhTgafUGs61Rdz9jemU5x2lnZwAWyOq7vySo626K59e1fVKH1xSRorJwPVRLSWOoAQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/concurrently": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.0.2.tgz", + "integrity": "sha512-u+1Q0dJG5BidgUTpz9CU16yoHTt/oApFDQ3mbvHwSDgMjU7aGqy0q8ZQyaZyaNxdwRKTD872Ux3Twc6//sWA+Q==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "read-pkg": "^5.2.0", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "dependencies": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/convert-source-map/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/copy-webpack-plugin": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-9.0.1.tgz", + "integrity": "sha512-14gHKKdYIxF84jCEgPgYXCPpldbwpxxLbCmA7LReY7gvbaT555DgeBWBgBZM116tv/fO6RRJrsivBqRyRlukhw==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.5", + "glob-parent": "^6.0.0", + "globby": "^11.0.3", + "normalize-path": "^3.0.0", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^6.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/cosmiconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "dev": true, + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/date-fns": { + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.21.1.tgz", + "integrity": "sha512-m1WR0xGiC6j6jNFAyW4Nvh4WxAi4JF4w9jRJwSI8nBmNcyZXPcP9VUQG+6gHQXAmqaGEKDKhOqAtENDC941UkA==", + "dev": true, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "node_modules/default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dot-prop/node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "optional": true, + "dependencies": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "node_modules/eccrypto": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", + "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", + "hasInstallScript": true, + "dependencies": { + "acorn": "7.1.1", + "elliptic": "6.5.4", + "es6-promise": "4.2.8", + "nan": "2.14.0" + }, + "optionalDependencies": { + "secp256k1": "3.7.1" + } + }, + "node_modules/eccrypto/node_modules/acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/eccrypto/node_modules/secp256k1": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", + "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.3.719", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.719.tgz", + "integrity": "sha512-heM78GKSqrIzO9Oz0/y22nTBN7bqSP1Pla2SyU9DiSnQD+Ea9SyyN5RWWlgqsqeBLNDkSlE9J9EHFmdMPzxB/g==" + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/email-addresses": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz", + "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", + "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-module-lexer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.4.1.tgz", + "integrity": "sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA==" + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=", + "dev": true + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", + "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.2.0.tgz", + "integrity": "sha512-dWV9EVeSo2qodOPi1iBYU/x6F6diHv8uujxbxr77xExs3zTAlNXvVZKiyLsQGNz7yPV2K49JY5WjPzNIuDc2Bw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "32.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.3.0.tgz", + "integrity": "sha512-zyx7kajDK+tqS1bHuY5sapkad8P8KT0vdd/lE55j47VPG2MeenSYuIY/M/Pvmzq5g0+3JB+P3BJGUXmHxtuKPQ==", + "dev": true, + "dependencies": { + "comment-parser": "1.1.2", + "debug": "^4.3.1", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.20", + "regextras": "^0.7.1", + "semver": "^7.3.4", + "spdx-expression-parse": "^3.0.1" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/eslint-plugin-prefer-arrow": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", + "integrity": "sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==", + "dev": true, + "peerDependencies": { + "eslint": ">=2.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=5.0.0", + "prettier": ">=1.13.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" + }, + "node_modules/fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "node_modules/filename-reserved-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", + "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filenamify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", + "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", + "dev": true, + "dependencies": { + "filename-reserved-regex": "^1.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filenamify-url": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz", + "integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=", + "dev": true, + "dependencies": { + "filenamify": "^1.0.0", + "humanize-url": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-versions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", + "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", + "dev": true, + "dependencies": { + "semver-regex": "^3.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "dependencies": { + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==" + }, + "node_modules/foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gh-pages": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-3.1.0.tgz", + "integrity": "sha512-3b1rly9kuf3/dXsT8+ZxP0UhNLOo1CItj+3e31yUVcaph/yDsJ9RzD7JOw5o5zpBTJVQLlJAASNkUfepi9fe2w==", + "dev": true, + "dependencies": { + "async": "^2.6.1", + "commander": "^2.18.0", + "email-addresses": "^3.0.1", + "filenamify-url": "^1.0.0", + "find-cache-dir": "^3.3.1", + "fs-extra": "^8.1.0", + "globby": "^6.1.0" + }, + "bin": { + "gh-pages": "bin/gh-pages.js", + "gh-pages-clean": "bin/gh-pages-clean.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/gh-pages/node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gh-pages/node_modules/globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "dependencies": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + }, + "node_modules/global-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", + "dev": true, + "dependencies": { + "ini": "1.3.7" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals": { + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", + "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/google-protobuf": { + "version": "3.15.8", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.15.8.tgz", + "integrity": "sha512-2jtfdqTaSxk0cuBJBtTTWsot4WtR9RVr2rXg7x7OoqiuOKopPrwXpM1G4dXIkLcUNRh3RKzz76C8IOkksZSeOw==", + "dev": true + }, + "node_modules/graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/highlight.js": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.2.tgz", + "integrity": "sha512-oFLl873u4usRM9K63j4ME9u3etNF0PLiJhSQ8rdfuL51Wn3zkD6drf9ZW0dOzjnZI22YYG24z30JcmfCZjMgYg==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/humanize-duration": { + "version": "3.25.2", + "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.25.2.tgz", + "integrity": "sha512-zSerjahuzBazDaE8skjMI7Xmrt/EirvW5cDsXgysx8tYIjcgCMnI5Y5985y3LxYeLah9L5cQY3WEw1k7GRWbfg==" + }, + "node_modules/humanize-url": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz", + "integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=", + "dev": true, + "dependencies": { + "normalize-url": "^1.0.0", + "strip-url-auth": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/husky": { + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz", + "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "chalk": "^4.0.0", + "ci-info": "^2.0.0", + "compare-versions": "^3.6.0", + "cosmiconfig": "^7.0.0", + "find-versions": "^4.0.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^5.0.0", + "please-upgrade-node": "^3.2.0", + "slash": "^3.0.0", + "which-pm-runs": "^1.0.0" + }, + "bin": { + "husky-run": "bin/run.js", + "husky-upgrade": "lib/upgrader/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/husky" + } + }, + "node_modules/husky/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/husky/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/husky/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/husky/node_modules/pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "dependencies": { + "find-up": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dependencies": { + "call-bind": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz", + "integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "dev": true, + "dependencies": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", + "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.0-next.2", + "foreach": "^2.0.5", + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true, + "bin": { + "jsdoctypeparser": "bin/jsdoctypeparser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/key-encoder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/key-encoder/-/key-encoder-2.0.3.tgz", + "integrity": "sha512-fgBtpAGIr/Fy5/+ZLQZIPPhsZEcbSlYu/Wu96tNDFNSjSACw5lEIOFeaVdQ/iwrb8oxjlWi6wmWdH76hV6GZjg==", + "dependencies": { + "@types/elliptic": "^6.4.9", + "asn1.js": "^5.0.1", + "bn.js": "^4.11.8", + "elliptic": "^6.4.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "dependencies": { + "package-json": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "node_modules/lint-staged": { + "version": "10.5.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.4.tgz", + "integrity": "sha512-EechC3DdFic/TdOPgj/RB3FicqE6932LTHCUm0Y2fsD9KGlLB+RwJl2q1IYBIvEsKzDOgn0D4gll+YxG5RsrKg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "cli-truncate": "^2.1.0", + "commander": "^6.2.0", + "cosmiconfig": "^7.0.0", + "debug": "^4.2.0", + "dedent": "^0.7.0", + "enquirer": "^2.3.6", + "execa": "^4.1.0", + "listr2": "^3.2.2", + "log-symbols": "^4.0.0", + "micromatch": "^4.0.2", + "normalize-path": "^3.0.0", + "please-upgrade-node": "^3.2.0", + "string-argv": "0.3.1", + "stringify-object": "^3.3.0" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/listr2": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.7.1.tgz", + "integrity": "sha512-cNd368GTrk8351/ov/IV+BSwyf9sJRgI0UIvfORonCZA1u9UHAtAlqSEv9dgafoQIA1CgB3nu4No79pJtK2LHw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "cli-truncate": "^2.1.0", + "figures": "^3.2.0", + "indent-string": "^4.0.0", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rxjs": "^6.6.7", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + } + }, + "node_modules/loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/marked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.0.0.tgz", + "integrity": "sha512-Wo+L1pWTVibfrSr+TTtMuiMfNzmZWiOPeO7rZsQUY5bgsxpHesBEcIWJloWVTFnrMXnf/TL30eTFSGJddmQAng==", + "dev": true, + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 8.16.2" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/memory-fs/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/memory-fs/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/memory-fs/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "dependencies": { + "mime-db": "1.47.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", + "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", + "dev": true, + "dependencies": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.4", + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/mocha/node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/mocha/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/mocha/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/mocha/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/mocha/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/mocha/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "dependencies": { + "chalk": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/mocha/node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/mocha/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/mocha/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/mri": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz", + "integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/multimatch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz", + "integrity": "sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==", + "dev": true, + "dependencies": { + "array-differ": "^2.0.3", + "array-union": "^1.0.2", + "arrify": "^1.0.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/multimatch/node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node_modules/node-environment-flags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "dev": true, + "dependencies": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node_modules/node-environment-flags/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==" + }, + "node_modules/nodemon": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.7.tgz", + "integrity": "sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "chokidar": "^3.2.2", + "debug": "^3.2.6", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.7", + "semver": "^5.7.1", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.3", + "update-notifier": "^4.1.0" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nodemon/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/nodemon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "dependencies": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/nyc/node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.2.tgz", + "integrity": "sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "dev": true, + "bin": { + "opencollective-postinstall": "index.js" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "dependencies": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json/node_modules/@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "dependencies": { + "defer-to-connect": "^1.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json/node_modules/cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json/node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/package-json/node_modules/defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "node_modules/package-json/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json/node_modules/got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/package-json/node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "node_modules/package-json/node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.0" + } + }, + "node_modules/package-json/node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/package-json/node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json/node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, + "node_modules/package-json/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picomatch": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "dependencies": { + "semver-compare": "^1.0.0" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/pretty-quick": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-1.11.1.tgz", + "integrity": "sha512-kSXCkcETfak7EQXz6WOkCeCqpbC4GIzrN/vaneTGMP/fAtD8NerA9bPhCUqHAks1geo7biZNl5uEMPceeneLuA==", + "dev": true, + "dependencies": { + "chalk": "^2.3.0", + "execa": "^0.8.0", + "find-up": "^2.1.0", + "ignore": "^3.3.7", + "mri": "^1.1.0", + "multimatch": "^3.0.0" + }, + "bin": { + "pretty-quick": "bin/pretty-quick.js" + }, + "peerDependencies": { + "prettier": ">=1.8.0" + } + }, + "node_modules/pretty-quick/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/pretty-quick/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/pretty-quick/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/pretty-quick/node_modules/execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "dev": true, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "node_modules/pretty-quick/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-quick/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/pretty-quick/node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-quick/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-quick/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-quick/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/pretty-quick/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "dependencies": { + "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "dependencies": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + }, + "node_modules/regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true, + "engines": { + "node": ">=0.1.14" + } + }, + "node_modules/registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dependencies": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "node_modules/secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "node_modules/semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "dependencies": { + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/semver-regex": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.2.tgz", + "integrity": "sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dev": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", + "dev": true + }, + "node_modules/spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/spawn-wrap/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "dev": true, + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "dev": true, + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "node_modules/strict-event-emitter-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", + "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" + }, + "node_modules/strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, + "dependencies": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-url-auth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz", + "integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.3.2.tgz", + "integrity": "sha512-I9/Ca6Huf2oxFag7crD0DhA+arIdfLtWunSn0NIXSzjtUlDgIBGVZY7SsMkNPNT3Psd/z4gza0nuEpmra9eRbg==", + "dependencies": { + "ajv": "^8.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "lodash.clonedeep": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", + "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/tapable": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terser": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.6.1.tgz", + "integrity": "sha512-yv9YLFQQ+3ZqgWCUk+pvNJwgUTdlIxUk1WTN+RnaFJe2L7ipG2csPT0ra2XRm7Cs8cxN7QXmK1rFzEwYEQkzXw==", + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz", + "integrity": "sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q==", + "dependencies": { + "jest-worker": "^26.6.2", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "source-map": "^0.6.1", + "terser": "^5.5.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/terser/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ts-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.1.0.tgz", + "integrity": "sha512-YiQipGGAFj2zBfqLhp28yUvPP9jUGqHxRzrGYuc82Z2wM27YIHbElXiaZDc93c3x0mz4zvBmS6q/DgExpdj37A==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^2.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "*" + } + }, + "node_modules/ts-loader/node_modules/enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/ts-loader/node_modules/tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "dev": true, + "dependencies": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "typescript": ">=2.7" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/ts-protoc-gen": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.10.0.tgz", + "integrity": "sha512-EEbgDWNHK3CvcNhmib94I4HMO23qLddjLRdXW8EUE11VJxbi3n5J0l2DiX/L1pijOaPTkbEoRK+zQinKgKGqsw==", + "dev": true, + "dependencies": { + "google-protobuf": "^3.6.1" + }, + "bin": { + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, + "node_modules/ts-results": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ts-results/-/ts-results-3.2.1.tgz", + "integrity": "sha512-cMvWPLvxM39fSQgSHRT2d+dwQfpK+ttfj5FpPuXum9m/pm6iDmgsirpWXp/3/ErmZqx1x+rAhJi/33NQqCCM3Q==" + }, + "node_modules/tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "node_modules/tslint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/tslint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/tslint/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/tslint/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + } + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tweetnacl-ts": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl-ts/-/tweetnacl-ts-1.0.3.tgz", + "integrity": "sha512-C5I/dWf6xjAXaCDlf84T4HvozU/8ycAlq5WRllF1hAeeq5390tfXD+bNas5bhEV0HMSOx8bsQYpLjPl8wfnEeQ==", + "dependencies": { + "tslib": "^1" + } + }, + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typedjson": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/typedjson/-/typedjson-1.7.0.tgz", + "integrity": "sha512-MnRgQLwtEcdHqQG0FkT8ebpBG53Wgr/axYRbiD2WL5NcYx8Z2AoCpXvtTfLnuPqOBKG/9JpXq0O/nl2m4wqJYw==", + "dependencies": { + "tslib": "^2.0.1" + } + }, + "node_modules/typedjson/node_modules/tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + }, + "node_modules/typedoc": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.17.8.tgz", + "integrity": "sha512-/OyrHCJ8jtzu+QZ+771YaxQ9s4g5Z3XsQE3Ma7q+BL392xxBn4UMvvCdVnqKC2T/dz03/VXSLVKOP3lHmDdc/w==", + "dev": true, + "dependencies": { + "fs-extra": "^8.1.0", + "handlebars": "^4.7.6", + "highlight.js": "^10.0.0", + "lodash": "^4.17.15", + "lunr": "^2.3.8", + "marked": "1.0.0", + "minimatch": "^3.0.0", + "progress": "^2.0.3", + "shelljs": "^0.8.4", + "typedoc-default-themes": "^0.10.2" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "typescript": ">=3.8.3" + } + }, + "node_modules/typedoc-default-themes": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.10.2.tgz", + "integrity": "sha512-zo09yRj+xwLFE3hyhJeVHWRSPuKEIAsFK5r2u47KL/HBKqpwdUSanoaz5L34IKiSATFrjG5ywmIu98hPVMfxZg==", + "dev": true, + "dependencies": { + "lunr": "^2.3.8" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uglify-js": { + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", + "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undefsafe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", + "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==", + "dev": true, + "dependencies": { + "debug": "^2.2.0" + } + }, + "node_modules/undefsafe/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/undefsafe/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/update-notifier": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", + "dev": true, + "dependencies": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "dependencies": { + "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/url-parse-lax/node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, + "node_modules/util": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", + "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/watchpack": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.1.1.tgz", + "integrity": "sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw==", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.35.0.tgz", + "integrity": "sha512-au3gu55yYF/h6NXFr0KZPZAYxS6Nlc595BzYPke8n0CSff5WXcoixtjh5LC/8mXunkRKxhymhXmBY0+kEbR6jg==", + "dependencies": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.47", + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/wasm-edit": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0", + "acorn": "^8.0.4", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.0", + "es-module-lexer": "^0.4.0", + "eslint-scope": "^5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.1", + "watchpack": "^2.0.0", + "webpack-sources": "^2.1.1" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.6.0.tgz", + "integrity": "sha512-9YV+qTcGMjQFiY7Nb1kmnupvb1x40lfpj8pwdO/bom+sQiP4OBMKjHq29YQrlDWDPZO9r/qWaRRywKaRDKqBTA==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.0.2", + "@webpack-cli/info": "^1.2.3", + "@webpack-cli/serve": "^1.3.1", + "colorette": "^1.2.1", + "commander": "^7.0.0", + "enquirer": "^2.3.6", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "webpack": "4.x.x || 5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "@webpack-cli/migrate": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-cli/node_modules/execa": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", + "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/webpack-cli/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/webpack-cli/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/webpack-cli/node_modules/interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/webpack-cli/node_modules/rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "dev": true, + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/webpack-merge": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.7.3.tgz", + "integrity": "sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-node-externals": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/webpack-node-externals/-/webpack-node-externals-2.5.2.tgz", + "integrity": "sha512-aHdl/y2N7PW2Sx7K+r3AxpJO+aDMcYzMQd60Qxefq3+EwhewSbTBqNumOsCE1JsCUNoyfGj5465N0sSf6hc/5w==", + "dev": true + }, + "node_modules/webpack-sources": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.2.0.tgz", + "integrity": "sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w==", + "dependencies": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true + }, + "node_modules/which-typed-array": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", + "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", + "foreach": "^2.0.5", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.1", + "is-typed-array": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/wide-align/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/ws": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz", + "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "dependencies": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs-unparser/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/yargs-unparser/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/yargs-unparser/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/yargs-unparser/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/yargs-unparser/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs-unparser/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs-unparser/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/yargs-unparser/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/yargs-unparser/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, "dependencies": { "@babel/code-frame": { "version": "7.12.13", @@ -42,6 +9317,35 @@ "source-map": "^0.5.0" }, "dependencies": { + "@babel/generator": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", + "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", + "dev": true, + "requires": { + "@babel/types": "^7.14.1", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", + "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.0", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -56,25 +9360,6 @@ } } }, - "@babel/generator": { - "version": "7.13.16", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.16.tgz", - "integrity": "sha512-grBBR75UnKOcUWMp8WoDxNsWCFl//XCK6HWTrBQKTr5SV9f5g0pNOjdyzi/DTBv12S9GnYPInIXQBTky7OXEMg==", - "dev": true, - "requires": { - "@babel/types": "^7.13.16", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, "@babel/helper-compilation-targets": { "version": "7.13.16", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", @@ -191,8 +9476,7 @@ "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" }, "@babel/helper-validator-option": { "version": "7.12.17", @@ -215,7 +9499,6 @@ "version": "7.13.10", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", - "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", @@ -226,7 +9509,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -235,7 +9517,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -246,7 +9527,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "requires": { "color-name": "1.1.3" } @@ -254,20 +9534,17 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -307,11 +9584,46 @@ "globals": "^11.1.0" }, "dependencies": { + "@babel/generator": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", + "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", + "dev": true, + "requires": { + "@babel/types": "^7.14.1", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", + "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.0", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "dev": true + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, @@ -335,7 +9647,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", - "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.1.1", @@ -352,7 +9663,6 @@ "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, "requires": { "type-fest": "^0.8.1" } @@ -360,14 +9670,12 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -466,21 +9774,6 @@ "ws": "^7.0.0" } }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, "@types/bn.js": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", @@ -666,6 +9959,14 @@ "@types/node": "*" } }, + "@types/ws": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz", + "integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==", + "requires": { + "@types/node": "*" + } + }, "@typescript-eslint/eslint-plugin": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", @@ -884,7 +10185,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.2.tgz", "integrity": "sha512-3OBzV2fBGZ5TBfdW50cha1lHDVf9vlvRXnjpVbJBa20pSZQaSkMJZiwA8V2vD9ogyeXn8nU5s5A6mHyf5jhMzA==", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/info": { "version": "1.2.3", @@ -899,7 +10201,8 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.3.1.tgz", "integrity": "sha512-0qXvpeYO6vaNoRBI52/UsbcaBydJCggoBBnIo/ovQQdn6fug0BgwsjorV1hVS7fMqGVTZGcVxv8334gjmbj5hw==", - "dev": true + "dev": true, + "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", @@ -926,7 +10229,7 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "requires": {} }, "aggregate-error": { "version": "3.1.0", @@ -952,7 +10255,8 @@ "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "requires": {} }, "ansi-align": { "version": "3.0.0", @@ -1006,8 +10310,7 @@ "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" }, "ansi-escapes": { "version": "4.3.2", @@ -1029,14 +10332,12 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -1076,7 +10377,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -1143,8 +10443,7 @@ "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" }, "async": { "version": "2.6.3", @@ -1164,14 +10463,6 @@ "array-filter": "^1.0.0" } }, - "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "requires": { - "follow-redirects": "^1.10.0" - } - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1429,34 +10720,11 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, - "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", - "dev": true - } - } + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true }, "caching-transform": { "version": "4.0.0", @@ -1474,7 +10742,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, "requires": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -1483,8 +10750,7 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "camelcase": { "version": "5.3.1", @@ -1515,7 +10781,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1642,7 +10907,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "requires": { "color-name": "~1.1.4" } @@ -1650,8 +10914,7 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "colorette": { "version": "1.2.2", @@ -1745,6 +11008,50 @@ } } }, + "copy-webpack-plugin": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-9.0.1.tgz", + "integrity": "sha512-14gHKKdYIxF84jCEgPgYXCPpldbwpxxLbCmA7LReY7gvbaT555DgeBWBgBZM116tv/fO6RRJrsivBqRyRlukhw==", + "dev": true, + "requires": { + "fast-glob": "^3.2.5", + "glob-parent": "^6.0.0", + "globby": "^11.0.3", + "normalize-path": "^3.0.0", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^6.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + } + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1803,7 +11110,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1845,7 +11151,6 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, "requires": { "ms": "2.1.2" } @@ -1856,15 +11161,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -1889,8 +11185,7 @@ "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, "default-require-extensions": { "version": "3.0.0", @@ -1901,12 +11196,6 @@ "strip-bom": "^4.0.0" } }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1956,7 +11245,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, "requires": { "esutils": "^2.0.2" } @@ -2058,8 +11346,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { "version": "3.0.0", @@ -2089,7 +11376,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, "requires": { "ansi-colors": "^4.1.1" } @@ -2189,14 +11475,12 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { "version": "7.24.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", - "dev": true, "requires": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.0", @@ -2241,7 +11525,6 @@ "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, "requires": { "@babel/highlight": "^7.10.4" } @@ -2249,8 +11532,7 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" } } }, @@ -2258,7 +11540,8 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.2.0.tgz", "integrity": "sha512-dWV9EVeSo2qodOPi1iBYU/x6F6diHv8uujxbxr77xExs3zTAlNXvVZKiyLsQGNz7yPV2K49JY5WjPzNIuDc2Bw==", - "dev": true + "dev": true, + "requires": {} }, "eslint-plugin-jsdoc": { "version": "32.3.0", @@ -2279,7 +11562,16 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", "integrity": "sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==", - "dev": true + "dev": true, + "requires": {} + }, + "eslint-plugin-prettier": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", + "requires": { + "prettier-linter-helpers": "^1.0.0" + } }, "eslint-scope": { "version": "5.1.1", @@ -2294,7 +11586,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" }, @@ -2302,22 +11593,19 @@ "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" } } }, "eslint-visitor-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==" }, "espree": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, "requires": { "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", @@ -2327,28 +11615,24 @@ "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" } } }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, "requires": { "estraverse": "^5.1.0" }, @@ -2356,8 +11640,7 @@ "estraverse": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" } } }, @@ -2384,8 +11667,7 @@ "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "ethereum-cryptography": { "version": "0.1.3", @@ -2445,6 +11727,11 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" + }, "fast-glob": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", @@ -2467,8 +11754,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "fastest-levenshtein": { "version": "1.0.12", @@ -2498,7 +11784,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, "requires": { "flat-cache": "^3.0.4" } @@ -2588,7 +11873,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -2597,13 +11881,7 @@ "flatted": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", - "dev": true - }, - "follow-redirects": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", - "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==" + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==" }, "foreach": { "version": "2.0.5", @@ -2653,14 +11931,12 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "gensync": { "version": "1.0.0-beta.2", @@ -2684,7 +11960,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -2768,7 +12043,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -2791,7 +12065,6 @@ "version": "13.8.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", - "dev": true, "requires": { "type-fest": "^0.20.2" }, @@ -2799,8 +12072,7 @@ "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" } } }, @@ -2824,36 +12096,6 @@ "integrity": "sha512-2jtfdqTaSxk0cuBJBtTTWsot4WtR9RVr2rXg7x7OoqiuOKopPrwXpM1G4dXIkLcUNRh3RKzz76C8IOkksZSeOw==", "dev": true }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, "graceful-fs": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", @@ -2882,7 +12124,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -2901,8 +12142,7 @@ "has-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" }, "has-yarn": { "version": "2.1.0", @@ -3087,7 +12327,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -3112,8 +12351,7 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "indent-string": { "version": "4.0.0", @@ -3181,7 +12419,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "dev": true, "requires": { "call-bind": "^1.0.0" } @@ -3225,14 +12462,12 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-generator-function": { "version": "1.0.8", @@ -3244,7 +12479,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -3290,8 +12524,7 @@ "is-number-object": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", - "dev": true + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==" }, "is-obj": { "version": "1.0.1", @@ -3345,8 +12578,7 @@ "is-string": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" }, "is-symbol": { "version": "1.0.3", @@ -3403,8 +12635,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", @@ -3424,7 +12655,8 @@ "isomorphic-ws": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==" + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "requires": {} }, "istanbul-lib-coverage": { "version": "3.0.0", @@ -3532,24 +12764,17 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" } }, - "jsbi": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.1.4.tgz", - "integrity": "sha512-52QRRFSsi9impURE8ZUbzAMCLjPm4THO7H2fcuIvaaeFTbSysvkodbQQXIVsNgq/ypDbq6dJiuGKL0vZ/i9hUg==" - }, "jsdoctypeparser": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", @@ -3562,12 +12787,6 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -3587,8 +12806,7 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" }, "json5": { "version": "2.2.0", @@ -3628,15 +12846,6 @@ "elliptic": "^6.4.1" } }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3656,7 +12865,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, "requires": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -3744,20 +12952,17 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, "lodash.flatten": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" }, "lodash.flattendeep": { "version": "4.4.0", @@ -3768,8 +12973,7 @@ "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=" }, "log-symbols": { "version": "4.1.0", @@ -3806,17 +13010,10 @@ } } }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -4318,8 +13515,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "multimatch": { "version": "3.0.0", @@ -4352,8 +13548,7 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, "neo-async": { "version": "2.6.2", @@ -4574,6 +13769,26 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -4700,7 +13915,6 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, "requires": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -4710,12 +13924,6 @@ "word-wrap": "^1.2.3" } }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -4789,6 +13997,138 @@ "semver": "^6.2.0" }, "dependencies": { + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -4801,7 +14141,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "requires": { "callsites": "^3.0.0" } @@ -4845,8 +14184,7 @@ "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, "path-parse": { "version": "1.0.6", @@ -4926,8 +14264,7 @@ "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, "prepend-http": { "version": "1.0.4", @@ -4938,8 +14275,15 @@ "prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==" + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "requires": { + "fast-diff": "^1.1.2" + } }, "pretty-quick": { "version": "1.11.1", @@ -5179,8 +14523,7 @@ "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "prr": { "version": "1.0.1", @@ -5248,6 +14591,12 @@ "strict-uri-encode": "^1.0.0" } }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5340,8 +14689,7 @@ "regexpp": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==" }, "regextras": { "version": "0.7.1", @@ -5385,8 +14733,7 @@ "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, "require-main-filename": { "version": "2.0.0", @@ -5424,17 +14771,7 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, "restore-cursor": { "version": "3.1.0", @@ -5456,7 +14793,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -5483,6 +14819,7 @@ "version": "6.6.7", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, "requires": { "tslib": "^1.9.0" } @@ -5526,7 +14863,6 @@ "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, "requires": { "lru-cache": "^6.0.0" } @@ -5601,7 +14937,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "requires": { "shebang-regex": "^3.0.0" } @@ -5609,8 +14944,7 @@ "shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, "shelljs": { "version": "0.8.4", @@ -5639,7 +14973,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -5692,6 +15025,17 @@ "rimraf": "^3.0.0", "signal-exit": "^3.0.2", "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "spdx-correct": { @@ -5729,8 +15073,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "stream-browserify": { "version": "3.0.0", @@ -5742,6 +15085,18 @@ "readable-stream": "^3.5.0" } }, + "stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, "strict-event-emitter-types": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", @@ -5753,6 +15108,14 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -5763,7 +15126,6 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5790,14 +15152,6 @@ "define-properties": "^1.1.3" } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -5813,7 +15167,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -5839,8 +15192,7 @@ "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, "strip-outer": { "version": "1.0.1", @@ -5869,7 +15221,6 @@ "version": "6.3.2", "resolved": "https://registry.npmjs.org/table/-/table-6.3.2.tgz", "integrity": "sha512-I9/Ca6Huf2oxFag7crD0DhA+arIdfLtWunSn0NIXSzjtUlDgIBGVZY7SsMkNPNT3Psd/z4gza0nuEpmra9eRbg==", - "dev": true, "requires": { "ajv": "^8.0.1", "is-boolean-object": "^1.1.0", @@ -5886,7 +15237,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", - "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -5897,8 +15247,7 @@ "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" } } }, @@ -5957,8 +15306,7 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" }, "through": { "version": "2.3.8", @@ -6206,12 +15554,6 @@ } } }, - "tslint-config-prettier": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", - "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", - "dev": true - }, "tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", @@ -6238,7 +15580,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, "requires": { "prelude-ls": "^1.2.1" } @@ -6413,6 +15754,24 @@ "punycode": "^2.1.0" } }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, "url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", @@ -6458,8 +15817,7 @@ "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" }, "validate-npm-package-license": { "version": "3.0.4", @@ -6618,7 +15976,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -6723,8 +16080,7 @@ "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "wordwrap": { "version": "1.0.0", @@ -6763,7 +16119,8 @@ "ws": { "version": "7.4.5", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz", - "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==" + "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==", + "requires": {} }, "xdg-basedir": { "version": "4.0.0", @@ -6771,6 +16128,12 @@ "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -6780,8 +16143,7 @@ "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yaml": { "version": "1.10.2", diff --git a/package.json b/package.json index 20dfcc8c5..7c9b82c1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "casper-js-sdk", - "version": "1.4.3", + "version": "2.7.7", "license": "Apache 2.0", "description": "SDK to interact with the Casper blockchain", "homepage": "https://github.com/casper-ecosystem/casper-js-sdk#README.md", @@ -19,8 +19,12 @@ "build": "webpack --config webpack.config.js", "clean": "rm -rf ./dist", "~build": "tsc --watch", - "test": "TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts", - "docs": "typedoc --out docs/ src" + "test:nctl": "TS_NODE_FILES=true mocha -r ts-node/register test/nctl/*.test.ts --timeout 5000000", + "test": "TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts src/lib/CLValue/*.test.ts", + "test2": "TS_NODE_FILES=true mocha -r ts-node/register src/lib/CLValue/ByteArray.test.ts", + "test:coverage": "nyc npm run test", + "docs": "typedoc --out docs/ src", + "publish-doc": "yarn run docs && gh-pages -d docs -r https://github.com/casper-ecosystem/casper-client-sdk-docs" }, "keywords": [ "Casper", @@ -30,7 +34,7 @@ "author": "AbnerZheng ", "lint-staged": { "src/**/*.{ts,tsx}": [ - "eslint src/ --fix", + "eslint --fix", "git add" ], "*.{js,css,md}": "prettier --write" @@ -52,6 +56,7 @@ "buffer": "^6.0.3", "chai": "^4.2.0", "concurrently": "^6.0.0", + "copy-webpack-plugin": "^9.0.1", "crypto-browserify": "^3.12.0", "eslint": "^7.21.0", "eslint-config-prettier": "^8.1.0", @@ -63,19 +68,20 @@ "minimist": ">=1.2.3", "mocha": "^6.2.3", "nodemon": "^2.0.2", - "nyc": "^15.0.1", + "nyc": "^15.1.0", "prettier": "^1.18.2", "pretty-quick": "^1.11.1", "process": "^0.11.10", "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", "ts-loader": "^8.0.17", "ts-node": "^8.4.1", "ts-protoc-gen": "^0.10.0", "tsconfig-paths": "^3.9.0", "tslint": "^6.1.3", - "tslint-config-prettier": "^1.18.0", "typedoc": "^0.17.8", "typescript": "^3.9.9", + "url": "^0.11.0", "webpack-cli": "^4.5.0", "webpack-node-externals": "^2.5.2" }, @@ -85,16 +91,15 @@ "@ethersproject/constants": "^5.0.5", "@open-rpc/client-js": "^1.6.2", "@types/eccrypto": "^1.1.2", - "axios": "^0.21.1", + "@types/ws": "^8.2.2", "blakejs": "^1.1.0", "eccrypto": "^1.1.6", + "eslint-plugin-prettier": "^3.4.0", "ethereum-cryptography": "^0.1.3", "glob": "^7.1.6", "humanize-duration": "^3.24.0", - "jsbi": "^3.1.2", "key-encoder": "^2.0.3", "reflect-metadata": "^0.1.13", - "rxjs": "^6.5.3", "ts-results": "^3.2.1", "tweetnacl-ts": "^1.0.3", "tweetnacl-util": "^0.15.0", diff --git a/src/@types/casperlabsSigner.d.ts b/src/@types/casperlabsSigner.d.ts index 5ac07b975..f0fc3ea3c 100644 --- a/src/@types/casperlabsSigner.d.ts +++ b/src/@types/casperlabsSigner.d.ts @@ -1,3 +1,5 @@ +import { JsonTypes } from 'typedjson'; + interface CasperLabsHelper { /** * Returns Signer version @@ -8,12 +10,12 @@ interface CasperLabsHelper { * Returns connection status from Signer */ isConnected: () => Promise; - + /** * Attempt connection to Signer */ requestConnection: () => void; - + /** * Send Deploy in JSON format message to Signer plugin to sign. * @@ -21,8 +23,23 @@ interface CasperLabsHelper { * @param sourcePublicKeyHex public key in hex format with algorithm prefix. Used to sign the deploy * @param targetPublicKeyHex public key in hex format with algorithm prefix. Used to display hex-formatted address on the UI */ - sign: (deploy: any, sourcePublicKeyHex: string, targetPublicKeyHex: string) => Promise; - + sign: ( + deploy: { deploy: JsonTypes }, + sourcePublicKeyHex: string, + targetPublicKeyHex: string + ) => Promise<{ deploy: JsonTypes }>; + + /** + * Send raw string message to Signer for signing. + * @param message string to be signed. + * @param signingPublicKey public key in hex format, the corresponding secret key (from the vault) will be used to sign. + * @returns `Base16` signature + */ + signMessage: ( + rawMessage: string, + signingPublicKey: string + ) => Promise; + /* * Returns base64 encoded public key of user current selected account. */ diff --git a/src/lib/byterepr.ts b/src/lib/ByteConverters.ts similarity index 55% rename from src/lib/byterepr.ts rename to src/lib/ByteConverters.ts index bc50eeced..c23c6e4d9 100644 --- a/src/lib/byterepr.ts +++ b/src/lib/ByteConverters.ts @@ -6,40 +6,48 @@ import { BigNumber, BigNumberish } from '@ethersproject/bignumber'; import { MaxUint256, NegativeOne, One, Zero } from '@ethersproject/constants'; import { arrayify, concat } from '@ethersproject/bytes'; -import { CLValue, ToBytes } from './CLValue'; +import { CLValue, CLValueParsers, ToBytes } from './CLValue'; /** * Convert number to bytes */ -export const toBytesNumber = ( - bitSize: number, - signed: boolean, +export const toBytesNumber = (bitSize: number, signed: boolean) => ( value: BigNumberish -) => { - let v = BigNumber.from(value); +): Uint8Array => { + const val = BigNumber.from(value); // Check bounds are safe for encoding const maxUintValue = MaxUint256.mask(bitSize); + if (signed) { const bounds = maxUintValue.mask(bitSize - 1); // 1 bit for signed - if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) { + if (val.gt(bounds) || val.lt(bounds.add(One).mul(NegativeOne))) { throw new Error('value out-of-bounds, value: ' + value); } - } else if (v.lt(Zero) || v.gt(maxUintValue.mask(bitSize))) { + } else if (val.lt(Zero) || val.gt(maxUintValue.mask(bitSize))) { throw new Error('value out-of-bounds, value: ' + value); } - v = v.toTwos(bitSize).mask(bitSize); - const bytes = arrayify(v); - if (v.gte(0)) { + + const valTwos = val.toTwos(bitSize).mask(bitSize); + + const bytes = arrayify(valTwos); + + if (valTwos.gte(0)) { // for positive number, we had to deal with paddings if (bitSize > 64) { + // if zero just return zero + if (valTwos.eq(0)) { + return bytes; + } // for u128, u256, u512, we have to and append extra byte for length - return concat([bytes, Uint8Array.from([bytes.length])]).reverse(); + return concat([bytes, Uint8Array.from([bytes.length])]) + .slice() + .reverse(); } else { // for other types, we have to add padding 0s const byteLength = bitSize / 8; return concat([ - bytes.reverse(), + bytes.slice().reverse(), new Uint8Array(byteLength - bytes.length) ]); } @@ -51,62 +59,47 @@ export const toBytesNumber = ( /** * Converts `u8` to little endian. */ -export function toBytesU8(u8: BigNumberish): Uint8Array { - return toBytesNumber(8, false, u8); -} +export const toBytesU8 = toBytesNumber(8, false); /** * Converts `i32` to little endian. */ -export function toBytesI32(i32: BigNumberish): Uint8Array { - return toBytesNumber(32, true, i32); -} +export const toBytesI32 = toBytesNumber(32, true); /** * Converts `u32` to little endian. */ -export function toBytesU32(u32: BigNumberish): Uint8Array { - return toBytesNumber(32, false, u32); -} +export const toBytesU32 = toBytesNumber(32, false); /** * Converts `u64` to little endian. */ -export function toBytesU64(u64: BigNumberish): Uint8Array { - return toBytesNumber(64, false, u64); -} +export const toBytesU64 = toBytesNumber(64, false); /** * Converts `i64` to little endian. */ -export function toBytesI64(i64: BigNumberish): Uint8Array { - return toBytesNumber(64, true, i64); -} +export const toBytesI64 = toBytesNumber(64, true); /** * Converts `u128` to little endian. */ -export function toBytesU128(u128: BigNumberish): Uint8Array { - return toBytesNumber(128, false, u128); -} +export const toBytesU128 = toBytesNumber(128, false); /** * Converts `u256` to little endian. */ -export function toBytesU256(u256: BigNumberish): Uint8Array { - return toBytesNumber(256, false, u256); -} - -export function toBytesDeployHash(deployHash: Uint8Array) { - return toBytesBytesArray(deployHash); -} +export const toBytesU256 = toBytesNumber(256, false); /** * Converts `u512` to little endian. */ -export function toBytesU512(u512: BigNumberish): Uint8Array { - return toBytesNumber(512, false, u512); -} +export const toBytesU512 = toBytesNumber(512, false); + +// This probably might be removed +export const toBytesDeployHash = (deployHash: Uint8Array) => { + return deployHash; +}; /** * Serializes a string into an array of bytes. @@ -116,6 +109,10 @@ export function toBytesString(str: string): Uint8Array { return concat([toBytesU32(arr.byteLength), arr]); } +export const fromBytesString = (byte: Uint8Array): string => { + return Buffer.from(byte).toString(); +}; + /** * Serializes an array of u8, equal to Vec in rust. */ @@ -123,25 +120,26 @@ export function toBytesArrayU8(arr: Uint8Array): Uint8Array { return concat([toBytesU32(arr.length), arr]); } -/** - * Serializes an byteArray, equal to [u8;n] in rust. - */ -export function toBytesBytesArray(arr: Uint8Array): Uint8Array { - return arr; -} - /** * Serializes a vector of values of type `T` into an array of bytes. */ -export function toBytesVecT(vec: T[]) { - const valueByteList = vec.map(e => e.toBytes()); +export const toBytesVector = (vec: T[]): Uint8Array => { + const valueByteList = vec.map(e => e.toBytes()).map(e => e.unwrap()); valueByteList.splice(0, 0, toBytesU32(vec.length)); return concat(valueByteList); -} +}; + +// TODO: Get rid after refactoring the whole +export const toBytesVectorNew = (vec: T[]): Uint8Array => { + const valueByteList = vec.map(e => CLValueParsers.toBytes(e).unwrap()); + valueByteList.splice(0, 0, toBytesU32(vec.length)); + return concat(valueByteList); +}; +// TODO: Legacy code /** - * Serializes a list of strings into an array of bytes. + * Serializes an byteArray, equal to [u8;n] in rust. */ -export function toBytesStringList(arr: string[]) { - return toBytesVecT(arr.map(e => CLValue.string(e))); +export function toBytesBytesArray(arr: Uint8Array): Uint8Array { + return arr; } diff --git a/src/lib/CLValue.ts b/src/lib/CLValue.ts deleted file mode 100644 index 1e5acb533..000000000 --- a/src/lib/CLValue.ts +++ /dev/null @@ -1,2010 +0,0 @@ -import { concat } from '@ethersproject/bytes'; -import { - toBytesArrayU8, - toBytesBytesArray, - toBytesNumber, - toBytesString, - toBytesU32, - toBytesVecT -} from './byterepr'; -import { BigNumber, BigNumberish } from '@ethersproject/bignumber'; -import { decodeBase16, encodeBase16 } from './Conversions'; -import { Option } from './option'; -import { byteHash } from './Contracts'; -import { SignatureAlgorithm } from './Keys'; -import { jsonMember, jsonObject } from 'typedjson'; -import { ByteArray } from 'tweetnacl-ts'; - -const ED25519_PUBLIC_KEY_LENGTH = 32; -const SECP256K1_PUBLIC_KEY_LENGTH = 33; - -type Type = new (...args: any[]) => T; - -/** - * Static interface declaration - */ -export interface BytesDeserializableStatic extends Type { - fromBytes(bytes: Uint8Array): Result; -} - -export interface BytesSerializable extends CLTyped, ToBytes {} - -export interface CLTyped { - /** - * Returns the CLType - */ - clType: () => CLType; -} - -export interface ToBytes { - toBytes: () => ByteArray; -} - -export abstract class CLTypedAndToBytes implements BytesSerializable { - public abstract clType(): CLType; - - public abstract toBytes(): Uint8Array; - - public clTypeEncoded(): Uint8Array { - return CLTypeHelper.toBytesHelper(this.clType()); - } -} - -export function staticImplements() { - // @ts-ignore - return (constructor: T) => { - // @ts-ignore - }; -} - -const ED25519_TAG = 1; -const SECP256K1_TAG = 2; - -export enum SimpleType { - Bool = 0, - I32 = 1, - I64 = 2, - U8 = 3, - U32 = 4, - U64 = 5, - U128 = 6, - U256 = 7, - U512 = 8, - Unit = 9, - String = 10, - Key = 11, - URef = 12, - PublicKey = 22 -} - -enum ComplexType { - Option = 13, - List = 14, - ByteArray = 15, - Result = 16, - Map = 17, - Tuple1 = 18, - Tuple2 = 19, - Tuple3 = 20, - Any = 21 -} - -/** - * Enum representing possible results of deserialization. - */ -export enum FromBytesError { - /** - * Last operation was a success - */ - Ok = 0, - /** - * Early end of stream - */ - EarlyEndOfStream = 1, - /** - * Unexpected data encountered while decoding byte stream - */ - FormattingError = 2 -} - -/** - * Class representing a result of an operation that might have failed. Can contain either a value - * resulting from a successful completion of a calculation, or an error. Similar to `Result` in Rust - * or `Either` in Haskell. - */ -export class Result { - /** - * Creates new Result with value - * @param value value (success) or null (error) - * @param error FromBytesError code - * @param rem Remaining input stream - */ - constructor( - private val: T | null, - private rem: Uint8Array | null, - public error: FromBytesError - ) {} - - public static Err(errorCode: FromBytesError) { - return new Result(null, null, errorCode); - } - - public static Ok(val: T, rem: Uint8Array) { - return new Result(val, rem, FromBytesError.Ok); - } - - public remainder(): Uint8Array { - if (this.rem === null) { - throw new Error("Don't have remainder"); - } - return this.rem; - } - - /** - * Assumes that reference wrapper contains a value and then returns it - */ - public value(): T { - if (!this.hasValue()) { - throw new Error("Don't have value"); - } - return this.val!; - } - - /** - * Checks if given Result contains a value - */ - public hasValue(): boolean { - return this.val !== null; - } - - /** - * Checks if error value is set. - * - * Truth also implies !hasValue(), false value implies hasValue() - */ - public hasError(): boolean { - return this.error !== FromBytesError.Ok; - } -} - -@staticImplements>() -export class Bool extends CLTypedAndToBytes { - constructor(public val: boolean) { - super(); - } - - public toBytes(): Uint8Array { - return new Uint8Array([this.val ? 1 : 0]); - } - - public clType(): CLType { - return SimpleType.Bool; - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length === 0) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - if (bytes[0] === 1) { - return Result.Ok(new Bool(true), bytes.subarray(1)); - } else if (bytes[0] === 0) { - return Result.Ok(new Bool(false), bytes.subarray(1)); - } else { - return Result.Err(FromBytesError.FormattingError); - } - } -} - -abstract class NumberCoder extends CLTypedAndToBytes { - public bitSize: number; - public signed: boolean; - public val: BigNumber; - public name: string; - - protected constructor(bitSize: number, signed: boolean, value: BigNumberish) { - super(); - this.name = (signed ? 'i' : 'u') + bitSize; - this.bitSize = bitSize; - this.signed = signed; - this.val = BigNumber.from(value); - } - - public toBytes = (): Uint8Array => { - return toBytesNumber(this.bitSize, this.signed, this.val); - }; - - public abstract clType(): CLType; -} - -@staticImplements>() -export class U8 extends NumberCoder { - constructor(u8: number) { - super(8, false, u8); - } - - public clType(): CLType { - return SimpleType.U8; - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length === 0) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - return Result.Ok(new U8(bytes[0]), bytes.subarray(1)); - } -} - -@staticImplements>() -export class U32 extends NumberCoder { - constructor(n: number) { - super(32, false, n); - } - - public clType(): CLType { - return SimpleType.U32; - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < 4) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const u32Bytes = Buffer.from(bytes.subarray(0, 4)); - const u32 = u32Bytes.readUInt32LE(0); - - return Result.Ok(new U32(u32), bytes.subarray(4)); - } -} - -@staticImplements>() -export class I32 extends NumberCoder { - constructor(n: number) { - super(32, true, n); - } - - public clType(): CLType { - return SimpleType.I32; - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < 4) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const i32Bytes = Buffer.from(bytes.subarray(0, 4)); - const i32 = i32Bytes.readInt32LE(0); - return Result.Ok(new I32(i32), bytes.subarray(4)); - } -} - -@staticImplements>() -export class U64 extends NumberCoder { - constructor(n: BigNumberish) { - super(64, false, n); - } - - public clType(): CLType { - return SimpleType.U64; - } - - public static fromBytes(bytes: Uint8Array): Result { - const tmp = Uint8Array.from(bytes); - if (bytes.length < 8) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const u64Bytes = tmp.subarray(0, 8); - const rem = tmp.subarray(8); - return Result.Ok(new U64(BigNumber.from(u64Bytes.reverse())), rem); - } -} - -@staticImplements>() -export class I64 extends NumberCoder { - constructor(n: BigNumberish) { - super(64, true, n); - } - - public clType(): CLType { - return SimpleType.I64; - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < 8) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const tmp = Uint8Array.from(bytes); - const i64Bytes = tmp.subarray(0, 8); - const rem = tmp.subarray(8); - return Result.Ok( - new I64(BigNumber.from(i64Bytes.reverse()).fromTwos(64)), - rem - ); - } -} - -@staticImplements>() -export class U128 extends NumberCoder { - constructor(n: BigNumberish) { - super(128, false, n); - } - - public clType(): CLType { - return SimpleType.U128; - } - - public static fromBytes(bytes: Uint8Array): Result { - return fromBytesBigInt(bytes, 128); - } -} - -@staticImplements>() -class U256 extends NumberCoder { - constructor(n: BigNumberish) { - super(256, false, n); - } - - public clType(): CLType { - return SimpleType.U256; - } - - public static fromBytes(bytes: Uint8Array): Result { - return fromBytesBigInt(bytes, 256); - } -} - -@staticImplements>() -export class U512 extends NumberCoder { - constructor(n: BigNumberish) { - super(512, false, n); - } - - public clType(): CLType { - return SimpleType.U512; - } - - public static fromBytes(bytes: Uint8Array): Result { - return fromBytesBigInt(bytes, 512); - } -} - -@staticImplements>() -export class Unit extends CLTypedAndToBytes { - public clType(): CLType { - return SimpleType.Unit; - } - - public toBytes(): Uint8Array { - return Uint8Array.from([]); - } - - public static fromBytes(bytes: Uint8Array): Result { - return Result.Ok(new Unit(), bytes); - } -} - -@staticImplements>() -export class StringValue extends CLTypedAndToBytes { - constructor(public val: string) { - super(); - } - - public toBytes = () => { - return toBytesString(this.val); - }; - - public clType(): CLType { - return SimpleType.String; - } - - public static fromBytes(bytes: Uint8Array): Result { - const res = U32.fromBytes(bytes); - if (res.hasError()) { - return Result.Err(res.error); - } - const len = res.value().val.toNumber(); - const str = Buffer.from(res.remainder().subarray(0, len)).toString('utf8'); - return Result.Ok( - new StringValue(str), - res.remainder().subarray(len) - ); - } -} - -export const fromBytesByCLType = ( - type: CLType, - bytes: Uint8Array -): Result => { - if (type instanceof ListType) { - return List.fromBytes(type, bytes); - } else if (type instanceof Tuple1Type) { - return Tuple1.fromBytes(type, bytes); - } else if (type instanceof Tuple2Type) { - return Tuple2.fromBytes(type, bytes); - } else if (type instanceof Tuple3Type) { - return Tuple3.fromBytes(type, bytes); - } else if (type instanceof ByteArrayType) { - return ByteArrayValue.fromBytes(bytes); - } else if (type instanceof MapType) { - return MapValue.fromBytes(type, bytes); - } else if (type instanceof OptionType) { - return Option.fromBytes(type, bytes); - } else { - return fromBytesSimpleType(type, bytes); - } -}; - -const fromBytesSimpleType = ( - simpleType: SimpleType, - bytes: Uint8Array -): Result => { - let innerRes: Result; - switch (simpleType) { - case SimpleType.Bool: - innerRes = Bool.fromBytes(bytes); - break; - case SimpleType.I32: - innerRes = I32.fromBytes(bytes); - break; - case SimpleType.I64: - innerRes = I64.fromBytes(bytes); - break; - case SimpleType.U8: - innerRes = U8.fromBytes(bytes); - break; - case SimpleType.U32: - innerRes = U32.fromBytes(bytes); - break; - case SimpleType.U64: - innerRes = U64.fromBytes(bytes); - break; - case SimpleType.U128: - innerRes = U128.fromBytes(bytes); - break; - case SimpleType.U256: - innerRes = U256.fromBytes(bytes); - break; - case SimpleType.U512: - innerRes = U512.fromBytes(bytes); - break; - case SimpleType.Unit: - innerRes = Unit.fromBytes(bytes); - break; - case SimpleType.String: - innerRes = StringValue.fromBytes(bytes); - break; - case SimpleType.Key: - innerRes = KeyValue.fromBytes(bytes); - break; - case SimpleType.URef: - innerRes = URef.fromBytes(bytes); - break; - case SimpleType.PublicKey: - innerRes = PublicKey.fromBytes(bytes); - break; - default: - innerRes = Result.Err(FromBytesError.FormattingError); - break; - } - if (innerRes.hasError()) { - return Result.Err(innerRes.error); - } else { - return Result.Ok(innerRes.value(), innerRes.remainder()); - } -}; - -export class List extends CLTypedAndToBytes { - constructor(public vec: T[]) { - super(); - if (vec.length === 0) { - throw new Error("Can't create instance for empty list"); - } - } - - public clType(): CLType { - return CLTypeHelper.list(this.vec[0].clType()); - } - - public toBytes(): Uint8Array { - return toBytesVecT(this.vec); - } - - public static fromBytes( - type: ListType, - bytes: Uint8Array - ): Result> { - const u32Res = U32.fromBytes(bytes); - if (u32Res.hasError()) { - return Result.Err(u32Res.error); - } - const size = u32Res.value().val.toNumber(); - const vec = []; - let remainder = u32Res.remainder(); - for (let i = 0; i < size; i++) { - const v = fromBytesByCLType(type.innerType, remainder); - if (v.hasError()) { - return Result.Err(v.error); - } - vec.push(v.value()); - remainder = v.remainder(); - } - return Result.Ok(new List(vec), remainder); - } -} - -export class Tuple1 extends CLTypedAndToBytes { - constructor(private v0: CLTypedAndToBytes) { - super(); - } - - public toBytes(): Uint8Array { - return this.v0.toBytes(); - } - - public clType(): CLType { - return CLTypeHelper.tuple1(this.v0.clType()); - } - - public static fromBytes(type: Tuple1Type, bytes: Uint8Array): Result { - const innerRes = fromBytesByCLType(type.t0, bytes); - if (innerRes.hasError()) { - return Result.Err(innerRes.error); - } - const tuple = new Tuple1(innerRes.value()); - return Result.Ok(tuple, innerRes.remainder()); - } -} - -export class Tuple2 extends CLTypedAndToBytes { - constructor(private v0: CLTypedAndToBytes, private v1: CLTypedAndToBytes) { - super(); - } - - public toBytes(): Uint8Array { - return concat([this.v0.toBytes(), this.v1.toBytes()]); - } - - public clType(): CLType { - return CLTypeHelper.tuple2(this.v0.clType(), this.v1.clType()); - } - - public static fromBytes(type: Tuple2Type, bytes: Uint8Array): Result { - const t0Res = fromBytesByCLType(type.t0, bytes); - if (t0Res.hasError()) { - return Result.Err(t0Res.error); - } - const t1Res = fromBytesByCLType(type.t1, t0Res.remainder()); - if (t1Res.hasError()) { - return Result.Err(t1Res.error); - } - const tuple = new Tuple2(t0Res.value(), t1Res.value()); - return Result.Ok(tuple, t1Res.remainder()); - } -} - -export class Tuple3 extends CLTypedAndToBytes { - constructor( - private v0: CLTypedAndToBytes, - private v1: CLTypedAndToBytes, - private v2: CLTypedAndToBytes - ) { - super(); - } - - public clType(): CLType { - return CLTypeHelper.tuple3( - this.v0.clType(), - this.v1.clType(), - this.v2.clType() - ); - } - - public toBytes(): Uint8Array { - return concat([this.v0.toBytes(), this.v1.toBytes(), this.v2.toBytes()]); - } - - public static fromBytes(type: Tuple3Type, bytes: Uint8Array): Result { - const t0Res = fromBytesByCLType(type.t0, bytes); - if (t0Res.hasError()) { - return Result.Err(t0Res.error); - } - const t1Res = fromBytesByCLType(type.t1, t0Res.remainder()); - if (t1Res.hasError()) { - return Result.Err(t1Res.error); - } - const t2Res = fromBytesByCLType(type.t2, t1Res.remainder()); - if (t2Res.hasError()) { - return Result.Err(t2Res.error); - } - const tuple = new Tuple3(t0Res.value(), t1Res.value(), t2Res.value()); - return Result.Ok(tuple, t2Res.remainder()); - } -} - -@staticImplements>() -export class PublicKey extends CLTypedAndToBytes { - constructor(public rawPublicKey: Uint8Array, private tag: number) { - super(); - } - - public clType(): CLType { - return SimpleType.PublicKey; - } - - public toBytes(): Uint8Array { - return concat([ - Uint8Array.from([this.tag]), - toBytesBytesArray(this.rawPublicKey) - ]); - } - - public toAccountHex(): string { - let accountHash: string; - switch (this.tag) { - case ED25519_TAG: - accountHash = '01' + encodeBase16(this.rawPublicKey); - break; - case SECP256K1_TAG: - accountHash = '02' + encodeBase16(this.rawPublicKey); - break; - default: - throw new Error('Unsupported type of public key'); - } - return accountHash; - } - - public isEd25519() { - return this.tag === ED25519_TAG; - } - - public isSecp256K1() { - return this.tag === SECP256K1_TAG; - } - - public toAccountHash(): Uint8Array { - const algorithmIdentifier = this.signatureAlgorithm(); - const separator = Buffer.from([0]); - const prefix = Buffer.concat([ - Buffer.from(algorithmIdentifier.toLowerCase()), - separator - ]); - - if (this.rawPublicKey.length === 0) { - return Buffer.from([]); - } else { - return byteHash(Buffer.concat([prefix, Buffer.from(this.rawPublicKey)])); - } - } - - public static fromEd25519(publicKey: Uint8Array) { - return new PublicKey(publicKey, ED25519_TAG); - } - - public static fromSecp256K1(publicKey: Uint8Array) { - return new PublicKey(publicKey, SECP256K1_TAG); - } - - public static from( - publicKey: Uint8Array, - signatureAlgorithm: SignatureAlgorithm - ) { - switch (signatureAlgorithm) { - case SignatureAlgorithm.Ed25519: - return PublicKey.fromEd25519(publicKey); - case SignatureAlgorithm.Secp256K1: - return PublicKey.fromSecp256K1(publicKey); - default: - throw new Error('Unsupported type of public key'); - } - } - - /** - * Tries to decode PublicKey from its hex-representation. - * The hex format should be as produced by PublicKey.toAccountHex - * @param publicKeyHex - */ - public static fromHex(publicKeyHex: string) { - if (publicKeyHex.length < 2) { - throw new Error('asymmetric key error: too short'); - } - const publicKeyHexBytes = decodeBase16(publicKeyHex); - switch (publicKeyHexBytes[0]) { - case 1: - return PublicKey.fromEd25519(publicKeyHexBytes.subarray(1)); - case 2: - return PublicKey.fromSecp256K1(publicKeyHexBytes.subarray(1)); - default: - throw new Error('Unsupported type of public key'); - } - } - - public signatureAlgorithm() { - switch (this.tag) { - case ED25519_TAG: - return SignatureAlgorithm.Ed25519; - case SECP256K1_TAG: - return SignatureAlgorithm.Secp256K1; - default: - throw new Error('Unsupported type of public key'); - } - } - - /** Deserializes a `PublicKey` from an array of bytes. */ - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < 1) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const variant = bytes[0]; - let currentPos = 1; - - let expectedPublicKeySize: number; - - switch (variant) { - case ED25519_TAG: - expectedPublicKeySize = ED25519_PUBLIC_KEY_LENGTH; - break; - case SECP256K1_TAG: - expectedPublicKeySize = SECP256K1_PUBLIC_KEY_LENGTH; - break; - default: - return Result.Err(FromBytesError.FormattingError); - } - const publicKeyBytes = bytes.subarray( - currentPos, - currentPos + expectedPublicKeySize - ); - currentPos += expectedPublicKeySize; - - const publicKey = new PublicKey(publicKeyBytes, variant); - return Result.Ok(publicKey, bytes.subarray(currentPos)); - } -} - -export interface MapEntry { - key: CLTypedAndToBytes; - value: CLTypedAndToBytes; -} - -export class MapValue extends CLTypedAndToBytes { - constructor(private v: MapEntry[]) { - super(); - } - - public toBytes(): Uint8Array { - const kvBytes: Uint8Array[] = this.v.map(vv => { - return concat([vv.key.toBytes(), vv.value.toBytes()]); - }); - kvBytes.splice(0, 0, toBytesU32(this.v.length)); - return concat(kvBytes); - } - - public clType(): CLType { - return new MapType(this.v[0].key.clType(), this.v[0].value.clType()); - } - - public static fromBytes(type: MapType, bytes: Uint8Array): Result { - const u32Res = U32.fromBytes(bytes); - if (u32Res.hasError()) { - return Result.Err(u32Res.error); - } - const size = u32Res.value().val.toNumber(); - const vec: MapEntry[] = []; - let remainder = u32Res.remainder(); - for (let i = 0; i < size; i++) { - const keyRes = fromBytesByCLType(type.keyType, remainder); - if (keyRes.hasError()) { - return Result.Err(keyRes.error); - } - remainder = keyRes.remainder(); - const valueRes = fromBytesByCLType(type.valueType, remainder); - if (valueRes.hasError()) { - return Result.Err(valueRes.error); - } - remainder = valueRes.remainder(); - vec.push({ key: keyRes.value(), value: valueRes.value() }); - } - return Result.Ok(new MapValue(vec), remainder); - } -} - -@staticImplements>() -class ByteArrayValue extends CLTypedAndToBytes { - constructor(public rawBytes: Uint8Array) { - super(); - } - - public clType(): CLType { - return CLTypeHelper.byteArray(this.rawBytes.length); - } - - public toBytes(): Uint8Array { - return toBytesBytesArray(this.rawBytes); - } - - public static fromBytes(bytes: Uint8Array): Result { - const b = new ByteArrayValue(bytes.subarray(0, 32)); - return Result.Ok(b, bytes.subarray(32)); - } -} - -const fromBytesBigInt: ( - bytes: Uint8Array, - bitSize: number -) => Result = (bytes: Uint8Array, bitSize: number) => { - const byteSize = bitSize / 8; - if (bytes.length < 1) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const tmp = Uint8Array.from(bytes); - const n = tmp[0]; - if (n > byteSize) { - return Result.Err(FromBytesError.FormattingError); - } - if (n + 1 > bytes.length) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - let bigIntBytes; - if (n === 0) { - bigIntBytes = [0]; - } else { - bigIntBytes = tmp.subarray(1, 1 + n); - } - const rem = tmp.subarray(1 + n); - if (bitSize === 128) { - return Result.Ok(new U128(BigNumber.from(bigIntBytes.reverse())), rem); - } else if (bitSize === 256) { - return Result.Ok(new U256(BigNumber.from(bigIntBytes.reverse())), rem); - } else if (bitSize === 512) { - return Result.Ok(new U512(BigNumber.from(bigIntBytes.reverse())), rem); - } else { - return Result.Err(FromBytesError.FormattingError); - } -}; - -export interface ToJSON { - toJSON: () => any; -} - -export class OptionType implements ToJSON { - public static TypeId = 'Option'; - public tag = ComplexType.Option; - - constructor(public innerType: CLType) {} - - public toJSON(): any { - const innerTypeInJSON = clTypeToJSON(this.innerType); - return { - [OptionType.TypeId]: innerTypeInJSON - }; - } -} - -class ListType implements ToJSON { - public static TypeId = 'List'; - public tag = ComplexType.List; - public innerType: CLType; - - constructor(innerType: CLType) { - this.innerType = innerType; - } - - public toJSON(): any { - const innerTypeInJSON = clTypeToJSON(this.innerType); - return { - [ListType.TypeId]: innerTypeInJSON - }; - } -} - -class ByteArrayType implements ToJSON { - public static TypeId = 'ByteArray'; - public tag = ComplexType.ByteArray; - - constructor(public size: number) {} - - public toJSON() { - return { - [ByteArrayType.TypeId]: this.size - }; - } -} - -class MapType implements ToJSON { - public static TypeId = 'Map'; - public tag = ComplexType.Map; - - constructor(public keyType: CLType, public valueType: CLType) {} - - public toJSON(): any { - return { - [MapType.TypeId]: { - key: clTypeToJSON(this.keyType), - value: clTypeToJSON(this.valueType) - } - }; - } -} - -class Tuple1Type implements ToJSON { - public static TypeId = 'Tuple1'; - public tag = ComplexType.Tuple1; - - constructor(public t0: CLType) {} - - public toJSON(): any { - const t0TypeInJSON = clTypeToJSON(this.t0); - return { - [Tuple1Type.TypeId]: t0TypeInJSON - }; - } -} - -class Tuple2Type implements ToJSON { - public static TypeId = 'Tuple2'; - public tag = ComplexType.Tuple2; - - constructor(public t0: CLType, public t1: CLType) {} - - public toJSON(): any { - const t0TypeInJSON = clTypeToJSON(this.t0); - const t1TypeInJSON = clTypeToJSON(this.t1); - return { - [Tuple2Type.TypeId]: [t0TypeInJSON, t1TypeInJSON] - }; - } -} - -class Tuple3Type { - public static TypeId = 'Tuple3'; - - public tag = ComplexType.Tuple3; - - constructor(public t0: CLType, public t1: CLType, public t2: CLType) {} - - public toJSON(): any { - const t0TypeInJSON = clTypeToJSON(this.t0); - const t1TypeInJSON = clTypeToJSON(this.t1); - const t2TypeInJSON = clTypeToJSON(this.t2); - - return { - [Tuple3Type.TypeId]: [t0TypeInJSON, t1TypeInJSON, t2TypeInJSON] - }; - } -} - -export type CLType = - | SimpleType - | ListType - | ByteArrayType - | MapType - | OptionType - | Tuple1Type - | Tuple2Type - | Tuple3Type; - -export class CLTypeHelper { - public static u8() { - return SimpleType.U8; - } - - public static u32() { - return SimpleType.U32; - } - - public static u64() { - return SimpleType.U64; - } - - public static u128() { - return SimpleType.U128; - } - - public static u256() { - return SimpleType.U256; - } - - public static u512() { - return SimpleType.U512; - } - - public static i32() { - return SimpleType.I32; - } - - public static i64() { - return SimpleType.I64; - } - - public static bool() { - return SimpleType.Bool; - } - - public static unit() { - return SimpleType.Unit; - } - - public static string() { - return SimpleType.String; - } - - public static key() { - return SimpleType.Key; - } - - public static publicKey() { - return SimpleType.PublicKey; - } - - public static uRef() { - return SimpleType.URef; - } - - public static option(innerType: CLType) { - return new OptionType(innerType); - } - - public static list(innerType: CLType) { - return new ListType(innerType); - } - - public static byteArray(len: number) { - return new ByteArrayType(len); - } - - public static map(keyType: CLType, valueType: CLType) { - return new MapType(keyType, valueType); - } - - public static tuple1(t0: CLType) { - return new Tuple1Type(t0); - } - - public static tuple2(t0: CLType, t1: CLType) { - return new Tuple2Type(t0, t1); - } - - public static tuple3(t0: CLType, t1: CLType, t2: CLType) { - return new Tuple3Type(t0, t1, t2); - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < 1) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const tag = bytes[0]; - const rem = bytes.subarray(1); - switch (tag) { - case SimpleType.Bool: - case SimpleType.I32: - case SimpleType.I64: - case SimpleType.U8: - case SimpleType.U32: - case SimpleType.U64: - case SimpleType.U256: - case SimpleType.U512: - case SimpleType.Unit: - case SimpleType.String: - case SimpleType.Key: - case SimpleType.URef: - case SimpleType.PublicKey: - return Result.Ok(tag as SimpleType, rem); - case ComplexType.Option: { - // 1 inner type - const innerTypeRes = CLTypeHelper.fromBytes(rem); - if (innerTypeRes.hasError()) { - return Result.Err(innerTypeRes.error); - } - - return Result.Ok( - CLTypeHelper.option(innerTypeRes.value()), - innerTypeRes.remainder() - ); - } - case ComplexType.List: { - // 1 inner type - const innerTypeRes = CLTypeHelper.fromBytes(rem); - if (innerTypeRes.hasError()) { - return Result.Err(innerTypeRes.error); - } - - return Result.Ok( - CLTypeHelper.list(innerTypeRes.value()), - innerTypeRes.remainder() - ); - } - case ComplexType.ByteArray: { - // size of bytes - const sizeRes = U32.fromBytes(rem); - if (sizeRes.hasError()) { - return Result.Err(sizeRes.error); - } - return Result.Ok( - CLTypeHelper.byteArray(sizeRes.value().val.toNumber()), - sizeRes.remainder() - ); - } - case ComplexType.Result: - // todo(abner) support Result - throw new Error('Result type is unsupported now'); - case ComplexType.Map: { - // type of key - const keyTypeRes = CLTypeHelper.fromBytes(rem); - if (keyTypeRes.hasError()) { - return Result.Err(keyTypeRes.error); - } - const valueTypeRes = CLTypeHelper.fromBytes(keyTypeRes.remainder()); - if (valueTypeRes.hasError()) { - return Result.Err(valueTypeRes.error); - } - return Result.Ok( - CLTypeHelper.map(keyTypeRes.value(), valueTypeRes.value()), - valueTypeRes.remainder() - ); - } - - case ComplexType.Tuple1: { - // 1 inner type - const innerTypeRes = CLTypeHelper.fromBytes(rem); - if (innerTypeRes.hasError()) { - return Result.Err(innerTypeRes.error); - } - - return Result.Ok( - CLTypeHelper.tuple1(innerTypeRes.value()), - innerTypeRes.remainder() - ); - } - case ComplexType.Tuple2: { - // 2 inner types - const innerType1Res = CLTypeHelper.fromBytes(rem); - if (innerType1Res.hasError()) { - return Result.Err(innerType1Res.error); - } - - const innerType2Res = CLTypeHelper.fromBytes(innerType1Res.remainder()); - if (innerType2Res.hasError()) { - return Result.Err(innerType2Res.error); - } - - return Result.Ok( - CLTypeHelper.tuple2(innerType1Res.value(), innerType2Res.value()), - innerType2Res.remainder() - ); - } - case ComplexType.Tuple3: { - // 3 inner types - const innerType1Res = CLTypeHelper.fromBytes(rem); - if (innerType1Res.hasError()) { - return Result.Err(innerType1Res.error); - } - - const innerType2Res = CLTypeHelper.fromBytes(innerType1Res.remainder()); - if (innerType2Res.hasError()) { - return Result.Err(innerType2Res.error); - } - - const innerType3Res = CLTypeHelper.fromBytes(innerType1Res.remainder()); - if (innerType3Res.hasError()) { - return Result.Err(innerType3Res.error); - } - - return Result.Ok( - CLTypeHelper.tuple3( - innerType1Res.value(), - innerType2Res.value(), - innerType3Res.value() - ), - innerType3Res.remainder() - ); - } - case ComplexType.Any: - // todo(abner) support Any - throw new Error('Any type is unsupported now'); - default: - return Result.Err(FromBytesError.FormattingError); - } - } - - public static toBytesHelper(type: CLType): Uint8Array { - if (type instanceof ListType) { - return concat([ - Uint8Array.from([type.tag]), - CLTypeHelper.toBytesHelper(type.innerType) - ]); - } else if (type instanceof Tuple1Type) { - return concat([ - Uint8Array.from([type.tag]), - CLTypeHelper.toBytesHelper(type.t0) - ]); - } else if (type instanceof Tuple2Type) { - return concat([ - Uint8Array.from([type.tag]), - CLTypeHelper.toBytesHelper(type.t0), - CLTypeHelper.toBytesHelper(type.t1) - ]); - } else if (type instanceof Tuple3Type) { - return concat([ - Uint8Array.from([type.tag]), - CLTypeHelper.toBytesHelper(type.t0), - CLTypeHelper.toBytesHelper(type.t1), - CLTypeHelper.toBytesHelper(type.t2) - ]); - } else if (type instanceof ByteArrayType) { - return concat([Uint8Array.from([type.tag]), toBytesU32(type.size)]); - } else if (type instanceof MapType) { - return concat([ - Uint8Array.from([type.tag]), - CLTypeHelper.toBytesHelper(type.keyType), - CLTypeHelper.toBytesHelper(type.valueType) - ]); - } else if (type instanceof OptionType) { - return concat([ - Uint8Array.from([type.tag]), - CLTypeHelper.toBytesHelper(type.innerType) - ]); - } else { - switch (type) { - case SimpleType.Bool: - case SimpleType.I32: - case SimpleType.I64: - case SimpleType.U8: - case SimpleType.U32: - case SimpleType.U64: - case SimpleType.U128: - case SimpleType.U256: - case SimpleType.U512: - case SimpleType.Unit: - case SimpleType.String: - case SimpleType.Key: - case SimpleType.URef: - case SimpleType.PublicKey: - return Uint8Array.from([type]); - default: - throw new Error('Wrong type'); - } - } - } -} - -export class CLTypedAndToBytesHelper { - public static bool = (b: boolean) => { - return new Bool(b); - }; - - public static u8 = (u8: number) => { - return new U8(u8); - }; - - public static u32 = (u32: number) => { - return new U32(u32); - }; - - public static i32 = (i32: number) => { - return new I32(i32); - }; - - public static u64 = (u64: BigNumberish) => { - return new U64(u64); - }; - - public static i64 = (i64: BigNumberish) => { - return new I64(i64); - }; - - public static u128 = (u128: BigNumberish) => { - return new U128(u128); - }; - - public static u256 = (u256: BigNumberish) => { - return new U256(u256); - }; - - public static u512 = (u512: BigNumberish) => { - return new U512(u512); - }; - - public static unit = () => { - return new Unit(); - }; - - public static string = (x: string) => { - return new StringValue(x); - }; - - public static list(vec: T[]) { - // todo(abner) implement fromEmptyList - return new List(vec); - } - - public static tuple1(t0: T) { - return new Tuple1(t0); - } - - public static tuple2(t0: CLTypedAndToBytes, t1: CLTypedAndToBytes) { - return new Tuple2(t0, t1); - } - - public static tuple3( - t0: CLTypedAndToBytes, - t1: CLTypedAndToBytes, - t2: CLTypedAndToBytes - ) { - return new Tuple3(t0, t1, t2); - } - - public static option(t: CLTypedAndToBytes | null, innerType?: CLType) { - return new Option(t, innerType); - } - - public static map(mapEntries: MapEntry[]) { - return new MapValue(mapEntries); - } - - public static publicKey(publicKey: Uint8Array) { - return PublicKey.fromEd25519(publicKey); - } - - public static bytes(bytes: Uint8Array) { - return new ByteArrayValue(bytes); - } -} - -function toJSONSimpleType(type: SimpleType) { - switch (type) { - case SimpleType.Bool: - return 'Bool'; - case SimpleType.I32: - return 'I32'; - case SimpleType.I64: - return 'I64'; - case SimpleType.U8: - return 'U8'; - case SimpleType.U32: - return 'U32'; - case SimpleType.U64: - return 'U64'; - case SimpleType.U128: - return 'U128'; - case SimpleType.U256: - return 'U256'; - case SimpleType.U512: - return 'U512'; - case SimpleType.Unit: - return 'Unit'; - case SimpleType.String: - return 'String'; - case SimpleType.Key: - return 'Key'; - case SimpleType.URef: - return 'URef'; - case SimpleType.PublicKey: - return 'PublicKey'; - } -} - -function jsonToSimpleType(str: string): CLType { - switch (str) { - case 'Bool': - return SimpleType.Bool; - case 'I32': - return SimpleType.I32; - case 'I64': - return SimpleType.I64; - case 'U8': - return SimpleType.U8; - case 'U32': - return SimpleType.U32; - case 'U64': - return SimpleType.U64; - case 'U128': - return SimpleType.U128; - case 'U256': - return SimpleType.U256; - case 'U512': - return SimpleType.U512; - case 'Unit': - return SimpleType.Unit; - case 'String': - return SimpleType.String; - case 'Key': - return SimpleType.Key; - case 'URef': - return SimpleType.URef; - case 'PublicKey': - return SimpleType.PublicKey; - default: - throw new Error(`The type ${str} is not supported`); - } -} - -const clTypeToJSON = (type: CLType) => { - if ( - type instanceof ListType || - type instanceof Tuple1Type || - type instanceof Tuple2Type || - type instanceof Tuple3Type || - type instanceof ByteArrayType || - type instanceof MapType || - type instanceof OptionType - ) { - return type.toJSON(); - } else { - return toJSONSimpleType(type); - } -}; - -const jsonToCLType = (json: any): CLType => { - if (typeof json === typeof 'str') { - return jsonToSimpleType(json); - } else if (typeof json === typeof {}) { - if (ListType.TypeId in json) { - const innerType = jsonToCLType(json[ListType.TypeId]); - return CLTypeHelper.list(innerType); - } else if (Tuple1Type.TypeId in json) { - const t0Type = jsonToCLType(json[Tuple1Type.TypeId][0]); - return CLTypeHelper.tuple1(t0Type); - } else if (Tuple2Type.TypeId in json) { - const innerTypes = json[Tuple2Type.TypeId]; - const t0Type = jsonToCLType(innerTypes[0]); - const t1Type = jsonToCLType(innerTypes[1]); - return CLTypeHelper.tuple2(t0Type, t1Type); - } else if (Tuple3Type.TypeId in json) { - const innerTypes = json[Tuple2Type.TypeId]; - const t0Type = jsonToCLType(innerTypes[0]); - const t1Type = jsonToCLType(innerTypes[1]); - const t2Type = jsonToCLType(innerTypes[2]); - return CLTypeHelper.tuple3(t0Type, t1Type, t2Type); - } else if (ByteArrayType.TypeId in json) { - const size = json[ByteArrayType.TypeId]; - return CLTypeHelper.byteArray(size); - } else if (OptionType.TypeId in json) { - const innerType = jsonToCLType(json[OptionType.TypeId]); - return CLTypeHelper.option(innerType); - } else if (MapType.TypeId in json) { - const keyType = jsonToCLType(json[MapType.TypeId].key); - const valueType = jsonToCLType(json[MapType.TypeId].value); - return CLTypeHelper.map(keyType, valueType); - } else { - throw new Error(`The type ${json} is not supported`); - } - } else { - throw new Error(`The type ${json} is not supported`); - } -}; - -function deserializeCLValue(_a: any, _b: any) { - const v = fromBytesByCLType(_a.clType, decodeBase16(_a.bytes)); - const ret = CLValue.fromT(v.value()); - return ret; -} - -/** - * A Casper value, i.e. a value which can be stored and manipulated by smart contracts. - * - * It holds the underlying data as a type-erased, serialized array of bytes and also holds the - * [[CLType]] of the underlying data as a separate member. - */ -@jsonObject({ - initializer: (a, b) => deserializeCLValue(a, b) -}) -export class CLValue implements ToBytes { - @jsonMember({ - name: 'cl_type', - serializer: clTypeToJSON, - deserializer: jsonToCLType - }) - public clType: CLType; - - @jsonMember({ - constructor: String - }) - public bytes: string; - - @jsonMember({ - serializer: _ => 'null', - deserializer: _ => null - }) - public parsed: any; - - private value: CLTypedAndToBytes; - - /** - * Please use static methodsto constructs a new `CLValue` - */ - private constructor(value: CLTypedAndToBytes, clType: CLType) { - this.value = value; - this.clType = clType; - this.bytes = encodeBase16(this.value.toBytes()); - } - - public clValueBytes() { - return this.value.toBytes(); - } - - public static fromT(v: T) { - return new CLValue(v, v.clType()); - } - - /** - * Serializes a `CLValue` into an array of bytes. - */ - public toBytes() { - return concat([ - toBytesArrayU8(this.clValueBytes()), - CLTypeHelper.toBytesHelper(this.clType) - ]); - } - - public static fromBytes(bytes: Uint8Array): Result { - const bytesRes = ByteArrayValue.fromBytes(bytes); - if (bytesRes.hasError()) { - return Result.Err(bytesRes.error); - } - const clTypeRes = CLTypeHelper.fromBytes(bytesRes.remainder()); - if (clTypeRes.hasError()) { - return Result.Err(clTypeRes.error); - } - const v = fromBytesByCLType(clTypeRes.value(), bytesRes.value().rawBytes); - const clValue = new CLValue(v.value(), clTypeRes.value()); - return Result.Ok(clValue, clTypeRes.remainder()); - } - - protected reconstruct() { - const v = fromBytesByCLType(this.clType, decodeBase16(this.bytes)); - if (v.hasError()) { - throw new Error('Failed to deserialize CLValue'); - } - this.value = v.value(); - } - - public static bool = (b: boolean) => { - return CLValue.fromT(new Bool(b)); - }; - - public static u8 = (u8: number) => { - return CLValue.fromT(new U8(u8)); - }; - - public static u32 = (u32: number) => { - return CLValue.fromT(new U32(u32)); - }; - - public static i32 = (i32: number) => { - return CLValue.fromT(new I32(i32)); - }; - - public static u64 = (u64: BigNumberish) => { - return CLValue.fromT(new U64(u64)); - }; - - public static i64 = (i64: BigNumberish) => { - return CLValue.fromT(new I64(i64)); - }; - - public static u128 = (u128: BigNumberish) => { - return CLValue.fromT(new U128(u128)); - }; - - public static u256 = (u256: BigNumberish) => { - return CLValue.fromT(new U256(u256)); - }; - - public static u512 = (u512: BigNumberish) => { - return CLValue.fromT(new U512(u512)); - }; - - public static unit = () => { - return CLValue.fromT(new Unit()); - }; - - public static string = (x: string) => { - return CLValue.fromT(new StringValue(x)); - }; - - public static key = (key: KeyValue) => { - return CLValue.fromT(key); - }; - - public static uref = (uRef: URef) => { - return CLValue.fromT(uRef); - }; - - public static stringList = (strings: string[]) => { - const v = CLTypedAndToBytesHelper.list( - strings.map(s => CLTypedAndToBytesHelper.string(s)) - ); - return new CLValue(v, CLTypeHelper.list(SimpleType.String)); - }; - - public static list(vec: T[]) { - return CLValue.fromT(new List(vec)); - } - - public static tuple1(t0: T) { - return CLValue.fromT(new Tuple1(t0)); - } - - public static tuple2(t0: T, t1: T) { - return CLValue.fromT(new Tuple2(t0, t1)); - } - - public static tuple3(t0: T, t1: T, t2: T) { - return CLValue.fromT(new Tuple3(t0, t1, t2)); - } - - public static option(t: CLTypedAndToBytes | null, innerType?: CLType) { - return CLValue.fromT(new Option(t, innerType)); - } - - public static map(mapEntries: MapEntry[]) { - return CLValue.fromT(new MapValue(mapEntries)); - } - - public static publicKey(publicKey: PublicKey) { - return CLValue.fromT(publicKey); - } - - public static byteArray(bytes: Uint8Array) { - return CLValue.fromT(new ByteArrayValue(bytes)); - } - - public isBigNumber() { - return ( - this.clType === SimpleType.U8 || - this.clType === SimpleType.I32 || - this.clType === SimpleType.I64 || - this.clType === SimpleType.U32 || - this.clType === SimpleType.U64 || - this.clType === SimpleType.U128 || - this.clType === SimpleType.U256 || - this.clType === SimpleType.U512 - ); - } - - public asBigNumber(): BigNumber { - if (this.isBigNumber()) { - const numberCoder = this.value as NumberCoder; - return BigNumber.from(numberCoder.val); - } else { - throw new Error('The CLValue is not an instance of BigNumber'); - } - } - - public isBoolean() { - return this.clType === SimpleType.Bool; - } - - public asBoolean() { - if (!this.isBoolean()) { - throw new Error('The CLValue is not an instance of Boolean'); - } - return (this.value as Bool).val; - } - - public isString() { - return this.clType === SimpleType.String; - } - - public asString() { - if (!this.isString()) { - throw new Error('The CLValue is not an instance of String'); - } - return (this.value as StringValue).val; - } - - public isPublicKey() { - return this.clType === SimpleType.PublicKey; - } - - public asPublicKey(): PublicKey { - if (!this.isPublicKey()) { - throw new Error('The CLValue is not an instance of PublicKey'); - } - return this.value as PublicKey; - } - - public isKey() { - return this.clType === SimpleType.Key; - } - - public asKey() { - if (!this.isKey()) { - throw new Error('The CLValue is not an instance of Key'); - } - return this.value as KeyValue; - } - - public isURef() { - return this.clType === SimpleType.URef; - } - - public asURef() { - if (!this.isURef()) { - throw new Error('The CLValue is not an instance of URef'); - } - return this.value as URef; - } - - public isBytesArray() { - return this.clType instanceof ByteArrayType; - } - - public asBytesArray() { - if (!this.isBytesArray()) { - throw new Error('The CLValue is not an instance of BytesArray'); - } - return (this.value as ByteArrayValue).toBytes(); - } - - public isOption() { - return this.clType instanceof OptionType; - } - - public asOption() { - if (!this.isOption()) { - throw new Error('The CLValue is not an instance of Option'); - } - return this.value as Option; - } - - public isList() { - return this.clType instanceof ListType; - } - - public asList() { - if (!this.isList()) { - throw new Error('The CLValue is not an instance of List'); - } - const innerType = this.clType as ListType; - const list = List.fromBytes(innerType, this.clValueBytes()); - if (list.hasError()) { - throw new Error('The CLValue can not be parsed to list.'); - } - return list.value().vec.map(e => CLValue.fromT(e)); - } -} - -export enum KeyVariant { - /** The Account variant */ - ACCOUNT_ID = 0, - /** The Hash variant */ - HASH_ID = 1, - /** The URef variant */ - UREF_ID = 2 - - // todo(abner) support the new introduced variants - /** The Transfer variant */ - // TRANSFER_ID = 3, - // DEPLOY_INFO_ID = 4, - // ERA_INFO_ID = 5 -} - -/// The length in bytes of a [`AccountHash`]. -const ACCOUNT_HASH_LENGTH = 32; - -/** A cryptographic public key. */ -@staticImplements>() -export class AccountHash extends CLTypedAndToBytes { - /** - * Constructs a new `AccountHash`. - * - * @param bytes The bytes constituting the public key. - */ - constructor(public bytes: Uint8Array) { - super(); - } - - /** Serializes a `AccountHash` into an array of bytes. */ - public toBytes(): Uint8Array { - return this.bytes; - } - - public clType(): CLType { - return CLTypeHelper.byteArray(ACCOUNT_HASH_LENGTH); - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < ACCOUNT_HASH_LENGTH) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - - const accountHashBytes = bytes.subarray(0, ACCOUNT_HASH_LENGTH); - const accountHash = new AccountHash(accountHashBytes); - return Result.Ok( - accountHash, - bytes.subarray(ACCOUNT_HASH_LENGTH) - ); - } -} - -/** - * The type under which data (e.g. [[CLValue]]s, smart contracts, user accounts) - * are indexed on the network. - */ -@staticImplements>() -export class KeyValue extends CLTypedAndToBytes { - public variant: KeyVariant; - public hash: Uint8Array | null; - public uRef: URef | null; - public account: AccountHash | null; - - public isHash() { - return this.variant === KeyVariant.HASH_ID; - } - - public isURef() { - return this.variant === KeyVariant.UREF_ID; - } - - public isAccount() { - return this.variant === KeyVariant.ACCOUNT_ID; - } - - /** Creates a `Key` from a given [[URef]]. */ - public static fromURef(uref: URef): KeyValue { - const key = new KeyValue(); - key.variant = KeyVariant.UREF_ID; - key.uRef = uref; - return key; - } - - /** Creates a `Key` from a given hash. */ - public static fromHash(hash: Uint8Array): KeyValue { - const key = new KeyValue(); - key.variant = KeyVariant.HASH_ID; - key.hash = hash; - return key; - } - - /** Creates a `Key` from a [[]] representing an account. */ - public static fromAccount(account: AccountHash): KeyValue { - const key = new KeyValue(); - key.variant = KeyVariant.ACCOUNT_ID; - key.account = account; - return key; - } - - public clType() { - return SimpleType.Key; - } - - /** Serializes a `Key` into an array of bytes. */ - public toBytes() { - if (this.variant === KeyVariant.ACCOUNT_ID) { - return concat([Uint8Array.from([this.variant]), this.account!.toBytes()]); - } else if (this.variant === KeyVariant.HASH_ID) { - return concat([Uint8Array.from([this.variant]), this.hash!]); - } else if (this.variant === KeyVariant.UREF_ID) { - return concat([Uint8Array.from([this.variant]), this.uRef!.toBytes()]); - } else { - throw new Error('Unknown variant'); - } - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < 1) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - const tag = bytes[0]; - let currentPos = 1; - - if (tag === KeyVariant.HASH_ID) { - const hashBytes = bytes.subarray(currentPos, 32 + currentPos); - currentPos += 32; - const key = KeyValue.fromHash(hashBytes); - return Result.Ok(key, bytes.subarray(currentPos)); - } else if (tag === KeyVariant.UREF_ID) { - const urefBytes = bytes.subarray(1); - const urefResult = URef.fromBytes(urefBytes); - if (urefResult.hasError()) { - return Result.Err(urefResult.error); - } - const key = KeyValue.fromURef(urefResult.value()); - return Result.Ok(key, urefResult.remainder()); - } else if (tag === KeyVariant.ACCOUNT_ID) { - const accountHashBytes = bytes.subarray(1); - const accountHashResult = AccountHash.fromBytes(accountHashBytes); - if (accountHashResult.hasError()) { - return Result.Err(accountHashResult.error); - } - const key = KeyValue.fromAccount(accountHashResult.value()); - return Result.Ok(key, accountHashResult.remainder()); - } else { - return Result.Err(FromBytesError.FormattingError); - } - } -} - -const FORMATTED_STRING_PREFIX = 'uref-'; -/** - * Length of [[URef]] address field. - * @internal - */ -const UREF_ADDR_LENGTH = 32; -/** - * Length of [[ACCESS_RIGHT]] field. - * @internal - */ -const ACCESS_RIGHT_LENGTH = 1; - -const UREF_BYTES_LENGTH = UREF_ADDR_LENGTH + ACCESS_RIGHT_LENGTH; - -export enum AccessRights { - // No permissions - None = 0b0, - // Permission to read the value under the associated [[URef]]. - READ = 0b001, - // Permission to write a value under the associated [[URef]]. - WRITE = 0b010, - // Permission to add to the value under the associated [[URef]]. - ADD = 0b100, - // Permission to read or write the value under the associated [[URef]]. - READ_WRITE = AccessRights.READ | AccessRights.WRITE, - // Permission to read or add to the value under the associated [[URef]]. - READ_ADD = AccessRights.READ | AccessRights.ADD, - // Permission to add to, or write the value under the associated [[URef]]. - ADD_WRITE = AccessRights.ADD | AccessRights.WRITE, - // Permission to read, add to, or write the value under the associated [[URef]]. - READ_ADD_WRITE = AccessRights.READ | AccessRights.ADD | AccessRights.WRITE -} - -@staticImplements>() -export class URef extends CLTypedAndToBytes { - /** - * Constructs new instance of URef. - * @param uRefAddr Bytes representing address of the URef. - * @param accessRights Access rights flag. Use [[AccessRights.NONE]] to indicate no permissions. - */ - constructor(public uRefAddr: Uint8Array, public accessRights: AccessRights) { - super(); - if (this.uRefAddr.byteLength !== 32) { - throw new Error('The length of URefAddr should be 32'); - } - } - - /** - * Parses a casper-client supported string formatted argument into a `URef`. - */ - public static fromFormattedStr(input: string) { - if (!input.startsWith(FORMATTED_STRING_PREFIX)) { - throw new Error("prefix is not 'uref-'"); - } - const parts = input.substring(FORMATTED_STRING_PREFIX.length).split('-', 2); - if (parts.length !== 2) { - throw new Error('no access rights as suffix'); - } - - const addr = decodeBase16(parts[0]); - const accessRight = parseInt(parts[1], 8) as AccessRights; - - return new URef(addr, accessRight); - } - - public toFormattedStr() { - return [ - FORMATTED_STRING_PREFIX, - encodeBase16(this.uRefAddr), - this.accessRights.toString(8) - ].join('-'); - } - - /** - * Serializes the URef into an array of bytes that represents it in the Casper serialization - * format. - */ - public toBytes(): Uint8Array { - return concat([this.uRefAddr, Uint8Array.from([this.accessRights])]); - } - - public clType(): CLType { - return CLTypeHelper.uRef(); - } - - public static fromBytes(bytes: Uint8Array): Result { - if (bytes.length < UREF_BYTES_LENGTH) { - return Result.Err(FromBytesError.EarlyEndOfStream); - } - - const urefBytes = bytes.subarray(0, UREF_ADDR_LENGTH); - const accessRights = bytes[UREF_BYTES_LENGTH - 1]; - const uref = new URef(urefBytes, accessRights); - return Result.Ok(uref, bytes.subarray(UREF_BYTES_LENGTH)); - } -} diff --git a/src/lib/CLValue/Abstract.ts b/src/lib/CLValue/Abstract.ts new file mode 100644 index 000000000..42ff90dd6 --- /dev/null +++ b/src/lib/CLValue/Abstract.ts @@ -0,0 +1,138 @@ +import { Result, Ok, Err } from 'ts-results'; +import { concat } from '@ethersproject/bytes'; + +import { toBytesArrayU8 } from '../ByteConverters'; +import { CLErrorCodes, CLTypeTag } from './constants'; + +import { + matchTypeToCLType, + matchBytesToCLType, + matchByteParserByCLType +} from './utils'; + +import { CLU32BytesParser } from './index'; + +import { encodeBase16, decodeBase16 } from '../Conversions'; + +export interface ResultAndRemainder { + result: Result; + remainder?: Uint8Array; +} + +export interface CLJSONFormat { + bytes: string; + cl_type: any; +} + +export type ToBytesResult = Result; + +export const resultHelper = ( + arg1: Result, + arg2?: Uint8Array +): ResultAndRemainder => { + return { result: arg1, remainder: arg2 }; +}; + +export abstract class CLType { + abstract toString(): string; + abstract toJSON(): any; + abstract linksTo: any; + abstract tag: CLTypeTag; + + toBytes(): Uint8Array { + return Uint8Array.from([this.tag]); + } +} + +export abstract class ToBytes { + abstract toBytes(): ToBytesResult; +} + +export abstract class CLValue { + abstract clType(): CLType; + abstract value(): any; + abstract data: any; +} + +export class CLValueParsers { + static fromJSON(json: any): Result { + const clType = matchTypeToCLType(json.cl_type); + const uint8bytes = decodeBase16(json.bytes); + const clEntity = CLValueParsers.fromBytes(uint8bytes, clType).unwrap(); + return Ok(clEntity as CLValue); + } + + static fromBytes( + bytes: Uint8Array, + type: CLType + ): Result { + const parser = matchByteParserByCLType(type).unwrap(); + return parser.fromBytes(bytes, type); + } + + static toJSON(value: CLValue): Result { + const rawBytes = CLValueParsers.toBytes(value).unwrap(); + const bytes = encodeBase16(rawBytes); + const clType = value.clType().toJSON(); + return Ok({ bytes: bytes, cl_type: clType }); + } + + static toBytes(value: CLValue): ToBytesResult { + const parser = matchByteParserByCLType(value.clType()).unwrap(); + return parser.toBytes(value); + } + + static toBytesWithType(value: CLValue): Result { + const clTypeBytes = value.clType().toBytes(); + const parser = matchByteParserByCLType(value.clType()).unwrap(); + const bytes = parser.toBytes(value).unwrap(); + const result = concat([toBytesArrayU8(bytes), clTypeBytes]); + return Ok(result); + } + + static fromBytesWithType( + rawBytes: Uint8Array + ): Result { + const { + result: CLU32res, + remainder: CLU32rem + } = new CLU32BytesParser().fromBytesWithRemainder(rawBytes); + + const length = CLU32res.unwrap() + .value() + .toNumber(); + + if (!CLU32rem) { + return Err(CLErrorCodes.EarlyEndOfStream); + } + const valueBytes = CLU32rem.subarray(0, length); + const typeBytes = CLU32rem.subarray(length); + const { result: clType } = matchBytesToCLType(typeBytes); + + const parser = matchByteParserByCLType(clType.unwrap()).unwrap(); + + const clValue = parser.fromBytes(valueBytes, clType.unwrap()).unwrap(); + + return Ok(clValue as CLValue); + } +} + +export abstract class CLValueBytesParsers { + fromBytes( + bytes: Uint8Array, + innerType: CLType + ): Result { + const { result, remainder } = this.fromBytesWithRemainder(bytes, innerType); + if (remainder && remainder.length) { + return Err(CLErrorCodes.LeftOverBytes); + } + return result; + } + + abstract fromBytesWithRemainder( + bytes: Uint8Array, + innerType?: CLType + ): ResultAndRemainder; + + abstract toBytes(val: CLValue): ToBytesResult; +} diff --git a/src/lib/CLValue/AccountHash.test.ts b/src/lib/CLValue/AccountHash.test.ts new file mode 100644 index 000000000..55bf7caa6 --- /dev/null +++ b/src/lib/CLValue/AccountHash.test.ts @@ -0,0 +1,20 @@ +import { expect } from 'chai'; +import { CLAccountHash } from './AccountHash'; + +describe('CLAccountHash', () => { + it('Should be able to return proper value by calling .value()', () => { + const arr8 = new Uint8Array([21, 31]); + const myHash = new CLAccountHash(arr8); + + expect(myHash.value()).to.be.deep.eq(arr8); + }); + + // it('toBytes() / fromBytes() do proper bytes serialization', () => { + // const expectedBytes = Uint8Array.from(Array(32).fill(42)); + // const hash = new CLAccountHash(expectedBytes); + // const fromBytes= CLAccountHash.fromBytesWithRemainder(expectedBytes).result.unwrap(); + + // expect(hash.toBytes().unwrap()).to.deep.eq(expectedBytes); + // expect(fromBytes).to.deep.eq(hash); + // }); +}); diff --git a/src/lib/CLValue/AccountHash.ts b/src/lib/CLValue/AccountHash.ts new file mode 100644 index 000000000..55d5a1050 --- /dev/null +++ b/src/lib/CLValue/AccountHash.ts @@ -0,0 +1,68 @@ +// NOTE: Currently this isn't supported CLValue +// Don't export it outside internal code! + +import { Ok, Err } from 'ts-results'; + +import { + CLValue, + CLValueBytesParsers, + CLType, + CLErrorCodes, + ResultAndRemainder, + ToBytesResult, + ACCOUNT_HASH_LENGTH, + resultHelper +} from './index'; + +export class CLAccountHashType extends CLType { + linksTo = CLAccountHash; + tag = -1; + + toString(): string { + return 'AccountHash (Not Supported as CLValue)'; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLAccountHashBytesParser extends CLValueBytesParsers { + toBytes(value: CLAccountHash): ToBytesResult { + return Ok(value.data); + } + + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length < ACCOUNT_HASH_LENGTH) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + + const accountHashBytes = bytes.subarray(0, ACCOUNT_HASH_LENGTH); + const accountHash = new CLAccountHash(accountHashBytes); + return resultHelper(Ok(accountHash)); + } +} + +/** A cryptographic public key. */ +export class CLAccountHash extends CLValue { + data: Uint8Array; + /** + * Constructs a new `AccountHash`. + * + * @param v The bytes constituting the public key. + */ + constructor(v: Uint8Array) { + super(); + this.data = v; + } + + clType(): CLType { + return new CLAccountHashType(); + } + + value(): Uint8Array { + return this.data; + } +} diff --git a/src/lib/CLValue/Bool.test.ts b/src/lib/CLValue/Bool.test.ts new file mode 100644 index 000000000..25a7d0769 --- /dev/null +++ b/src/lib/CLValue/Bool.test.ts @@ -0,0 +1,69 @@ +import { expect } from 'chai'; +import { + CLValueBuilder, + CLValueParsers, + CLBool, + CLBoolType, + CLErrorCodes +} from './index'; + +describe('CLBool', () => { + it('Bool should return proper clType', () => { + const myBool = new CLBool(false); + const clType = myBool.clType(); + expect(clType.toString()).to.be.eq('Bool'); + }); + + it('Should be able to return proper value by calling .value()', () => { + const myBool = new CLBool(false); + const myBool2 = new CLBool(true); + + expect(myBool.value()).to.be.eq(false); + expect(myBool2.value()).to.be.eq(true); + }); + + it('toBytes() / fromBytes() do proper bytes serialization', () => { + const myBool = CLValueBuilder.bool(false); + const myBool2 = new CLBool(true); + const myBoolBytes = CLValueParsers.toBytes(myBool).unwrap(); + const myBool2Bytes = CLValueParsers.toBytes(myBool2).unwrap(); + + const fromBytes1 = CLValueParsers.fromBytes( + myBoolBytes, + new CLBoolType() + ).unwrap(); + const fromBytes2 = CLValueParsers.fromBytes( + myBool2Bytes, + new CLBoolType() + ).unwrap(); + + expect(myBoolBytes).to.be.deep.eq(Uint8Array.from([0])); + expect(myBool2Bytes).to.be.deep.eq(Uint8Array.from([1])); + + expect(fromBytes1).to.be.deep.eq(myBool); + expect(fromBytes2).to.be.deep.eq(myBool2); + expect( + CLValueParsers.fromBytes(Uint8Array.from([9, 1]), new CLBoolType()).ok + ).to.be.eq(false); + expect( + CLValueParsers.fromBytes(Uint8Array.from([9, 1]), new CLBoolType()).val + ).to.be.eq(CLErrorCodes.Formatting); + expect( + CLValueParsers.fromBytes(Uint8Array.from([]), new CLBoolType()).ok + ).to.be.eq(false); + expect( + CLValueParsers.fromBytes(Uint8Array.from([]), new CLBoolType()).val + ).to.be.eq(CLErrorCodes.EarlyEndOfStream); + }); + + it('toJSON() / fromJSON() do proper bytes serialization', () => { + const myBool = new CLBool(false); + const json = CLValueParsers.toJSON(myBool).unwrap(); + const expectedJson = JSON.parse('{"bytes":"00","cl_type":"Bool"}'); + + expect(json).to.be.deep.eq(expectedJson); + expect(CLValueParsers.fromJSON(expectedJson).unwrap()).to.be.deep.eq( + myBool + ); + }); +}); diff --git a/src/lib/CLValue/Bool.ts b/src/lib/CLValue/Bool.ts new file mode 100644 index 000000000..ff027e456 --- /dev/null +++ b/src/lib/CLValue/Bool.ts @@ -0,0 +1,79 @@ +import { Ok, Err } from 'ts-results'; + +import { + CLType, + CLValue, + ResultAndRemainder, + ToBytesResult, + CLErrorCodes, + resultHelper, + CLValueBytesParsers +} from './index'; +import { BOOL_ID, CLTypeTag } from './constants'; + +export class CLBoolType extends CLType { + linksTo = CLBool; + tag = CLTypeTag.Bool; + + toString(): string { + return BOOL_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLBoolBytesParser extends CLValueBytesParsers { + toBytes(value: CLBool): ToBytesResult { + return Ok(new Uint8Array([value.value() ? 1 : 0])); + } + + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length === 0) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + if (bytes[0] === 1) { + return resultHelper(Ok(new CLBool(true)), bytes.subarray(1)); + } else if (bytes[0] === 0) { + return resultHelper(Ok(new CLBool(false)), bytes.subarray(1)); + } else { + return resultHelper(Err(CLErrorCodes.Formatting)); + } + } +} + +export class CLBool extends CLValue { + data: boolean; + bytesParser: CLBoolBytesParser; + + constructor(v: boolean) { + super(); + this.data = v; + } + + clType(): CLType { + return new CLBoolType(); + } + + value(): boolean { + return this.data; + } + + static fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length === 0) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + if (bytes[0] === 1) { + return resultHelper(Ok(new CLBool(true)), bytes.subarray(1)); + } else if (bytes[0] === 0) { + return resultHelper(Ok(new CLBool(false)), bytes.subarray(1)); + } else { + return resultHelper(Err(CLErrorCodes.Formatting)); + } + } +} diff --git a/src/lib/CLValue/Builders.ts b/src/lib/CLValue/Builders.ts new file mode 100644 index 000000000..e653550fa --- /dev/null +++ b/src/lib/CLValue/Builders.ts @@ -0,0 +1,226 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { Option } from 'ts-results'; + +import { + CLValue, + CLType, + CLBool, + CLBoolType, + CLU8, + CLU8Type, + CLU32, + CLU32Type, + CLU64, + CLU64Type, + CLU128, + CLU128Type, + CLU256, + CLU256Type, + CLU512, + CLU512Type, + CLI32, + CLI32Type, + CLI64, + CLI64Type, + CLKey, + CLKeyType, + CLKeyParameters, + CLUnit, + CLUnitType, + CLString, + CLStringType, + CLURef, + CLURefType, + AccessRights, + CLPublicKey, + CLPublicKeyType, + CLPublicKeyTag, + CLList, + CLListType, + CLTuple1, + CLTuple1Type, + CLTuple2, + CLTuple2Type, + CLTuple3, + CLTuple3Type, + CLOption, + CLOptionType, + CLMap, + CLMapType, + CLByteArray, + CLByteArrayType +} from './index'; + +export class CLTypeBuilder { + static bool = (): CLBoolType => { + return new CLBoolType(); + }; + + static u8 = (): CLU8Type => { + return new CLU8Type(); + }; + + static u32 = (): CLU32Type => { + return new CLU32Type(); + }; + + static i32 = (): CLI32Type => { + return new CLI32Type(); + }; + + static u64 = (): CLU64Type => { + return new CLU64Type(); + }; + + static i64 = (): CLI64Type => { + return new CLI64Type(); + }; + + static u128 = (): CLU128Type => { + return new CLU128Type(); + }; + + static u256 = (): CLU256Type => { + return new CLU256Type(); + }; + + static u512 = (): CLU512Type => { + return new CLU512Type(); + }; + + static unit = (): CLUnitType => { + return new CLUnitType(); + }; + + static string = (): CLStringType => { + return new CLStringType(); + }; + + static key = (): CLKeyType => { + return new CLKeyType(); + }; + + static uref = (): CLURefType => { + return new CLURefType(); + }; + + static list(val: T): CLListType { + return new CLListType(val); + } + + static tuple1([t0]: [CLType]): CLTuple1Type { + return new CLTuple1Type([t0]); + } + + static tuple2([t0, t1]: [CLType, CLType]): CLTuple2Type { + return new CLTuple2Type([t0, t1]); + } + + static tuple3([t0, t1, t2]: [CLType, CLType, CLType]): CLTuple3Type { + return new CLTuple3Type([t0, t1, t2]); + } + + static option(type: T): CLOptionType { + return new CLOptionType(type); + } + + static map(val: [K, V]): CLMapType { + return new CLMapType(val); + } + + static publicKey(): CLPublicKeyType { + return new CLPublicKeyType(); + } + + static byteArray(size: number): CLByteArrayType { + return new CLByteArrayType(size); + } +} + +export class CLValueBuilder { + static bool = (val: boolean): CLBool => { + return new CLBool(val); + }; + + static u8 = (val: BigNumberish): CLU8 => { + return new CLU8(val); + }; + + static u32 = (val: BigNumberish): CLU32 => { + return new CLU32(val); + }; + + static i32 = (val: BigNumberish): CLI32 => { + return new CLI32(val); + }; + + static u64 = (val: BigNumberish): CLU64 => { + return new CLU64(val); + }; + + static i64 = (val: BigNumberish): CLI64 => { + return new CLI64(val); + }; + + static u128 = (val: BigNumberish): CLU128 => { + return new CLU128(val); + }; + + static u256 = (val: BigNumberish): CLU256 => { + return new CLU256(val); + }; + + static u512 = (val: BigNumberish): CLU512 => { + return new CLU512(val); + }; + + static unit = (): CLUnit => { + return new CLUnit(); + }; + + static string = (val: string): CLString => { + return new CLString(val); + }; + + static key = (val: CLKeyParameters): CLKey => { + return new CLKey(val); + }; + + static uref = (val: Uint8Array, accessRights: AccessRights): CLURef => { + return new CLURef(val, accessRights); + }; + + static list(val: T[]): CLList { + return new CLList(val); + } + + static tuple1([t0]: [CLValue]): CLTuple1 { + return new CLTuple1([t0]); + } + + static tuple2([t0, t1]: [CLValue, CLValue]): CLTuple2 { + return new CLTuple2([t0, t1]); + } + + static tuple3([t0, t1, t2]: [CLValue, CLValue, CLValue]): CLTuple3 { + return new CLTuple3([t0, t1, t2]); + } + + static option(data: Option, innerType?: CLType): CLOption { + return new CLOption(data, innerType); + } + + static map( + val: [K, V][] | [CLType, CLType] + ): CLMap { + return new CLMap(val); + } + + static publicKey(rawPublicKey: Uint8Array, tag: CLPublicKeyTag): CLPublicKey { + return new CLPublicKey(rawPublicKey, tag); + } + + static byteArray(bytes: Uint8Array): CLByteArray { + return new CLByteArray(bytes); + } +} diff --git a/src/lib/CLValue/ByteArray.test.ts b/src/lib/CLValue/ByteArray.test.ts new file mode 100644 index 000000000..b5e7e3575 --- /dev/null +++ b/src/lib/CLValue/ByteArray.test.ts @@ -0,0 +1,53 @@ +import { expect } from 'chai'; +import { CLByteArray, CLByteArrayType, CLValueParsers } from './index'; + +describe('CLByteArray', () => { + it('Should be able to return proper value by calling .value()', () => { + const arr8 = new Uint8Array([21, 31]); + const myHash = new CLByteArray(arr8); + + expect(myHash.value()).to.be.deep.eq(arr8); + }); + + it('Should be able to return proper value by calling .clType()', () => { + const arr8 = new Uint8Array([21, 31]); + const myHash = new CLByteArray(arr8); + + expect(myHash.clType().toString()).to.be.eq('ByteArray'); + }); + + it('Should be able to return proper byte array by calling toBytes() / fromBytes()', () => { + const expectedBytes = Uint8Array.from(Array(32).fill(42)); + const hash = new CLByteArray(expectedBytes); + const bytes = CLValueParsers.toBytes(hash).unwrap(); + + expect(bytes).to.deep.eq(expectedBytes); + expect( + CLValueParsers.fromBytes(bytes, new CLByteArrayType(32)).unwrap() + ).to.deep.eq(hash); + }); + + it('toJson() / fromJson()', () => { + const bytes = Uint8Array.from(Array(32).fill(42)); + const hash = new CLByteArray(bytes); + const json = CLValueParsers.toJSON(hash).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a","cl_type":{"ByteArray":32}}' + ); + + expect(json).to.deep.eq(expectedJson); + expect(CLValueParsers.fromJSON(expectedJson).unwrap()).to.deep.eq(hash); + }); + + it('fromJSON() with length more than 32 bytes', () => { + const json = { + bytes: + '7f8d377b97dc7fbf3a777f5ae75eb6edbe79739df9d747f86bbf3b7f7efcd37d7a7b475c7fcefb6f8d3cd7dedcf1a6bd', + cl_type: { ByteArray: 48 } + }; + + const parsed = CLValueParsers.fromJSON(json).unwrap(); + + expect(CLValueParsers.toJSON(parsed).unwrap()).to.deep.eq(json); + }); +}); diff --git a/src/lib/CLValue/ByteArray.ts b/src/lib/CLValue/ByteArray.ts new file mode 100644 index 000000000..c28c81f04 --- /dev/null +++ b/src/lib/CLValue/ByteArray.ts @@ -0,0 +1,77 @@ +import { Ok } from 'ts-results'; +import { concat } from '@ethersproject/bytes'; + +import { + CLType, + CLValue, + ToBytesResult, + CLValueBytesParsers, + CLErrorCodes, + ResultAndRemainder, + resultHelper +} from './index'; +import { BYTE_ARRAY_ID, CLTypeTag } from './constants'; +import { toBytesU32 } from '../ByteConverters'; + +export const CL_BYTE_ARRAY_MAX_LENGTH = 32; + +export class CLByteArrayType extends CLType { + linksTo = CLByteArray; + tag = CLTypeTag.ByteArray; + + size: number; + + constructor(size: number) { + super(); + this.size = size; + } + + toString(): string { + return BYTE_ARRAY_ID; + } + + toBytes(): Uint8Array { + return concat([Uint8Array.from([this.tag]), toBytesU32(this.size)]); + } + + toJSON(): { [BYTE_ARRAY_ID]: number } { + return { + [BYTE_ARRAY_ID]: this.size + }; + } +} + +export class CLByteArrayBytesParser extends CLValueBytesParsers { + toBytes(value: CLByteArray): ToBytesResult { + return Ok(value.data); + } + + fromBytesWithRemainder( + bytes: Uint8Array, + type: CLByteArrayType + ): ResultAndRemainder { + const byteArray = new CLByteArray(bytes.subarray(0, type.size)); + return resultHelper(Ok(byteArray), bytes.subarray(type.size)); + } +} + +export class CLByteArray extends CLValue { + data: Uint8Array; + /** + * Constructs a new `CLByteArray`. + * + * @param v The bytes array with max length 32. + */ + constructor(v: Uint8Array) { + super(); + this.data = v; + } + + clType(): CLType { + return new CLByteArrayType(this.data.length); + } + + value(): Uint8Array { + return this.data; + } +} diff --git a/src/lib/CLValue/Key.test.ts b/src/lib/CLValue/Key.test.ts new file mode 100644 index 000000000..713a7b1df --- /dev/null +++ b/src/lib/CLValue/Key.test.ts @@ -0,0 +1,181 @@ +import { expect } from 'chai'; +import { + CLValueParsers, + CLKey, + CLKeyType, + CLURef, + AccessRights, + CLAccountHash, + CLByteArray +} from './index'; // CLURef, CLAccountHash } from './index'; +import { decodeBase16 } from '../../index'; + +describe('CLKey', () => { + const urefAddr = + '2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a'; + + it('Create with (CLByteArray) and test .value() / isHash()', () => { + const byteArr = new CLByteArray(new Uint8Array([21, 31])); + const myKey = new CLKey(byteArr); + + expect(myKey.value()).to.be.deep.eq(byteArr); + expect(myKey.isHash()).to.be.eq(true); + }); + + it('Create with (CLUref) and test .value() / isURef()', () => { + const uref = new CLURef( + decodeBase16(urefAddr), + AccessRights.READ_ADD_WRITE + ); + const myKey = new CLKey(uref); + expect(myKey.value()).to.deep.eq(uref); + expect(myKey.isURef()).to.be.eq(true); + }); + + it('Create with (CLAccountHash) and test .value() isAccount()', () => { + const arr8 = new Uint8Array([21, 31]); + const myHash = new CLAccountHash(arr8); + const myKey = new CLKey(myHash); + expect(myKey.value()).to.deep.eq(myHash); + expect(myKey.isAccount()).to.be.eq(true); + }); + + it('toBytes() / fromBytes() with CLByteArray', () => { + const arr8 = Uint8Array.from(Array(32).fill(42)); + const byteArr = new CLByteArray(arr8); + const expectedBytes = Uint8Array.from([ + 1, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42, + 42 + ]); + const myKey = new CLKey(byteArr); + const bytes = CLValueParsers.toBytes(myKey).unwrap(); + const fromExpectedBytes = CLValueParsers.fromBytes( + bytes, + new CLKeyType() + ).unwrap(); + expect(bytes).to.be.deep.eq(expectedBytes); + expect(fromExpectedBytes).to.be.deep.eq(myKey); + }); + + it('toBytes() / fromBytes() with CLAccountHash', () => { + const hash = new CLAccountHash(Uint8Array.from(Array(32).fill(42))); + const expectedBytes = Uint8Array.from([0, ...Array(32).fill(42)]); + const myKey = new CLKey(hash); + const bytes = CLValueParsers.toBytes(myKey).unwrap(); + const fromExpectedBytes = CLValueParsers.fromBytes( + bytes, + new CLKeyType() + ).unwrap(); + expect(bytes).to.be.deep.eq(expectedBytes); + expect(fromExpectedBytes).to.be.deep.eq(myKey); + }); + + it('toJSON() / fromJSON() with CLByteArray', () => { + const byteArr = new CLByteArray(new Uint8Array([21, 31])); + const myKey = new CLKey(byteArr); + const json = CLValueParsers.toJSON(myKey).unwrap(); + const expectedJson = JSON.parse('{"bytes":"01151f","cl_type":"Key"}'); + + const fromJson = CLValueParsers.fromJSON(expectedJson).unwrap(); + + expect(json).to.be.deep.eq(expectedJson); + expect(fromJson).to.be.deep.eq(myKey); + }); + + it('toJSON() / fromJSON() with CLAccountHash', () => { + const hash = new CLAccountHash(Uint8Array.from(Array(32).fill(42))); + const myKey = new CLKey(hash); + const json = CLValueParsers.toJSON(myKey).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"002a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a","cl_type":"Key"}' + ); + + const fromJson = CLValueParsers.fromJSON(expectedJson).unwrap(); + + expect(json).to.be.deep.eq(expectedJson); + expect(fromJson).to.be.deep.eq(myKey); + }); + + it('toBytes() / fromBytes() with CLURef', () => { + const urefAddr = + '2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a'; + const truth = decodeBase16( + '022a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a07' + ); + const uref = new CLURef( + decodeBase16(urefAddr), + AccessRights.READ_ADD_WRITE + ); + const myKey = new CLKey(uref); + const bytes = CLValueParsers.toBytes(myKey).unwrap(); + const fromExpectedBytes = CLValueParsers.fromBytes( + bytes, + new CLKeyType() + ).unwrap(); + expect(bytes).to.deep.eq(truth); + expect(fromExpectedBytes).deep.eq(myKey); + }); + + it('toJSON() / fromJSON() with CLUref', () => { + const urefAddr = + '2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a'; + const uref = new CLURef( + decodeBase16(urefAddr), + AccessRights.READ_ADD_WRITE + ); + const myKey = new CLKey(uref); + const json = CLValueParsers.toJSON(myKey).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"022a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a07","cl_type":"Key"}' + ); + + const fromJson = CLValueParsers.fromJSON(expectedJson).unwrap(); + + expect(fromJson).to.be.deep.eq(myKey); + expect(json).to.be.deep.eq(expectedJson); + }); + + it('toBytes() with invalid data', () => { + // @ts-ignore + const badFn = () => CLValueParsers.toBytes(new CLKey([1, 2, 3])); + expect(badFn).to.throw('Unknown byte types'); + }); + + it('Should be able to return proper value by calling .clType()', () => { + const arr8 = new CLByteArray(new Uint8Array([21, 31])); + const myKey = new CLKey(arr8); + + expect(myKey.clType().toString()).to.be.eq('Key'); + }); +}); diff --git a/src/lib/CLValue/Key.ts b/src/lib/CLValue/Key.ts new file mode 100644 index 000000000..8c96d4dce --- /dev/null +++ b/src/lib/CLValue/Key.ts @@ -0,0 +1,155 @@ +// NOTE: Revisit in future based on https://docs.rs/casper-types/1.0.1/casper_types/enum.Key.html + +import { concat } from '@ethersproject/bytes'; +import { Ok, Err } from 'ts-results'; + +import { + CLType, + CLValue, + CLByteArray, + CLByteArrayType, + CLByteArrayBytesParser, + CLURef, + CLURefBytesParser, + CLAccountHash, + CLAccountHashBytesParser, + CLErrorCodes, + KeyVariant, + ResultAndRemainder, + ToBytesResult, + CLValueBytesParsers, + CLValueParsers, + resultHelper +} from './index'; +import { KEY_ID, CLTypeTag } from './constants'; + +const HASH_LENGTH = 32; + +export class CLKeyType extends CLType { + linksTo = CLKey; + tag = CLTypeTag.Key; + + toString(): string { + return KEY_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLKeyBytesParser extends CLValueBytesParsers { + toBytes(value: CLKey): ToBytesResult { + if (value.isAccount()) { + return Ok( + concat([ + Uint8Array.from([KeyVariant.Account]), + new CLAccountHashBytesParser() + .toBytes(value.data as CLAccountHash) + .unwrap() + ]) + ); + } + if (value.isHash()) { + return Ok( + concat([ + Uint8Array.from([KeyVariant.Hash]), + new CLByteArrayBytesParser() + .toBytes(value.data as CLByteArray) + .unwrap() + ]) + ); + } + if (value.isURef()) { + return Ok( + concat([ + Uint8Array.from([KeyVariant.URef]), + CLValueParsers.toBytes(value.data as CLURef).unwrap() + ]) + ); + } + + throw new Error('Unknown byte types'); + } + + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length < 1) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + + const tag = bytes[0]; + + if (tag === KeyVariant.Hash) { + const hashBytes = bytes.subarray(1); + const { + result: hashResult, + remainder: hashRemainder + } = new CLByteArrayBytesParser().fromBytesWithRemainder( + hashBytes, + new CLByteArrayType(HASH_LENGTH) + ); + const hash = hashResult.unwrap(); + const key = new CLKey(hash); + return resultHelper(Ok(key), hashRemainder); + } else if (tag === KeyVariant.URef) { + const { + result: urefResult, + remainder: urefRemainder + } = new CLURefBytesParser().fromBytesWithRemainder(bytes.subarray(1)); + if (urefResult.ok) { + const key = new CLKey(urefResult.val); + return resultHelper(Ok(key), urefRemainder); + } else { + return resultHelper(Err(urefResult.val)); + } + } else if (tag === KeyVariant.Account) { + const { + result: accountHashResult, + remainder: accountHashRemainder + } = new CLAccountHashBytesParser().fromBytesWithRemainder( + bytes.subarray(1) + ); + if (accountHashResult.ok) { + const key = new CLKey(accountHashResult.val); + return resultHelper(Ok(key), accountHashRemainder); + } else { + return resultHelper(Err(accountHashResult.val)); + } + } else { + return resultHelper(Err(CLErrorCodes.Formatting)); + } + } +} + +export type CLKeyParameters = CLByteArray | CLURef | CLAccountHash; + +export class CLKey extends CLValue { + data: CLKeyParameters; + + constructor(v: CLKeyParameters) { + super(); + this.data = v; + } + + clType(): CLType { + return new CLKeyType(); + } + + value(): CLKeyParameters { + return this.data; + } + + isHash(): boolean { + return this.data instanceof CLByteArray; + } + + isURef(): boolean { + return this.data instanceof CLURef; + } + + isAccount(): boolean { + return this.data instanceof CLAccountHash; + } +} diff --git a/src/lib/CLValue/List.test.ts b/src/lib/CLValue/List.test.ts new file mode 100644 index 000000000..ea9730a3f --- /dev/null +++ b/src/lib/CLValue/List.test.ts @@ -0,0 +1,264 @@ +import { expect } from 'chai'; +import { + CLValueParsers, + CLList, + CLListType, + CLBool, + CLBoolType, + CLStringType, + CLU8, + CLI32, + CLI32Type, + CLKey, + CLByteArray +} from './index'; + +describe('CLValue List implementation', () => { + it('List should return proper clType', () => { + const myBool = new CLBool(false); + const myList = new CLList([myBool]); + + expect(myList.clType().toString()).to.be.eq('List (Bool)'); + }); + + it('Should be able to create List with proper values - correct by construction', () => { + const myList = new CLList([new CLBool(true), new CLBool(false)]); + + expect(myList).to.be.an.instanceof(CLList); + }); + + it('Should throw an error when list is not correct by construction', () => { + const badFn = () => + new CLList([new CLBool(true), new CLList([new CLBool(false)])]); + + expect(badFn).to.throw('Invalid data provided.'); + }); + + it('Should throw an error when list is not correct by construction', () => { + // @ts-ignore + const badFn = () => new CLList([1, 2, 3]); + + expect(badFn).to.throw('Invalid data type(s) provided.'); + }); + + it('Should be able to return proper values by calling .value() on List', () => { + const myBool = new CLBool(false); + const myList = new CLList([myBool]); + + expect(myList.value()).to.be.deep.eq([myBool]); + }); + + it('Get on non existing index should throw an error', () => { + const mList = new CLList(new CLBoolType()); + const badFn = () => mList.get(100); + + expect(badFn).to.throw('List index out of bounds.'); + }); + + it('Should able to create empty List by providing type', () => { + const mList = new CLList(new CLBoolType()); + const len = mList.size(); + const badFn = () => mList.push(new CLU8(10)); + + expect(len).to.equal(0); + expect(badFn).to.throw('Incosnsistent data type, use Bool.'); + }); + + it('Get should return proper value', () => { + const myList = new CLList([new CLBool(true)]); + const newItem = new CLBool(false); + + myList.push(newItem); + + expect(myList.get(1)).to.deep.eq(newItem); + }); + + it('Set should be able to set values at already declared indexes', () => { + const myList = new CLList([new CLBool(true)]); + const newItem = new CLBool(false); + + myList.set(0, newItem); + + expect(myList.get(0)).to.deep.eq(newItem); + }); + + it('Set should throw error on wrong indexes', () => { + const myList = new CLList([new CLBool(true)]); + const badFn = () => myList.set(1, new CLBool(false)); + + expect(badFn).to.throw('List index out of bounds.'); + }); + + it('Push should be consistent with types', () => { + const myList = new CLList([new CLBool(true)]); + + myList.push(new CLBool(false)); + + // @ts-ignore + const badFn = () => myList.push(new CLList([new CLBool(false)])); + + expect(myList.size()).to.equal(2); + expect(badFn).to.throw('Incosnsistent data type, use Bool.'); + }); + + it('Pop should remove last item from array and return it', () => { + const myList = new CLList([new CLBool(true), new CLBool(false)]); + const popped = myList.pop(); + + expect(myList.size()).to.equal(1); + expect(popped).to.deep.equal(new CLBool(false)); + }); + + it('Pop on empty list returns undefined', () => { + const mList = new CLList(new CLBoolType()); + + expect(mList.pop()).to.equal(undefined); + }); + + it('Should set nested value by chaining methods', () => { + const myList = new CLList([ + new CLList([new CLBool(true), new CLBool(false)]) + ]); + + myList.get(0).set(1, new CLBool(true)); + + expect(myList.get(0).get(1)).to.deep.eq(new CLBool(true)); + }); + + it('Remove should remove item at certein index', () => { + const myList = new CLList([new CLBool(true), new CLBool(false)]); + + myList.remove(0); + + expect(myList.get(0)).to.deep.eq(new CLBool(false)); + }); + + it('toBytes() / fromBytes()', () => { + const myList = new CLList([new CLBool(false)]); + const expected = Uint8Array.from([1, 0, 0, 0, 0]); + const bytes = CLValueParsers.toBytes(myList).unwrap(); + const fromBytes = CLValueParsers.fromBytes( + expected, + new CLListType(new CLBoolType()) + ).unwrap(); + + expect(bytes).to.deep.eq(expected); + expect(fromBytes).to.deep.eq(myList); + }); + + it('toBytes() / fromBytes()', () => { + const myList = new CLList([new CLBool(false), new CLBool(true)]); + const bytes = CLValueParsers.toBytes(myList).unwrap(); + const listType = new CLListType(new CLBoolType()); + const fromBytes = CLValueParsers.fromBytes(bytes, listType).unwrap(); + + expect(fromBytes).to.be.deep.eq(myList); + }); + + it('Runs fromBytes properly', () => { + const myList = new CLList([new CLI32(100000), new CLI32(-999)]); + const bytes = CLValueParsers.toBytes(myList).unwrap(); + const listType = new CLListType(new CLI32Type()); + const fromBytes = CLValueParsers.fromBytes(bytes, listType).unwrap(); + + expect(fromBytes).to.be.deep.eq(myList); + }); + + it('Runs toJSON() / fromJSON() on empty list', () => { + const myList = new CLList(new CLStringType()); + + const json = CLValueParsers.toJSON(myList).unwrap(); + + const expectedJson = JSON.parse( + '{"bytes":"00000000","cl_type":{"List": "String" }}' + ); + + const newList1 = CLValueParsers.fromJSON(json).unwrap(); + const newList2 = CLValueParsers.fromJSON(expectedJson).unwrap(); + + expect(json).to.be.deep.eq(expectedJson); + expect(newList1).to.be.deep.eq(myList); + expect(newList2).to.be.deep.eq(myList); + }); + + it('Runs toJSON() / fromJSON() properly', () => { + const myList = new CLList([ + new CLList([new CLBool(true), new CLBool(false)]), + new CLList([new CLBool(false)]) + ]); + + const json = CLValueParsers.toJSON(myList).unwrap(); + const newList = CLValueParsers.fromJSON(json).unwrap(); + + const expectedJson = JSON.parse( + '{"bytes":"020000000200000001000100000000","cl_type":{"List":{"List":"Bool"}}}' + ); + const newList2 = CLValueParsers.fromJSON(expectedJson).unwrap(); + + expect(json).to.be.deep.eq(expectedJson); + expect(newList).to.be.deep.eq(myList); + expect(newList2).to.be.deep.eq(myList); + }); + + it('Runs toJSON() / fromJSON() properly', () => { + const clKey = new CLKey( + new CLByteArray( + Uint8Array.from([ + 48, + 17, + 103, + 38, + 142, + 192, + 14, + 235, + 126, + 223, + 125, + 18, + 217, + 65, + 153, + 33, + 225, + 93, + 189, + 123, + 20, + 94, + 69, + 77, + 148, + 84, + 10, + 169, + 28, + 38, + 14, + 219 + ]) + ) + ); + const myList = new CLList([clKey, clKey, clKey]); + + const json = CLValueParsers.toJSON(myList).unwrap(); + const newList = CLValueParsers.fromJSON(json).unwrap(); + + expect(newList).to.be.deep.eq(myList); + }); + + it('toBytesWithCLType() / fromBytesWithCLType()', () => { + const myList = new CLList([ + new CLList([new CLBool(true), new CLBool(false)]), + new CLList([new CLBool(false)]) + ]); + + const bytesWithCLType = CLValueParsers.toBytesWithType(myList).unwrap(); + + const fromBytes = CLValueParsers.fromBytesWithType( + bytesWithCLType + ).unwrap(); + + expect(fromBytes).to.be.deep.eq(myList); + }); +}); diff --git a/src/lib/CLValue/List.ts b/src/lib/CLValue/List.ts new file mode 100644 index 000000000..5ea855444 --- /dev/null +++ b/src/lib/CLValue/List.ts @@ -0,0 +1,165 @@ +import { Ok, Err } from 'ts-results'; +import { concat } from '@ethersproject/bytes'; + +import { + CLValue, + CLType, + ToBytes, + CLErrorCodes, + resultHelper, + ResultAndRemainder, + ToBytesResult, + CLValueBytesParsers, + CLU32BytesParser, + matchByteParserByCLType +} from './index'; +import { toBytesVectorNew } from '../ByteConverters'; + +import { LIST_ID, CLTypeTag } from './constants'; + +export class CLListType extends CLType { + inner: T; + linksTo = CLList; + tag = CLTypeTag.List; + + constructor(inner: T) { + super(); + this.inner = inner; + } + + toString(): string { + return `${LIST_ID} (${this.inner.toString()})`; + } + + toBytes(): Uint8Array { + return concat([Uint8Array.from([this.tag]), this.inner.toBytes()]); + } + + toJSON(): any { + const inner = this.inner.toJSON(); + return { + [LIST_ID]: inner + }; + } +} + +export class CLListBytesParser extends CLValueBytesParsers { + toBytes(value: CLList): ToBytesResult { + // TODO: Change when there will not be any legacy code + return Ok(toBytesVectorNew(value.data)); + } + + fromBytesWithRemainder( + bytes: Uint8Array, + listType: CLListType + ): ResultAndRemainder, CLErrorCodes> { + const { + result: u32Res, + remainder: u32Rem + } = new CLU32BytesParser().fromBytesWithRemainder(bytes); + if (!u32Res.ok) { + return resultHelper(Err(u32Res.val)); + } + + const size = u32Res.val.value().toNumber(); + + const vec = []; + + let remainder = u32Rem; + + const parser = matchByteParserByCLType(listType.inner).unwrap(); + + for (let i = 0; i < size; i++) { + if (!remainder) return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + + const { result: vRes, remainder: vRem } = parser.fromBytesWithRemainder( + remainder, + listType.inner + ); + + if (!vRes.ok) { + return resultHelper(Err(vRes.val)); + } + vec.push(vRes.val); + remainder = vRem; + } + + // Support for creating empty lists from bytes + if (vec.length === 0) { + return resultHelper(Ok(new CLList(listType.inner)), remainder); + } + + return resultHelper(Ok(new CLList(vec)), remainder); + } +} + +export class CLList extends CLValue { + data: Array; + vectorType: CLType; + + constructor(v: Array | CLType) { + super(); + if (Array.isArray(v) && v[0].clType) { + const refType = v[0].clType(); + if ( + v.every(i => { + return i.clType().toString() === refType.toString(); + }) + ) { + this.data = v; + this.vectorType = refType; + } else { + throw Error('Invalid data provided.'); + } + } else if (v instanceof CLType) { + this.vectorType = v; + this.data = []; + } else { + throw Error('Invalid data type(s) provided.'); + } + } + + value(): Array { + return this.data; + } + + clType(): CLType { + return new CLListType(this.vectorType); + } + + get(index: number): T { + if (index >= this.data.length) { + throw new Error('List index out of bounds.'); + } + return this.data[index]; + } + + set(index: number, item: T): void { + if (index >= this.data.length) { + throw new Error('List index out of bounds.'); + } + this.data[index] = item; + } + + push(item: T): void { + if (item.clType().toString() === this.vectorType.toString()) { + this.data.push(item); + } else { + throw Error( + `Incosnsistent data type, use ${this.vectorType.toString()}.` + ); + } + } + + remove(index: number): void { + this.data.splice(index, 1); + } + + pop(): T | undefined { + return this.data.pop(); + } + + size(): number { + return this.data.length; + } +} diff --git a/src/lib/CLValue/Map.test.ts b/src/lib/CLValue/Map.test.ts new file mode 100644 index 000000000..5b7f8adcd --- /dev/null +++ b/src/lib/CLValue/Map.test.ts @@ -0,0 +1,151 @@ +import { expect } from 'chai'; +import { + CLValueParsers, + CLValueBuilder, + CLMap, + CLMapType, + CLBool, + CLString, + CLStringType, + CLI32, + CLI32Type +} from './index'; + +describe('CLValue CLMap implementation', () => { + it('Maps should return proper clType', () => { + const myMap = new CLMap([[new CLBool(true), new CLBool(false)]]); + + expect(myMap.clType().toString()).to.be.eq('Map (Bool: Bool)'); + }); + + it('Should be able to create Map with proper values - correct by construction', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(123); + const myMap = new CLMap([[myKey, myVal]]); + + expect(myMap).to.be.an.instanceof(CLMap); + expect(myMap).to.be.deep.eq(new CLMap([[myKey, myVal]])); + }); + + it('Should throw an error when CLMap is not correct by construction', () => { + const badFn = () => + new CLMap([ + [new CLString('ABC'), new CLI32(123)], + // @ts-ignore + [new CLString('DEF'), new CLBool(false)] + ]); + + expect(badFn).to.throw('Invalid data provided.'); + }); + + it('Should throw an error when CLMap is not correct by construction', () => { + const badFn = () => + // @ts-ignore + new CLMap([[new CLString('ABC'), 2]]); + + expect(badFn).to.throw('Invalid data type(s) provided.'); + }); + + it('Should be able to return proper values by calling .get() on Map', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + + expect(myMap.get(new CLString('ABC'))).to.be.deep.eq(new CLI32(10)); + }); + + it('Get() should return undefined on non-existing key', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + + expect(myMap.get(new CLString('DEF'))).to.be.deep.eq(undefined); + }); + + it('Should able to create empty Map by providing type', () => { + const myMap = new CLMap([new CLStringType(), new CLStringType()]); + const len = myMap.size(); + + expect(len).to.equal(0); + }); + + it('Set should be able to set values at already declared keys', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + const newVal = new CLI32(11); + + myMap.set(myKey, newVal); + + expect(myMap.get(new CLString('ABC'))).to.deep.eq(new CLI32(11)); + }); + + it('Set should be able to set values at already declared keys', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + + myMap.set(new CLString('ABC'), new CLI32(11)); + + expect(myMap.get(new CLString('ABC'))).to.deep.eq(new CLI32(11)); + expect(myMap.size()).to.eq(1); + }); + + it('Set should be able to set values at empty keys', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + + myMap.set(new CLString('DEF'), new CLI32(11)); + + expect(myMap.get(new CLString('DEF'))).to.deep.eq(new CLI32(11)); + expect(myMap.size()).to.eq(2); + }); + + it('Remove should remove key/value pair at already declared keys', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + + myMap.delete(new CLString('ABC')); + + expect(myMap.size()).to.eq(0); + }); + + it('fromBytes() / toBytes()', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + + const bytes = CLValueParsers.toBytes(myMap).unwrap(); + const mapType = new CLMapType([new CLStringType(), new CLI32Type()]); + const fromBytes = CLValueParsers.fromBytes(bytes, mapType).unwrap(); + + expect(fromBytes).to.be.deep.eq(myMap); + }); + + it('fromJSON() / toJSON()', () => { + const myKey = new CLString('ABC'); + const myVal = new CLI32(10); + const myMap = new CLMap([[myKey, myVal]]); + + const json = CLValueParsers.toJSON(myMap).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"01000000030000004142430a000000","cl_type":{"Map":{"key":"String","value":"I32"}}}' + ); + + const fromJson = CLValueParsers.fromJSON(expectedJson).unwrap(); + + expect(fromJson).to.be.deep.eq(myMap); + expect(json).to.be.deep.eq(expectedJson); + }); + + it('Tests maps created used CLValueBuilder', () => { + const myMap = CLValueBuilder.map([ + [CLValueBuilder.string('A'), CLValueBuilder.string('1')] + ]); + expect(myMap.get(CLValueBuilder.string('A'))).to.be.deep.eq( + CLValueBuilder.string('1') + ); + }); +}); diff --git a/src/lib/CLValue/Map.ts b/src/lib/CLValue/Map.ts new file mode 100644 index 000000000..90b8e6bc7 --- /dev/null +++ b/src/lib/CLValue/Map.ts @@ -0,0 +1,199 @@ +import { concat } from '@ethersproject/bytes'; +import { Ok, Err } from 'ts-results'; + +import { + CLType, + CLValue, + CLValueParsers, + CLErrorCodes, + resultHelper, + ResultAndRemainder, + ToBytesResult, + CLU32BytesParser, + CLValueBytesParsers, + matchByteParserByCLType +} from './index'; +import { MAP_ID, CLTypeTag } from './constants'; +import { toBytesU32 } from '../ByteConverters'; + +export interface MapEntryType { + key: CLType; + value: CLType; +} + +const isValueConstructor = ( + v: Array<[CLValue, CLValue]> | [CLType, CLType] +): v is Array<[CLValue, CLValue]> => { + return ( + Array.isArray(v) && + Array.isArray(v[0]) && + v[0].length === 2 && + !!v[0][0].clType && + !!v[0][1].clType + ); +}; + +type KeyVal = CLValue; + +export class CLMapType extends CLType { + tag = CLTypeTag.Map; + linksTo = CLMap; + + innerKey: K; + innerValue: V; + + constructor([keyType, valueType]: [K, V]) { + super(); + this.innerKey = keyType; + this.innerValue = valueType; + } + + toString(): string { + return `${MAP_ID} (${this.innerKey.toString()}: ${this.innerValue.toString()})`; + } + + toBytes(): Uint8Array { + return concat([ + Uint8Array.from([this.tag]), + this.innerKey.toBytes(), + this.innerValue.toBytes() + ]); + } + + toJSON(): any { + return { + [MAP_ID]: { + key: this.innerKey.toJSON(), + value: this.innerValue.toJSON() + } + }; + } +} + +export class CLMapBytesParser extends CLValueBytesParsers { + toBytes(value: CLMap): ToBytesResult { + const kvBytes: Uint8Array[] = Array.from(value.data).map(([key, value]) => { + const byteKey = CLValueParsers.toBytes(key).unwrap(); + const byteVal = CLValueParsers.toBytes(value).unwrap(); + return concat([byteKey, byteVal]); + }); + return Ok(concat([toBytesU32(value.data.length), ...kvBytes])); + } + + fromBytesWithRemainder( + bytes: Uint8Array, + mapType: CLMapType + ): ResultAndRemainder, CLErrorCodes> { + const { + result: u32Res, + remainder: u32Rem + } = new CLU32BytesParser().fromBytesWithRemainder(bytes); + + const size = u32Res + .unwrap() + .value() + .toNumber(); + const vec: [KeyVal, KeyVal][] = []; + + let remainder = u32Rem; + + if (size === 0) { + return resultHelper( + Ok(new CLMap([mapType.innerKey, mapType.innerValue])), + remainder + ); + } + + for (let i = 0; i < size; i++) { + if (!remainder) return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + + const keyParser = matchByteParserByCLType(mapType.innerKey).unwrap(); + const { + result: kRes, + remainder: kRem + } = keyParser.fromBytesWithRemainder(remainder, mapType.innerKey); + + const finalKey = kRes.unwrap(); + remainder = kRem; + + if (!remainder) return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + + const valParser = matchByteParserByCLType(mapType.innerValue).unwrap(); + const { + result: vRes, + remainder: vRem + } = valParser.fromBytesWithRemainder(remainder, mapType.innerValue); + + const finalValue = vRes.unwrap(); + remainder = vRem; + + vec.push([finalKey, finalValue]); + } + + return resultHelper(Ok(new CLMap(vec)), remainder); + } +} + +export class CLMap extends CLValue { + data: [K, V][]; + refType: [CLType, CLType]; + /** + * Constructs a new `MapValue`. + * + * @param v array [ key, value ] + */ + constructor(v: [K, V][] | [CLType, CLType]) { + super(); + if (isValueConstructor(v)) { + this.refType = [v[0][0].clType(), v[0][1].clType()]; + if ( + v.every(([key, value]) => { + return ( + key.clType().toString() === this.refType[0].toString() && + value.clType().toString() === this.refType[1].toString() + ); + }) + ) { + this.data = v; + } else { + throw Error('Invalid data provided.'); + } + } else if (v[0] instanceof CLType && v[1] instanceof CLType) { + this.refType = v; + this.data = []; + } else { + throw Error('Invalid data type(s) provided.'); + } + } + + clType(): CLType { + return new CLMapType(this.refType); + } + + value(): [K, V][] { + return this.data; + } + + get(k: K): V | undefined { + const result = this.data.find(d => d[0].value() === k.value()); + return result ? result[1] : undefined; + } + + set(k: K, val: V): void { + if (this.get(k)) { + this.data = this.data.map(d => + d[0].value() === k.value() ? [d[0], val] : d + ); + return; + } + this.data = [...this.data, [k, val]]; + } + + delete(k: K): void { + this.data = this.data.filter(d => d[0].value() !== k.value()); + } + + size(): number { + return this.data.length; + } +} diff --git a/src/lib/CLValue/Numeric.test.ts b/src/lib/CLValue/Numeric.test.ts new file mode 100644 index 000000000..de164b8a1 --- /dev/null +++ b/src/lib/CLValue/Numeric.test.ts @@ -0,0 +1,108 @@ +import { expect } from 'chai'; +import { + CLValueParsers, + CLI32, + CLI32Type, + CLI64, + CLI64Type, + CLU8, + CLU8Type, + CLU32, + CLU32Type, + CLU64, + CLU64Type, + CLU128 +} from './index'; + +const MAX_I64 = '9223372036854775807'; +const MAX_U8 = 255; +const MAX_U32 = 4294967295; +const MAX_U64 = '18446744073709551615'; + +describe('Numeric implementation tests', () => { + it('Numeric value() should return proper value', () => { + const num = new CLI32(10); + expect(num.value().toNumber()).to.be.eq(10); + }); + + it('Numeric clType() should return proper type', () => { + const num = new CLU128(20000); + expect(num.clType().toString()).to.be.eq('U128'); + }); + + it('Unsigned Numeric cant accept negative numbers in constructor', () => { + const badFn = () => new CLU128('-100'); + + expect(badFn).to.throw( + "Can't provide negative numbers with isSigned=false" + ); + }); + + it('CLI32 do proper toBytes()/fromBytes()', () => { + const num1 = new CLI32(-10); + const num1bytes = CLValueParsers.toBytes(num1).unwrap(); + + const num2 = new CLI32(1); + const num2bytes = CLValueParsers.toBytes(num2).unwrap(); + + expect( + CLValueParsers.fromBytes(num1bytes, new CLI32Type()).unwrap() + ).to.be.deep.eq(num1); + expect( + CLValueParsers.fromBytes(num2bytes, new CLI32Type()).unwrap() + ).to.be.deep.eq(num2); + }); + + it('CLI64 do proper toBytes()/fromBytes()', () => { + const num1 = new CLI64(-10); + const num1bytes = CLValueParsers.toBytes(num1).unwrap(); + + const num2 = new CLI64(MAX_I64); + const num2bytes = CLValueParsers.toBytes(num2).unwrap(); + + expect( + CLValueParsers.fromBytes(num1bytes, new CLI64Type()).unwrap() + ).to.be.deep.eq(num1); + expect( + CLValueParsers.fromBytes(num2bytes, new CLI64Type()).unwrap() + ).to.be.deep.eq(num2); + }); + + it('CLU8 do proper toBytes()/fromBytes()', () => { + const num1 = new CLU8(MAX_U8); + const num1bytes = CLValueParsers.toBytes(num1).unwrap(); + + expect( + CLValueParsers.fromBytes(num1bytes, new CLU8Type()).unwrap() + ).to.be.deep.eq(num1); + }); + + it('CLU32 do proper toBytes()/fromBytes()', () => { + const num1 = new CLU32(MAX_U32); + const num1bytes = CLValueParsers.toBytes(num1).unwrap(); + + expect( + CLValueParsers.fromBytes(num1bytes, new CLU32Type()).unwrap() + ).to.be.deep.eq(num1); + }); + + it('CLU64 do proper toBytes()/fromBytes()', () => { + const num1 = new CLU64(MAX_U64); + const num1bytes = CLValueParsers.toBytes(num1).unwrap(); + + expect( + CLValueParsers.fromBytes(num1bytes, new CLU64Type()).unwrap() + ).to.be.deep.eq(num1); + }); + + it('CLU64 toJSON() / fromJSON()', () => { + const num1 = new CLU64(MAX_U64); + const num1JSON = CLValueParsers.toJSON(num1).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"ffffffffffffffff","cl_type":"U64"}' + ); + + expect(num1JSON).to.be.deep.eq(expectedJson); + expect(CLValueParsers.fromJSON(expectedJson).unwrap()).to.be.deep.eq(num1); + }); +}); diff --git a/src/lib/CLValue/Numeric.ts b/src/lib/CLValue/Numeric.ts new file mode 100644 index 000000000..656170031 --- /dev/null +++ b/src/lib/CLValue/Numeric.ts @@ -0,0 +1,395 @@ +import { Ok, Err } from 'ts-results'; +import { + CLType, + CLValue, + CLValueBytesParsers, + ResultAndRemainder, + ToBytesResult, + resultHelper +} from './Abstract'; +import { CLErrorCodes } from './constants'; +import { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import { toBytesNumber } from '../ByteConverters'; +import { + CLTypeTag, + I32_ID, + I64_ID, + U8_ID, + U32_ID, + U64_ID, + U128_ID, + U256_ID, + U512_ID +} from './constants'; +import { arrayEquals } from '../DeployUtil'; + +abstract class NumericBytesParser extends CLValueBytesParsers { + toBytes(value: Numeric): ToBytesResult { + // NOTE: this is for historicial deploys that had zero represented as `0100`. + // If there is zero in form of `0100` insted of `00` it should be serialized the same way to prevent changes in bodyHash. + if ( + (value.bitSize === 128 || + value.bitSize === 256 || + value.bitSize === 512) && + value.originalBytes && + arrayEquals(value.originalBytes, Uint8Array.from([1, 0])) + ) { + return Ok(value.originalBytes); + } + + return Ok(toBytesNumber(value.bitSize, value.signed)(value.data)); + } +} + +abstract class Numeric extends CLValue { + data: BigNumber; + // NOTE: Original bytes are only used for legacy purposes. + originalBytes?: Uint8Array; + bitSize: number; + signed: boolean; + + constructor( + bitSize: number, + isSigned: boolean, + value: BigNumberish, + originalBytes?: Uint8Array + ) { + super(); + if (isSigned === false && Math.sign(value as number) < 0) { + throw new Error("Can't provide negative numbers with isSigned=false"); + } + if (originalBytes) { + this.originalBytes = originalBytes; + } + this.bitSize = bitSize; + this.signed = isSigned; + this.data = BigNumber.from(value); + } + + value(): BigNumber { + return this.data; + } +} + +// CLI32 +export class CLI32Type extends CLType { + linksTo = CLI32; + tag = CLTypeTag.I32; + + toString(): string { + return I32_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLI32BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length < 4) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + const i32Bytes = Uint8Array.from(bytes.subarray(0, 4)); + const i32 = BigNumber.from(i32Bytes.slice().reverse()).fromTwos(32); + const remainder = bytes.subarray(4); + + return resultHelper(Ok(new CLI32(i32)), remainder); + } +} + +export class CLI32 extends Numeric { + constructor(num: BigNumberish) { + super(32, true, num); + } + + clType(): CLType { + return new CLI32Type(); + } +} + +// CLI64 +export class CLI64Type extends CLType { + linksTo = CLI64; + tag = CLTypeTag.I64; + + toString(): string { + return I64_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLI64BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + rawBytes: Uint8Array + ): ResultAndRemainder { + if (rawBytes.length < 8) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + const bytes = Uint8Array.from(rawBytes.subarray(0, 8)); + const val = BigNumber.from(bytes.slice().reverse()).fromTwos(64); + const remainder = rawBytes.subarray(8); + + return resultHelper(Ok(new CLI64(val)), remainder); + } +} + +export class CLI64 extends Numeric { + constructor(num: BigNumberish) { + super(64, true, num); + } + + clType(): CLType { + return new CLI64Type(); + } +} + +// CLU8 +export class CLU8Type extends CLType { + linksTo = CLU8; + tag = CLTypeTag.U8; + + toString(): string { + return U8_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLU8BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length === 0) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + return resultHelper(Ok(new CLU8(bytes[0])), bytes.subarray(1)); + } +} + +export class CLU8 extends Numeric { + constructor(num: BigNumberish) { + super(8, false, num); + } + + clType(): CLType { + return new CLU8Type(); + } +} + +// CLU32 +export class CLU32Type extends CLType { + linksTo = CLU32; + tag = CLTypeTag.U32; + + toString(): string { + return U32_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLU32BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length < 4) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + const u32Bytes = Uint8Array.from(bytes.subarray(0, 4)); + const u32 = BigNumber.from(u32Bytes.slice().reverse()); + + return resultHelper(Ok(new CLU32(u32)), bytes.subarray(4)); + } +} + +export class CLU32 extends Numeric { + constructor(num: BigNumberish) { + super(32, false, num); + } + + clType(): CLType { + return new CLU32Type(); + } +} + +// CLU64 +export class CLU64Type extends CLType { + linksTo = CLU64; + tag = CLTypeTag.U64; + + toString(): string { + return U64_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLU64BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length < 8) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + const u64Bytes = Uint8Array.from(bytes.subarray(0, 8)); + const u64 = BigNumber.from(u64Bytes.slice().reverse()); + + return resultHelper(Ok(new CLU64(u64)), bytes.subarray(8)); + } +} + +export class CLU64 extends Numeric { + constructor(num: BigNumberish) { + super(64, false, num); + } + + clType(): CLType { + return new CLU64Type(); + } +} + +// CLU128 +export class CLU128Type extends CLType { + linksTo = CLU128; + tag = CLTypeTag.U128; + + toString(): string { + return U128_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLU128BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + rawBytes: Uint8Array + ): ResultAndRemainder { + return fromBytesBigInt(rawBytes, 128); + } +} + +export class CLU128 extends Numeric { + constructor(num: BigNumberish, originalBytes?: Uint8Array) { + super(128, false, num, originalBytes); + } + + clType(): CLType { + return new CLU128Type(); + } +} + +// CLU256 +export class CLU256Type extends CLType { + linksTo = CLU256; + tag = CLTypeTag.U256; + + toString(): string { + return U256_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLU256BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + rawBytes: Uint8Array + ): ResultAndRemainder { + return fromBytesBigInt(rawBytes, 256); + } +} + +export class CLU256 extends Numeric { + constructor(num: BigNumberish, originalBytes?: Uint8Array) { + super(256, false, num, originalBytes); + } + + clType(): CLType { + return new CLU256Type(); + } +} + +// CLU512 +export class CLU512Type extends CLType { + linksTo = CLU512; + tag = CLTypeTag.U512; + + toString(): string { + return U512_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLU512BytesParser extends NumericBytesParser { + fromBytesWithRemainder( + rawBytes: Uint8Array + ): ResultAndRemainder { + return fromBytesBigInt(rawBytes, 512); + } +} + +export class CLU512 extends Numeric { + constructor(num: BigNumberish, originalBytes?: Uint8Array) { + super(512, false, num, originalBytes); + } + + clType(): CLType { + return new CLU512Type(); + } +} + +const fromBytesBigInt = ( + rawBytes: Uint8Array, + bitSize: number +): ResultAndRemainder => { + if (rawBytes.length < 1) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + + const byteSize = bitSize / 8; + const n = rawBytes[0]; + + if (n > byteSize) { + return resultHelper(Err(CLErrorCodes.Formatting)); + } + + if (n + 1 > rawBytes.length) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + + const bigIntBytes = n === 0 ? [0] : rawBytes.subarray(1, 1 + n); + + const remainder = rawBytes.subarray(1 + n); + + const value = BigNumber.from(bigIntBytes.slice().reverse()); + + if (bitSize === 128) { + return resultHelper(Ok(new CLU128(value, rawBytes)), remainder); + } + if (bitSize === 256) { + return resultHelper(Ok(new CLU256(value, rawBytes)), remainder); + } + if (bitSize === 512) { + return resultHelper(Ok(new CLU512(value, rawBytes)), remainder); + } + + return resultHelper(Err(CLErrorCodes.Formatting)); +}; diff --git a/src/lib/CLValue/Option.test.ts b/src/lib/CLValue/Option.test.ts new file mode 100644 index 000000000..31f978177 --- /dev/null +++ b/src/lib/CLValue/Option.test.ts @@ -0,0 +1,60 @@ +import { expect } from 'chai'; +import { + CLValueParsers, + CLBool, + CLOption, + CLBoolType, + CLOptionType +} from './index'; +import { Some, None } from 'ts-results'; + +const mySomeOpt = new CLOption(Some(new CLBool(true))); +const myNoneOpt = new CLOption(None, new CLBoolType()); + +describe('CLOption', () => { + it('Should be valid by construction', () => { + expect(mySomeOpt).to.be.an.instanceof(CLOption); + expect(myNoneOpt).to.be.an.instanceof(CLOption); + }); + + it('clType() should return proper type', () => { + expect(mySomeOpt.clType().toString()).to.be.eq('Option (Bool)'); + }); + + it('toBytes() / fromBytes()', () => { + const myType = new CLOptionType(new CLBoolType()); + const optionFromBytes = CLValueParsers.fromBytes( + Uint8Array.from([1, 1]), + myType + ); + expect(CLValueParsers.toBytes(mySomeOpt).unwrap()).to.be.deep.eq( + Uint8Array.from([1, 1]) + ); + expect(optionFromBytes.unwrap()).to.be.deep.eq(mySomeOpt); + expect(CLValueParsers.toBytes(myNoneOpt).unwrap()).to.be.deep.eq( + Uint8Array.from([0]) + ); + }); + + it('fromJSON() / toJSON()', () => { + const jsonSome = CLValueParsers.toJSON(mySomeOpt).unwrap(); + const jsonNone = CLValueParsers.toJSON(myNoneOpt).unwrap(); + + const expectedJsonSome = JSON.parse( + '{"bytes":"0101","cl_type":{"Option":"Bool"}}' + ); + const expectedJsonNone = JSON.parse( + '{"bytes":"00","cl_type":{"Option":"Bool"}}' + ); + + expect(jsonSome).to.be.deep.eq(expectedJsonSome); + expect(jsonNone).to.be.deep.eq(expectedJsonNone); + + expect(CLValueParsers.fromJSON(expectedJsonSome).unwrap()).to.be.deep.eq( + mySomeOpt + ); + expect(CLValueParsers.fromJSON(expectedJsonNone).unwrap()).to.be.deep.eq( + myNoneOpt + ); + }); +}); diff --git a/src/lib/CLValue/Option.ts b/src/lib/CLValue/Option.ts new file mode 100644 index 000000000..08c70f2ae --- /dev/null +++ b/src/lib/CLValue/Option.ts @@ -0,0 +1,150 @@ +import { Ok, Err, Option, Some, None } from 'ts-results'; +import { concat } from '@ethersproject/bytes'; + +import { + CLValue, + CLValueParsers, + CLValueBytesParsers, + CLType, + CLErrorCodes, + ResultAndRemainder, + ToBytesResult, + CLU8BytesParser, + resultHelper, + matchByteParserByCLType +} from './index'; + +import { CLTypeTag, OPTION_ID } from './constants'; + +const OPTION_TAG_NONE = 0; +const OPTION_TAG_SOME = 1; + +export class CLOptionType extends CLType { + tag = CLTypeTag.Option; + linksTo = CLOption; + inner: T; + + constructor(inner: T) { + super(); + this.inner = inner; + } + + toString(): string { + if (this.inner === null) { + return `${OPTION_ID} (None)`; + } + + return `${OPTION_ID} (${this.inner.toString()})`; + } + + toBytes(): Uint8Array { + return concat([Uint8Array.from([this.tag]), this.inner.toBytes()]); + } + + toJSON(): any { + return { + [OPTION_ID]: this.inner.toJSON() + }; + } +} + +export class CLOptionBytesParser extends CLValueBytesParsers { + /** + * Serializes the `Option` into an array of bytes. + */ + toBytes(value: CLOption): ToBytesResult { + if (value.data.none) { + return Ok(Uint8Array.from([OPTION_TAG_NONE])); + } + if (value.data.some) { + return Ok( + concat([ + Uint8Array.from([OPTION_TAG_SOME]), + CLValueParsers.toBytes(value.data.unwrap()).unwrap() + ]) + ); + } + + return Err(CLErrorCodes.UnknownValue); + } + + fromBytesWithRemainder( + bytes: Uint8Array, + type: CLOptionType + ): ResultAndRemainder, CLErrorCodes> { + const { + result: U8Res, + remainder: U8Rem + } = new CLU8BytesParser().fromBytesWithRemainder(bytes); + + const optionTag = U8Res.unwrap() + .value() + .toNumber(); + + if (optionTag === OPTION_TAG_NONE) { + return resultHelper(Ok(new CLOption(None, type.inner)), U8Rem); + } + + if (optionTag === OPTION_TAG_SOME) { + if (!U8Rem) return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + const parser = matchByteParserByCLType(type.inner).unwrap(); + const { + result: valRes, + remainder: valRem + } = parser.fromBytesWithRemainder(U8Rem, type.inner); + + const clValue = valRes.unwrap(); + return resultHelper(Ok(new CLOption(Some(clValue))), valRem); + } + + return resultHelper(Err(CLErrorCodes.Formatting)); + } +} + +export class CLOption extends CLValue { + private innerType: CLType; + /** + * Constructs a new option containing the value of Some or None from ts-result. + */ + constructor(public data: Option, innerType?: CLType) { + super(); + if (data.none) { + if (!innerType) { + throw new Error('You had to assign innerType for None'); + } + this.innerType = innerType; + } else { + this.innerType = data.val.clType(); + } + super(); + } + + /** + * Checks whether the `Option` contains no value. + * + * @returns True if the `Option` has no value. + */ + isNone(): boolean { + return this.data.none; + } + + /** + * Checks whether the `Option` contains a value. + * + * @returns True if the `Option` has some value. + */ + isSome(): boolean { + return this.data.some; + } + + /** + * Returns Option from ts-result based on stored value + */ + value(): Option { + return this.data; + } + + clType(): CLType { + return new CLOptionType(this.innerType); + } +} diff --git a/src/lib/CLValue/PublicKey.test.ts b/src/lib/CLValue/PublicKey.test.ts new file mode 100644 index 000000000..0aad5fcae --- /dev/null +++ b/src/lib/CLValue/PublicKey.test.ts @@ -0,0 +1,153 @@ +import { expect } from 'chai'; +import { + CLPublicKey, + CLPublicKeyType, + CLPublicKeyTag, + CLValueParsers +} from './index'; +import { Keys } from '../index'; + +// prettier-ignore +const rawEd25519Account = Uint8Array.from([ + 154, 211, 137, 116, 146, 249, 164, 57, + 9, 35, 64, 255, 83, 105, 131, 86, + 169, 250, 100, 248, 12, 68, 201, 17, + 43, 62, 151, 55, 158, 87, 186, 148 +]); + +// prettier-ignore +const rawSecp256K1Account = Uint8Array.from([ + 2, 159, 140, 124, 87, 6, 242, 206, + 197, 115, 224, 181, 184, 223, 197, 239, + 249, 252, 127, 235, 243, 153, 111, 242, + 225, 125, 76, 204, 37, 56, 70, 41, + 229 +]); + +const publicKeyEd25519 = new CLPublicKey( + rawEd25519Account, + CLPublicKeyTag.ED25519 +); + +const publicKeySecp256K1 = new CLPublicKey( + rawSecp256K1Account, + CLPublicKeyTag.SECP256K1 +); + +describe('CLPublicKey', () => { + it('Valid by construction', () => { + expect(publicKeyEd25519).to.be.an.instanceof(CLPublicKey); + expect(publicKeySecp256K1).to.be.an.instanceof(CLPublicKey); + }); + + it('Invalid by construction', () => { + const badFn = () => new CLPublicKey(rawEd25519Account, 4); + expect(badFn).to.throw('Unsupported type of public key'); + }); + + it('Proper clType() value', () => { + expect(publicKeyEd25519.clType().toString()).to.be.eq('PublicKey'); + }); + + it('CLPublicKey.fromhex() value', () => { + const ed25519Account = Keys.Ed25519.new(); + const ed25519AccountHex = ed25519Account.accountHex(); + + expect(CLPublicKey.fromHex(ed25519AccountHex).value()).to.deep.equal( + ed25519Account.publicKey.value() + ); + + const secp256K1Account = Keys.Secp256K1.new(); + const secp256K1AccountHex = secp256K1Account.accountHex(); + + expect(CLPublicKey.fromHex(secp256K1AccountHex).value()).to.deep.equal( + secp256K1Account.publicKey.value() + ); + + const badFn = () => CLPublicKey.fromHex('1'); + expect(badFn).to.throw('Asymmetric key error: too short'); + + // Check mixed case pubkeys + const goodFn = () => + CLPublicKey.fromHex( + '0115C9b40c06fF99B0cBadf1140B061B5dBF92103E66a6330fbCc7768f5219C1ce' + ); + + expect(goodFn).to.not.throw(); + }); + + it('CLPublicKey.fromEd25519() return proper value', () => { + const pub = CLPublicKey.fromEd25519(rawEd25519Account); + expect(pub.value()).to.be.deep.eq(rawEd25519Account); + }); + + it('CLPublicKey.fromSecp256K1 return proper value', () => { + const pub = CLPublicKey.fromSecp256K1(rawSecp256K1Account); + expect(pub.value()).to.be.deep.eq(rawSecp256K1Account); + }); + + it('fromHex() should serializes to the same hex value by using toHex()', () => { + const accountKey = + '01f9235ff9c46c990e1e2eee0d531e488101fab48c05b75b8ea9983658e228f06b'; + + const publicKey = CLPublicKey.fromHex(accountKey); + const accountHex = publicKey.toHex(); + + expect(accountHex).to.be.eq(accountKey); + expect(publicKey.isEd25519()).to.be.eq(true); + }); + + it('toAccountHash() valid result', () => { + const accountKey = + '01f9235ff9c46c990e1e2eee0d531e488101fab48c05b75b8ea9983658e228f06b'; + + const publicKey = CLPublicKey.fromHex(accountKey); + const accountHash = publicKey.toAccountHash(); + // prettier-ignore + const validResult = Uint8Array.from([ + 145, 171, 120, 7, 189, 47, 216, + 41, 215, 192, 156, 198, 81, 187, + 81, 206, 63, 183, 251, 252, 224, + 127, 79, 141, 250, 233, 141, 132, + 130, 235, 172, 98 + ]); + + expect(accountHash).to.be.deep.eq(validResult); + }); + + it('isEd25519() valid result', () => { + expect(publicKeyEd25519.isEd25519()).to.be.eq(true); + expect(publicKeyEd25519.isSecp256K1()).to.be.eq(false); + }); + + it('isSecp256K1() valid result', () => { + expect(publicKeySecp256K1.isEd25519()).to.be.eq(false); + expect(publicKeySecp256K1.isSecp256K1()).to.be.eq(true); + }); + + it('toBytes() / fromBytes()', () => { + const bytes = Uint8Array.from(Array(32).fill(42)); + const publicKey = CLPublicKey.fromEd25519(bytes); + const toBytes = CLValueParsers.toBytes(publicKey).unwrap(); + const validResult = Uint8Array.from([1, ...Array(32).fill(42)]); + + expect(toBytes).to.be.deep.eq(validResult); + expect( + CLValueParsers.fromBytes(toBytes, new CLPublicKeyType()).unwrap() + ).to.be.deep.eq(publicKey); + }); + + it('toJSON() / fromJSON()', () => { + const bytes = Uint8Array.from(Array(32).fill(42)); + const publicKey = CLPublicKey.fromEd25519(bytes); + const json = CLValueParsers.toJSON(publicKey).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"012a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a","cl_type":"PublicKey"}' + ); + + expect(json).to.be.deep.eq(expectedJson); + expect(CLValueParsers.fromJSON(expectedJson).unwrap()).to.be.deep.eq( + publicKey + ); + }); +}); diff --git a/src/lib/CLValue/PublicKey.ts b/src/lib/CLValue/PublicKey.ts new file mode 100644 index 000000000..927d1f7d9 --- /dev/null +++ b/src/lib/CLValue/PublicKey.ts @@ -0,0 +1,176 @@ +import { concat } from '@ethersproject/bytes'; +import { Ok, Err } from 'ts-results'; + +import { + CLType, + CLValue, + CLValueBytesParsers, + CLErrorCodes, + resultHelper, + ResultAndRemainder, + ToBytesResult +} from './index'; +import { PUBLIC_KEY_ID, CLTypeTag } from './constants'; +import { decodeBase16, encodeBase16 } from '../Conversions'; +import { byteHash } from '../Contracts'; + +// TODO: Tidy up almost the same enum in Keys. +import { SignatureAlgorithm } from '../Keys'; + +const ED25519_LENGTH = 32; +const SECP256K1_LENGTH = 33; + +export enum CLPublicKeyTag { + ED25519 = 1, + SECP256K1 = 2 +} + +export class CLPublicKeyType extends CLType { + linksTo = CLPublicKey; + tag = CLTypeTag.PublicKey; + + toString(): string { + return PUBLIC_KEY_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLPublicKeyBytesParser extends CLValueBytesParsers { + public toBytes(value: CLPublicKey): ToBytesResult { + return Ok(concat([Uint8Array.from([value.tag]), value.data])); + } + + fromBytesWithRemainder( + rawBytes: Uint8Array + ): ResultAndRemainder { + if (rawBytes.length < 1) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + + const variant = rawBytes[0]; + + let expectedPublicKeySize; + if (variant === CLPublicKeyTag.ED25519) { + expectedPublicKeySize = ED25519_LENGTH; + } else if (variant === CLPublicKeyTag.SECP256K1) { + expectedPublicKeySize = SECP256K1_LENGTH; + } else { + return resultHelper(Err(CLErrorCodes.Formatting)); + } + + const bytes = rawBytes.subarray(1, expectedPublicKeySize + 1); + + const publicKey = new CLPublicKey(bytes, variant); + + return resultHelper( + Ok(publicKey), + rawBytes.subarray(expectedPublicKeySize + 1) + ); + } +} + +export class CLPublicKey extends CLValue { + data: Uint8Array; + tag: CLPublicKeyTag; + + constructor( + rawPublicKey: Uint8Array, + tag: CLPublicKeyTag | SignatureAlgorithm + ) { + super(); + // TODO: Two ifs because of the legacy indentifiers in ./Keys + if (tag === CLPublicKeyTag.ED25519 || tag === SignatureAlgorithm.Ed25519) { + if (rawPublicKey.length !== ED25519_LENGTH) { + throw new Error( + `Wrong length of ED25519 key. Expected ${ED25519_LENGTH}, but got ${rawPublicKey.length}.` + ); + } + this.data = rawPublicKey; + this.tag = CLPublicKeyTag.ED25519; + return; + } + if ( + tag === CLPublicKeyTag.SECP256K1 || + tag === SignatureAlgorithm.Secp256K1 + ) { + if (rawPublicKey.length !== SECP256K1_LENGTH) { + throw new Error( + `Wrong length of SECP256K1 key. Expected ${SECP256K1_LENGTH}, but got ${rawPublicKey.length}.` + ); + } + this.data = rawPublicKey; + this.tag = CLPublicKeyTag.SECP256K1; + return; + } + throw new Error('Unsupported type of public key'); + } + + clType(): CLType { + return new CLPublicKeyType(); + } + + isEd25519(): boolean { + return this.tag === CLPublicKeyTag.ED25519; + } + + isSecp256K1(): boolean { + return this.tag === CLPublicKeyTag.SECP256K1; + } + + toHex(): string { + return `0${this.tag}${encodeBase16(this.data)}`; + } + + toAccountHash(): Uint8Array { + const algorithmIdentifier = CLPublicKeyTag[this.tag]; + const separator = Uint8Array.from([0]); + const prefix = Buffer.concat([ + Buffer.from(algorithmIdentifier.toLowerCase()), + separator + ]); + + if (this.data.length === 0) { + return Uint8Array.from([]); + } else { + return byteHash(concat([prefix, this.data])); + } + } + + toAccountHashStr(): string { + const bytes = this.toAccountHash(); + const hashHex = Buffer.from(bytes).toString('hex'); + return `account-hash-${hashHex}`; + } + + value(): Uint8Array { + return this.data; + } + + static fromEd25519(publicKey: Uint8Array): CLPublicKey { + return new CLPublicKey(publicKey, CLPublicKeyTag.ED25519); + } + + static fromSecp256K1(publicKey: Uint8Array): CLPublicKey { + return new CLPublicKey(publicKey, CLPublicKeyTag.SECP256K1); + } + + /** + * Tries to decode PublicKey from its hex-representation. + * The hex format should be as produced by PublicKey.toAccountHex + * @param publicKeyHex + */ + static fromHex(publicKeyHex: string): CLPublicKey { + if (publicKeyHex.length < 2) { + throw new Error('Asymmetric key error: too short'); + } + if (!/^0(1[0-9a-fA-F]{64}|2[0-9a-fA-F]{66})$/.test(publicKeyHex)) { + throw new Error('Invalid public key'); + } + const publicKeyHexBytes = decodeBase16(publicKeyHex); + + return new CLPublicKey(publicKeyHexBytes.subarray(1), publicKeyHexBytes[0]); + } +} diff --git a/src/lib/CLValue/Result.test.ts b/src/lib/CLValue/Result.test.ts new file mode 100644 index 000000000..c1cc73240 --- /dev/null +++ b/src/lib/CLValue/Result.test.ts @@ -0,0 +1,132 @@ +import { expect } from 'chai'; +import { + CLValueParsers, + CLBool, + CLBoolType, + CLResult, + CLResultType, + CLU8, + CLU8Type, + CLListType, + CLList, + CLOptionType, + CLOption +} from './index'; +import { Ok, Err, Some } from 'ts-results'; + +const myTypes = { ok: new CLBoolType(), err: new CLU8Type() }; +const myOkRes = new CLResult(Ok(new CLBool(true)), myTypes); +const myErrRes = new CLResult(Err(new CLU8(1)), myTypes); + +const myTypesComplex = { + ok: new CLListType(new CLListType(new CLU8Type())), + err: new CLOptionType(new CLListType(new CLListType(new CLU8Type()))) +}; + +const myOkComplexRes = new CLResult( + Ok(new CLList([new CLList([new CLU8(5), new CLU8(10), new CLU8(15)])])), + myTypesComplex +); + +const myErrComplexRes = new CLResult( + Err( + new CLOption( + Some(new CLList([new CLList([new CLU8(5), new CLU8(10), new CLU8(15)])])) + ) + ), + myTypesComplex +); + +describe('CLResult', () => { + it('Should be valid by construction', () => { + expect(myOkRes).to.be.an.instanceof(CLResult); + expect(myErrRes).to.be.an.instanceof(CLResult); + }); + + it('clType() should return proper type', () => { + expect(myOkRes.clType().toString()).to.be.eq( + 'Result (OK: Bool, ERR: Bool)' + ); + }); + + it('toBytes() / fromBytes()', () => { + const okBytes = CLValueParsers.toBytes(myOkRes).unwrap(); + const errBytes = CLValueParsers.toBytes(myErrRes).unwrap(); + expect(okBytes).to.be.deep.eq(Uint8Array.from([1, 1])); + expect(errBytes).to.be.deep.eq(Uint8Array.from([0, 1])); + + const okFromBytes = CLValueParsers.fromBytes( + okBytes, + new CLResultType(myTypes) + ).unwrap(); + const errFromBytes = CLValueParsers.fromBytes( + errBytes, + new CLResultType(myTypes) + ).unwrap(); + + expect(okFromBytes).to.be.deep.eq(myOkRes); + expect(errFromBytes).to.be.deep.eq(myErrRes); + }); + + it('toJSON() / fromJSON() on Ok', () => { + const myOkJson = CLValueParsers.toJSON(myOkRes).unwrap(); + const expectedOkJson = JSON.parse( + '{"bytes":"0101","cl_type":{"Result":{"ok":"Bool","err":"U8"}}}' + ); + + const myOkFromJson = CLValueParsers.fromJSON(expectedOkJson).unwrap(); + + expect(myOkJson).to.be.deep.eq(expectedOkJson); + expect(myOkFromJson).to.be.deep.eq(myOkRes); + }); + + it('toJSON() / fromJSON() on Err', () => { + const myErrJson = CLValueParsers.toJSON(myErrRes).unwrap(); + const expectedErrJson = JSON.parse( + '{"bytes":"0001","cl_type":{"Result":{"ok":"Bool","err":"U8"}}}' + ); + + const myErrFromJson = CLValueParsers.fromJSON(expectedErrJson).unwrap(); + + expect(myErrJson).to.be.deep.eq(expectedErrJson); + expect(myErrFromJson).to.be.deep.eq(myErrRes); + }); + + it('toBytesWithType() / fromBytesWithType()', () => { + const okResBytesWithCLType = CLValueParsers.toBytesWithType( + myOkRes + ).unwrap(); + const okFromBytes = CLValueParsers.fromBytesWithType( + okResBytesWithCLType + ).unwrap(); + + const errResBytesWithCLType = CLValueParsers.toBytesWithType( + myErrRes + ).unwrap(); + const errFromBytes = CLValueParsers.fromBytesWithType( + errResBytesWithCLType + ).unwrap(); + + expect(okFromBytes).to.be.deep.eq(myOkRes); + expect(errFromBytes).to.be.deep.eq(myErrRes); + }); + + it('Complex examples toBytesWithCLType() / fromBytesWithCLType()', () => { + const okResBytesWithCLType = CLValueParsers.toBytesWithType( + myOkComplexRes + ).unwrap(); + const okFromBytes = CLValueParsers.fromBytesWithType( + okResBytesWithCLType + ).unwrap(); + + const errResBytesWithCLType = CLValueParsers.toBytesWithType( + myErrComplexRes + ).unwrap(); + const errFromBytes = CLValueParsers.fromBytesWithType( + errResBytesWithCLType + ).unwrap(); + + expect(okFromBytes).to.be.deep.eq(myOkComplexRes); + expect(errFromBytes).to.be.deep.eq(myErrComplexRes); + }); +}); diff --git a/src/lib/CLValue/Result.ts b/src/lib/CLValue/Result.ts new file mode 100644 index 000000000..41fcf277b --- /dev/null +++ b/src/lib/CLValue/Result.ts @@ -0,0 +1,170 @@ +import { Result, Ok, Err } from 'ts-results'; +import { concat } from '@ethersproject/bytes'; + +import { + CLValue, + CLValueParsers, + CLType, + CLErrorCodes, + ResultAndRemainder, + ToBytesResult, + resultHelper, + CLU8BytesParser, + CLValueBytesParsers, + matchByteParserByCLType +} from './index'; +import { CLTypeTag, RESULT_ID } from './constants'; + +const RESULT_TAG_ERROR = 0; +const RESULT_TAG_OK = 1; + +export class CLResultType extends CLType { + linksTo = CLResult; + tag = CLTypeTag.Result; + + innerOk: T; + innerErr: E; + + constructor({ ok, err }: { ok: T; err: E }) { + super(); + this.innerOk = ok; + this.innerErr = err; + } + + toString(): string { + return `${RESULT_ID} (OK: ${this.innerOk.toString()}, ERR: ${this.innerOk.toString()})`; + } + + toBytes(): Uint8Array { + return concat([ + Uint8Array.from([this.tag]), + this.innerOk.toBytes(), + this.innerErr.toBytes() + ]); + } + + toJSON(): any { + return { + [RESULT_ID]: { + ok: this.innerOk.toJSON(), + err: this.innerErr.toJSON() + } + }; + } +} + +export class CLResultBytesParser extends CLValueBytesParsers { + toBytes(value: CLResult): ToBytesResult { + if (value.data instanceof Ok && value.data.val instanceof CLValue) { + return Ok( + concat([ + Uint8Array.from([RESULT_TAG_OK]), + CLValueParsers.toBytes(value.data.val).unwrap() + ]) + ); + } else if (value.data instanceof Err) { + return Ok( + concat([ + Uint8Array.from([RESULT_TAG_ERROR]), + CLValueParsers.toBytes(value.data.val).unwrap() + ]) + ); + } else { + throw new Error('Unproper data stored in CLResult'); + } + } + + fromBytesWithRemainder( + bytes: Uint8Array, + type: CLResultType + ): ResultAndRemainder, CLErrorCodes> { + const { + result: U8Res, + remainder: U8Rem + } = new CLU8BytesParser().fromBytesWithRemainder(bytes); + + if (!U8Rem) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + + const resultTag = U8Res.unwrap() + .value() + .toNumber(); + const referenceErr = type.innerErr; + const referenceOk = type.innerOk; + + if (resultTag === RESULT_TAG_ERROR) { + const parser = matchByteParserByCLType(referenceErr).unwrap(); + const { + result: valRes, + remainder: valRem + } = parser.fromBytesWithRemainder(U8Rem, type.innerErr); + + const val = new CLResult(Err(valRes.unwrap()), { + ok: referenceOk, + err: referenceErr + }); + + return resultHelper(Ok(val), valRem); + } + + if (resultTag === RESULT_TAG_OK) { + const parser = matchByteParserByCLType(referenceOk).unwrap(); + const { + result: valRes, + remainder: valRem + } = parser.fromBytesWithRemainder(U8Rem, type.innerOk); + + const val = new CLResult(Ok(valRes.unwrap()), { + ok: referenceOk, + err: referenceErr + }); + + return resultHelper(Ok(val), valRem); + } + + return resultHelper(Err(CLErrorCodes.Formatting)); + } +} + +/** + * Class representing a result of an operation that might have failed. Can contain either a value + * resulting from a successful completion of a calculation, or an error. Similar to `Result` in Rust + * or `Either` in Haskell. + */ +export class CLResult extends CLValue { + data: Result; + innerOk: T; + innerErr: E; + + constructor(data: Result, { ok, err }: { ok: T; err: E }) { + super(); + this.data = data; + this.innerOk = ok; + this.innerErr = err; + } + /** + * Returns Result from ts-result based on stored value + */ + value(): Result { + return this.data; + } + + /** + * Checks if stored value is error + */ + isError(): boolean { + return this.data instanceof Err; + } + + /** + * Checks if stored value is valid + */ + isOk(): boolean { + return this.data.ok; + } + + clType(): CLType { + return new CLResultType({ ok: this.innerOk, err: this.innerErr }); + } +} diff --git a/src/lib/CLValue/String.test.ts b/src/lib/CLValue/String.test.ts new file mode 100644 index 000000000..4f986f623 --- /dev/null +++ b/src/lib/CLValue/String.test.ts @@ -0,0 +1,47 @@ +import { expect } from 'chai'; +import { CLValueParsers, CLString, CLStringType } from './index'; + +describe('CLString', () => { + it('CLString value() should return proper value', () => { + const str = new CLString('ABC'); + expect(str.value()).to.be.eq('ABC'); + }); + + it('CLString clType() should return proper type', () => { + const str = new CLString('ABC'); + expect(str.clType().toString()).to.be.eq('String'); + }); + + it('CLString size() should return proper string length', () => { + const str = new CLString('ABC'); + expect(str.size()).to.be.eq(3); + }); + + it('CLString should throw an error on invalid data provided to constructor', () => { + // @ts-ignore + const badFn = () => new CLString(123); + + expect(badFn).to.throw( + 'Wrong data type, you should provide string, but you provided number' + ); + }); + + it('toBytes() / fromBytes()', () => { + const str = new CLString('ABC'); + const bytes = CLValueParsers.toBytes(str).unwrap(); + const result = CLValueParsers.fromBytes(bytes, new CLStringType()).unwrap(); + expect(result).to.be.deep.eq(str); + }); + + it('toJSON() / fromJSON()', () => { + const str = new CLString('ABC-DEF'); + const json = CLValueParsers.toJSON(str).unwrap(); + const fromJSON = CLValueParsers.fromJSON(json).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"070000004142432d444546","cl_type":"String"}' + ); + + expect(json).to.be.deep.eq(expectedJson); + expect(fromJSON).to.be.deep.eq(str); + }); +}); diff --git a/src/lib/CLValue/String.ts b/src/lib/CLValue/String.ts new file mode 100644 index 000000000..fd58b596a --- /dev/null +++ b/src/lib/CLValue/String.ts @@ -0,0 +1,78 @@ +import { Ok, Err } from 'ts-results'; +import { + CLType, + CLValue, + CLU32BytesParser, + ResultAndRemainder, + ToBytesResult, + resultHelper, + CLErrorCodes, + CLValueBytesParsers +} from './index'; +import { STRING_ID, CLTypeTag } from './constants'; +import { toBytesString, fromBytesString } from '../ByteConverters'; + +export class CLStringType extends CLType { + linksTo = CLString; + tag = CLTypeTag.String; + + toString(): string { + return STRING_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLStringBytesParser extends CLValueBytesParsers { + toBytes(value: CLString): ToBytesResult { + return Ok(toBytesString(value.data)); + } + + fromBytesWithRemainder( + rawBytes: Uint8Array + ): ResultAndRemainder { + const { + result: CLU32res, + remainder: CLU32rem + } = new CLU32BytesParser().fromBytesWithRemainder(rawBytes); + + const len = CLU32res.unwrap() + .value() + .toNumber(); + + if (CLU32rem) { + const val = fromBytesString(CLU32rem.subarray(0, len)); + return resultHelper(Ok(new CLString(val)), CLU32rem.subarray(len)); + } + + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } +} + +export class CLString extends CLValue { + data: string; + + constructor(v: string) { + super(); + if (typeof v !== 'string') { + throw new Error( + `Wrong data type, you should provide string, but you provided ${typeof v}` + ); + } + this.data = v; + } + + clType(): CLType { + return new CLStringType(); + } + + value(): string { + return this.data; + } + + size(): number { + return this.data.length; + } +} diff --git a/src/lib/CLValue/Tuple.test.ts b/src/lib/CLValue/Tuple.test.ts new file mode 100644 index 000000000..7e50ead04 --- /dev/null +++ b/src/lib/CLValue/Tuple.test.ts @@ -0,0 +1,157 @@ +import { expect } from 'chai'; +import { + CLValueParsers, + CLTuple1, + CLTuple2, + CLTuple3, + CLTuple1Type, + CLTuple2Type, + CLTuple3Type, + CLI32, + CLI32Type, + CLBool, + CLBoolType, + CLString, + CLStringType +} from './index'; + +describe('CLTuple', () => { + it('Tuple2 should return proper clType', () => { + const myBool = new CLBool(false); + const myStr = new CLString('ABC'); + const myTup = new CLTuple2([myBool, myStr]); + + expect(myTup.clType().toString()).to.be.eq('Tuple2 (Bool, String)'); + }); + + it('Should be able to create tuple with proper values - correct by construction', () => { + const myTup2 = new CLTuple2([new CLBool(true), new CLBool(false)]); + + expect(myTup2).to.be.an.instanceof(CLTuple2); + }); + + it('Should throw an error when tuple is not correct by construction', () => { + const badFn = () => new CLTuple1([new CLBool(true), new CLBool(false)]); + + expect(badFn).to.throw('Too many elements!'); + }); + + it('Should throw an error when list is not correct by construction', () => { + // @ts-ignore + const badFn = () => new CLTuple2(['a', 2]); + + expect(badFn).to.throw('Invalid data type(s) provided.'); + }); + + it('Should be able to return proper values by calling .value() on Tuple', () => { + const myBool = new CLBool(false); + const myTuple = new CLTuple1([myBool]); + + expect(myTuple.value()).to.be.deep.eq([myBool]); + }); + + it('Get should return proper value', () => { + const myTup = new CLTuple2([new CLBool(true)]); + const newItem = new CLBool(false); + + myTup.push(newItem); + + expect(myTup.get(1)).to.deep.eq(newItem); + }); + + it('Set should be able to set values at already declared indexes', () => { + const myTup = new CLTuple1([new CLBool(true)]); + const newItem = new CLBool(false); + + myTup.set(0, newItem); + + expect(myTup.get(0)).to.deep.eq(newItem); + }); + + it('Set should throw error on wrong indexes', () => { + const myTup = new CLTuple1([new CLBool(true)]); + + const badFn = () => myTup.set(1, new CLBool(false)); + + expect(badFn).to.throw('Tuple index out of bounds.'); + }); + + it('Should run toBytes() / fromBytes()', () => { + const myTup1 = new CLTuple1([new CLBool(true)]); + const myTup2 = new CLTuple2([new CLBool(false), new CLI32(-555)]); + const myTup3 = new CLTuple3([ + new CLI32(-555), + new CLString('ABC'), + new CLString('XYZ') + ]); + + const myTup1Bytes = CLValueParsers.toBytes(myTup1).unwrap(); + const myTup2Bytes = CLValueParsers.toBytes(myTup2).unwrap(); + const myTup3Bytes = CLValueParsers.toBytes(myTup3).unwrap(); + + expect( + CLValueParsers.fromBytes( + myTup1Bytes, + new CLTuple1Type([new CLBoolType()]) + ).unwrap() + ).to.be.deep.eq(myTup1); + + expect( + CLValueParsers.fromBytes( + myTup2Bytes, + new CLTuple2Type([new CLBoolType(), new CLI32Type()]) + ).unwrap() + ).to.be.deep.eq(myTup2); + + expect( + CLValueParsers.fromBytes( + myTup3Bytes, + new CLTuple3Type([ + new CLI32Type(), + new CLStringType(), + new CLStringType() + ]) + ).unwrap() + ).to.be.deep.eq(myTup3); + }); + + it('fromJSON() / toJSON()', () => { + const myTup1 = new CLTuple1([new CLBool(true)]); + const myTup2 = new CLTuple2([new CLBool(false), new CLI32(-555)]); + const myTup3 = new CLTuple3([ + new CLI32(-555), + new CLString('ABC'), + new CLString('XYZ') + ]); + + const myTup1JSON = CLValueParsers.toJSON(myTup1).unwrap(); + const myTup2JSON = CLValueParsers.toJSON(myTup2).unwrap(); + const myTup3JSON = CLValueParsers.toJSON(myTup3).unwrap(); + + const expectedMyTup1JSON = JSON.parse( + '{"bytes":"01","cl_type":{"Tuple1":["Bool"]}}' + ); + const expectedMyTup2JSON = JSON.parse( + '{"bytes":"00d5fdffff","cl_type":{"Tuple2":["Bool","I32"]}}' + ); + const expectedMyTup3JSON = JSON.parse( + '{"bytes":"d5fdffff030000004142430300000058595a","cl_type":{"Tuple3":["I32","String","String"]}}' + ); + + expect(CLValueParsers.fromJSON(expectedMyTup1JSON).unwrap()).to.be.deep.eq( + myTup1 + ); + + expect(CLValueParsers.fromJSON(expectedMyTup2JSON).unwrap()).to.be.deep.eq( + myTup2 + ); + + expect(CLValueParsers.fromJSON(expectedMyTup3JSON).unwrap()).to.be.deep.eq( + myTup3 + ); + + expect(myTup1JSON).to.be.deep.eq(expectedMyTup1JSON); + expect(myTup2JSON).to.be.deep.eq(expectedMyTup2JSON); + expect(myTup3JSON).to.be.deep.eq(expectedMyTup3JSON); + }); +}); diff --git a/src/lib/CLValue/Tuple.ts b/src/lib/CLValue/Tuple.ts new file mode 100644 index 000000000..e09d21a5e --- /dev/null +++ b/src/lib/CLValue/Tuple.ts @@ -0,0 +1,170 @@ +import { Ok, Err } from 'ts-results'; +import { concat } from '@ethersproject/bytes'; + +import { + CLType, + CLValue, + CLValueParsers, + CLValueBytesParsers, + ResultAndRemainder, + ToBytesResult, + resultHelper, + matchByteParserByCLType, + CLErrorCodes +} from './index'; +import { TUPLE_MATCH_LEN_TO_ID } from './utils'; +import { CLTypeTag } from './constants'; + +type TupleTypes = typeof CLTuple1 | typeof CLTuple2 | typeof CLTuple3; + +export abstract class CLTupleType extends CLType { + tag: CLTypeTag; + linksTo: TupleTypes; + inner: Array; + + constructor(inner: Array, linksTo: TupleTypes, tag: CLTypeTag) { + super(); + this.inner = inner; + this.linksTo = linksTo; + this.tag = tag; + } + + toString(): string { + const innerTypes = this.inner.map(e => e.toString()).join(', '); + return `Tuple${this.inner.length} (${innerTypes})`; + } + + toJSON(): any { + const id = TUPLE_MATCH_LEN_TO_ID[this.inner.length - 1]; + return { + [id]: this.inner.map(t => t.toJSON()) + }; + } + + toBytes(): any { + const inner = this.inner.map(t => t.toBytes()); + return concat([Uint8Array.from([this.tag]), ...inner]); + } +} + +export class CLTupleBytesParser extends CLValueBytesParsers { + toBytes(value: CLTuple): ToBytesResult { + return Ok(concat(value.data.map(d => CLValueParsers.toBytes(d).unwrap()))); + } + + fromBytesWithRemainder( + rawBytes: Uint8Array, + type: CLTuple1Type | CLTuple2Type | CLTuple3Type + ): ResultAndRemainder { + let rem = rawBytes; + const val = type.inner.map((t: CLType) => { + const parser = matchByteParserByCLType(t).unwrap(); + const { result: vRes, remainder: vRem } = parser.fromBytesWithRemainder( + rem + ); + + rem = vRem!; + return vRes.unwrap(); + }); + + if (val.length === 1) { + return resultHelper(Ok(new CLTuple1(val)), rem); + } + if (val.length === 2) { + return resultHelper(Ok(new CLTuple2(val)), rem); + } + if (val.length === 3) { + return resultHelper(Ok(new CLTuple3(val)), rem); + } + return resultHelper(Err(CLErrorCodes.Formatting)); + } +} + +abstract class CLTuple extends CLValue { + data: Array; + tupleSize: number; + + constructor(size: number, v: Array) { + super(); + if (v.length > size) { + throw new Error('Too many elements!'); + } + if (v.every(e => e instanceof CLValue)) { + this.tupleSize = size; + this.data = v; + } else { + throw Error('Invalid data type(s) provided.'); + } + } + + get(index: number): CLValue { + return this.data[index]; + } + + set(index: number, item: CLValue): void { + if (index >= this.tupleSize) { + throw new Error('Tuple index out of bounds.'); + } + this.data[index] = item; + } + + push(item: CLValue): void { + if (this.data.length < this.tupleSize) { + this.data.push(item); + } else { + throw new Error('No more space in this tuple!'); + } + } + + value(): Array { + return this.data; + } +} + +export class CLTuple1Type extends CLTupleType { + constructor(inner: Array) { + super(inner, CLTuple1, CLTypeTag.Tuple1); + } +} + +export class CLTuple1 extends CLTuple { + constructor(value: Array) { + super(1, value); + } + + clType(): CLType { + return new CLTuple1Type(this.data.map(e => e.clType())); + } +} + +export class CLTuple2Type extends CLTupleType { + constructor(inner: Array) { + super(inner, CLTuple2, CLTypeTag.Tuple2); + } +} + +export class CLTuple2 extends CLTuple { + constructor(value: Array) { + super(2, value); + } + + clType(): CLType { + return new CLTuple2Type(this.data.map(e => e.clType())); + } +} + +export class CLTuple3Type extends CLTupleType { + constructor(inner: Array) { + super(inner, CLTuple3, CLTypeTag.Tuple3); + } +} + +export class CLTuple3 extends CLTuple { + constructor(value: Array) { + super(3, value); + } + + clType(): CLType { + return new CLTuple3Type(this.data.map(e => e.clType())); + } +} diff --git a/src/lib/CLValue/URef.test.ts b/src/lib/CLValue/URef.test.ts new file mode 100644 index 000000000..f4ede6064 --- /dev/null +++ b/src/lib/CLValue/URef.test.ts @@ -0,0 +1,71 @@ +import { expect } from 'chai'; +import { CLURef, CLURefType, CLValueParsers, AccessRights } from './index'; +import { decodeBase16 } from '../../index'; + +const urefAddr = + '2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a'; +const RWExampleURef = new CLURef( + decodeBase16(urefAddr), + AccessRights.READ_ADD_WRITE +); + +const formattedStr = + 'uref-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff-007'; + +describe('CLUref', () => { + it('Should be valid by construction', () => { + const badFn1 = () => + new CLURef(decodeBase16('3a3a3a'), AccessRights.READ_ADD_WRITE); + const badFn2 = () => new CLURef(decodeBase16(urefAddr), 10); + + expect(RWExampleURef).to.be.an.instanceof(CLURef); + expect(badFn1).to.throw('The length of URefAddr should be 32'); + expect(badFn2).to.throw('Unsuported AccessRights'); + }); + + it('Should return proper clType()', () => { + expect(RWExampleURef.clType().toString()).to.be.eq('URef'); + }); + + it('Should return proper value()', () => { + expect(RWExampleURef.value()).to.be.deep.eq({ + data: decodeBase16(urefAddr), + accessRights: AccessRights.READ_ADD_WRITE + }); + }); + + it('fromFormattedStr() / toFormattedStr() proper value', () => { + const myURef = CLURef.fromFormattedStr(formattedStr); + const badFn1 = () => CLURef.fromFormattedStr('xxxx-ttttttttttttttt-000'); + const badFn2 = () => CLURef.fromFormattedStr('uref-ttttttttttttttt'); + + expect(myURef).to.be.an.instanceof(CLURef); + expect(myURef.toFormattedStr()).to.be.eq(formattedStr); + expect(badFn1).to.throw("Prefix is not 'uref-"); + expect(badFn2).to.throw('No access rights as suffix'); + }); + + it('toBytes() / fromBytes() proper values', () => { + const expectedBytes = Uint8Array.from([...Array(32).fill(42), 7]); + const toBytes = CLValueParsers.toBytes(RWExampleURef).unwrap(); + const fromBytes = CLValueParsers.fromBytes( + expectedBytes, + new CLURefType() + ).unwrap(); + + expect(toBytes).to.be.deep.eq(expectedBytes); + expect(fromBytes).to.be.deep.eq(RWExampleURef); + }); + + it('fromJSON() / toJSON()', () => { + const json = CLValueParsers.toJSON(RWExampleURef).unwrap(); + const expectedJson = JSON.parse( + '{"bytes":"2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a07","cl_type":"URef"}' + ); + + expect(CLValueParsers.fromJSON(expectedJson).unwrap()).to.be.deep.eq( + RWExampleURef + ); + expect(json).to.be.deep.eq(expectedJson); + }); +}); diff --git a/src/lib/CLValue/URef.ts b/src/lib/CLValue/URef.ts new file mode 100644 index 000000000..6559b0855 --- /dev/null +++ b/src/lib/CLValue/URef.ts @@ -0,0 +1,140 @@ +import { concat } from '@ethersproject/bytes'; +import { Ok, Err } from 'ts-results'; + +import { + CLType, + CLValue, + CLValueBytesParsers, + CLErrorCodes, + ResultAndRemainder, + ToBytesResult, + resultHelper, + padNum +} from './index'; +import { UREF_ID, CLTypeTag } from './constants'; +import { decodeBase16, encodeBase16 } from '../Conversions'; + +export enum AccessRights { + // No permissions + None = 0b0, + // Permission to read the value under the associated [[URef]]. + READ = 0b001, + // Permission to write a value under the associated [[URef]]. + WRITE = 0b010, + // Permission to add to the value under the associated [[URef]]. + ADD = 0b100, + // Permission to read or write the value under the associated [[URef]]. + READ_WRITE = AccessRights.READ | AccessRights.WRITE, + // Permission to read or add to the value under the associated [[URef]]. + READ_ADD = AccessRights.READ | AccessRights.ADD, + // Permission to add to, or write the value under the associated [[URef]]. + ADD_WRITE = AccessRights.ADD | AccessRights.WRITE, + // Permission to read, add to, or write the value under the associated [[URef]]. + READ_ADD_WRITE = AccessRights.READ | AccessRights.ADD | AccessRights.WRITE +} + +export class CLURefType extends CLType { + linksTo = CLURef; + tag = CLTypeTag.URef; + + toString(): string { + return UREF_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +const FORMATTED_STRING_PREFIX = 'uref'; +/** + * Length of [[URef]] address field. + * @internal + */ +const UREF_ADDR_LENGTH = 32; +/** + * Length of [[ACCESS_RIGHT]] field. + * @internal + */ +const ACCESS_RIGHT_LENGTH = 1; + +const UREF_BYTES_LENGTH = UREF_ADDR_LENGTH + ACCESS_RIGHT_LENGTH; + +export class CLURefBytesParser extends CLValueBytesParsers { + toBytes(val: CLURef): ToBytesResult { + return Ok(concat([val.data, Uint8Array.from([val.accessRights])])); + } + + fromBytesWithRemainder( + bytes: Uint8Array + ): ResultAndRemainder { + if (bytes.length < UREF_BYTES_LENGTH) { + return resultHelper(Err(CLErrorCodes.EarlyEndOfStream)); + } + + const urefBytes = bytes.subarray(0, UREF_ADDR_LENGTH); + const accessRights = bytes[UREF_BYTES_LENGTH - 1]; + const uref = new CLURef(urefBytes, accessRights); + return resultHelper(Ok(uref), bytes.subarray(UREF_BYTES_LENGTH)); + } +} + +export class CLURef extends CLValue { + data: Uint8Array; + accessRights: AccessRights; + + /** + * Constructs new instance of URef. + * @param uRefAddr Bytes representing address of the URef. + * @param accessRights Access rights flag. Use [[AccessRights.NONE]] to indicate no permissions. + */ + constructor(v: Uint8Array, accessRights: AccessRights) { + super(); + if (v.byteLength !== 32) { + throw new Error('The length of URefAddr should be 32'); + } + + if (!Object.values(AccessRights).includes(accessRights)) { + throw new Error('Unsuported AccessRights'); + } + + this.data = v; + this.accessRights = accessRights; + } + + /** + * Parses a casper-client supported string formatted argument into a `URef`. + */ + static fromFormattedStr(input: string): CLURef { + if (!input.startsWith(`${FORMATTED_STRING_PREFIX}-`)) { + throw new Error("Prefix is not 'uref-'"); + } + const parts = input + .substring(`${FORMATTED_STRING_PREFIX}-`.length) + .split('-', 2); + if (parts.length !== 2) { + throw new Error('No access rights as suffix'); + } + + const addr = decodeBase16(parts[0]); + const accessRight = parseInt(parts[1], 8) as AccessRights; + + return new CLURef(addr, accessRight); + } + + toFormattedStr(): string { + return [ + FORMATTED_STRING_PREFIX, + encodeBase16(this.data), + padNum(this.accessRights.toString(8), 3) + ].join('-'); + } + + clType(): CLType { + return new CLURefType(); + } + + value(): { data: Uint8Array; accessRights: AccessRights } { + return { data: this.data, accessRights: this.accessRights }; + } +} diff --git a/src/lib/CLValue/Unit.test.ts b/src/lib/CLValue/Unit.test.ts new file mode 100644 index 000000000..f9d560613 --- /dev/null +++ b/src/lib/CLValue/Unit.test.ts @@ -0,0 +1,23 @@ +import { expect } from 'chai'; +import { CLValueParsers, CLUnit } from './index'; + +describe('Unit implementation tests', () => { + it('Unit value() should return proper value', () => { + const unit = new CLUnit(); + expect(unit.value()).to.be.deep.eq(undefined); + }); + + it('Unit clType() should return proper type', () => { + const unit = new CLUnit(); + expect(unit.clType().toString()).to.be.eq('Unit'); + }); + + it('fromJSON() / toJSON()', () => { + const unit = new CLUnit(); + const json = CLValueParsers.toJSON(unit).unwrap(); + const expectedJson = JSON.parse('{"bytes":"","cl_type":"Unit"}'); + + expect(json).to.be.deep.eq(expectedJson); + expect(CLValueParsers.fromJSON(expectedJson).unwrap()).to.be.deep.eq(unit); + }); +}); diff --git a/src/lib/CLValue/Unit.ts b/src/lib/CLValue/Unit.ts new file mode 100644 index 000000000..2651287b2 --- /dev/null +++ b/src/lib/CLValue/Unit.ts @@ -0,0 +1,49 @@ +import { Ok } from 'ts-results'; + +import { + CLType, + CLValue, + CLValueBytesParsers, + CLErrorCodes, + ResultAndRemainder, + ToBytesResult, + resultHelper +} from './index'; +import { UNIT_ID, CLTypeTag } from './constants'; + +export class CLUnitType extends CLType { + tag = CLTypeTag.Unit; + linksTo = CLUnit; + + toString(): string { + return UNIT_ID; + } + + toJSON(): string { + return this.toString(); + } +} + +export class CLUnitBytesParser extends CLValueBytesParsers { + toBytes(): ToBytesResult { + return Ok(Uint8Array.from([])); + } + + fromBytesWithRemainder( + rawBytes: Uint8Array + ): ResultAndRemainder { + return resultHelper(Ok(new CLUnit()), rawBytes); + } +} + +export class CLUnit extends CLValue { + data = undefined; + + clType(): CLType { + return new CLUnitType(); + } + + value(): undefined { + return this.data; + } +} diff --git a/src/lib/CLValue/constants.ts b/src/lib/CLValue/constants.ts new file mode 100644 index 000000000..fb7155c26 --- /dev/null +++ b/src/lib/CLValue/constants.ts @@ -0,0 +1,96 @@ +/// The length in bytes of a [`AccountHash`]. +export const ACCOUNT_HASH_LENGTH = 32; + +export enum CLErrorCodes { + EarlyEndOfStream = 0, + Formatting, + LeftOverBytes = 'Left over bytes', + OutOfMemory = 'Out of memory exception', + UnknownValue = 'Unknown value' +} + +export enum KeyVariant { + Account, + Hash, + URef +} + +/** + * Casper types, i.e. types which can be stored and manipulated by smart contracts. + * + * Provides a description of the underlying data type of a [[CLValue]]. + */ +export enum CLTypeTag { + /** A boolean value */ + Bool = 0, + /** A 32-bit signed integer */ + I32 = 1, + /** A 64-bit signed integer */ + I64 = 2, + /** An 8-bit unsigned integer (a byte) */ + U8 = 3, + /** A 32-bit unsigned integer */ + U32 = 4, + /** A 64-bit unsigned integer */ + U64 = 5, + /** A 128-bit unsigned integer */ + U128 = 6, + /** A 256-bit unsigned integer */ + U256 = 7, + /** A 512-bit unsigned integer */ + U512 = 8, + /** A unit type, i.e. type with no values (analogous to `void` in C and `()` in Rust) */ + Unit = 9, + /** A string of characters */ + String = 10, + /** A key in the global state - URef/hash/etc. */ + Key = 11, + /** An Unforgeable Reference (URef) */ + URef = 12, + /** An [[Option]], i.e. a type that can contain a value or nothing at all */ + Option = 13, + /** A list of values */ + List = 14, + /** A fixed-length array of bytes */ + ByteArray = 15, + /** + * A [[Result]], i.e. a type that can contain either a value representing success or one representing failure. + */ + Result = 16, + /** A key-value map. */ + Map = 17, + /** A 1-value tuple. */ + Tuple1 = 18, + /** A 2-value tuple, i.e. a pair of values. */ + Tuple2 = 19, + /** A 3-value tuple. */ + Tuple3 = 20, + /** A value of any type. */ + Any = 21, + /** A value of public key type. */ + PublicKey = 22 +} + +export const BOOL_ID = 'Bool'; +export const KEY_ID = 'Key'; +export const PUBLIC_KEY_ID = 'PublicKey'; +export const STRING_ID = 'String'; +export const UREF_ID = 'URef'; +export const UNIT_ID = 'Unit'; +export const I32_ID = 'I32'; +export const I64_ID = 'I64'; +export const U8_ID = 'U8'; +export const U32_ID = 'U32'; +export const U64_ID = 'U64'; +export const U128_ID = 'U128'; +export const U256_ID = 'U256'; +export const U512_ID = 'U512'; + +export const BYTE_ARRAY_ID = 'ByteArray'; +export const LIST_ID = 'List'; +export const MAP_ID = 'Map'; +export const OPTION_ID = 'Option'; +export const RESULT_ID = 'Result'; +export const TUPLE1_ID = 'Tuple1'; +export const TUPLE2_ID = 'Tuple2'; +export const TUPLE3_ID = 'Tuple3'; diff --git a/src/lib/CLValue/index.ts b/src/lib/CLValue/index.ts new file mode 100644 index 000000000..efb8093fa --- /dev/null +++ b/src/lib/CLValue/index.ts @@ -0,0 +1,19 @@ +export * from './Abstract'; +export * from './Builders'; +export * from './ByteArray'; +export * from './Key'; +export * from './List'; +export * from './Map'; +export * from './Numeric'; +export * from './PublicKey'; +export * from './String'; +export * from './Tuple'; +export * from './URef'; +export * from './Unit'; +export * from './AccountHash'; +export * from './Bool'; +export * from './URef'; +export * from './Result'; +export * from './Option'; +export * from './constants'; +export * from './utils'; diff --git a/src/lib/CLValue/utils.ts b/src/lib/CLValue/utils.ts new file mode 100644 index 000000000..0d85b8360 --- /dev/null +++ b/src/lib/CLValue/utils.ts @@ -0,0 +1,394 @@ +import { Result, Ok, Err } from 'ts-results'; + +import { + BOOL_ID, + LIST_ID, + BYTE_ARRAY_ID, + KEY_ID, + PUBLIC_KEY_ID, + MAP_ID, + STRING_ID, + UREF_ID, + UNIT_ID, + RESULT_ID, + I32_ID, + I64_ID, + U8_ID, + U32_ID, + U64_ID, + U128_ID, + U256_ID, + U512_ID, + TUPLE1_ID, + TUPLE2_ID, + TUPLE3_ID, + OPTION_ID, + CLTypeTag +} from './constants'; +import { + CLValueBytesParsers, + CLType, + ResultAndRemainder, + resultHelper, + CLPublicKeyType, + CLPublicKeyBytesParser, + CLOptionType, + CLOptionBytesParser, + CLResultType, + CLResultBytesParser, + CLTuple1Type, + CLTuple2Type, + CLTuple3Type, + CLTupleBytesParser, + CLBoolType, + CLBoolBytesParser, + CLByteArrayType, + CLByteArrayBytesParser, + CLI32Type, + CLI64Type, + CLU8Type, + CLU32Type, + CLU64Type, + CLU128Type, + CLU256Type, + CLU512Type, + CLI32BytesParser, + CLI64BytesParser, + CLU8BytesParser, + CLU32BytesParser, + CLU64BytesParser, + CLU128BytesParser, + CLU256BytesParser, + CLU512BytesParser, + CLURefType, + CLURefBytesParser, + CLStringType, + CLStringBytesParser, + CLKeyType, + CLKeyBytesParser, + CLListType, + CLListBytesParser, + CLMapType, + CLMapBytesParser, + CLUnitType, + CLUnitBytesParser +} from './index'; + +export const TUPLE_MATCH_LEN_TO_ID = [TUPLE1_ID, TUPLE2_ID, TUPLE3_ID]; + +export const matchTypeToCLType = (type: any): CLType => { + if (typeof type === typeof 'string') { + switch (type) { + case BOOL_ID: + return new CLBoolType(); + case KEY_ID: + return new CLKeyType(); + case PUBLIC_KEY_ID: + return new CLPublicKeyType(); + case STRING_ID: + return new CLStringType(); + case UREF_ID: + return new CLURefType(); + case UNIT_ID: + return new CLUnitType(); + case I32_ID: + return new CLI32Type(); + case I64_ID: + return new CLI64Type(); + case U8_ID: + return new CLU8Type(); + case U32_ID: + return new CLU32Type(); + case U64_ID: + return new CLU64Type(); + case U128_ID: + return new CLU128Type(); + case U256_ID: + return new CLU256Type(); + case U512_ID: + return new CLU512Type(); + default: + throw new Error(`The simple type ${type} is not supported`); + } + } + + if (typeof type === typeof {}) { + if (LIST_ID in type) { + const inner = matchTypeToCLType(type[LIST_ID]); + return new CLListType(inner); + } + if (BYTE_ARRAY_ID in type) { + const size = type[BYTE_ARRAY_ID]; + return new CLByteArrayType(size); + } + if (MAP_ID in type) { + const keyType = matchTypeToCLType(type[MAP_ID].key); + const valType = matchTypeToCLType(type[MAP_ID].value); + return new CLMapType([keyType, valType]); + } + if (TUPLE1_ID in type) { + const vals = type[TUPLE1_ID].map((t: any) => matchTypeToCLType(t)); + return new CLTuple1Type(vals); + } + if (TUPLE2_ID in type) { + const vals = type[TUPLE2_ID].map((t: any) => matchTypeToCLType(t)); + return new CLTuple2Type(vals); + } + if (TUPLE3_ID in type) { + const vals = type[TUPLE3_ID].map((t: any) => matchTypeToCLType(t)); + return new CLTuple3Type(vals); + } + if (OPTION_ID in type) { + const inner = matchTypeToCLType(type[OPTION_ID]); + return new CLOptionType(inner); + } + if (RESULT_ID in type) { + const innerOk = matchTypeToCLType(type[RESULT_ID].ok); + const innerErr = matchTypeToCLType(type[RESULT_ID].err); + return new CLResultType({ ok: innerOk, err: innerErr }); + } + throw new Error(`The complex type ${type} is not supported`); + } + + throw new Error(`Unknown data provided.`); +}; + +export const matchByteParserByCLType = ( + val: CLType +): Result => { + if (val.tag === CLTypeTag.Bool) { + return Ok(new CLBoolBytesParser()); + } + if (val.tag === CLTypeTag.I32) { + return Ok(new CLI32BytesParser()); + } + if (val.tag === CLTypeTag.I64) { + return Ok(new CLI64BytesParser()); + } + if (val.tag === CLTypeTag.U8) { + return Ok(new CLU8BytesParser()); + } + if (val.tag === CLTypeTag.U32) { + return Ok(new CLU32BytesParser()); + } + if (val.tag === CLTypeTag.U64) { + return Ok(new CLU64BytesParser()); + } + if (val.tag === CLTypeTag.U128) { + return Ok(new CLU128BytesParser()); + } + if (val.tag === CLTypeTag.U256) { + return Ok(new CLU256BytesParser()); + } + if (val.tag === CLTypeTag.U512) { + return Ok(new CLU512BytesParser()); + } + if (val.tag === CLTypeTag.ByteArray) { + return Ok(new CLByteArrayBytesParser()); + } + if (val.tag === CLTypeTag.URef) { + return Ok(new CLURefBytesParser()); + } + if (val.tag === CLTypeTag.Key) { + return Ok(new CLKeyBytesParser()); + } + if (val.tag === CLTypeTag.PublicKey) { + return Ok(new CLPublicKeyBytesParser()); + } + if (val.tag === CLTypeTag.List) { + return Ok(new CLListBytesParser()); + } + if (val.tag === CLTypeTag.Map) { + return Ok(new CLMapBytesParser()); + } + if ( + val.tag === CLTypeTag.Tuple1 || + val.tag === CLTypeTag.Tuple2 || + val.tag === CLTypeTag.Tuple3 + ) { + return Ok(new CLTupleBytesParser()); + } + if (val.tag === CLTypeTag.Option) { + return Ok(new CLOptionBytesParser()); + } + if (val.tag === CLTypeTag.Result) { + return Ok(new CLResultBytesParser()); + } + if (val.tag === CLTypeTag.String) { + return Ok(new CLStringBytesParser()); + } + if (val.tag === CLTypeTag.Unit) { + return Ok(new CLUnitBytesParser()); + } + return Err('Unknown type'); +}; + +export const matchBytesToCLType = ( + bytes: Uint8Array +): ResultAndRemainder => { + const tag = bytes[0]; + const remainder = bytes.subarray(1); + + switch (tag) { + case CLTypeTag.Bool: + return resultHelper(Ok(new CLBoolType()), remainder); + case CLTypeTag.I32: + return resultHelper(Ok(new CLI32Type()), remainder); + case CLTypeTag.I64: + return resultHelper(Ok(new CLI64Type()), remainder); + case CLTypeTag.U8: + return resultHelper(Ok(new CLU8Type()), remainder); + case CLTypeTag.U32: + return resultHelper(Ok(new CLU32Type()), remainder); + case CLTypeTag.U64: + return resultHelper(Ok(new CLU64Type()), remainder); + case CLTypeTag.U64: + return resultHelper(Ok(new CLU64Type()), remainder); + case CLTypeTag.U128: + return resultHelper(Ok(new CLU128Type()), remainder); + case CLTypeTag.U256: + return resultHelper(Ok(new CLU256Type()), remainder); + case CLTypeTag.U512: + return resultHelper(Ok(new CLU512Type()), remainder); + case CLTypeTag.Unit: + return resultHelper(Ok(new CLUnitType()), remainder); + case CLTypeTag.String: + return resultHelper(Ok(new CLStringType()), remainder); + case CLTypeTag.Key: + return resultHelper(Ok(new CLKeyType()), remainder); + case CLTypeTag.URef: + return resultHelper(Ok(new CLURefType()), remainder); + case CLTypeTag.Option: { + const { result, remainder: typeRem } = matchBytesToCLType(remainder); + + const innerType = result.unwrap(); + + return resultHelper(Ok(new CLOptionType(innerType)), typeRem); + } + case CLTypeTag.List: { + const { result, remainder: typeRem } = matchBytesToCLType(remainder); + + const innerType = result.unwrap(); + + return resultHelper(Ok(new CLListType(innerType)), typeRem); + } + case CLTypeTag.ByteArray: { + const { result, remainder: typeRem } = matchBytesToCLType(remainder); + const innerType = result.unwrap(); + return resultHelper(Ok(new CLListType(innerType)), typeRem); + } + case CLTypeTag.Result: { + const { result: okTypeRes, remainder: okTypeRem } = matchBytesToCLType( + remainder + ); + const okType = okTypeRes.unwrap(); + + if (!okTypeRem) + return resultHelper(Err('Missing Error type bytes in Result')); + + const { result: errTypeRes, remainder: rem } = matchBytesToCLType( + okTypeRem + ); + const errType = errTypeRes.unwrap(); + + return resultHelper( + Ok(new CLResultType({ ok: okType, err: errType })), + rem + ); + } + case CLTypeTag.Map: { + const { result: keyTypeRes, remainder: keyTypeRem } = matchBytesToCLType( + remainder + ); + const keyType = keyTypeRes.unwrap(); + + if (!keyTypeRem) + return resultHelper(Err('Missing Key type bytes in Map')); + + const { result: valTypeRes, remainder: rem } = matchBytesToCLType( + keyTypeRem + ); + const valType = valTypeRes.unwrap(); + + return resultHelper(Ok(new CLMapType([keyType, valType])), rem); + } + case CLTypeTag.Tuple1: { + const { result: innerTypeRes, remainder: rem } = matchBytesToCLType( + remainder + ); + const innerType = innerTypeRes.unwrap(); + + return resultHelper(Ok(new CLTuple1Type([innerType])), rem); + } + case CLTypeTag.Tuple2: { + const { + result: innerType1Res, + remainder: innerType1Rem + } = matchBytesToCLType(remainder); + const innerType1 = innerType1Res.unwrap(); + + if (!innerType1Rem) { + return resultHelper( + Err('Missing second tuple type bytes in CLTuple2Type') + ); + } + + const { + result: innerType2Res, + remainder: innerType2Rem + } = matchBytesToCLType(innerType1Rem); + const innerType2 = innerType2Res.unwrap(); + + return resultHelper( + Ok(new CLTuple1Type([innerType1, innerType2])), + innerType2Rem + ); + } + case CLTypeTag.Tuple3: { + const { + result: innerType1Res, + remainder: innerType1Rem + } = matchBytesToCLType(remainder); + const innerType1 = innerType1Res.unwrap(); + + if (!innerType1Rem) { + return resultHelper( + Err('Missing second tuple type bytes in CLTuple2Type') + ); + } + + const { + result: innerType2Res, + remainder: innerType2Rem + } = matchBytesToCLType(innerType1Rem); + const innerType2 = innerType2Res.unwrap(); + + if (!innerType2Rem) { + return resultHelper( + Err('Missing third tuple type bytes in CLTuple2Type') + ); + } + + const { + result: innerType3Res, + remainder: innerType3Rem + } = matchBytesToCLType(innerType2Rem); + const innerType3 = innerType3Res.unwrap(); + + return resultHelper( + Ok(new CLTuple1Type([innerType1, innerType2, innerType3])), + innerType3Rem + ); + } + case CLTypeTag.Any: { + return resultHelper(Err('Any unsupported')); + } + case CLTypeTag.PublicKey: + return resultHelper(Ok(new CLPublicKeyType())); + } + + return resultHelper(Err('Unsuported type')); +}; + +export const padNum = (v: string, n = 1): string => + new Array(n).join('0').slice((n || 2) * -1) + v; diff --git a/src/lib/CasperClient.ts b/src/lib/CasperClient.ts index 8dbc6fe55..53305c3a9 100644 --- a/src/lib/CasperClient.ts +++ b/src/lib/CasperClient.ts @@ -1,8 +1,5 @@ -import { - CasperServiceByJsonRPC, - GetDeployResult -} from '../services'; -import { DeployUtil, Keys, PublicKey } from './index'; +import { CasperServiceByJsonRPC, GetDeployResult } from '../services'; +import { DeployUtil, Keys, CLPublicKey } from './index'; import { encodeBase16 } from './Conversions'; import { Deploy, DeployParams, ExecutableDeployItem } from './DeployUtil'; import { AsymmetricKey, SignatureAlgorithm } from './Keys'; @@ -186,7 +183,9 @@ export class CasperClient { /** * Get the balance of public key */ - public async balanceOfByPublicKey(publicKey: PublicKey): Promise { + public async balanceOfByPublicKey( + publicKey: CLPublicKey + ): Promise { return this.balanceOfByAccountHash(encodeBase16(publicKey.toAccountHash())); } @@ -233,7 +232,7 @@ export class CasperClient { return await this.nodeClient .getDeployInfo(deployHash) .then((result: GetDeployResult) => { - return [DeployUtil.deployFromJson(result)!, result]; + return [DeployUtil.deployFromJson(result).unwrap(), result]; }); } @@ -242,7 +241,7 @@ export class CasperClient { * @param publicKey */ public async getAccountMainPurseUref( - publicKey: PublicKey + publicKey: CLPublicKey ): Promise { const stateRootHash = await this.nodeClient .getLatestBlockInfo() diff --git a/src/lib/Contracts.ts b/src/lib/Contracts.ts index c21f0ea02..ddb0c6f6c 100644 --- a/src/lib/Contracts.ts +++ b/src/lib/Contracts.ts @@ -1,10 +1,10 @@ import blake from 'blakejs'; import * as fs from 'fs'; -import { PublicKey } from '../index'; +import { CLPublicKey } from '../index'; import * as DeployUtil from './DeployUtil'; import { DeployParams, ExecutableDeployItem } from './DeployUtil'; import { RuntimeArgs } from './RuntimeArgs'; -import { AccountHash, CLValue, KeyValue } from './CLValue'; +import { CLAccountHash, CLValueBuilder, CLKey } from './CLValue'; import { AsymmetricKey } from './Keys'; // https://www.npmjs.com/package/tweetnacl-ts @@ -49,13 +49,13 @@ export class Contract { public deploy( args: RuntimeArgs, paymentAmount: bigint, - accountPublicKey: PublicKey, + accountPublicKey: CLPublicKey, signingKeyPair: AsymmetricKey, chainName: string ): DeployUtil.Deploy { const session = ExecutableDeployItem.newModuleBytes(this.sessionWasm, args); const paymentArgs = RuntimeArgs.fromMap({ - amount: CLValue.u512(paymentAmount.toString()) + amount: CLValueBuilder.u512(paymentAmount.toString()) }); const payment = ExecutableDeployItem.newModuleBytes( @@ -103,11 +103,9 @@ export class Faucet { * @param accountPublicKeyHash the public key hash that want to be funded */ public static args(accountPublicKeyHash: Uint8Array): RuntimeArgs { - const accountKey = KeyValue.fromAccount( - new AccountHash(accountPublicKeyHash) - ); + const accountKey = new CLKey(new CLAccountHash(accountPublicKeyHash)); return RuntimeArgs.fromMap({ - account: CLValue.key(accountKey) + account: accountKey }); } } @@ -123,12 +121,10 @@ export class Transfer { accountPublicKeyHash: Uint8Array, amount: bigint ): RuntimeArgs { - const account = CLValue.key( - KeyValue.fromAccount(new AccountHash(accountPublicKeyHash)) - ); + const account = CLValueBuilder.key(new CLAccountHash(accountPublicKeyHash)); return RuntimeArgs.fromMap({ account, - amount: CLValue.u512(amount.toString()) + amount: CLValueBuilder.u512(amount.toString()) }); } } diff --git a/src/lib/DeployUtil.ts b/src/lib/DeployUtil.ts index cdbe25919..ff030284c 100644 --- a/src/lib/DeployUtil.ts +++ b/src/lib/DeployUtil.ts @@ -3,18 +3,25 @@ * * @packageDocumentation */ +import { Result, Ok, Err, Some, None } from 'ts-results'; import { concat } from '@ethersproject/bytes'; import blake from 'blakejs'; -import { Option } from './option'; import { decodeBase16, encodeBase16 } from './Conversions'; import humanizeDuration from 'humanize-duration'; import { - CLTypedAndToBytesHelper, - CLTypeHelper, CLValue, - PublicKey, + CLValueBuilder, + CLTypeBuilder, + CLValueParsers, + CLPublicKey, ToBytes, - U32 + CLU32, + CLU32Type, + CLU64, + CLU64Type, + CLOption, + CLURef, + ToBytesResult } from './CLValue'; import { toBytesArrayU8, @@ -22,17 +29,16 @@ import { toBytesDeployHash, toBytesString, toBytesU64, - toBytesVecT, - toBytesU32 -} from './byterepr'; + toBytesU32, + toBytesVector +} from './ByteConverters'; import { RuntimeArgs } from './RuntimeArgs'; // import JSBI from 'jsbi'; -import { DeployUtil, Keys, URef } from './index'; +import { DeployUtil, Keys } from './index'; import { AsymmetricKey, SignatureAlgorithm } from './Keys'; import { BigNumber, BigNumberish } from '@ethersproject/bignumber'; import { jsonArrayMember, jsonMember, jsonObject, TypedJSON } from 'typedjson'; import { ByteArray } from 'tweetnacl-ts'; -import { Result, Ok, Err } from 'ts-results'; const shortEnglishHumanizer = humanizeDuration.humanizer({ spacer: '', @@ -103,17 +109,17 @@ export const dehumanizerTTL = (ttl: string): number => { }; export class UniqAddress { - publicKey: PublicKey; + publicKey: CLPublicKey; transferId: BigNumber; /** * Constructs UniqAddress - * @param publicKey PublicKey instance + * @param publicKey CLPublicKey instance * @param transferId BigNumberish value (can be also string representing number). Max U64. */ - constructor(publicKey: PublicKey, transferId: BigNumberish) { - if (!(publicKey instanceof PublicKey)) { - throw new Error('publicKey is not an instance of PublicKey'); + constructor(publicKey: CLPublicKey, transferId: BigNumberish) { + if (!(publicKey instanceof CLPublicKey)) { + throw new Error('publicKey is not an instance of CLPublicKey'); } const bigNum = BigNumber.from(transferId); if (bigNum.gt('18446744073709551615')) { @@ -128,7 +134,7 @@ export class UniqAddress { * @param ttl in humanized string */ toString(): string { - return `${this.publicKey.toAccountHex()}-${this.transferId.toHexString()}`; + return `${this.publicKey.toHex()}-${this.transferId.toHexString()}`; } /** @@ -137,7 +143,7 @@ export class UniqAddress { */ static fromString(value: string): UniqAddress { const [accountHex, transferHex] = value.split('-'); - const publicKey = PublicKey.fromHex(accountHex); + const publicKey = CLPublicKey.fromHex(accountHex); return new UniqAddress(publicKey, transferHex); } } @@ -145,14 +151,14 @@ export class UniqAddress { @jsonObject export class DeployHeader implements ToBytes { @jsonMember({ - serializer: (account: PublicKey) => { - return account.toAccountHex(); + serializer: (account: CLPublicKey) => { + return account.toHex(); }, deserializer: (hexStr: string) => { - return PublicKey.fromHex(hexStr); + return CLPublicKey.fromHex(hexStr); } }) - public account: PublicKey; + public account: CLPublicKey; @jsonMember({ serializer: (n: number) => new Date(n).toISOString(), @@ -199,7 +205,7 @@ export class DeployHeader implements ToBytes { * @param chainName Which chain the deploy is supposed to be run on. */ constructor( - account: PublicKey, + account: CLPublicKey, timestamp: number, ttl: number, gasPrice: number, @@ -216,16 +222,18 @@ export class DeployHeader implements ToBytes { this.chainName = chainName; } - public toBytes(): Uint8Array { - return concat([ - this.account.toBytes(), - toBytesU64(this.timestamp), - toBytesU64(this.ttl), - toBytesU64(this.gasPrice), - toBytesDeployHash(this.bodyHash), - toBytesVecT(this.dependencies.map(d => new DeployHash(d))), - toBytesString(this.chainName) - ]); + public toBytes(): ToBytesResult { + return Ok( + concat([ + CLValueParsers.toBytes(this.account).unwrap(), + toBytesU64(this.timestamp), + toBytesU64(this.ttl), + toBytesU64(this.gasPrice), + toBytesDeployHash(this.bodyHash), + toBytesVector(this.dependencies.map(d => new DeployHash(d))), + toBytesString(this.chainName) + ]) + ); } } @@ -235,8 +243,8 @@ export class DeployHeader implements ToBytes { class DeployHash implements ToBytes { constructor(private hash: Uint8Array) {} - public toBytes(): Uint8Array { - return toBytesDeployHash(this.hash); + public toBytes(): ToBytesResult { + return Ok(toBytesDeployHash(this.hash)); } } @@ -264,7 +272,7 @@ abstract class ExecutableDeployItemInternal implements ToBytes { public abstract args: RuntimeArgs; - public abstract toBytes(): Uint8Array; + public abstract toBytes(): ToBytesResult; public getArgByName(name: string): CLValue | undefined { return this.args.args.get(name); @@ -313,12 +321,14 @@ export class ModuleBytes extends ExecutableDeployItemInternal { this.args = args; } - public toBytes(): Uint8Array { - return concat([ - Uint8Array.from([this.tag]), - toBytesArrayU8(this.moduleBytes), - toBytesBytesArray(this.args.toBytes()) - ]); + public toBytes(): ToBytesResult { + return Ok( + concat([ + Uint8Array.from([this.tag]), + toBytesArrayU8(this.moduleBytes), + toBytesBytesArray(this.args.toBytes().unwrap()) + ]) + ); } } @@ -352,13 +362,15 @@ export class StoredContractByHash extends ExecutableDeployItemInternal { this.hash = hash; } - public toBytes(): Uint8Array { - return concat([ - Uint8Array.from([this.tag]), - toBytesBytesArray(this.hash), - toBytesString(this.entryPoint), - toBytesBytesArray(this.args.toBytes()) - ]); + public toBytes(): ToBytesResult { + return Ok( + concat([ + Uint8Array.from([this.tag]), + toBytesBytesArray(this.hash), + toBytesString(this.entryPoint), + toBytesBytesArray(this.args.toBytes().unwrap()) + ]) + ); } } @@ -389,13 +401,15 @@ export class StoredContractByName extends ExecutableDeployItemInternal { this.args = args; } - public toBytes(): Uint8Array { - return concat([ - Uint8Array.from([this.tag]), - toBytesString(this.name), - toBytesString(this.entryPoint), - toBytesBytesArray(this.args.toBytes()) - ]); + public toBytes(): ToBytesResult { + return Ok( + concat([ + Uint8Array.from([this.tag]), + toBytesString(this.name), + toBytesString(this.entryPoint), + toBytesBytesArray(this.args.toBytes().unwrap()) + ]) + ); } } @@ -431,20 +445,22 @@ export class StoredVersionedContractByName extends ExecutableDeployItemInternal this.args = args; } - public toBytes(): Uint8Array { + public toBytes(): ToBytesResult { let serializedVersion; if (this.version === null) { - serializedVersion = new Option(null, CLTypeHelper.u32()); + serializedVersion = new CLOption(None, new CLU32Type()); } else { - serializedVersion = new Option(new U32(this.version as number)); + serializedVersion = new CLOption(Some(new CLU32(this.version as number))); } - return concat([ - Uint8Array.from([this.tag]), - toBytesString(this.name), - serializedVersion.toBytes(), - toBytesString(this.entryPoint), - toBytesBytesArray(this.args.toBytes()) - ]); + return Ok( + concat([ + Uint8Array.from([this.tag]), + toBytesString(this.name), + CLValueParsers.toBytes(serializedVersion).unwrap(), + toBytesString(this.entryPoint), + toBytesBytesArray(this.args.toBytes().unwrap()) + ]) + ); } } @@ -489,21 +505,23 @@ export class StoredVersionedContractByHash extends ExecutableDeployItemInternal this.args = args; } - public toBytes(): Uint8Array { + public toBytes(): ToBytesResult { let serializedVersion; if (this.version === null) { - serializedVersion = new Option(null, CLTypeHelper.u32()); + serializedVersion = new CLOption(None, new CLU32Type()); } else { - serializedVersion = new Option(new U32(this.version as number)); + serializedVersion = new CLOption(Some(new CLU32(this.version as number))); } - return concat([ - Uint8Array.from([this.tag]), - toBytesBytesArray(this.hash), - serializedVersion.toBytes(), - toBytesString(this.entryPoint), - toBytesBytesArray(this.args.toBytes()) - ]); + return Ok( + concat([ + Uint8Array.from([this.tag]), + toBytesBytesArray(this.hash), + CLValueParsers.toBytes(serializedVersion).unwrap(), + toBytesString(this.entryPoint), + toBytesBytesArray(this.args.toBytes().unwrap()) + ]) + ); } } @@ -520,7 +538,7 @@ export class Transfer extends ExecutableDeployItemInternal { /** * Constructor for Transfer deploy item. * @param amount The number of motes to transfer - * @param target URef of the target purse or the public key of target account. You could generate this public key from accountHex by PublicKey.fromHex + * @param target URef of the target purse or the public key of target account. You could generate this public key from accountHex by CLPublicKey.fromHex * @param sourcePurse URef of the source purse. If this is omitted, the main purse of the account creating this \ * transfer will be used as the source purse * @param id user-defined transfer id @@ -530,11 +548,13 @@ export class Transfer extends ExecutableDeployItemInternal { this.args = args; } - public toBytes(): Uint8Array { - return concat([ - Uint8Array.from([this.tag]), - toBytesBytesArray(this.args.toBytes()) - ]); + public toBytes(): ToBytesResult { + return Ok( + concat([ + Uint8Array.from([this.tag]), + toBytesBytesArray(this.args.toBytes().unwrap()) + ]) + ); } } @@ -575,7 +595,7 @@ export class ExecutableDeployItem implements ToBytes { }) public transfer?: Transfer; - public toBytes(): Uint8Array { + public toBytes(): ToBytesResult { if (this.isModuleBytes()) { return this.moduleBytes!.toBytes(); } else if (this.isStoredContractByHash()) { @@ -707,26 +727,26 @@ export class ExecutableDeployItem implements ToBytes { /** * Constructor for Transfer deploy item. * @param amount The number of motes to transfer - * @param target URef of the target purse or the public key of target account. You could generate this public key from accountHex by PublicKey.fromHex + * @param target URef of the target purse or the public key of target account. You could generate this public key from accountHex by CLPublicKey.fromHex * @param sourcePurse URef of the source purse. If this is omitted, the main purse of the account creating this \ * transfer will be used as the source purse * @param id user-defined transfer id. This parameter is required. */ public static newTransfer( amount: BigNumberish, - target: URef | PublicKey, - sourcePurse: URef | null = null, + target: CLURef | CLPublicKey, + sourcePurse: CLURef | null = null, id: BigNumberish - ) { + ): ExecutableDeployItem { const runtimeArgs = RuntimeArgs.fromMap({}); - runtimeArgs.insert('amount', CLValue.u512(amount)); + runtimeArgs.insert('amount', CLValueBuilder.u512(amount)); if (sourcePurse) { - runtimeArgs.insert('source', CLValue.uref(sourcePurse)); + runtimeArgs.insert('source', sourcePurse); } - if (target instanceof URef) { - runtimeArgs.insert('target', CLValue.uref(target)); - } else if (target instanceof PublicKey) { - runtimeArgs.insert('target', CLValue.byteArray(target.toAccountHash())); + if (target instanceof CLURef) { + runtimeArgs.insert('target', target); + } else if (target instanceof CLPublicKey) { + runtimeArgs.insert('target', target); } else { throw new Error('Please specify target'); } @@ -735,7 +755,7 @@ export class ExecutableDeployItem implements ToBytes { } else { runtimeArgs.insert( 'id', - CLValue.option(CLTypedAndToBytesHelper.u64(id), CLTypeHelper.u64()) + CLValueBuilder.option(Some(new CLU64(id)), new CLU64Type()) ); } return ExecutableDeployItem.fromExecutableDeployItemInternal( @@ -754,29 +774,35 @@ export class ExecutableDeployItem implements ToBytes { */ public static newTransferWithOptionalTransferId( amount: BigNumberish, - target: URef | PublicKey, - sourcePurse?: URef | null, + target: CLURef | CLPublicKey, + sourcePurse?: CLURef | null, id?: BigNumberish ) { const runtimeArgs = RuntimeArgs.fromMap({}); - runtimeArgs.insert('amount', CLValue.u512(amount)); + runtimeArgs.insert('amount', CLValueBuilder.u512(amount)); if (sourcePurse) { - runtimeArgs.insert('source', CLValue.uref(sourcePurse)); + runtimeArgs.insert('source', sourcePurse); } - if (target instanceof URef) { - runtimeArgs.insert('target', CLValue.uref(target)); - } else if (target instanceof PublicKey) { - runtimeArgs.insert('target', CLValue.byteArray(target.toAccountHash())); + if (target instanceof CLURef) { + runtimeArgs.insert('target', target); + } else if (target instanceof CLPublicKey) { + runtimeArgs.insert( + 'target', + CLValueBuilder.byteArray(target.toAccountHash()) + ); } else { throw new Error('Please specify target'); } if (id !== undefined && id !== null) { runtimeArgs.insert( 'id', - CLValue.option(CLTypedAndToBytesHelper.u64(id), CLTypeHelper.u64()) + CLValueBuilder.option(Some(CLValueBuilder.u64(id)), CLTypeBuilder.u64()) ); } else { - runtimeArgs.insert('id', CLValue.option(null, CLTypeHelper.u64())); + runtimeArgs.insert( + 'id', + CLValueBuilder.option(None, CLTypeBuilder.u64()) + ); } return ExecutableDeployItem.fromExecutableDeployItemInternal( @@ -797,14 +823,14 @@ export class ExecutableDeployItem implements ToBytes { * transfer will be used as the source purse */ public static newTransferToUniqAddress( - source: PublicKey, + source: CLPublicKey, target: UniqAddress, amount: BigNumberish, paymentAmount: BigNumberish, chainName: string, gasPrice = 1, ttl = 1800000, - sourcePurse?: URef + sourcePurse?: CLURef ): Deploy { const deployParams = new DeployUtil.DeployParams( source, @@ -943,7 +969,7 @@ export class Deploy { * Serialize deployHeader into a array of bytes * @param deployHeader */ -export const serializeHeader = (deployHeader: DeployHeader): Uint8Array => { +export const serializeHeader = (deployHeader: DeployHeader): ToBytesResult => { return deployHeader.toBytes(); }; @@ -956,7 +982,7 @@ export const serializeBody = ( payment: ExecutableDeployItem, session: ExecutableDeployItem ): Uint8Array => { - return concat([payment.toBytes(), session.toBytes()]); + return concat([payment.toBytes().unwrap(), session.toBytes().unwrap()]); }; export const serializeApprovals = (approvals: Approval[]): Uint8Array => { @@ -992,7 +1018,7 @@ export class DeployParams { * @param timestamp If `timestamp` is empty, the current time will be used. Note that timestamp is UTC, not local. */ constructor( - public accountPublicKey: PublicKey, + public accountPublicKey: CLPublicKey, public chainName: string, public gasPrice: number = 1, public ttl: number = 1800000, @@ -1030,7 +1056,7 @@ export function makeDeploy( deployParam.chainName ); const serializedHeader = serializeHeader(header); - const deployHash = blake.blake2b(serializedHeader, null, 32); + const deployHash = blake.blake2b(serializedHeader.unwrap(), null, 32); return new Deploy(deployHash, header, payment, session, []); } @@ -1070,17 +1096,16 @@ export const signDeploy = ( export const setSignature = ( deploy: Deploy, sig: Uint8Array, - publicKey: PublicKey + publicKey: CLPublicKey ): Deploy => { const approval = new Approval(); - approval.signer = publicKey.toAccountHex(); - switch (publicKey.signatureAlgorithm()) { - case SignatureAlgorithm.Ed25519: - approval.signature = Keys.Ed25519.accountHex(sig); - break; - case SignatureAlgorithm.Secp256K1: - approval.signature = Keys.Secp256K1.accountHex(sig); - break; + approval.signer = publicKey.toHex(); + // TBD: Make sure it is proper + if (publicKey.isEd25519()) { + approval.signature = Keys.Ed25519.accountHex(sig); + } + if (publicKey.isSecp256K1()) { + approval.signature = Keys.Secp256K1.accountHex(sig); } deploy.approvals.push(approval); return deploy; @@ -1093,7 +1118,7 @@ export const setSignature = ( */ export const standardPayment = (paymentAmount: BigNumberish) => { const paymentArgs = RuntimeArgs.fromMap({ - amount: CLValue.u512(paymentAmount.toString()) + amount: CLValueBuilder.u512(paymentAmount.toString()) }); return ExecutableDeployItem.newModuleBytes(Uint8Array.from([]), paymentArgs); @@ -1116,13 +1141,28 @@ export const deployToJson = (deploy: Deploy) => { * * @param json */ -export const deployFromJson = (json: any) => { - const serializer = new TypedJSON(Deploy); - const deploy = serializer.parse(json.deploy); - if (deploy !== undefined && validateDeploy(deploy).ok) { - return deploy; +export const deployFromJson = (json: any): Result => { + if (json.deploy === undefined) { + return new Err(new Error("The Deploy JSON doesn't have 'deploy' field.")); + } + let deploy = null; + try { + const serializer = new TypedJSON(Deploy); + deploy = serializer.parse(json.deploy); + } catch (serializationError) { + return new Err(serializationError); } - return undefined; + + if (deploy === undefined || deploy === null) { + return Err(new Error("The JSON can't be parsed as a Deploy.")); + } + + const valid = validateDeploy(deploy); + if (valid.err) { + return new Err(new Error(valid.val)); + } + + return new Ok(deploy); }; export const addArgToDeploy = ( @@ -1152,7 +1192,7 @@ export const addArgToDeploy = ( export const deploySizeInBytes = (deploy: Deploy): number => { const hashSize = deploy.hash.length; const bodySize = serializeBody(deploy.payment, deploy.session).length; - const headerSize = serializeHeader(deploy.header).length; + const headerSize = serializeHeader(deploy.header).unwrap().length; const approvalsSize = deploy.approvals .map(approval => { return (approval.signature.length + approval.signer.length) / 2; @@ -1163,6 +1203,10 @@ export const deploySizeInBytes = (deploy: Deploy): number => { }; export const validateDeploy = (deploy: Deploy): Result => { + if (!(deploy instanceof Deploy)) { + return new Err("'deploy' is not an instance of Deploy class."); + } + const serializedBody = serializeBody(deploy.payment, deploy.session); const bodyHash = blake.blake2b(serializedBody, null, 32); @@ -1171,7 +1215,7 @@ export const validateDeploy = (deploy: Deploy): Result => { got: ${deploy.header.bodyHash}.`); } - const serializedHeader = serializeHeader(deploy.header); + const serializedHeader = serializeHeader(deploy.header).unwrap(); const deployHash = blake.blake2b(serializedHeader, null, 32); if (!arrayEquals(deploy.hash, deployHash)) { @@ -1184,13 +1228,13 @@ export const validateDeploy = (deploy: Deploy): Result => { return Ok(deploy); }; -const arrayEquals = (a: Uint8Array, b: Uint8Array): boolean => { +export const arrayEquals = (a: Uint8Array, b: Uint8Array): boolean => { return a.length === b.length && a.every((val, index) => val === b[index]); }; export const deployToBytes = (deploy: Deploy): Uint8Array => { return concat([ - serializeHeader(deploy.header), + serializeHeader(deploy.header).unwrap(), deploy.hash, serializeBody(deploy.payment, deploy.session), serializeApprovals(deploy.approvals) diff --git a/src/lib/Keys.ts b/src/lib/Keys.ts index d3897e602..84c33cc17 100644 --- a/src/lib/Keys.ts +++ b/src/lib/Keys.ts @@ -3,9 +3,9 @@ import * as nacl from 'tweetnacl-ts'; import { SignKeyPair, SignLength } from 'tweetnacl-ts'; import { decodeBase64 } from 'tweetnacl-util'; import { encodeBase16, encodeBase64 } from '../index'; -import { PublicKey } from '../lib/index'; +import { CLPublicKey } from './CLValue'; import { byteHash } from './Contracts'; -import eccrypto from "eccrypto"; +import eccrypto from 'eccrypto'; import * as secp256k1 from 'ethereum-cryptography/secp256k1'; import KeyEncoder from 'key-encoder'; import { sha256 } from 'ethereum-cryptography/sha256'; @@ -65,7 +65,7 @@ export function readBase64WithPEM(content: string): Uint8Array { } export abstract class AsymmetricKey { - public readonly publicKey: PublicKey; + public readonly publicKey: CLPublicKey; public readonly privateKey: Uint8Array; public readonly signatureAlgorithm: SignatureAlgorithm; @@ -74,7 +74,7 @@ export abstract class AsymmetricKey { privateKey: Uint8Array, signatureAlgorithm: SignatureAlgorithm ) { - this.publicKey = PublicKey.from(publicKey, signatureAlgorithm); + this.publicKey = new CLPublicKey(publicKey, signatureAlgorithm); this.privateKey = privateKey; this.signatureAlgorithm = signatureAlgorithm; } @@ -90,7 +90,7 @@ export abstract class AsymmetricKey { * Get the account hex */ public accountHex(): string { - return this.publicKey.toAccountHex(); + return this.publicKey.toHex(); } protected toPem(tag: string, content: string) { @@ -258,7 +258,7 @@ export class Ed25519 extends AsymmetricKey { // prettier-ignore const derPrefix = Buffer.from([48, 42, 48, 5, 6, 3, 43, 101, 112, 3, 33, 0]); const encoded = encodeBase64( - Buffer.concat([derPrefix, Buffer.from(this.publicKey.rawPublicKey)]) + Buffer.concat([derPrefix, Buffer.from(this.publicKey.value())]) ); return this.toPem(ED25519_PEM_PUBLIC_KEY_TAG, encoded); } @@ -277,11 +277,7 @@ export class Ed25519 extends AsymmetricKey { * @param msg */ public verify(signature: Uint8Array, msg: Uint8Array) { - return nacl.sign_detached_verify( - msg, - signature, - this.publicKey.rawPublicKey - ); + return nacl.sign_detached_verify(msg, signature, this.publicKey.value()); } /** @@ -402,9 +398,7 @@ export class Secp256K1 extends AsymmetricKey { rawKeyHex = encodeBase16(bytes); } - const publicKey = Uint8Array.from( - Buffer.from(rawKeyHex, 'hex') - ); + const publicKey = Uint8Array.from(Buffer.from(rawKeyHex, 'hex')); return publicKey; } @@ -438,7 +432,7 @@ export class Secp256K1 extends AsymmetricKey { */ public exportPublicKeyInPem(): string { return keyEncoder.encodePublic( - encodeBase16(this.publicKey.rawPublicKey), + encodeBase16(this.publicKey.value()), 'raw', 'pem' ); @@ -462,7 +456,7 @@ export class Secp256K1 extends AsymmetricKey { return secp256k1.ecdsaVerify( signature, sha256(Buffer.from(msg)), - this.publicKey.rawPublicKey + this.publicKey.value() ); } diff --git a/src/lib/RuntimeArgs.ts b/src/lib/RuntimeArgs.ts index 5a621c046..5dbf59854 100644 --- a/src/lib/RuntimeArgs.ts +++ b/src/lib/RuntimeArgs.ts @@ -1,56 +1,64 @@ /** * Implements a collection of runtime arguments. */ -import { toBytesString, toBytesVecT } from './byterepr'; -import { CLValue, Result, StringValue, ToBytes, U32 } from './CLValue'; +import { Ok, Err } from 'ts-results'; +import { toBytesString, toBytesVector } from './ByteConverters'; +import { + CLValue, + CLValueParsers, + CLStringBytesParser, + CLU32BytesParser, + ToBytes, + ToBytesResult, + ResultAndRemainder, + resultHelper +} from './CLValue'; import { concat } from '@ethersproject/bytes'; -import { jsonMember, jsonObject, TypedJSON } from 'typedjson'; +import { jsonMapMember, jsonObject } from 'typedjson'; export class NamedArg implements ToBytes { constructor(public name: string, public value: CLValue) {} - public toBytes(): Uint8Array { + public toBytes(): ToBytesResult { const name = toBytesString(this.name); - const value = this.value.toBytes(); - return concat([name, value]); + const value = CLValueParsers.toBytesWithType(this.value); + return Ok(concat([name, value.unwrap()])); } - public static fromBytes(bytes: Uint8Array): Result { - const nameRes = StringValue.fromBytes(bytes); - if (nameRes.hasError()) { - return Result.Err(nameRes.error); + public static fromBytes( + bytes: Uint8Array + ): ResultAndRemainder { + const { + result: nameRes, + remainder: nameRem + } = new CLStringBytesParser().fromBytesWithRemainder(bytes); + const name = nameRes.unwrap(); + if (!nameRem) { + return resultHelper(Err('Missing data for value of named arg')); } - const clValueRes = CLValue.fromBytes(nameRes.remainder()); - if (clValueRes.hasError()) { - return Result.Err(clValueRes.error); - } - return Result.Ok( - new NamedArg(nameRes.value().val, clValueRes.value()), - clValueRes.remainder() - ); + const value = CLValueParsers.fromBytesWithType(nameRem).unwrap(); + return resultHelper(Ok(new NamedArg(name.value(), value))); } } const desRA = (_arr: any) => { - const clValueSerializer = new TypedJSON(CLValue); return new Map( Array.from(_arr, ([key, value]) => { - return [key, clValueSerializer.parse(value)]; + const val = CLValueParsers.fromJSON(value); + return [key, val.unwrap()]; }) ); }; const serRA = (map: Map) => { - const clValueSerializer = new TypedJSON(CLValue); - return Array.from(map, ([key, value]) => [ - key, - clValueSerializer.toPlainJson(value) - ]); + return Array.from(map, ([key, value]) => { + return [key, CLValueParsers.toJSON(value).unwrap()]; + }); }; @jsonObject() export class RuntimeArgs implements ToBytes { - @jsonMember({ + @jsonMapMember(String, CLValue, { serializer: serRA, deserializer: desRA }) @@ -79,29 +87,39 @@ export class RuntimeArgs implements ToBytes { this.args.set(key, value); } - public toBytes() { + public toBytes(): ToBytesResult { const vec = Array.from(this.args.entries()).map((a: [string, CLValue]) => { return new NamedArg(a[0], a[1]); }); - return toBytesVecT(vec); + return Ok(toBytesVector(vec)); } - public static fromBytes(bytes: Uint8Array): Result { - const sizeRes = U32.fromBytes(bytes); - if (sizeRes.hasError()) { - return Result.Err(sizeRes.error); - } - const size = sizeRes.value().val.toNumber(); - let remainBytes = sizeRes.remainder(); + // TODO: Add tests to check if it is working properly + public static fromBytes( + bytes: Uint8Array + ): ResultAndRemainder { + const { + result: sizeRes, + remainder: sizeRem + } = new CLU32BytesParser().fromBytesWithRemainder(bytes); + + const size = sizeRes + .unwrap() + .value() + .toNumber(); + + let remainBytes = sizeRem; const res: NamedArg[] = []; for (let i = 0; i < size; i++) { - const namedArgRes = NamedArg.fromBytes(remainBytes); - if (namedArgRes.hasError()) { - return Result.Err(namedArgRes.error); - } - res.push(namedArgRes.value()); - remainBytes = namedArgRes.remainder(); + if (!remainBytes) return resultHelper(Err('Error while parsing bytes')); + const { + result: namedArgRes, + remainder: namedArgRem + } = NamedArg.fromBytes(remainBytes); + + res.push(namedArgRes.unwrap()); + remainBytes = namedArgRem; } - return Result.Ok(RuntimeArgs.fromNamedArgs(res), remainBytes); + return resultHelper(Ok(RuntimeArgs.fromNamedArgs(res)), remainBytes); } } diff --git a/src/lib/SignedMessage.ts b/src/lib/SignedMessage.ts new file mode 100644 index 000000000..a72945bbd --- /dev/null +++ b/src/lib/SignedMessage.ts @@ -0,0 +1,69 @@ +import * as nacl from 'tweetnacl-ts'; +import * as secp256k1 from 'ethereum-cryptography/secp256k1'; +import { sha256 } from 'ethereum-cryptography/sha256'; + +import { CLPublicKey } from './CLValue/'; +import { AsymmetricKey } from './Keys'; + +/** + * Method for formatting messages with Casper header. + * @param message The string to be formatted. + * @returns The bytes of the formatted message + */ +export const formatMessageWithHeaders = (message: string): Uint8Array => { + // Avoiding usage of Text Encoder lib to support legacy nodejs versions. + return Uint8Array.from(Buffer.from(`Casper Message:\n${message}`)); +}; + +/** + * Method for signing string message. + * @param key AsymmetricKey used to sign the message + * @param message Message that will be signed + * @return Uint8Array Signature in byte format + */ +export const signRawMessage = ( + key: AsymmetricKey, + message: string +): Uint8Array => { + return key.sign(formatMessageWithHeaders(message)); +}; + +/** + * Method for signing formatted message in bytes format. + * @param key AsymmetricKey used to sign the message + * @param formattedMessageBytes Bytes of the formatted message. (Strings can be formatted using the `formatMessageWithHeaders()` method) + * @returns Uint8Array Signature in byte format + */ +export const signFormattedMessage = ( + key: AsymmetricKey, + formattedMessageBytes: Uint8Array +): Uint8Array => { + return key.sign(formattedMessageBytes); +}; + +/** + * Method to verify signature + * @param key Public key of private key used to signed. + * @param message Message that was signed + * @param signature Signature in byte format + * @return boolean Verification result + */ +export const verifyMessageSignature = ( + key: CLPublicKey, + message: string, + signature: Uint8Array +): boolean => { + const messageWithHeader = formatMessageWithHeaders(message); + if (key.isEd25519()) { + return nacl.sign_detached_verify(messageWithHeader, signature, key.value()); + } + if (key.isSecp256K1()) { + return secp256k1.ecdsaVerify( + signature, + sha256(Buffer.from(messageWithHeader)), + key.value() + ); + } + + throw new Error('Unsupported algorithm.'); +}; diff --git a/src/lib/Signer.ts b/src/lib/Signer.ts index c3adaad49..f61063001 100644 --- a/src/lib/Signer.ts +++ b/src/lib/Signer.ts @@ -1,42 +1,79 @@ /** - * Provide methods to communicate with [CasperLabs Signer Extension](https://github.com/CasperLabs/signer). + * Provide methods to communicate with [CasperLabs Signer Extension](https://github.com/casper-ecosystem/signer). * Works only on browser. * * @packageDocumentation */ +import { JsonTypes } from 'typedjson'; +import { + CasperLabsHelper, + SignerTestingHelper +} from '../@types/casperlabsSigner'; + +declare global { + interface Window { + casperlabsHelper: CasperLabsHelper; + signerTestingHelper: SignerTestingHelper; + } +} + +const helperPresent = () => { + return !(typeof window.casperlabsHelper === 'undefined'); +}; + /** * Returns Signer version */ export const getVersion: () => Promise = async () => { - try { - return await window.casperlabsHelper!.getVersion(); - } catch { - return "<1.0.0"; + if (helperPresent()) { + try { + return await window.casperlabsHelper.getVersion(); + } catch { + return '<1.0.0'; + } } + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; /** * Check whether CasperLabs Signer extension is connected */ export const isConnected: () => Promise = async () => { - return await window.casperlabsHelper!.isConnected(); + if (helperPresent()) return await window.casperlabsHelper.isConnected(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; /** * Attempt connection to Signer */ export const sendConnectionRequest: () => void = () => { - return window.casperlabsHelper!.requestConnection(); + if (helperPresent()) return window.casperlabsHelper.requestConnection(); + throw new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ); }; /** - * Return base64 encoded public key of user current selected account. + * **Deprecated** in favour of `getActivePublicKey()`. + * Returns `base64` encoded public key of currently selected account. * * @throws Error if haven't connected to CasperLabs Signer browser extension. */ export const getSelectedPublicKeyBase64: () => Promise = () => { - return window.casperlabsHelper!.getSelectedPublicKeyBase64(); + if (helperPresent()) + return window.casperlabsHelper.getSelectedPublicKeyBase64(); + throw new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ); }; /** @@ -45,7 +82,12 @@ export const getSelectedPublicKeyBase64: () => Promise = () => { * @returns {string} Hex-encoded public key with algorithm prefix. */ export const getActivePublicKey: () => Promise = () => { - return window.casperlabsHelper!.getActivePublicKey(); + if (helperPresent()) return window.casperlabsHelper.getActivePublicKey(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; /** @@ -60,57 +102,129 @@ export const getActivePublicKey: () => Promise = () => { * @throws Error if targetPublicKeyHex is not the same as the key that is used as target in deploy. */ export const sign: ( - deploy: any, - sourcePublicKey: string, + deploy: { deploy: JsonTypes }, + sourcePublicKey: string, + targetPublicKey: string +) => Promise<{ deploy: JsonTypes }> = ( + deploy: { deploy: JsonTypes }, + sourcePublicKey: string, targetPublicKey: string -) => Promise = ( - deploy: any, sourcePublicKey: string, targetPublicKey: string ) => { - return window.casperlabsHelper!.sign(deploy, sourcePublicKey, targetPublicKey); + if (helperPresent()) + return window.casperlabsHelper.sign( + deploy, + sourcePublicKey, + targetPublicKey + ); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); +}; + +export const signMessage: ( + message: string, + signingPublicKey: string +) => Promise = (message: string, signingPublicKey: string) => { + if (helperPresent()) + return window.casperlabsHelper.signMessage(message, signingPublicKey); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; /* * Forces Signer to disconnect from the currently open site. */ export const disconnectFromSite: () => void = () => { - return window.casperlabsHelper!.disconnectFromSite(); + if (helperPresent()) return window.casperlabsHelper.disconnectFromSite(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const forceConnection: () => void = () => { - return window.signerTestingHelper!.forceConnection(); + if (helperPresent()) return window.signerTestingHelper.forceConnection(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const forceDisconnect: () => void = () => { - return window.signerTestingHelper!.forceDisconnect(); + if (helperPresent()) return window.signerTestingHelper.forceDisconnect(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const hasCreatedVault: () => Promise = () => { - return window.signerTestingHelper!.hasCreatedVault(); + if (helperPresent()) return window.signerTestingHelper.hasCreatedVault(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const resetExistingVault: () => Promise = () => { - return window.signerTestingHelper!.resetExistingVault(); + if (helperPresent()) return window.signerTestingHelper.resetExistingVault(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const createNewVault: (password: string) => Promise = ( password: string ) => { - return window.signerTestingHelper!.createNewVault(password); + if (helperPresent()) + return window.signerTestingHelper.createNewVault(password); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const createTestAccount: ( name: string, privateKey: string ) => Promise = (name: string, privateKey: string) => { - return window.signerTestingHelper!.createTestAccount(name, privateKey); + if (helperPresent()) + return window.signerTestingHelper.createTestAccount(name, privateKey); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const getToSignMessageID: () => Promise = () => { - return window.signerTestingHelper!.getToSignMessageID(); + if (helperPresent()) return window.signerTestingHelper.getToSignMessageID(); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; export const signTestDeploy: (msgId: number) => Promise = ( msgId: number ) => { - return window.signerTestingHelper!.signTestDeploy(msgId); + if (helperPresent()) return window.signerTestingHelper.signTestDeploy(msgId); + return Promise.reject( + new Error( + 'Content script not found - make sure you have the Signer installed and refresh the page before trying again.' + ) + ); }; diff --git a/src/lib/StoredValue.ts b/src/lib/StoredValue.ts index 1cce0b006..ee47c4ce5 100644 --- a/src/lib/StoredValue.ts +++ b/src/lib/StoredValue.ts @@ -1,5 +1,5 @@ import { jsonArrayMember, jsonMember, jsonObject } from 'typedjson'; -import { CLValue } from './CLValue'; +import { CLValue, CLType, CLValueParsers, matchTypeToCLType } from './CLValue'; @jsonObject class NamedKey { @@ -74,8 +74,14 @@ export class TransferJson { public gas: string; // User-defined id - @jsonMember({ constructor: String, preserveNull: true }) - public id: string | null; + @jsonMember({ constructor: Number, preserveNull: true }) + public id: number | null; +} + +@jsonObject +export class Transfers { + @jsonArrayMember(TransferJson) + transfers: TransferJson[]; } @jsonObject @@ -153,6 +159,52 @@ export class EraInfoJson { public seigniorageAllocations: SeigniorageAllocation[]; } +/** + * Named CLType arguments + */ +@jsonObject +export class NamedCLTypeArg { + @jsonMember({ constructor: String }) + public name: string; + + @jsonMember({ + name: 'cl_type', + deserializer: json => matchTypeToCLType(json) + }) + public clType: CLType; +} + +/** + * Entry point metadata + */ +@jsonObject +export class EntryPoint { + @jsonMember({ + name: 'access', + deserializer: json => { + if (typeof json === 'string') return json; + // TODO: add support for object access + return null; + } + }) + public access: string; + + @jsonMember({ name: 'entry_point_type', constructor: String }) + public entryPointType: string; + + @jsonMember({ constructor: String }) + public name: string; + + @jsonMember({ + name: 'ret', + deserializer: json => matchTypeToCLType(json) + }) + public ret: string; + + @jsonArrayMember(NamedCLTypeArg) + public args: NamedCLTypeArg[]; +} + /** * Contract metadata. */ @@ -164,15 +216,85 @@ export class ContractMetadataJson { @jsonMember({ name: 'contract_wasm_hash', constructor: String }) public contractWasmHash: string; + @jsonArrayMember(EntryPoint, { name: 'entry_points' }) + public entrypoints: EntryPoint[]; + @jsonMember({ name: 'protocol_version', constructor: String }) public protocolVersion: string; + + @jsonArrayMember(NamedKey, { name: 'named_keys' }) + public namedKeys: NamedKey[]; +} + +/** + * Contract Version. + */ +@jsonObject +export class ContractVersionJson { + @jsonMember({ name: 'protocol_version_major', constructor: Number }) + public protocolVersionMajor: number; + + @jsonMember({ name: 'contract_version', constructor: Number }) + public contractVersion: number; + + @jsonMember({ name: 'contract_hash', constructor: String }) + public contractHash: string; +} + +/** + * Disabled Version. + */ +@jsonObject +export class DisabledVersionJson { + @jsonMember({ name: 'protocol_version_major', constructor: Number }) + public accessKey: number; + + @jsonMember({ name: 'contract_version', constructor: Number }) + public contractVersion: number; +} + +/** + * Groups. + */ +@jsonObject +export class GroupsJson { + @jsonMember({ name: 'group', constructor: String }) + public group: string; + + @jsonMember({ name: 'keys', constructor: String }) + public keys: string; +} + +/** + * Contract Package. + */ +@jsonObject +export class ContractPackageJson { + @jsonMember({ name: 'access_key', constructor: String }) + public accessKey: string; + + @jsonArrayMember(ContractVersionJson, { name: 'versions' }) + public versions: ContractVersionJson[]; + + @jsonArrayMember(DisabledVersionJson, { name: 'disabled_versions' }) + public disabledVersions: DisabledVersionJson[]; + + @jsonArrayMember(GroupsJson, { name: 'groups' }) + public groups: GroupsJson[]; } @jsonObject export class StoredValue { // StoredVale - @jsonMember({ constructor: CLValue }) + @jsonMember({ + name: 'CLValue', + deserializer: json => { + if (!json) return; + return CLValueParsers.fromJSON(json).unwrap(); + } + }) public CLValue?: CLValue; + // An account @jsonMember({ constructor: AccountJson }) public Account?: AccountJson; @@ -186,8 +308,8 @@ export class StoredValue { public Contract?: ContractMetadataJson; // A contract definition, metadata, and security container - @jsonMember({ constructor: String }) - public ContractPackage?: string; + @jsonMember({ constructor: ContractPackageJson }) + public ContractPackage?: ContractPackageJson; // A record of a transfer @jsonMember({ constructor: TransferJson }) diff --git a/src/lib/index.ts b/src/lib/index.ts index dcdc72a5b..8d8294348 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -6,6 +6,6 @@ import * as Signer from './Signer'; export * from './CLValue'; export * from './RuntimeArgs'; export * from './CasperClient'; -export * from './option'; +export * from './SignedMessage'; export { Contracts, Keys, Serialization, DeployUtil, Signer }; diff --git a/src/lib/option.ts b/src/lib/option.ts deleted file mode 100644 index 49abe80d4..000000000 --- a/src/lib/option.ts +++ /dev/null @@ -1,110 +0,0 @@ -// copy from https://github.com/CasperLabs/casper-node/blob/master/smart_contracts/contract_as/assembly/option.ts -import { - CLType, - CLTypedAndToBytes, - CLTypeHelper, - CLValue, - fromBytesByCLType, - FromBytesError, - OptionType, - Result, - U8 -} from './CLValue'; -import { concat } from '@ethersproject/bytes'; - -const OPTION_TAG_NONE = 0; -const OPTION_TAG_SOME = 1; - -// TODO: explore Option (without interfaces to constrain T with, is it practical?) -/** - * A class representing an optional value, i.e. it might contain either a value of some type or - * no value at all. Similar to Rust's `Option` or Haskell's `Maybe`. - */ -export class Option extends CLTypedAndToBytes { - private innerType: CLType; - - /** - * Constructs a new option containing the value of `CLTypedAndToBytes`. `t` can be `null`, which - * indicates no value. - */ - constructor(private t: CLTypedAndToBytes | null, innerType?: CLType) { - super(); - if (t === null) { - if (!innerType) { - throw new Error('You had to assign innerType for None'); - } - this.innerType = innerType; - } else { - this.innerType = t.clType(); - } - } - - /** - * Checks whether the `Option` contains no value. - * - * @returns True if the `Option` has no value. - */ - public isNone(): boolean { - return this.t === null; - } - - /** - * Checks whether the `Option` contains a value. - * - * @returns True if the `Option` has some value. - */ - public isSome(): boolean { - return this.t !== null; - } - - /** - * Extract value. - * - * @returns CLValue if the `Option` has some value. - */ - public getSome(): CLValue { - if (!this.isSome()) { - throw new Error('Value is None'); - } - return CLValue.fromT(this.t!); - } - - /** - * Serializes the `Option` into an array of bytes. - */ - public toBytes() { - if (this.t === null) { - return Uint8Array.from([OPTION_TAG_NONE]); - } - return concat([Uint8Array.from([OPTION_TAG_SOME]), this.t.toBytes()]); - } - - public clType(): CLType { - return CLTypeHelper.option(this.innerType!); - } - - public static fromBytes(type: OptionType, bytes: Uint8Array): Result