From 80d665b4c86c8157940bfd958f4d66a57effe1b2 Mon Sep 17 00:00:00 2001 From: Joe Hildebrand Date: Fri, 25 Oct 2024 06:18:09 -0600 Subject: [PATCH 1/7] Update most dependencies. Move to latest lint rules, fixing lint issues. --- .eslintrc.js | 24 - .ncurc.js | 12 +- .npmrc | 1 - ava.config.cjs | 14 +- eslint.config.mjs | 52 ++ package.json | 50 +- packages/browserify-demo/package.json | 8 +- packages/browserify-demo/src/index.js | 108 ++-- packages/cbor-bigdecimal/.npmrc | 1 - packages/cbor-bigdecimal/README.md | 8 +- packages/cbor-bigdecimal/bigdecimal.js | 46 +- .../cbor-bigdecimal/dist/cbor-bigdecimal.js | 2 +- packages/cbor-bigdecimal/package.json | 6 +- packages/cbor-bigdecimal/test/.eslintrc.js | 5 - .../cbor-bigdecimal/test/bigdecimal.ava.js | 60 +-- packages/cbor-bigdecimal/webpack.config.js | 6 +- packages/cbor-cli/.eslintrc.js | 7 - packages/cbor-cli/.npmrc | 1 - packages/cbor-cli/bin/cbor.js | 132 ++--- packages/cbor-cli/bin/cbor2comment.js | 28 +- packages/cbor-cli/bin/cbor2diag.js | 28 +- packages/cbor-cli/bin/cbor2js.js | 38 +- packages/cbor-cli/bin/cbor2json.js | 34 +- packages/cbor-cli/bin/js2cbor.js | 74 +-- packages/cbor-cli/bin/json2cbor.js | 48 +- packages/cbor-cli/lib/utils.js | 48 +- packages/cbor-cli/package.json | 12 +- packages/cbor-cli/test/.eslintrc.js | 5 - packages/cbor-cli/test/exec.ava.js | 188 +++---- packages/cbor-cli/test/fixtures/function.js | 8 +- packages/cbor-cli/test/fixtures/object.js | 6 +- packages/cbor-cli/test/utils.ava.js | 96 ++-- packages/cbor-rn-prereqs/README.md | 6 +- packages/cbor-rn-prereqs/index.js | 38 +- packages/cbor-rn-prereqs/package.json | 2 +- packages/cbor-rn-prereqs/test/index.ava.js | 46 +- packages/cbor-web/.eslintrc.js | 14 - packages/cbor-web/.npmrc | 1 - packages/cbor-web/dist/cbor.js | 2 +- packages/cbor-web/lib/cbor.js | 2 +- packages/cbor-web/package.json | 8 +- packages/cbor-web/webpack.config.js | 8 +- packages/cbor/.eslintrc.js | 16 - packages/cbor/.npmrc | 1 - packages/cbor/README.md | 78 +-- packages/cbor/lib/.eslintrc.js | 7 - packages/cbor/lib/cbor.js | 24 +- packages/cbor/lib/commented.js | 248 ++++----- packages/cbor/lib/constants.js | 16 +- packages/cbor/lib/decoder.js | 463 ++++++++-------- packages/cbor/lib/diagnose.js | 146 ++--- packages/cbor/lib/encoder.js | 502 +++++++++--------- packages/cbor/lib/map.js | 48 +- packages/cbor/lib/objectRecorder.js | 38 +- packages/cbor/lib/sharedValueEncoder.js | 81 ++- packages/cbor/lib/simple.js | 38 +- packages/cbor/lib/tagged.js | 160 +++--- packages/cbor/lib/utils.js | 214 ++++---- packages/cbor/package.json | 8 +- packages/cbor/test/.eslintrc.js | 5 - packages/cbor/test/cases.js | 130 ++--- packages/cbor/test/commented.ava.js | 107 ++-- packages/cbor/test/decoder.ava.js | 332 ++++++------ packages/cbor/test/diagnose.ava.js | 116 ++-- packages/cbor/test/encoder.ava.js | 426 +++++++-------- packages/cbor/test/garbage.ava.js | 30 +- packages/cbor/test/implementation_matrix.js | 28 +- packages/cbor/test/map.ava.js | 106 ++-- packages/cbor/test/objectRecorder.ava.js | 38 +- packages/cbor/test/plugins.ava.js | 16 +- packages/cbor/test/sharedValueEncoder.ava.js | 52 +- packages/cbor/test/simple.ava.js | 42 +- packages/cbor/test/streams.js | 26 +- packages/cbor/test/tagged.ava.js | 216 ++++---- packages/cbor/test/test-vectors.ava.js | 118 ++-- packages/cbor/test/utils.ava.js | 124 ++--- .../cbor/vendor/binary-parse-stream/README.md | 18 +- .../cbor/vendor/binary-parse-stream/index.js | 49 +- packages/parcel-demo/.eslintrc.cjs | 15 - packages/parcel-demo/package.json | 22 +- packages/parcel-demo/src/index-p.js | 110 ++-- packages/plain-demo/.npmrc | 1 - packages/plain-demo/build.js | 80 +-- packages/plain-demo/package.json | 4 +- packages/plain-demo/src/index-plain.js | 114 ++-- packages/puppeteer-demo/index.js | 62 +-- packages/puppeteer-demo/package.json | 2 +- packages/webpack-demo/package.json | 14 +- packages/webpack-demo/src/index-wp.js | 114 ++-- packages/webpack-demo/webpack.config.js | 8 +- test/.eslintrc.js | 5 - test/spot-check-web.ava.js | 36 +- 92 files changed, 2947 insertions(+), 2990 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 eslint.config.mjs delete mode 100644 packages/cbor-bigdecimal/test/.eslintrc.js delete mode 100644 packages/cbor-cli/.eslintrc.js delete mode 100644 packages/cbor-cli/test/.eslintrc.js delete mode 100644 packages/cbor-web/.eslintrc.js delete mode 100644 packages/cbor/.eslintrc.js delete mode 100644 packages/cbor/lib/.eslintrc.js delete mode 100644 packages/cbor/test/.eslintrc.js delete mode 100644 packages/parcel-demo/.eslintrc.cjs delete mode 100644 test/.eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 55959dde..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' - -module.exports = { - root: true, - extends: ['@cto.af', '@cto.af/eslint-config/jsdoc', 'plugin:markdown/recommended'], - ignorePatterns: [ - 'node_modules/', - 'dist/', - 'example/', - 'docs/scripts/', - ], - rules: { - 'no-empty': ['error', {allowEmptyCatch: true}], - 'jsdoc/imports-as-dependencies': 'off', - }, - overrides: [ - { - files: ['**/*.md/*.js'], - rules: { - 'no-console': 'off', - }, - }, - ], -} diff --git a/.ncurc.js b/.ncurc.js index 63c52e27..920e5979 100644 --- a/.ncurc.js +++ b/.ncurc.js @@ -1,8 +1,10 @@ -'use strict' +'use strict'; module.exports = { reject: [ - "marked", - "p-event", - ] -} + 'json-text-sequence', + 'marked', + 'nofilter', + 'p-event', + ], +}; diff --git a/.npmrc b/.npmrc index d6977ddc..2068f548 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,2 @@ engine-strict=true -package-lock=false strict-peer-dependencies=false diff --git a/ava.config.cjs b/ava.config.cjs index 7720e435..53a4d095 100644 --- a/ava.config.cjs +++ b/ava.config.cjs @@ -1,20 +1,20 @@ -'use strict' +'use strict'; -const path = require('path') +const path = require('node:path'); const config = { files: ['./packages/*/test/*.ava.js'], timeout: '5m', -} +}; if (process.env.CBOR_PACKAGE) { const NODE_PATH = [ path.resolve(__dirname, 'packages', 'cbor', 'node_modules'), - ] + ]; if (process.env.NODE_PATH) { - NODE_PATH.push(...process.env.NODE_PATH.split(path.delimiter)) + NODE_PATH.push(...process.env.NODE_PATH.split(path.delimiter)); } config.environmentVariables = { NODE_PATH: NODE_PATH.join(path.delimiter), - } + }; } -module.exports = config +module.exports = config; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..50a5774d --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,52 @@ +import ava from '@cto.af/eslint-config/ava.js'; +import base from '@cto.af/eslint-config'; +import globals from '@cto.af/eslint-config/globals.js'; +import markdown from '@cto.af/eslint-config/markdown.js'; + +export default [ + { + ignores: [ + 'packages/browserify-demo/dist/**', + 'packages/cbor-bigdecimal/dist/**', + 'packages/cbor-web/dist/**', + 'packages/plain-demo/dist/**', + 'packages/webpack-demo/dist/**', + '**/*.d.ts', + ], + }, + ...base, + ...markdown, + ...ava, + { + files: [ + 'packages/cbor/lib/**', + 'packages/cbor/test/**', + 'packages/browserify-demo/src/**', + 'packages/webpack-demo/src/**', + ], + rules: { + 'n/prefer-node-protocol': 'off', + }, + }, + { + files: [ + 'packages/cbor-cli/**', + ], + rules: { + 'no-console': 'off', + }, + }, + { + files: [ + 'packages/cbor-web/lib/**', + 'packages/parcel-demo/src/**', + ], + languageOptions: { + sourceType: 'module', + globals: globals.browser, + }, + rules: { + 'n/prefer-node-protocol': 'off', + }, + }, +]; diff --git a/package.json b/package.json index 1cc05112..b1b9f78e 100644 --- a/package.json +++ b/package.json @@ -7,15 +7,12 @@ "name": "Joe Hildebrand", "email": "joe-github@cursive.net" }, - "workspaces": [ - "./packages/*" - ], "scripts": { "clean": "rimraf node_modules coverage .nyc_output packages/*/node_modules packages/*/coverage packages/*/.nyc_output", "docs": "jsdoc -c .jsdoc.conf", - "lint": "eslint . --ext cjs,mjs,js,md", + "lint": "eslint .", "test": "ava packages/*/test/*.ava.js", - "test:versions": "nve --continue --arch x64 --parallel 20,18,16,14 npm test", + "test:versions": "nve --continue --arch x64 --parallel 22,20,18 npm test", "test:bigendian": "docker run --rm -it -v ${PWD}:/root/cbor -w /root/cbor s390x/node npm test", "test:spot-check": "ava test/*.ava.js && CBOR_PACKAGE=${INIT_CWD}/packages/cbor-web/dist/cbor.js npm run test", "test:web": "node packages/puppeteer-demo/index.js", @@ -27,30 +24,41 @@ "copy": "pnpm -r copy" }, "dependencies": { - "nofilter": "^3.1.0" + "nofilter": "^3.0.2" }, "devDependencies": { - "@cto.af/eslint-config": "^1.1.2", - "ava": "^5.2.0", - "bignumber.js": "^9.1.1", + "@cto.af/eslint-config": "^5.0.1", + "ava": "5.2.0", + "bignumber.js": "^9.1.2", "copyfiles": "2.4.1", - "docdash": "2.0.1", - "eslint": "^8.40.0", - "eslint-plugin-ava": "^14.0.0", - "eslint-plugin-jsdoc": "^44.2.3", - "eslint-plugin-markdown": "^3.0.0", + "docdash": "2.0.2", + "eslint": "^9.13.0", + "eslint-plugin-ava": "^15.0.1", + "eslint-plugin-jsdoc": "^50.4.3", + "eslint-plugin-markdown": "^5.1.0", "eslint-plugin-node": "^11.1.0", - "jsdoc": "^4.0.2", - "lerna": "^6.6.2", + "jsdoc": "^4.0.4", + "lerna": "^8.1.8", "light-server": "^2.9.1", "minami": "*", - "nve": "^15.5.0", - "nyc": "^15.1.0", - "rimraf": "^5.0.0", - "typedoc": "0.24.7", - "typescript": "^5.0.4" + "nve": "^18.0.1", + "nyc": "^17.1.0", + "rimraf": "^6.0.1", + "typedoc": "0.26.10", + "typescript": "^5.6.3" }, "license": "MIT", + "packageManager": "pnpm@9.12.2", + "overrides": { + "@typescript-eslint/utils": "8.0.0-alpha.30", + "@typescript-eslint/parser": "8.0.0-alpha.30" + }, + "pnpm": { + "overrides": { + "@typescript-eslint/utils": "8.0.0-alpha.30", + "@typescript-eslint/parser": "8.0.0-alpha.30" + } + }, "engines": { "node": ">=16" } diff --git a/packages/browserify-demo/package.json b/packages/browserify-demo/package.json index 85291760..c2774e84 100644 --- a/packages/browserify-demo/package.json +++ b/packages/browserify-demo/package.json @@ -18,14 +18,14 @@ "author": "Joe Hildebrand ", "license": "MIT", "devDependencies": { - "@babel/core": "^7.21.8", + "@babel/core": "^7.25.9", "babelify": "^10.0.0", - "browserify": "^17.0.0", + "browserify": "^17.0.1", "cbor-bigdecimal": "^9.0.0", "copyfiles": "^2.4.1", "node-inspect-extracted": "*", - "rimraf": "^5.0.0", - "terser": "^5.17.3" + "rimraf": "^6.0.1", + "terser": "^5.36.0" }, "engines": { "node": ">=16" diff --git a/packages/browserify-demo/src/index.js b/packages/browserify-demo/src/index.js index cdb0c211..f98e0c97 100644 --- a/packages/browserify-demo/src/index.js +++ b/packages/browserify-demo/src/index.js @@ -1,112 +1,112 @@ /* eslint-disable no-undef */ -'use strict' +'use strict'; -const {inspect} = require('node-inspect-extracted') -const {Buffer} = require('buffer') -const bdec = require('cbor-bigdecimal') +const {inspect} = require('node-inspect-extracted'); +const {Buffer} = require('buffer'); +const bdec = require('cbor-bigdecimal'); -bdec(cbor) +bdec(cbor); -const ofmt = document.getElementById('output-fmt') -const otxt = document.getElementById('output-text') -const itxt = document.getElementById('input-text') -const ifmt = document.getElementById('input-fmt') -const copy = document.getElementById('copy') +const ofmt = document.getElementById('output-fmt'); +const otxt = document.getElementById('output-text'); +const itxt = document.getElementById('input-text'); +const ifmt = document.getElementById('input-fmt'); +const copy = document.getElementById('copy'); function error(e) { - copy.disabled = true - otxt.value = e.toString() + copy.disabled = true; + otxt.value = e.toString(); } // Convert any input to a buffer function input() { - const inp = ifmt.selectedOptions[0].label - const txt = itxt.value + const inp = ifmt.selectedOptions[0].label; + const txt = itxt.value; switch (inp) { case 'JSON': - return cbor.encodeOne(JSON.parse(txt), {canonical: true}) + return cbor.encodeOne(JSON.parse(txt), {canonical: true}); case 'hex': case 'base64': - return Buffer.from(txt, inp) + return Buffer.from(txt, inp); default: - throw new Error(`Unknown input: "${inp}"`) + throw new Error(`Unknown input: "${inp}"`); } } // Convert a buffer to the desired output format function output(buf, typ) { - const outp = ofmt.selectedOptions[0].label + const outp = ofmt.selectedOptions[0].label; switch (outp) { case 'hex': case 'base64': - copy.disabled = false - otxt.value = buf.toString(outp) - break + copy.disabled = false; + otxt.value = buf.toString(outp); + break; case 'commented': - copy.disabled = true + copy.disabled = true; cbor.comment(buf).then(txt => { - otxt.value = txt - }, error) - break + otxt.value = txt; + }, error); + break; case 'diagnostic': - copy.disabled = true + copy.disabled = true; cbor.diagnose(buf).then(txt => { - otxt.value = txt - }, error) - break + otxt.value = txt; + }, error); + break; case 'js': - copy.disabled = true + copy.disabled = true; cbor.decodeFirst(buf).then(o => { otxt.value = inspect(o, { depth: Infinity, compact: 1, maxArrayLength: Infinity, breakLength: otxt.cols - 1, - }) - }, error) - break + }); + }, error); + break; case 'JSON': - copy.disabled = false + copy.disabled = false; cbor.decodeFirst(buf, {bigint: true, preferWeb: true}).then(o => { - otxt.value = JSON.stringify(o, null, 2) - }, error) - break + otxt.value = JSON.stringify(o, null, 2); + }, error); + break; default: - throw new Error(`Unknown output: "${outp}"`) + throw new Error(`Unknown output: "${outp}"`); } } function convert() { try { - output(input()) + output(input()); } catch (e) { - error(e) + error(e); } } -ofmt.oninput = convert -ifmt.oninput = convert +ofmt.oninput = convert; +ifmt.oninput = convert; copy.onclick = () => { // Copy output to input, and guess the new input format - itxt.value = otxt.value - const sel = ofmt.selectedOptions[0].label + itxt.value = otxt.value; + const sel = ofmt.selectedOptions[0].label; for (const o of ifmt.options) { if (o.label === sel) { - ifmt.selectedIndex = o.index - break + ifmt.selectedIndex = o.index; + break; } } -} +}; // Debounce -let timeout = null +let timeout = null; itxt.oninput = () => { - clearTimeout(timeout) + clearTimeout(timeout); timeout = setTimeout(() => { - timeout = null - convert() - }, 300) -} + timeout = null; + convert(); + }, 300); +}; // Make sure that initial output is set -convert() +convert(); diff --git a/packages/cbor-bigdecimal/.npmrc b/packages/cbor-bigdecimal/.npmrc index 4c1bf779..b6f27f13 100644 --- a/packages/cbor-bigdecimal/.npmrc +++ b/packages/cbor-bigdecimal/.npmrc @@ -1,2 +1 @@ engine-strict=true -package-lock=false diff --git a/packages/cbor-bigdecimal/README.md b/packages/cbor-bigdecimal/README.md index 0034904d..9cfc9493 100644 --- a/packages/cbor-bigdecimal/README.md +++ b/packages/cbor-bigdecimal/README.md @@ -14,15 +14,15 @@ npm install cbor cbor-bignumber Before trying to encode or decode: ```js -const cbor = require('cbor') -const bdec = require('cbor-bigdecimal') -bdec(cbor) +const cbor = require('cbor'); +const bdec = require('cbor-bigdecimal'); +bdec(cbor); ``` If you want to remove the added encoders and decoders: ```js -cbor.reset() +cbor.reset(); ``` If you need to access the same BigNumber class that `cbor-bigdecimal` is (e.g. diff --git a/packages/cbor-bigdecimal/bigdecimal.js b/packages/cbor-bigdecimal/bigdecimal.js index a232ced5..8de3c586 100644 --- a/packages/cbor-bigdecimal/bigdecimal.js +++ b/packages/cbor-bigdecimal/bigdecimal.js @@ -1,56 +1,56 @@ -'use strict' +'use strict'; -const {BigNumber} = require('bignumber.js') -let cbor = null +const {BigNumber} = require('bignumber.js'); +let cbor = null; -const MAXINT = new BigNumber('0x20000000000000') -const TWO = new BigNumber(2) +const MAXINT = new BigNumber('0x20000000000000'); +const TWO = new BigNumber(2); function pushBigNumber(gen, obj) { if (obj.isNaN()) { - return gen._pushNaN() + return gen._pushNaN(); } if (!obj.isFinite()) { - return gen._pushInfinity(obj.isNegative() ? -Infinity : Infinity) + return gen._pushInfinity(obj.isNegative() ? -Infinity : Infinity); } if (obj.isInteger()) { - return gen._pushJSBigint(BigInt(obj.toFixed())) + return gen._pushJSBigint(BigInt(obj.toFixed())); } // Section 3.4.4, decimal fraction if (!(gen._pushTag(4) && gen._pushInt(2, 4))) { // Array - return false + return false; } - const dec = obj.decimalPlaces() - const slide = obj.shiftedBy(dec) + const dec = obj.decimalPlaces(); + const slide = obj.shiftedBy(dec); if (!gen._pushIntNum(-dec)) { - return false + return false; } if (slide.abs().isLessThan(MAXINT)) { - return gen._pushIntNum(slide.toNumber()) + return gen._pushIntNum(slide.toNumber()); } - return gen._pushJSBigint(BigInt(slide.toFixed())) + return gen._pushJSBigint(BigInt(slide.toFixed())); } // Decimal fraction; see Section 3.4.4 function tag_4(v) { - return new BigNumber(v[1]).shiftedBy(v[0]) + return new BigNumber(v[1]).shiftedBy(v[0]); } // Bigfloat; see Section 3.4.4 function tag_5(v) { - return TWO.pow(v[0]).times(v[1]) + return TWO.pow(v[0]).times(v[1]); } function addBigDecimal(inCBOR) { - cbor = inCBOR - cbor.Encoder.SEMANTIC_TYPES[BigNumber.name] = pushBigNumber - cbor.Tagged.TAGS[4] = tag_4 - cbor.Tagged.TAGS[5] = tag_5 - return cbor + cbor = inCBOR; + cbor.Encoder.SEMANTIC_TYPES[BigNumber.name] = pushBigNumber; + cbor.Tagged.TAGS[4] = tag_4; + cbor.Tagged.TAGS[5] = tag_5; + return cbor; } -addBigDecimal.BigNumber = BigNumber -module.exports = addBigDecimal +addBigDecimal.BigNumber = BigNumber; +module.exports = addBigDecimal; diff --git a/packages/cbor-bigdecimal/dist/cbor-bigdecimal.js b/packages/cbor-bigdecimal/dist/cbor-bigdecimal.js index e955b85c..f9747764 100644 --- a/packages/cbor-bigdecimal/dist/cbor-bigdecimal.js +++ b/packages/cbor-bigdecimal/dist/cbor-bigdecimal.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("bignumber.js")):"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cborBigDecimal=t(require("bignumber.js")):e.cborBigDecimal=t(e.BigNumber)}(this,(e=>(()=>{"use strict";var t={143:(e,t,i)=>{const{BigNumber:n}=i(733);let r=null;const u=new n("0x20000000000000"),s=new n(2);function o(e,t){if(t.isNaN())return e._pushNaN();if(!t.isFinite())return e._pushInfinity(t.isNegative()?-1/0:1/0);if(t.isInteger())return e._pushJSBigint(BigInt(t.toFixed()));if(!e._pushTag(4)||!e._pushInt(2,4))return!1;const i=t.decimalPlaces(),n=t.shiftedBy(i);return!!e._pushIntNum(-i)&&(n.abs().isLessThan(u)?e._pushIntNum(n.toNumber()):e._pushJSBigint(BigInt(n.toFixed())))}function p(e){return new n(e[1]).shiftedBy(e[0])}function f(e){return s.pow(e[0]).times(e[1])}function c(e){return r=e,r.Encoder.SEMANTIC_TYPES[n.name]=o,r.Tagged.TAGS[4]=p,r.Tagged.TAGS[5]=f,r}c.BigNumber=n,e.exports=c},733:t=>{t.exports=e}},i={};return function e(n){var r=i[n];if(void 0!==r)return r.exports;var u=i[n]={exports:{}};return t[n](u,u.exports,e),u.exports}(143)})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("bignumber.js")):"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cborBigDecimal=t(require("bignumber.js")):e.cborBigDecimal=t(e.BigNumber)}(this,(e=>(()=>{"use strict";var t={68:(e,t,i)=>{const{BigNumber:n}=i(905);let r=null;const u=new n("0x20000000000000"),s=new n(2);function o(e,t){if(t.isNaN())return e._pushNaN();if(!t.isFinite())return e._pushInfinity(t.isNegative()?-1/0:1/0);if(t.isInteger())return e._pushJSBigint(BigInt(t.toFixed()));if(!e._pushTag(4)||!e._pushInt(2,4))return!1;const i=t.decimalPlaces(),n=t.shiftedBy(i);return!!e._pushIntNum(-i)&&(n.abs().isLessThan(u)?e._pushIntNum(n.toNumber()):e._pushJSBigint(BigInt(n.toFixed())))}function p(e){return new n(e[1]).shiftedBy(e[0])}function f(e){return s.pow(e[0]).times(e[1])}function c(e){return r=e,r.Encoder.SEMANTIC_TYPES[n.name]=o,r.Tagged.TAGS[4]=p,r.Tagged.TAGS[5]=f,r}c.BigNumber=n,e.exports=c},905:t=>{t.exports=e}},i={};return function e(n){var r=i[n];if(void 0!==r)return r.exports;var u=i[n]={exports:{}};return t[n](u,u.exports,e),u.exports}(68)})())); \ No newline at end of file diff --git a/packages/cbor-bigdecimal/package.json b/packages/cbor-bigdecimal/package.json index 49db742e..76c67066 100644 --- a/packages/cbor-bigdecimal/package.json +++ b/packages/cbor-bigdecimal/package.json @@ -29,9 +29,9 @@ "bignumber.js": "^9.1.0" }, "devDependencies": { - "bignumber.js": "^9.1.1", - "webpack": "^5.82.1", - "webpack-cli": "^5.1.1" + "bignumber.js": "^9.1.2", + "webpack": "^5.95.0", + "webpack-cli": "^5.1.4" }, "engines": { "node": ">=16" diff --git a/packages/cbor-bigdecimal/test/.eslintrc.js b/packages/cbor-bigdecimal/test/.eslintrc.js deleted file mode 100644 index 8cf1e873..00000000 --- a/packages/cbor-bigdecimal/test/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -module.exports = { - extends: '@cto.af/eslint-config/ava', -} diff --git a/packages/cbor-bigdecimal/test/bigdecimal.ava.js b/packages/cbor-bigdecimal/test/bigdecimal.ava.js index 80e48f0e..6a883643 100644 --- a/packages/cbor-bigdecimal/test/bigdecimal.ava.js +++ b/packages/cbor-bigdecimal/test/bigdecimal.ava.js @@ -1,50 +1,50 @@ -'use strict' +'use strict'; -const cbor = require(process.env.CBOR_PACKAGE || '../../cbor') -const bigdec = require('..') -const cases = require('../../cbor/test/cases') -const test = require('ava') -const {BigNumber} = bigdec +const cbor = require(process.env.CBOR_PACKAGE || '../../cbor'); +const bigdec = require('..'); +const cases = require('../../cbor/test/cases'); +const test = require('ava'); +const {BigNumber} = bigdec; function enc(t, n, expected) { - t.is(cbor.encodeOne(new BigNumber(n)).toString('hex'), expected) + t.is(cbor.encodeOne(new BigNumber(n)).toString('hex'), expected); } test.before(t => { - bigdec(cbor) -}) + bigdec(cbor); +}); test.after(t => { - cbor.reset() -}) + cbor.reset(); +}); test('encode', t => { - enc(t, NaN, 'f97e00') - enc(t, Infinity, 'f97c00') - enc(t, -Infinity, 'f9fc00') - enc(t, 0, 'c24100') - enc(t, 1, 'c24101') - enc(t, -1, 'c34100') + enc(t, NaN, 'f97e00'); + enc(t, Infinity, 'f97c00'); + enc(t, -Infinity, 'f9fc00'); + enc(t, 0, 'c24100'); + enc(t, 1, 'c24101'); + enc(t, -1, 'c34100'); enc(t, new BigNumber(Number.MAX_SAFE_INTEGER).pow(2), - 'c24e03ffffffffffffc0000000000001') - enc(t, 10.1, 'c482201865') - enc(t, 100.1, 'c482201903e9') - enc(t, 0.1, 'c4822001') - enc(t, -0.1, 'c4822020') + 'c24e03ffffffffffffc0000000000001'); + enc(t, 10.1, 'c482201865'); + enc(t, 100.1, 'c482201903e9'); + enc(t, 0.1, 'c4822001'); + enc(t, -0.1, 'c4822020'); enc(t, new BigNumber(Math.PI).pow(3), - 'c482382cc254056e5e99b1be81b6eefa3964490ac18c69399361') + 'c482382cc254056e5e99b1be81b6eefa3964490ac18c69399361'); enc(t, new BigNumber('18446744073709551615.1'), - 'c48220c24909fffffffffffffff7') -}) + 'c48220c24909fffffffffffffff7'); +}); test('failures', t => { - cases.EncodeFailer.tryAll(t, new BigNumber(-0.1)) -}) + cases.EncodeFailer.tryAll(t, new BigNumber(-0.1)); +}); test('decode', async t => { - t.deepEqual(await cbor.decodeFirst('c4822001'), new BigNumber(0.1)) - t.deepEqual(await cbor.decodeFirst('c5822003'), new BigNumber(1.5)) -}) + t.deepEqual(await cbor.decodeFirst('c4822001'), new BigNumber(0.1)); + t.deepEqual(await cbor.decodeFirst('c5822003'), new BigNumber(1.5)); +}); diff --git a/packages/cbor-bigdecimal/webpack.config.js b/packages/cbor-bigdecimal/webpack.config.js index 108a0523..54a48744 100644 --- a/packages/cbor-bigdecimal/webpack.config.js +++ b/packages/cbor-bigdecimal/webpack.config.js @@ -1,5 +1,5 @@ -'use strict' -const path = require('path') +'use strict'; +const path = require('node:path'); module.exports = { entry: './bigdecimal.js', @@ -19,4 +19,4 @@ module.exports = { }, }, target: 'web', -} +}; diff --git a/packages/cbor-cli/.eslintrc.js b/packages/cbor-cli/.eslintrc.js deleted file mode 100644 index eeb7d37f..00000000 --- a/packages/cbor-cli/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -module.exports = { - rules: { - 'no-console': 'off', - }, -} diff --git a/packages/cbor-cli/.npmrc b/packages/cbor-cli/.npmrc index 4c1bf779..b6f27f13 100644 --- a/packages/cbor-cli/.npmrc +++ b/packages/cbor-cli/.npmrc @@ -1,2 +1 @@ engine-strict=true -package-lock=false diff --git a/packages/cbor-cli/bin/cbor.js b/packages/cbor-cli/bin/cbor.js index 2ee1972c..2daca1d4 100755 --- a/packages/cbor-cli/bin/cbor.js +++ b/packages/cbor-cli/bin/cbor.js @@ -1,17 +1,17 @@ #!/usr/bin/env node -'use strict' -const child_process = require('child_process') -const fs = require('fs') -const path = require('path') -const util = require('util') -const cbor = require('cbor') -const bdec = require('cbor-bigdecimal') -const commander = require('commander') -const pkg = require('../package.json') +'use strict'; +const child_process = require('node:child_process'); +const fs = require('node:fs'); +const path = require('node:path'); +const util = require('node:util'); +const cbor = require('cbor'); +const bdec = require('cbor-bigdecimal'); +const commander = require('commander'); +const pkg = require('../package.json'); -bdec(cbor) -const HEX = /^\s*(?:['"`]|0x)(?[0-9a-f]+)\s*$/ +bdec(cbor); +const HEX = /^\s*(?:['"`]|0x)(?[0-9a-f]+)\s*$/; const OUTPUT_TYPES = { comment: 'comment', c: 'comment', @@ -21,15 +21,15 @@ const OUTPUT_TYPES = { javascript: 'javascript', js: 'javascript', j: 'javascript', -} +}; function outputType(val) { - const norm = OUTPUT_TYPES[val] + const norm = OUTPUT_TYPES[val]; if (!norm) { throw new commander.InvalidOptionArgumentError( `Not one of: ${Object.keys(OUTPUT_TYPES).join(', ')}` - ) + ); } - return norm + return norm; } const opts = commander.program @@ -43,18 +43,18 @@ const opts = commander.program 'javascript' ) .parse(process.argv) - .opts() + .opts(); -const COLOR = process.stdout.isTTY || opts.color +const COLOR = process.stdout.isTTY || opts.color; // Figure out the node-cbor version number, and the branch name // if we're running from a git repo. require.resolve returns // `{node-cbor}/lib/cbor.js` -const cborPath = path.resolve(path.dirname(require.resolve('cbor')), '..') +const cborPath = path.resolve(path.dirname(require.resolve('cbor')), '..'); const cborPkg = JSON.parse( fs.readFileSync(path.join(cborPath, 'package.json'), 'utf8') -) -let branch = '' +); +let branch = ''; try { // Too hard to test both branches. /* istanbul ignore next */ @@ -67,7 +67,7 @@ try { encoding: 'utf8', stdio: 'pipe', } - ).trimEnd() + ).trimEnd(); } catch (ignored) { // Any failures with git, we throw up our hands } @@ -78,95 +78,95 @@ try { console.log( `cbor v${cborPkg.version}${branch} (${opts.type} output from typing 0x00)` -) +); // Extracted from node source function stylizeWithColor(str, styleType) { if (COLOR) { - const style = util.inspect.styles[styleType] - const color = util.inspect.colors[style] - return `\u001b[${color[0]}m${str}\u001b[${color[1]}m` + const style = util.inspect.styles[styleType]; + const color = util.inspect.colors[style]; + return `\u001b[${color[0]}m${str}\u001b[${color[1]}m`; } - return str + return str; } // Wrapper that removes quotes and colorizes from the results of certain // operations class PlainResults { constructor(str) { - this.str = str + this.str = str; } [util.inspect.custom](depth, options) { if (typeof this.str === 'string') { - const m = this.str.match(/(?
.*)(?0x[0-9a-f]+)\n$/msi)
+      const m = this.str.match(/(?
.*)(?0x[0-9a-f]+)\n$/msi);
       if (m) {
-        return `${m.groups.pre}${options.stylize(m.groups.hex, 'special')}`
+        return `${m.groups.pre}${options.stylize(m.groups.hex, 'special')}`;
       }
     }
-    return this.str
+    return this.str;
   }
 }
 
-util.inspect.defaultOptions.compact = false
-const repl = require('repl')
+util.inspect.defaultOptions.compact = false;
+const repl = require('node:repl');
 const cborRepl = repl.start({
   prompt: `${stylizeWithColor('cbor', 'string')}> `,
   ignoreUndefined: true,
-})
+});
 
 // Import everything from the cbor package into the top level,
 // and gussy up a few of them
 for (const [k, v] of Object.entries(cbor)) {
-  cborRepl.context[k] = v
+  cborRepl.context[k] = v;
 }
-cborRepl.context.cbor = cbor
-cborRepl.context.NoFilter = require('nofilter')
+cborRepl.context.cbor = cbor;
+cborRepl.context.NoFilter = require('nofilter');
 cborRepl.context.comment =
   function comment(input, options) {
     return cbor
       .comment(input, options)
-      .then(t => new PlainResults(t))
-  }
+      .then(t => new PlainResults(t));
+  };
 cborRepl.context.diagnose =
   function diagnose(input, options) {
     return cbor
       .diagnose(input, options)
-      .then(t => new PlainResults(t))
-  }
+      .then(t => new PlainResults(t));
+  };
 
-const originalEval = cborRepl.eval
+const originalEval = cborRepl.eval;
 cborRepl.eval = (cmd, context, filename, callback) => {
-  const m = cmd.match(HEX)
+  const m = cmd.match(HEX);
   if (m) {
     switch (opts.type) {
       case 'diagnose':
         cbor.diagnose(m.groups.hex, (er, txt) => {
           if (er) {
-            callback(er)
+            callback(er);
           } else {
-            callback(null, new PlainResults(txt))
+            callback(null, new PlainResults(txt));
           }
-        })
-        return
+        });
+        return;
       case 'comment':
         cbor.comment(m.groups.hex, (er, txt) => {
           if (er) {
-            callback(er)
+            callback(er);
           } else {
-            callback(null, new PlainResults(txt))
+            callback(null, new PlainResults(txt));
           }
-        })
-        return
+        });
+        return;
       case 'javascript':
         cbor.decodeFirst(m.groups.hex, (er, o) => {
           if (er) {
-            callback(er)
+            callback(er);
           } else {
-            callback(null, new PlainResults(o))
+            callback(null, new PlainResults(o));
           }
-        })
-        return
+        });
+        return;
     }
   }
   originalEval(cmd, context, filename, (er, output) => {
@@ -174,31 +174,31 @@ cborRepl.eval = (cmd, context, filename, callback) => {
     // would be bad if this was a system where Promises might last a
     // long time; the command line would lock up while waiting.
     if (!er && (output instanceof Promise)) {
-      console.log(stylizeWithColor('Promise', 'special'))
-      output.then(results => callback(null, results), callback)
+      console.log(stylizeWithColor('Promise', 'special'));
+      output.then(results => callback(null, results), callback);
     } else {
-      callback(er, output)
+      callback(er, output);
     }
-  })
-}
+  });
+};
 
 cborRepl.writer = output => {
-  let str = repl.writer(output)
+  let str = repl.writer(output);
   if (!(output instanceof Error) &&
       !(output instanceof PlainResults)) {
     try {
       // Hey!  Let's encode all results as CBOR for fun.
-      const buf = cbor.encodeCanonical(output)
+      const buf = cbor.encodeCanonical(output);
       str += stylizeWithColor(
         `\n0x${buf.toString('hex')}`,
         'special'
-      )
+      );
     } catch (ignored) {
       // If it didn't work, oh well, we tried
     }
   }
-  return str
-}
+  return str;
+};
 
 // TODO: The completer mostly doesn't work.
 // const originalCompleter = cborRepl.completer.bind(cborRepl)
@@ -225,7 +225,7 @@ if (typeof cborRepl.setupHistory === 'function') {
     // or invalid file
     /* istanbul ignore if */
     if (er) {
-      console.error(er)
+      console.error(er);
     }
-  })
+  });
 }
diff --git a/packages/cbor-cli/bin/cbor2comment.js b/packages/cbor-cli/bin/cbor2comment.js
index aa50ab61..fc9f85f7 100755
--- a/packages/cbor-cli/bin/cbor2comment.js
+++ b/packages/cbor-cli/bin/cbor2comment.js
@@ -1,10 +1,10 @@
 #!/usr/bin/env node
-'use strict'
+'use strict';
 
-const cbor = require('cbor')
-const utils = require('../lib/utils')
-const pkg = require('../package.json')
-const {program} = require('commander')
+const cbor = require('cbor');
+const utils = require('../lib/utils');
+const pkg = require('../package.json');
+const {program} = require('commander');
 
 const opts = program
   .version(pkg.version)
@@ -12,23 +12,23 @@ const opts = program
   .option('-x, --hex ', 'Hex string input')
   .option('-t, --tabsize [spaces]', 'Indent amount')
   .parse(process.argv)
-  .opts()
+  .opts();
 
-const numTabs = (opts.tabsize | 0) || 10
-const argv = program.args
+const numTabs = (opts.tabsize | 0) || 10;
+const argv = program.args;
 if (opts.hex) {
-  argv.push(new utils.DeHexStream(opts.hex))
+  argv.push(new utils.DeHexStream(opts.hex));
 }
 
 if (argv.length === 0) {
-  argv.push('-')
+  argv.push('-');
 }
 
 utils.streamFiles(argv, () => {
   const c = new cbor.Commented({
     // Backwards-compat
     max_depth: numTabs,
-  })
-  c.pipe(process.stdout)
-  return c
-}).catch(utils.printError)
+  });
+  c.pipe(process.stdout);
+  return c;
+}).catch(utils.printError);
diff --git a/packages/cbor-cli/bin/cbor2diag.js b/packages/cbor-cli/bin/cbor2diag.js
index f651e622..d89fb2bf 100755
--- a/packages/cbor-cli/bin/cbor2diag.js
+++ b/packages/cbor-cli/bin/cbor2diag.js
@@ -1,29 +1,29 @@
 #!/usr/bin/env node
-'use strict'
+'use strict';
 
-const cbor = require('cbor')
-const utils = require('../lib/utils')
-const pkg = require('../package.json')
-const {program} = require('commander')
+const cbor = require('cbor');
+const utils = require('../lib/utils');
+const pkg = require('../package.json');
+const {program} = require('commander');
 
 program
   .version(pkg.version)
   .usage('[options] ')
   .option('-x, --hex ', 'Hex string input')
-  .parse(process.argv)
+  .parse(process.argv);
 
-const opts = program.opts()
-const argv = program.args
+const opts = program.opts();
+const argv = program.args;
 if (opts.hex) {
-  argv.push(new utils.DeHexStream(opts.hex))
+  argv.push(new utils.DeHexStream(opts.hex));
 }
 
 if (argv.length === 0) {
-  argv.push('-')
+  argv.push('-');
 }
 
 utils.streamFiles(argv, () => {
-  const d = new cbor.Diagnose()
-  d.pipe(process.stdout)
-  return d
-}).catch(utils.printError)
+  const d = new cbor.Diagnose();
+  d.pipe(process.stdout);
+  return d;
+}).catch(utils.printError);
diff --git a/packages/cbor-cli/bin/cbor2js.js b/packages/cbor-cli/bin/cbor2js.js
index 0b811419..0b2777ef 100755
--- a/packages/cbor-cli/bin/cbor2js.js
+++ b/packages/cbor-cli/bin/cbor2js.js
@@ -1,14 +1,14 @@
 #!/usr/bin/env node
-'use strict'
+'use strict';
 
-const cbor = require('cbor')
-const utils = require('../lib/utils')
-const pkg = require('../package.json')
-const util = require('util')
-const bdec = require('cbor-bigdecimal')
-bdec(cbor)
+const cbor = require('cbor');
+const utils = require('../lib/utils');
+const pkg = require('../package.json');
+const util = require('node:util');
+const bdec = require('cbor-bigdecimal');
+bdec(cbor);
 
-const {program} = require('commander')
+const {program} = require('commander');
 
 program
   .version(pkg.version)
@@ -16,23 +16,23 @@ program
   .option('-x, --hex ', 'Hex string input')
   .option('-e, --exports', 'add module.exports= to the beginning')
   .option('-H, --hidden', 'Include non-enumerable symbols and properties')
-  .parse(process.argv)
+  .parse(process.argv);
 
-const opts = program.opts()
-const argv = program.args
+const opts = program.opts();
+const argv = program.args;
 if (opts.hex) {
-  argv.push(new utils.DeHexStream(opts.hex))
+  argv.push(new utils.DeHexStream(opts.hex));
 }
 
 if (argv.length === 0) {
-  argv.push('-')
+  argv.push('-');
 }
 
 utils.streamFiles(argv, () => {
-  const d = new cbor.Decoder()
+  const d = new cbor.Decoder();
   d.on('data', v => {
     if (opts.exports) {
-      process.stdout.write('module.exports = ')
+      process.stdout.write('module.exports = ');
     }
     console.log(util.inspect(v, {
       compact: false,
@@ -42,7 +42,7 @@ utils.streamFiles(argv, () => {
       depth: Infinity,
       sorted: true,
       breakLength: process.env.COLS || 80,
-    }))
-  })
-  return d
-}).catch(utils.printError)
+    }));
+  });
+  return d;
+}).catch(utils.printError);
diff --git a/packages/cbor-cli/bin/cbor2json.js b/packages/cbor-cli/bin/cbor2json.js
index d840ce51..e370faf0 100755
--- a/packages/cbor-cli/bin/cbor2json.js
+++ b/packages/cbor-cli/bin/cbor2json.js
@@ -1,34 +1,34 @@
 #!/usr/bin/env node
-'use strict'
+'use strict';
 
-const cbor = require('cbor')
-const utils = require('../lib/utils')
-const pkg = require('../package.json')
-const bdec = require('cbor-bigdecimal')
-bdec(cbor)
+const cbor = require('cbor');
+const utils = require('../lib/utils');
+const pkg = require('../package.json');
+const bdec = require('cbor-bigdecimal');
+bdec(cbor);
 
-const {program} = require('commander')
+const {program} = require('commander');
 
 program
   .version(pkg.version)
   .usage('[options] ')
   .option('-x, --hex ', 'Hex string input')
-  .parse(process.argv)
+  .parse(process.argv);
 
-const opts = program.opts()
-const argv = program.args
+const opts = program.opts();
+const argv = program.args;
 if (opts.hex) {
-  argv.push(new utils.DeHexStream(opts.hex))
+  argv.push(new utils.DeHexStream(opts.hex));
 }
 
 if (argv.length === 0) {
-  argv.push('-')
+  argv.push('-');
 }
 
 utils.streamFiles(argv, () => {
-  const d = new cbor.Decoder()
+  const d = new cbor.Decoder();
   d.on('data', v => {
-    console.log(JSON.stringify(v))
-  })
-  return d
-}).catch(utils.printError)
+    console.log(JSON.stringify(v));
+  });
+  return d;
+}).catch(utils.printError);
diff --git a/packages/cbor-cli/bin/js2cbor.js b/packages/cbor-cli/bin/js2cbor.js
index 3b240316..c72ec27e 100755
--- a/packages/cbor-cli/bin/js2cbor.js
+++ b/packages/cbor-cli/bin/js2cbor.js
@@ -1,28 +1,28 @@
 #!/usr/bin/env node
-'use strict'
+'use strict';
 
-const cbor = require('cbor')
-const utils = require('../lib/utils')
-const pkg = require('../package.json')
-const {program} = require('commander')
-const path = require('path')
-const stream = require('stream')
-const Module = require('module')
-const {Buffer} = require('buffer') // Not the mangled version
-const bdec = require('cbor-bigdecimal')
-bdec(cbor)
+const cbor = require('cbor');
+const utils = require('../lib/utils');
+const pkg = require('../package.json');
+const {program} = require('commander');
+const path = require('node:path');
+const stream = require('node:stream');
+const Module = require('node:module');
+const {Buffer} = require('node:buffer'); // Not the mangled version
+const bdec = require('cbor-bigdecimal');
+bdec(cbor);
 
 program
   .version(pkg.version)
   .usage('[options] ')
   .option('-x, --hex', 'Hex string output')
   .option('-c, --canonical', 'Canonical output')
-  .parse(process.argv)
+  .parse(process.argv);
 
-const opts = program.opts()
-const argv = program.args
+const opts = program.opts();
+const argv = program.args;
 if (argv.length === 0) {
-  argv.push('-')
+  argv.push('-');
 }
 
 // Overly-fancy `require`, so we can take modules on stdin.
@@ -32,40 +32,40 @@ class ModuleStream extends stream.Transform {
   constructor(filename) {
     super({
       readableObjectMode: true,
-    })
-    this.bufs = []
-    this.filename = filename
+    });
+    this.bufs = [];
+    this.filename = filename;
   }
 
   _transform(chunk, encoding, callback) {
-    this.bufs.push(chunk)
-    callback()
+    this.bufs.push(chunk);
+    callback();
   }
 
   _flush() {
-    const m = new Module(this.filename, module)
-    m.filename = this.filename
-    m.paths = Module._nodeModulePaths(path.dirname(this.filename))
-    m._compile(Buffer.concat(this.bufs).toString('utf8'), this.filename)
-    this.push(m.exports)
+    const m = new Module(this.filename, module);
+    m.filename = this.filename;
+    m.paths = Module._nodeModulePaths(path.dirname(this.filename));
+    m._compile(Buffer.concat(this.bufs).toString('utf8'), this.filename);
+    this.push(m.exports);
   }
 }
 
 utils.streamFiles(argv, f => {
-  const m = new ModuleStream(f)
-  const d = new cbor.Encoder({canonical: opts.canonical})
+  const m = new ModuleStream(f);
+  const d = new cbor.Encoder({canonical: opts.canonical});
   m.on('data', mod => {
     if (typeof mod === 'function') {
-      mod = mod(f)
+      mod = mod(f);
     }
-    d.end(mod)
-  })
-  let o = d
+    d.end(mod);
+  });
+  let o = d;
   if (opts.hex) {
-    o = new utils.HexStream()
-    d.pipe(o)
-    o.on('end', () => process.stdout.write('\n'))
+    o = new utils.HexStream();
+    d.pipe(o);
+    o.on('end', () => process.stdout.write('\n'));
   }
-  o.pipe(process.stdout)
-  return m
-}).catch(utils.printError)
+  o.pipe(process.stdout);
+  return m;
+}).catch(utils.printError);
diff --git a/packages/cbor-cli/bin/json2cbor.js b/packages/cbor-cli/bin/json2cbor.js
index e9a91a3b..8431d784 100755
--- a/packages/cbor-cli/bin/json2cbor.js
+++ b/packages/cbor-cli/bin/json2cbor.js
@@ -1,43 +1,43 @@
 #!/usr/bin/env node
-'use strict'
+'use strict';
 
-const cbor = require('cbor')
-const utils = require('../lib/utils')
-const pkg = require('../package.json')
-const {program} = require('commander')
+const cbor = require('cbor');
+const utils = require('../lib/utils');
+const pkg = require('../package.json');
+const {program} = require('commander');
 
 program
   .version(pkg.version)
   .usage('[options] ')
   .option('-x, --hex', 'Hex string output')
   .option('-c, --canonical', 'Canonical output')
-  .parse(process.argv)
+  .parse(process.argv);
 
-const opts = program.opts()
-const argv = program.args
+const opts = program.opts();
+const argv = program.args;
 if (argv.length === 0) {
-  argv.push('-')
+  argv.push('-');
 }
 
 utils.streamFiles(argv, () => {
-  const Parser = require('json-text-sequence').parser
-  const p = new Parser()
-  const d = new cbor.Encoder({canonical: opts.canonical})
-  p.pipe(d)
+  const Parser = require('json-text-sequence').parser;
+  const p = new Parser();
+  const d = new cbor.Encoder({canonical: opts.canonical});
+  p.pipe(d);
   p.on('truncated', b => {
     try {
-      d.write(JSON.parse(b))
+      d.write(JSON.parse(b));
     } catch (e) {
-      e.message += ` for input ${b.inspect()}`
-      throw e
+      e.message += ` for input ${b.inspect()}`;
+      throw e;
     }
-  })
-  let o = d
+  });
+  let o = d;
   if (opts.hex) {
-    o = new utils.HexStream()
-    d.pipe(o)
-    o.on('end', () => process.stdout.write('\n'))
+    o = new utils.HexStream();
+    d.pipe(o);
+    o.on('end', () => process.stdout.write('\n'));
   }
-  o.pipe(process.stdout)
-  return p
-}).catch(utils.printError)
+  o.pipe(process.stdout);
+  return p;
+}).catch(utils.printError);
diff --git a/packages/cbor-cli/lib/utils.js b/packages/cbor-cli/lib/utils.js
index 72e51b8a..7524d059 100644
--- a/packages/cbor-cli/lib/utils.js
+++ b/packages/cbor-cli/lib/utils.js
@@ -1,50 +1,50 @@
-'use strict'
+'use strict';
 
-const fs = require('fs')
-const stream = require('stream')
-const {Buffer} = require('buffer') // Not the mangled version
+const fs = require('node:fs');
+const stream = require('node:stream');
+const {Buffer} = require('node:buffer'); // Not the mangled version
 
 exports.DeHexStream = class DeHexStream extends stream.Readable {
   constructor(hex) {
-    super()
-    hex = hex.replace(/^0x/, '')
+    super();
+    hex = hex.replace(/^0x/, '');
     if (hex) {
-      this.push(Buffer.from(hex, 'hex'))
+      this.push(Buffer.from(hex, 'hex'));
     }
-    this.push(null)
+    this.push(null);
   }
-}
+};
 
 exports.HexStream = class HexStream extends stream.Transform {
   constructor(options) {
-    super(options)
+    super(options);
   }
 
   _transform(fresh, encoding, cb) {
-    this.push(fresh.toString('hex'))
-    return cb()
+    this.push(fresh.toString('hex'));
+    return cb();
   }
-}
+};
 
 exports.printError = function printError(er) {
   if (er != null) {
-    console.error(er)
+    console.error(er);
   }
-}
+};
 
 exports.streamFiles = async function streamFiles(files, streamFunc) {
   for (const f of files) {
     await new Promise((resolve, reject) => {
-      const sf = streamFunc(f)
-      sf.on('end', resolve)
-      sf.on('error', reject)
+      const sf = streamFunc(f);
+      sf.on('end', resolve);
+      sf.on('error', reject);
 
-      let s = (f === '-') ? process.stdin : f
+      let s = (f === '-') ? process.stdin : f;
       if (!(s instanceof stream.Stream)) {
-        s = fs.createReadStream(s)
+        s = fs.createReadStream(s);
       }
-      s.on('error', reject)
-      s.pipe(sf)
-    })
+      s.on('error', reject);
+      s.pipe(sf);
+    });
   }
-}
+};
diff --git a/packages/cbor-cli/package.json b/packages/cbor-cli/package.json
index 8ed59c94..91f16dbb 100644
--- a/packages/cbor-cli/package.json
+++ b/packages/cbor-cli/package.json
@@ -42,20 +42,20 @@
   },
   "devDependencies": {
     "marked": "^0.7.0",
-    "marked-man": "^1.3.3",
+    "marked-man": "^2.1.0",
     "mock-stdio": "^1.0.3",
-    "nofilter": "^3.1.0",
+    "nofilter": "^3.0.2",
     "p-event": "^4.2.0",
-    "rimraf": "^5.0.0"
+    "rimraf": "^6.0.1"
   },
   "license": "MIT",
   "readmeFilename": "README.md",
   "dependencies": {
-    "bignumber.js": "^9.1.1",
+    "bignumber.js": "^9.1.2",
     "cbor": "^9.0.2",
     "cbor-bigdecimal": "^9.0.0",
-    "commander": "^10.0.1",
-    "json-text-sequence": "^1.0.1"
+    "commander": "^12.1.0",
+    "json-text-sequence": "1.0.1"
   },
   "engines": {
     "node": ">=16"
diff --git a/packages/cbor-cli/test/.eslintrc.js b/packages/cbor-cli/test/.eslintrc.js
deleted file mode 100644
index 8cf1e873..00000000
--- a/packages/cbor-cli/test/.eslintrc.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict'
-
-module.exports = {
-  extends: '@cto.af/eslint-config/ava',
-}
diff --git a/packages/cbor-cli/test/exec.ava.js b/packages/cbor-cli/test/exec.ava.js
index 4d375d8c..e33440ce 100644
--- a/packages/cbor-cli/test/exec.ava.js
+++ b/packages/cbor-cli/test/exec.ava.js
@@ -1,11 +1,11 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const {spawn} = require('child_process')
-const path = require('path')
-const process = require('process')
-const pkg = require('../package.json')
-const {Buffer} = require('buffer') // Not the mangled version
+const test = require('ava');
+const {spawn} = require('node:child_process');
+const path = require('node:path');
+const process = require('node:process');
+const pkg = require('../package.json');
+const {Buffer} = require('node:buffer'); // Not the mangled version
 
 function exec(bin, opts = {}) {
   opts = {
@@ -13,115 +13,115 @@ function exec(bin, opts = {}) {
     encoding: 'utf8',
     env: {},
     ...opts,
-  }
+  };
   return new Promise((resolve, reject) => {
-    bin = path.join(__dirname, '..', 'bin', `${bin}.js`)
+    bin = path.join(__dirname, '..', 'bin', `${bin}.js`);
     const env = {
       ...process.env,
       ...opts.env,
-    }
-    const args = opts.args || []
+    };
+    const args = opts.args || [];
     if (process.platform === 'win32') {
-      args.unshift(bin)
-      ;[bin] = process.argv
+      args.unshift(bin);
+      [bin] = process.argv;
     }
     const c = spawn(bin, args, {
       stdio: 'pipe',
       env,
-    })
-    c.on('error', reject)
-    const bufs = []
-    c.stdout.on('data', b => bufs.push(b))
-    c.stderr.on('data', b => bufs.push(b))
+    });
+    c.on('error', reject);
+    const bufs = [];
+    c.stdout.on('data', b => bufs.push(b));
+    c.stderr.on('data', b => bufs.push(b));
     c.on('close', code => {
-      const buf = Buffer.concat(bufs)
-      const str = buf.toString(opts.encoding)
+      const buf = Buffer.concat(bufs);
+      const str = buf.toString(opts.encoding);
       if (code === 0) {
-        resolve(str)
+        resolve(str);
       } else {
-        const err = new Error(`process fail, code ${code}`)
-        err.buf = buf
-        err.str = str
-        reject(err)
+        const err = new Error(`process fail, code ${code}`);
+        err.buf = buf;
+        err.str = str;
+        reject(err);
       }
-    })
+    });
     if (opts.stdin != null) {
-      c.stdin.write(opts.stdin)
+      c.stdin.write(opts.stdin);
     }
-    c.stdin.end()
-  })
+    c.stdin.end();
+  });
 }
 
 test('json2cbor', async t => {
   let buf = await exec('json2cbor', {
     stdin: '{"foo": false}',
     encoding: 'hex',
-  })
-  t.is(buf, 'a163666f6ff4')
+  });
+  t.is(buf, 'a163666f6ff4');
   buf = await exec('json2cbor', {
     args: ['-xc'],
     stdin: `{
   "foo": false,
   "bar": -1
 }`,
-  })
-  t.is(buf, 'a2636261722063666f6ff4\n')
-  const pf = path.join(__dirname, '..', 'package.json')
+  });
+  t.is(buf, 'a2636261722063666f6ff4\n');
+  const pf = path.join(__dirname, '..', 'package.json');
   buf = await exec('json2cbor', {
     args: [pf, pf, pf],
     encoding: 'hex',
-  })
-  t.truthy(buf.length > 0)
+  });
+  t.truthy(buf.length > 0);
 
-  const ver = await exec('json2cbor', {args: ['-V']})
-  t.is(ver, `${pkg.version}\n`)
+  const ver = await exec('json2cbor', {args: ['-V']});
+  t.is(ver, `${pkg.version}\n`);
 
-  const help = await exec('json2cbor', {args: ['-h']})
-  t.truthy(help.startsWith('Usage: '))
+  const help = await exec('json2cbor', {args: ['-h']});
+  t.truthy(help.startsWith('Usage: '));
 
-  const er = await t.throwsAsync(() => exec('json2cbor', {args: ['-Q']}))
-  t.is(er.buf.toString('utf8'), 'error: unknown option \'-Q\'\n')
-  t.is(er.str, 'error: unknown option \'-Q\'\n')
+  const er = await t.throwsAsync(() => exec('json2cbor', {args: ['-Q']}));
+  t.is(er.buf.toString('utf8'), 'error: unknown option \'-Q\'\n');
+  t.is(er.str, 'error: unknown option \'-Q\'\n');
 
   await t.throwsAsync(
     () => exec('json2cbor', {
       args: ['-x', '-'],
       stdin: 'treu', // Sic
     })
-  )
-})
+  );
+});
 
 test('cbor2json', async t => {
   let buf = await exec(t.title, {
     stdin: Buffer.from('12', 'hex'),
-  })
-  t.is(buf, '18\n')
+  });
+  t.is(buf, '18\n');
   buf = await exec(t.title, {
     args: ['-x', '12'],
-  })
-  t.is(buf, '18\n')
-})
+  });
+  t.is(buf, '18\n');
+});
 
 test('cbor2diag', async t => {
   let buf = await exec(t.title, {
     stdin: Buffer.from('c100', 'hex'),
-  })
-  t.is(buf, '1(0)\n')
+  });
+  t.is(buf, '1(0)\n');
   buf = await exec(t.title, {
     args: ['-x', 'c100'],
-  })
-  t.is(buf, '1(0)\n')
-})
+  });
+  t.is(buf, '1(0)\n');
+});
 
 test('cbor2comment', async t => {
   let buf = await exec(t.title, {
     stdin: Buffer.from('c100', 'hex'),
-  })
+  });
   t.is(buf, `\
   c1                -- Tag #1
     00              -- 0
 0xc100
-`)
+`);
   buf = await exec(t.title, {
     args: [
       '--tabsize',
@@ -129,13 +129,13 @@ test('cbor2comment', async t => {
       '-x',
       'c100',
     ],
-  })
+  });
   t.is(buf, `\
   c1                        -- Tag #1
     00                      -- 0
 0xc100
-`)
-})
+`);
+});
 
 test('cbor', async t => {
   let buf = await exec(t.title, {
@@ -143,19 +143,19 @@ test('cbor', async t => {
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
+  });
   // I might leave this in for a while to ensure that we're running the cbor
   // version I think we should be in CI.
-  console.log('cli VERSION:', buf)
+  console.log('cli VERSION:', buf);
   t.regex(buf,
-    /^cbor v[0-9.]*(?:#\S*)? \(javascript output from typing 0x00\)\ncbor> true\n0xf5\ncbor> $/)
+    /^cbor v[0-9.]*(?:#\S*)? \(javascript output from typing 0x00\)\ncbor> true\n0xf5\ncbor> $/);
 
   await t.throwsAsync(() => exec(t.title, {
     args: ['-t', 'foo'],
     env: {
       NODE_REPL_HISTORY: '',
     },
-  }))
+  }));
 
   buf = await exec(t.title, {
     args: ['-t', 'diag', '-c'],
@@ -163,8 +163,8 @@ test('cbor', async t => {
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, /\[\[0\]\]\n/)
+  });
+  t.regex(buf, /\[\[0\]\]\n/);
 
   buf = await exec(t.title, {
     args: ['-t', 'comment', '-c'],
@@ -172,8 +172,8 @@ test('cbor', async t => {
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, /Array, 1 item/)
+  });
+  t.regex(buf, /Array, 1 item/);
 
   buf = await exec(t.title, {
     args: ['-t', 'js'],
@@ -181,23 +181,23 @@ test('cbor', async t => {
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, / +a: 1\n/)
+  });
+  t.regex(buf, / +a: 1\n/);
   buf = await exec(t.title, {
     stdin: 'comment("01")',
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, /Promise/)
-  t.regex(buf, /0x01/)
+  });
+  t.regex(buf, /Promise/);
+  t.regex(buf, /0x01/);
   buf = await exec(t.title, {
     stdin: 'diagnose("01")',
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, /Promise\n1\n/)
+  });
+  t.regex(buf, /Promise\n1\n/);
 
   buf = await exec(t.title, {
     args: ['-t', 'd'],
@@ -205,8 +205,8 @@ test('cbor', async t => {
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, /Error: unexpected end of input/)
+  });
+  t.regex(buf, /Error: unexpected end of input/);
 
   buf = await exec(t.title, {
     args: ['-t', 'c'],
@@ -214,8 +214,8 @@ test('cbor', async t => {
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, /Error: unexpected end of input/)
+  });
+  t.regex(buf, /Error: unexpected end of input/);
 
   buf = await exec(t.title, {
     args: ['-t', 'javascript'],
@@ -223,27 +223,27 @@ test('cbor', async t => {
     env: {
       NODE_REPL_HISTORY: '',
     },
-  })
-  t.regex(buf, /Error: unexpected end of input/)
-})
+  });
+  t.regex(buf, /Error: unexpected end of input/);
+});
 
 test('cbor2js', async t => {
   let buf = await exec(t.title, {
     stdin: Buffer.from('a16161f5', 'hex'),
-  })
-  t.is(buf, '{\n  a: true\n}\n')
+  });
+  t.is(buf, '{\n  a: true\n}\n');
   buf = await exec(t.title, {
     args: ['-x', 'a16161f5', '-e'],
-  })
-  t.is(buf, 'module.exports = {\n  a: true\n}\n')
-})
+  });
+  t.is(buf, 'module.exports = {\n  a: true\n}\n');
+});
 
 test('js2cbor', async t => {
   let buf = await exec(t.title, {
     args: ['-x'],
     stdin: 'module.exports = {\n  a: true\n}\n',
-  })
-  t.is(buf, 'a16161f5\n')
+  });
+  t.is(buf, 'a16161f5\n');
   const fixtureFiles = [
     {
       name: 'object.js',
@@ -253,13 +253,13 @@ test('js2cbor', async t => {
       name: 'function.js',
       result: 'a363666f6fc1fb41d808c21e2a5e35636261724e30313631323930383636343636326466696c65826866697874757265736b66756e6374696f6e2e6a73',
     },
-  ]
-  const fixtures = path.resolve(__dirname, 'fixtures')
+  ];
+  const fixtures = path.resolve(__dirname, 'fixtures');
   for (const {name, result} of fixtureFiles) {
     buf = await exec(t.title, {
       args: [path.resolve(fixtures, name)],
       encoding: 'hex',
-    })
-    t.is(buf, result)
+    });
+    t.is(buf, result);
   }
-})
+});
diff --git a/packages/cbor-cli/test/fixtures/function.js b/packages/cbor-cli/test/fixtures/function.js
index 49492c30..aa84ae4e 100644
--- a/packages/cbor-cli/test/fixtures/function.js
+++ b/packages/cbor-cli/test/fixtures/function.js
@@ -1,7 +1,7 @@
-'use strict'
+'use strict';
 
-const path = require('path')
-const {Buffer} = require('buffer')
+const path = require('node:path');
+const {Buffer} = require('node:buffer');
 
 module.exports = f => ({
   foo: new Date(1612908664662),
@@ -9,4 +9,4 @@ module.exports = f => ({
   file: path.resolve(process.cwd(), f)
     .split(path.sep)
     .slice(-2),
-})
+});
diff --git a/packages/cbor-cli/test/fixtures/object.js b/packages/cbor-cli/test/fixtures/object.js
index 44f086dd..5c62880e 100644
--- a/packages/cbor-cli/test/fixtures/object.js
+++ b/packages/cbor-cli/test/fixtures/object.js
@@ -1,7 +1,7 @@
-'use strict'
+'use strict';
 
-const {Buffer} = require('buffer')
+const {Buffer} = require('node:buffer');
 module.exports = {
   foo: new Date(1612908664662),
   bar: Buffer.from('01612908664662'),
-}
+};
diff --git a/packages/cbor-cli/test/utils.ava.js b/packages/cbor-cli/test/utils.ava.js
index 727b3a4f..dfc5f89f 100644
--- a/packages/cbor-cli/test/utils.ava.js
+++ b/packages/cbor-cli/test/utils.ava.js
@@ -1,74 +1,74 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const NoFilter = require('nofilter')
-const pEvent = require('p-event')
-const mockIo = require('mock-stdio')
-const utils = require('../lib/utils')
-const {Buffer} = require('buffer') // Not the mangled version
+const test = require('ava');
+const NoFilter = require('nofilter');
+const pEvent = require('p-event');
+const mockIo = require('mock-stdio');
+const utils = require('../lib/utils');
+const {Buffer} = require('node:buffer'); // Not the mangled version
 
-const BAD_FILE = '/tmp/hopefully-does-not-exist'
+const BAD_FILE = '/tmp/hopefully-does-not-exist';
 
 test('DeHexStream', t => {
   [
     ['6161', 'aa'],
     ['0x00', '\x00'],
   ].forEach(hd => {
-    const d = new utils.DeHexStream(hd[0])
-    t.deepEqual(d.read().toString(), hd[1])
-  })
-  ;[
+    const d = new utils.DeHexStream(hd[0]);
+    t.deepEqual(d.read().toString(), hd[1]);
+  });
+  [
     ['', null],
     ['0x', null],
   ].forEach(hd => {
-    const d = new utils.DeHexStream(hd[0])
-    t.deepEqual(d.read(), hd[1])
-  })
-})
+    const d = new utils.DeHexStream(hd[0]);
+    t.deepEqual(d.read(), hd[1]);
+  });
+});
 
 test('HexStream', async t => {
-  const h = new utils.HexStream()
-  const bs = new NoFilter()
-  h.pipe(bs)
-  h.end(Buffer.from([0x61]))
-  await pEvent(h, 'end')
-  t.is(bs.toString('utf8'), '61')
-})
+  const h = new utils.HexStream();
+  const bs = new NoFilter();
+  h.pipe(bs);
+  h.end(Buffer.from([0x61]));
+  await pEvent(h, 'end');
+  t.is(bs.toString('utf8'), '61');
+});
 
 test('streamFilesNone', async t => {
-  await utils.streamFiles([], () => null)
+  await utils.streamFiles([], () => null);
   await t.throwsAsync(() => utils.streamFiles(
     [BAD_FILE], () => new utils.HexStream()
-  ))
-})
+  ));
+});
 
 test('streamFilesDash', async t => {
-  const u = new utils.HexStream()
-  const bs = new NoFilter()
-  u.pipe(bs)
-  await utils.streamFiles([new utils.DeHexStream('6161')], () => u)
-  t.is(bs.toString('utf8'), '6161')
-})
+  const u = new utils.HexStream();
+  const bs = new NoFilter();
+  u.pipe(bs);
+  await utils.streamFiles([new utils.DeHexStream('6161')], () => u);
+  t.is(bs.toString('utf8'), '6161');
+});
 
 test('streamFilesInputs', async t => {
-  t.plan(1)
-  const u = new utils.HexStream()
-  const bs = new NoFilter()
-  u.pipe(bs)
+  t.plan(1);
+  const u = new utils.HexStream();
+  const bs = new NoFilter();
+  u.pipe(bs);
 
   await utils.streamFiles([
     new utils.DeHexStream('48656c6c6f2c20576f726c64210a'),
-  ], () => u)
-  t.is(bs.read().toString(), '48656c6c6f2c20576f726c64210a')
-})
+  ], () => u);
+  t.is(bs.read().toString(), '48656c6c6f2c20576f726c64210a');
+});
 
 test('printError', t => {
-  mockIo.start()
-  utils.printError(null)
-  t.deepEqual(mockIo.end(), {stderr: '', stdout: ''})
-  mockIo.start()
-  utils.printError(new Error('Fake error'))
-  const res = mockIo.end()
-  t.is(res.stdout, '')
-  t.truthy(res.stderr.startsWith('Error: Fake error'))
-})
+  mockIo.start();
+  utils.printError(null);
+  t.deepEqual(mockIo.end(), {stderr: '', stdout: ''});
+  mockIo.start();
+  utils.printError(new Error('Fake error'));
+  const res = mockIo.end();
+  t.is(res.stdout, '');
+  t.truthy(res.stderr.startsWith('Error: Fake error'));
+});
diff --git a/packages/cbor-rn-prereqs/README.md b/packages/cbor-rn-prereqs/README.md
index 2505eda9..fc70ac27 100644
--- a/packages/cbor-rn-prereqs/README.md
+++ b/packages/cbor-rn-prereqs/README.md
@@ -19,14 +19,14 @@ module.exports = {
       stream: require.resolve('stream-browserify'),
     },
   },
-}
+};
 ```
 
 `require` this package *before* importing or requiring `cbor`:
 
 ```js
-require('cbor-rn-prereqs')
-const cbor = require('cbor')
+require('cbor-rn-prereqs');
+const cbor = require('cbor');
 ```
 
 ## What this does
diff --git a/packages/cbor-rn-prereqs/index.js b/packages/cbor-rn-prereqs/index.js
index 7a31a29f..dfa21c28 100644
--- a/packages/cbor-rn-prereqs/index.js
+++ b/packages/cbor-rn-prereqs/index.js
@@ -1,42 +1,44 @@
-'use strict'
+'use strict';
 
 function patchGlobal(g) {
-  const fixes = []
+  const fixes = [];
 
   if (g.BigInt === undefined) {
-    const bi = require('big-integer')
+    const bi = require('big-integer');
 
     // Allow BigInt('0xffffffffffffffff') or BigInt('0x777777777777777777')
     g.BigInt = value => {
       if (typeof value === 'string') {
         // eslint-disable-next-line prefer-named-capture-group
-        const match = value.match(/^0([xo])([0-9a-f]+)$/i)
+        const match = value.match(/^0([xo])([0-9a-f]+)$/i);
         if (match) {
-          return bi(match[2], match[1].toLowerCase() === 'x' ? 16 : 8)
+          return bi(match[2], match[1].toLowerCase() === 'x' ? 16 : 8);
         }
       }
-      return bi(value)
-    }
-    fixes.push('BigInt')
+      return bi(value);
+    };
+    fixes.push('BigInt');
   }
 
   if (g.process === undefined) {
-    g.process = require('process')
-    fixes.push('process')
+    // eslint-disable-next-line n/prefer-node-protocol
+    g.process = require('process');
+    fixes.push('process');
   } else if (g.process.nextTick === undefined) {
-    g.process.nextTick = require('process').nextTick
-    fixes.push('nextTick')
+    // eslint-disable-next-line n/prefer-node-protocol
+    g.process.nextTick = require('process').nextTick;
+    fixes.push('nextTick');
   }
 
   if (g.TextDecoder === undefined) {
-    const TextDecoder = require('@cto.af/textdecoder')
-    g.TextDecoder = TextDecoder
-    fixes.push('TextDecoder')
+    const TextDecoder = require('@cto.af/textdecoder');
+    g.TextDecoder = TextDecoder;
+    fixes.push('TextDecoder');
   }
 
-  return fixes
+  return fixes;
 }
 
-exports.patchGlobal = patchGlobal
-exports.fixes = patchGlobal(global)
+exports.patchGlobal = patchGlobal;
+exports.fixes = patchGlobal(global);
 
diff --git a/packages/cbor-rn-prereqs/package.json b/packages/cbor-rn-prereqs/package.json
index e241cfba..5fbba8b7 100644
--- a/packages/cbor-rn-prereqs/package.json
+++ b/packages/cbor-rn-prereqs/package.json
@@ -21,7 +21,7 @@
   "license": "MIT",
   "dependencies": {
     "@cto.af/textdecoder": "^0.2.0",
-    "big-integer": "^1.6.51",
+    "big-integer": "^1.6.52",
     "buffer": "^6.0.3",
     "events": "^3.3.0",
     "process": "^0.11.10",
diff --git a/packages/cbor-rn-prereqs/test/index.ava.js b/packages/cbor-rn-prereqs/test/index.ava.js
index 35cdb352..28b2072d 100644
--- a/packages/cbor-rn-prereqs/test/index.ava.js
+++ b/packages/cbor-rn-prereqs/test/index.ava.js
@@ -1,34 +1,34 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const {fixes, patchGlobal} = require('../')
+const test = require('ava');
+const {fixes, patchGlobal} = require('../');
 
 test('node environment', t => {
-  t.deepEqual(fixes, [])
-})
+  t.deepEqual(fixes, []);
+});
 
 test('some potential broken environments', t => {
-  const fakeGlobal = {}
-  const fakeFixes = patchGlobal(fakeGlobal)
-  t.deepEqual(fakeFixes, ['BigInt', 'process', 'TextDecoder'])
-  const fakeGlobal2 = {process: {}}
-  const fakeFixes2 = patchGlobal(fakeGlobal2)
-  t.deepEqual(fakeFixes2, ['BigInt', 'nextTick', 'TextDecoder'])
-})
+  const fakeGlobal = {};
+  const fakeFixes = patchGlobal(fakeGlobal);
+  t.deepEqual(fakeFixes, ['BigInt', 'process', 'TextDecoder']);
+  const fakeGlobal2 = {process: {}};
+  const fakeFixes2 = patchGlobal(fakeGlobal2);
+  t.deepEqual(fakeFixes2, ['BigInt', 'nextTick', 'TextDecoder']);
+});
 
 test('BigInt', t => {
-  const fakeGlobal = {}
-  patchGlobal(fakeGlobal)
+  const fakeGlobal = {};
+  patchGlobal(fakeGlobal);
 
-  const hex = fakeGlobal.BigInt('0xffffffffffffffff')
-  t.is(hex.toString(16), 'ffffffffffffffff')
+  const hex = fakeGlobal.BigInt('0xffffffffffffffff');
+  t.is(hex.toString(16), 'ffffffffffffffff');
 
-  const oct = fakeGlobal.BigInt('0o7777777777777777')
-  t.is(oct.toString(8), '7777777777777777')
+  const oct = fakeGlobal.BigInt('0o7777777777777777');
+  t.is(oct.toString(8), '7777777777777777');
 
-  const i = fakeGlobal.BigInt(0xffffffff)
-  t.is(i.toString(16), 'ffffffff')
+  const i = fakeGlobal.BigInt(0xffffffff);
+  t.is(i.toString(16), 'ffffffff');
 
-  const j = fakeGlobal.BigInt('16')
-  t.is(j.toString(), '16')
-})
+  const j = fakeGlobal.BigInt('16');
+  t.is(j.toString(), '16');
+});
diff --git a/packages/cbor-web/.eslintrc.js b/packages/cbor-web/.eslintrc.js
deleted file mode 100644
index 6c6fc076..00000000
--- a/packages/cbor-web/.eslintrc.js
+++ /dev/null
@@ -1,14 +0,0 @@
-module.exports = {
-  parserOptions: {
-    sourceType: 'module',
-  },
-  rules: {
-    'node/no-unsupported-features/es-syntax': [
-      'error',
-      {
-        version: '>=12.19',
-        ignores: ['modules'],
-      },
-    ],
-  },
-}
diff --git a/packages/cbor-web/.npmrc b/packages/cbor-web/.npmrc
index 4c1bf779..b6f27f13 100644
--- a/packages/cbor-web/.npmrc
+++ b/packages/cbor-web/.npmrc
@@ -1,2 +1 @@
 engine-strict=true
-package-lock=false
diff --git a/packages/cbor-web/dist/cbor.js b/packages/cbor-web/dist/cbor.js
index 541d9da7..b3460ce7 100644
--- a/packages/cbor-web/dist/cbor.js
+++ b/packages/cbor-web/dist/cbor.js
@@ -1,2 +1,2 @@
 /*! For license information please see cbor.js.LICENSE.txt */
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cbor=t():e.cbor=t()}(this,(()=>(()=>{var e={8599:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],l=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),c=0,f=l>0?s-4:s;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;au?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function b(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){let o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=b,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function B(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function x(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function k(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function P(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||Y(t,e.length-(r+1))}(n,i,o)}function G(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}C("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),C("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),C("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},2141:(e,t,r)=>{"use strict";const n=r(2020),i=r(4694),o=r(6774),s=r(4666),a=r(9032),l=r(4785),u=r(3070),c=r(8112);e.exports={Commented:n,Diagnose:i,Decoder:o,Encoder:s,Simple:a,Tagged:l,Map:u,SharedValueEncoder:c,comment:n.comment,decodeAll:o.decodeAll,decodeFirst:o.decodeFirst,decodeAllSync:o.decodeAllSync,decodeFirstSync:o.decodeFirstSync,diagnose:i.diagnose,encode:s.encode,encodeCanonical:s.encodeCanonical,encodeOne:s.encodeOne,encodeAsync:s.encodeAsync,decode:o.decodeFirstSync,leveldb:{decode:o.decodeFirstSync,encode:s.encode,buffer:!0,name:"cbor"},reset(){s.reset(),l.reset()}}},2020:(e,t,r)=>{"use strict";const n=r(2830),i=r(9873),o=r(6774),s=r(4202),{MT:a,NUMBYTES:l,SYMS:u}=r(9066),{Buffer:c}=r(8764);function f(e){return e>1?"s":""}class h extends n.Transform{constructor(e={}){const{depth:t=1,max_depth:r=10,no_summary:n=!1,tags:i={},preferWeb:a,encoding:l,...u}=e;super({...u,readableObjectMode:!1,writableObjectMode:!1}),this.depth=t,this.max_depth=r,this.all=new s,i[24]||(i[24]=this._tag_24.bind(this)),this.parser=new o({tags:i,max_depth:r,preferWeb:a,encoding:l}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),n||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(e){const t=new h({depth:this.depth+1,no_summary:!0});t.on("data",(e=>this.push(e))),t.on("error",(e=>this.emit("error",e))),t.end(e)}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){return this.parser._flush(e)}static comment(e,t={},r=null){if(null==e)throw new Error("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"number":return{options:{max_depth:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const n=new s,{encoding:o="hex",...a}=t,l=new h(a);let u=null;return"function"==typeof r?(l.on("end",(()=>{r(null,n.toString("utf8"))})),l.on("error",r)):u=new Promise(((e,t)=>{l.on("end",(()=>{e(n.toString("utf8"))})),l.on("error",t)})),l.pipe(n),i.guessEncoding(e,o).pipe(l),u}_on_error(e){this.push("ERROR: "),this.push(e.toString()),this.push("\n")}_on_read(e){this.all.write(e);const t=e.toString("hex");this.push(new Array(this.depth+1).join("  ")),this.push(t);let r=2*(this.max_depth-this.depth)-t.length;r<1&&(r=1),this.push(new Array(r+1).join(" ")),this.push("-- ")}_on_more(e,t,r,n){let i="";switch(this.depth++,e){case a.POS_INT:i="Positive number,";break;case a.NEG_INT:i="Negative number,";break;case a.ARRAY:i="Array, length";break;case a.MAP:i="Map, count";break;case a.BYTE_STRING:i="Bytes, length";break;case a.UTF8_STRING:i="String, length";break;case a.SIMPLE_FLOAT:i=1===t?"Simple value,":"Float,"}this.push(`${i} next ${t} byte${f(t)}\n`)}_on_start_string(e,t,r,n){let i="";switch(this.depth++,e){case a.BYTE_STRING:i=`Bytes, length: ${t}`;break;case a.UTF8_STRING:i=`String, length: ${t.toString()}`}this.push(`${i}\n`)}_on_start(e,t,r,n){switch(this.depth++,r){case a.ARRAY:this.push(`[${n}], `);break;case a.MAP:n%2?this.push(`{Val:${Math.floor(n/2)}}, `):this.push(`{Key:${Math.floor(n/2)}}, `)}switch(e){case a.TAG:this.push(`Tag #${t}`),24===t&&this.push(" Encoded CBOR data item");break;case a.ARRAY:t===u.STREAM?this.push("Array (streaming)"):this.push(`Array, ${t} item${f(t)}`);break;case a.MAP:t===u.STREAM?this.push("Map (streaming)"):this.push(`Map, ${t} pair${f(t)}`);break;case a.BYTE_STRING:this.push("Bytes (streaming)");break;case a.UTF8_STRING:this.push("String (streaming)")}this.push("\n")}_on_stop(e){this.depth--}_on_value(e,t,r,n){if(e!==u.BREAK)switch(t){case a.ARRAY:this.push(`[${r}], `);break;case a.MAP:r%2?this.push(`{Val:${Math.floor(r/2)}}, `):this.push(`{Key:${Math.floor(r/2)}}, `)}const o=i.cborValueToString(e,-1/0);switch("string"==typeof e||c.isBuffer(e)?(e.length>0&&(this.push(o),this.push("\n")),this.depth--):(this.push(o),this.push("\n")),n){case l.ONE:case l.TWO:case l.FOUR:case l.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}e.exports=h},9066:(e,t)=>{"use strict";t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},t.SHIFT32=4294967296,t.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(t.SHIFT32)}},6774:(e,t,r)=>{"use strict";const n=r(71),i=r(4785),o=r(9032),s=r(9873),a=r(4202),l=(r(2830),r(9066)),{MT:u,NUMBYTES:c,SYMS:f,BI:h}=l,{Buffer:d}=r(8764),p=Symbol("count"),b=Symbol("major type"),y=Symbol("error"),g=Symbol("not found");function w(e,t,r){const n=[];return n[p]=r,n[f.PARENT]=e,n[b]=t,n}function _(e,t){const r=new a;return r[p]=-1,r[f.PARENT]=e,r[b]=t,r}class m extends Error{constructor(e,t){super(`Unexpected data: 0x${e.toString(16)}`),this.name="UnexpectedDataError",this.byte=e,this.value=t}}function E(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}class S extends n{constructor(e={}){const{tags:t={},max_depth:r=-1,preferMap:n=!1,preferWeb:i=!1,required:o=!1,encoding:s="hex",extendedResults:l=!1,preventDuplicateKeys:u=!1,...c}=e;super({defaultEncoding:s,...c}),this.running=!0,this.max_depth=r,this.tags=t,this.preferMap=n,this.preferWeb=i,this.extendedResults=l,this.required=o,this.preventDuplicateKeys=u,l&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new a)}static nullcheck(e){switch(e){case f.NULL:return null;case f.UNDEFINED:return;case g:throw new Error("Value not found");default:return e}}static decodeFirstSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=i._parse();let l=a.next();for(;!l.done;){const e=o.read(l.value);if(null==e||e.length!==l.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(e),l=a.next(e)}let u=null;if(i.extendedResults)u=l.value,u.unused=o.read();else if(u=S.nullcheck(l.value),o.length>0){const e=o.read(1);throw o.unshift(e),new m(e[0],u)}return u}static decodeAllSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=[];for(;o.length>0;){const e=i._parse();let t=e.next();for(;!t.done;){const r=o.read(t.value);if(null==r||r.length!==t.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(r),t=e.next(r)}a.push(S.nullcheck(t.value))}return a}static decodeFirst(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",required:i=!1,...o}=t,a=new S(o);let l=g;const u=s.guessEncoding(e,n),c=new Promise(((e,t)=>{a.on("data",(e=>{l=S.nullcheck(e),a.close()})),a.once("error",(r=>a.extendedResults&&r instanceof m?(l.unused=a.bs.slice(),e(l)):(l!==g&&(r.value=l),l=y,a.close(),t(r)))),a.once("end",(()=>{switch(l){case g:return i?t(new Error("No CBOR found")):e(l);case y:return;default:return e(l)}}))}));return"function"==typeof r&&c.then((e=>r(null,e)),r),u.pipe(a),c}static decodeAll(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",...i}=t,o=new S(i),a=[];o.on("data",(e=>a.push(S.nullcheck(e))));const l=new Promise(((e,t)=>{o.on("error",t),o.on("end",(()=>e(a)))}));return"function"==typeof r&&l.then((e=>r(void 0,e)),(e=>r(e,void 0))),s.guessEncoding(e,n).pipe(o),l}close(){this.running=!1,this.__fresh=!0}_onRead(e){this.valueBytes.write(e)}*_parse(){let e=null,t=0,r=null;for(;;){if(this.max_depth>=0&&t>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[n]=yield 1;if(!this.running)throw this.bs.unshift(d.from([n])),new m(n);const l=n>>5,y=31&n,g=null==e?void 0:e[b],E=null==e?void 0:e.length;switch(y){case c.ONE:this.emit("more-bytes",l,1,g,E),[r]=yield 1;break;case c.TWO:case c.FOUR:case c.EIGHT:{const e=1<{"use strict";const n=r(2830),i=r(6774),o=r(9873),s=r(4202),{MT:a,SYMS:l}=r(9066);class u extends n.Transform{constructor(e={}){const{separator:t="\n",stream_errors:r=!1,tags:n,max_depth:o,preferWeb:s,encoding:a,...l}=e;super({...l,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=t,this.stream_errors=r,this.parser=new i({tags:n,max_depth:o,preferWeb:s,encoding:a}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){this.parser._flush((t=>this.stream_errors?(t&&this._on_error(t),e()):e(t)))}static diagnose(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const{encoding:n="hex",...i}=t,a=new s,l=new u(i);let c=null;return"function"==typeof r?(l.on("end",(()=>r(null,a.toString("utf8")))),l.on("error",r)):c=new Promise(((e,t)=>{l.on("end",(()=>e(a.toString("utf8")))),l.on("error",t)})),l.pipe(a),o.guessEncoding(e,n).pipe(l),c}_on_error(e){this.stream_errors?this.push(e.toString()):this.emit("error",e)}_on_more(e,t,r,n){e===a.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[t])}_fore(e,t){switch(e){case a.BYTE_STRING:case a.UTF8_STRING:case a.ARRAY:t>0&&this.push(", ");break;case a.MAP:t>0&&(t%2?this.push(": "):this.push(", "))}}_on_value(e,t,r){if(e===l.BREAK)return;this._fore(t,r);const n=this.float_bytes;this.float_bytes=-1,this.push(o.cborValueToString(e,n))}_on_start(e,t,r,n){switch(this._fore(r,n),e){case a.TAG:this.push(`${t}(`);break;case a.ARRAY:this.push("[");break;case a.MAP:this.push("{");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push("(")}t===l.STREAM&&this.push("_ ")}_on_stop(e){switch(e){case a.TAG:this.push(")");break;case a.ARRAY:this.push("]");break;case a.MAP:this.push("}");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}e.exports=u},4666:(e,t,r)=>{"use strict";const n=r(2830),i=r(4202),o=r(9873),s=r(9066),{MT:a,NUMBYTES:l,SHIFT32:u,SIMPLE:c,SYMS:f,TAG:h,BI:d}=s,{Buffer:p}=r(8764),b=a.SIMPLE_FLOAT<<5|l.TWO,y=a.SIMPLE_FLOAT<<5|l.FOUR,g=a.SIMPLE_FLOAT<<5|l.EIGHT,w=a.SIMPLE_FLOAT<<5|c.TRUE,_=a.SIMPLE_FLOAT<<5|c.FALSE,m=a.SIMPLE_FLOAT<<5|c.UNDEFINED,E=a.SIMPLE_FLOAT<<5|c.NULL,S=p.from([255]),v=p.from("f97e00","hex"),A=p.from("f9fc00","hex"),I=p.from("f97c00","hex"),T=p.from("f98000","hex"),R={};let B={};class N extends n.Transform{constructor(e={}){const{canonical:t=!1,encodeUndefined:r,disallowUndefinedKeys:n=!1,dateType:i="number",collapseBigIntegers:o=!1,detectLoops:s=!1,omitUndefinedProperties:a=!1,genTypes:l=[],...u}=e;if(super({...u,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=t,this.encodeUndefined=r,this.disallowUndefinedKeys=n,this.dateType=function(e){if(!e)return"number";switch(e.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${e}"`)}(i),this.collapseBigIntegers=!!this.canonical||o,this.detectLoops=void 0,"boolean"==typeof s)s&&(this.detectLoops=new WeakSet);else{if(!(s instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=s}if(this.omitUndefinedProperties=a,this.semanticTypes={...N.SEMANTIC_TYPES},Array.isArray(l))for(let e=0,t=l.length;e{const r=typeof e[t];return"function"!==r&&(!this.omitUndefinedProperties||"undefined"!==r)})),n={};if(this.canonical&&r.sort(((e,t)=>{const r=n[e]||(n[e]=N.encode(e)),i=n[t]||(n[t]=N.encode(t));return r.compare(i)})),t.indefinite){if(!this._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!this._pushInt(r.length,a.MAP))return!1;let i=null;for(let t=0,o=r.length;tvoid 0!==t))),r.indefinite){if(!e._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!e._pushInt(n.length,a.MAP))return!1;if(e.canonical){const t=new N({genTypes:e.semanticTypes,canonical:e.canonical,detectLoops:Boolean(e.detectLoops),dateType:e.dateType,disallowUndefinedKeys:e.disallowUndefinedKeys,collapseBigIntegers:e.collapseBigIntegers}),r=new i({highWaterMark:e.readableHighWaterMark});t.pipe(r),n.sort((([e],[n])=>{t.pushAny(e);const i=r.read();t.pushAny(n);const o=r.read();return i.compare(o)}));for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}}else for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}return!(r.indefinite&&!e.push(S))}static _pushTypedArray(e,t){let r=64,n=t.BYTES_PER_ELEMENT;const{name:i}=t.constructor;return i.startsWith("Float")?(r|=16,n/=2):i.includes("U")||(r|=8),(i.includes("Clamped")||1!==n&&!o.isBigEndian())&&(r|=4),r|={1:0,2:1,4:2,8:3}[n],!!e._pushTag(r)&&N._pushBuffer(e,p.from(t.buffer,t.byteOffset,t.byteLength))}static _pushArrayBuffer(e,t){return N._pushBuffer(e,p.from(t))}static encodeIndefinite(e,t,r={}){if(null==t){if(null==this)throw new Error("No object to encode");t=this}const{chunkSize:n=4096}=r;let i=!0;const s=typeof t;let u=null;if("string"===s){i=i&&e._pushUInt8(a.UTF8_STRING<<5|l.INDEFINITE);let r=0;for(;r{const i=[],o=new N(t);o.on("data",(e=>i.push(e))),o.on("error",n),o.on("finish",(()=>r(p.concat(i)))),o.pushAny(e),o.end()}))}static get SEMANTIC_TYPES(){return B}static set SEMANTIC_TYPES(e){B=e}static reset(){N.SEMANTIC_TYPES={...R}}}Object.assign(R,{Array:N.pushArray,Date:N._pushDate,Buffer:N._pushBuffer,[p.name]:N._pushBuffer,Map:N._pushMap,NoFilter:N._pushNoFilter,[i.name]:N._pushNoFilter,RegExp:N._pushRegexp,Set:N._pushSet,ArrayBuffer:N._pushArrayBuffer,Uint8ClampedArray:N._pushTypedArray,Uint8Array:N._pushTypedArray,Uint16Array:N._pushTypedArray,Uint32Array:N._pushTypedArray,Int8Array:N._pushTypedArray,Int16Array:N._pushTypedArray,Int32Array:N._pushTypedArray,Float32Array:N._pushTypedArray,Float64Array:N._pushTypedArray,URL:N._pushURL,Boolean:N._pushBoxed,Number:N._pushBoxed,String:N._pushBoxed}),"undefined"!=typeof BigUint64Array&&(R[BigUint64Array.name]=N._pushTypedArray),"undefined"!=typeof BigInt64Array&&(R[BigInt64Array.name]=N._pushTypedArray),N.reset(),e.exports=N},3070:(e,t,r)=>{"use strict";const{Buffer:n}=r(8764),i=r(4666),o=r(6774),{MT:s}=r(9066);class a extends Map{constructor(e){super(e)}static _encode(e){return i.encodeCanonical(e).toString("base64")}static _decode(e){return o.decodeFirstSync(e,"base64")}get(e){return super.get(a._encode(e))}set(e,t){return super.set(a._encode(e),t)}delete(e){return super.delete(a._encode(e))}has(e){return super.has(a._encode(e))}*keys(){for(const e of super.keys())yield a._decode(e)}*entries(){for(const e of super.entries())yield[a._decode(e[0]),e[1]]}[Symbol.iterator](){return this.entries()}forEach(e,t){if("function"!=typeof e)throw new TypeError("Must be function");for(const t of super.entries())e.call(this,t[1],a._decode(t[0]),this)}encodeCBOR(e){if(!e._pushInt(this.size,s.MAP))return!1;if(e.canonical){const t=Array.from(super.entries()).map((e=>[n.from(e[0],"base64"),e[1]]));t.sort(((e,t)=>e[0].compare(t[0])));for(const r of t)if(!e.push(r[0])||!e.pushAny(r[1]))return!1}else for(const t of super.entries())if(!e.push(n.from(t[0],"base64"))||!e.pushAny(t[1]))return!1;return!0}}e.exports=a},1226:e=>{"use strict";class t{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(e){const r=this.map.get(e);if(r)return r.length>1?r[0]||this.recording?r[1]:(r[0]=!0,t.FIRST):this.recording?(r.push(this.count++),r[1]):t.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(e,[!1]),t.NEVER}}t.NEVER=-1,t.FIRST=-2,e.exports=t},8112:(e,t,r)=>{"use strict";const n=r(4666),i=r(1226),{Buffer:o}=r(8764);class s extends n{constructor(e){super(e),this.valueSharing=new i}_pushObject(e,t){if(null!==e){const t=this.valueSharing.check(e);switch(t){case i.FIRST:this._pushTag(28);break;case i.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(t)}}return super._pushObject(e,t)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...e){const t=new s;t.on("data",(()=>{}));for(const r of e)t.pushAny(r);return t.stopRecording(),t.removeAllListeners("data"),t._encodeAll(e)}static encodeCanonical(...e){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(e,t){const r=new s(t);return r.on("data",(()=>{})),r.pushAny(e),r.stopRecording(),r.removeAllListeners("data"),r._encodeAll([e])}static encodeAsync(e,t){return new Promise(((r,n)=>{const i=[],a=new s(t);a.on("data",(()=>{})),a.on("error",n),a.on("finish",(()=>r(o.concat(i)))),a.pushAny(e),a.stopRecording(),a.removeAllListeners("data"),a.on("data",(e=>i.push(e))),a.pushAny(e),a.end()}))}}e.exports=s},9032:(e,t,r)=>{"use strict";const{MT:n,SIMPLE:i,SYMS:o}=r(9066);class s{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error(`value must be a small positive integer: ${e}`);this.value=e}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return`simple(${this.value})`}encodeCBOR(e){return e._pushInt(this.value,n.SIMPLE_FLOAT)}static isSimple(e){return e instanceof s}static decode(e,t=!0,r=!1){switch(e){case i.FALSE:return!1;case i.TRUE:return!0;case i.NULL:return t?null:o.NULL;case i.UNDEFINED:if(t)return;return o.UNDEFINED;case-1:if(!t||!r)throw new Error("Invalid BREAK");return o.BREAK;default:return new s(e)}}}e.exports=s},4785:(e,t,r)=>{"use strict";const n=r(9066),i=r(9873),o=Symbol("INTERNAL_JSON");function s(e,t){if(i.isBufferish(e))e.toJSON=t;else if(Array.isArray(e))for(const r of e)s(r,t);else if(e&&"object"==typeof e&&(!(e instanceof p)||e.tag<21||e.tag>23))for(const r of Object.values(e))s(r,t)}function a(){return i.base64(this)}function l(){return i.base64url(this)}function u(){return this.toString("hex")}const c={0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>i.bufferToBigInt(e),3:e=>n.BI.MINUS_ONE-i.bufferToBigInt(e),21:(e,t)=>(i.isBufferish(e)?t[o]=l:s(e,l),t),22:(e,t)=>(i.isBufferish(e)?t[o]=a:s(e,a),t),23:(e,t)=>(i.isBufferish(e)?t[o]=u:s(e,u),t),32:e=>new URL(e),33:(e,t)=>{if(!e.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const r=e.length%4;if(1===r)throw new Error("Invalid base64url length");if(2===r){if(-1==="AQgw".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding")}else if(3===r&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding");return t},34:(e,t)=>{const r=e.match(/^[a-zA-Z0-9+/]+(?={0,2})$/);if(!r)throw new Error("Invalid base64 characters");if(e.length%4!=0)throw new Error("Invalid base64 length");if("="===r.groups.padding){if(-1==="AQgw".indexOf(e[e.length-2]))throw new Error("Invalid base64 padding")}else if("=="===r.groups.padding&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-3]))throw new Error("Invalid base64 padding");return t},35:e=>new RegExp(e),258:e=>new Set(e)},f={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};function h(e,t){if(!i.isBufferish(e))throw new TypeError("val not a buffer");const{tag:r}=t,n=f[r];if(!n)throw new Error(`Invalid typed array tag: ${r}`);const o=2**(((16&r)>>4)+(3&r));return!(4&r)!==i.isBigEndian()&&o>1&&function(e,t,r,n){const i=new DataView(e),[o,s]={2:[i.getUint16,i.setUint16],4:[i.getUint32,i.setUint32],8:[i.getBigUint64,i.setBigUint64]}[t],a=r+n;for(let e=r;e0?this.err=e.message:this.err=e,this}}static get TAGS(){return d}static set TAGS(e){d=e}static reset(){p.TAGS={...c}}}p.INTERNAL_JSON=o,p.reset(),e.exports=p},9873:(e,t,r)=>{"use strict";const{Buffer:n}=r(8764),i=r(4202),o=r(2830),s=r(9066),{NUMBYTES:a,SHIFT32:l,BI:u,SYMS:c}=s,f=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});t.utf8=e=>f.decode(e),t.utf8.checksUTF8=!0,t.isBufferish=function(e){return e&&"object"==typeof e&&(n.isBuffer(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof ArrayBuffer||e instanceof DataView)},t.bufferishToBuffer=function(e){return n.isBuffer(e)?e:ArrayBuffer.isView(e)?n.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?n.from(e):null},t.parseCBORint=function(e,t){switch(e){case a.ONE:return t.readUInt8(0);case a.TWO:return t.readUInt16BE(0);case a.FOUR:return t.readUInt32BE(0);case a.EIGHT:{const e=t.readUInt32BE(0),r=t.readUInt32BE(4);return e>2097151?BigInt(e)*u.SHIFT32+BigInt(r):e*l+r}default:throw new Error(`Invalid additional info for int: ${e}`)}},t.writeHalf=function(e,t){const r=n.allocUnsafe(4);r.writeFloatBE(t,0);const i=r.readUInt32BE(0);if(0!=(8191&i))return!1;let o=i>>16&32768;const s=i>>23&255,a=8388607&i;if(s>=113&&s<=142)o+=(s-112<<10)+(a>>13);else{if(!(s>=103&&s<113))return!1;if(a&(1<<126-s)-1)return!1;o+=a+8388608>>126-s}return e.writeUInt16BE(o),!0},t.parseHalf=function(e){const t=128&e[0]?-1:1,r=(124&e[0])>>2,n=(3&e[0])<<8|e[1];return r?31===r?t*(n?NaN:1/0):t*2**(r-25)*(1024+n):5.960464477539063e-8*t*n},t.parseCBORfloat=function(e){switch(e.length){case 2:return t.parseHalf(e);case 4:return e.readFloatBE(0);case 8:return e.readDoubleBE(0);default:throw new Error(`Invalid float size: ${e.length}`)}},t.hex=function(e){return n.from(e.replace(/^0x/,""),"hex")},t.bin=function(e){let t=0,r=(e=e.replace(/\s/g,"")).length%8||8;const i=[];for(;r<=e.length;)i.push(parseInt(e.slice(t,r),2)),t=r,r+=8;return n.from(i)},t.arrayEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,r)=>e===t[r]))},t.bufferToBigInt=function(e){return BigInt(`0x${e.toString("hex")}`)},t.cborValueToString=function(e,r=-1){switch(typeof e){case"symbol":{switch(e){case c.NULL:return"null";case c.UNDEFINED:return"undefined";case c.BREAK:return"BREAK"}if(e.description)return e.description;const t=e.toString().match(/^Symbol\((?.*)\)/);return t&&t.groups.name?t.groups.name:"Symbol"}case"string":return JSON.stringify(e);case"bigint":return e.toString();case"number":{const t=Object.is(e,-0)?"-0":String(e);return r>0?`${t}_${r}`:t}case"object":{if(!e)return"null";const n=t.bufferishToBuffer(e);if(n){const e=n.toString("hex");return r===-1/0?e:`h'${e}'`}return e&&"function"==typeof e[Symbol.for("nodejs.util.inspect.custom")]?e[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(e)?"[]":"{}"}}return String(e)},t.guessEncoding=function(e,r){if("string"==typeof e)return new i(e,null==r?"hex":r);const n=t.bufferishToBuffer(e);if(n)return new i(n);if((s=e)instanceof o.Readable||["read","on","pipe"].every((e=>"function"==typeof s[e])))return e;var s;throw new Error("Unknown input type")};const h={"=":"","+":"-","/":"_"};t.base64url=function(e){return t.bufferishToBuffer(e).toString("base64").replace(/[=+/]/g,(e=>h[e]))},t.base64=function(e){return t.bufferishToBuffer(e).toString("base64")},t.isBigEndian=function(){const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])}},4202:(e,t,r)=>{"use strict";const n=r(2830),{Buffer:i}=r(8764),o=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class s extends n.Transform{constructor(e,t,r={}){let n=null,o=null;switch(typeof e){case"object":i.isBuffer(e)?n=e:e&&(r=e);break;case"string":n=e;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof t){case"object":t&&(r=t);break;case"string":o=t;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!r||"object"!=typeof r)throw new TypeError("Invalid options");null==n&&(n=r.input),null==o&&(o=r.inputEncoding),delete r.input,delete r.inputEncoding;const s=null==r.watchPipe||r.watchPipe;delete r.watchPipe;const a=Boolean(r.readError);delete r.readError,super(r),this.readError=a,s&&this.on("pipe",(e=>{const t=e._readableState.objectMode;if(this.length>0&&t!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=t,this._writableState.objectMode=t})),null!=n&&this.end(n,o)}static isNoFilter(e){return e instanceof this}static compare(e,t){if(!(e instanceof this))throw new TypeError("Arguments must be NoFilters");return e===t?0:e.compare(t)}static concat(e,t){if(!Array.isArray(e))throw new TypeError("list argument must be an Array of NoFilters");if(0===e.length||0===t)return i.alloc(0);null==t&&(t=e.reduce(((e,t)=>{if(!(t instanceof s))throw new TypeError("list argument must be an Array of NoFilters");return e+t.length}),0));let r=!0,n=!0;const o=e.map((e=>{if(!(e instanceof s))throw new TypeError("list argument must be an Array of NoFilters");const t=e.slice();return i.isBuffer(t)?n=!1:r=!1,t}));if(r)return i.concat(o,t);if(n)return[].concat(...o).slice(0,t);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(e,t,r){this._readableState.objectMode||i.isBuffer(e)||(e=i.from(e,t)),this.push(e),r()}_bufArray(){let e=this._readableState.buffer;if(!Array.isArray(e)){let t=e.head;for(e=[];null!=t;)e.push(t.data),t=t.next}return e}read(e){const t=super.read(e);if(null!=t){if(this.emit("read",t),this.readError&&t.length{this.length>=e?i(this.read(e)):this.writableFinished?o(new Error(`Stream finished before ${e} bytes were available`)):(t=t=>{this.length>=e&&i(this.read(e))},r=()=>{o(new Error(`Stream finished before ${e} bytes were available`))},n=o,this.on("readable",t),this.on("error",n),this.on("finish",r))})).finally((()=>{t&&(this.removeListener("readable",t),this.removeListener("error",n),this.removeListener("finish",r))}))}promise(e){let t=!1;return new Promise(((r,n)=>{this.on("finish",(()=>{const n=this.read();null==e||t||(t=!0,e(null,n)),r(n)})),this.on("error",(r=>{null==e||t||(t=!0,e(r)),n(r)}))}))}compare(e){if(!(e instanceof s))throw new TypeError("Arguments must be NoFilters");if(this===e)return 0;const t=this.slice(),r=e.slice();if(i.isBuffer(t)&&i.isBuffer(r))return t.compare(r);throw new Error("Cannot compare streams in object mode")}equals(e){return 0===this.compare(e)}slice(e,t){if(this._readableState.objectMode)return this._bufArray().slice(e,t);const r=this._bufArray();switch(r.length){case 0:return i.alloc(0);case 1:return r[0].slice(e,t);default:return i.concat(r).slice(e,t)}}get(e){return this.slice()[e]}toJSON(){const e=this.slice();return i.isBuffer(e)?e.toJSON():e}toString(e,t,r){const n=this.slice(t,r);return i.isBuffer(n)?e&&"utf8"!==e?n.toString(e):o.decode(n):JSON.stringify(n)}[Symbol.for("nodejs.util.inspect.custom")](e,t){const r=this._bufArray().map((e=>i.isBuffer(e)?t.stylize(e.toString("hex"),"string"):JSON.stringify(e))).join(", ");return`${this.constructor.name} [${r}]`}get length(){return this._readableState.length}writeBigInt(e){let t=e.toString(16);if(e<0){const r=BigInt(Math.floor(t.length/2));t=(e=(BigInt(1)<{"use strict";const n=r(2830),i=r(4202);class o extends n.Transform{constructor(e){super(e),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new i,this.__restart()}_transform(e,t,r){for(this.bs.write(e);this.bs.length>=this.__needed;){let e=null;const t=null===this.__needed?void 0:this.bs.read(this.__needed);try{e=this.__parser.next(t)}catch(e){return r(e)}this.__needed&&(this.__fresh=!1),e.done?(this.push(e.value),this.__restart()):this.__needed=e.value||1/0}return r()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(e){e(this.__fresh?null:new Error("unexpected end of input"))}}e.exports=o},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=p,s/=256,u-=8);e[r+d-p]|=128*b}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,l=[],u=!1,c=-1;function f(){u&&a&&(u=!1,a.length?l=a.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(a=l,l=[];++c1)for(var r=1;r{"use strict";e.exports=r(5099).Duplex},2725:(e,t,r)=>{"use strict";e.exports=r(5099).PassThrough},9481:(e,t,r)=>{"use strict";e.exports=r(5099).Readable},4605:(e,t,r)=>{"use strict";e.exports=r(5099).Transform},4229:(e,t,r)=>{"use strict";e.exports=r(5099).Writable},196:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(9061),{AbortError:i,codes:o}=r(4381),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:l}=r(5874),u=r(8610),{ERR_INVALID_ARG_TYPE:c}=o;let f;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!s(r)&&!a(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=s(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[l](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{f=f||r(6087).addAbortListener;const i=f(e,o);u(t,i[n])}return t}},7327:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(9061),{Buffer:a}=r(8764),{inspect:l}=r(6087);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(eo.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},299:(e,t,r)=>{"use strict";const{pipeline:n}=r(9946),i=r(8672),{destroyer:o}=r(1195),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:f,isReadableStream:h}=r(5874),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(4381),y=r(8610);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(l(e[r])||f(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,g,w,_,m;const E=e[0],S=n(e,(function(e){const t=_;_=null,t?t(e):e?m.destroy(e):A||v||m.destroy()})),v=!!(l(E)||f(E)||c(E)),A=!!(a(S)||h(S)||c(S));if(m=new i({writableObjectMode:!(null==E||!E.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:v,readable:A}),v){if(s(E))m._write=function(e,t,n){E.write(e,t)?n():r=n},m._final=function(e){E.end(),g=e},E.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(E)){const e=(c(E)?E.writable:E).getWriter();m._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},m._final=async function(t){try{await e.ready,e.close().catch((()=>{})),g=t}catch(e){t(e)}}}const e=c(S)?S.readable:S;y(e,(()=>{if(g){const e=g;g=null,e()}}))}if(A)if(s(S))S.on("readable",(function(){if(w){const e=w;w=null,e()}})),S.on("end",(function(){m.push(null)})),m._read=function(){for(;;){const e=S.read();if(null===e)return void(w=m._read);if(!m.push(e))return}};else if(u(S)){const e=(c(S)?S.readable:S).getReader();m._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!m.push(t))return;if(r)return void m.push(null)}catch{return}}}return m._destroy=function(e,t){e||null===_||(e=new d),w=null,r=null,g=null,null===_?t(e):(_=t,s(S)&&o(S,e))},m}},1195:(e,t,r)=>{"use strict";const n=r(4155),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(4381),{Symbol:a}=r(9061),{kIsDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:f}=r(5874),h=a("kDestroy"),d=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(y,e,t):n.nextTick(g,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function y(e,t){w(e,t),g(e)}function g(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function w(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function _(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(w,e,t):w(e,t))}function m(e){let t=!1;function r(r){if(t)return void _(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(h,r):r?_(e,r,!0):n.nextTick(E,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function E(e){e.emit(d)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function v(e){e.emit("close")}function A(e,t){e.emit("error",t),n.nextTick(v,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(d,t),e.listenerCount(d)>1||n.nextTick(m,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(A,e,t):n.nextTick(v,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(h,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:_}},8672:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(9061);e.exports=u;const a=r(911),l=r(6304);s(u.prototype,a.prototype),s(u,a);{const e=o(l.prototype);for(let t=0;t{const n=r(4155),i=r(8764),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:h,isWritableStream:d}=r(5874),p=r(8610),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:g}}=r(4381),{destroyer:w}=r(1195),_=r(8672),m=r(911),E=r(6304),{createDeferredPromise:S}=r(6087),v=r(6307),A=globalThis.Blob||i.Blob,I=void 0!==A?function(e){return e instanceof A}:function(e){return!1},T=globalThis.AbortController||r(8599).AbortController,{FunctionPrototypeCall:R}=r(9061);class B extends _{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function N(e){const t=e.readable&&"function"!=typeof e.readable.read?m.wrap(e.readable):e.readable,r=e.writable;let n,i,a,l,u,c=!!o(t),f=!!s(r);function h(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new B({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&w(t,e),h(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&w(t,e),h(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new b),a=null,n=null,i=null,null===l?o(e):(l=o,w(r,e),w(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return N({readable:t});if(c(t))return N({writable:t});if(l(t))return N({writable:!1,readable:!1});if(h(t))return N({readable:m.fromWeb(t)});if(d(t))return N({writable:E.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=S();const i=new T,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new b(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return v(B,e,{objectMode:!0,write:i,final:o,destroy:s});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new g("nully","body",e)}),(e=>{w(t,e)}));return t=new B({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new g("Iterable, AsyncIterable or AsyncFunction",r,e)}if(I(t))return e(t.arrayBuffer());if(a(t))return v(B,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&d(null==t?void 0:t.writable))return B.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return N({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{w(e,t)})),e=new B({objectMode:!0,writable:!1,read(){}})}throw new y(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},8610:(e,t,r)=>{const n=r(4155),{AbortError:i,codes:o}=r(4381),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:l,once:u}=r(6087),{validateAbortSignal:c,validateFunction:f,validateObject:h,validateBoolean:d}=r(6547),{Promise:p,PromisePrototypeThen:b,SymbolDispose:y}=r(9061),{isClosed:g,isReadable:w,isReadableNodeStream:_,isReadableStream:m,isReadableFinished:E,isReadableErrored:S,isWritable:v,isWritableNodeStream:A,isWritableStream:I,isWritableFinished:T,isWritableErrored:R,isNodeStream:B,willEmitClose:N,kIsClosedPromise:L}=r(5874);let U;const M=()=>{};function O(e,t,o){var d,p;if(2===arguments.length?(o=t,t=l):null==t?t=l:h(t,"options"),f(o,"callback"),c(t.signal,"options.signal"),o=u(o),m(e)||I(e))return function(e,t,o){let s=!1,a=M;if(t.signal)if(a=()=>{s=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{U=U||r(6087).addAbortListener;const n=U(t.signal,a),i=o;o=u(((...t)=>{n[y](),i.apply(e,t)}))}const l=(...t)=>{s||n.nextTick((()=>o.apply(e,t)))};return b(e[L].promise,l,l),M}(e,t,o);if(!B(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const O=null!==(d=t.readable)&&void 0!==d?d:_(e),x=null!==(p=t.writable)&&void 0!==p?p:A(e),k=e._writableState,P=e._readableState,j=()=>{e.writable||C()};let D=N(e)&&_(e)===O&&A(e)===x,F=T(e,!1);const C=()=>{F=!0,e.destroyed&&(D=!1),(!D||e.readable&&!O)&&(O&&!$||o.call(e))};let $=E(e,!1);const W=()=>{$=!0,e.destroyed&&(D=!1),(!D||e.writable&&!x)&&(x&&!F||o.call(e))},G=t=>{o.call(e,t)};let Y=g(e);const H=()=>{Y=!0;const t=R(e)||S(e);return t&&"boolean"!=typeof t?o.call(e,t):O&&!$&&_(e,!0)&&!E(e,!1)?o.call(e,new a):!x||F||T(e,!1)?void o.call(e):o.call(e,new a)},V=()=>{Y=!0;const t=R(e)||S(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},K=()=>{e.req.on("finish",C)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?x&&!k&&(e.on("end",j),e.on("close",j)):(e.on("complete",C),D||e.on("abort",H),e.req?K():e.on("request",K)),D||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",W),e.on("finish",C),!1!==t.error&&e.on("error",G),e.on("close",H),Y?n.nextTick(H):null!=k&&k.errorEmitted||null!=P&&P.errorEmitted?D||n.nextTick(V):(O||D&&!w(e)||!F&&!1!==v(e))&&(x||D&&!v(e)||!$&&!1!==w(e))?P&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const q=()=>{o=M,e.removeListener("aborted",H),e.removeListener("complete",C),e.removeListener("abort",H),e.removeListener("request",K),e.req&&e.req.removeListener("finish",C),e.removeListener("end",j),e.removeListener("close",j),e.removeListener("finish",C),e.removeListener("end",W),e.removeListener("error",G),e.removeListener("close",H)};if(t.signal&&!Y){const s=()=>{const r=o;q(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{U=U||r(6087).addAbortListener;const n=U(t.signal,s),i=o;o=u(((...t)=>{n[y](),i.apply(e,t)}))}}return q}e.exports=O,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(d(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=O(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},6307:(e,t,r)=>{"use strict";const n=r(4155),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(9061),{Buffer:a}=r(8764),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=r(4381).codes;e.exports=function(e,t,r){let c,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])f=!0,c=t[o]();else{if(!t||!t[s])throw new l("iterable",["Iterable"],t);f=!1,c=t[s]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let d=!1;return h._read=function(){d||(d=!0,async function(){for(;;){try{const{value:e,done:t}=f?await c.next():c.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw d=!1,new u;if(h.push(t))continue;d=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},4870:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(9061),{EventEmitter:o}=r(7187);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",c),a(e,"error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},4382:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(8599).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(4381),{validateAbortSignal:u,validateInteger:c,validateObject:f}=r(6547),h=r(9061).Symbol("kWeak"),d=r(9061).Symbol("kResistStopPropagation"),{finished:p}=r(8610),b=r(299),{addAbortSignalNoValidate:y}=r(196),{isWritable:g,isNodeStream:w}=r(5874),{deprecate:_}=r(6087),{ArrayPrototypePush:m,Boolean:E,MathFloor:S,Number:v,NumberIsNaN:A,Promise:I,PromiseReject:T,PromiseResolve:R,PromisePrototypeThen:B,Symbol:N}=r(9061),L=N("kEmpty"),U=N("kEof");function M(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),c(n,"options.concurrency",1),c(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(6087).AbortSignalAny([null==t?void 0:t.signal].filter(E)),s=this,a=[],u={signal:o};let c,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,y()}function y(){f&&!h&&d=i||d>=n)&&await new I((e=>{f=e}))}a.push(U)}catch(e){const t=T(e);B(t,b,p),a.push(t)}finally{h=!0,c&&(c(),c=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===U)return;if(o.aborted)throw new l;e!==L&&(yield e),a.shift(),y()}await new I((e=>{c=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function O(e,t=void 0){for await(const r of x.call(this,e,t))return!0;return!1}function x(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return M.call(this,(async function(t,r){return await e(t,r)?t:L}),t)}class k extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function P(e){if(e=v(e),A(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:_((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=P(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:x,flatMap:function(e,t){const r=M.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:M,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=P(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),w(e)&&!g(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await O.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of M.call(this,(async function(t,r){return await e(t,r),L}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,c=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var y;if(b=!0,null!=r&&null!==(y=r.signal)&&void 0!==y&&y.aborted)throw new l;s?t=await e(t,n,{signal:c}):(t=n,s=!0)}if(!b&&!s)throw new k}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});m(t,n)}return t},some:O,find:async function(e,t){for await(const r of x.call(this,e,t))return r}}},917:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(9061);e.exports=o;const i=r(1161);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},9946:(e,t,r)=>{const n=r(4155),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s,SymbolDispose:a}=r(9061),l=r(8610),{once:u}=r(6087),c=r(1195),f=r(8672),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:d,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:w}=r(4381),{validateFunction:_,validateAbortSignal:m}=r(6547),{isIterable:E,isReadable:S,isReadableNodeStream:v,isNodeStream:A,isTransformStream:I,isWebStream:T,isReadableStream:R,isReadableFinished:B}=r(5874),N=globalThis.AbortController||r(8599).AbortController;let L,U,M;function O(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new y("pipe")))},cleanup:l(e,{readable:t,writable:r},(e=>{n=!e}))}}function x(e){if(E(e))return e;if(v(e))return async function*(e){U||(U=r(911)),yield*U.prototype[s].call(e)}(e);throw new d("val",["Readable","Iterable","AsyncIterable"],e)}async function k(e,t,r,{end:n}){let i,s=null;const a=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},u=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",a);const c=l(t,{readable:!1},a);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(i!==e?h(i,e):e)}finally{c(),t.off("drain",a)}}async function P(e,t,r,{end:n}){I(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function j(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new b("streams");const s=new N,l=s.signal,u=null==o?void 0:o.signal,c=[];function h(){C(new w)}let y,g,_;m(u,"options.signal"),M=M||r(6087).addAbortListener,u&&(y=M(u,h));const B=[];let U,j=0;function F(e){C(e,0==--j)}function C(e,r){var i;if(!e||g&&"ERR_STREAM_PREMATURE_CLOSE"!==g.code||(g=e),g||r){for(;B.length;)B.shift()(g);null===(i=y)||void 0===i||i[a](),s.abort(),r&&(g||c.forEach((e=>e())),n.nextTick(t,g,_))}}for(let Y=0;Y0,q=V||!1!==(null==o?void 0:o.end),z=Y===e.length-1;if(A(H)){if(q){const{destroy:X,cleanup:J}=O(H,V,K);B.push(X),S(H)&&z&&c.push(J)}function $(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&F(e)}H.on("error",$),S(H)&&z&&c.push((()=>{H.removeListener("error",$)}))}if(0===Y)if("function"==typeof H){if(U=H({signal:l}),!E(U))throw new p("Iterable, AsyncIterable or Stream","source",U)}else U=E(H)||v(H)||I(H)?H:f.from(H);else if("function"==typeof H){var W;if(U=I(U)?x(null===(W=U)||void 0===W?void 0:W.readable):x(U),U=H(U,{signal:l}),V){if(!E(U,!0))throw new p("AsyncIterable",`transform[${Y-1}]`,U)}else{var G;L||(L=r(917));const Z=new L({objectMode:!0}),Q=null===(G=U)||void 0===G?void 0:G.then;if("function"==typeof Q)j++,Q.call(U,(e=>{_=e,null!=e&&Z.write(e),q&&Z.end(),n.nextTick(F)}),(e=>{Z.destroy(e),n.nextTick(F,e)}));else if(E(U,!0))j++,k(U,Z,F,{end:q});else{if(!R(U)&&!I(U))throw new p("AsyncIterable or Promise","destination",U);{const re=U.readable||U;j++,k(re,Z,F,{end:q})}}U=Z;const{destroy:ee,cleanup:te}=O(U,!1,!0);B.push(ee),z&&c.push(te)}}else if(A(H)){if(v(U)){j+=2;const ne=D(U,H,F,{end:q});S(H)&&z&&c.push(ne)}else if(I(U)||R(U)){const ie=U.readable||U;j++,k(ie,H,F,{end:q})}else{if(!E(U))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],U);j++,k(U,H,F,{end:q})}U=H}else if(T(H)){if(v(U))j++,P(x(U),H,F,{end:q});else if(R(U)||E(U))j++,P(U,H,F,{end:q});else{if(!I(U))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],U);j++,P(U.readable,H,F,{end:q})}U=H}else U=f.from(H)}return(null!=l&&l.aborted||null!=u&&u.aborted)&&n.nextTick(h),U}function D(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new g)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}B(e)?n.nextTick(s):e.once("end",s)}else r();return l(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),l(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:j,pipeline:function(...e){return j(e,u(function(e){return _(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},911:(e,t,r)=>{const n=r(4155),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:c,Promise:f,SafeSet:h,SymbolAsyncDispose:d,SymbolAsyncIterator:p,Symbol:b}=r(9061);e.exports=z,z.ReadableState=q;const{EventEmitter:y}=r(7187),{Stream:g,prependListener:w}=r(4870),{Buffer:_}=r(8764),{addAbortSignal:m}=r(196),E=r(8610);let S=r(6087).debuglog("stream",(e=>{S=e}));const v=r(7327),A=r(1195),{getHighWaterMark:I,getDefaultHighWaterMark:T}=r(2457),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:B,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:L,ERR_STREAM_PUSH_AFTER_EOF:U,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:M},AbortError:O}=r(4381),{validateObject:x}=r(6547),k=b("kPaused"),{StringDecoder:P}=r(2553),j=r(6307);c(z.prototype,g.prototype),c(z,g);const D=()=>{},{errorOrDestroy:F}=A,C=1,$=16,W=32,G=64,Y=2048,H=4096,V=65536;function K(e){return{enumerable:!1,get(){return 0!=(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function q(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.state=Y|H|$|W,e&&e.objectMode&&(this.state|=C),n&&e&&e.readableObjectMode&&(this.state|=C),this.highWaterMark=e?I(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new v,this.length=0,this.pipes=[],this.flowing=null,this[k]=null,e&&!1===e.emitClose&&(this.state&=~Y),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new P(e.encoding),this.encoding=e.encoding)}function z(e){if(!(this instanceof z))return new z(e);const t=this instanceof r(8672);this._readableState=new q(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&m(e.signal,this)),g.call(this,e),A.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function X(e,t,r,n){S("readableAddChunk",t);const i=e._readableState;let o;if(0==(i.state&C)&&("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=_.from(t,r).toString(i.encoding):(t=_.from(t,r),r=""))):t instanceof _?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new B("chunk",["string","Buffer","Uint8Array"],t))),o)F(e,o);else if(null===t)i.state&=-9,function(e,t){if(S("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(0!=(i.state&C)||t&&t.length>0)if(n)if(0!=(4&i.state))F(e,new M);else{if(i.destroyed||i.errored)return!1;J(e,i,t,!0)}else if(i.ended)F(e,new U);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?J(e,i,t,!1):te(e,i)):J(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(0!=(t.state&V)?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),0!=(t.state&G)&&Q(e)),te(e,t)}function Z(e,t){return e<=0||0===t.length&&t.ended?0:0!=(t.state&C)?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;S("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(S("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;S("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[k]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){S("readable nexttick read 0"),e.read(0)}function oe(e,t){S("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(S("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=z.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=D;function i(t){this===e?(n(),n=D):n=t}e.on("readable",i);const o=E(e,{writable:!1},(e=>{r=e?R(r,e):null,n(),n=D}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(i)}}}catch(e){throw r=R(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):A.destroyer(e,null)}}(e,t);return r.stream=e,r}function le(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ue(e){const t=e._readableState;S("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ce,t,e))}function ce(e,t){if(S("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(fe,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function fe(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function de(){return void 0===he&&(he={}),he}l(q.prototype,{objectMode:K(C),ended:K(2),endEmitted:K(4),reading:K(8),constructed:K($),sync:K(W),needReadable:K(G),emittedReadable:K(128),readableListening:K(256),resumeScheduled:K(512),errorEmitted:K(1024),emitClose:K(Y),autoDestroy:K(H),destroyed:K(8192),closed:K(16384),closeEmitted:K(32768),multiAwaitDrain:K(V),readingMore:K(1<<17),dataEmitted:K(1<<18)}),z.prototype.destroy=A.destroy,z.prototype._undestroy=A.undestroy,z.prototype._destroy=function(e,t){t(e)},z.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},z.prototype[d]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new O,this.destroy(e)),new f(((t,r)=>E(this,(n=>n&&n!==e?r(n):t(null)))))},z.prototype.push=function(e,t){return X(this,e,t,!1)},z.prototype.unshift=function(e,t){return X(this,e,t,!0)},z.prototype.isPaused=function(){const e=this._readableState;return!0===e[k]||!1===e.flowing},z.prototype.setEncoding=function(e){const t=new P(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},z.prototype.read=function(e){S("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new L("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return S("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Q(this),null;if(0===(e=Z(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=0!=(t.state&G);if(S("need readable",i),(0===t.length||t.length-e0?le(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},z.prototype._read=function(e){throw new N("_read()")},z.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),S("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?b:s;function s(){S("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){S("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,S("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",c),l=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let l=!1;function u(){l||(1===i.pipes.length&&i.pipes[0]===e?(S("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function c(t){S("ondata");const r=e.write(t);S("dest.write",r),!1===r&&u()}function f(t){if(S("onerror",t),b(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?F(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),b()}function p(){S("onfinish"),e.removeListener("close",d),b()}function b(){S("unpipe"),r.unpipe(e)}return r.on("data",c),w(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?u():i.flowing||(S("pipe resume"),r.resume()),e},z.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?Q(this):i.reading||n.nextTick(ie,this))),r},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},z.prototype.off=z.prototype.removeListener,z.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},z.prototype.resume=function(){const e=this._readableState;return e.flowing||(S("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[k]=!1,this},z.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[k]=!0,this},z.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{F(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(9061),{validateInteger:o}=r(6547),{ERR_INVALID_ARG_VALUE:s}=r(4381).codes;let a=16384,l=16;function u(e){return e?l:a}e.exports={getHighWaterMark:function(e,t,r,o){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=a){if(!i(a)||a<0)throw new s(o?`options.${r}`:"options.highWaterMark",a);return n(a)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:a=t}}},1161:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(9061);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(4381).codes,s=r(8672),{getHighWaterMark:a}=r(2457);n(u.prototype,s.prototype),n(u,s);const l=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==c&&c.call(this)}u.prototype._final=c,u.prototype._transform=function(e,t,r){throw new o("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(9061),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),c=o("nodejs.stream.disturbed"),f=o("nodejs.webstream.isClosedPromise"),h=o("nodejs.webstream.controllerErrorFunction");function d(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function y(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function g(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function w(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function _(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function m(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function E(e,t){if(!d(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!_(e)&&d(e)&&e.readable&&!E(e)}function v(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!_(e)&&p(e)&&e.writable&&!m(e)}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function I(e){return"boolean"==typeof e._sent100&&A(e)}e.exports={isDestroyed:_,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,s,l,u,c,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:a,isReadable:S,kIsReadable:l,kIsClosedPromise:f,kControllerErrorFunction:h,kIsWritable:u,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!(!_(e)&&(!1!==(null==t?void 0:t.readable)&&S(e)||!1!==(null==t?void 0:t.writable)&&v(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:d,isReadableStream:y,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:E,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return y(e)||g(e)||w(e)},isWritable:v,isWritableNodeStream:p,isWritableStream:g,isWritableEnded:m,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:I,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&I(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:w}},6304:(e,t,r)=>{const n=r(4155),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:h}=r(9061);e.exports=x,x.WritableState=M;const{EventEmitter:d}=r(7187),p=r(4870).Stream,{Buffer:b}=r(8764),y=r(1195),{addAbortSignal:g}=r(196),{getHighWaterMark:w,getDefaultHighWaterMark:_}=r(2457),{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:v,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:I,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:B}=r(4381).codes,{errorOrDestroy:N}=y;function L(){}u(x.prototype,p.prototype),u(x,p);const U=f("kOnFinished");function M(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?w(this,e,"writableHighWaterMark",n):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,O(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[U]=[]}function O(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function x(e){const t=this instanceof r(8672);if(!t&&!s(x,this))return new x(e);this._writableState=new M(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&g(e.signal,this)),p.call(this,e),y.construct(this,(()=>{const e=this._writableState;e.writing||W(this,e),Y(this,e)}))}function k(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new B(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=L)}if(null===t)throw new T;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new m("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new R:o.destroyed&&(s=new A("write")),s?(n.nextTick(i,s),N(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.lengthr.bufferedIndex&&W(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(F,r.afterWriteTickInfo)):C(e,r,1,o))):N(e,new S)}function F({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,C(e,t,r,n)}function C(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&$(t),Y(e,t)}function $(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?L:e=>{for(let t=a;t256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function G(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function Y(e,t,r){G(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)N(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[U].splice(0);for(let e=0;e{G(t)?H(e,t):t.pendingcb--}),e,t)):G(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[U].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:y}=r(9061),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:S}}=r(4381),{normalizeEncoding:v}=r(6087),{isAsyncFunction:A,isArrayBufferView:I}=r(6087).types,T={},R=/^[0-7]+$/,B=g(((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),N=g(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),L=g(((e,t,r=!1)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new E(t,`>= ${n} && <= ${i}`,e)}));function U(e,t){if("string"!=typeof e)throw new _(t,"string",e)}const M=g(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new m(t,e,"must be one of: "+n)}}));function O(e,t){if("boolean"!=typeof e)throw new _(t,"boolean",e)}function x(e,t,r){return null!=e&&h(e,t)?e[t]:r}const k=g(((e,t,r=null)=>{const i=x(r,"allowArray",!1),o=x(r,"allowFunction",!1);if(!x(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new _(t,"Object",e)})),P=g(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new _(t,"a dictionary",e)})),j=g(((e,t,r=0)=>{if(!n(e))throw new _(t,"Array",e);if(e.length{if(!I(e))throw new _(t,["Buffer","TypedArray","DataView"],e)})),F=g(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new _(t,"AbortSignal",e)})),C=g(((e,t)=>{if("function"!=typeof e)throw new _(t,"Function",e)})),$=g(((e,t)=>{if("function"!=typeof e||A(e))throw new _(t,"Function",e)})),W=g(((e,t)=>{if(void 0!==e)throw new _(t,"undefined",e)})),G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Y(e,t){if(void 0===e||!d(G,e))throw new m(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===d(R,e))throw new m(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return L(e,t),e},validateArray:j,validateStringArray:function(e,t){j(e,t);for(let r=0;rn||(null!=r||null!=n)&&l(e))throw new E(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:k,validateOneOf:M,validatePlainFunction:$,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new w(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(U(e,t),void 0===T[e]){if(void 0!==T[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:U,validateUint32:L,validateUndefined:W,validateUnion:function(e,t,r){if(!i(r,e))throw new _(t,`('${o(r,"|")}')`,e)},validateAbortSignal:F,validateLinkHeaderValue:function(e){if("string"==typeof e)return Y(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},4381:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(6087),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function f(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function d(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,c[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):u.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),d("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),d("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),d("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),d("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),d("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),d("ERR_STREAM_WRITE_AFTER_END","write after end",Error),d("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},9061:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},6087:(e,t,r)=>{"use strict";const n=r(8764),{kResistStopPropagation:i,SymbolDispose:o}=r(9061),s=globalThis.AbortSignal||r(8599).AbortSignal,a=globalThis.AbortController||r(8599).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,c=void 0!==u?function(e){return e instanceof u}:function(e){return!1},f=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(7187).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return f(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach((e=>{f(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5099:(e,t,r)=>{const{Buffer:n}=r(8764),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(9061),{promisify:{custom:a}}=r(6087),{streamReturningOperators:l,promiseReturningOperators:u}=r(4382),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(4381),f=r(299),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:d}=r(2457),{pipeline:p}=r(9946),{destroyer:b}=r(1195),y=r(8610),g=r(7854),w=r(5874),_=e.exports=r(4870).Stream;_.isDestroyed=w.isDestroyed,_.isDisturbed=w.isDisturbed,_.isErrored=w.isErrored,_.isReadable=w.isReadable,_.isWritable=w.isWritable,_.Readable=r(911);for(const S of o(l)){const v=l[S];function m(...e){if(new.target)throw c();return _.Readable.from(s(v,this,e))}i(m,"name",{__proto__:null,value:v.name}),i(m,"length",{__proto__:null,value:v.length}),i(_.Readable.prototype,S,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}for(const A of o(u)){const I=u[A];function m(...e){if(new.target)throw c();return s(I,this,e)}i(m,"name",{__proto__:null,value:I.name}),i(m,"length",{__proto__:null,value:I.length}),i(_.Readable.prototype,A,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}_.Writable=r(6304),_.Duplex=r(8672),_.Transform=r(1161),_.PassThrough=r(917),_.pipeline=p;const{addAbortSignal:E}=r(196);_.addAbortSignal=E,_.finished=y,_.destroy=b,_.compose=f,_.setDefaultHighWaterMark=h,_.getDefaultHighWaterMark=d,i(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),i(p,a,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),i(y,a,{__proto__:null,enumerable:!0,get:()=>g.finished}),_.Stream=_,_._isUint8Array=function(e){return e instanceof Uint8Array},_._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},7854:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(9061),{isIterable:o,isNodeStream:s,isWebStream:a}=r(5874),{pipelineImpl:l}=r(9946),{finished:u}=r(8610);r(5099),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!o(c)&&!a(c)){const t=n(e);i=t.signal,u=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2830:(e,t,r)=>{e.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n);var e=r(2141),t={};for(const r in e)"default"!==r&&(t[r]=()=>e[r]);r.d(n,t)})(),n})()));
\ No newline at end of file
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cbor=t():e.cbor=t()}(this,(()=>(()=>{var e={5568:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],l=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),c=0,f=l>0?s-4:s;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;au?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function b(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){let o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=b,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function B(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function x(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function k(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function P(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||Y(t,e.length-(r+1))}(n,i,o)}function G(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}C("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),C("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),C("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},9881:(e,t,r)=>{"use strict";const n=r(893),i=r(9777),o=r(3737),s=r(2893),a=r(5059),l=r(3557),u=r(2903),c=r(207);e.exports={Commented:n,Diagnose:i,Decoder:o,Encoder:s,Simple:a,Tagged:l,Map:u,SharedValueEncoder:c,comment:n.comment,decodeAll:o.decodeAll,decodeFirst:o.decodeFirst,decodeAllSync:o.decodeAllSync,decodeFirstSync:o.decodeFirstSync,diagnose:i.diagnose,encode:s.encode,encodeCanonical:s.encodeCanonical,encodeOne:s.encodeOne,encodeAsync:s.encodeAsync,decode:o.decodeFirstSync,leveldb:{decode:o.decodeFirstSync,encode:s.encode,buffer:!0,name:"cbor"},reset(){s.reset(),l.reset()}}},893:(e,t,r)=>{"use strict";const n=r(8310),i=r(7328),o=r(3737),s=r(5256),{MT:a,NUMBYTES:l,SYMS:u}=r(9452),{Buffer:c}=r(8287);function f(e){return e>1?"s":""}class h extends n.Transform{constructor(e={}){const{depth:t=1,max_depth:r=10,no_summary:n=!1,tags:i={},preferWeb:a,encoding:l,...u}=e;super({...u,readableObjectMode:!1,writableObjectMode:!1}),this.depth=t,this.max_depth=r,this.all=new s,i[24]||(i[24]=this._tag_24.bind(this)),this.parser=new o({tags:i,max_depth:r,preferWeb:a,encoding:l}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),n||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(e){const t=new h({depth:this.depth+1,no_summary:!0});t.on("data",(e=>this.push(e))),t.on("error",(e=>this.emit("error",e))),t.end(e)}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){return this.parser._flush(e)}static comment(e,t={},r=null){if(null==e)throw new Error("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"number":return{options:{max_depth:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const n=new s,{encoding:o="hex",...a}=t,l=new h(a);let u=null;return"function"==typeof r?(l.on("end",(()=>{r(null,n.toString("utf8"))})),l.on("error",r)):u=new Promise(((e,t)=>{l.on("end",(()=>{e(n.toString("utf8"))})),l.on("error",t)})),l.pipe(n),i.guessEncoding(e,o).pipe(l),u}_on_error(e){this.push("ERROR: "),this.push(e.toString()),this.push("\n")}_on_read(e){this.all.write(e);const t=e.toString("hex");this.push(new Array(this.depth+1).join("  ")),this.push(t);let r=2*(this.max_depth-this.depth)-t.length;r<1&&(r=1),this.push(new Array(r+1).join(" ")),this.push("-- ")}_on_more(e,t,r,n){let i="";switch(this.depth++,e){case a.POS_INT:i="Positive number,";break;case a.NEG_INT:i="Negative number,";break;case a.ARRAY:i="Array, length";break;case a.MAP:i="Map, count";break;case a.BYTE_STRING:i="Bytes, length";break;case a.UTF8_STRING:i="String, length";break;case a.SIMPLE_FLOAT:i=1===t?"Simple value,":"Float,"}this.push(`${i} next ${t} byte${f(t)}\n`)}_on_start_string(e,t,r,n){let i="";switch(this.depth++,e){case a.BYTE_STRING:i=`Bytes, length: ${t}`;break;case a.UTF8_STRING:i=`String, length: ${t.toString()}`}this.push(`${i}\n`)}_on_start(e,t,r,n){switch(this.depth++,r){case a.ARRAY:this.push(`[${n}], `);break;case a.MAP:n%2?this.push(`{Val:${Math.floor(n/2)}}, `):this.push(`{Key:${Math.floor(n/2)}}, `)}switch(e){case a.TAG:this.push(`Tag #${t}`),24===t&&this.push(" Encoded CBOR data item");break;case a.ARRAY:t===u.STREAM?this.push("Array (streaming)"):this.push(`Array, ${t} item${f(t)}`);break;case a.MAP:t===u.STREAM?this.push("Map (streaming)"):this.push(`Map, ${t} pair${f(t)}`);break;case a.BYTE_STRING:this.push("Bytes (streaming)");break;case a.UTF8_STRING:this.push("String (streaming)")}this.push("\n")}_on_stop(e){this.depth--}_on_value(e,t,r,n){if(e!==u.BREAK)switch(t){case a.ARRAY:this.push(`[${r}], `);break;case a.MAP:r%2?this.push(`{Val:${Math.floor(r/2)}}, `):this.push(`{Key:${Math.floor(r/2)}}, `)}const o=i.cborValueToString(e,-1/0);switch("string"==typeof e||c.isBuffer(e)?(e.length>0&&(this.push(o),this.push("\n")),this.depth--):(this.push(o),this.push("\n")),n){case l.ONE:case l.TWO:case l.FOUR:case l.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}e.exports=h},9452:(e,t)=>{"use strict";t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},t.SHIFT32=4294967296,t.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(t.SHIFT32)}},3737:(e,t,r)=>{"use strict";const n=r(4957),i=r(3557),o=r(5059),s=r(7328),a=r(5256),l=(r(8310),r(9452)),{MT:u,NUMBYTES:c,SYMS:f,BI:h}=l,{Buffer:d}=r(8287),p=Symbol("count"),b=Symbol("major type"),y=Symbol("error"),g=Symbol("not found");function w(e,t,r){const n=[];return n[p]=r,n[f.PARENT]=e,n[b]=t,n}function _(e,t){const r=new a;return r[p]=-1,r[f.PARENT]=e,r[b]=t,r}class m extends Error{constructor(e,t){super(`Unexpected data: 0x${e.toString(16)}`),this.name="UnexpectedDataError",this.byte=e,this.value=t}}function E(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}class S extends n{constructor(e={}){const{tags:t={},max_depth:r=-1,preferMap:n=!1,preferWeb:i=!1,required:o=!1,encoding:s="hex",extendedResults:l=!1,preventDuplicateKeys:u=!1,...c}=e;super({defaultEncoding:s,...c}),this.running=!0,this.max_depth=r,this.tags=t,this.preferMap=n,this.preferWeb=i,this.extendedResults=l,this.required=o,this.preventDuplicateKeys=u,l&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new a)}static nullcheck(e){switch(e){case f.NULL:return null;case f.UNDEFINED:return;case g:throw new Error("Value not found");default:return e}}static decodeFirstSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=i._parse();let l=a.next();for(;!l.done;){const e=o.read(l.value);if(null==e||e.length!==l.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(e),l=a.next(e)}let u=null;if(i.extendedResults)u=l.value,u.unused=o.read();else if(u=S.nullcheck(l.value),o.length>0){const e=o.read(1);throw o.unshift(e),new m(e[0],u)}return u}static decodeAllSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=[];for(;o.length>0;){const e=i._parse();let t=e.next();for(;!t.done;){const r=o.read(t.value);if(null==r||r.length!==t.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(r),t=e.next(r)}a.push(S.nullcheck(t.value))}return a}static decodeFirst(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",required:i=!1,...o}=t,a=new S(o);let l=g;const u=s.guessEncoding(e,n),c=new Promise(((e,t)=>{a.on("data",(e=>{l=S.nullcheck(e),a.close()})),a.once("error",(r=>a.extendedResults&&r instanceof m?(l.unused=a.bs.slice(),e(l)):(l!==g&&(r.value=l),l=y,a.close(),t(r)))),a.once("end",(()=>{switch(l){case g:return i?t(new Error("No CBOR found")):e(l);case y:return;default:return e(l)}}))}));return"function"==typeof r&&c.then((e=>r(null,e)),r),u.pipe(a),c}static decodeAll(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",...i}=t,o=new S(i),a=[];o.on("data",(e=>a.push(S.nullcheck(e))));const l=new Promise(((e,t)=>{o.on("error",t),o.on("end",(()=>e(a)))}));return"function"==typeof r&&l.then((e=>r(void 0,e)),(e=>r(e,void 0))),s.guessEncoding(e,n).pipe(o),l}close(){this.running=!1,this.__fresh=!0}_onRead(e){this.valueBytes.write(e)}*_parse(){let e=null,t=0,r=null;for(;;){if(this.max_depth>=0&&t>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[n]=yield 1;if(!this.running)throw this.bs.unshift(d.from([n])),new m(n);const l=n>>5,y=31&n,g=null==e?void 0:e[b],E=null==e?void 0:e.length;switch(y){case c.ONE:this.emit("more-bytes",l,1,g,E),[r]=yield 1;break;case c.TWO:case c.FOUR:case c.EIGHT:{const e=1<{"use strict";const n=r(8310),i=r(3737),o=r(7328),s=r(5256),{MT:a,SYMS:l}=r(9452);class u extends n.Transform{constructor(e={}){const{separator:t="\n",stream_errors:r=!1,tags:n,max_depth:o,preferWeb:s,encoding:a,...l}=e;super({...l,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=t,this.stream_errors=r,this.parser=new i({tags:n,max_depth:o,preferWeb:s,encoding:a}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){this.parser._flush((t=>this.stream_errors?(t&&this._on_error(t),e()):e(t)))}static diagnose(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const{encoding:n="hex",...i}=t,a=new s,l=new u(i);let c=null;return"function"==typeof r?(l.on("end",(()=>r(null,a.toString("utf8")))),l.on("error",r)):c=new Promise(((e,t)=>{l.on("end",(()=>e(a.toString("utf8")))),l.on("error",t)})),l.pipe(a),o.guessEncoding(e,n).pipe(l),c}_on_error(e){this.stream_errors?this.push(e.toString()):this.emit("error",e)}_on_more(e,t,r,n){e===a.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[t])}_fore(e,t){switch(e){case a.BYTE_STRING:case a.UTF8_STRING:case a.ARRAY:t>0&&this.push(", ");break;case a.MAP:t>0&&(t%2?this.push(": "):this.push(", "))}}_on_value(e,t,r){if(e===l.BREAK)return;this._fore(t,r);const n=this.float_bytes;this.float_bytes=-1,this.push(o.cborValueToString(e,n))}_on_start(e,t,r,n){switch(this._fore(r,n),e){case a.TAG:this.push(`${t}(`);break;case a.ARRAY:this.push("[");break;case a.MAP:this.push("{");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push("(")}t===l.STREAM&&this.push("_ ")}_on_stop(e){switch(e){case a.TAG:this.push(")");break;case a.ARRAY:this.push("]");break;case a.MAP:this.push("}");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}e.exports=u},2893:(e,t,r)=>{"use strict";const n=r(8310),i=r(5256),o=r(7328),s=r(9452),{MT:a,NUMBYTES:l,SHIFT32:u,SIMPLE:c,SYMS:f,TAG:h,BI:d}=s,{Buffer:p}=r(8287),b=a.SIMPLE_FLOAT<<5|l.TWO,y=a.SIMPLE_FLOAT<<5|l.FOUR,g=a.SIMPLE_FLOAT<<5|l.EIGHT,w=a.SIMPLE_FLOAT<<5|c.TRUE,_=a.SIMPLE_FLOAT<<5|c.FALSE,m=a.SIMPLE_FLOAT<<5|c.UNDEFINED,E=a.SIMPLE_FLOAT<<5|c.NULL,S=p.from([255]),v=p.from("f97e00","hex"),A=p.from("f9fc00","hex"),I=p.from("f97c00","hex"),T=p.from("f98000","hex"),R={};let B={};class N extends n.Transform{constructor(e={}){const{canonical:t=!1,encodeUndefined:r,disallowUndefinedKeys:n=!1,dateType:i="number",collapseBigIntegers:o=!1,detectLoops:s=!1,omitUndefinedProperties:a=!1,genTypes:l=[],...u}=e;if(super({...u,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=t,this.encodeUndefined=r,this.disallowUndefinedKeys=n,this.dateType=function(e){if(!e)return"number";switch(e.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${e}"`)}(i),this.collapseBigIntegers=!!this.canonical||o,this.detectLoops=void 0,"boolean"==typeof s)s&&(this.detectLoops=new WeakSet);else{if(!(s instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=s}if(this.omitUndefinedProperties=a,this.semanticTypes={...N.SEMANTIC_TYPES},Array.isArray(l))for(let e=0,t=l.length;e{const r=typeof e[t];return"function"!==r&&(!this.omitUndefinedProperties||"undefined"!==r)})),n={};if(this.canonical&&r.sort(((e,t)=>{const r=n[e]||(n[e]=N.encode(e)),i=n[t]||(n[t]=N.encode(t));return r.compare(i)})),t.indefinite){if(!this._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!this._pushInt(r.length,a.MAP))return!1;let i=null;for(let t=0,o=r.length;tvoid 0!==t))),r.indefinite){if(!e._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!e._pushInt(n.length,a.MAP))return!1;if(e.canonical){const t=new N({genTypes:e.semanticTypes,canonical:e.canonical,detectLoops:Boolean(e.detectLoops),dateType:e.dateType,disallowUndefinedKeys:e.disallowUndefinedKeys,collapseBigIntegers:e.collapseBigIntegers}),r=new i({highWaterMark:e.readableHighWaterMark});t.pipe(r),n.sort((([e],[n])=>{t.pushAny(e);const i=r.read();t.pushAny(n);const o=r.read();return i.compare(o)}));for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}}else for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}return!(r.indefinite&&!e.push(S))}static _pushTypedArray(e,t){let r=64,n=t.BYTES_PER_ELEMENT;const{name:i}=t.constructor;return i.startsWith("Float")?(r|=16,n/=2):i.includes("U")||(r|=8),(i.includes("Clamped")||1!==n&&!o.isBigEndian())&&(r|=4),r|={1:0,2:1,4:2,8:3}[n],!!e._pushTag(r)&&N._pushBuffer(e,p.from(t.buffer,t.byteOffset,t.byteLength))}static _pushArrayBuffer(e,t){return N._pushBuffer(e,p.from(t))}static encodeIndefinite(e,t,r={}){if(null==t){if(null==this)throw new Error("No object to encode");t=this}const{chunkSize:n=4096}=r;let i=!0;const s=typeof t;let u=null;if("string"===s){i=i&&e._pushUInt8(a.UTF8_STRING<<5|l.INDEFINITE);let r=0;for(;r{const i=[],o=new N(t);o.on("data",(e=>i.push(e))),o.on("error",n),o.on("finish",(()=>r(p.concat(i)))),o.pushAny(e),o.end()}))}static get SEMANTIC_TYPES(){return B}static set SEMANTIC_TYPES(e){B=e}static reset(){N.SEMANTIC_TYPES={...R}}}Object.assign(R,{Array:N.pushArray,Date:N._pushDate,Buffer:N._pushBuffer,[p.name]:N._pushBuffer,Map:N._pushMap,NoFilter:N._pushNoFilter,[i.name]:N._pushNoFilter,RegExp:N._pushRegexp,Set:N._pushSet,ArrayBuffer:N._pushArrayBuffer,Uint8ClampedArray:N._pushTypedArray,Uint8Array:N._pushTypedArray,Uint16Array:N._pushTypedArray,Uint32Array:N._pushTypedArray,Int8Array:N._pushTypedArray,Int16Array:N._pushTypedArray,Int32Array:N._pushTypedArray,Float32Array:N._pushTypedArray,Float64Array:N._pushTypedArray,URL:N._pushURL,Boolean:N._pushBoxed,Number:N._pushBoxed,String:N._pushBoxed}),"undefined"!=typeof BigUint64Array&&(R[BigUint64Array.name]=N._pushTypedArray),"undefined"!=typeof BigInt64Array&&(R[BigInt64Array.name]=N._pushTypedArray),N.reset(),e.exports=N},2903:(e,t,r)=>{"use strict";const{Buffer:n}=r(8287),i=r(2893),o=r(3737),{MT:s}=r(9452);class a extends Map{constructor(e){super(e)}static _encode(e){return i.encodeCanonical(e).toString("base64")}static _decode(e){return o.decodeFirstSync(e,"base64")}get(e){return super.get(a._encode(e))}set(e,t){return super.set(a._encode(e),t)}delete(e){return super.delete(a._encode(e))}has(e){return super.has(a._encode(e))}*keys(){for(const e of super.keys())yield a._decode(e)}*entries(){for(const e of super.entries())yield[a._decode(e[0]),e[1]]}[Symbol.iterator](){return this.entries()}forEach(e,t){if("function"!=typeof e)throw new TypeError("Must be function");for(const t of super.entries())e.call(this,t[1],a._decode(t[0]),this)}encodeCBOR(e){if(!e._pushInt(this.size,s.MAP))return!1;if(e.canonical){const t=Array.from(super.entries()).map((e=>[n.from(e[0],"base64"),e[1]]));t.sort(((e,t)=>e[0].compare(t[0])));for(const r of t)if(!e.push(r[0])||!e.pushAny(r[1]))return!1}else for(const t of super.entries())if(!e.push(n.from(t[0],"base64"))||!e.pushAny(t[1]))return!1;return!0}}e.exports=a},9744:e=>{"use strict";class t{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(e){const r=this.map.get(e);if(r)return r.length>1?r[0]||this.recording?r[1]:(r[0]=!0,t.FIRST):this.recording?(r.push(this.count++),r[1]):t.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(e,[!1]),t.NEVER}}t.NEVER=-1,t.FIRST=-2,e.exports=t},207:(e,t,r)=>{"use strict";const n=r(2893),i=r(9744),{Buffer:o}=r(8287);class s extends n{constructor(e){super(e),this.valueSharing=new i}_pushObject(e,t){if(null!==e){const t=this.valueSharing.check(e);switch(t){case i.FIRST:this._pushTag(28);break;case i.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(t)}}return super._pushObject(e,t)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...e){const t=new s;t.on("data",(()=>{}));for(const r of e)t.pushAny(r);return t.stopRecording(),t.removeAllListeners("data"),t._encodeAll(e)}static encodeCanonical(...e){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(e,t){const r=new s(t);return r.on("data",(()=>{})),r.pushAny(e),r.stopRecording(),r.removeAllListeners("data"),r._encodeAll([e])}static encodeAsync(e,t){return new Promise(((r,n)=>{const i=[],a=new s(t);a.on("data",(()=>{})),a.on("error",n),a.on("finish",(()=>r(o.concat(i)))),a.pushAny(e),a.stopRecording(),a.removeAllListeners("data"),a.on("data",(e=>i.push(e))),a.pushAny(e),a.end()}))}}e.exports=s},5059:(e,t,r)=>{"use strict";const{MT:n,SIMPLE:i,SYMS:o}=r(9452);class s{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error(`value must be a small positive integer: ${e}`);this.value=e}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return`simple(${this.value})`}encodeCBOR(e){return e._pushInt(this.value,n.SIMPLE_FLOAT)}static isSimple(e){return e instanceof s}static decode(e,t=!0,r=!1){switch(e){case i.FALSE:return!1;case i.TRUE:return!0;case i.NULL:return t?null:o.NULL;case i.UNDEFINED:if(t)return;return o.UNDEFINED;case-1:if(!t||!r)throw new Error("Invalid BREAK");return o.BREAK;default:return new s(e)}}}e.exports=s},3557:(e,t,r)=>{"use strict";const n=r(9452),i=r(7328),o=Symbol("INTERNAL_JSON");function s(e,t){if(i.isBufferish(e))e.toJSON=t;else if(Array.isArray(e))for(const r of e)s(r,t);else if(e&&"object"==typeof e&&(!(e instanceof p)||e.tag<21||e.tag>23))for(const r of Object.values(e))s(r,t)}function a(){return i.base64(this)}function l(){return i.base64url(this)}function u(){return this.toString("hex")}const c={0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>i.bufferToBigInt(e),3:e=>n.BI.MINUS_ONE-i.bufferToBigInt(e),21:(e,t)=>(i.isBufferish(e)?t[o]=l:s(e,l),t),22:(e,t)=>(i.isBufferish(e)?t[o]=a:s(e,a),t),23:(e,t)=>(i.isBufferish(e)?t[o]=u:s(e,u),t),32:e=>new URL(e),33:(e,t)=>{if(!e.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const r=e.length%4;if(1===r)throw new Error("Invalid base64url length");if(2===r){if(-1==="AQgw".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding")}else if(3===r&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding");return t},34:(e,t)=>{const r=e.match(/^[a-zA-Z0-9+/]+(?={0,2})$/);if(!r)throw new Error("Invalid base64 characters");if(e.length%4!=0)throw new Error("Invalid base64 length");if("="===r.groups.padding){if(-1==="AQgw".indexOf(e[e.length-2]))throw new Error("Invalid base64 padding")}else if("=="===r.groups.padding&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-3]))throw new Error("Invalid base64 padding");return t},35:e=>new RegExp(e),258:e=>new Set(e)},f={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};function h(e,t){if(!i.isBufferish(e))throw new TypeError("val not a buffer");const{tag:r}=t,n=f[r];if(!n)throw new Error(`Invalid typed array tag: ${r}`);const o=2**(((16&r)>>4)+(3&r));return!(4&r)!==i.isBigEndian()&&o>1&&function(e,t,r,n){const i=new DataView(e),[o,s]={2:[i.getUint16,i.setUint16],4:[i.getUint32,i.setUint32],8:[i.getBigUint64,i.setBigUint64]}[t],a=r+n;for(let e=r;e0?this.err=e.message:this.err=e,this}}static get TAGS(){return d}static set TAGS(e){d=e}static reset(){p.TAGS={...c}}}p.INTERNAL_JSON=o,p.reset(),e.exports=p},7328:(e,t,r)=>{"use strict";const{Buffer:n}=r(8287),i=r(5256),o=r(8310),s=r(9452),{NUMBYTES:a,SHIFT32:l,BI:u,SYMS:c}=s,f=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});t.utf8=e=>f.decode(e),t.utf8.checksUTF8=!0,t.isBufferish=function(e){return e&&"object"==typeof e&&(n.isBuffer(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof ArrayBuffer||e instanceof DataView)},t.bufferishToBuffer=function(e){return n.isBuffer(e)?e:ArrayBuffer.isView(e)?n.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?n.from(e):null},t.parseCBORint=function(e,t){switch(e){case a.ONE:return t.readUInt8(0);case a.TWO:return t.readUInt16BE(0);case a.FOUR:return t.readUInt32BE(0);case a.EIGHT:{const e=t.readUInt32BE(0),r=t.readUInt32BE(4);return e>2097151?BigInt(e)*u.SHIFT32+BigInt(r):e*l+r}default:throw new Error(`Invalid additional info for int: ${e}`)}},t.writeHalf=function(e,t){const r=n.allocUnsafe(4);r.writeFloatBE(t,0);const i=r.readUInt32BE(0);if(0!=(8191&i))return!1;let o=i>>16&32768;const s=i>>23&255,a=8388607&i;if(s>=113&&s<=142)o+=(s-112<<10)+(a>>13);else{if(!(s>=103&&s<113))return!1;if(a&(1<<126-s)-1)return!1;o+=a+8388608>>126-s}return e.writeUInt16BE(o),!0},t.parseHalf=function(e){const t=128&e[0]?-1:1,r=(124&e[0])>>2,n=(3&e[0])<<8|e[1];return r?31===r?t*(n?NaN:1/0):t*2**(r-25)*(1024+n):5.960464477539063e-8*t*n},t.parseCBORfloat=function(e){switch(e.length){case 2:return t.parseHalf(e);case 4:return e.readFloatBE(0);case 8:return e.readDoubleBE(0);default:throw new Error(`Invalid float size: ${e.length}`)}},t.hex=function(e){return n.from(e.replace(/^0x/,""),"hex")},t.bin=function(e){let t=0,r=(e=e.replace(/\s/g,"")).length%8||8;const i=[];for(;r<=e.length;)i.push(parseInt(e.slice(t,r),2)),t=r,r+=8;return n.from(i)},t.arrayEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,r)=>e===t[r]))},t.bufferToBigInt=function(e){return BigInt(`0x${e.toString("hex")}`)},t.cborValueToString=function(e,r=-1){switch(typeof e){case"symbol":{switch(e){case c.NULL:return"null";case c.UNDEFINED:return"undefined";case c.BREAK:return"BREAK"}if(e.description)return e.description;const t=e.toString().match(/^Symbol\((?.*)\)/);return t&&t.groups.name?t.groups.name:"Symbol"}case"string":return JSON.stringify(e);case"bigint":return e.toString();case"number":{const t=Object.is(e,-0)?"-0":String(e);return r>0?`${t}_${r}`:t}case"object":{if(!e)return"null";const n=t.bufferishToBuffer(e);if(n){const e=n.toString("hex");return r===-1/0?e:`h'${e}'`}return e&&"function"==typeof e[Symbol.for("nodejs.util.inspect.custom")]?e[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(e)?"[]":"{}"}}return String(e)},t.guessEncoding=function(e,r){if("string"==typeof e)return new i(e,null==r?"hex":r);const n=t.bufferishToBuffer(e);if(n)return new i(n);if((s=e)instanceof o.Readable||["read","on","pipe"].every((e=>"function"==typeof s[e])))return e;var s;throw new Error("Unknown input type")};const h={"=":"","+":"-","/":"_"};t.base64url=function(e){return t.bufferishToBuffer(e).toString("base64").replace(/[=+/]/g,(e=>h[e]))},t.base64=function(e){return t.bufferishToBuffer(e).toString("base64")},t.isBigEndian=function(){const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])}},4957:(e,t,r)=>{"use strict";const n=r(8310),i=r(5256);class o extends n.Transform{constructor(e){super(e),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new i,this.__restart()}_transform(e,t,r){for(this.bs.write(e);this.bs.length>=this.__needed;){let e=null;const t=null===this.__needed?void 0:this.bs.read(this.__needed);try{e=this.__parser.next(t)}catch(e){return r(e)}this.__needed&&(this.__fresh=!1),e.done?(this.push(e.value),this.__restart()):this.__needed=e.value||1/0}return r()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(e){e(this.__fresh?null:new Error("unexpected end of input"))}}e.exports=o},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=p,s/=256,u-=8);e[r+d-p]|=128*b}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},5256:(e,t,r)=>{"use strict";const n=r(8310),{Buffer:i}=r(8287),o=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class s extends n.Transform{constructor(e,t,r={}){let n=null,o=null;switch(typeof e){case"object":i.isBuffer(e)?n=e:e&&(r=e);break;case"string":n=e;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof t){case"object":t&&(r=t);break;case"string":o=t;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!r||"object"!=typeof r)throw new TypeError("Invalid options");null==n&&(n=r.input),null==o&&(o=r.inputEncoding),delete r.input,delete r.inputEncoding;const s=null==r.watchPipe||r.watchPipe;delete r.watchPipe;const a=Boolean(r.readError);delete r.readError,super(r),this.readError=a,s&&this.on("pipe",(e=>{const t=e._readableState.objectMode;if(this.length>0&&t!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=t,this._writableState.objectMode=t})),null!=n&&this.end(n,o)}static isNoFilter(e){return e instanceof this}static compare(e,t){if(!(e instanceof this))throw new TypeError("Arguments must be NoFilters");return e===t?0:e.compare(t)}static concat(e,t){if(!Array.isArray(e))throw new TypeError("list argument must be an Array of NoFilters");if(0===e.length||0===t)return i.alloc(0);null==t&&(t=e.reduce(((e,t)=>{if(!(t instanceof s))throw new TypeError("list argument must be an Array of NoFilters");return e+t.length}),0));let r=!0,n=!0;const o=e.map((e=>{if(!(e instanceof s))throw new TypeError("list argument must be an Array of NoFilters");const t=e.slice();return i.isBuffer(t)?n=!1:r=!1,t}));if(r)return i.concat(o,t);if(n)return[].concat(...o).slice(0,t);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(e,t,r){this._readableState.objectMode||i.isBuffer(e)||(e=i.from(e,t)),this.push(e),r()}_bufArray(){let e=this._readableState.buffer;if(!Array.isArray(e)){let t=e.head;for(e=[];null!=t;)e.push(t.data),t=t.next}return e}read(e){const t=super.read(e);if(null!=t){if(this.emit("read",t),this.readError&&t.length{this.length>=e?i(this.read(e)):this.writableFinished?o(new Error(`Stream finished before ${e} bytes were available`)):(t=t=>{this.length>=e&&i(this.read(e))},r=()=>{o(new Error(`Stream finished before ${e} bytes were available`))},n=o,this.on("readable",t),this.on("error",n),this.on("finish",r))})).finally((()=>{t&&(this.removeListener("readable",t),this.removeListener("error",n),this.removeListener("finish",r))}))}promise(e){let t=!1;return new Promise(((r,n)=>{this.on("finish",(()=>{const n=this.read();null==e||t||(t=!0,e(null,n)),r(n)})),this.on("error",(r=>{null==e||t||(t=!0,e(r)),n(r)}))}))}compare(e){if(!(e instanceof s))throw new TypeError("Arguments must be NoFilters");if(this===e)return 0;const t=this.slice(),r=e.slice();if(i.isBuffer(t)&&i.isBuffer(r))return t.compare(r);throw new Error("Cannot compare streams in object mode")}equals(e){return 0===this.compare(e)}slice(e,t){if(this._readableState.objectMode)return this._bufArray().slice(e,t);const r=this._bufArray();switch(r.length){case 0:return i.alloc(0);case 1:return r[0].slice(e,t);default:return i.concat(r).slice(e,t)}}get(e){return this.slice()[e]}toJSON(){const e=this.slice();return i.isBuffer(e)?e.toJSON():e}toString(e,t,r){const n=this.slice(t,r);return i.isBuffer(n)?e&&"utf8"!==e?n.toString(e):o.decode(n):JSON.stringify(n)}[Symbol.for("nodejs.util.inspect.custom")](e,t){const r=this._bufArray().map((e=>i.isBuffer(e)?t.stylize(e.toString("hex"),"string"):JSON.stringify(e))).join(", ");return`${this.constructor.name} [${r}]`}get length(){return this._readableState.length}writeBigInt(e){let t=e.toString(16);if(e<0){const r=BigInt(Math.floor(t.length/2));t=(e=(BigInt(1)<{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,l=[],u=!1,c=-1;function f(){u&&a&&(u=!1,a.length?l=a.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(a=l,l=[];++c1)for(var r=1;r{"use strict";e.exports=r(5506).Duplex},3600:(e,t,r)=>{"use strict";e.exports=r(5506).PassThrough},5412:(e,t,r)=>{"use strict";e.exports=r(5506).Readable},4610:(e,t,r)=>{"use strict";e.exports=r(5506).Transform},6708:(e,t,r)=>{"use strict";e.exports=r(5506).Writable},4147:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(4134),{AbortError:i,codes:o}=r(6371),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:l}=r(6115),u=r(6238),{ERR_INVALID_ARG_TYPE:c}=o;let f;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!s(r)&&!a(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=s(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[l](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{f=f||r(7760).addAbortListener;const i=f(e,o);u(t,i[n])}return t}},345:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(4134),{Buffer:a}=r(8287),{inspect:l}=r(7760);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(eo.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},7830:(e,t,r)=>{"use strict";const{pipeline:n}=r(7758),i=r(3370),{destroyer:o}=r(5896),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:f,isReadableStream:h}=r(6115),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(6371),y=r(6238);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(l(e[r])||f(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,g,w,_,m;const E=e[0],S=n(e,(function(e){const t=_;_=null,t?t(e):e?m.destroy(e):A||v||m.destroy()})),v=!!(l(E)||f(E)||c(E)),A=!!(a(S)||h(S)||c(S));if(m=new i({writableObjectMode:!(null==E||!E.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:v,readable:A}),v){if(s(E))m._write=function(e,t,n){E.write(e,t)?n():r=n},m._final=function(e){E.end(),g=e},E.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(E)){const e=(c(E)?E.writable:E).getWriter();m._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},m._final=async function(t){try{await e.ready,e.close().catch((()=>{})),g=t}catch(e){t(e)}}}const e=c(S)?S.readable:S;y(e,(()=>{if(g){const e=g;g=null,e()}}))}if(A)if(s(S))S.on("readable",(function(){if(w){const e=w;w=null,e()}})),S.on("end",(function(){m.push(null)})),m._read=function(){for(;;){const e=S.read();if(null===e)return void(w=m._read);if(!m.push(e))return}};else if(u(S)){const e=(c(S)?S.readable:S).getReader();m._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!m.push(t))return;if(r)return void m.push(null)}catch{return}}}return m._destroy=function(e,t){e||null===_||(e=new d),w=null,r=null,g=null,null===_?t(e):(_=t,s(S)&&o(S,e))},m}},5896:(e,t,r)=>{"use strict";const n=r(5606),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(6371),{Symbol:a}=r(4134),{kIsDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:f}=r(6115),h=a("kDestroy"),d=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(y,e,t):n.nextTick(g,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function y(e,t){w(e,t),g(e)}function g(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function w(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function _(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(w,e,t):w(e,t))}function m(e){let t=!1;function r(r){if(t)return void _(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(h,r):r?_(e,r,!0):n.nextTick(E,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function E(e){e.emit(d)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function v(e){e.emit("close")}function A(e,t){e.emit("error",t),n.nextTick(v,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(d,t),e.listenerCount(d)>1||n.nextTick(m,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(A,e,t):n.nextTick(v,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(h,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:_}},3370:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(4134);e.exports=u;const a=r(7576),l=r(8584);s(u.prototype,a.prototype),s(u,a);{const e=o(l.prototype);for(let t=0;t{const n=r(5606),i=r(8287),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:h,isWritableStream:d}=r(6115),p=r(6238),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:g}}=r(6371),{destroyer:w}=r(5896),_=r(3370),m=r(7576),E=r(8584),{createDeferredPromise:S}=r(7760),v=r(6532),A=globalThis.Blob||i.Blob,I=void 0!==A?function(e){return e instanceof A}:function(e){return!1},T=globalThis.AbortController||r(5568).AbortController,{FunctionPrototypeCall:R}=r(4134);class B extends _{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function N(e){const t=e.readable&&"function"!=typeof e.readable.read?m.wrap(e.readable):e.readable,r=e.writable;let n,i,a,l,u,c=!!o(t),f=!!s(r);function h(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new B({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&w(t,e),h(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&w(t,e),h(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new b),a=null,n=null,i=null,null===l?o(e):(l=o,w(r,e),w(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return N({readable:t});if(c(t))return N({writable:t});if(l(t))return N({writable:!1,readable:!1});if(h(t))return N({readable:m.fromWeb(t)});if(d(t))return N({writable:E.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=S();const i=new T,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new b(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return v(B,e,{objectMode:!0,write:i,final:o,destroy:s});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new g("nully","body",e)}),(e=>{w(t,e)}));return t=new B({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new g("Iterable, AsyncIterable or AsyncFunction",r,e)}if(I(t))return e(t.arrayBuffer());if(a(t))return v(B,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&d(null==t?void 0:t.writable))return B.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return N({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{w(e,t)})),e=new B({objectMode:!0,writable:!1,read(){}})}throw new y(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},6238:(e,t,r)=>{const n=r(5606),{AbortError:i,codes:o}=r(6371),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:l,once:u}=r(7760),{validateAbortSignal:c,validateFunction:f,validateObject:h,validateBoolean:d}=r(277),{Promise:p,PromisePrototypeThen:b,SymbolDispose:y}=r(4134),{isClosed:g,isReadable:w,isReadableNodeStream:_,isReadableStream:m,isReadableFinished:E,isReadableErrored:S,isWritable:v,isWritableNodeStream:A,isWritableStream:I,isWritableFinished:T,isWritableErrored:R,isNodeStream:B,willEmitClose:N,kIsClosedPromise:L}=r(6115);let U;const M=()=>{};function O(e,t,o){var d,p;if(2===arguments.length?(o=t,t=l):null==t?t=l:h(t,"options"),f(o,"callback"),c(t.signal,"options.signal"),o=u(o),m(e)||I(e))return function(e,t,o){let s=!1,a=M;if(t.signal)if(a=()=>{s=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{U=U||r(7760).addAbortListener;const n=U(t.signal,a),i=o;o=u(((...t)=>{n[y](),i.apply(e,t)}))}const l=(...t)=>{s||n.nextTick((()=>o.apply(e,t)))};return b(e[L].promise,l,l),M}(e,t,o);if(!B(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const O=null!==(d=t.readable)&&void 0!==d?d:_(e),x=null!==(p=t.writable)&&void 0!==p?p:A(e),k=e._writableState,P=e._readableState,j=()=>{e.writable||C()};let D=N(e)&&_(e)===O&&A(e)===x,F=T(e,!1);const C=()=>{F=!0,e.destroyed&&(D=!1),(!D||e.readable&&!O)&&(O&&!$||o.call(e))};let $=E(e,!1);const W=()=>{$=!0,e.destroyed&&(D=!1),(!D||e.writable&&!x)&&(x&&!F||o.call(e))},G=t=>{o.call(e,t)};let Y=g(e);const H=()=>{Y=!0;const t=R(e)||S(e);return t&&"boolean"!=typeof t?o.call(e,t):O&&!$&&_(e,!0)&&!E(e,!1)?o.call(e,new a):!x||F||T(e,!1)?void o.call(e):o.call(e,new a)},V=()=>{Y=!0;const t=R(e)||S(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},K=()=>{e.req.on("finish",C)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?x&&!k&&(e.on("end",j),e.on("close",j)):(e.on("complete",C),D||e.on("abort",H),e.req?K():e.on("request",K)),D||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",W),e.on("finish",C),!1!==t.error&&e.on("error",G),e.on("close",H),Y?n.nextTick(H):null!=k&&k.errorEmitted||null!=P&&P.errorEmitted?D||n.nextTick(V):(O||D&&!w(e)||!F&&!1!==v(e))&&(x||D&&!v(e)||!$&&!1!==w(e))?P&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const q=()=>{o=M,e.removeListener("aborted",H),e.removeListener("complete",C),e.removeListener("abort",H),e.removeListener("request",K),e.req&&e.req.removeListener("finish",C),e.removeListener("end",j),e.removeListener("close",j),e.removeListener("finish",C),e.removeListener("end",W),e.removeListener("error",G),e.removeListener("close",H)};if(t.signal&&!Y){const s=()=>{const r=o;q(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{U=U||r(7760).addAbortListener;const n=U(t.signal,s),i=o;o=u(((...t)=>{n[y](),i.apply(e,t)}))}}return q}e.exports=O,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(d(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=O(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},6532:(e,t,r)=>{"use strict";const n=r(5606),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(4134),{Buffer:a}=r(8287),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=r(6371).codes;e.exports=function(e,t,r){let c,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])f=!0,c=t[o]();else{if(!t||!t[s])throw new l("iterable",["Iterable"],t);f=!1,c=t[s]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let d=!1;return h._read=function(){d||(d=!0,async function(){for(;;){try{const{value:e,done:t}=f?await c.next():c.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw d=!1,new u;if(h.push(t))continue;d=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},4259:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(4134),{EventEmitter:o}=r(7007);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",c),a(e,"error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},823:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(5568).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(6371),{validateAbortSignal:u,validateInteger:c,validateObject:f}=r(277),h=r(4134).Symbol("kWeak"),d=r(4134).Symbol("kResistStopPropagation"),{finished:p}=r(6238),b=r(7830),{addAbortSignalNoValidate:y}=r(4147),{isWritable:g,isNodeStream:w}=r(6115),{deprecate:_}=r(7760),{ArrayPrototypePush:m,Boolean:E,MathFloor:S,Number:v,NumberIsNaN:A,Promise:I,PromiseReject:T,PromiseResolve:R,PromisePrototypeThen:B,Symbol:N}=r(4134),L=N("kEmpty"),U=N("kEof");function M(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),c(n,"options.concurrency",1),c(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(7760).AbortSignalAny([null==t?void 0:t.signal].filter(E)),s=this,a=[],u={signal:o};let c,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,y()}function y(){f&&!h&&d=i||d>=n)&&await new I((e=>{f=e}))}a.push(U)}catch(e){const t=T(e);B(t,b,p),a.push(t)}finally{h=!0,c&&(c(),c=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===U)return;if(o.aborted)throw new l;e!==L&&(yield e),a.shift(),y()}await new I((e=>{c=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function O(e,t=void 0){for await(const r of x.call(this,e,t))return!0;return!1}function x(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return M.call(this,(async function(t,r){return await e(t,r)?t:L}),t)}class k extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function P(e){if(e=v(e),A(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:_((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=P(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:x,flatMap:function(e,t){const r=M.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:M,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=P(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),w(e)&&!g(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await O.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of M.call(this,(async function(t,r){return await e(t,r),L}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,c=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var y;if(b=!0,null!=r&&null!==(y=r.signal)&&void 0!==y&&y.aborted)throw new l;s?t=await e(t,n,{signal:c}):(t=n,s=!0)}if(!b&&!s)throw new k}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});m(t,n)}return t},some:O,find:async function(e,t){for await(const r of x.call(this,e,t))return r}}},6524:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(4134);e.exports=o;const i=r(7382);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},7758:(e,t,r)=>{const n=r(5606),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s,SymbolDispose:a}=r(4134),l=r(6238),{once:u}=r(7760),c=r(5896),f=r(3370),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:d,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:w}=r(6371),{validateFunction:_,validateAbortSignal:m}=r(277),{isIterable:E,isReadable:S,isReadableNodeStream:v,isNodeStream:A,isTransformStream:I,isWebStream:T,isReadableStream:R,isReadableFinished:B}=r(6115),N=globalThis.AbortController||r(5568).AbortController;let L,U,M;function O(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new y("pipe")))},cleanup:l(e,{readable:t,writable:r},(e=>{n=!e}))}}function x(e){if(E(e))return e;if(v(e))return async function*(e){U||(U=r(7576)),yield*U.prototype[s].call(e)}(e);throw new d("val",["Readable","Iterable","AsyncIterable"],e)}async function k(e,t,r,{end:n}){let i,s=null;const a=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},u=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",a);const c=l(t,{readable:!1},a);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(i!==e?h(i,e):e)}finally{c(),t.off("drain",a)}}async function P(e,t,r,{end:n}){I(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function j(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new b("streams");const s=new N,l=s.signal,u=null==o?void 0:o.signal,c=[];function h(){C(new w)}let y,g,_;m(u,"options.signal"),M=M||r(7760).addAbortListener,u&&(y=M(u,h));const B=[];let U,j=0;function F(e){C(e,0==--j)}function C(e,r){var i;if(!e||g&&"ERR_STREAM_PREMATURE_CLOSE"!==g.code||(g=e),g||r){for(;B.length;)B.shift()(g);null===(i=y)||void 0===i||i[a](),s.abort(),r&&(g||c.forEach((e=>e())),n.nextTick(t,g,_))}}for(let Y=0;Y0,q=V||!1!==(null==o?void 0:o.end),z=Y===e.length-1;if(A(H)){if(q){const{destroy:X,cleanup:J}=O(H,V,K);B.push(X),S(H)&&z&&c.push(J)}function $(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&F(e)}H.on("error",$),S(H)&&z&&c.push((()=>{H.removeListener("error",$)}))}if(0===Y)if("function"==typeof H){if(U=H({signal:l}),!E(U))throw new p("Iterable, AsyncIterable or Stream","source",U)}else U=E(H)||v(H)||I(H)?H:f.from(H);else if("function"==typeof H){var W;if(U=I(U)?x(null===(W=U)||void 0===W?void 0:W.readable):x(U),U=H(U,{signal:l}),V){if(!E(U,!0))throw new p("AsyncIterable",`transform[${Y-1}]`,U)}else{var G;L||(L=r(6524));const Z=new L({objectMode:!0}),Q=null===(G=U)||void 0===G?void 0:G.then;if("function"==typeof Q)j++,Q.call(U,(e=>{_=e,null!=e&&Z.write(e),q&&Z.end(),n.nextTick(F)}),(e=>{Z.destroy(e),n.nextTick(F,e)}));else if(E(U,!0))j++,k(U,Z,F,{end:q});else{if(!R(U)&&!I(U))throw new p("AsyncIterable or Promise","destination",U);{const re=U.readable||U;j++,k(re,Z,F,{end:q})}}U=Z;const{destroy:ee,cleanup:te}=O(U,!1,!0);B.push(ee),z&&c.push(te)}}else if(A(H)){if(v(U)){j+=2;const ne=D(U,H,F,{end:q});S(H)&&z&&c.push(ne)}else if(I(U)||R(U)){const ie=U.readable||U;j++,k(ie,H,F,{end:q})}else{if(!E(U))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],U);j++,k(U,H,F,{end:q})}U=H}else if(T(H)){if(v(U))j++,P(x(U),H,F,{end:q});else if(R(U)||E(U))j++,P(U,H,F,{end:q});else{if(!I(U))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],U);j++,P(U.readable,H,F,{end:q})}U=H}else U=f.from(H)}return(null!=l&&l.aborted||null!=u&&u.aborted)&&n.nextTick(h),U}function D(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new g)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}B(e)?n.nextTick(s):e.once("end",s)}else r();return l(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),l(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:j,pipeline:function(...e){return j(e,u(function(e){return _(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},7576:(e,t,r)=>{const n=r(5606),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:c,Promise:f,SafeSet:h,SymbolAsyncDispose:d,SymbolAsyncIterator:p,Symbol:b}=r(4134);e.exports=z,z.ReadableState=q;const{EventEmitter:y}=r(7007),{Stream:g,prependListener:w}=r(4259),{Buffer:_}=r(8287),{addAbortSignal:m}=r(4147),E=r(6238);let S=r(7760).debuglog("stream",(e=>{S=e}));const v=r(345),A=r(5896),{getHighWaterMark:I,getDefaultHighWaterMark:T}=r(5291),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:B,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:L,ERR_STREAM_PUSH_AFTER_EOF:U,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:M},AbortError:O}=r(6371),{validateObject:x}=r(277),k=b("kPaused"),{StringDecoder:P}=r(3141),j=r(6532);c(z.prototype,g.prototype),c(z,g);const D=()=>{},{errorOrDestroy:F}=A,C=1,$=16,W=32,G=64,Y=2048,H=4096,V=65536;function K(e){return{enumerable:!1,get(){return 0!=(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function q(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.state=Y|H|$|W,e&&e.objectMode&&(this.state|=C),n&&e&&e.readableObjectMode&&(this.state|=C),this.highWaterMark=e?I(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new v,this.length=0,this.pipes=[],this.flowing=null,this[k]=null,e&&!1===e.emitClose&&(this.state&=~Y),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new P(e.encoding),this.encoding=e.encoding)}function z(e){if(!(this instanceof z))return new z(e);const t=this instanceof r(3370);this._readableState=new q(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&m(e.signal,this)),g.call(this,e),A.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function X(e,t,r,n){S("readableAddChunk",t);const i=e._readableState;let o;if(0==(i.state&C)&&("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=_.from(t,r).toString(i.encoding):(t=_.from(t,r),r=""))):t instanceof _?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new B("chunk",["string","Buffer","Uint8Array"],t))),o)F(e,o);else if(null===t)i.state&=-9,function(e,t){if(S("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(0!=(i.state&C)||t&&t.length>0)if(n)if(0!=(4&i.state))F(e,new M);else{if(i.destroyed||i.errored)return!1;J(e,i,t,!0)}else if(i.ended)F(e,new U);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?J(e,i,t,!1):te(e,i)):J(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(0!=(t.state&V)?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),0!=(t.state&G)&&Q(e)),te(e,t)}function Z(e,t){return e<=0||0===t.length&&t.ended?0:0!=(t.state&C)?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;S("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(S("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;S("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[k]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){S("readable nexttick read 0"),e.read(0)}function oe(e,t){S("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(S("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=z.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=D;function i(t){this===e?(n(),n=D):n=t}e.on("readable",i);const o=E(e,{writable:!1},(e=>{r=e?R(r,e):null,n(),n=D}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(i)}}}catch(e){throw r=R(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):A.destroyer(e,null)}}(e,t);return r.stream=e,r}function le(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ue(e){const t=e._readableState;S("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ce,t,e))}function ce(e,t){if(S("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(fe,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function fe(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function de(){return void 0===he&&(he={}),he}l(q.prototype,{objectMode:K(C),ended:K(2),endEmitted:K(4),reading:K(8),constructed:K($),sync:K(W),needReadable:K(G),emittedReadable:K(128),readableListening:K(256),resumeScheduled:K(512),errorEmitted:K(1024),emitClose:K(Y),autoDestroy:K(H),destroyed:K(8192),closed:K(16384),closeEmitted:K(32768),multiAwaitDrain:K(V),readingMore:K(1<<17),dataEmitted:K(1<<18)}),z.prototype.destroy=A.destroy,z.prototype._undestroy=A.undestroy,z.prototype._destroy=function(e,t){t(e)},z.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},z.prototype[d]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new O,this.destroy(e)),new f(((t,r)=>E(this,(n=>n&&n!==e?r(n):t(null)))))},z.prototype.push=function(e,t){return X(this,e,t,!1)},z.prototype.unshift=function(e,t){return X(this,e,t,!0)},z.prototype.isPaused=function(){const e=this._readableState;return!0===e[k]||!1===e.flowing},z.prototype.setEncoding=function(e){const t=new P(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},z.prototype.read=function(e){S("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new L("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return S("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Q(this),null;if(0===(e=Z(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=0!=(t.state&G);if(S("need readable",i),(0===t.length||t.length-e0?le(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},z.prototype._read=function(e){throw new N("_read()")},z.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),S("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?b:s;function s(){S("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){S("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,S("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",c),l=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let l=!1;function u(){l||(1===i.pipes.length&&i.pipes[0]===e?(S("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function c(t){S("ondata");const r=e.write(t);S("dest.write",r),!1===r&&u()}function f(t){if(S("onerror",t),b(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?F(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),b()}function p(){S("onfinish"),e.removeListener("close",d),b()}function b(){S("unpipe"),r.unpipe(e)}return r.on("data",c),w(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?u():i.flowing||(S("pipe resume"),r.resume()),e},z.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?Q(this):i.reading||n.nextTick(ie,this))),r},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},z.prototype.off=z.prototype.removeListener,z.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},z.prototype.resume=function(){const e=this._readableState;return e.flowing||(S("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[k]=!1,this},z.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[k]=!0,this},z.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{F(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(4134),{validateInteger:o}=r(277),{ERR_INVALID_ARG_VALUE:s}=r(6371).codes;let a=16384,l=16;function u(e){return e?l:a}e.exports={getHighWaterMark:function(e,t,r,o){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=a){if(!i(a)||a<0)throw new s(o?`options.${r}`:"options.highWaterMark",a);return n(a)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:a=t}}},7382:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(4134);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(6371).codes,s=r(3370),{getHighWaterMark:a}=r(5291);n(u.prototype,s.prototype),n(u,s);const l=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==c&&c.call(this)}u.prototype._final=c,u.prototype._transform=function(e,t,r){throw new o("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(4134),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),c=o("nodejs.stream.disturbed"),f=o("nodejs.webstream.isClosedPromise"),h=o("nodejs.webstream.controllerErrorFunction");function d(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function y(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function g(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function w(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function _(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function m(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function E(e,t){if(!d(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!_(e)&&d(e)&&e.readable&&!E(e)}function v(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!_(e)&&p(e)&&e.writable&&!m(e)}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function I(e){return"boolean"==typeof e._sent100&&A(e)}e.exports={isDestroyed:_,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,s,l,u,c,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:a,isReadable:S,kIsReadable:l,kIsClosedPromise:f,kControllerErrorFunction:h,kIsWritable:u,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!(!_(e)&&(!1!==(null==t?void 0:t.readable)&&S(e)||!1!==(null==t?void 0:t.writable)&&v(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:d,isReadableStream:y,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:E,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return y(e)||g(e)||w(e)},isWritable:v,isWritableNodeStream:p,isWritableStream:g,isWritableEnded:m,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:I,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&I(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:w}},8584:(e,t,r)=>{const n=r(5606),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:h}=r(4134);e.exports=x,x.WritableState=M;const{EventEmitter:d}=r(7007),p=r(4259).Stream,{Buffer:b}=r(8287),y=r(5896),{addAbortSignal:g}=r(4147),{getHighWaterMark:w,getDefaultHighWaterMark:_}=r(5291),{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:v,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:I,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:B}=r(6371).codes,{errorOrDestroy:N}=y;function L(){}u(x.prototype,p.prototype),u(x,p);const U=f("kOnFinished");function M(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?w(this,e,"writableHighWaterMark",n):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,O(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[U]=[]}function O(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function x(e){const t=this instanceof r(3370);if(!t&&!s(x,this))return new x(e);this._writableState=new M(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&g(e.signal,this)),p.call(this,e),y.construct(this,(()=>{const e=this._writableState;e.writing||W(this,e),Y(this,e)}))}function k(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new B(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=L)}if(null===t)throw new T;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new m("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new R:o.destroyed&&(s=new A("write")),s?(n.nextTick(i,s),N(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.lengthr.bufferedIndex&&W(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(F,r.afterWriteTickInfo)):C(e,r,1,o))):N(e,new S)}function F({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,C(e,t,r,n)}function C(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&$(t),Y(e,t)}function $(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?L:e=>{for(let t=a;t256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function G(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function Y(e,t,r){G(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)N(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[U].splice(0);for(let e=0;e{G(t)?H(e,t):t.pendingcb--}),e,t)):G(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[U].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:y}=r(4134),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:S}}=r(6371),{normalizeEncoding:v}=r(7760),{isAsyncFunction:A,isArrayBufferView:I}=r(7760).types,T={},R=/^[0-7]+$/,B=g(((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),N=g(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),L=g(((e,t,r=!1)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new E(t,`>= ${n} && <= ${i}`,e)}));function U(e,t){if("string"!=typeof e)throw new _(t,"string",e)}const M=g(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new m(t,e,"must be one of: "+n)}}));function O(e,t){if("boolean"!=typeof e)throw new _(t,"boolean",e)}function x(e,t,r){return null!=e&&h(e,t)?e[t]:r}const k=g(((e,t,r=null)=>{const i=x(r,"allowArray",!1),o=x(r,"allowFunction",!1);if(!x(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new _(t,"Object",e)})),P=g(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new _(t,"a dictionary",e)})),j=g(((e,t,r=0)=>{if(!n(e))throw new _(t,"Array",e);if(e.length{if(!I(e))throw new _(t,["Buffer","TypedArray","DataView"],e)})),F=g(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new _(t,"AbortSignal",e)})),C=g(((e,t)=>{if("function"!=typeof e)throw new _(t,"Function",e)})),$=g(((e,t)=>{if("function"!=typeof e||A(e))throw new _(t,"Function",e)})),W=g(((e,t)=>{if(void 0!==e)throw new _(t,"undefined",e)})),G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Y(e,t){if(void 0===e||!d(G,e))throw new m(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===d(R,e))throw new m(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return L(e,t),e},validateArray:j,validateStringArray:function(e,t){j(e,t);for(let r=0;rn||(null!=r||null!=n)&&l(e))throw new E(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:k,validateOneOf:M,validatePlainFunction:$,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new w(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(U(e,t),void 0===T[e]){if(void 0!==T[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:U,validateUint32:L,validateUndefined:W,validateUnion:function(e,t,r){if(!i(r,e))throw new _(t,`('${o(r,"|")}')`,e)},validateAbortSignal:F,validateLinkHeaderValue:function(e){if("string"==typeof e)return Y(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},6371:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(7760),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function f(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function d(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,c[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):u.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),d("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),d("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),d("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),d("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),d("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),d("ERR_STREAM_WRITE_AFTER_END","write after end",Error),d("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},4134:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},7760:(e,t,r)=>{"use strict";const n=r(8287),{kResistStopPropagation:i,SymbolDispose:o}=r(4134),s=globalThis.AbortSignal||r(5568).AbortSignal,a=globalThis.AbortController||r(5568).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,c=void 0!==u?function(e){return e instanceof u}:function(e){return!1},f=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(7007).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return f(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach((e=>{f(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5506:(e,t,r)=>{const{Buffer:n}=r(8287),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(4134),{promisify:{custom:a}}=r(7760),{streamReturningOperators:l,promiseReturningOperators:u}=r(823),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(6371),f=r(7830),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:d}=r(5291),{pipeline:p}=r(7758),{destroyer:b}=r(5896),y=r(6238),g=r(3095),w=r(6115),_=e.exports=r(4259).Stream;_.isDestroyed=w.isDestroyed,_.isDisturbed=w.isDisturbed,_.isErrored=w.isErrored,_.isReadable=w.isReadable,_.isWritable=w.isWritable,_.Readable=r(7576);for(const S of o(l)){const v=l[S];function m(...e){if(new.target)throw c();return _.Readable.from(s(v,this,e))}i(m,"name",{__proto__:null,value:v.name}),i(m,"length",{__proto__:null,value:v.length}),i(_.Readable.prototype,S,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}for(const A of o(u)){const I=u[A];function m(...e){if(new.target)throw c();return s(I,this,e)}i(m,"name",{__proto__:null,value:I.name}),i(m,"length",{__proto__:null,value:I.length}),i(_.Readable.prototype,A,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}_.Writable=r(8584),_.Duplex=r(3370),_.Transform=r(7382),_.PassThrough=r(6524),_.pipeline=p;const{addAbortSignal:E}=r(4147);_.addAbortSignal=E,_.finished=y,_.destroy=b,_.compose=f,_.setDefaultHighWaterMark=h,_.getDefaultHighWaterMark=d,i(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),i(p,a,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),i(y,a,{__proto__:null,enumerable:!0,get:()=>g.finished}),_.Stream=_,_._isUint8Array=function(e){return e instanceof Uint8Array},_._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},3095:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(4134),{isIterable:o,isNodeStream:s,isWebStream:a}=r(6115),{pipelineImpl:l}=r(7758),{finished:u}=r(6238);r(5506),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!o(c)&&!a(c)){const t=n(e);i=t.signal,u=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},2861:(e,t,r)=>{var n=r(8287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},8310:(e,t,r)=>{e.exports=i;var n=r(7007).EventEmitter;function i(){n.call(this)}r(6698)(i,n),i.Readable=r(5412),i.Writable=r(6708),i.Duplex=r(5382),i.Transform=r(4610),i.PassThrough=r(3600),i.finished=r(6238),i.pipeline=r(7758),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},3141:(e,t,r)=>{"use strict";var n=r(2861).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n);var e=r(9881),t={};for(const r in e)"default"!==r&&(t[r]=()=>e[r]);r.d(n,t)})(),n})()));
\ No newline at end of file
diff --git a/packages/cbor-web/lib/cbor.js b/packages/cbor-web/lib/cbor.js
index 653a119c..230f56b3 100644
--- a/packages/cbor-web/lib/cbor.js
+++ b/packages/cbor-web/lib/cbor.js
@@ -1 +1 @@
-export * from 'cbor'
+export * from 'cbor';
diff --git a/packages/cbor-web/package.json b/packages/cbor-web/package.json
index 44071d69..42399c0b 100644
--- a/packages/cbor-web/package.json
+++ b/packages/cbor-web/package.json
@@ -25,15 +25,15 @@
     "events": "^3.3.0",
     "ieee754": "^1.2.1",
     "inherits": "^2.0.4",
-    "nofilter": "^3.1.0",
+    "nofilter": "^3.0.2",
     "process": "^0.11.10",
-    "readable-stream": "^4.4.0",
+    "readable-stream": "^4.5.2",
     "safe-buffer": "^5.2.1",
     "stream-browserify": "^3.0.0",
     "string_decoder": "^1.3.0",
     "util-deprecate": "^1.0.2",
-    "webpack": "^5.82.1",
-    "webpack-cli": "^5.1.1"
+    "webpack": "^5.95.0",
+    "webpack-cli": "^5.1.4"
   },
   "engines": {
     "node": ">=16"
diff --git a/packages/cbor-web/webpack.config.js b/packages/cbor-web/webpack.config.js
index e769548e..f94e8a06 100644
--- a/packages/cbor-web/webpack.config.js
+++ b/packages/cbor-web/webpack.config.js
@@ -1,5 +1,7 @@
-const path = require('path')
-const webpack = require('webpack')
+'use strict';
+
+const path = require('node:path');
+const webpack = require('webpack');
 
 module.exports = {
   entry: './lib/cbor.js',
@@ -24,4 +26,4 @@ module.exports = {
       Buffer: ['buffer', 'Buffer'],
     }),
   ],
-}
+};
diff --git a/packages/cbor/.eslintrc.js b/packages/cbor/.eslintrc.js
deleted file mode 100644
index 600f3159..00000000
--- a/packages/cbor/.eslintrc.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict'
-
-module.exports = {
-  rules: {
-    'jsdoc/no-undefined-types': ['error', {
-      definedTypes: [
-        'Generator', // Comes in from Typescript
-        'NodeJS',
-        'Iterable',
-        'IterableIterator',
-        'InspectOptionsStylized', // From Node
-        'BufferEncoding',
-      ],
-    }],
-  },
-}
diff --git a/packages/cbor/.npmrc b/packages/cbor/.npmrc
index 4c1bf779..b6f27f13 100644
--- a/packages/cbor/.npmrc
+++ b/packages/cbor/.npmrc
@@ -1,2 +1 @@
 engine-strict=true
-package-lock=false
diff --git a/packages/cbor/README.md b/packages/cbor/README.md
index 5c541200..6997f992 100644
--- a/packages/cbor/README.md
+++ b/packages/cbor/README.md
@@ -33,48 +33,48 @@ For a command-line interface, see [cbor-cli](../cbor-cli).
 
 Example:
 ```js
-const cbor = require('cbor')
-const assert = require('assert')
+const cbor = require('cbor');
+const assert = require('node:assert');
 
-let encoded = cbor.encode(true) // Returns 
+let encoded = cbor.encode(true); // Returns 
 cbor.decodeFirst(encoded, (error, obj) => {
   // If there was an error, error != null
   // obj is the unpacked object
-  assert.ok(obj === true)
-})
+  assert.ok(obj === true);
+});
 
 // Use integers as keys?
-const m = new Map()
-m.set(1, 2)
-encoded = cbor.encode(m) // 
+const m = new Map();
+m.set(1, 2);
+encoded = cbor.encode(m); // 
 ```
 
 Allows streaming as well:
 
 ```js
-const cbor = require('cbor')
-const fs = require('fs')
+const cbor = require('cbor');
+const fs = require('node:fs');
 
-const d = new cbor.Decoder()
+const d = new cbor.Decoder();
 d.on('data', obj => {
-  console.log(obj)
-})
+  console.log(obj);
+});
 
-const s = fs.createReadStream('foo')
-s.pipe(d)
+const s = fs.createReadStream('foo');
+s.pipe(d);
 
-const d2 = new cbor.Decoder({input: '00', encoding: 'hex'})
+const d2 = new cbor.Decoder({input: '00', encoding: 'hex'});
 d.on('data', obj => {
-  console.log(obj)
-})
+  console.log(obj);
+});
 ```
 
 There is also support for synchronous decodes:
 
 ```js
 try {
-  console.log(cbor.decodeFirstSync('02')) // 2
-  console.log(cbor.decodeAllSync('0202')) // [2, 2]
+  console.log(cbor.decodeFirstSync('02')); // 2
+  console.log(cbor.decodeAllSync('0202')); // [2, 2]
 } catch (e) {
   // Throws on invalid input
 }
@@ -93,18 +93,18 @@ streams.  There are a few ways to fix this:
 1) pass in a `highWaterMark` option with the value of the largest buffer size you think you will need:
 
 ```js
-cbor.encodeOne(new ArrayBuffer(40000), {highWaterMark: 65535})
+cbor.encodeOne(new ArrayBuffer(40000), {highWaterMark: 65535});
 ```
 
 2) use stream mode.  Catch the `data`, `finish`, and `error` events.  Make sure to call `end()` when you're done.
 
 ```js
-const enc = new cbor.Encoder()
-enc.on('data', buf => /* Send the data somewhere */ null)
-enc.on('error', console.error)
-enc.on('finish', () => /* Tell the consumer we are finished */ null)
+const enc = new cbor.Encoder();
+enc.on('data', buf => /* Send the data somewhere */ null);
+enc.on('error', console.error);
+enc.on('finish', () => /* Tell the consumer we are finished */ null);
 
-enc.end(['foo', 1, false])
+enc.end(['foo', 1, false]);
 ```
 
 3) use `encodeAsync()`, which uses the approach from approach 2 to return a memory-inefficient promise for a Buffer.
@@ -179,13 +179,13 @@ For example:
 ```js
 class Foo {
   constructor() {
-    this.one = 1
-    this.two = 2
+    this.one = 1;
+    this.two = 2;
   }
 
   encodeCBOR(encoder) {
-    const tagged = new Tagged(64000, [this.one, this.two])
-    return encoder.pushAny(tagged)
+    const tagged = new Tagged(64000, [this.one, this.two]);
+    return encoder.pushAny(tagged);
   }
 }
 ```
@@ -203,13 +203,13 @@ encode, for example:
 ```js
 class Bar {
   constructor() {
-    this.three = 3
+    this.three = 3;
   }
 }
-const enc = new Encoder()
+const enc = new Encoder();
 enc.addSemanticType(Bar, (encoder, b) => {
-  encoder.pushAny(b.three)
-})
+  encoder.pushAny(b.three);
+});
 ```
 
 ## Adding new decoders
@@ -227,12 +227,12 @@ const d = new Decoder({
   tags: {
     64000: val => {
       // Check val to make sure it's an Array as expected, etc.
-      const foo = new Foo()
-      ;[foo.one, foo.two] = val
-      return foo
+      const foo = new Foo();
+      [foo.one, foo.two] = val;
+      return foo;
     },
   },
-})
+});
 ```
 
 You can also replace the default decoders by passing in an appropriate tag
@@ -246,7 +246,7 @@ cbor.decodeFirstSync(input, {
     // Temporal built-in, which supports nanosecond time:
     0: x => Temporal.Instant.from(x),
   },
-})
+});
 ```
 
 Developers
diff --git a/packages/cbor/lib/.eslintrc.js b/packages/cbor/lib/.eslintrc.js
deleted file mode 100644
index 931b245d..00000000
--- a/packages/cbor/lib/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict'
-
-module.exports = {
-  rules: {
-    'no-console': 'error',
-  },
-}
diff --git a/packages/cbor/lib/cbor.js b/packages/cbor/lib/cbor.js
index 850e9f62..0640b7ab 100644
--- a/packages/cbor/lib/cbor.js
+++ b/packages/cbor/lib/cbor.js
@@ -1,13 +1,13 @@
-'use strict'
+'use strict';
 
-const Commented = require('./commented')
-const Diagnose = require('./diagnose')
-const Decoder = require('./decoder')
-const Encoder = require('./encoder')
-const Simple = require('./simple')
-const Tagged = require('./tagged')
-const Map = require('./map')
-const SharedValueEncoder = require('./sharedValueEncoder')
+const Commented = require('./commented');
+const Diagnose = require('./diagnose');
+const Decoder = require('./decoder');
+const Encoder = require('./encoder');
+const Simple = require('./simple');
+const Tagged = require('./tagged');
+const Map = require('./map');
+const SharedValueEncoder = require('./sharedValueEncoder');
 
 module.exports = {
   Commented,
@@ -108,7 +108,7 @@ module.exports = {
    * encoding will use.
    */
   reset() {
-    Encoder.reset()
-    Tagged.reset()
+    Encoder.reset();
+    Tagged.reset();
   },
-}
+};
diff --git a/packages/cbor/lib/commented.js b/packages/cbor/lib/commented.js
index 6b65eb68..36c015e1 100644
--- a/packages/cbor/lib/commented.js
+++ b/packages/cbor/lib/commented.js
@@ -1,17 +1,17 @@
-'use strict'
+'use strict';
 
-const stream = require('stream')
-const utils = require('./utils')
-const Decoder = require('./decoder')
-const NoFilter = require('nofilter')
-const {MT, NUMBYTES, SYMS} = require('./constants')
-const {Buffer} = require('buffer')
+const stream = require('node:stream');
+const utils = require('./utils');
+const Decoder = require('./decoder');
+const NoFilter = require('nofilter');
+const {MT, NUMBYTES, SYMS} = require('./constants');
+const {Buffer} = require('node:buffer');
 
 function plural(c) {
   if (c > 1) {
-    return 's'
+    return 's';
   }
-  return ''
+  return '';
 }
 
 /**
@@ -49,15 +49,15 @@ function plural(c) {
 function normalizeOptions(opts, cb) {
   switch (typeof opts) {
     case 'function':
-      return {options: {}, cb: /** @type {commentCallback} */ (opts)}
+      return {options: {}, cb: /** @type {commentCallback} */ (opts)};
     case 'string':
-      return {options: {encoding: /** @type {BufferEncoding} */ (opts)}, cb}
+      return {options: {encoding: /** @type {BufferEncoding} */ (opts)}, cb};
     case 'number':
-      return {options: {max_depth: opts}, cb}
+      return {options: {max_depth: opts}, cb};
     case 'object':
-      return {options: opts || {}, cb}
+      return {options: opts || {}, cb};
     default:
-      throw new TypeError('Unknown option type')
+      throw new TypeError('Unknown option type');
   }
 }
 
@@ -83,37 +83,37 @@ class Commented extends stream.Transform {
       encoding,
       // Stream.Transform options
       ...superOpts
-    } = options
+    } = options;
 
     super({
       ...superOpts,
       readableObjectMode: false,
       writableObjectMode: false,
-    })
+    });
 
-    this.depth = depth
-    this.max_depth = max_depth
-    this.all = new NoFilter()
+    this.depth = depth;
+    this.max_depth = max_depth;
+    this.all = new NoFilter();
 
     if (!tags[24]) {
-      tags[24] = this._tag_24.bind(this)
+      tags[24] = this._tag_24.bind(this);
     }
     this.parser = new Decoder({
       tags,
       max_depth,
       preferWeb,
       encoding,
-    })
-    this.parser.on('value', this._on_value.bind(this))
-    this.parser.on('start', this._on_start.bind(this))
-    this.parser.on('start-string', this._on_start_string.bind(this))
-    this.parser.on('stop', this._on_stop.bind(this))
-    this.parser.on('more-bytes', this._on_more.bind(this))
-    this.parser.on('error', this._on_error.bind(this))
+    });
+    this.parser.on('value', this._on_value.bind(this));
+    this.parser.on('start', this._on_start.bind(this));
+    this.parser.on('start-string', this._on_start_string.bind(this));
+    this.parser.on('stop', this._on_stop.bind(this));
+    this.parser.on('more-bytes', this._on_more.bind(this));
+    this.parser.on('error', this._on_error.bind(this));
     if (!no_summary) {
-      this.parser.on('data', this._on_data.bind(this))
+      this.parser.on('data', this._on_data.bind(this));
     }
-    this.parser.bs.on('read', this._on_read.bind(this))
+    this.parser.bs.on('read', this._on_read.bind(this));
   }
 
   /**
@@ -121,11 +121,11 @@ class Commented extends stream.Transform {
    * @private
    */
   _tag_24(v) {
-    const c = new Commented({depth: this.depth + 1, no_summary: true})
+    const c = new Commented({depth: this.depth + 1, no_summary: true});
 
-    c.on('data', b => this.push(b))
-    c.on('error', er => this.emit('error', er))
-    c.end(v)
+    c.on('data', b => this.push(b));
+    c.on('error', er => this.emit('error', er));
+    c.end(v);
   }
 
   /**
@@ -137,7 +137,7 @@ class Commented extends stream.Transform {
    * @ignore
    */
   _transform(fresh, encoding, cb) {
-    this.parser.write(fresh, encoding, cb)
+    this.parser.write(fresh, encoding, cb);
   }
 
   /**
@@ -148,7 +148,7 @@ class Commented extends stream.Transform {
    */
   _flush(cb) {
     // TODO: find the test that covers this, and look at the return value
-    return this.parser._flush(cb)
+    return this.parser._flush(cb);
   }
 
   /**
@@ -166,167 +166,167 @@ class Commented extends stream.Transform {
    */
   static comment(input, options = {}, cb = null) {
     if (input == null) {
-      throw new Error('input required')
+      throw new Error('input required');
     }
-    ({options, cb} = normalizeOptions(options, cb))
-    const bs = new NoFilter()
-    const {encoding = 'hex', ...opts} = options
-    const d = new Commented(opts)
-    let p = null
+    ({options, cb} = normalizeOptions(options, cb));
+    const bs = new NoFilter();
+    const {encoding = 'hex', ...opts} = options;
+    const d = new Commented(opts);
+    let p = null;
 
     if (typeof cb === 'function') {
       d.on('end', () => {
-        cb(null, bs.toString('utf8'))
-      })
-      d.on('error', cb)
+        cb(null, bs.toString('utf8'));
+      });
+      d.on('error', cb);
     } else {
       p = new Promise((resolve, reject) => {
         d.on('end', () => {
-          resolve(bs.toString('utf8'))
-        })
-        d.on('error', reject)
-      })
+          resolve(bs.toString('utf8'));
+        });
+        d.on('error', reject);
+      });
     }
-    d.pipe(bs)
-    utils.guessEncoding(input, encoding).pipe(d)
-    return p
+    d.pipe(bs);
+    utils.guessEncoding(input, encoding).pipe(d);
+    return p;
   }
 
   /**
    * @ignore
    */
   _on_error(er) {
-    this.push('ERROR: ')
-    this.push(er.toString())
-    this.push('\n')
+    this.push('ERROR: ');
+    this.push(er.toString());
+    this.push('\n');
   }
 
   /**
    * @ignore
    */
   _on_read(buf) {
-    this.all.write(buf)
-    const hex = buf.toString('hex')
+    this.all.write(buf);
+    const hex = buf.toString('hex');
 
-    this.push(new Array(this.depth + 1).join('  '))
-    this.push(hex)
+    this.push(new Array(this.depth + 1).join('  '));
+    this.push(hex);
 
-    let ind = ((this.max_depth - this.depth) * 2) - hex.length
+    let ind = ((this.max_depth - this.depth) * 2) - hex.length;
     if (ind < 1) {
-      ind = 1
+      ind = 1;
     }
-    this.push(new Array(ind + 1).join(' '))
-    this.push('-- ')
+    this.push(new Array(ind + 1).join(' '));
+    this.push('-- ');
   }
 
   /**
    * @ignore
    */
   _on_more(mt, len, parent_mt, pos) {
-    let desc = ''
+    let desc = '';
 
-    this.depth++
+    this.depth++;
     switch (mt) {
       case MT.POS_INT:
-        desc = 'Positive number,'
-        break
+        desc = 'Positive number,';
+        break;
       case MT.NEG_INT:
-        desc = 'Negative number,'
-        break
+        desc = 'Negative number,';
+        break;
       case MT.ARRAY:
-        desc = 'Array, length'
-        break
+        desc = 'Array, length';
+        break;
       case MT.MAP:
-        desc = 'Map, count'
-        break
+        desc = 'Map, count';
+        break;
       case MT.BYTE_STRING:
-        desc = 'Bytes, length'
-        break
+        desc = 'Bytes, length';
+        break;
       case MT.UTF8_STRING:
-        desc = 'String, length'
-        break
+        desc = 'String, length';
+        break;
       case MT.SIMPLE_FLOAT:
         if (len === 1) {
-          desc = 'Simple value,'
+          desc = 'Simple value,';
         } else {
-          desc = 'Float,'
+          desc = 'Float,';
         }
-        break
+        break;
     }
-    this.push(`${desc} next ${len} byte${plural(len)}\n`)
+    this.push(`${desc} next ${len} byte${plural(len)}\n`);
   }
 
   /**
    * @ignore
    */
   _on_start_string(mt, len, parent_mt, pos) {
-    let desc = ''
+    let desc = '';
 
-    this.depth++
+    this.depth++;
     switch (mt) {
       case MT.BYTE_STRING:
-        desc = `Bytes, length: ${len}`
-        break
+        desc = `Bytes, length: ${len}`;
+        break;
       case MT.UTF8_STRING:
-        desc = `String, length: ${len.toString()}`
-        break
+        desc = `String, length: ${len.toString()}`;
+        break;
     }
-    this.push(`${desc}\n`)
+    this.push(`${desc}\n`);
   }
 
   /**
    * @ignore
    */
   _on_start(mt, tag, parent_mt, pos) {
-    this.depth++
+    this.depth++;
     switch (parent_mt) {
       case MT.ARRAY:
-        this.push(`[${pos}], `)
-        break
+        this.push(`[${pos}], `);
+        break;
       case MT.MAP:
         if (pos % 2) {
-          this.push(`{Val:${Math.floor(pos / 2)}}, `)
+          this.push(`{Val:${Math.floor(pos / 2)}}, `);
         } else {
-          this.push(`{Key:${Math.floor(pos / 2)}}, `)
+          this.push(`{Key:${Math.floor(pos / 2)}}, `);
         }
-        break
+        break;
     }
     switch (mt) {
       case MT.TAG:
-        this.push(`Tag #${tag}`)
+        this.push(`Tag #${tag}`);
         if (tag === 24) {
-          this.push(' Encoded CBOR data item')
+          this.push(' Encoded CBOR data item');
         }
-        break
+        break;
       case MT.ARRAY:
         if (tag === SYMS.STREAM) {
-          this.push('Array (streaming)')
+          this.push('Array (streaming)');
         } else {
-          this.push(`Array, ${tag} item${plural(tag)}`)
+          this.push(`Array, ${tag} item${plural(tag)}`);
         }
-        break
+        break;
       case MT.MAP:
         if (tag === SYMS.STREAM) {
-          this.push('Map (streaming)')
+          this.push('Map (streaming)');
         } else {
-          this.push(`Map, ${tag} pair${plural(tag)}`)
+          this.push(`Map, ${tag} pair${plural(tag)}`);
         }
-        break
+        break;
       case MT.BYTE_STRING:
-        this.push('Bytes (streaming)')
-        break
+        this.push('Bytes (streaming)');
+        break;
       case MT.UTF8_STRING:
-        this.push('String (streaming)')
-        break
+        this.push('String (streaming)');
+        break;
     }
-    this.push('\n')
+    this.push('\n');
   }
 
   /**
    * @ignore
    */
   _on_stop(mt) {
-    this.depth--
+    this.depth--;
   }
 
   /**
@@ -336,29 +336,29 @@ class Commented extends stream.Transform {
     if (val !== SYMS.BREAK) {
       switch (parent_mt) {
         case MT.ARRAY:
-          this.push(`[${pos}], `)
-          break
+          this.push(`[${pos}], `);
+          break;
         case MT.MAP:
           if (pos % 2) {
-            this.push(`{Val:${Math.floor(pos / 2)}}, `)
+            this.push(`{Val:${Math.floor(pos / 2)}}, `);
           } else {
-            this.push(`{Key:${Math.floor(pos / 2)}}, `)
+            this.push(`{Key:${Math.floor(pos / 2)}}, `);
           }
-          break
+          break;
       }
     }
-    const str = utils.cborValueToString(val, -Infinity)
+    const str = utils.cborValueToString(val, -Infinity);
 
     if ((typeof val === 'string') ||
         (Buffer.isBuffer(val))) {
       if (val.length > 0) {
-        this.push(str)
-        this.push('\n')
+        this.push(str);
+        this.push('\n');
       }
-      this.depth--
+      this.depth--;
     } else {
-      this.push(str)
-      this.push('\n')
+      this.push(str);
+      this.push('\n');
     }
 
     switch (ai) {
@@ -366,7 +366,7 @@ class Commented extends stream.Transform {
       case NUMBYTES.TWO:
       case NUMBYTES.FOUR:
       case NUMBYTES.EIGHT:
-        this.depth--
+        this.depth--;
     }
   }
 
@@ -374,10 +374,10 @@ class Commented extends stream.Transform {
    * @ignore
    */
   _on_data() {
-    this.push('0x')
-    this.push(this.all.read().toString('hex'))
-    this.push('\n')
+    this.push('0x');
+    this.push(this.all.read().toString('hex'));
+    this.push('\n');
   }
 }
 
-module.exports = Commented
+module.exports = Commented;
diff --git a/packages/cbor/lib/constants.js b/packages/cbor/lib/constants.js
index 9e536f3e..b13da5b7 100644
--- a/packages/cbor/lib/constants.js
+++ b/packages/cbor/lib/constants.js
@@ -1,4 +1,4 @@
-'use strict'
+'use strict';
 
 /**
  * @enum {number}
@@ -12,7 +12,7 @@ exports.MT = {
   MAP: 5,
   TAG: 6,
   SIMPLE_FLOAT: 7,
-}
+};
 
 /**
  * @enum {number}
@@ -35,7 +35,7 @@ exports.TAG = {
   MIME: 36,
   // https://github.com/input-output-hk/cbor-sets-spec/blob/master/CBOR_SETS.md
   SET: 258,
-}
+};
 
 /**
  * @enum {number}
@@ -47,7 +47,7 @@ exports.NUMBYTES = {
   FOUR: 26,
   EIGHT: 27,
   INDEFINITE: 31,
-}
+};
 
 /**
  * @enum {number}
@@ -57,7 +57,7 @@ exports.SIMPLE = {
   TRUE: 21,
   NULL: 22,
   UNDEFINED: 23,
-}
+};
 
 exports.SYMS = {
   NULL: Symbol.for('github.com/hildjj/node-cbor/null'),
@@ -65,9 +65,9 @@ exports.SYMS = {
   PARENT: Symbol.for('github.com/hildjj/node-cbor/parent'),
   BREAK: Symbol.for('github.com/hildjj/node-cbor/break'),
   STREAM: Symbol.for('github.com/hildjj/node-cbor/stream'),
-}
+};
 
-exports.SHIFT32 = 0x100000000
+exports.SHIFT32 = 0x100000000;
 
 exports.BI = {
   MINUS_ONE: BigInt(-1),
@@ -75,5 +75,5 @@ exports.BI = {
   MAXINT32: BigInt('0xffffffff'),
   MAXINT64: BigInt('0xffffffffffffffff'),
   SHIFT32: BigInt(exports.SHIFT32),
-}
+};
 
diff --git a/packages/cbor/lib/decoder.js b/packages/cbor/lib/decoder.js
index 7d85d2db..c34125de 100644
--- a/packages/cbor/lib/decoder.js
+++ b/packages/cbor/lib/decoder.js
@@ -1,44 +1,43 @@
-'use strict'
-
-const BinaryParseStream = require('../vendor/binary-parse-stream')
-const Tagged = require('./tagged')
-const Simple = require('./simple')
-const utils = require('./utils')
-const NoFilter = require('nofilter')
-const stream = require('stream')
-const constants = require('./constants')
-const {MT, NUMBYTES, SYMS, BI} = constants
-const {Buffer} = require('buffer')
-
-const COUNT = Symbol('count')
-const MAJOR = Symbol('major type')
-const ERROR = Symbol('error')
-const NOT_FOUND = Symbol('not found')
+'use strict';
+
+const BinaryParseStream = require('../vendor/binary-parse-stream');
+const Tagged = require('./tagged');
+const Simple = require('./simple');
+const utils = require('./utils');
+const NoFilter = require('nofilter');
+const constants = require('./constants');
+const {MT, NUMBYTES, SYMS, BI} = constants;
+const {Buffer} = require('node:buffer');
+
+const COUNT = Symbol('count');
+const MAJOR = Symbol('major type');
+const ERROR = Symbol('error');
+const NOT_FOUND = Symbol('not found');
 
 function parentArray(parent, typ, count) {
-  const a = []
+  const a = [];
 
-  a[COUNT] = count
-  a[SYMS.PARENT] = parent
-  a[MAJOR] = typ
-  return a
+  a[COUNT] = count;
+  a[SYMS.PARENT] = parent;
+  a[MAJOR] = typ;
+  return a;
 }
 
 function parentBufferStream(parent, typ) {
-  const b = new NoFilter()
+  const b = new NoFilter();
 
-  b[COUNT] = -1
-  b[SYMS.PARENT] = parent
-  b[MAJOR] = typ
-  return b
+  b[COUNT] = -1;
+  b[SYMS.PARENT] = parent;
+  b[MAJOR] = typ;
+  return b;
 }
 
 class UnexpectedDataError extends Error {
   constructor(byte, value) {
-    super(`Unexpected data: 0x${byte.toString(16)}`)
-    this.name = 'UnexpectedDataError'
-    this.byte = byte
-    this.value = value
+    super(`Unexpected data: 0x${byte.toString(16)}`);
+    this.name = 'UnexpectedDataError';
+    this.byte = byte;
+    this.value = value;
   }
 }
 
@@ -102,13 +101,13 @@ class UnexpectedDataError extends Error {
 function normalizeOptions(opts, cb) {
   switch (typeof opts) {
     case 'function':
-      return {options: {}, cb: /** @type {decodeCallback} */ (opts)}
+      return {options: {}, cb: /** @type {decodeCallback} */ (opts)};
     case 'string':
-      return {options: {encoding: /** @type {BufferEncoding} */ (opts)}, cb}
+      return {options: {encoding: /** @type {BufferEncoding} */ (opts)}, cb};
     case 'object':
-      return {options: opts || {}, cb}
+      return {options: opts || {}, cb};
     default:
-      throw new TypeError('Unknown option type')
+      throw new TypeError('Unknown option type');
   }
 }
 
@@ -137,22 +136,22 @@ class Decoder extends BinaryParseStream {
       extendedResults = false,
       preventDuplicateKeys = false,
       ...superOpts
-    } = options
+    } = options;
 
-    super({defaultEncoding: encoding, ...superOpts})
+    super({defaultEncoding: encoding, ...superOpts});
 
-    this.running = true
-    this.max_depth = max_depth
-    this.tags = tags
-    this.preferMap = preferMap
-    this.preferWeb = preferWeb
-    this.extendedResults = extendedResults
-    this.required = required
-    this.preventDuplicateKeys = preventDuplicateKeys
+    this.running = true;
+    this.max_depth = max_depth;
+    this.tags = tags;
+    this.preferMap = preferMap;
+    this.preferWeb = preferWeb;
+    this.extendedResults = extendedResults;
+    this.required = required;
+    this.preventDuplicateKeys = preventDuplicateKeys;
 
     if (extendedResults) {
-      this.bs.on('read', this._onRead.bind(this))
-      this.valueBytes = /** @type {NoFilter} */ (new NoFilter())
+      this.bs.on('read', this._onRead.bind(this));
+      this.valueBytes = /** @type {NoFilter} */ (new NoFilter());
     }
   }
 
@@ -173,17 +172,17 @@ class Decoder extends BinaryParseStream {
   static nullcheck(val) {
     switch (val) {
       case SYMS.NULL:
-        return null
+        return null;
       case SYMS.UNDEFINED:
-        return undefined
+        return undefined;
       // Leaving this in for now as belt-and-suspenders, but I'm pretty sure
       // it can't happen.
       /* istanbul ignore next */
       case NOT_FOUND:
         /* istanbul ignore next */
-        throw new Error('Value not found')
+        throw new Error('Value not found');
       default:
-        return val
+        return val;
     }
   }
 
@@ -203,45 +202,45 @@ class Decoder extends BinaryParseStream {
    */
   static decodeFirstSync(input, options = {}) {
     if (input == null) {
-      throw new TypeError('input required')
+      throw new TypeError('input required');
     }
-    ({options} = normalizeOptions(options))
-    const {encoding = 'hex', ...opts} = options
-    const c = new Decoder(opts)
-    const s = utils.guessEncoding(input, encoding)
+    ({options} = normalizeOptions(options));
+    const {encoding = 'hex', ...opts} = options;
+    const c = new Decoder(opts);
+    const s = utils.guessEncoding(input, encoding);
 
     // For/of doesn't work when you need to call next() with a value
     // generator created by parser will be "done" after each CBOR entity
     // parser will yield numbers of bytes that it wants
-    const parser = c._parse()
-    let state = parser.next()
+    const parser = c._parse();
+    let state = parser.next();
 
     while (!state.done) {
-      const b = s.read(state.value)
+      const b = s.read(state.value);
 
       if ((b == null) || (b.length !== state.value)) {
-        throw new Error('Insufficient data')
+        throw new Error('Insufficient data');
       }
       if (c.extendedResults) {
-        c.valueBytes.write(b)
+        c.valueBytes.write(b);
       }
-      state = parser.next(b)
+      state = parser.next(b);
     }
 
-    let val = null
+    let val = null;
     if (c.extendedResults) {
-      val = state.value
-      val.unused = s.read()
+      val = state.value;
+      val.unused = s.read();
     } else {
-      val = Decoder.nullcheck(state.value)
+      val = Decoder.nullcheck(state.value);
       if (s.length > 0) {
-        const nextByte = s.read(1)
+        const nextByte = s.read(1);
 
-        s.unshift(nextByte)
-        throw new UnexpectedDataError(nextByte[0], val)
+        s.unshift(nextByte);
+        throw new UnexpectedDataError(nextByte[0], val);
       }
     }
-    return val
+    return val;
   }
 
   /**
@@ -259,32 +258,32 @@ class Decoder extends BinaryParseStream {
    */
   static decodeAllSync(input, options = {}) {
     if (input == null) {
-      throw new TypeError('input required')
+      throw new TypeError('input required');
     }
-    ({options} = normalizeOptions(options))
-    const {encoding = 'hex', ...opts} = options
-    const c = new Decoder(opts)
-    const s = utils.guessEncoding(input, encoding)
-    const res = []
+    ({options} = normalizeOptions(options));
+    const {encoding = 'hex', ...opts} = options;
+    const c = new Decoder(opts);
+    const s = utils.guessEncoding(input, encoding);
+    const res = [];
 
     while (s.length > 0) {
-      const parser = c._parse()
-      let state = parser.next()
+      const parser = c._parse();
+      let state = parser.next();
 
       while (!state.done) {
-        const b = s.read(state.value)
+        const b = s.read(state.value);
 
         if ((b == null) || (b.length !== state.value)) {
-          throw new Error('Insufficient data')
+          throw new Error('Insufficient data');
         }
         if (c.extendedResults) {
-          c.valueBytes.write(b)
+          c.valueBytes.write(b);
         }
-        state = parser.next(b)
+        state = parser.next(b);
       }
-      res.push(Decoder.nullcheck(state.value))
+      res.push(Decoder.nullcheck(state.value));
     }
-    return res
+    return res;
   }
 
   /**
@@ -305,56 +304,56 @@ class Decoder extends BinaryParseStream {
    */
   static decodeFirst(input, options = {}, cb = null) {
     if (input == null) {
-      throw new TypeError('input required')
+      throw new TypeError('input required');
     }
-    ({options, cb} = normalizeOptions(options, cb))
-    const {encoding = 'hex', required = false, ...opts} = options
+    ({options, cb} = normalizeOptions(options, cb));
+    const {encoding = 'hex', required = false, ...opts} = options;
 
-    const c = new Decoder(opts)
-    let v = /** @type {any} */ (NOT_FOUND)
-    const s = utils.guessEncoding(input, encoding)
+    const c = new Decoder(opts);
+    let v = /** @type {any} */ (NOT_FOUND);
+    const s = utils.guessEncoding(input, encoding);
     const p = new Promise((resolve, reject) => {
       c.on('data', val => {
-        v = Decoder.nullcheck(val)
-        c.close()
-      })
+        v = Decoder.nullcheck(val);
+        c.close();
+      });
       c.once('error', er => {
         if (c.extendedResults && (er instanceof UnexpectedDataError)) {
-          v.unused = c.bs.slice()
-          return resolve(v)
+          v.unused = c.bs.slice();
+          return resolve(v);
         }
         if (v !== NOT_FOUND) {
           // Typescript work-around
           // eslint-disable-next-line dot-notation
-          er['value'] = v
+          er['value'] = v;
         }
-        v = ERROR
-        c.close()
-        return reject(er)
-      })
+        v = ERROR;
+        c.close();
+        return reject(er);
+      });
       c.once('end', () => {
         switch (v) {
           case NOT_FOUND:
             if (required) {
-              return reject(new Error('No CBOR found'))
+              return reject(new Error('No CBOR found'));
             }
-            return resolve(v)
+            return resolve(v);
           // Pretty sure this can't happen, but not *certain*.
           /* istanbul ignore next */
           case ERROR:
             /* istanbul ignore next */
-            return undefined
+            return undefined;
           default:
-            return resolve(v)
+            return resolve(v);
         }
-      })
-    })
+      });
+    });
 
     if (typeof cb === 'function') {
-      p.then(val => cb(null, val), cb)
+      p.then(val => cb(null, val), cb);
     }
-    s.pipe(c)
-    return p
+    s.pipe(c);
+    return p;
   }
 
   /**
@@ -379,34 +378,34 @@ class Decoder extends BinaryParseStream {
    */
   static decodeAll(input, options = {}, cb = null) {
     if (input == null) {
-      throw new TypeError('input required')
+      throw new TypeError('input required');
     }
-    ({options, cb} = normalizeOptions(options, cb))
-    const {encoding = 'hex', ...opts} = options
+    ({options, cb} = normalizeOptions(options, cb));
+    const {encoding = 'hex', ...opts} = options;
 
-    const c = new Decoder(opts)
-    const vals = []
+    const c = new Decoder(opts);
+    const vals = [];
 
-    c.on('data', val => vals.push(Decoder.nullcheck(val)))
+    c.on('data', val => vals.push(Decoder.nullcheck(val)));
 
     const p = new Promise((resolve, reject) => {
-      c.on('error', reject)
-      c.on('end', () => resolve(vals))
-    })
+      c.on('error', reject);
+      c.on('end', () => resolve(vals));
+    });
 
     if (typeof cb === 'function') {
-      p.then(v => cb(undefined, v), er => cb(er, undefined))
+      p.then(v => cb(undefined, v), er => cb(er, undefined));
     }
-    utils.guessEncoding(input, encoding).pipe(c)
-    return p
+    utils.guessEncoding(input, encoding).pipe(c);
+    return p;
   }
 
   /**
    * Stop processing.
    */
   close() {
-    this.running = false
-    this.__fresh = true
+    this.running = false;
+    this.__fresh = true;
   }
 
   /**
@@ -415,7 +414,7 @@ class Decoder extends BinaryParseStream {
    * @ignore
    */
   _onRead(data) {
-    this.valueBytes.write(data)
+    this.valueBytes.write(data);
   }
 
   /**
@@ -426,176 +425,178 @@ class Decoder extends BinaryParseStream {
    * @ignore
    */
   *_parse() {
-    let parent = null
-    let depth = 0
-    let val = null
+    let parent = null;
+    let depth = 0;
+    let val = null;
 
     while (true) {
       if ((this.max_depth >= 0) && (depth > this.max_depth)) {
-        throw new Error(`Maximum depth ${this.max_depth} exceeded`)
+        throw new Error(`Maximum depth ${this.max_depth} exceeded`);
       }
 
-      const [octet] = yield 1
+      const [octet] = yield 1;
       if (!this.running) {
-        this.bs.unshift(Buffer.from([octet]))
-        throw new UnexpectedDataError(octet)
+        this.bs.unshift(Buffer.from([octet]));
+        throw new UnexpectedDataError(octet);
       }
-      const mt = octet >> 5
-      const ai = octet & 0x1f
-      const parent_major = (parent == null) ? undefined : parent[MAJOR]
-      const parent_length = (parent == null) ? undefined : parent.length
+      const mt = octet >> 5;
+      const ai = octet & 0x1f;
+      const parent_major = (parent == null) ? undefined : parent[MAJOR];
+      const parent_length = (parent == null) ? undefined : parent.length;
 
       switch (ai) {
         case NUMBYTES.ONE:
-          this.emit('more-bytes', mt, 1, parent_major, parent_length)
-          ;[val] = yield 1
-          break
+          this.emit('more-bytes', mt, 1, parent_major, parent_length);
+          [val] = yield 1;
+          break;
         case NUMBYTES.TWO:
         case NUMBYTES.FOUR:
         case NUMBYTES.EIGHT: {
-          const numbytes = 1 << (ai - 24)
+          const numbytes = 1 << (ai - 24);
 
-          this.emit('more-bytes', mt, numbytes, parent_major, parent_length)
-          const buf = yield numbytes
+          this.emit('more-bytes', mt, numbytes, parent_major, parent_length);
+          const buf = yield numbytes;
           val = (mt === MT.SIMPLE_FLOAT) ?
             buf :
-            utils.parseCBORint(ai, buf)
-          break
+            utils.parseCBORint(ai, buf);
+          break;
         }
         case 28:
         case 29:
         case 30:
-          this.running = false
-          throw new Error(`Additional info not implemented: ${ai}`)
+          this.running = false;
+          throw new Error(`Additional info not implemented: ${ai}`);
         case NUMBYTES.INDEFINITE:
           switch (mt) {
             case MT.POS_INT:
             case MT.NEG_INT:
             case MT.TAG:
-              throw new Error(`Invalid indefinite encoding for MT ${mt}`)
+              throw new Error(`Invalid indefinite encoding for MT ${mt}`);
           }
-          val = -1
-          break
+          val = -1;
+          break;
         default:
-          val = ai
+          val = ai;
       }
       switch (mt) {
         case MT.POS_INT:
           // Val already decoded
-          break
+          break;
         case MT.NEG_INT:
           if (val === Number.MAX_SAFE_INTEGER) {
-            val = BI.NEG_MAX
+            val = BI.NEG_MAX;
           } else {
-            val = (typeof val === 'bigint') ? BI.MINUS_ONE - val : -1 - val
+            val = (typeof val === 'bigint') ? BI.MINUS_ONE - val : -1 - val;
           }
-          break
+          break;
         case MT.BYTE_STRING:
         case MT.UTF8_STRING:
           switch (val) {
             case 0:
-              this.emit('start-string', mt, val, parent_major, parent_length)
+              this.emit('start-string', mt, val, parent_major, parent_length);
               if (mt === MT.UTF8_STRING) {
-                val = ''
+                val = '';
               } else {
-                val = this.preferWeb ? new Uint8Array(0) : Buffer.allocUnsafe(0)
+                val = this.preferWeb ?
+                  new Uint8Array(0) :
+                  Buffer.allocUnsafe(0);
               }
-              break
+              break;
             case -1:
-              this.emit('start', mt, SYMS.STREAM, parent_major, parent_length)
-              parent = parentBufferStream(parent, mt)
-              depth++
-              continue
+              this.emit('start', mt, SYMS.STREAM, parent_major, parent_length);
+              parent = parentBufferStream(parent, mt);
+              depth++;
+              continue;
             default:
-              this.emit('start-string', mt, val, parent_major, parent_length)
-              val = yield val
+              this.emit('start-string', mt, val, parent_major, parent_length);
+              val = yield val;
               if (mt === MT.UTF8_STRING) {
-                val = utils.utf8(val)
+                val = utils.utf8(val);
               } else if (this.preferWeb) {
-                val = new Uint8Array(val.buffer, val.byteOffset, val.length)
+                val = new Uint8Array(val.buffer, val.byteOffset, val.length);
               }
           }
-          break
+          break;
         case MT.ARRAY:
         case MT.MAP:
           switch (val) {
             case 0:
               if (mt === MT.MAP) {
-                val = (this.preferMap) ? new Map() : {}
+                val = (this.preferMap) ? new Map() : {};
               } else {
-                val = []
+                val = [];
               }
-              break
+              break;
             case -1:
-              this.emit('start', mt, SYMS.STREAM, parent_major, parent_length)
-              parent = parentArray(parent, mt, -1)
-              depth++
-              continue
+              this.emit('start', mt, SYMS.STREAM, parent_major, parent_length);
+              parent = parentArray(parent, mt, -1);
+              depth++;
+              continue;
             default:
-              this.emit('start', mt, val, parent_major, parent_length)
-              parent = parentArray(parent, mt, val * (mt - 3))
-              depth++
-              continue
+              this.emit('start', mt, val, parent_major, parent_length);
+              parent = parentArray(parent, mt, val * (mt - 3));
+              depth++;
+              continue;
           }
-          break
+          break;
         case MT.TAG:
-          this.emit('start', mt, val, parent_major, parent_length)
-          parent = parentArray(parent, mt, 1)
-          parent.push(val)
-          depth++
-          continue
+          this.emit('start', mt, val, parent_major, parent_length);
+          parent = parentArray(parent, mt, 1);
+          parent.push(val);
+          depth++;
+          continue;
         case MT.SIMPLE_FLOAT:
           if (typeof val === 'number') {
             if ((ai === NUMBYTES.ONE) && (val < 32)) {
               throw new Error(
                 `Invalid two-byte encoding of simple value ${val}`
-              )
+              );
             }
-            const hasParent = (parent != null)
+            const hasParent = (parent != null);
             val = Simple.decode(
               val,
               hasParent,
               hasParent && (parent[COUNT] < 0)
-            )
+            );
           } else {
-            val = utils.parseCBORfloat(val)
+            val = utils.parseCBORfloat(val);
           }
       }
-      this.emit('value', val, parent_major, parent_length, ai)
-      let again = false
+      this.emit('value', val, parent_major, parent_length, ai);
+      let again = false;
       while (parent != null) {
         if (val === SYMS.BREAK) {
-          parent[COUNT] = 1
+          parent[COUNT] = 1;
         } else if (Array.isArray(parent)) {
-          parent.push(val)
+          parent.push(val);
         } else {
           // Assert: parent instanceof NoFilter
-          const pm = parent[MAJOR]
+          const pm = parent[MAJOR];
 
           if ((pm != null) && (pm !== mt)) {
-            this.running = false
-            throw new Error('Invalid major type in indefinite encoding')
+            this.running = false;
+            throw new Error('Invalid major type in indefinite encoding');
           }
-          parent.write(val)
+          parent.write(val);
         }
 
         if ((--parent[COUNT]) !== 0) {
-          again = true
-          break
+          again = true;
+          break;
         }
-        --depth
-        delete parent[COUNT]
+        --depth;
+        delete parent[COUNT];
 
         if (Array.isArray(parent)) {
           switch (parent[MAJOR]) {
             case MT.ARRAY:
-              val = parent
-              break
+              val = parent;
+              break;
             case MT.MAP: {
-              let allstrings = !this.preferMap
+              let allstrings = !this.preferMap;
 
               if ((parent.length % 2) !== 0) {
-                throw new Error(`Invalid map length: ${parent.length}`)
+                throw new Error(`Invalid map length: ${parent.length}`);
               }
               for (
                 let i = 0, len = parent.length;
@@ -604,35 +605,35 @@ class Decoder extends BinaryParseStream {
               ) {
                 if ((typeof parent[i] !== 'string') ||
                     (parent[i] === '__proto__')) {
-                  allstrings = false
-                  break
+                  allstrings = false;
+                  break;
                 }
               }
               if (allstrings) {
-                val = {}
+                val = {};
                 for (let i = 0, len = parent.length; i < len; i += 2) {
                   if (this.preventDuplicateKeys &&
                     Object.prototype.hasOwnProperty.call(val, parent[i])) {
-                    throw new Error('Duplicate keys in a map')
+                    throw new Error('Duplicate keys in a map');
                   }
-                  val[parent[i]] = parent[i + 1]
+                  val[parent[i]] = parent[i + 1];
                 }
               } else {
-                val = new Map()
+                val = new Map();
                 for (let i = 0, len = parent.length; i < len; i += 2) {
                   if (this.preventDuplicateKeys && val.has(parent[i])) {
-                    throw new Error('Duplicate keys in a map')
+                    throw new Error('Duplicate keys in a map');
                   }
-                  val.set(parent[i], parent[i + 1])
+                  val.set(parent[i], parent[i + 1]);
                 }
               }
-              break
+              break;
             }
             case MT.TAG: {
-              const t = new Tagged(parent[0], parent[1])
+              const t = new Tagged(parent[0], parent[1]);
 
-              val = t.convert(this.tags)
-              break
+              val = t.convert(this.tags);
+              break;
             }
           }
         } else /* istanbul ignore else */ if (parent instanceof NoFilter) {
@@ -640,44 +641,44 @@ class Decoder extends BinaryParseStream {
           // (bytes/string) respectively.
           switch (parent[MAJOR]) {
             case MT.BYTE_STRING:
-              val = parent.slice()
+              val = parent.slice();
               if (this.preferWeb) {
                 val = new Uint8Array(
                   /** @type {Buffer} */ (val).buffer,
                   /** @type {Buffer} */ (val).byteOffset,
                   /** @type {Buffer} */ (val).length
-                )
+                );
               }
-              break
+              break;
             case MT.UTF8_STRING:
-              val = parent.toString('utf-8')
-              break
+              val = parent.toString('utf-8');
+              break;
           }
         }
-        this.emit('stop', parent[MAJOR])
+        this.emit('stop', parent[MAJOR]);
 
-        const old = parent
-        parent = parent[SYMS.PARENT]
-        delete old[SYMS.PARENT]
-        delete old[MAJOR]
+        const old = parent;
+        parent = parent[SYMS.PARENT];
+        delete old[SYMS.PARENT];
+        delete old[MAJOR];
       }
       if (!again) {
         if (this.extendedResults) {
-          const bytes = this.valueBytes.slice()
+          const bytes = this.valueBytes.slice();
           const ret = {
             value: Decoder.nullcheck(val),
             bytes,
             length: bytes.length,
-          }
+          };
 
-          this.valueBytes = new NoFilter()
-          return ret
+          this.valueBytes = new NoFilter();
+          return ret;
         }
-        return val
+        return val;
       }
     }
   }
 }
 
-Decoder.NOT_FOUND = NOT_FOUND
-module.exports = Decoder
+Decoder.NOT_FOUND = NOT_FOUND;
+module.exports = Decoder;
diff --git a/packages/cbor/lib/diagnose.js b/packages/cbor/lib/diagnose.js
index 9b4dcef0..db4d36b4 100644
--- a/packages/cbor/lib/diagnose.js
+++ b/packages/cbor/lib/diagnose.js
@@ -1,10 +1,10 @@
-'use strict'
+'use strict';
 
-const stream = require('stream')
-const Decoder = require('./decoder')
-const utils = require('./utils')
-const NoFilter = require('nofilter')
-const {MT, SYMS} = require('./constants')
+const stream = require('node:stream');
+const Decoder = require('./decoder');
+const utils = require('./utils');
+const NoFilter = require('nofilter');
+const {MT, SYMS} = require('./constants');
 
 /**
  * Things that can act as inputs, from which a NoFilter can be created.
@@ -49,13 +49,13 @@ const {MT, SYMS} = require('./constants')
 function normalizeOptions(opts, cb) {
   switch (typeof opts) {
     case 'function':
-      return {options: {}, cb: /** @type {diagnoseCallback} */ (opts)}
+      return {options: {}, cb: /** @type {diagnoseCallback} */ (opts)};
     case 'string':
-      return {options: {encoding: /** @type {BufferEncoding} */ (opts)}, cb}
+      return {options: {encoding: /** @type {BufferEncoding} */ (opts)}, cb};
     case 'object':
-      return {options: opts || {}, cb}
+      return {options: opts || {}, cb};
     default:
-      throw new TypeError('Unknown option type')
+      throw new TypeError('Unknown option type');
   }
 }
 
@@ -81,28 +81,28 @@ class Diagnose extends stream.Transform {
       encoding,
       // Stream.Transform options
       ...superOpts
-    } = options
+    } = options;
     super({
       ...superOpts,
       readableObjectMode: false,
       writableObjectMode: false,
-    })
+    });
 
-    this.float_bytes = -1
-    this.separator = separator
-    this.stream_errors = stream_errors
+    this.float_bytes = -1;
+    this.separator = separator;
+    this.stream_errors = stream_errors;
     this.parser = new Decoder({
       tags,
       max_depth,
       preferWeb,
       encoding,
-    })
-    this.parser.on('more-bytes', this._on_more.bind(this))
-    this.parser.on('value', this._on_value.bind(this))
-    this.parser.on('start', this._on_start.bind(this))
-    this.parser.on('stop', this._on_stop.bind(this))
-    this.parser.on('data', this._on_data.bind(this))
-    this.parser.on('error', this._on_error.bind(this))
+    });
+    this.parser.on('more-bytes', this._on_more.bind(this));
+    this.parser.on('value', this._on_value.bind(this));
+    this.parser.on('start', this._on_start.bind(this));
+    this.parser.on('stop', this._on_stop.bind(this));
+    this.parser.on('data', this._on_data.bind(this));
+    this.parser.on('error', this._on_error.bind(this));
   }
 
   /**
@@ -114,7 +114,7 @@ class Diagnose extends stream.Transform {
    * @ignore
    */
   _transform(fresh, encoding, cb) {
-    this.parser.write(fresh, encoding, cb)
+    this.parser.write(fresh, encoding, cb);
   }
 
   /**
@@ -127,12 +127,12 @@ class Diagnose extends stream.Transform {
     this.parser._flush(er => {
       if (this.stream_errors) {
         if (er) {
-          this._on_error(er)
+          this._on_error(er);
         }
-        return cb()
+        return cb();
       }
-      return cb(er)
-    })
+      return cb(er);
+    });
   }
 
   /**
@@ -147,26 +147,26 @@ class Diagnose extends stream.Transform {
    */
   static diagnose(input, options = {}, cb = null) {
     if (input == null) {
-      throw new TypeError('input required')
+      throw new TypeError('input required');
     }
-    ({options, cb} = normalizeOptions(options, cb))
-    const {encoding = 'hex', ...opts} = options
+    ({options, cb} = normalizeOptions(options, cb));
+    const {encoding = 'hex', ...opts} = options;
 
-    const bs = new NoFilter()
-    const d = new Diagnose(opts)
-    let p = null
+    const bs = new NoFilter();
+    const d = new Diagnose(opts);
+    let p = null;
     if (typeof cb === 'function') {
-      d.on('end', () => cb(null, bs.toString('utf8')))
-      d.on('error', cb)
+      d.on('end', () => cb(null, bs.toString('utf8')));
+      d.on('error', cb);
     } else {
       p = new Promise((resolve, reject) => {
-        d.on('end', () => resolve(bs.toString('utf8')))
-        d.on('error', reject)
-      })
+        d.on('end', () => resolve(bs.toString('utf8')));
+        d.on('error', reject);
+      });
     }
-    d.pipe(bs)
-    utils.guessEncoding(input, encoding).pipe(d)
-    return p
+    d.pipe(bs);
+    utils.guessEncoding(input, encoding).pipe(d);
+    return p;
   }
 
   /**
@@ -174,9 +174,9 @@ class Diagnose extends stream.Transform {
    */
   _on_error(er) {
     if (this.stream_errors) {
-      this.push(er.toString())
+      this.push(er.toString());
     } else {
-      this.emit('error', er)
+      this.emit('error', er);
     }
   }
 
@@ -187,7 +187,7 @@ class Diagnose extends stream.Transform {
         2: 1,
         4: 2,
         8: 3,
-      }[len]
+      }[len];
     }
   }
 
@@ -198,15 +198,15 @@ class Diagnose extends stream.Transform {
       case MT.UTF8_STRING:
       case MT.ARRAY:
         if (pos > 0) {
-          this.push(', ')
+          this.push(', ');
         }
-        break
+        break;
       case MT.MAP:
         if (pos > 0) {
           if (pos % 2) {
-            this.push(': ')
+            this.push(': ');
           } else {
-            this.push(', ')
+            this.push(', ');
           }
         }
     }
@@ -215,34 +215,34 @@ class Diagnose extends stream.Transform {
   /** @private */
   _on_value(val, parent_mt, pos) {
     if (val === SYMS.BREAK) {
-      return
+      return;
     }
-    this._fore(parent_mt, pos)
-    const fb = this.float_bytes
-    this.float_bytes = -1
-    this.push(utils.cborValueToString(val, fb))
+    this._fore(parent_mt, pos);
+    const fb = this.float_bytes;
+    this.float_bytes = -1;
+    this.push(utils.cborValueToString(val, fb));
   }
 
   /** @private */
   _on_start(mt, tag, parent_mt, pos) {
-    this._fore(parent_mt, pos)
+    this._fore(parent_mt, pos);
     switch (mt) {
       case MT.TAG:
-        this.push(`${tag}(`)
-        break
+        this.push(`${tag}(`);
+        break;
       case MT.ARRAY:
-        this.push('[')
-        break
+        this.push('[');
+        break;
       case MT.MAP:
-        this.push('{')
-        break
+        this.push('{');
+        break;
       case MT.BYTE_STRING:
       case MT.UTF8_STRING:
-        this.push('(')
-        break
+        this.push('(');
+        break;
     }
     if (tag === SYMS.STREAM) {
-      this.push('_ ')
+      this.push('_ ');
     }
   }
 
@@ -250,25 +250,25 @@ class Diagnose extends stream.Transform {
   _on_stop(mt) {
     switch (mt) {
       case MT.TAG:
-        this.push(')')
-        break
+        this.push(')');
+        break;
       case MT.ARRAY:
-        this.push(']')
-        break
+        this.push(']');
+        break;
       case MT.MAP:
-        this.push('}')
-        break
+        this.push('}');
+        break;
       case MT.BYTE_STRING:
       case MT.UTF8_STRING:
-        this.push(')')
-        break
+        this.push(')');
+        break;
     }
   }
 
   /** @private */
   _on_data() {
-    this.push(this.separator)
+    this.push(this.separator);
   }
 }
 
-module.exports = Diagnose
+module.exports = Diagnose;
diff --git a/packages/cbor/lib/encoder.js b/packages/cbor/lib/encoder.js
index 540d0bc7..df2bf750 100644
--- a/packages/cbor/lib/encoder.js
+++ b/packages/cbor/lib/encoder.js
@@ -1,27 +1,27 @@
-'use strict'
+'use strict';
 
-const stream = require('stream')
-const NoFilter = require('nofilter')
-const utils = require('./utils')
-const constants = require('./constants')
+const stream = require('stream');
+const NoFilter = require('nofilter');
+const utils = require('./utils');
+const constants = require('./constants');
 const {
   MT, NUMBYTES, SHIFT32, SIMPLE, SYMS, TAG, BI,
-} = constants
-const {Buffer} = require('buffer')
-
-const HALF = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.TWO
-const FLOAT = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.FOUR
-const DOUBLE = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.EIGHT
-const TRUE = (MT.SIMPLE_FLOAT << 5) | SIMPLE.TRUE
-const FALSE = (MT.SIMPLE_FLOAT << 5) | SIMPLE.FALSE
-const UNDEFINED = (MT.SIMPLE_FLOAT << 5) | SIMPLE.UNDEFINED
-const NULL = (MT.SIMPLE_FLOAT << 5) | SIMPLE.NULL
-
-const BREAK = Buffer.from([0xff])
-const BUF_NAN = Buffer.from('f97e00', 'hex')
-const BUF_INF_NEG = Buffer.from('f9fc00', 'hex')
-const BUF_INF_POS = Buffer.from('f97c00', 'hex')
-const BUF_NEG_ZERO = Buffer.from('f98000', 'hex')
+} = constants;
+const {Buffer} = require('buffer');
+
+const HALF = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.TWO;
+const FLOAT = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.FOUR;
+const DOUBLE = (MT.SIMPLE_FLOAT << 5) | NUMBYTES.EIGHT;
+const TRUE = (MT.SIMPLE_FLOAT << 5) | SIMPLE.TRUE;
+const FALSE = (MT.SIMPLE_FLOAT << 5) | SIMPLE.FALSE;
+const UNDEFINED = (MT.SIMPLE_FLOAT << 5) | SIMPLE.UNDEFINED;
+const NULL = (MT.SIMPLE_FLOAT << 5) | SIMPLE.NULL;
+
+const BREAK = Buffer.from([0xff]);
+const BUF_NAN = Buffer.from('f97e00', 'hex');
+const BUF_INF_NEG = Buffer.from('f9fc00', 'hex');
+const BUF_INF_POS = Buffer.from('f97c00', 'hex');
+const BUF_NEG_ZERO = Buffer.from('f98000', 'hex');
 
 /**
  * Generate the CBOR for a value.  If you are using this, you'll either need
@@ -34,25 +34,23 @@ const BUF_NEG_ZERO = Buffer.from('f98000', 'hex')
  * @returns {boolean} True on success.
  */
 
-/* eslint-disable jsdoc/check-types */
 /**
  * A mapping from tag number to a tag decoding function.
  *
  * @typedef {Object.} SemanticMap
  */
-/* eslint-enable jsdoc/check-types */
 
 /**
  * @type {SemanticMap}
  * @private
  */
-const SEMANTIC_TYPES = {}
+const SEMANTIC_TYPES = {};
 
 /**
  * @type {SemanticMap}
  * @private
  */
-let current_SEMANTIC_TYPES = {}
+let current_SEMANTIC_TYPES = {};
 
 /**
  * @param {string} str String to normalize.
@@ -62,20 +60,20 @@ let current_SEMANTIC_TYPES = {}
  */
 function parseDateType(str) {
   if (!str) {
-    return 'number'
+    return 'number';
   }
   switch (str.toLowerCase()) {
     case 'number':
-      return 'number'
+      return 'number';
     case 'float':
-      return 'float'
+      return 'float';
     case 'int':
     case 'integer':
-      return 'int'
+      return 'int';
     case 'string':
-      return 'string'
+      return 'string';
   }
-  throw new TypeError(`dateType invalid, got "${str}"`)
+  throw new TypeError(`dateType invalid, got "${str}"`);
 }
 
 /**
@@ -149,42 +147,42 @@ class Encoder extends stream.Transform {
       omitUndefinedProperties = false,
       genTypes = [],
       ...superOpts
-    } = options
+    } = options;
 
     super({
       ...superOpts,
       readableObjectMode: false,
       writableObjectMode: true,
-    })
+    });
 
-    this.canonical = canonical
-    this.encodeUndefined = encodeUndefined
-    this.disallowUndefinedKeys = disallowUndefinedKeys
-    this.dateType = parseDateType(dateType)
-    this.collapseBigIntegers = this.canonical ? true : collapseBigIntegers
+    this.canonical = canonical;
+    this.encodeUndefined = encodeUndefined;
+    this.disallowUndefinedKeys = disallowUndefinedKeys;
+    this.dateType = parseDateType(dateType);
+    this.collapseBigIntegers = this.canonical ? true : collapseBigIntegers;
 
     /** @type {WeakSet?} */
-    this.detectLoops = undefined
+    this.detectLoops = undefined;
     if (typeof detectLoops === 'boolean') {
       if (detectLoops) {
-        this.detectLoops = new WeakSet()
+        this.detectLoops = new WeakSet();
       }
     } else if (detectLoops instanceof WeakSet) {
-      this.detectLoops = detectLoops
+      this.detectLoops = detectLoops;
     } else {
-      throw new TypeError('detectLoops must be boolean or WeakSet')
+      throw new TypeError('detectLoops must be boolean or WeakSet');
     }
-    this.omitUndefinedProperties = omitUndefinedProperties
+    this.omitUndefinedProperties = omitUndefinedProperties;
 
-    this.semanticTypes = {...Encoder.SEMANTIC_TYPES}
+    this.semanticTypes = {...Encoder.SEMANTIC_TYPES};
 
     if (Array.isArray(genTypes)) {
       for (let i = 0, len = genTypes.length; i < len; i += 2) {
-        this.addSemanticType(genTypes[i], genTypes[i + 1])
+        this.addSemanticType(genTypes[i], genTypes[i + 1]);
       }
     } else {
       for (const [k, v] of Object.entries(genTypes)) {
-        this.addSemanticType(k, v)
+        this.addSemanticType(k, v);
       }
     }
   }
@@ -198,9 +196,9 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _transform(fresh, encoding, cb) {
-    const ret = this.pushAny(fresh)
+    const ret = this.pushAny(fresh);
     // Old transformers might not return bool.  undefined !== false
-    cb((ret === false) ? new Error('Push Error') : undefined)
+    cb((ret === false) ? new Error('Push Error') : undefined);
   }
 
   /**
@@ -211,7 +209,7 @@ class Encoder extends stream.Transform {
    */
   // eslint-disable-next-line class-methods-use-this
   _flush(cb) {
-    cb()
+    cb();
   }
 
   /**
@@ -220,9 +218,9 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushUInt8(val) {
-    const b = Buffer.allocUnsafe(1)
-    b.writeUInt8(val, 0)
-    return this.push(b)
+    const b = Buffer.allocUnsafe(1);
+    b.writeUInt8(val, 0);
+    return this.push(b);
   }
 
   /**
@@ -231,9 +229,9 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushUInt16BE(val) {
-    const b = Buffer.allocUnsafe(2)
-    b.writeUInt16BE(val, 0)
-    return this.push(b)
+    const b = Buffer.allocUnsafe(2);
+    b.writeUInt16BE(val, 0);
+    return this.push(b);
   }
 
   /**
@@ -242,9 +240,9 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushUInt32BE(val) {
-    const b = Buffer.allocUnsafe(4)
-    b.writeUInt32BE(val, 0)
-    return this.push(b)
+    const b = Buffer.allocUnsafe(4);
+    b.writeUInt32BE(val, 0);
+    return this.push(b);
   }
 
   /**
@@ -253,9 +251,9 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushFloatBE(val) {
-    const b = Buffer.allocUnsafe(4)
-    b.writeFloatBE(val, 0)
-    return this.push(b)
+    const b = Buffer.allocUnsafe(4);
+    b.writeFloatBE(val, 0);
+    return this.push(b);
   }
 
   /**
@@ -264,9 +262,9 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushDoubleBE(val) {
-    const b = Buffer.allocUnsafe(8)
-    b.writeDoubleBE(val, 0)
-    return this.push(b)
+    const b = Buffer.allocUnsafe(8);
+    b.writeDoubleBE(val, 0);
+    return this.push(b);
   }
 
   /**
@@ -274,7 +272,7 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushNaN() {
-    return this.push(BUF_NAN)
+    return this.push(BUF_NAN);
   }
 
   /**
@@ -283,8 +281,8 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushInfinity(obj) {
-    const half = (obj < 0) ? BUF_INF_NEG : BUF_INF_POS
-    return this.push(half)
+    const half = (obj < 0) ? BUF_INF_NEG : BUF_INF_POS;
+    return this.push(half);
   }
 
   /**
@@ -309,18 +307,18 @@ class Encoder extends stream.Transform {
       // rule selects 16-bit float for positive and negative Infinity as well.)
 
       // which seems pretty much backwards to me.
-      const b2 = Buffer.allocUnsafe(2)
+      const b2 = Buffer.allocUnsafe(2);
       if (utils.writeHalf(b2, obj)) {
         // I have convinced myself that there are no cases where writeHalf
         // will return true but `utils.parseHalf(b2) !== obj)`
-        return this._pushUInt8(HALF) && this.push(b2)
+        return this._pushUInt8(HALF) && this.push(b2);
       }
     }
     if (Math.fround(obj) === obj) {
-      return this._pushUInt8(FLOAT) && this._pushFloatBE(obj)
+      return this._pushUInt8(FLOAT) && this._pushFloatBE(obj);
     }
 
-    return this._pushUInt8(DOUBLE) && this._pushDoubleBE(obj)
+    return this._pushUInt8(DOUBLE) && this._pushDoubleBE(obj);
   }
 
   /**
@@ -340,34 +338,34 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushInt(obj, mt, orig) {
-    const m = mt << 5
+    const m = mt << 5;
 
     if (obj < 24) {
-      return this._pushUInt8(m | obj)
+      return this._pushUInt8(m | obj);
     }
     if (obj <= 0xff) {
-      return this._pushUInt8(m | NUMBYTES.ONE) && this._pushUInt8(obj)
+      return this._pushUInt8(m | NUMBYTES.ONE) && this._pushUInt8(obj);
     }
     if (obj <= 0xffff) {
-      return this._pushUInt8(m | NUMBYTES.TWO) && this._pushUInt16BE(obj)
+      return this._pushUInt8(m | NUMBYTES.TWO) && this._pushUInt16BE(obj);
     }
     if (obj <= 0xffffffff) {
-      return this._pushUInt8(m | NUMBYTES.FOUR) && this._pushUInt32BE(obj)
+      return this._pushUInt8(m | NUMBYTES.FOUR) && this._pushUInt32BE(obj);
     }
-    let max = Number.MAX_SAFE_INTEGER
+    let max = Number.MAX_SAFE_INTEGER;
     if (mt === MT.NEG_INT) {
       // Special case for Number.MIN_SAFE_INTEGER - 1
-      max--
+      max--;
     }
     if (obj <= max) {
       return this._pushUInt8(m | NUMBYTES.EIGHT) &&
         this._pushUInt32BE(Math.floor(obj / SHIFT32)) &&
-        this._pushUInt32BE(obj % SHIFT32)
+        this._pushUInt32BE(obj % SHIFT32);
     }
     if (mt === MT.NEG_INT) {
-      return this._pushFloat(orig)
+      return this._pushFloat(orig);
     }
-    return this._pushFloat(obj)
+    return this._pushFloat(obj);
   }
 
   /**
@@ -380,13 +378,13 @@ class Encoder extends stream.Transform {
    */
   _pushIntNum(obj) {
     if (Object.is(obj, -0)) {
-      return this.push(BUF_NEG_ZERO)
+      return this.push(BUF_NEG_ZERO);
     }
 
     if (obj < 0) {
-      return this._pushInt(-obj - 1, MT.NEG_INT, obj)
+      return this._pushInt(-obj - 1, MT.NEG_INT, obj);
     }
-    return this._pushInt(obj, MT.POS_INT)
+    return this._pushInt(obj, MT.POS_INT);
   }
 
   /**
@@ -396,15 +394,15 @@ class Encoder extends stream.Transform {
    */
   _pushNumber(obj) {
     if (isNaN(obj)) {
-      return this._pushNaN()
+      return this._pushNaN();
     }
     if (!isFinite(obj)) {
-      return this._pushInfinity(obj)
+      return this._pushInfinity(obj);
     }
     if (Math.round(obj) === obj) {
-      return this._pushIntNum(obj)
+      return this._pushIntNum(obj);
     }
-    return this._pushFloat(obj)
+    return this._pushFloat(obj);
   }
 
   /**
@@ -413,8 +411,8 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushString(obj) {
-    const len = Buffer.byteLength(obj, 'utf8')
-    return this._pushInt(len, MT.UTF8_STRING) && this.push(obj, 'utf8')
+    const len = Buffer.byteLength(obj, 'utf8');
+    return this._pushInt(len, MT.UTF8_STRING) && this.push(obj, 'utf8');
   }
 
   /**
@@ -423,7 +421,7 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushBoolean(obj) {
-    return this._pushUInt8(obj ? TRUE : FALSE)
+    return this._pushUInt8(obj ? TRUE : FALSE);
   }
 
   /**
@@ -434,17 +432,17 @@ class Encoder extends stream.Transform {
   _pushUndefined(obj) {
     switch (typeof this.encodeUndefined) {
       case 'undefined':
-        return this._pushUInt8(UNDEFINED)
+        return this._pushUInt8(UNDEFINED);
       case 'function':
-        return this.pushAny(this.encodeUndefined(obj))
+        return this.pushAny(this.encodeUndefined(obj));
       case 'object': {
-        const buf = utils.bufferishToBuffer(this.encodeUndefined)
+        const buf = utils.bufferishToBuffer(this.encodeUndefined);
         if (buf) {
-          return this.push(buf)
+          return this.push(buf);
         }
       }
     }
-    return this.pushAny(this.encodeUndefined)
+    return this.pushAny(this.encodeUndefined);
   }
 
   /**
@@ -453,7 +451,7 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushNull(obj) {
-    return this._pushUInt8(NULL)
+    return this._pushUInt8(NULL);
   }
 
   /**
@@ -462,7 +460,7 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushTag(tag) {
-    return this._pushInt(tag, MT.TAG)
+    return this._pushInt(tag, MT.TAG);
   }
 
   /**
@@ -471,32 +469,32 @@ class Encoder extends stream.Transform {
    * @ignore
    */
   _pushJSBigint(obj) {
-    let m = MT.POS_INT
-    let tag = TAG.POS_BIGINT
+    let m = MT.POS_INT;
+    let tag = TAG.POS_BIGINT;
     // BigInt doesn't have -0
     if (obj < 0) {
-      obj = -obj + BI.MINUS_ONE
-      m = MT.NEG_INT
-      tag = TAG.NEG_BIGINT
+      obj = -obj + BI.MINUS_ONE;
+      m = MT.NEG_INT;
+      tag = TAG.NEG_BIGINT;
     }
 
     if (this.collapseBigIntegers &&
         (obj <= BI.MAXINT64)) {
       // Special handiling for 64bits
       if (obj <= 0xffffffff) {
-        return this._pushInt(Number(obj), m)
+        return this._pushInt(Number(obj), m);
       }
       return this._pushUInt8((m << 5) | NUMBYTES.EIGHT) &&
         this._pushUInt32BE(Number(obj / BI.SHIFT32)) &&
-        this._pushUInt32BE(Number(obj % BI.SHIFT32))
+        this._pushUInt32BE(Number(obj % BI.SHIFT32));
     }
 
-    let str = obj.toString(16)
+    let str = obj.toString(16);
     if (str.length % 2) {
-      str = `0${str}`
+      str = `0${str}`;
     }
-    const buf = Buffer.from(str, 'hex')
-    return this._pushTag(tag) && Encoder._pushBuffer(this, buf)
+    const buf = Buffer.from(str, 'hex');
+    return this._pushTag(tag) && Encoder._pushBuffer(this, buf);
   }
 
   /**
@@ -508,41 +506,41 @@ class Encoder extends stream.Transform {
    */
   _pushObject(obj, opts) {
     if (!obj) {
-      return this._pushNull(obj)
+      return this._pushNull(obj);
     }
     opts = {
       indefinite: false,
       skipTypes: false,
       ...opts,
-    }
+    };
     if (!opts.indefinite) {
       // This will only happen the first time through for indefinite encoding
       if (this.detectLoops) {
         if (this.detectLoops.has(obj)) {
           throw new Error(`\
 Loop detected while CBOR encoding.
-Call removeLoopDetectors before resuming.`)
+Call removeLoopDetectors before resuming.`);
         } else {
-          this.detectLoops.add(obj)
+          this.detectLoops.add(obj);
         }
       }
     }
     if (!opts.skipTypes) {
-      const f = obj.encodeCBOR
+      const f = obj.encodeCBOR;
       if (typeof f === 'function') {
-        return f.call(obj, this)
+        return f.call(obj, this);
       }
-      const converter = this.semanticTypes[obj.constructor.name]
+      const converter = this.semanticTypes[obj.constructor.name];
       if (converter) {
-        return converter.call(obj, this, obj)
+        return converter.call(obj, this, obj);
       }
     }
     const keys = Object.keys(obj).filter(k => {
-      const tv = typeof obj[k]
+      const tv = typeof obj[k];
       return (tv !== 'function') &&
-        (!this.omitUndefinedProperties || (tv !== 'undefined'))
-    })
-    const cbor_keys = {}
+        (!this.omitUndefinedProperties || (tv !== 'undefined'));
+    });
+    const cbor_keys = {};
     if (this.canonical) {
       // Note: this can't be a normal sort, because 'b' needs to sort before
       // 'aa'
@@ -550,41 +548,41 @@ Call removeLoopDetectors before resuming.`)
         // Always strings, so don't bother to pass options.
         // hold on to the cbor versions, since there's no need
         // to encode more than once
-        const a_cbor = cbor_keys[a] || (cbor_keys[a] = Encoder.encode(a))
-        const b_cbor = cbor_keys[b] || (cbor_keys[b] = Encoder.encode(b))
+        const a_cbor = cbor_keys[a] || (cbor_keys[a] = Encoder.encode(a));
+        const b_cbor = cbor_keys[b] || (cbor_keys[b] = Encoder.encode(b));
 
-        return a_cbor.compare(b_cbor)
-      })
+        return a_cbor.compare(b_cbor);
+      });
     }
     if (opts.indefinite) {
       if (!this._pushUInt8((MT.MAP << 5) | NUMBYTES.INDEFINITE)) {
-        return false
+        return false;
       }
     } else if (!this._pushInt(keys.length, MT.MAP)) {
-      return false
+      return false;
     }
-    let ck = null
+    let ck = null;
     for (let j = 0, len2 = keys.length; j < len2; j++) {
-      const k = keys[j]
+      const k = keys[j];
       if (this.canonical && ((ck = cbor_keys[k]))) {
         if (!this.push(ck)) { // Already a Buffer
-          return false
+          return false;
         }
       } else if (!this._pushString(k)) {
-        return false
+        return false;
       }
       if (!this.pushAny(obj[k])) {
-        return false
+        return false;
       }
     }
     if (opts.indefinite) {
       if (!this.push(BREAK)) {
-        return false
+        return false;
       }
     } else if (this.detectLoops) {
-      this.detectLoops.delete(obj)
+      this.detectLoops.delete(obj);
     }
-    return true
+    return true;
   }
 
   /**
@@ -593,13 +591,13 @@ Call removeLoopDetectors before resuming.`)
    * @ignore
    */
   _encodeAll(objs) {
-    const bs = new NoFilter({highWaterMark: this.readableHighWaterMark})
-    this.pipe(bs)
+    const bs = new NoFilter({highWaterMark: this.readableHighWaterMark});
+    this.pipe(bs);
     for (const o of objs) {
-      this.pushAny(o)
+      this.pushAny(o);
     }
-    this.end()
-    return bs.read()
+    this.end();
+    return bs.read();
   }
 
   /**
@@ -613,18 +611,18 @@ Call removeLoopDetectors before resuming.`)
    * @throws {TypeError} Invalid function.
    */
   addSemanticType(type, fun) {
-    const typeName = (typeof type === 'string') ? type : type.name
-    const old = this.semanticTypes[typeName]
+    const typeName = (typeof type === 'string') ? type : type.name;
+    const old = this.semanticTypes[typeName];
 
     if (fun) {
       if (typeof fun !== 'function') {
-        throw new TypeError('fun must be of type function')
+        throw new TypeError('fun must be of type function');
       }
-      this.semanticTypes[typeName] = fun
+      this.semanticTypes[typeName] = fun;
     } else if (old) {
-      delete this.semanticTypes[typeName]
+      delete this.semanticTypes[typeName];
     }
-    return old
+    return old;
   }
 
   /**
@@ -637,31 +635,31 @@ Call removeLoopDetectors before resuming.`)
   pushAny(obj) {
     switch (typeof obj) {
       case 'number':
-        return this._pushNumber(obj)
+        return this._pushNumber(obj);
       case 'bigint':
-        return this._pushJSBigint(obj)
+        return this._pushJSBigint(obj);
       case 'string':
-        return this._pushString(obj)
+        return this._pushString(obj);
       case 'boolean':
-        return this._pushBoolean(obj)
+        return this._pushBoolean(obj);
       case 'undefined':
-        return this._pushUndefined(obj)
+        return this._pushUndefined(obj);
       case 'object':
-        return this._pushObject(obj)
+        return this._pushObject(obj);
       case 'symbol':
         switch (obj) {
           case SYMS.NULL:
-            return this._pushNull(null)
+            return this._pushNull(null);
           case SYMS.UNDEFINED:
-            return this._pushUndefined(undefined)
+            return this._pushUndefined(undefined);
           // TODO: Add pluggable support for other symbols
           default:
-            throw new TypeError(`Unknown symbol: ${obj.toString()}`)
+            throw new TypeError(`Unknown symbol: ${obj.toString()}`);
         }
       default:
         throw new TypeError(
           `Unknown type: ${typeof obj}, ${(typeof obj.toString === 'function') ? obj.toString() : ''}`
-        )
+        );
     }
   }
 
@@ -678,26 +676,26 @@ Call removeLoopDetectors before resuming.`)
     opts = {
       indefinite: false,
       ...opts,
-    }
-    const len = obj.length
+    };
+    const len = obj.length;
     if (opts.indefinite) {
       if (!gen._pushUInt8((MT.ARRAY << 5) | NUMBYTES.INDEFINITE)) {
-        return false
+        return false;
       }
     } else if (!gen._pushInt(len, MT.ARRAY)) {
-      return false
+      return false;
     }
     for (let j = 0; j < len; j++) {
       if (!gen.pushAny(obj[j])) {
-        return false
+        return false;
       }
     }
     if (opts.indefinite) {
       if (!gen.push(BREAK)) {
-        return false
+        return false;
       }
     }
-    return true
+    return true;
   }
 
   /**
@@ -707,10 +705,10 @@ Call removeLoopDetectors before resuming.`)
    */
   removeLoopDetectors() {
     if (!this.detectLoops) {
-      return false
+      return false;
     }
-    this.detectLoops = new WeakSet()
-    return true
+    this.detectLoops = new WeakSet();
+    return true;
   }
 
   /**
@@ -723,20 +721,20 @@ Call removeLoopDetectors before resuming.`)
     switch (gen.dateType) {
       case 'string':
         return gen._pushTag(TAG.DATE_STRING) &&
-          gen._pushString(obj.toISOString())
+          gen._pushString(obj.toISOString());
       case 'int':
         return gen._pushTag(TAG.DATE_EPOCH) &&
-          gen._pushIntNum(Math.round(obj.getTime() / 1000))
+          gen._pushIntNum(Math.round(obj.getTime() / 1000));
       case 'float':
         // Force float
         return gen._pushTag(TAG.DATE_EPOCH) &&
-          gen._pushFloat(obj.getTime() / 1000)
+          gen._pushFloat(obj.getTime() / 1000);
       case 'number':
       default:
         // If we happen to have an integral number of seconds,
         // use integer.  Otherwise, use float.
         return gen._pushTag(TAG.DATE_EPOCH) &&
-          gen.pushAny(obj.getTime() / 1000)
+          gen.pushAny(obj.getTime() / 1000);
     }
   }
 
@@ -747,7 +745,7 @@ Call removeLoopDetectors before resuming.`)
    * @ignore
    */
   static _pushBuffer(gen, obj) {
-    return gen._pushInt(obj.length, MT.BYTE_STRING) && gen.push(obj)
+    return gen._pushInt(obj.length, MT.BYTE_STRING) && gen.push(obj);
   }
 
   /**
@@ -757,7 +755,7 @@ Call removeLoopDetectors before resuming.`)
    * @ignore
    */
   static _pushNoFilter(gen, obj) {
-    return Encoder._pushBuffer(gen, /** @type {Buffer} */ (obj.slice()))
+    return Encoder._pushBuffer(gen, /** @type {Buffer} */ (obj.slice()));
   }
 
   /**
@@ -767,7 +765,7 @@ Call removeLoopDetectors before resuming.`)
    * @ignore
    */
   static _pushRegexp(gen, obj) {
-    return gen._pushTag(TAG.REGEXP) && gen.pushAny(obj.source)
+    return gen._pushTag(TAG.REGEXP) && gen.pushAny(obj.source);
   }
 
   /**
@@ -778,17 +776,17 @@ Call removeLoopDetectors before resuming.`)
    */
   static _pushSet(gen, obj) {
     if (!gen._pushTag(TAG.SET)) {
-      return false
+      return false;
     }
     if (!gen._pushInt(obj.size, MT.ARRAY)) {
-      return false
+      return false;
     }
     for (const x of obj) {
       if (!gen.pushAny(x)) {
-        return false
+        return false;
       }
     }
-    return true
+    return true;
   }
 
   /**
@@ -798,7 +796,7 @@ Call removeLoopDetectors before resuming.`)
    * @ignore
    */
   static _pushURL(gen, obj) {
-    return gen._pushTag(TAG.URI) && gen.pushAny(obj.toString())
+    return gen._pushTag(TAG.URI) && gen.pushAny(obj.toString());
   }
 
   /**
@@ -808,7 +806,7 @@ Call removeLoopDetectors before resuming.`)
    * @ignore
    */
   static _pushBoxed(gen, obj) {
-    return gen.pushAny(obj.valueOf())
+    return gen.pushAny(obj.valueOf());
   }
 
   /**
@@ -822,17 +820,17 @@ Call removeLoopDetectors before resuming.`)
     opts = {
       indefinite: false,
       ...opts,
-    }
-    let entries = [...obj.entries()]
+    };
+    let entries = [...obj.entries()];
     if (gen.omitUndefinedProperties) {
-      entries = entries.filter(([k, v]) => v !== undefined)
+      entries = entries.filter(([k, v]) => v !== undefined);
     }
     if (opts.indefinite) {
       if (!gen._pushUInt8((MT.MAP << 5) | NUMBYTES.INDEFINITE)) {
-        return false
+        return false;
       }
     } else if (!gen._pushInt(entries.length, MT.MAP)) {
-      return false
+      return false;
     }
     // Memoizing the cbor only helps in certain cases, and hurts in most
     // others.  Just avoid it.
@@ -846,41 +844,41 @@ Call removeLoopDetectors before resuming.`)
         dateType: gen.dateType,
         disallowUndefinedKeys: gen.disallowUndefinedKeys,
         collapseBigIntegers: gen.collapseBigIntegers,
-      })
-      const bs = new NoFilter({highWaterMark: gen.readableHighWaterMark})
-      enc.pipe(bs)
+      });
+      const bs = new NoFilter({highWaterMark: gen.readableHighWaterMark});
+      enc.pipe(bs);
       entries.sort(([a], [b]) => {
         // Both a and b are the keys
-        enc.pushAny(a)
-        const a_cbor = bs.read()
-        enc.pushAny(b)
-        const b_cbor = bs.read()
-        return a_cbor.compare(b_cbor)
-      })
+        enc.pushAny(a);
+        const a_cbor = bs.read();
+        enc.pushAny(b);
+        const b_cbor = bs.read();
+        return a_cbor.compare(b_cbor);
+      });
       for (const [k, v] of entries) {
         if (gen.disallowUndefinedKeys && (typeof k === 'undefined')) {
-          throw new Error('Invalid Map key: undefined')
+          throw new Error('Invalid Map key: undefined');
         }
         if (!(gen.pushAny(k) && gen.pushAny(v))) {
-          return false
+          return false;
         }
       }
     } else {
       for (const [k, v] of entries) {
         if (gen.disallowUndefinedKeys && (typeof k === 'undefined')) {
-          throw new Error('Invalid Map key: undefined')
+          throw new Error('Invalid Map key: undefined');
         }
         if (!(gen.pushAny(k) && gen.pushAny(v))) {
-          return false
+          return false;
         }
       }
     }
     if (opts.indefinite) {
       if (!gen.push(BREAK)) {
-        return false
+        return false;
       }
     }
-    return true
+    return true;
   }
 
   /**
@@ -892,32 +890,32 @@ Call removeLoopDetectors before resuming.`)
   static _pushTypedArray(gen, obj) {
     // See https://tools.ietf.org/html/rfc8746
 
-    let typ = 0b01000000
-    let sz = obj.BYTES_PER_ELEMENT
-    const {name} = obj.constructor
+    let typ = 0b01000000;
+    let sz = obj.BYTES_PER_ELEMENT;
+    const {name} = obj.constructor;
 
     if (name.startsWith('Float')) {
-      typ |= 0b00010000
-      sz /= 2
+      typ |= 0b00010000;
+      sz /= 2;
     } else if (!name.includes('U')) {
-      typ |= 0b00001000
+      typ |= 0b00001000;
     }
     if (name.includes('Clamped') || ((sz !== 1) && !utils.isBigEndian())) {
-      typ |= 0b00000100
+      typ |= 0b00000100;
     }
     typ |= {
       1: 0b00,
       2: 0b01,
       4: 0b10,
       8: 0b11,
-    }[sz]
+    }[sz];
     if (!gen._pushTag(typ)) {
-      return false
+      return false;
     }
     return Encoder._pushBuffer(
       gen,
       Buffer.from(obj.buffer, obj.byteOffset, obj.byteLength)
-    )
+    );
   }
 
   /**
@@ -927,7 +925,7 @@ Call removeLoopDetectors before resuming.`)
    * @ignore
    */
   static _pushArrayBuffer(gen, obj) {
-    return Encoder._pushBuffer(gen, Buffer.from(obj))
+    return Encoder._pushBuffer(gen, Buffer.from(obj));
   }
 
   /**
@@ -954,55 +952,55 @@ Call removeLoopDetectors before resuming.`)
   static encodeIndefinite(gen, obj, options = {}) {
     if (obj == null) {
       if (this == null) {
-        throw new Error('No object to encode')
+        throw new Error('No object to encode');
       }
-      obj = this
+      obj = this;
     }
 
     // TODO: consider other options
-    const {chunkSize = 4096} = options
+    const {chunkSize = 4096} = options;
 
-    let ret = true
-    const objType = typeof obj
-    let buf = null
+    let ret = true;
+    const objType = typeof obj;
+    let buf = null;
     if (objType === 'string') {
       // TODO: make sure not to split surrogate pairs at the edges of chunks,
       // since such half-surrogates cannot be legally encoded as UTF-8.
-      ret = ret && gen._pushUInt8((MT.UTF8_STRING << 5) | NUMBYTES.INDEFINITE)
-      let offset = 0
+      ret = ret && gen._pushUInt8((MT.UTF8_STRING << 5) | NUMBYTES.INDEFINITE);
+      let offset = 0;
       while (offset < obj.length) {
-        const endIndex = offset + chunkSize
-        ret = ret && gen._pushString(obj.slice(offset, endIndex))
-        offset = endIndex
+        const endIndex = offset + chunkSize;
+        ret = ret && gen._pushString(obj.slice(offset, endIndex));
+        offset = endIndex;
       }
-      ret = ret && gen.push(BREAK)
+      ret = ret && gen.push(BREAK);
     } else if ((buf = utils.bufferishToBuffer(obj))) {
-      ret = ret && gen._pushUInt8((MT.BYTE_STRING << 5) | NUMBYTES.INDEFINITE)
-      let offset = 0
+      ret = ret && gen._pushUInt8((MT.BYTE_STRING << 5) | NUMBYTES.INDEFINITE);
+      let offset = 0;
       while (offset < buf.length) {
-        const endIndex = offset + chunkSize
-        ret = ret && Encoder._pushBuffer(gen, buf.slice(offset, endIndex))
-        offset = endIndex
+        const endIndex = offset + chunkSize;
+        ret = ret && Encoder._pushBuffer(gen, buf.slice(offset, endIndex));
+        offset = endIndex;
       }
-      ret = ret && gen.push(BREAK)
+      ret = ret && gen.push(BREAK);
     } else if (Array.isArray(obj)) {
       ret = ret && Encoder.pushArray(gen, obj, {
         indefinite: true,
-      })
+      });
     } else if (obj instanceof Map) {
       ret = ret && Encoder._pushMap(gen, obj, {
         indefinite: true,
-      })
+      });
     } else {
       if (objType !== 'object') {
-        throw new Error('Invalid indefinite encoding')
+        throw new Error('Invalid indefinite encoding');
       }
       ret = ret && gen._pushObject(obj, {
         indefinite: true,
         skipTypes: true,
-      })
+      });
     }
-    return ret
+    return ret;
   }
 
   /**
@@ -1013,7 +1011,7 @@ Call removeLoopDetectors before resuming.`)
    * @returns {Buffer} The encoded objects.
    */
   static encode(...objs) {
-    return new Encoder()._encodeAll(objs)
+    return new Encoder()._encodeAll(objs);
   }
 
   /**
@@ -1026,7 +1024,7 @@ Call removeLoopDetectors before resuming.`)
   static encodeCanonical(...objs) {
     return new Encoder({
       canonical: true,
-    })._encodeAll(objs)
+    })._encodeAll(objs);
   }
 
   /**
@@ -1038,7 +1036,7 @@ Call removeLoopDetectors before resuming.`)
    * @static
    */
   static encodeOne(obj, options) {
-    return new Encoder(options)._encodeAll([obj])
+    return new Encoder(options)._encodeAll([obj]);
   }
 
   /**
@@ -1054,14 +1052,14 @@ Call removeLoopDetectors before resuming.`)
    */
   static encodeAsync(obj, options) {
     return new Promise((resolve, reject) => {
-      const bufs = []
-      const enc = new Encoder(options)
-      enc.on('data', buf => bufs.push(buf))
-      enc.on('error', reject)
-      enc.on('finish', () => resolve(Buffer.concat(bufs)))
-      enc.pushAny(obj)
-      enc.end()
-    })
+      const bufs = [];
+      const enc = new Encoder(options);
+      enc.on('data', buf => bufs.push(buf));
+      enc.on('error', reject);
+      enc.on('finish', () => resolve(Buffer.concat(bufs)));
+      enc.pushAny(obj);
+      enc.end();
+    });
   }
 
   /**
@@ -1070,11 +1068,11 @@ Call removeLoopDetectors before resuming.`)
    * @type {SemanticMap}
    */
   static get SEMANTIC_TYPES() {
-    return current_SEMANTIC_TYPES
+    return current_SEMANTIC_TYPES;
   }
 
   static set SEMANTIC_TYPES(val) {
-    current_SEMANTIC_TYPES = val
+    current_SEMANTIC_TYPES = val;
   }
 
   /**
@@ -1082,7 +1080,7 @@ Call removeLoopDetectors before resuming.`)
    * plugins modified the list.
    */
   static reset() {
-    Encoder.SEMANTIC_TYPES = {...SEMANTIC_TYPES}
+    Encoder.SEMANTIC_TYPES = {...SEMANTIC_TYPES};
   }
 }
 
@@ -1110,15 +1108,15 @@ Object.assign(SEMANTIC_TYPES, {
   Boolean: Encoder._pushBoxed,
   Number: Encoder._pushBoxed,
   String: Encoder._pushBoxed,
-})
+});
 
 // Safari needs to get better.
 if (typeof BigUint64Array !== 'undefined') {
-  SEMANTIC_TYPES[BigUint64Array.name] = Encoder._pushTypedArray
+  SEMANTIC_TYPES[BigUint64Array.name] = Encoder._pushTypedArray;
 }
 if (typeof BigInt64Array !== 'undefined') {
-  SEMANTIC_TYPES[BigInt64Array.name] = Encoder._pushTypedArray
+  SEMANTIC_TYPES[BigInt64Array.name] = Encoder._pushTypedArray;
 }
 
-Encoder.reset()
-module.exports = Encoder
+Encoder.reset();
+module.exports = Encoder;
diff --git a/packages/cbor/lib/map.js b/packages/cbor/lib/map.js
index 945e2f97..55571c1c 100644
--- a/packages/cbor/lib/map.js
+++ b/packages/cbor/lib/map.js
@@ -1,9 +1,9 @@
-'use strict'
+'use strict';
 
-const {Buffer} = require('buffer')
-const encoder = require('./encoder')
-const decoder = require('./decoder')
-const {MT} = require('./constants')
+const {Buffer} = require('buffer');
+const encoder = require('./encoder');
+const decoder = require('./decoder');
+const {MT} = require('./constants');
 
 /**
  * Wrapper around a JavaScript Map object that allows the keys to be
@@ -26,21 +26,21 @@ class CborMap extends Map {
    *   to the new CborMap; null values are treated as undefined.
    */
   constructor(iterable) {
-    super(iterable)
+    super(iterable);
   }
 
   /**
    * @ignore
    */
   static _encode(key) {
-    return encoder.encodeCanonical(key).toString('base64')
+    return encoder.encodeCanonical(key).toString('base64');
   }
 
   /**
    * @ignore
    */
   static _decode(key) {
-    return decoder.decodeFirstSync(key, 'base64')
+    return decoder.decodeFirstSync(key, 'base64');
   }
 
   /**
@@ -52,7 +52,7 @@ class CborMap extends Map {
    * @returns {any} The element if it exists, or undefined.
    */
   get(key) {
-    return super.get(CborMap._encode(key))
+    return super.get(CborMap._encode(key));
   }
 
   /**
@@ -65,7 +65,7 @@ class CborMap extends Map {
    * @returns {this} This object.
    */
   set(key, val) {
-    return super.set(CborMap._encode(key), val)
+    return super.set(CborMap._encode(key), val);
   }
 
   /**
@@ -77,7 +77,7 @@ class CborMap extends Map {
    *   been removed, or false if the element does not exist.
    */
   delete(key) {
-    return super.delete(CborMap._encode(key))
+    return super.delete(CborMap._encode(key));
   }
 
   /**
@@ -90,7 +90,7 @@ class CborMap extends Map {
    *   the Map object; otherwise false.
    */
   has(key) {
-    return super.has(CborMap._encode(key))
+    return super.has(CborMap._encode(key));
   }
 
   /**
@@ -102,7 +102,7 @@ class CborMap extends Map {
    */
   *keys() {
     for (const k of super.keys()) {
-      yield CborMap._decode(k)
+      yield CborMap._decode(k);
     }
   }
 
@@ -115,7 +115,7 @@ class CborMap extends Map {
    */
   *entries() {
     for (const kv of super.entries()) {
-      yield [CborMap._decode(kv[0]), kv[1]]
+      yield [CborMap._decode(kv[0]), kv[1]];
     }
   }
 
@@ -126,7 +126,7 @@ class CborMap extends Map {
    * @returns {IterableIterator} Key value pairs.
    */
   [Symbol.iterator]() {
-    return this.entries()
+    return this.entries();
   }
 
   /**
@@ -140,10 +140,10 @@ class CborMap extends Map {
    */
   forEach(fun, thisArg) {
     if (typeof fun !== 'function') {
-      throw new TypeError('Must be function')
+      throw new TypeError('Must be function');
     }
     for (const kv of super.entries()) {
-      fun.call(this, kv[1], CborMap._decode(kv[0]), this)
+      fun.call(this, kv[1], CborMap._decode(kv[0]), this);
     }
   }
 
@@ -155,26 +155,26 @@ class CborMap extends Map {
    */
   encodeCBOR(gen) {
     if (!gen._pushInt(this.size, MT.MAP)) {
-      return false
+      return false;
     }
     if (gen.canonical) {
       const entries = Array.from(super.entries())
-        .map(kv => [Buffer.from(kv[0], 'base64'), kv[1]])
-      entries.sort((a, b) => a[0].compare(b[0]))
+        .map(kv => [Buffer.from(kv[0], 'base64'), kv[1]]);
+      entries.sort((a, b) => a[0].compare(b[0]));
       for (const kv of entries) {
         if (!(gen.push(kv[0]) && gen.pushAny(kv[1]))) {
-          return false
+          return false;
         }
       }
     } else {
       for (const kv of super.entries()) {
         if (!(gen.push(Buffer.from(kv[0], 'base64')) && gen.pushAny(kv[1]))) {
-          return false
+          return false;
         }
       }
     }
-    return true
+    return true;
   }
 }
 
-module.exports = CborMap
+module.exports = CborMap;
diff --git a/packages/cbor/lib/objectRecorder.js b/packages/cbor/lib/objectRecorder.js
index 34065e05..d5b676f6 100644
--- a/packages/cbor/lib/objectRecorder.js
+++ b/packages/cbor/lib/objectRecorder.js
@@ -1,4 +1,4 @@
-'use strict'
+'use strict';
 
 /**
  * Record objects that pass by in a stream.  If the same object is used more
@@ -8,23 +8,23 @@
  */
 class ObjectRecorder {
   constructor() {
-    this.clear()
+    this.clear();
   }
 
   /**
    * Clear all of the objects that have been seen.  Revert to recording mode.
    */
   clear() {
-    this.map = new WeakMap()
-    this.count = 0
-    this.recording = true
+    this.map = new WeakMap();
+    this.count = 0;
+    this.recording = true;
   }
 
   /**
    * Stop recording.
    */
   stop() {
-    this.recording = false
+    this.recording = false;
   }
 
   /**
@@ -39,33 +39,33 @@ class ObjectRecorder {
    * @throws {Error} Recording does not match playback.
    */
   check(obj) {
-    const val = this.map.get(obj)
+    const val = this.map.get(obj);
     if (val) {
       if (val.length > 1) {
         if (val[0] || this.recording) {
-          return val[1]
+          return val[1];
         }
 
-        val[0] = true
-        return ObjectRecorder.FIRST
+        val[0] = true;
+        return ObjectRecorder.FIRST;
       }
       if (!this.recording) {
-        return ObjectRecorder.NEVER
+        return ObjectRecorder.NEVER;
       }
-      val.push(this.count++)
+      val.push(this.count++);
       // Second use while recording
-      return val[1]
+      return val[1];
     }
     if (!this.recording) {
-      throw new Error('New object detected when not recording')
+      throw new Error('New object detected when not recording');
     }
-    this.map.set(obj, [false])
+    this.map.set(obj, [false]);
     // First use while recording
-    return ObjectRecorder.NEVER
+    return ObjectRecorder.NEVER;
   }
 }
 
-ObjectRecorder.NEVER = -1
-ObjectRecorder.FIRST = -2
+ObjectRecorder.NEVER = -1;
+ObjectRecorder.FIRST = -2;
 
-module.exports = ObjectRecorder
+module.exports = ObjectRecorder;
diff --git a/packages/cbor/lib/sharedValueEncoder.js b/packages/cbor/lib/sharedValueEncoder.js
index 2039b1a4..f9e744b6 100644
--- a/packages/cbor/lib/sharedValueEncoder.js
+++ b/packages/cbor/lib/sharedValueEncoder.js
@@ -1,8 +1,8 @@
-'use strict'
+'use strict';
 
-const Encoder = require('./encoder')
-const ObjectRecorder = require('./objectRecorder')
-const {Buffer} = require('buffer')
+const Encoder = require('./encoder');
+const ObjectRecorder = require('./objectRecorder');
+const {Buffer} = require('buffer');
 
 /**
  * Implement value sharing.
@@ -11,8 +11,8 @@ const {Buffer} = require('buffer')
  */
 class SharedValueEncoder extends Encoder {
   constructor(opts) {
-    super(opts)
-    this.valueSharing = new ObjectRecorder()
+    super(opts);
+    this.valueSharing = new ObjectRecorder();
   }
 
   /**
@@ -25,27 +25,27 @@ class SharedValueEncoder extends Encoder {
    */
   _pushObject(obj, opts) {
     if (obj !== null) {
-      const shared = this.valueSharing.check(obj)
+      const shared = this.valueSharing.check(obj);
       switch (shared) {
         case ObjectRecorder.FIRST:
           // Prefix with tag 28
-          this._pushTag(28)
-          break
+          this._pushTag(28);
+          break;
         case ObjectRecorder.NEVER:
           // Do nothing
-          break
+          break;
         default:
-          return this._pushTag(29) && this._pushIntNum(shared)
+          return this._pushTag(29) && this._pushIntNum(shared);
       }
     }
-    return super._pushObject(obj, opts)
+    return super._pushObject(obj, opts);
   }
 
   /**
    * Between encoding runs, stop recording, and start outputing correct tags.
    */
   stopRecording() {
-    this.valueSharing.stop()
+    this.valueSharing.stop();
   }
 
   /**
@@ -53,7 +53,7 @@ class SharedValueEncoder extends Encoder {
    * pairs.
    */
   clearRecording() {
-    this.valueSharing.clear()
+    this.valueSharing.clear();
   }
 
   /**
@@ -64,19 +64,18 @@ class SharedValueEncoder extends Encoder {
    * @returns {Buffer} The encoded objects.
    */
   static encode(...objs) {
-    const enc = new SharedValueEncoder()
+    const enc = new SharedValueEncoder();
     // eslint-disable-next-line no-empty-function
-    enc.on('data', () => {}) // Sink all writes
+    enc.on('data', () => {}); // Sink all writes
 
     for (const o of objs) {
-      enc.pushAny(o)
+      enc.pushAny(o);
     }
-    enc.stopRecording()
-    enc.removeAllListeners('data')
-    return enc._encodeAll(objs)
+    enc.stopRecording();
+    enc.removeAllListeners('data');
+    return enc._encodeAll(objs);
   }
 
-  // eslint-disable-next-line jsdoc/require-returns-check
   /**
    * Encode one or more JavaScript objects canonically (slower!), and return
    * a Buffer containing the CBOR bytes.
@@ -86,7 +85,7 @@ class SharedValueEncoder extends Encoder {
    * @throws {Error} Always.  This combination doesn't work at the moment.
    */
   static encodeCanonical(...objs) {
-    throw new Error('Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.')
+    throw new Error('Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.');
   }
 
   /**
@@ -99,13 +98,13 @@ class SharedValueEncoder extends Encoder {
    * @static
    */
   static encodeOne(obj, options) {
-    const enc = new SharedValueEncoder(options)
+    const enc = new SharedValueEncoder(options);
     // eslint-disable-next-line no-empty-function
-    enc.on('data', () => {}) // Sink all writes
-    enc.pushAny(obj)
-    enc.stopRecording()
-    enc.removeAllListeners('data')
-    return enc._encodeAll([obj])
+    enc.on('data', () => {}); // Sink all writes
+    enc.pushAny(obj);
+    enc.stopRecording();
+    enc.removeAllListeners('data');
+    return enc._encodeAll([obj]);
   }
 
   /**
@@ -123,20 +122,20 @@ class SharedValueEncoder extends Encoder {
   static encodeAsync(obj, options) {
     return new Promise((resolve, reject) => {
       /** @type {Buffer[]} */
-      const bufs = []
-      const enc = new SharedValueEncoder(options)
+      const bufs = [];
+      const enc = new SharedValueEncoder(options);
       // eslint-disable-next-line no-empty-function
-      enc.on('data', () => {})
-      enc.on('error', reject)
-      enc.on('finish', () => resolve(Buffer.concat(bufs)))
-      enc.pushAny(obj)
-      enc.stopRecording()
-      enc.removeAllListeners('data')
-      enc.on('data', buf => bufs.push(buf))
-      enc.pushAny(obj)
-      enc.end()
-    })
+      enc.on('data', () => {});
+      enc.on('error', reject);
+      enc.on('finish', () => resolve(Buffer.concat(bufs)));
+      enc.pushAny(obj);
+      enc.stopRecording();
+      enc.removeAllListeners('data');
+      enc.on('data', buf => bufs.push(buf));
+      enc.pushAny(obj);
+      enc.end();
+    });
   }
 }
 
-module.exports = SharedValueEncoder
+module.exports = SharedValueEncoder;
diff --git a/packages/cbor/lib/simple.js b/packages/cbor/lib/simple.js
index 469fdd30..16cd7621 100644
--- a/packages/cbor/lib/simple.js
+++ b/packages/cbor/lib/simple.js
@@ -1,6 +1,6 @@
-'use strict'
+'use strict';
 
-const {MT, SIMPLE, SYMS} = require('./constants')
+const {MT, SIMPLE, SYMS} = require('./constants');
 
 /**
  * A CBOR Simple Value that does not map onto a known constant.
@@ -13,12 +13,12 @@ class Simple {
    */
   constructor(value) {
     if (typeof value !== 'number') {
-      throw new Error(`Invalid Simple type: ${typeof value}`)
+      throw new Error(`Invalid Simple type: ${typeof value}`);
     }
     if ((value < 0) || (value > 255) || ((value | 0) !== value)) {
-      throw new Error(`value must be a small positive integer: ${value}`)
+      throw new Error(`value must be a small positive integer: ${value}`);
     }
-    this.value = value
+    this.value = value;
   }
 
   /**
@@ -27,7 +27,7 @@ class Simple {
    * @returns {string} Formated string of `simple(value)`.
    */
   toString() {
-    return `simple(${this.value})`
+    return `simple(${this.value})`;
   }
 
   /**
@@ -38,7 +38,7 @@ class Simple {
    * @returns {string} Formatted string of `simple(value)`.
    */
   [Symbol.for('nodejs.util.inspect.custom')](depth, opts) {
-    return `simple(${this.value})`
+    return `simple(${this.value})`;
   }
 
   /**
@@ -48,7 +48,7 @@ class Simple {
    * @returns {boolean} True on success.
    */
   encodeCBOR(gen) {
-    return gen._pushInt(this.value, MT.SIMPLE_FLOAT)
+    return gen._pushInt(this.value, MT.SIMPLE_FLOAT);
   }
 
   /**
@@ -58,7 +58,7 @@ class Simple {
    * @returns {boolean} Is it Simple?
    */
   static isSimple(obj) {
-    return obj instanceof Simple
+    return obj instanceof Simple;
   }
 
   /**
@@ -77,28 +77,28 @@ class Simple {
   static decode(val, has_parent = true, parent_indefinite = false) {
     switch (val) {
       case SIMPLE.FALSE:
-        return false
+        return false;
       case SIMPLE.TRUE:
-        return true
+        return true;
       case SIMPLE.NULL:
         if (has_parent) {
-          return null
+          return null;
         }
-        return SYMS.NULL
+        return SYMS.NULL;
       case SIMPLE.UNDEFINED:
         if (has_parent) {
-          return undefined
+          return undefined;
         }
-        return SYMS.UNDEFINED
+        return SYMS.UNDEFINED;
       case -1:
         if (!has_parent || !parent_indefinite) {
-          throw new Error('Invalid BREAK')
+          throw new Error('Invalid BREAK');
         }
-        return SYMS.BREAK
+        return SYMS.BREAK;
       default:
-        return new Simple(val)
+        return new Simple(val);
     }
   }
 }
 
-module.exports = Simple
+module.exports = Simple;
diff --git a/packages/cbor/lib/tagged.js b/packages/cbor/lib/tagged.js
index 572f0627..38ecdf4d 100644
--- a/packages/cbor/lib/tagged.js
+++ b/packages/cbor/lib/tagged.js
@@ -1,8 +1,8 @@
-'use strict'
+'use strict';
 
-const constants = require('./constants')
-const utils = require('./utils')
-const INTERNAL_JSON = Symbol('INTERNAL_JSON')
+const constants = require('./constants');
+const utils = require('./utils');
+const INTERNAL_JSON = Symbol('INTERNAL_JSON');
 
 function setBuffersToJSON(obj, fn) {
   // The data item tagged can be a byte string or any other data item.  In the
@@ -10,10 +10,10 @@ function setBuffersToJSON(obj, fn) {
   // contained in the data item, except for those contained in a nested data
   // item tagged with an expected conversion.
   if (utils.isBufferish(obj)) {
-    obj.toJSON = fn
+    obj.toJSON = fn;
   } else if (Array.isArray(obj)) {
     for (const v of obj) {
-      setBuffersToJSON(v, fn)
+      setBuffersToJSON(v, fn);
     }
   } else if (obj && (typeof obj === 'object')) {
     // FFS, complexity in the protocol.
@@ -22,7 +22,7 @@ function setBuffersToJSON(obj, fn) {
     // eslint-disable-next-line no-use-before-define
     if (!(obj instanceof Tagged) || (obj.tag < 21) || (obj.tag > 23)) {
       for (const v of Object.values(obj)) {
-        setBuffersToJSON(v, fn)
+        setBuffersToJSON(v, fn);
       }
     }
   }
@@ -30,30 +30,30 @@ function setBuffersToJSON(obj, fn) {
 
 function b64this() {
   // eslint-disable-next-line no-invalid-this
-  return utils.base64(this)
+  return utils.base64(this);
 }
 
 function b64urlThis() {
   // eslint-disable-next-line no-invalid-this
-  return utils.base64url(this)
+  return utils.base64url(this);
 }
 
 function hexThis() {
   // eslint-disable-next-line no-invalid-this
-  return this.toString('hex')
+  return this.toString('hex');
 }
 
 function swapEndian(ab, size, byteOffset, byteLength) {
-  const dv = new DataView(ab)
+  const dv = new DataView(ab);
   const [getter, setter] = {
     2: [dv.getUint16, dv.setUint16],
     4: [dv.getUint32, dv.setUint32],
     8: [dv.getBigUint64, dv.setBigUint64],
-  }[size]
+  }[size];
 
-  const end = byteOffset + byteLength
+  const end = byteOffset + byteLength;
   for (let offset = byteOffset; offset < end; offset += size) {
-    setter.call(dv, offset, getter.call(dv, offset, true))
+    setter.call(dv, offset, getter.call(dv, offset, true));
   }
 }
 
@@ -69,13 +69,11 @@ function swapEndian(ab, size, byteOffset, byteLength) {
  * @returns {any} The transformed value.
  */
 
-/* eslint-disable jsdoc/check-types */
 /**
  * A mapping from tag number to a tag decoding function.
  *
  * @typedef {Object.} TagMap
  */
-/* eslint-enable jsdoc/check-types */
 
 /**
  * @type {TagMap}
@@ -93,29 +91,29 @@ const TAGS = {
   // Expected conversion to base64url encoding; see Section 3.4.5.2
   21: (v, tag) => {
     if (utils.isBufferish(v)) {
-      tag[INTERNAL_JSON] = b64urlThis
+      tag[INTERNAL_JSON] = b64urlThis;
     } else {
-      setBuffersToJSON(v, b64urlThis)
+      setBuffersToJSON(v, b64urlThis);
     }
-    return tag
+    return tag;
   },
   // Expected conversion to base64 encoding; see Section 3.4.5.2
   22: (v, tag) => {
     if (utils.isBufferish(v)) {
-      tag[INTERNAL_JSON] = b64this
+      tag[INTERNAL_JSON] = b64this;
     } else {
-      setBuffersToJSON(v, b64this)
+      setBuffersToJSON(v, b64this);
     }
-    return tag
+    return tag;
   },
   // Expected conversion to base16 encoding; see Section Section 3.4.5.2
   23: (v, tag) => {
     if (utils.isBufferish(v)) {
-      tag[INTERNAL_JSON] = hexThis
+      tag[INTERNAL_JSON] = hexThis;
     } else {
-      setBuffersToJSON(v, hexThis)
+      setBuffersToJSON(v, hexThis);
     }
-    return tag
+    return tag;
   },
   // URI; see Section 3.4.5.3
   32: v => new URL(v),
@@ -127,22 +125,22 @@ const TAGS = {
     //    alphabet is defined by Section 5 of [RFC4648] for tag number 33
     //    and Section 4 of [RFC4648] for tag number 34), or
     if (!v.match(/^[a-zA-Z0-9_-]+$/)) {
-      throw new Error('Invalid base64url characters')
+      throw new Error('Invalid base64url characters');
     }
-    const last = v.length % 4
+    const last = v.length % 4;
     if (last === 1) {
-      throw new Error('Invalid base64url length')
+      throw new Error('Invalid base64url length');
     }
     // -  the padding bits in a 2- or 3-character block are not 0, or
     if (last === 2) {
       // The last 4 bits of the last character need to be zero.
       if ('AQgw'.indexOf(v[v.length - 1]) === -1) {
-        throw new Error('Invalid base64 padding')
+        throw new Error('Invalid base64 padding');
       }
     } else if (last === 3) {
       // The last 2 bits of the last character need to be zero.
       if ('AEIMQUYcgkosw048'.indexOf(v[v.length - 1]) === -1) {
-        throw new Error('Invalid base64 padding')
+        throw new Error('Invalid base64 padding');
       }
     }
 
@@ -151,7 +149,7 @@ const TAGS = {
     // (caught above)
 
     // the string is invalid.
-    return tag
+    return tag;
   },
   // Base64; see Section 3.4.5.3
   34: (v, tag) => {
@@ -160,36 +158,36 @@ const TAGS = {
     //    only 1 alphabet character in the last block of 4 (where
     //    alphabet is defined by Section 5 of [RFC4648] for tag number 33
     //    and Section 4 of [RFC4648] for tag number 34), or
-    const m = v.match(/^[a-zA-Z0-9+/]+(?={0,2})$/)
+    const m = v.match(/^[a-zA-Z0-9+/]+(?={0,2})$/);
     if (!m) {
-      throw new Error('Invalid base64 characters')
+      throw new Error('Invalid base64 characters');
     }
     if ((v.length % 4) !== 0) {
-      throw new Error('Invalid base64 length')
+      throw new Error('Invalid base64 length');
     }
     // -  the padding bits in a 2- or 3-character block are not 0, or
     if (m.groups.padding === '=') {
       // The last 4 bits of the last character need to be zero.
       if ('AQgw'.indexOf(v[v.length - 2]) === -1) {
-        throw new Error('Invalid base64 padding')
+        throw new Error('Invalid base64 padding');
       }
     } else if (m.groups.padding === '==') {
       // The last 2 bits of the last character need to be zero.
       if ('AEIMQUYcgkosw048'.indexOf(v[v.length - 3]) === -1) {
-        throw new Error('Invalid base64 padding')
+        throw new Error('Invalid base64 padding');
       }
     }
 
     // -  the base64 encoding has the wrong number of padding characters,
     // (caught above)
     // the string is invalid.
-    return tag
+    return tag;
   },
   // Regular expression; see Section 2.4.4.3
   35: v => new RegExp(v),
   // https://github.com/input-output-hk/cbor-sets-spec/blob/master/CBOR_SETS.md
   258: v => new Set(v),
-}
+};
 
 const TYPED_ARRAY_TAGS = {
   64: Uint8Array,
@@ -216,49 +214,49 @@ const TYPED_ARRAY_TAGS = {
   85: Float32Array,
   86: Float64Array,
   // 87: not implemented, float128 array
-}
+};
 
 // Safari
 if (typeof BigUint64Array !== 'undefined') {
-  TYPED_ARRAY_TAGS[67] = BigUint64Array
-  TYPED_ARRAY_TAGS[71] = BigUint64Array
+  TYPED_ARRAY_TAGS[67] = BigUint64Array;
+  TYPED_ARRAY_TAGS[71] = BigUint64Array;
 }
 if (typeof BigInt64Array !== 'undefined') {
-  TYPED_ARRAY_TAGS[75] = BigInt64Array
-  TYPED_ARRAY_TAGS[79] = BigInt64Array
+  TYPED_ARRAY_TAGS[75] = BigInt64Array;
+  TYPED_ARRAY_TAGS[79] = BigInt64Array;
 }
 
 function _toTypedArray(val, tagged) {
   if (!utils.isBufferish(val)) {
-    throw new TypeError('val not a buffer')
+    throw new TypeError('val not a buffer');
   }
-  const {tag} = tagged
+  const {tag} = tagged;
   // See https://tools.ietf.org/html/rfc8746
-  const TypedClass = TYPED_ARRAY_TAGS[tag]
+  const TypedClass = TYPED_ARRAY_TAGS[tag];
   if (!TypedClass) {
-    throw new Error(`Invalid typed array tag: ${tag}`)
+    throw new Error(`Invalid typed array tag: ${tag}`);
   }
-  const little = tag & 0b00000100
-  const float = (tag & 0b00010000) >> 4
-  const sz = 2 ** (float + (tag & 0b00000011))
+  const little = tag & 0b00000100;
+  const float = (tag & 0b00010000) >> 4;
+  const sz = 2 ** (float + (tag & 0b00000011));
 
   if ((!little !== utils.isBigEndian()) && (sz > 1)) {
-    swapEndian(val.buffer, sz, val.byteOffset, val.byteLength)
+    swapEndian(val.buffer, sz, val.byteOffset, val.byteLength);
   }
 
-  const ab = val.buffer.slice(val.byteOffset, val.byteOffset + val.byteLength)
-  return new TypedClass(ab)
+  const ab = val.buffer.slice(val.byteOffset, val.byteOffset + val.byteLength);
+  return new TypedClass(ab);
 }
 
 for (const n of Object.keys(TYPED_ARRAY_TAGS)) {
-  TAGS[n] = _toTypedArray
+  TAGS[n] = _toTypedArray;
 }
 
 /**
  * @type {TagMap}
  * @private
  */
-let current_TAGS = {}
+let current_TAGS = {};
 
 /**
  * A CBOR tagged item, where the tag does not have semantics specified at the
@@ -274,29 +272,29 @@ class Tagged {
    * @param {Error} [err] The error that was thrown parsing the tag, or null.
    */
   constructor(tag, value, err) {
-    this.tag = tag
-    this.value = value
-    this.err = err
+    this.tag = tag;
+    this.value = value;
+    this.err = err;
     if (typeof this.tag !== 'number') {
-      throw new Error(`Invalid tag type (${typeof this.tag})`)
+      throw new Error(`Invalid tag type (${typeof this.tag})`);
     }
     if ((this.tag < 0) || ((this.tag | 0) !== this.tag)) {
-      throw new Error(`Tag must be a positive integer: ${this.tag}`)
+      throw new Error(`Tag must be a positive integer: ${this.tag}`);
     }
   }
 
   toJSON() {
     if (this[INTERNAL_JSON]) {
-      return this[INTERNAL_JSON].call(this.value)
+      return this[INTERNAL_JSON].call(this.value);
     }
     const ret = {
       tag: this.tag,
       value: this.value,
-    }
+    };
     if (this.err) {
-      ret.err = this.err
+      ret.err = this.err;
     }
-    return ret
+    return ret;
   }
 
   /**
@@ -305,7 +303,7 @@ class Tagged {
    * @returns {string} String of the form '1(2)'.
    */
   toString() {
-    return `${this.tag}(${JSON.stringify(this.value)})`
+    return `${this.tag}(${JSON.stringify(this.value)})`;
   }
 
   /**
@@ -315,8 +313,8 @@ class Tagged {
    * @returns {boolean} True on success.
    */
   encodeCBOR(gen) {
-    gen._pushTag(this.tag)
-    return gen.pushAny(this.value)
+    gen._pushTag(this.tag);
+    return gen.pushAny(this.value);
   }
 
   /**
@@ -331,25 +329,25 @@ class Tagged {
    * @returns {any} The converted item.
    */
   convert(converters) {
-    let f = (converters == null) ? undefined : converters[this.tag]
+    let f = (converters == null) ? undefined : converters[this.tag];
     if (f === null) { // === is intentional. null has semantic meaning as above
-      return this
+      return this;
     }
     if (typeof f !== 'function') {
-      f = Tagged.TAGS[this.tag]
+      f = Tagged.TAGS[this.tag];
       if (typeof f !== 'function') {
-        return this
+        return this;
       }
     }
     try {
-      return f.call(this, this.value, this)
+      return f.call(this, this.value, this);
     } catch (error) {
       if (error && error.message && (error.message.length > 0)) {
-        this.err = error.message
+        this.err = error.message;
       } else {
-        this.err = error
+        this.err = error;
       }
-      return this
+      return this;
     }
   }
 
@@ -360,11 +358,11 @@ class Tagged {
    * @static
    */
   static get TAGS() {
-    return current_TAGS
+    return current_TAGS;
   }
 
   static set TAGS(val) {
-    current_TAGS = val
+    current_TAGS = val;
   }
 
   /**
@@ -372,9 +370,9 @@ class Tagged {
    * the list.
    */
   static reset() {
-    Tagged.TAGS = {...TAGS}
+    Tagged.TAGS = {...TAGS};
   }
 }
-Tagged.INTERNAL_JSON = INTERNAL_JSON
-Tagged.reset()
-module.exports = Tagged
+Tagged.INTERNAL_JSON = INTERNAL_JSON;
+Tagged.reset();
+module.exports = Tagged;
diff --git a/packages/cbor/lib/utils.js b/packages/cbor/lib/utils.js
index 70a2ed0a..34bc6289 100644
--- a/packages/cbor/lib/utils.js
+++ b/packages/cbor/lib/utils.js
@@ -1,11 +1,11 @@
-'use strict'
+'use strict';
 
-const {Buffer} = require('buffer')
-const NoFilter = require('nofilter')
-const stream = require('stream')
-const constants = require('./constants')
-const {NUMBYTES, SHIFT32, BI, SYMS} = constants
-const MAX_SAFE_HIGH = 0x1fffff
+const {Buffer} = require('buffer');
+const NoFilter = require('nofilter');
+const stream = require('stream');
+const constants = require('./constants');
+const {NUMBYTES, SHIFT32, BI, SYMS} = constants;
+const MAX_SAFE_HIGH = 0x1fffff;
 
 /**
  * Convert a UTF8-encoded Buffer to a JS string.  If possible, throw an error
@@ -13,17 +13,17 @@ const MAX_SAFE_HIGH = 0x1fffff
  *
  * @private
  */
-const td = new TextDecoder('utf8', {fatal: true, ignoreBOM: true})
-exports.utf8 = buf => td.decode(buf)
-exports.utf8.checksUTF8 = true
+const td = new TextDecoder('utf8', {fatal: true, ignoreBOM: true});
+exports.utf8 = buf => td.decode(buf);
+exports.utf8.checksUTF8 = true;
 
 function isReadable(s) {
   // Is this a readable stream?  In the webpack version, instanceof isn't
   // working correctly.
   if (s instanceof stream.Readable) {
-    return true
+    return true;
   }
-  return ['read', 'on', 'pipe'].every(f => typeof s[f] === 'function')
+  return ['read', 'on', 'pipe'].every(f => typeof s[f] === 'function');
 }
 
 exports.isBufferish = function isBufferish(b) {
@@ -33,40 +33,40 @@ exports.isBufferish = function isBufferish(b) {
       (b instanceof Uint8Array) ||
       (b instanceof Uint8ClampedArray) ||
       (b instanceof ArrayBuffer) ||
-      (b instanceof DataView))
-}
+      (b instanceof DataView));
+};
 
 exports.bufferishToBuffer = function bufferishToBuffer(b) {
   if (Buffer.isBuffer(b)) {
-    return b
+    return b;
   } else if (ArrayBuffer.isView(b)) {
-    return Buffer.from(b.buffer, b.byteOffset, b.byteLength)
+    return Buffer.from(b.buffer, b.byteOffset, b.byteLength);
   } else if (b instanceof ArrayBuffer) {
-    return Buffer.from(b)
+    return Buffer.from(b);
   }
-  return null
-}
+  return null;
+};
 
 exports.parseCBORint = function parseCBORint(ai, buf) {
   switch (ai) {
     case NUMBYTES.ONE:
-      return buf.readUInt8(0)
+      return buf.readUInt8(0);
     case NUMBYTES.TWO:
-      return buf.readUInt16BE(0)
+      return buf.readUInt16BE(0);
     case NUMBYTES.FOUR:
-      return buf.readUInt32BE(0)
+      return buf.readUInt32BE(0);
     case NUMBYTES.EIGHT: {
-      const f = buf.readUInt32BE(0)
-      const g = buf.readUInt32BE(4)
+      const f = buf.readUInt32BE(0);
+      const g = buf.readUInt32BE(4);
       if (f > MAX_SAFE_HIGH) {
-        return (BigInt(f) * BI.SHIFT32) + BigInt(g)
+        return (BigInt(f) * BI.SHIFT32) + BigInt(g);
       }
-      return (f * SHIFT32) + g
+      return (f * SHIFT32) + g;
     }
     default:
-      throw new Error(`Invalid additional info for int: ${ai}`)
+      throw new Error(`Invalid additional info for int: ${ai}`);
   }
-}
+};
 
 exports.writeHalf = function writeHalf(buf, half) {
   // Assume 0, -0, NaN, Infinity, and -Infinity have already been caught
@@ -82,9 +82,9 @@ exports.writeHalf = function writeHalf(buf, half) {
   // } u32;
   // u32.f = float_val;
 
-  const u32 = Buffer.allocUnsafe(4)
-  u32.writeFloatBE(half, 0)
-  const u = u32.readUInt32BE(0)
+  const u32 = Buffer.allocUnsafe(4);
+  u32.writeFloatBE(half, 0);
+  const u = u32.readUInt32BE(0);
 
   // If ((u32.u & 0x1FFF) == 0) { /* worth trying half */
 
@@ -92,7 +92,7 @@ exports.writeHalf = function writeHalf(buf, half) {
   // we will lose precision in the conversion.
   // mant32 = 24bits, mant16 = 11bits, 24-11 = 13
   if ((u & 0x1FFF) !== 0) {
-    return false
+    return false;
   }
 
   // Sign, exponent, mantissa
@@ -100,9 +100,9 @@ exports.writeHalf = function writeHalf(buf, half) {
   //   int exp = (u32.u >> 23) & 0xff;
   //   int mant = u32.u & 0x7fffff;
 
-  let s16 = (u >> 16) & 0x8000 // Top bit is sign
-  const exp = (u >> 23) & 0xff // Then 5 bits of exponent
-  const mant = u & 0x7fffff
+  let s16 = (u >> 16) & 0x8000; // Top bit is sign
+  const exp = (u >> 23) & 0xff; // Then 5 bits of exponent
+  const mant = u & 0x7fffff;
 
   // Hildjj: zeros already handled.  Assert if you don't believe me.
   //   if (exp == 0 && mant == 0)
@@ -112,7 +112,7 @@ exports.writeHalf = function writeHalf(buf, half) {
   //     s16 += ((exp - 112) << 10) + (mant >> 13);
 
   if ((exp >= 113) && (exp <= 142)) {
-    s16 += ((exp - 112) << 10) + (mant >> 13)
+    s16 += ((exp - 112) << 10) + (mant >> 13);
   } else if ((exp >= 103) && (exp < 113)) {
     // Denormalized numbers
     //   else if (exp >= 103 && exp < 113) { /* denorm, exp16 = 0 */
@@ -121,9 +121,9 @@ exports.writeHalf = function writeHalf(buf, half) {
     //     s16 += ((mant + 0x800000) >> (126 - exp));
 
     if (mant & ((1 << (126 - exp)) - 1)) {
-      return false
+      return false;
     }
-    s16 += ((mant + 0x800000) >> (126 - exp))
+    s16 += ((mant + 0x800000) >> (126 - exp));
   } else {
   //   } else if (exp == 255 && mant == 0) { /* Inf */
   //     s16 += 0x7c00;
@@ -133,151 +133,151 @@ exports.writeHalf = function writeHalf(buf, half) {
     //   } else
     //     goto float32;           /* loss of range */
 
-    return false
+    return false;
   }
 
   // Done
   //   ensure_writable(3);
   //   u16 = s16;
   //   be16 = hton16p((const uint8_t*)&u16);
-  buf.writeUInt16BE(s16)
-  return true
-}
+  buf.writeUInt16BE(s16);
+  return true;
+};
 
 exports.parseHalf = function parseHalf(buf) {
-  const sign = buf[0] & 0x80 ? -1 : 1
-  const exp = (buf[0] & 0x7C) >> 2
-  const mant = ((buf[0] & 0x03) << 8) | buf[1]
+  const sign = buf[0] & 0x80 ? -1 : 1;
+  const exp = (buf[0] & 0x7C) >> 2;
+  const mant = ((buf[0] & 0x03) << 8) | buf[1];
   if (!exp) {
-    return sign * 5.9604644775390625e-8 * mant
+    return sign * 5.9604644775390625e-8 * mant;
   } else if (exp === 0x1f) {
-    return sign * (mant ? NaN : Infinity)
+    return sign * (mant ? NaN : Infinity);
   }
-  return sign * (2 ** (exp - 25)) * (1024 + mant)
-}
+  return sign * (2 ** (exp - 25)) * (1024 + mant);
+};
 
 exports.parseCBORfloat = function parseCBORfloat(buf) {
   switch (buf.length) {
     case 2:
-      return exports.parseHalf(buf)
+      return exports.parseHalf(buf);
     case 4:
-      return buf.readFloatBE(0)
+      return buf.readFloatBE(0);
     case 8:
-      return buf.readDoubleBE(0)
+      return buf.readDoubleBE(0);
     default:
-      throw new Error(`Invalid float size: ${buf.length}`)
+      throw new Error(`Invalid float size: ${buf.length}`);
   }
-}
+};
 
 exports.hex = function hex(s) {
-  return Buffer.from(s.replace(/^0x/, ''), 'hex')
-}
+  return Buffer.from(s.replace(/^0x/, ''), 'hex');
+};
 
 exports.bin = function bin(s) {
-  s = s.replace(/\s/g, '')
-  let start = 0
-  let end = (s.length % 8) || 8
-  const chunks = []
+  s = s.replace(/\s/g, '');
+  let start = 0;
+  let end = (s.length % 8) || 8;
+  const chunks = [];
   while (end <= s.length) {
-    chunks.push(parseInt(s.slice(start, end), 2))
-    start = end
-    end += 8
+    chunks.push(parseInt(s.slice(start, end), 2));
+    start = end;
+    end += 8;
   }
-  return Buffer.from(chunks)
-}
+  return Buffer.from(chunks);
+};
 
 exports.arrayEqual = function arrayEqual(a, b) {
   if ((a == null) && (b == null)) {
-    return true
+    return true;
   }
   if ((a == null) || (b == null)) {
-    return false
+    return false;
   }
-  return (a.length === b.length) && a.every((elem, i) => elem === b[i])
-}
+  return (a.length === b.length) && a.every((elem, i) => elem === b[i]);
+};
 
 exports.bufferToBigInt = function bufferToBigInt(buf) {
-  return BigInt(`0x${buf.toString('hex')}`)
-}
+  return BigInt(`0x${buf.toString('hex')}`);
+};
 
 exports.cborValueToString = function cborValueToString(val, float_bytes = -1) {
   switch (typeof val) {
     case 'symbol': {
       switch (val) {
         case SYMS.NULL:
-          return 'null'
+          return 'null';
         case SYMS.UNDEFINED:
-          return 'undefined'
+          return 'undefined';
         case SYMS.BREAK:
-          return 'BREAK'
+          return 'BREAK';
       }
       // Impossible in node 10
       /* istanbul ignore if */
       if (val.description) {
-        return val.description
+        return val.description;
       }
       // On node10, Symbol doesn't have description.  Parse it out of the
       // toString value, which looks like `Symbol(foo)`.
-      const s = val.toString()
-      const m = s.match(/^Symbol\((?.*)\)/)
+      const s = val.toString();
+      const m = s.match(/^Symbol\((?.*)\)/);
       /* istanbul ignore if */
       if (m && m.groups.name) {
         // Impossible in node 12+
         /* istanbul ignore next */
-        return m.groups.name
+        return m.groups.name;
       }
-      return 'Symbol'
+      return 'Symbol';
     }
     case 'string':
-      return JSON.stringify(val)
+      return JSON.stringify(val);
     case 'bigint':
-      return val.toString()
+      return val.toString();
     case 'number': {
-      const s = Object.is(val, -0) ? '-0' : String(val)
-      return (float_bytes > 0) ? `${s}_${float_bytes}` : s
+      const s = Object.is(val, -0) ? '-0' : String(val);
+      return (float_bytes > 0) ? `${s}_${float_bytes}` : s;
     }
     case 'object': {
       if (!val) {
-        return 'null'
+        return 'null';
       }
-      const buf = exports.bufferishToBuffer(val)
+      const buf = exports.bufferishToBuffer(val);
       if (buf) {
-        const hex = buf.toString('hex')
-        return (float_bytes === -Infinity) ? hex : `h'${hex}'`
+        const hex = buf.toString('hex');
+        return (float_bytes === -Infinity) ? hex : `h'${hex}'`;
       }
       if (val && typeof val[Symbol.for('nodejs.util.inspect.custom')] === 'function') {
-        return val[Symbol.for('nodejs.util.inspect.custom')]()
+        return val[Symbol.for('nodejs.util.inspect.custom')]();
       }
       // Shouldn't get non-empty arrays here
       if (Array.isArray(val)) {
-        return '[]'
+        return '[]';
       }
       // This should be all that is left
-      return '{}'
+      return '{}';
     }
   }
-  return String(val)
-}
+  return String(val);
+};
 
 exports.guessEncoding = function guessEncoding(input, encoding) {
   if (typeof input === 'string') {
-    return new NoFilter(input, (encoding == null) ? 'hex' : encoding)
+    return new NoFilter(input, (encoding == null) ? 'hex' : encoding);
   }
-  const buf = exports.bufferishToBuffer(input)
+  const buf = exports.bufferishToBuffer(input);
   if (buf) {
-    return new NoFilter(buf)
+    return new NoFilter(buf);
   }
   if (isReadable(input)) {
-    return input
+    return input;
   }
-  throw new Error('Unknown input type')
-}
+  throw new Error('Unknown input type');
+};
 
 const B64URL_SWAPS = {
   '=': '',
   '+': '-',
   '/': '_',
-}
+};
 
 /**
  * @param {Buffer|Uint8Array|Uint8ClampedArray|ArrayBuffer|DataView} buf
@@ -288,8 +288,8 @@ const B64URL_SWAPS = {
 exports.base64url = function base64url(buf) {
   return exports.bufferishToBuffer(buf)
     .toString('base64')
-    .replace(/[=+/]/g, c => B64URL_SWAPS[c])
-}
+    .replace(/[=+/]/g, c => B64URL_SWAPS[c]);
+};
 
 /**
  * @param {Buffer|Uint8Array|Uint8ClampedArray|ArrayBuffer|DataView} buf
@@ -298,11 +298,11 @@ exports.base64url = function base64url(buf) {
  * @private
  */
 exports.base64 = function base64(buf) {
-  return exports.bufferishToBuffer(buf).toString('base64')
-}
+  return exports.bufferishToBuffer(buf).toString('base64');
+};
 
 exports.isBigEndian = function isBigEndian() {
-  const array = new Uint8Array(4)
-  const view = new Uint32Array(array.buffer)
-  return !((view[0] = 1) & array[0])
-}
+  const array = new Uint8Array(4);
+  const view = new Uint32Array(array.buffer);
+  return !((view[0] = 1) & array[0]);
+};
diff --git a/packages/cbor/package.json b/packages/cbor/package.json
index 4191b943..fd635e72 100644
--- a/packages/cbor/package.json
+++ b/packages/cbor/package.json
@@ -48,14 +48,14 @@
   ],
   "types": "./types/lib/cbor.d.ts",
   "dependencies": {
-    "nofilter": "^3.1.0"
+    "nofilter": "^3.0.2"
   },
   "devDependencies": {
-    "@types/node": "^20",
-    "bignumber.js": "^9.1.1",
+    "@types/node": "^22",
+    "bignumber.js": "^9.1.2",
     "garbage": "~0.0.0",
     "p-event": "^4.2.0",
-    "rimraf": "^5.0.0"
+    "rimraf": "^6.0.1"
   },
   "license": "MIT",
   "readmeFilename": "README.md",
diff --git a/packages/cbor/test/.eslintrc.js b/packages/cbor/test/.eslintrc.js
deleted file mode 100644
index 8cf1e873..00000000
--- a/packages/cbor/test/.eslintrc.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict'
-
-module.exports = {
-  extends: '@cto.af/eslint-config/ava',
-}
diff --git a/packages/cbor/test/cases.js b/packages/cbor/test/cases.js
index 99dabba8..30a51069 100644
--- a/packages/cbor/test/cases.js
+++ b/packages/cbor/test/cases.js
@@ -1,24 +1,24 @@
-'use strict'
+'use strict';
 
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const constants = require('../lib/constants')
-const utils = require('../lib/utils')
-const path = require('path')
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const constants = require('../lib/constants');
+const utils = require('../lib/utils');
+const path = require('node:path');
 
 // Use mangled versions
-const Buffer = cbor.encode(0).constructor
-const NoFilter = new cbor.Commented().all.constructor
+const Buffer = cbor.encode(0).constructor;
+const NoFilter = new cbor.Commented().all.constructor;
 
 function lbe(little, big) {
-  return utils.isBigEndian() ? big : little
+  return utils.isBigEndian() ? big : little;
 }
-exports.lbe = lbe
+exports.lbe = lbe;
 
 async function requireWithFailedDependency(source, dependency, fn) {
-  const src = require.resolve(source)
-  const dep = require.resolve(dependency)
-  const old_src = require.cache[src]
-  const old_dep = require.cache[dep]
+  const src = require.resolve(source);
+  const dep = require.resolve(dependency);
+  const old_src = require.cache[src];
+  const old_dep = require.cache[dep];
   require.cache[dep] = {
     loaded: true,
     get exports() {
@@ -26,39 +26,39 @@ async function requireWithFailedDependency(source, dependency, fn) {
       const err = new Error(
         `Cannot find module '${dep}'. ` +
         'Please verify that the package.json has a valid "main" entry'
-      )
-      err.code = 'MODULE_NOT_FOUND'
-      err.path = path.resolve(dependency, 'package.json')
-      err.requestPath = __filename
-      throw err
+      );
+      err.code = 'MODULE_NOT_FOUND';
+      err.path = path.resolve(dependency, 'package.json');
+      err.requestPath = __filename;
+      throw err;
     },
-  }
-  delete require.cache[src]
+  };
+  delete require.cache[src];
 
-  await fn(require(source))
+  await fn(require(source));
 
   // eslint-disable-next-line require-atomic-updates
-  require.cache[src] = old_src
+  require.cache[src] = old_src;
   // eslint-disable-next-line require-atomic-updates
-  require.cache[dep] = old_dep
+  require.cache[dep] = old_dep;
 }
-exports.requireWithFailedDependency = requireWithFailedDependency
+exports.requireWithFailedDependency = requireWithFailedDependency;
 
 class TempClass {
   constructor(val) {
     // Render as the string tempClass with the tag 0xffff
-    this.value = val || 'tempClass'
+    this.value = val || 'tempClass';
   }
 
   encodeCBOR(gen) {
-    return gen._pushTag(0xffff) && gen.pushAny(this.value)
+    return gen._pushTag(0xffff) && gen.pushAny(this.value);
   }
 
   static toCBOR(gen, obj) {
-    return gen._pushTag(0xfffe) && gen.pushAny(obj.value)
+    return gen._pushTag(0xfffe) && gen.pushAny(obj.value);
   }
 }
-exports.TempClass = TempClass
+exports.TempClass = TempClass;
 
 // [Decoded, Diagnostic, Commented]
 exports.good = [
@@ -683,7 +683,7 @@ exports.good = [
   81                -- Array, 1 item
     f6              -- [0], null
 0x81f6`],
-]
+];
 
 exports.encodeGood = [
   [constants.SYMS.NULL, 'null', `
@@ -711,7 +711,7 @@ exports.encodeGood = [
       63            -- String, length: 3
         666f6f      -- "foo"
 0xd9ffff63666f6f`],
-]
+];
 
 exports.decodeGood = [
   [1.5, '1.5_1', `
@@ -939,7 +939,7 @@ exports.decodeGood = [
           eeff99    -- eeff99
         ff          -- BREAK
 0xd8405f44aabbccdd43eeff99ff`],
-]
+];
 
 exports.collapseBigIntegers = [
   [0n, undefined, '0x00'],
@@ -955,7 +955,7 @@ exports.collapseBigIntegers = [
   [-0x1ffffffffn, undefined, '0x3b00000001fffffffe'],
   [0xffffffffffffffffn, undefined, '0x1bffffffffffffffff'],
   [-0x10000000000000000n, undefined, '0x3bffffffffffffffff'],
-]
+];
 
 exports.decodeBad = [
   '0x18', // Missing the next byte for AI
@@ -988,73 +988,73 @@ exports.decodeBad = [
   '0xfc', // Reserved AI
   '0xfd', // Reserved AI
   '0xfe', // Reserved AI
-]
+];
 if (utils.utf8.checksUTF8) {
   exports.decodeBad.push(
     '0x62c0ae' // Invalid utf8
-  )
+  );
 }
 
-const HEX = /0x(?[0-9a-f]+)$/i
+const HEX = /0x(?[0-9a-f]+)$/i;
 exports.toBuffer = function toBuffer(c) {
   if (Array.isArray(c)) {
     // eslint-disable-next-line prefer-destructuring
-    c = c[2]
+    c = c[2];
   }
-  const match = c.match(HEX)
-  return Buffer.from(match.groups.hex, 'hex')
-}
+  const match = c.match(HEX);
+  return Buffer.from(match.groups.hex, 'hex');
+};
 
 exports.toString = function toString(c) {
   if (Array.isArray(c)) {
     // eslint-disable-next-line prefer-destructuring
-    c = c[2]
+    c = c[2];
   }
   if (c == null) {
-    return c
+    return c;
   }
-  const match = c.match(HEX)
-  return match[1]
-}
+  const match = c.match(HEX);
+  return match[1];
+};
 
 class EncodeFailer extends cbor.Encoder {
   constructor(count) {
-    super()
+    super();
     if (count == null) {
-      count = Number.MAX_SAFE_INTEGER
+      count = Number.MAX_SAFE_INTEGER;
     }
-    this.count = count
-    this.start = count
+    this.count = count;
+    this.start = count;
   }
 
   push(fresh, encoding) {
     if (this.count-- <= 0) {
-      super.push(null)
-      return false
+      super.push(null);
+      return false;
     }
-    return super.push(fresh, encoding)
+    return super.push(fresh, encoding);
   }
 
   get used() {
-    return this.start - this.count
+    return this.start - this.count;
   }
 
   static tryAll(t, f, canonical) {
-    let enc = new EncodeFailer()
-    enc.canonical = canonical
-    t.truthy(enc.pushAny(f))
-    const {used} = enc
+    let enc = new EncodeFailer();
+    enc.canonical = canonical;
+    t.truthy(enc.pushAny(f));
+    const {used} = enc;
     for (let i = 0; i < used; i++) {
-      enc = new EncodeFailer(i)
-      enc.canonical = canonical
-      t.falsy(enc.pushAny(f))
+      enc = new EncodeFailer(i);
+      enc.canonical = canonical;
+      t.falsy(enc.pushAny(f));
     }
-    enc = new EncodeFailer(used)
-    enc.canonical = canonical
-    t.truthy(enc.pushAny(f))
+    enc = new EncodeFailer(used);
+    enc.canonical = canonical;
+    t.truthy(enc.pushAny(f));
   }
 }
-exports.EncodeFailer = EncodeFailer
+exports.EncodeFailer = EncodeFailer;
 
 // Here to avoid ava's odd injection of Map into the namespace of the tests
 exports.goodMap = new Map([
@@ -1071,7 +1071,7 @@ exports.goodMap = new Map([
   ['bb', 2],
   ['b', 1],
   ['bbb', 3],
-])
+]);
 
 exports.canonNums = [
   [-1.25, 'f9bd00'],
@@ -1090,4 +1090,4 @@ exports.canonNums = [
   [NaN, 'f97e00'],
   [0, '00'],
   [-0, 'f98000'],
-]
+];
diff --git a/packages/cbor/test/commented.ava.js b/packages/cbor/test/commented.ava.js
index 42591b1d..40344b36 100644
--- a/packages/cbor/test/commented.ava.js
+++ b/packages/cbor/test/commented.ava.js
@@ -1,94 +1,95 @@
+// eslint-disable-next-line @stylistic/semi
 'use strict'
 
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const test = require('ava')
-const pEvent = require('p-event')
-const util = require('util')
-const cases = require('./cases')
-const streams = require('./streams')
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const test = require('ava');
+const pEvent = require('p-event');
+const util = require('node:util');
+const cases = require('./cases');
+const streams = require('./streams');
 // Use mangled version
-const NoFilter = new cbor.Commented().all.constructor
-const pcomment = util.promisify(cbor.comment)
+const NoFilter = new cbor.Commented().all.constructor;
+const pcomment = util.promisify(cbor.comment);
 
 function testAll(t, list) {
-  t.plan(list.length)
+  t.plan(list.length);
   return Promise.all(
     list.map(
       c => cbor.comment(cases.toBuffer(c))
         .then(d => t.is(`\n${d}`, `${c[2]}\n`))
     )
-  )
+  );
 }
 
 function failAll(t, list) {
-  t.plan(list.length)
+  t.plan(list.length);
   return Promise.all(list.map(c => t.throwsAsync(
     cbor.comment(cases.toBuffer(c))
-  )))
+  )));
 }
 
 test('good', async t => {
-  await testAll(t, cases.good)
-})
+  await testAll(t, cases.good);
+});
 test('encode', async t => {
-  await testAll(t, cases.encodeGood)
-})
+  await testAll(t, cases.encodeGood);
+});
 test('decode', async t => {
-  await testAll(t, cases.decodeGood)
-})
+  await testAll(t, cases.decodeGood);
+});
 test('fail', async t => {
-  await failAll(t, cases.decodeBad)
-})
+  await failAll(t, cases.decodeBad);
+});
 
 test('input_errors', async t => {
   t.throws(() => {
-    cbor.comment(null, null)
-  })
+    cbor.comment(null, null);
+  });
   t.throws(() => {
-    cbor.comment('00', true)
-  })
-  await t.throwsAsync(cbor.comment('d8184181'))
-  t.is(await cbor.comment('', null), '')
-})
+    cbor.comment('00', true);
+  });
+  await t.throwsAsync(cbor.comment('d8184181'));
+  t.is(await cbor.comment('', null), '');
+});
 
 test('max_depth', async t => {
-  const str = await pcomment('01', 2)
+  const str = await pcomment('01', 2);
   t.is(str, `\
   01 -- 1
 0x01
-`)
-})
+`);
+});
 
 test('stream', async t => {
-  const bs = new NoFilter()
-  const parser = new cbor.Commented()
-  parser.pipe(bs)
-  parser.on('error', er => t.fail(`Failed: ${er}`))
+  const bs = new NoFilter();
+  const parser = new cbor.Commented();
+  parser.pipe(bs);
+  parser.on('error', er => t.fail(`Failed: ${er}`));
 
-  const h = new streams.DeHexStream('6161')
-  h.pipe(parser)
+  const h = new streams.DeHexStream('6161');
+  h.pipe(parser);
 
-  await pEvent(parser, 'end')
+  await pEvent(parser, 'end');
   t.is(bs.toString('utf8'), `\
   61                -- String, length: 1
     61              -- "a"
 0x6161
-`)
-})
+`);
+});
 
 test('function', async t => {
-  const str = await pcomment('00')
+  const str = await pcomment('00');
   t.is(str, `\
   00                -- 0
 0x00
-`)
-})
+`);
+});
 
 test('inputs', async t => {
   let c = await cbor.comment(
     'mB4AAQIDBAUGBwgJAAECAwQFBgcICQABAgMEBQYHCAk=',
     'base64'
-  )
+  );
   t.is(c, `\
   98                -- Array, length next 1 byte
     1e              -- Array, 30 items
@@ -123,31 +124,31 @@ test('inputs', async t => {
       08            -- [28], 8
       09            -- [29], 9
 0x981e000102030405060708090001020304050607080900010203040506070809
-`)
+`);
   c = await cbor.comment('x\u001e012345678901234567890123456789',
-    {encoding: 'utf8'})
+    {encoding: 'utf8'});
   t.is(c, `\
   78                -- String, length next 1 byte
     1e              -- String, length: 30
       303132333435363738393031323334353637383930313233343536373839 -- "012345678901234567890123456789"
 0x781e303132333435363738393031323334353637383930313233343536373839
-`)
-  c = await cbor.comment('381d', {max_depth: 12})
+`);
+  c = await cbor.comment('381d', {max_depth: 12});
   t.is(c, `\
   38                    -- Negative number, next 1 byte
     1d                  -- -30
 0x381d
-`)
-})
+`);
+});
 
 test('options', t => {
   function newTag24() {
-    return null
+    return null;
   }
   const c = new cbor.Commented({
     tags: {
       24: newTag24,
     },
-  })
-  t.is(c.parser.tags[24], newTag24)
-})
+  });
+  t.is(c.parser.tags[24], newTag24);
+});
diff --git a/packages/cbor/test/decoder.ava.js b/packages/cbor/test/decoder.ava.js
index 820a64ba..0e0fb53e 100644
--- a/packages/cbor/test/decoder.ava.js
+++ b/packages/cbor/test/decoder.ava.js
@@ -1,267 +1,267 @@
-'use strict'
-
-const cbor_src = process.env.CBOR_PACKAGE || '../'
-const cbor = require(cbor_src)
-const test = require('ava')
-const pEvent = require('p-event')
-const util = require('util')
-const cases = require('./cases')
-const streams = require('./streams')
-const BinaryParseStream = require('../vendor/binary-parse-stream')
-const pdecodeFirst = util.promisify(cbor.decodeFirst)
+'use strict';
+
+const cbor_src = process.env.CBOR_PACKAGE || '../';
+const cbor = require(cbor_src);
+const test = require('ava');
+const pEvent = require('p-event');
+const util = require('util');
+const cases = require('./cases');
+const streams = require('./streams');
+const BinaryParseStream = require('../vendor/binary-parse-stream');
+const pdecodeFirst = util.promisify(cbor.decodeFirst);
 // Use mangled versions
-const Buffer = cbor.encode(0).constructor
-const NoFilter = new cbor.Commented().all.constructor
+const Buffer = cbor.encode(0).constructor;
+const NoFilter = new cbor.Commented().all.constructor;
 
 function testAll(t, list, opts) {
-  t.plan(list.length)
+  t.plan(list.length);
   return Promise.all(
     list.map(
       c => cbor.decodeFirst(cases.toBuffer(c), opts)
         .then(d => {
           if ((typeof c[0] === 'number') && isNaN(c[0])) {
-            t.truthy(isNaN(d))
+            t.truthy(isNaN(d));
           } else {
-            t.deepEqual(d, c[0], cases.toString(c))
+            t.deepEqual(d, c[0], cases.toString(c));
           }
         })
     )
-  )
+  );
 }
 
 function failAll(t, list) {
-  t.plan(list.length)
-  list.map(c => t.throws(() => cbor.decode(cases.toBuffer(c))))
+  t.plan(list.length);
+  list.map(c => t.throws(() => cbor.decode(cases.toBuffer(c))));
 }
 
 function failFirstAll(t, list) {
-  t.plan(list.length)
+  t.plan(list.length);
   return Promise.all(
     list.map(c => t.throwsAsync(cbor.decodeFirst(cases.toBuffer(c))))
-  )
+  );
 }
 
 function failFirstAllCB(t, list) {
-  t.plan(list.length)
+  t.plan(list.length);
   return Promise.all(
     list.map(c => new Promise((resolve, reject) => {
       cbor.decodeFirst(cases.toBuffer(c), (er, d) => {
         if (d == null) {
-          t.truthy(er, c)
+          t.truthy(er, c);
         } else {
-          t.throws(() => cbor.Decoder.nullcheck(d), null, c)
+          t.throws(() => cbor.Decoder.nullcheck(d), null, c);
         }
-        resolve()
-      })
+        resolve();
+      });
     }))
-  )
+  );
 }
 
 test('good', async t => {
-  await testAll(t, cases.good)
-})
+  await testAll(t, cases.good);
+});
 test('decode', async t => {
-  await testAll(t, cases.decodeGood)
-})
+  await testAll(t, cases.decodeGood);
+});
 test('edges', async t => {
-  await failAll(t, cases.decodeBad)
-})
+  await failAll(t, cases.decodeBad);
+});
 test('bad first', async t => {
-  await failFirstAll(t, cases.decodeBad)
-})
+  await failFirstAll(t, cases.decodeBad);
+});
 test('bad first cb', async t => {
-  await failFirstAllCB(t, cases.decodeBad)
-})
+  await failFirstAllCB(t, cases.decodeBad);
+});
 
 test('decodeFirstSync', t => {
-  t.is(cbor.decodeFirstSync('02'), 2)
+  t.is(cbor.decodeFirstSync('02'), 2);
 
-  t.is(cbor.Decoder.decodeFirstSync('Ag==', 'base64'), 2)
-  t.is(cbor.decode('02', {}), 2)
-  t.is(cbor.decode('f6'), null)
-  t.throws(() => cbor.decode())
-  t.throws(() => cbor.decode(''))
-  t.throws(() => cbor.decode('63666f'))
-  t.throws(() => cbor.decodeFirstSync('0203')) // Fixed #111
-  t.throws(() => cbor.decode('01', 12))
+  t.is(cbor.Decoder.decodeFirstSync('Ag==', 'base64'), 2);
+  t.is(cbor.decode('02', {}), 2);
+  t.is(cbor.decode('f6'), null);
+  t.throws(() => cbor.decode());
+  t.throws(() => cbor.decode(''));
+  t.throws(() => cbor.decode('63666f'));
+  t.throws(() => cbor.decodeFirstSync('0203')); // Fixed #111
+  t.throws(() => cbor.decode('01', 12));
 
-  t.is(cbor.decode('01', null), 1)
+  t.is(cbor.decode('01', null), 1);
 
   // Decodefirstsync can take a ReadableStream as well.
-  const nf = new NoFilter('010203', 'hex')
+  const nf = new NoFilter('010203', 'hex');
   try {
-    cbor.decodeFirstSync(nf)
-    t.fail()
+    cbor.decodeFirstSync(nf);
+    t.fail();
   } catch (ex) {
-    t.is(ex.value, 1)
-    t.is(nf.length, 2)
+    t.is(ex.value, 1);
+    t.is(nf.length, 2);
   }
 
-  t.throws(() => cbor.decodeFirstSync(1))
-})
+  t.throws(() => cbor.decodeFirstSync(1));
+});
 
 test('decodeAllSync', t => {
-  t.deepEqual(cbor.Decoder.decodeAllSync(''), [])
-  t.deepEqual(cbor.Decoder.decodeAllSync('0202'), [2, 2])
-  t.deepEqual(cbor.Decoder.decodeAllSync('AgI=', 'base64'), [2, 2])
-  t.deepEqual(cbor.Decoder.decodeAllSync('0202', {}), [2, 2])
-  t.deepEqual(cbor.Decoder.decodeAllSync('f6f6'), [null, null])
-  t.deepEqual(cbor.Decoder.decodeAllSync(''), [])
-  t.throws(() => cbor.Decoder.decodeAllSync('63666f'))
-  t.throws(() => cbor.Decoder.decodeAllSync())
-
-  const nf = new NoFilter('010203', 'hex')
-  t.deepEqual(cbor.Decoder.decodeAllSync(nf), [1, 2, 3])
-})
+  t.deepEqual(cbor.Decoder.decodeAllSync(''), []);
+  t.deepEqual(cbor.Decoder.decodeAllSync('0202'), [2, 2]);
+  t.deepEqual(cbor.Decoder.decodeAllSync('AgI=', 'base64'), [2, 2]);
+  t.deepEqual(cbor.Decoder.decodeAllSync('0202', {}), [2, 2]);
+  t.deepEqual(cbor.Decoder.decodeAllSync('f6f6'), [null, null]);
+  t.deepEqual(cbor.Decoder.decodeAllSync(''), []);
+  t.throws(() => cbor.Decoder.decodeAllSync('63666f'));
+  t.throws(() => cbor.Decoder.decodeAllSync());
+
+  const nf = new NoFilter('010203', 'hex');
+  t.deepEqual(cbor.Decoder.decodeAllSync(nf), [1, 2, 3]);
+});
 
 test('add_tag', async t => {
   function replaceTag(val) {
-    return {foo: val}
+    return {foo: val};
   }
   function newTag(val) {
-    throw new Error('Invalid tag')
+    throw new Error('Invalid tag');
   }
   const d = new cbor.Decoder({
     tags: {0: replaceTag, 127: newTag},
-  })
-  t.deepEqual(d.tags[0], replaceTag)
-  t.deepEqual(d.tags[127], newTag)
+  });
+  t.deepEqual(d.tags[0], replaceTag);
+  t.deepEqual(d.tags[127], newTag);
 
   d.on('error', er => {
-    t.fail(`Stream fail: ${er}`)
-  })
+    t.fail(`Stream fail: ${er}`);
+  });
 
-  const b = Buffer.from('d87f01c001', 'hex')
-  d.end(b)
+  const b = Buffer.from('d87f01c001', 'hex');
+  d.end(b);
 
   const ait = pEvent.iterator(d, 'data', {
     resolutionEvents: ['finish'],
-  })
+  });
 
-  let count = 0
+  let count = 0;
   for await (const val of ait) {
     switch (count++) {
       case 0:
-        t.deepEqual(val, new cbor.Tagged(127, 1, 'Invalid tag'))
-        break
+        t.deepEqual(val, new cbor.Tagged(127, 1, 'Invalid tag'));
+        break;
       case 1:
-        t.deepEqual(val, {foo: 1})
-        break
+        t.deepEqual(val, {foo: 1});
+        break;
     }
   }
-})
+});
 
 test('parse_tag', async t => {
-  const vals = await pdecodeFirst('d87f01', 'hex')
-  t.deepEqual(vals, new cbor.Tagged(127, 1))
-})
+  const vals = await pdecodeFirst('d87f01', 'hex');
+  t.deepEqual(vals, new cbor.Tagged(127, 1));
+});
 
 test('error', async t => {
-  await t.throwsAsync(() => pdecodeFirst('d87f01c001', 'hex'))
-  await t.throwsAsync(() => pdecodeFirst('', {required: true}))
-})
+  await t.throwsAsync(() => pdecodeFirst('d87f01c001', 'hex'));
+  await t.throwsAsync(() => pdecodeFirst('', {required: true}));
+});
 
 test('stream', async t => {
-  const dt = new cbor.Decoder()
+  const dt = new cbor.Decoder();
 
-  const d = new streams.DeHexStream('01')
-  d.pipe(dt)
+  const d = new streams.DeHexStream('01');
+  d.pipe(dt);
 
   const ait = pEvent.iterator(dt, 'data', {
     resolutionEvents: ['end'],
-  })
+  });
 
   for await (const v of ait) {
-    t.is(v, 1)
+    t.is(v, 1);
   }
-})
+});
 
 test('decodeFirst', async t => {
-  t.plan(9)
-  t.is(await cbor.decodeFirst('01'), 1)
+  t.plan(9);
+  t.is(await cbor.decodeFirst('01'), 1);
   t.is(await cbor.decodeFirst('AQ==', {
     encoding: 'base64',
-  }), 1)
-  t.is(cbor.Decoder.NOT_FOUND, await cbor.decodeFirst(''))
-  t.throws(() => cbor.decodeFirst())
-  await t.throwsAsync(() => cbor.decodeFirst('', {required: true}))
+  }), 1);
+  t.is(cbor.Decoder.NOT_FOUND, await cbor.decodeFirst(''));
+  t.throws(() => cbor.decodeFirst());
+  await t.throwsAsync(() => cbor.decodeFirst('', {required: true}));
   await cbor.decodeFirst(Buffer.allocUnsafe(0), (er, v) => {
-    t.falsy(er)
-    t.is(cbor.Decoder.NOT_FOUND, v)
-  })
+    t.falsy(er);
+    t.is(cbor.Decoder.NOT_FOUND, v);
+  });
   await t.throwsAsync(() => cbor.decodeFirst(
     Buffer.allocUnsafe(0),
     {required: true},
     (er, v) => {
-      t.truthy(er)
+      t.truthy(er);
     }
-  ))
-})
+  ));
+});
 
 test('decodeAll', async t => {
-  t.throws(() => cbor.decodeAll())
-  t.deepEqual(await cbor.decodeAll('01'), [1])
-  await t.throwsAsync(() => cbor.decodeAll('7f'))
+  t.throws(() => cbor.decodeAll());
+  t.deepEqual(await cbor.decodeAll('01'), [1]);
+  await t.throwsAsync(() => cbor.decodeAll('7f'));
   t.deepEqual(await cbor.decodeAll('01', (er, v) => {
-    t.falsy(er)
-    t.deepEqual(v, [1])
-  }), [1])
+    t.falsy(er);
+    t.deepEqual(v, [1]);
+  }), [1]);
   await cbor.decodeAll('AQ==', {encoding: 'base64'}, (er, v) => {
-    t.falsy(er)
-    t.deepEqual(v, [1])
-  })
+    t.falsy(er);
+    t.deepEqual(v, [1]);
+  });
   await t.throwsAsync(() => cbor.decodeAll('7f', {}, (er, v) => {
-    t.truthy(er)
-  }))
+    t.truthy(er);
+  }));
   t.deepEqual(await cbor.decodeAll('AQ==', 'base64', (er, v) => {
-    t.falsy(er)
-    t.deepEqual(v, [1])
-  }), [1])
-})
+    t.falsy(er);
+    t.deepEqual(v, [1]);
+  }), [1]);
+});
 
 test('depth', async t => {
-  await t.throwsAsync(cbor.decodeFirst('818180', {max_depth: 1}))
-})
+  await t.throwsAsync(cbor.decodeFirst('818180', {max_depth: 1}));
+});
 
 test('typed arrays', t => {
-  const buf = Buffer.from('c24720000000000000', 'hex')
-  t.is(cbor.decode(buf), 9007199254740992n)
-  const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length)
-  t.is(cbor.decode(ab), 9007199254740992n)
-  t.is(cbor.decode(new Uint8Array(ab)), 9007199254740992n)
-  t.is(cbor.decode(new Uint8ClampedArray(ab)), 9007199254740992n)
+  const buf = Buffer.from('c24720000000000000', 'hex');
+  t.is(cbor.decode(buf), 9007199254740992n);
+  const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
+  t.is(cbor.decode(ab), 9007199254740992n);
+  t.is(cbor.decode(new Uint8Array(ab)), 9007199254740992n);
+  t.is(cbor.decode(new Uint8ClampedArray(ab)), 9007199254740992n);
 
   // Beware endian-ness
-  const u8b = new Uint8ClampedArray([0x61, 0x62])
-  t.is(cbor.decode(new Uint16Array(u8b.buffer)), 'b')
-  const u8abc = new Uint8ClampedArray([0x63, 0x61, 0x62, 0x63])
-  t.is(cbor.decode(new Uint32Array(u8abc.buffer)), 'abc')
-  t.is(cbor.decode(new DataView(u8abc.buffer)), 'abc')
-})
+  const u8b = new Uint8ClampedArray([0x61, 0x62]);
+  t.is(cbor.decode(new Uint16Array(u8b.buffer)), 'b');
+  const u8abc = new Uint8ClampedArray([0x63, 0x61, 0x62, 0x63]);
+  t.is(cbor.decode(new Uint32Array(u8abc.buffer)), 'abc');
+  t.is(cbor.decode(new DataView(u8abc.buffer)), 'abc');
+});
 
 test('preferWeb', t => {
   t.deepEqual(cbor.decodeFirstSync('40', {preferWeb: true}),
-    new Uint8Array([]))
+    new Uint8Array([]));
   t.deepEqual(cbor.decodeFirstSync('4141', {preferWeb: true}),
-    new Uint8Array([0x41]))
+    new Uint8Array([0x41]));
   t.deepEqual(cbor.decodeFirstSync('5fff', {preferWeb: true}),
-    new Uint8Array([]))
+    new Uint8Array([]));
   t.deepEqual(cbor.decodeFirstSync('5f42010243030405ff', {preferWeb: true}),
-    new Uint8Array([0x01, 0x02, 0x03, 0x04, 0x05]))
-})
+    new Uint8Array([0x01, 0x02, 0x03, 0x04, 0x05]));
+});
 
 test('binary-parse-stream edge', t => {
   class BPS extends BinaryParseStream {
     // eslint-disable-next-line class-methods-use-this
     *_parse() {
-      yield null
-      throw new Error('unreachable code')
+      yield null;
+      throw new Error('unreachable code');
     }
   }
-  const b = new BPS()
-  b.write('foo')
-  t.is(b.read(), null)
-})
+  const b = new BPS();
+  b.write('foo');
+  t.is(b.read(), null);
+});
 
 test('extended results', async t => {
   t.deepEqual(cbor.decodeFirstSync('f663616263', {extendedResults: true}), {
@@ -269,7 +269,7 @@ test('extended results', async t => {
     bytes: Buffer.from('f6', 'hex'),
     value: null,
     unused: Buffer.from('63616263', 'hex'),
-  })
+  });
   t.deepEqual(cbor.decodeAllSync('f663616263', {extendedResults: true}), [
     {
       length: 1,
@@ -281,20 +281,20 @@ test('extended results', async t => {
       bytes: Buffer.from('63616263', 'hex'),
       value: 'abc',
     },
-  ])
+  ]);
   t.deepEqual(await cbor.decodeFirst('f663616263', {extendedResults: true}), {
     length: 1,
     bytes: Buffer.from('f6', 'hex'),
     value: null,
     unused: Buffer.from('63616263', 'hex'),
-  })
-})
+  });
+});
 
 test('Buffers', t => {
   // Sanity checks for mangled library
-  const b = Buffer.from('0102', 'hex')
-  t.is(b.toString('hex'), '0102')
-  t.deepEqual(b, Buffer.from('0102', 'hex'))
+  const b = Buffer.from('0102', 'hex');
+  t.is(b.toString('hex'), '0102');
+  t.deepEqual(b, Buffer.from('0102', 'hex'));
   t.deepEqual(cbor.decode('818181420102', {extendedResults: true}), {
     bytes: Buffer.from('818181420102', 'hex'),
     length: 6,
@@ -306,17 +306,17 @@ test('Buffers', t => {
         ],
       ],
     ],
-  })
-})
+  });
+});
 
 test('duplicate map keys', t => {
   // Default behaviour is unchanged and allows parsing maps with duplicate keys
   t.deepEqual(
     cbor.decode(Buffer.from('a200010002', 'hex')),
     new Map([[0, 2]])
-  )
+  );
   // When the new decoder option is set the decode will throw
-  t.throws(() => cbor.decode(Buffer.from('a200010002', 'hex'), {preventDuplicateKeys: true}))
+  t.throws(() => cbor.decode(Buffer.from('a200010002', 'hex'), {preventDuplicateKeys: true}));
 
   // Default behaviour for maps with only string keys is also unchanged
   t.deepEqual(
@@ -324,7 +324,7 @@ test('duplicate map keys', t => {
     {
       toString: 1,
     }
-  )
+  );
 
   // When parsing a map with only strings as keys the result is an object and
   // we ignore keys from the object's prototype when checking for duplicates
@@ -334,29 +334,29 @@ test('duplicate map keys', t => {
       toString: 0,
       foo: 1,
     }
-  )
+  );
 
-  t.throws(() => cbor.decode(Buffer.from('a268746f537472696e670068746f537472696e6701', 'hex'), {preventDuplicateKeys: true}))
-})
+  t.throws(() => cbor.decode(Buffer.from('a268746f537472696e670068746f537472696e6701', 'hex'), {preventDuplicateKeys: true}));
+});
 
 test('preferMap', t => {
   t.deepEqual(
     cbor.decode(Buffer.from('a0', 'hex'), {preferMap: false}),
     {}
-  )
+  );
 
   t.deepEqual(
     cbor.decode(Buffer.from('a0', 'hex'), {preferMap: true}),
     new Map()
-  )
+  );
 
   t.deepEqual(
     cbor.decode(Buffer.from('a161616161', 'hex'), {preferMap: false}),
     {a: 'a'}
-  )
+  );
 
   t.deepEqual(
     cbor.decode(Buffer.from('a161616161', 'hex'), {preferMap: true}),
     new Map([['a', 'a']])
-  )
-})
+  );
+});
diff --git a/packages/cbor/test/diagnose.ava.js b/packages/cbor/test/diagnose.ava.js
index 6a7839e3..66326241 100644
--- a/packages/cbor/test/diagnose.ava.js
+++ b/packages/cbor/test/diagnose.ava.js
@@ -1,94 +1,94 @@
-'use strict'
+'use strict';
 
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const test = require('ava')
-const pEvent = require('p-event')
-const util = require('util')
-const cases = require('./cases')
-const pdiagnose = util.promisify(cbor.diagnose)
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const test = require('ava');
+const pEvent = require('p-event');
+const util = require('util');
+const cases = require('./cases');
+const pdiagnose = util.promisify(cbor.diagnose);
 // Use mangled versions
-const Buffer = cbor.encode(0).constructor
-const NoFilter = new cbor.Commented().all.constructor
+const Buffer = cbor.encode(0).constructor;
+const NoFilter = new cbor.Commented().all.constructor;
 
 function testAll(t, list) {
-  t.plan(list.length)
+  t.plan(list.length);
   return Promise.all(
     list.map(
       c => cbor.diagnose(cases.toBuffer(c)).then(d => t.is(d, `${c[1]}\n`))
     )
-  )
+  );
 }
 
 function failAll(t, list) {
-  t.plan(list.length)
+  t.plan(list.length);
   return Promise.all(list.map(c => t.throwsAsync(
     cbor.diagnose(cases.toBuffer(c))
-  )))
+  )));
 }
 
 test('diagnose', async t => {
-  await testAll(t, cases.good)
-})
+  await testAll(t, cases.good);
+});
 test('decode', async t => {
-  await testAll(t, cases.decodeGood)
-})
+  await testAll(t, cases.decodeGood);
+});
 test('edges', async t => {
-  await failAll(t, cases.decodeBad)
-})
+  await failAll(t, cases.decodeBad);
+});
 
 test('construct', async t => {
-  const d = new cbor.Diagnose()
-  t.is(d.stream_errors, false)
-  d.stream_errors = true
-  const bs = new NoFilter()
-  d.pipe(bs)
-  d.end(Buffer.from([0x18]))
-  await pEvent(d, 'end')
-  t.is(bs.toString('utf8'), 'Error: unexpected end of input')
-})
+  const d = new cbor.Diagnose();
+  t.is(d.stream_errors, false);
+  d.stream_errors = true;
+  const bs = new NoFilter();
+  d.pipe(bs);
+  d.end(Buffer.from([0x18]));
+  await pEvent(d, 'end');
+  t.is(bs.toString('utf8'), 'Error: unexpected end of input');
+});
 
 test('stream', async t => {
   const dt = new cbor.Diagnose({
     separator: '-',
-  })
-  const bs = new NoFilter()
-  dt.pipe(bs)
-  dt.end(Buffer.from('01', 'hex'))
-  await pEvent(dt, 'end')
-  t.is(bs.toString('utf8'), '1-')
-})
+  });
+  const bs = new NoFilter();
+  dt.pipe(bs);
+  dt.end(Buffer.from('01', 'hex'));
+  await pEvent(dt, 'end');
+  t.is(bs.toString('utf8'), '1-');
+});
 
 test('inputs', async t => {
   t.throws(() => {
-    cbor.diagnose()
-  })
-  const d = await pdiagnose('01')
-  t.truthy(d)
-  const d2 = await cbor.diagnose('AQ==', {encoding: 'base64'})
-  t.truthy(d2)
-  const d3 = await pdiagnose('AQ==', {encoding: 'base64'})
-  t.truthy(d3)
-})
+    cbor.diagnose();
+  });
+  const d = await pdiagnose('01');
+  t.truthy(d);
+  const d2 = await cbor.diagnose('AQ==', {encoding: 'base64'});
+  t.truthy(d2);
+  const d3 = await pdiagnose('AQ==', {encoding: 'base64'});
+  t.truthy(d3);
+});
 
 test('async', async t => {
-  let d = await cbor.diagnose('01', {})
-  t.is(d, '1\n')
-  d = await cbor.diagnose('01', 'hex')
-  t.is(d, '1\n')
-})
+  let d = await cbor.diagnose('01', {});
+  t.is(d, '1\n');
+  d = await cbor.diagnose('01', 'hex');
+  t.is(d, '1\n');
+});
 
 test('stream errors', async t => {
   const d = await cbor.diagnose('01', {
     encoding: 'hex',
     stream_errors: true,
-  })
-  t.is(d, '1\n')
-})
+  });
+  t.is(d, '1\n');
+});
 
 test('static', async t => {
-  t.throws(() => cbor.diagnose())
-  t.throws(() => cbor.diagnose('01', 12))
-  t.is(await cbor.diagnose('01', null), '1\n')
-  t.is(await cbor.diagnose('01', {encoding: null}), '1\n')
-  t.is(await cbor.diagnose('01', {encoding: undefined}), '1\n')
-})
+  t.throws(() => cbor.diagnose());
+  t.throws(() => cbor.diagnose('01', 12));
+  t.is(await cbor.diagnose('01', null), '1\n');
+  t.is(await cbor.diagnose('01', {encoding: null}), '1\n');
+  t.is(await cbor.diagnose('01', {encoding: undefined}), '1\n');
+});
diff --git a/packages/cbor/test/encoder.ava.js b/packages/cbor/test/encoder.ava.js
index 7c72ff45..00ca7dd8 100644
--- a/packages/cbor/test/encoder.ava.js
+++ b/packages/cbor/test/encoder.ava.js
@@ -1,303 +1,303 @@
-'use strict'
+'use strict';
 
-const cbor_src = process.env.CBOR_PACKAGE || '../'
-const cbor = require(cbor_src)
-const test = require('ava')
-const pEvent = require('p-event')
-const cases = require('./cases')
+const cbor_src = process.env.CBOR_PACKAGE || '../';
+const cbor = require(cbor_src);
+const test = require('ava');
+const pEvent = require('p-event');
+const cases = require('./cases');
 // Use mangled versions
-const Buffer = cbor.encode(0).constructor
-const NoFilter = new cbor.Commented().all.constructor
+const Buffer = cbor.encode(0).constructor;
+const NoFilter = new cbor.Commented().all.constructor;
 
 function testAll(t, list, opts = undefined) {
-  t.plan(list.length)
+  t.plan(list.length);
   return list.every(([orig, diag, commented]) => {
-    const actual = cbor.encodeOne(orig, opts).toString('hex')
-    const expected = cases.toString(commented)
-    t.is(actual, expected, diag)
-    return true
-  })
+    const actual = cbor.encodeOne(orig, opts).toString('hex');
+    const expected = cases.toString(commented);
+    t.is(actual, expected, diag);
+    return true;
+  });
 }
 
 test('good', t => {
-  testAll(t, cases.good)
-})
+  testAll(t, cases.good);
+});
 test('encode', t => {
-  testAll(t, cases.encodeGood)
-})
+  testAll(t, cases.encodeGood);
+});
 
 test('undefined', t => {
-  t.is(cbor.Encoder.encode(), null)
-  t.is(cbor.encode(undefined, 2).toString('hex'), 'f702')
-})
+  t.is(cbor.Encoder.encode(), null);
+  t.is(cbor.encode(undefined, 2).toString('hex'), 'f702');
+});
 
 test('badFunc', t => {
-  t.throws(() => cbor.encode(() => 'hi'))
-  t.throws(() => cbor.encode(Symbol('foo')))
+  t.throws(() => cbor.encode(() => 'hi'));
+  t.throws(() => cbor.encode(Symbol('foo')));
   function foo() {
-    return null
+    return null;
   }
-  foo.toString = null
-  t.throws(() => cbor.encode(foo))
-})
+  foo.toString = null;
+  t.throws(() => cbor.encode(foo));
+});
 
 test('addSemanticType', t => {
   // Before the tag, this is an innocuous object:
   // {"value": "foo"}
-  const tc = new cases.TempClass('foo')
-  delete (cases.TempClass.prototype.encodeCBOR)
-  t.is(cbor.Encoder.encode(tc).toString('hex'), 'a16576616c756563666f6f')
+  const tc = new cases.TempClass('foo');
+  delete (cases.TempClass.prototype.encodeCBOR);
+  t.is(cbor.Encoder.encode(tc).toString('hex'), 'a16576616c756563666f6f');
   const gen = new cbor.Encoder({
     genTypes: [cases.TempClass, cases.TempClass.toCBOR],
-  })
-  gen.write(tc)
-  t.is(gen.read().toString('hex'), 'd9fffe63666f6f')
+  });
+  gen.write(tc);
+  t.is(gen.read().toString('hex'), 'd9fffe63666f6f');
 
   function hexPackBuffer(gen2, obj, bufs) {
-    gen2.write(`0x${obj.toString('hex')}`)
+    gen2.write(`0x${obj.toString('hex')}`);
   // Intentionally don't return
   }
 
   // Replace Buffer serializer with hex strings
-  gen.addSemanticType(Buffer, hexPackBuffer)
-  gen.write(Buffer.from('010203', 'hex'))
+  gen.addSemanticType(Buffer, hexPackBuffer);
+  gen.write(Buffer.from('010203', 'hex'));
 
-  t.is(gen.read().toString('hex'), '683078303130323033')
+  t.is(gen.read().toString('hex'), '683078303130323033');
 
-  t.throws(() => gen.addSemanticType('foo', 'bar'))
-  t.is(gen.addSemanticType(Buffer), hexPackBuffer)
-  t.is(gen.addSemanticType(Buffer), undefined)
+  t.throws(() => gen.addSemanticType('foo', 'bar'));
+  t.is(gen.addSemanticType(Buffer), hexPackBuffer);
+  t.is(gen.addSemanticType(Buffer), undefined);
 
   // As object
   const gen2 = new cbor.Encoder({
     genTypes: {
       TempClass: cases.TempClass.toCBOR,
     },
-  })
-  gen2.write(tc)
-  t.is(gen2.read().toString('hex'), 'd9fffe63666f6f')
-})
+  });
+  gen2.write(tc);
+  t.is(gen2.read().toString('hex'), 'd9fffe63666f6f');
+});
 
 test('stream', async t => {
-  const bs = new NoFilter()
-  const gen = new cbor.Encoder()
-  gen.pipe(bs)
-  gen.write(1)
-  gen.end(2)
-  await pEvent(gen, 'end')
-  t.deepEqual(bs.read(), Buffer.from([1, 2]))
-})
+  const bs = new NoFilter();
+  const gen = new cbor.Encoder();
+  gen.pipe(bs);
+  gen.write(1);
+  gen.end(2);
+  await pEvent(gen, 'end');
+  t.deepEqual(bs.read(), Buffer.from([1, 2]));
+});
 
 test('streamNone', async t => {
-  const bs = new NoFilter()
-  const gen = new cbor.Encoder()
-  gen.pipe(bs)
-  gen.end()
-  await pEvent(gen, 'end')
-  t.is(bs.read(), null)
-})
+  const bs = new NoFilter();
+  const gen = new cbor.Encoder();
+  gen.pipe(bs);
+  gen.end();
+  await pEvent(gen, 'end');
+  t.is(bs.read(), null);
+});
 
 test('pushFails', t => {
-  cases.EncodeFailer.tryAll(t, [1, 2, 3])
-  cases.EncodeFailer.tryAll(t, new Set([1, 2, 3]))
-  cases.EncodeFailer.tryAll(t, new Map([[1, 2], ['a', null]]))
-  cases.EncodeFailer.tryAll(t, {a: 1, b: null})
-  cases.EncodeFailer.tryAll(t, undefined)
-  cases.EncodeFailer.tryAll(t, cases.goodMap, true)
-  cases.EncodeFailer.tryAll(t, {a: 1, b: null}, true)
+  cases.EncodeFailer.tryAll(t, [1, 2, 3]);
+  cases.EncodeFailer.tryAll(t, new Set([1, 2, 3]));
+  cases.EncodeFailer.tryAll(t, new Map([[1, 2], ['a', null]]));
+  cases.EncodeFailer.tryAll(t, {a: 1, b: null});
+  cases.EncodeFailer.tryAll(t, undefined);
+  cases.EncodeFailer.tryAll(t, cases.goodMap, true);
+  cases.EncodeFailer.tryAll(t, {a: 1, b: null}, true);
 
   return new Promise((resolve, reject) => {
-    const enc = new cbor.Encoder()
+    const enc = new cbor.Encoder();
     const o = {
       encodeCBOR() {
-        return false
+        return false;
       },
-    }
+    };
     enc.on('error', e => {
-      t.truthy(e instanceof Error)
-      resolve(true)
-    })
-    enc.on('finish', reject)
-    enc.end(o)
-  })
-})
+      t.truthy(e instanceof Error);
+      resolve(true);
+    });
+    enc.on('finish', reject);
+    enc.end(o);
+  });
+});
 
 test('pushAny', t => {
   // Left this in for backward-compat.  This should be the only place it's
   // called.
-  const enc = new cbor.Encoder()
-  const bs = new NoFilter()
-  enc.pipe(bs)
-  enc.pushAny(0)
-  t.is(bs.read().toString('hex'), '00')
-})
+  const enc = new cbor.Encoder();
+  const bs = new NoFilter();
+  enc.pipe(bs);
+  enc.pushAny(0);
+  t.is(bs.read().toString('hex'), '00');
+});
 
 test('canonical', t => {
-  const enc = new cbor.Encoder({canonical: true})
-  const bs = new NoFilter()
-  enc.pipe(bs)
-  enc.write(cases.goodMap)
+  const enc = new cbor.Encoder({canonical: true});
+  const bs = new NoFilter();
+  enc.pipe(bs);
+  enc.write(cases.goodMap);
   t.is(bs.read().toString('hex'),
-    'ad0063626172613063666f6f616101616201626161026262620263616161036362626203806b656d7074792061727261798101656172726179a069656d707479206f626aa1613102636f626af6646e756c6c')
-  enc.write({aa: 2, b: 1})
+    'ad0063626172613063666f6f616101616201626161026262620263616161036362626203806b656d7074792061727261798101656172726179a069656d707479206f626aa1613102636f626af6646e756c6c');
+  enc.write({aa: 2, b: 1});
   t.is(bs.read().toString('hex'),
-    'a261620162616102')
-})
+    'a261620162616102');
+});
 
 test('canonical numbers', t => {
-  const enc = new cbor.Encoder({canonical: true})
-  const bs = new NoFilter()
-  enc.pipe(bs)
+  const enc = new cbor.Encoder({canonical: true});
+  const bs = new NoFilter();
+  enc.pipe(bs);
 
   for (const numEnc of cases.canonNums) {
-    enc.write(numEnc[0])
-    t.is(bs.read().toString('hex'), numEnc[1])
+    enc.write(numEnc[0]);
+    t.is(bs.read().toString('hex'), numEnc[1]);
   }
-})
+});
 
 test('encodeCanonical', t => {
-  t.deepEqual(cbor.encodeCanonical(-1.25), Buffer.from('f9bd00', 'hex'))
-})
+  t.deepEqual(cbor.encodeCanonical(-1.25), Buffer.from('f9bd00', 'hex'));
+});
 
 test('detect loops', t => {
-  const enc = new cbor.Encoder({detectLoops: true})
-  const bs = new NoFilter()
-  enc.pipe(bs)
-
-  const a = {c: false}
-  const b = [a]
-  enc.write(b)
-  t.is(bs.read().toString('hex'), '81a16163f4')
-  t.falsy(enc.detectLoops.has(a))
-  t.truthy(enc.detectLoops.has(b))
-  t.truthy(enc.removeLoopDetectors())
-  t.falsy(enc.detectLoops.has(a))
-  t.falsy(enc.detectLoops.has(b))
-  a.a = a
-  t.throws(() => enc.write(b))
-
-  const can = new cbor.Encoder({detectLoops: true, canonical: true})
-  const c = {d: null}
+  const enc = new cbor.Encoder({detectLoops: true});
+  const bs = new NoFilter();
+  enc.pipe(bs);
+
+  const a = {c: false};
+  const b = [a];
+  enc.write(b);
+  t.is(bs.read().toString('hex'), '81a16163f4');
+  t.falsy(enc.detectLoops.has(a));
+  t.truthy(enc.detectLoops.has(b));
+  t.truthy(enc.removeLoopDetectors());
+  t.falsy(enc.detectLoops.has(a));
+  t.falsy(enc.detectLoops.has(b));
+  a.a = a;
+  t.throws(() => enc.write(b));
+
+  const can = new cbor.Encoder({detectLoops: true, canonical: true});
+  const c = {d: null};
   // This isn't a loop.
-  const m = new Map([[c, c]])
-  can.write(m)
+  const m = new Map([[c, c]]);
+  can.write(m);
 
-  const noLoops = new cbor.Encoder({detectLoops: false})
-  t.falsy(noLoops.removeLoopDetectors())
-})
+  const noLoops = new cbor.Encoder({detectLoops: false});
+  t.falsy(noLoops.removeLoopDetectors());
+});
 
 test('detect loops, own symbol', t => {
-  const s = Symbol('MINE')
-  t.throws(() => new cbor.Encoder({detectLoops: s}))
-  const ws = new WeakSet()
-  const enc = new cbor.Encoder({detectLoops: ws})
-  const bs = new NoFilter()
-  enc.pipe(bs)
-
-  const a = {c: new Date()}
-  enc.write(a)
-  t.falsy(ws.has(a))
-  t.truthy(ws.has(a.c))
-})
+  const s = Symbol('MINE');
+  t.throws(() => new cbor.Encoder({detectLoops: s}));
+  const ws = new WeakSet();
+  const enc = new cbor.Encoder({detectLoops: ws});
+  const bs = new NoFilter();
+  enc.pipe(bs);
+
+  const a = {c: new Date()};
+  enc.write(a);
+  t.falsy(ws.has(a));
+  t.truthy(ws.has(a.c));
+});
 
 test('date types', t => {
-  const d = new Date('2018-06-05T14:36:20Z')
+  const d = new Date('2018-06-05T14:36:20Z');
 
   t.throws(() => {
-    cbor.encodeOne(d, {dateType: 'blorfff'})
-  }, {instanceOf: TypeError})
+    cbor.encodeOne(d, {dateType: 'blorfff'});
+  }, {instanceOf: TypeError});
 
   t.is(
     cbor.encodeOne(d, {dateType: 'number'}).toString('hex'),
     'c11a5b169fe4'
-  )
+  );
 
   t.is(
     cbor.encodeOne(d, {dateType: null}).toString('hex'),
     'c11a5b169fe4'
-  )
+  );
 
   t.is(
     cbor.encodeOne(d, {dateType: 'int'}).toString('hex'),
     'c11a5b169fe4'
-  )
+  );
 
   t.is(
     cbor.encodeOne(d, {dateType: 'float'}).toString('hex'),
     'c1fb41d6c5a7f9000000'
-  )
+  );
 
   t.is(
     cbor.encodeOne(d, {dateType: 'string'}).toString('hex'),
     'c07818323031382d30362d30355431343a33363a32302e3030305a'
-  )
-})
+  );
+});
 
 test('BigInt collapse', t => {
   testAll(
     t,
     cases.collapseBigIntegers,
     {collapseBigIntegers: true}
-  )
-})
+  );
+});
 
 test('arraybuffer types', t => {
   t.is(
     cbor.encodeOne(Buffer.alloc(3)).toString('hex'),
     '43000000'
-  )
+  );
   t.is(
     cbor.encodeOne(new Uint8Array([1, 2, 3])).toString('hex'),
     'd84043010203'
-  )
+  );
   t.is(
     cbor.encodeOne(new Uint8ClampedArray([1, 2, 3])).toString('hex'),
     'd84443010203'
-  )
+  );
   t.is(
     cbor.encodeOne(new ArrayBuffer(3)).toString('hex'),
     '43000000'
-  )
+  );
   t.is(
     cbor.encodeOne(new Uint16Array([1, 2, 3])).toString('hex'),
     cases.lbe('d84546010002000300', 'd84146000100020003')
-  )
+  );
   t.is(
     cbor.encodeOne(new Uint32Array([1, 2, 3])).toString('hex'),
     cases.lbe(
       'd8464c010000000200000003000000',
       'd8424c000000010000000200000003'
     )
-  )
+  );
   t.is(
     cbor.encodeOne(new Int8Array([1, 2, 3])).toString('hex'),
     'd84843010203'
-  )
+  );
   t.is(
     cbor.encodeOne(new Int16Array([1, 2, 3])).toString('hex'),
     cases.lbe('d84d46010002000300', 'd84946000100020003')
-  )
+  );
   t.is(
     cbor.encodeOne(new Int32Array([1, 2, 3])).toString('hex'),
     cases.lbe(
       'd84e4c010000000200000003000000',
       'd84a4c000000010000000200000003'
     )
-  )
+  );
   t.is(
     cbor.encodeOne(new Float32Array([1, 2, 3])).toString('hex'),
     cases.lbe(
       'd8554c0000803f0000004000004040',
       'd8514c3f8000004000000040400000'
     )
-  )
+  );
   t.is(
     cbor.encodeOne(new Float64Array([1, 2, 3])).toString('hex'),
     cases.lbe(
       'd8565818000000000000f03f00000000000000400000000000000840',
       'd85258183ff000000000000040000000000000004008000000000000'
     )
-  )
+  );
 
   t.is(
     cbor.encodeOne(new BigInt64Array([1n, 2n, 3n])).toString('hex'),
@@ -305,7 +305,7 @@ test('arraybuffer types', t => {
       'd84f5818010000000000000002000000000000000300000000000000',
       'd84b5818000000000000000100000000000000020000000000000003'
     )
-  )
+  );
 
   t.is(
     cbor.encodeOne(new BigUint64Array([1n, 2n, 3n])).toString('hex'),
@@ -313,113 +313,113 @@ test('arraybuffer types', t => {
       'd8475818010000000000000002000000000000000300000000000000',
       'd8435818000000000000000100000000000000020000000000000003'
     )
-  )
+  );
 
-  cases.EncodeFailer.tryAll(t, new Float32Array(3))
-  cases.EncodeFailer.tryAll(t, new Float64Array(3))
-})
+  cases.EncodeFailer.tryAll(t, new Float32Array(3));
+  cases.EncodeFailer.tryAll(t, new Float64Array(3));
+});
 
 test('encoding "undefined"', t => {
-  t.is(cbor.encodeOne(undefined).toString('hex'), 'f7')
-  t.is(cbor.encodeOne(undefined, {encodeUndefined: null}).toString('hex'), 'f6')
-  const undefStr = cbor.encode('undefined')
+  t.is(cbor.encodeOne(undefined).toString('hex'), 'f7');
+  t.is(cbor.encodeOne(undefined, {encodeUndefined: null}).toString('hex'), 'f6');
+  const undefStr = cbor.encode('undefined');
   t.is(cbor.encodeOne(undefined, {
     encodeUndefined: undefStr,
-  }).toString('hex'), '69756e646566696e6564')
+  }).toString('hex'), '69756e646566696e6564');
   t.throws(() => cbor.encodeOne(undefined, {encodeUndefined: () => {
-    throw new Error('ha')
-  }}))
+    throw new Error('ha');
+  }}));
   t.is(cbor.encodeOne(undefined, {
     encodeUndefined: () => undefStr,
-  }).toString('hex'), '4a69756e646566696e6564')
-  const m = new Map([[undefined, 1]])
+  }).toString('hex'), '4a69756e646566696e6564');
+  const m = new Map([[undefined, 1]]);
   t.throws(() => cbor.encodeOne(m, {
     disallowUndefinedKeys: true,
-  }))
+  }));
   t.throws(() => cbor.encodeOne(m, {
     disallowUndefinedKeys: true,
     canonical: true,
-  }))
-})
+  }));
+});
 
 test('URL', t => {
   t.is(cbor.encodeOne(new URL('https://example.net')).toString('hex'),
-    'd8207468747470733a2f2f6578616d706c652e6e65742f')
-})
+    'd8207468747470733a2f2f6578616d706c652e6e65742f');
+});
 
 test('big', async t => {
-  const buf = Buffer.alloc(16385)
-  const bc = cbor.encodeOne([buf, buf], {highWaterMark: 50000})
-  t.is(bc.length, 32777)
-  const bd = await cbor.encodeAsync([buf, buf])
-  t.is(bd.length, 32777)
-})
+  const buf = Buffer.alloc(16385);
+  const bc = cbor.encodeOne([buf, buf], {highWaterMark: 50000});
+  t.is(bc.length, 32777);
+  const bd = await cbor.encodeAsync([buf, buf]);
+  t.is(bd.length, 32777);
+});
 
 class IndefiniteClass {
   encodeCBOR(gen) {
-    const b = Buffer.from('1234567890')
-    const buf = new Uint8Array(b.buffer, b.byteOffset, b.byteLength)
+    const b = Buffer.from('1234567890');
+    const buf = new Uint8Array(b.buffer, b.byteOffset, b.byteLength);
     return cbor.Encoder.encodeIndefinite(gen, '1234567890', {chunkSize: 3}) &&
       cbor.Encoder.encodeIndefinite(gen, buf, {chunkSize: 3}) &&
-      cbor.Encoder.encodeIndefinite(gen, this)
+      cbor.Encoder.encodeIndefinite(gen, this);
   }
 }
 
 test('indefinite', t => {
-  const gen = new cbor.Encoder()
+  const gen = new cbor.Encoder();
 
-  t.throws(() => cbor.Encoder.encodeIndefinite.call(null, gen, null))
-  t.throws(() => cbor.Encoder.encodeIndefinite.call(null, gen, true))
-  const i = new IndefiniteClass()
-  i.a = true
+  t.throws(() => cbor.Encoder.encodeIndefinite.call(null, gen, null));
+  t.throws(() => cbor.Encoder.encodeIndefinite.call(null, gen, true));
+  const i = new IndefiniteClass();
+  i.a = true;
   t.is(
     cbor.encodeOne(i).toString('hex'),
     '7f6331323363343536633738396130ff5f4331323343343536433738394130ffbf6161f5ff'
-  )
-  cases.EncodeFailer.tryAll(t, i)
+  );
+  cases.EncodeFailer.tryAll(t, i);
 
-  const m = new Map([['a', true]])
-  m.encodeCBOR = cbor.Encoder.encodeIndefinite
-  t.is(cbor.encodeOne(m).toString('hex'), 'bf6161f5ff')
-  cases.EncodeFailer.tryAll(t, m)
+  const m = new Map([['a', true]]);
+  m.encodeCBOR = cbor.Encoder.encodeIndefinite;
+  t.is(cbor.encodeOne(m).toString('hex'), 'bf6161f5ff');
+  cases.EncodeFailer.tryAll(t, m);
 
-  const a = [1, Infinity, null, undefined]
-  a.encodeCBOR = cbor.Encoder.encodeIndefinite
-  t.is(cbor.encodeOne(a).toString('hex'), '9f01f97c00f6f7ff')
-  cases.EncodeFailer.tryAll(t, a)
+  const a = [1, Infinity, null, undefined];
+  a.encodeCBOR = cbor.Encoder.encodeIndefinite;
+  t.is(cbor.encodeOne(a).toString('hex'), '9f01f97c00f6f7ff');
+  cases.EncodeFailer.tryAll(t, a);
 
   const o = {
     a: true,
     encodeCBOR: cbor.Encoder.encodeIndefinite,
-  }
-  t.is(cbor.encodeOne(o, {detectLoops: true}).toString('hex'), 'bf6161f5ff')
-})
+  };
+  t.is(cbor.encodeOne(o, {detectLoops: true}).toString('hex'), 'bf6161f5ff');
+});
 
 test('Buffers', t => {
   // Sanity checks for mangled library
-  const b = Buffer.from('0102', 'hex')
-  t.is(b.toString('hex'), '0102')
-  t.deepEqual(b, Buffer.from('0102', 'hex'))
-})
+  const b = Buffer.from('0102', 'hex');
+  t.is(b.toString('hex'), '0102');
+  t.deepEqual(b, Buffer.from('0102', 'hex'));
+});
 
 test('boxed', t => {
   // eslint-disable-next-line no-new-wrappers
-  t.is(cbor.encode(new Number(12)).toString('hex'), '0c')
+  t.is(cbor.encode(new Number(12)).toString('hex'), '0c');
   // eslint-disable-next-line no-new-wrappers
-  t.is(cbor.encode(new String(12)).toString('hex'), '623132')
+  t.is(cbor.encode(new String(12)).toString('hex'), '623132');
   // eslint-disable-next-line no-new-wrappers
-  t.is(cbor.encode(new Boolean(12)).toString('hex'), 'f5')
-})
+  t.is(cbor.encode(new Boolean(12)).toString('hex'), 'f5');
+});
 
 test('omitUndefinedProperties', t => {
   let buf = cbor.encodeOne(
     {a: undefined, b: null, c: 0},
     {omitUndefinedProperties: true}
-  )
-  t.is(buf.toString('hex'), 'a26162f6616300')
+  );
+  t.is(buf.toString('hex'), 'a26162f6616300');
   buf = cbor.encodeOne(
     new Map([['a', undefined], ['b', null], ['c', 0]]),
     {omitUndefinedProperties: true}
-  )
-  t.is(buf.toString('hex'), 'a26162f6616300')
-})
+  );
+  t.is(buf.toString('hex'), 'a26162f6616300');
+});
diff --git a/packages/cbor/test/garbage.ava.js b/packages/cbor/test/garbage.ava.js
index 8d406491..86452d6b 100644
--- a/packages/cbor/test/garbage.ava.js
+++ b/packages/cbor/test/garbage.ava.js
@@ -1,23 +1,23 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const garbage = require('garbage')
+const test = require('ava');
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const garbage = require('garbage');
 
-const REPEATS = parseInt(process.env.NODE_CBOR_GARBAGE || 10000, 10)
+const REPEATS = parseInt(process.env.NODE_CBOR_GARBAGE || 10000, 10);
 test('garbage', t => {
   if (process.env.NO_GARBAGE) {
-    t.pass()
-    return null
+    t.pass();
+    return null;
   }
-  t.plan(REPEATS)
-  const inp = []
+  t.plan(REPEATS);
+  const inp = [];
   for (let i = 0; i < REPEATS; i++) {
-    inp.push(garbage(100))
+    inp.push(garbage(100));
   }
   return Promise.all(inp.map(async g => {
-    const c = cbor.encode(g)
-    const val = await cbor.decodeFirst(c)
-    t.deepEqual(val, g)
-  }))
-})
+    const c = cbor.encode(g);
+    const val = await cbor.decodeFirst(c);
+    t.deepEqual(val, g);
+  }));
+});
diff --git a/packages/cbor/test/implementation_matrix.js b/packages/cbor/test/implementation_matrix.js
index e2301587..606bc48b 100644
--- a/packages/cbor/test/implementation_matrix.js
+++ b/packages/cbor/test/implementation_matrix.js
@@ -1,11 +1,11 @@
 /* eslint-disable no-console */
-'use strict'
+'use strict';
 
 // Data to fill out:
 // https://github.com/cbor-wg/CBORbis/wiki/Implementation-matrix
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const Buffer = cbor.encode(0).constructor
-const assert = require('assert')
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const Buffer = cbor.encode(0).constructor;
+const assert = require('assert');
 
 const all = [
   ['Major type 0 (uint)', 1, '01'],
@@ -44,18 +44,18 @@ const all = [
   ['Tag 35', /foo/, 'd82363666f6f'],
   ['Tag 36', 0, ''],
   ['Tag 55799', 0, ''],
-]
+];
 
 function deepEqual(actual, expected) {
-  assert.deepEqual(actual, expected)
-  return true
+  assert.deepEqual(actual, expected);
+  return true;
 }
 
 function markdownOut(title, decode, encode) {
-  const DE = (decode ? 'D' : ' ') + (encode ? 'E' : ' ')
+  const DE = (decode ? 'D' : ' ') + (encode ? 'E' : ' ');
   console.log(
     `| ${title.padEnd(28)}|          | ${DE}        |           |       |`
-  )
+  );
 }
 
 // eslint-disable-next-line max-params
@@ -64,18 +64,18 @@ function test(title, native, encoded, canonical, dateType) {
     const e = cbor.Encoder.encodeOne(native, {
       canonical,
       dateType,
-    })
-    const d = cbor.decodeFirstSync(encoded)
+    });
+    const d = cbor.decodeFirstSync(encoded);
     markdownOut(
       title,
       deepEqual(native, d),
       deepEqual(e, Buffer.from(encoded, 'hex'))
-    )
+    );
   } else {
-    markdownOut(title)
+    markdownOut(title);
   }
 }
 
 for (const t of all) {
-  test(...t)
+  test(...t);
 }
diff --git a/packages/cbor/test/map.ava.js b/packages/cbor/test/map.ava.js
index d9102c21..d89754a2 100644
--- a/packages/cbor/test/map.ava.js
+++ b/packages/cbor/test/map.ava.js
@@ -1,61 +1,61 @@
-'use strict'
+'use strict';
 
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const test = require('ava')
-const cases = require('./cases')
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const test = require('ava');
+const cases = require('./cases');
 
 test('create', t => {
-  const m = new cbor.Map()
-  t.truthy(m instanceof Map)
-})
+  const m = new cbor.Map();
+  t.truthy(m instanceof Map);
+});
 
 test('basic', t => {
-  const m = new cbor.Map()
-  t.is(m.size, 0)
-  m.set(1, 2)
-  m.set(3, 4)
-  t.is(m.size, 2)
-  t.is(m.get(1), 2)
-  t.is(m.get(3), 4)
-  t.truthy(m.has(1))
-  t.truthy(m.has(3))
-  t.falsy(m.has(8))
-  t.deepEqual(Array.from(m.keys()), [1, 3])
-  t.deepEqual(Array.from(m.entries()), [[1, 2], [3, 4]])
+  const m = new cbor.Map();
+  t.is(m.size, 0);
+  m.set(1, 2);
+  m.set(3, 4);
+  t.is(m.size, 2);
+  t.is(m.get(1), 2);
+  t.is(m.get(3), 4);
+  t.truthy(m.has(1));
+  t.truthy(m.has(3));
+  t.falsy(m.has(8));
+  t.deepEqual(Array.from(m.keys()), [1, 3]);
+  t.deepEqual(Array.from(m.entries()), [[1, 2], [3, 4]]);
 
-  t.is(m.delete(1), true)
-  t.is(m.delete(1), false)
-  t.is(m.size, 1)
-  t.falsy(m.has(1))
-  t.deepEqual(Array.from(m.keys()), [3])
+  t.is(m.delete(1), true);
+  t.is(m.delete(1), false);
+  t.is(m.size, 1);
+  t.falsy(m.has(1));
+  t.deepEqual(Array.from(m.keys()), [3]);
   for (const [k, v] of m) { // [Symbol.iterator]
-    t.is(k, 3)
-    t.is(v, 4)
+    t.is(k, 3);
+    t.is(v, 4);
   }
   m.forEach((v, k, n) => {
-    t.is(k, 3)
-    t.is(v, 4)
-    t.is(k, 3)
-    t.is(n, m)
-  })
-})
+    t.is(k, 3);
+    t.is(v, 4);
+    t.is(k, 3);
+    t.is(n, m);
+  });
+});
 
 test('errors', t => {
-  const m = new cbor.Map([[1, 2], [3, 4]])
-  t.is(m.size, 2)
+  const m = new cbor.Map([[1, 2], [3, 4]]);
+  t.is(m.size, 2);
   t.throws(() => {
-    m.forEach()
-  })
+    m.forEach();
+  });
   t.throws(() => {
-    m.forEach('boo')
-  })
-})
+    m.forEach('boo');
+  });
+});
 
 test('complex', t => {
-  const m = new cbor.Map([[[], 2], [[], 4]])
-  t.is(m.size, 1)
-  t.is(m.get([]), 4)
-})
+  const m = new cbor.Map([[[], 2], [[], 4]]);
+  t.is(m.size, 1);
+  t.is(m.get([]), 4);
+});
 
 test('encode', t => {
   const m = new cbor.Map([
@@ -65,14 +65,14 @@ test('encode', t => {
     [-1, 'neg'],
     [[0, 1], 'array'],
     [{a: 1, b: 2}, 'map'],
-  ])
-  const buf = cbor.encode(m)
+  ]);
+  const buf = cbor.encode(m);
   t.is(buf.toString('hex'),
-    'a6f4f501636f6e650062686920636e6567820001656172726179a2616101616202636d6170')
-  const bufCanon = cbor.encodeCanonical(m)
+    'a6f4f501636f6e650062686920636e6567820001656172726179a2616101616202636d6170');
+  const bufCanon = cbor.encodeCanonical(m);
   t.is(bufCanon.toString('hex'),
-    'a60062686901636f6e6520636e6567820001656172726179a2616101616202636d6170f4f5')
-})
+    'a60062686901636f6e6520636e6567820001656172726179a2616101616202636d6170f4f5');
+});
 
 test('encodefail', t => {
   const m = new cbor.Map([
@@ -82,7 +82,7 @@ test('encodefail', t => {
     [-1, 'neg'],
     [[0, 1], 'array'],
     [{a: 1, b: 2}, 'map'],
-  ])
-  cases.EncodeFailer.tryAll(t, m)
-  cases.EncodeFailer.tryAll(t, m, true)
-})
+  ]);
+  cases.EncodeFailer.tryAll(t, m);
+  cases.EncodeFailer.tryAll(t, m, true);
+});
diff --git a/packages/cbor/test/objectRecorder.ava.js b/packages/cbor/test/objectRecorder.ava.js
index ba055122..0ecfacdc 100644
--- a/packages/cbor/test/objectRecorder.ava.js
+++ b/packages/cbor/test/objectRecorder.ava.js
@@ -1,22 +1,22 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const ObjectRecorder = require('../lib/objectRecorder')
+const test = require('ava');
+const ObjectRecorder = require('../lib/objectRecorder');
 
 test('create', t => {
-  const o = new ObjectRecorder()
-  t.truthy(o)
-  t.is(o.check({}), ObjectRecorder.NEVER)
-  const a = {}
-  const b = {}
-  t.is(o.check(a), ObjectRecorder.NEVER)
-  t.is(o.check(a), 0)
-  t.is(o.check(b), ObjectRecorder.NEVER)
-  o.stop()
-  t.is(o.check(a), ObjectRecorder.FIRST)
-  t.is(o.check(a), 0)
-  t.is(o.check(b), ObjectRecorder.NEVER)
-  t.throws(() => o.check({}))
-  o.clear()
-  t.is(o.check(a), ObjectRecorder.NEVER)
-})
+  const o = new ObjectRecorder();
+  t.truthy(o);
+  t.is(o.check({}), ObjectRecorder.NEVER);
+  const a = {};
+  const b = {};
+  t.is(o.check(a), ObjectRecorder.NEVER);
+  t.is(o.check(a), 0);
+  t.is(o.check(b), ObjectRecorder.NEVER);
+  o.stop();
+  t.is(o.check(a), ObjectRecorder.FIRST);
+  t.is(o.check(a), 0);
+  t.is(o.check(b), ObjectRecorder.NEVER);
+  t.throws(() => o.check({}));
+  o.clear();
+  t.is(o.check(a), ObjectRecorder.NEVER);
+});
diff --git a/packages/cbor/test/plugins.ava.js b/packages/cbor/test/plugins.ava.js
index 52acb297..eac2552a 100644
--- a/packages/cbor/test/plugins.ava.js
+++ b/packages/cbor/test/plugins.ava.js
@@ -1,11 +1,11 @@
-'use strict'
+'use strict';
 
-const cbor_src = process.env.CBOR_PACKAGE || '../'
-const cbor = require(cbor_src)
-const test = require('ava')
+const cbor_src = process.env.CBOR_PACKAGE || '../';
+const cbor = require(cbor_src);
+const test = require('ava');
 
 test('reset', t => {
-  cbor.Encoder.SEMANTIC_TYPES.UNKNOWN_TYPE = () => null
-  cbor.reset()
-  t.is(cbor.Encoder.SEMANTIC_TYPES.UNKNOWN_TYPE, undefined)
-})
+  cbor.Encoder.SEMANTIC_TYPES.UNKNOWN_TYPE = () => null;
+  cbor.reset();
+  t.is(cbor.Encoder.SEMANTIC_TYPES.UNKNOWN_TYPE, undefined);
+});
diff --git a/packages/cbor/test/sharedValueEncoder.ava.js b/packages/cbor/test/sharedValueEncoder.ava.js
index 1b768aca..d5e1b273 100644
--- a/packages/cbor/test/sharedValueEncoder.ava.js
+++ b/packages/cbor/test/sharedValueEncoder.ava.js
@@ -1,35 +1,35 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const SharedValueEncoder = require('../lib/sharedValueEncoder')
-const {Buffer} = require('buffer')
+const test = require('ava');
+const SharedValueEncoder = require('../lib/sharedValueEncoder');
+const {Buffer} = require('buffer');
 
 test('create SVE', async t => {
-  const a = {}
-  a.b = a
+  const a = {};
+  a.b = a;
 
-  const sve = new SharedValueEncoder()
-  t.truthy(sve)
+  const sve = new SharedValueEncoder();
+  t.truthy(sve);
   // eslint-disable-next-line no-empty-function
-  sve.on('data', () => {})
-  sve.pushAny(a)
-  sve.stopRecording()
-  let bufs = []
-  sve.on('data', b => bufs.push(b))
-  sve.pushAny(a)
-  t.is(Buffer.concat(bufs).toString('hex'), 'd81ca16162d81d00')
-  bufs = []
-  sve.clearRecording()
-  sve.pushAny(a)
-  t.is(Buffer.concat(bufs).toString('hex'), 'a16162d81d00')
+  sve.on('data', () => {});
+  sve.pushAny(a);
+  sve.stopRecording();
+  let bufs = [];
+  sve.on('data', b => bufs.push(b));
+  sve.pushAny(a);
+  t.is(Buffer.concat(bufs).toString('hex'), 'd81ca16162d81d00');
+  bufs = [];
+  sve.clearRecording();
+  sve.pushAny(a);
+  t.is(Buffer.concat(bufs).toString('hex'), 'a16162d81d00');
 
-  t.is(SharedValueEncoder.encode(a).toString('hex'), 'd81ca16162d81d00')
-  t.is(SharedValueEncoder.encode(null).toString('hex'), 'f6')
+  t.is(SharedValueEncoder.encode(a).toString('hex'), 'd81ca16162d81d00');
+  t.is(SharedValueEncoder.encode(null).toString('hex'), 'f6');
 
-  const buf = await SharedValueEncoder.encodeAsync(a)
-  t.is(buf.toString('hex'), 'd81ca16162d81d00')
+  const buf = await SharedValueEncoder.encodeAsync(a);
+  t.is(buf.toString('hex'), 'd81ca16162d81d00');
 
-  t.is(SharedValueEncoder.encodeOne(a).toString('hex'), 'd81ca16162d81d00')
+  t.is(SharedValueEncoder.encodeOne(a).toString('hex'), 'd81ca16162d81d00');
 
-  t.throws(() => SharedValueEncoder.encodeCanonical(a))
-})
+  t.throws(() => SharedValueEncoder.encodeCanonical(a));
+});
diff --git a/packages/cbor/test/simple.ava.js b/packages/cbor/test/simple.ava.js
index 00426c82..152250cb 100644
--- a/packages/cbor/test/simple.ava.js
+++ b/packages/cbor/test/simple.ava.js
@@ -1,30 +1,30 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const constants = require('../lib/constants')
+const test = require('ava');
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const constants = require('../lib/constants');
 
 test('create', t => {
-  const u = new cbor.Simple(0)
-  t.is(u.value, 0)
+  const u = new cbor.Simple(0);
+  t.is(u.value, 0);
 
-  t.is(cbor.Simple.isSimple(u), true)
-  t.is(cbor.Simple.isSimple('foo'), false)
-  t.is(u.toString(), 'simple(0)')
+  t.is(cbor.Simple.isSimple(u), true);
+  t.is(cbor.Simple.isSimple('foo'), false);
+  t.is(u.toString(), 'simple(0)');
 
-  t.throws(() => new cbor.Simple('0'))
-  t.throws(() => new cbor.Simple(-1))
-  t.throws(() => new cbor.Simple(256))
-  t.throws(() => new cbor.Simple(1.1))
-})
+  t.throws(() => new cbor.Simple('0'));
+  t.throws(() => new cbor.Simple(-1));
+  t.throws(() => new cbor.Simple(256));
+  t.throws(() => new cbor.Simple(1.1));
+});
 
 test('decode', t => {
-  t.is(cbor.Simple.decode(constants.SIMPLE.NULL), null)
-  t.is(typeof (cbor.Simple.decode(constants.SIMPLE.UNDEFINED)), 'undefined')
-  t.throws(() => cbor.Simple.decode(-1, false))
-})
+  t.is(cbor.Simple.decode(constants.SIMPLE.NULL), null);
+  t.is(typeof (cbor.Simple.decode(constants.SIMPLE.UNDEFINED)), 'undefined');
+  t.throws(() => cbor.Simple.decode(-1, false));
+});
 
 test('inspect', t => {
-  const u = new cbor.Simple(0)
-  t.is(u[Symbol.for('nodejs.util.inspect.custom')](), 'simple(0)')
-})
+  const u = new cbor.Simple(0);
+  t.is(u[Symbol.for('nodejs.util.inspect.custom')](), 'simple(0)');
+});
diff --git a/packages/cbor/test/streams.js b/packages/cbor/test/streams.js
index 05ac4c40..b48cbf24 100644
--- a/packages/cbor/test/streams.js
+++ b/packages/cbor/test/streams.js
@@ -1,27 +1,27 @@
-'use strict'
+'use strict';
 
-const stream = require('stream')
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const Buffer = cbor.encode(0).constructor
+const stream = require('stream');
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const Buffer = cbor.encode(0).constructor;
 
 exports.DeHexStream = class DeHexStream extends stream.Readable {
   constructor(hex) {
-    super()
-    hex = hex.replace(/^0x/, '')
+    super();
+    hex = hex.replace(/^0x/, '');
     if (hex) {
-      this.push(Buffer.from(hex, 'hex'))
+      this.push(Buffer.from(hex, 'hex'));
     }
-    this.push(null)
+    this.push(null);
   }
-}
+};
 
 exports.HexStream = class HexStream extends stream.Transform {
   constructor(options) {
-    super(options)
+    super(options);
   }
 
   _transform(fresh, encoding, cb) {
-    this.push(fresh.toString('hex'))
-    return cb()
+    this.push(fresh.toString('hex'));
+    return cb();
   }
-}
+};
diff --git a/packages/cbor/test/tagged.ava.js b/packages/cbor/test/tagged.ava.js
index ce274aee..62e0f301 100644
--- a/packages/cbor/test/tagged.ava.js
+++ b/packages/cbor/test/tagged.ava.js
@@ -1,146 +1,146 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const Buffer = cbor.encode(0).constructor
+const test = require('ava');
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const Buffer = cbor.encode(0).constructor;
 
 test('create', t => {
-  const tag = new cbor.Tagged(1, 'one')
-  t.truthy(tag)
-  t.is(tag.tag, 1)
-  t.is(tag.value, 'one')
-  t.is(tag.toString(), '1("one")')
+  const tag = new cbor.Tagged(1, 'one');
+  t.truthy(tag);
+  t.is(tag.tag, 1);
+  t.is(tag.value, 'one');
+  t.is(tag.toString(), '1("one")');
 
-  t.is(cbor.encode(tag).toString('hex'), 'c1636f6e65')
-})
+  t.is(cbor.encode(tag).toString('hex'), 'c1636f6e65');
+});
 
 test('edges', t => {
-  t.throws(() => new cbor.Tagged(-11, 'one'))
-  t.throws(() => new cbor.Tagged(1.1, 'one'))
-  t.throws(() => new cbor.Tagged('zero', 'one'))
-})
+  t.throws(() => new cbor.Tagged(-11, 'one'));
+  t.throws(() => new cbor.Tagged(1.1, 'one'));
+  t.throws(() => new cbor.Tagged('zero', 'one'));
+});
 
 test('convert', t => {
-  const tag = new cbor.Tagged(2, Buffer.from([2]))
-  t.deepEqual(tag.convert(), BigInt(2))
-})
+  const tag = new cbor.Tagged(2, Buffer.from([2]));
+  t.deepEqual(tag.convert(), BigInt(2));
+});
 
 test('tag 21', t => {
-  let tag = new cbor.Tagged(21, Buffer.from('foo')).convert()
-  t.is(JSON.stringify(tag), '"Zm9v"')
-  tag = new cbor.Tagged(21, [Buffer.from('fo')]).convert()
-  t.is(JSON.stringify(tag), '{"tag":21,"value":["Zm8"]}')
-  tag = new cbor.Tagged(21, [{a: Buffer.from('f')}]).convert()
-  t.is(JSON.stringify(tag), '{"tag":21,"value":[{"a":"Zg"}]}')
+  let tag = new cbor.Tagged(21, Buffer.from('foo')).convert();
+  t.is(JSON.stringify(tag), '"Zm9v"');
+  tag = new cbor.Tagged(21, [Buffer.from('fo')]).convert();
+  t.is(JSON.stringify(tag), '{"tag":21,"value":["Zm8"]}');
+  tag = new cbor.Tagged(21, [{a: Buffer.from('f')}]).convert();
+  t.is(JSON.stringify(tag), '{"tag":21,"value":[{"a":"Zg"}]}');
 
   tag = new cbor.Tagged(21, [
     {a: new cbor.Tagged(22, Buffer.from('f')).convert()},
-  ]).convert()
-  t.is(JSON.stringify(tag), '{"tag":21,"value":[{"a":"Zg=="}]}')
-  tag = new cbor.Tagged(21, 12).convert()
-  t.is(JSON.stringify(tag), '{"tag":21,"value":12}')
+  ]).convert();
+  t.is(JSON.stringify(tag), '{"tag":21,"value":[{"a":"Zg=="}]}');
+  tag = new cbor.Tagged(21, 12).convert();
+  t.is(JSON.stringify(tag), '{"tag":21,"value":12}');
 
-  tag = new cbor.Tagged(1, 2, 'this is an error')
-  t.is(JSON.stringify(tag), '{"tag":1,"value":2,"err":"this is an error"}')
-})
+  tag = new cbor.Tagged(1, 2, 'this is an error');
+  t.is(JSON.stringify(tag), '{"tag":1,"value":2,"err":"this is an error"}');
+});
 
 test('tag 22', t => {
-  let tag = new cbor.Tagged(22, Buffer.from('fo')).convert()
-  t.is(JSON.stringify(tag), '"Zm8="')
-  tag = new cbor.Tagged(22, [Buffer.from('fo')]).convert()
-  t.is(JSON.stringify(tag), '{"tag":22,"value":["Zm8="]}')
-  tag = new cbor.Tagged(22, [{a: Buffer.from('f')}]).convert()
-  t.is(JSON.stringify(tag), '{"tag":22,"value":[{"a":"Zg=="}]}')
-})
+  let tag = new cbor.Tagged(22, Buffer.from('fo')).convert();
+  t.is(JSON.stringify(tag), '"Zm8="');
+  tag = new cbor.Tagged(22, [Buffer.from('fo')]).convert();
+  t.is(JSON.stringify(tag), '{"tag":22,"value":["Zm8="]}');
+  tag = new cbor.Tagged(22, [{a: Buffer.from('f')}]).convert();
+  t.is(JSON.stringify(tag), '{"tag":22,"value":[{"a":"Zg=="}]}');
+});
 
 test('tag 23', t => {
-  let tag = new cbor.Tagged(23, Buffer.from('fo')).convert()
-  t.is(JSON.stringify(tag), '"666f"')
-  tag = new cbor.Tagged(23, [Buffer.from('fo')]).convert()
-  t.is(JSON.stringify(tag), '{"tag":23,"value":["666f"]}')
-  tag = new cbor.Tagged(23, [{a: Buffer.from('f')}]).convert()
-  t.is(JSON.stringify(tag), '{"tag":23,"value":[{"a":"66"}]}')
-})
+  let tag = new cbor.Tagged(23, Buffer.from('fo')).convert();
+  t.is(JSON.stringify(tag), '"666f"');
+  tag = new cbor.Tagged(23, [Buffer.from('fo')]).convert();
+  t.is(JSON.stringify(tag), '{"tag":23,"value":["666f"]}');
+  tag = new cbor.Tagged(23, [{a: Buffer.from('f')}]).convert();
+  t.is(JSON.stringify(tag), '{"tag":23,"value":[{"a":"66"}]}');
+});
 
 test('tag 33', t => {
-  let tag = new cbor.Tagged(33, ';;').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(33, 'A').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(33, 'AB').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(33, 'AA').convert()
-  t.falsy(tag.err)
-  tag = new cbor.Tagged(33, 'AAq').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(33, 'AAA').convert()
-  t.falsy(tag.err)
-  tag = new cbor.Tagged(33, 'AAAA').convert()
-  t.falsy(tag.err)
-})
+  let tag = new cbor.Tagged(33, ';;').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(33, 'A').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(33, 'AB').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(33, 'AA').convert();
+  t.falsy(tag.err);
+  tag = new cbor.Tagged(33, 'AAq').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(33, 'AAA').convert();
+  t.falsy(tag.err);
+  tag = new cbor.Tagged(33, 'AAAA').convert();
+  t.falsy(tag.err);
+});
 
 test('tag 34', t => {
-  let tag = new cbor.Tagged(34, ';;').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(34, '====').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(34, 'A').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(34, 'AB==').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(34, 'AA==').convert()
-  t.falsy(tag.err)
-  tag = new cbor.Tagged(34, 'AAq=').convert()
-  t.truthy(tag.err)
-  tag = new cbor.Tagged(34, 'AAA=').convert()
-  t.falsy(tag.err)
-  tag = new cbor.Tagged(34, 'AAAA').convert()
-  t.falsy(tag.err)
-})
+  let tag = new cbor.Tagged(34, ';;').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(34, '====').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(34, 'A').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(34, 'AB==').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(34, 'AA==').convert();
+  t.falsy(tag.err);
+  tag = new cbor.Tagged(34, 'AAq=').convert();
+  t.truthy(tag.err);
+  tag = new cbor.Tagged(34, 'AAA=').convert();
+  t.falsy(tag.err);
+  tag = new cbor.Tagged(34, 'AAAA').convert();
+  t.falsy(tag.err);
+});
 
 test('converters', t => {
   let res = new cbor.Tagged(1, 1).convert({
     1() {
-      throw new Error()
+      throw new Error();
     },
-  })
-  t.truthy(res.err instanceof Error)
+  });
+  t.truthy(res.err instanceof Error);
   res = new cbor.Tagged(1, 1).convert({
     1() {
-      const e = new Error()
-      delete e.message
-      throw e
+      const e = new Error();
+      delete e.message;
+      throw e;
     },
-  })
-  t.truthy(res.err instanceof Error)
-})
+  });
+  t.truthy(res.err instanceof Error);
+});
 
 test('Typed Arrays', t => {
-  let tag = new cbor.Tagged(64, 'foo')
-  tag.convert()
-  t.is(tag.err, 'val not a buffer')
-  tag = new cbor.Tagged(90, 'foo')
-
-  const {64: _toTypedArray} = cbor.Tagged.TAGS
-  t.throws(() => _toTypedArray(tag.value, tag))
-  tag = new cbor.Tagged(76, 'foo')
-  t.throws(() => _toTypedArray(tag.value, tag))
-  tag = new cbor.Tagged(90, Buffer.from('000100020003', 'hex'))
-  t.throws(() => _toTypedArray(tag.value, tag))
+  let tag = new cbor.Tagged(64, 'foo');
+  tag.convert();
+  t.is(tag.err, 'val not a buffer');
+  tag = new cbor.Tagged(90, 'foo');
+
+  const {64: _toTypedArray} = cbor.Tagged.TAGS;
+  t.throws(() => _toTypedArray(tag.value, tag));
+  tag = new cbor.Tagged(76, 'foo');
+  t.throws(() => _toTypedArray(tag.value, tag));
+  tag = new cbor.Tagged(90, Buffer.from('000100020003', 'hex'));
+  t.throws(() => _toTypedArray(tag.value, tag));
 
   // Endian
-  tag = new cbor.Tagged(65, Buffer.from('000100020003', 'hex'))
-  t.deepEqual(_toTypedArray(tag.value, tag), new Uint16Array([1, 2, 3]))
+  tag = new cbor.Tagged(65, Buffer.from('000100020003', 'hex'));
+  t.deepEqual(_toTypedArray(tag.value, tag), new Uint16Array([1, 2, 3]));
 
-  tag = new cbor.Tagged(68, Buffer.from('010203', 'hex'))
-  t.deepEqual(_toTypedArray(tag.value, tag), new Uint8ClampedArray([1, 2, 3]))
+  tag = new cbor.Tagged(68, Buffer.from('010203', 'hex'));
+  t.deepEqual(_toTypedArray(tag.value, tag), new Uint8ClampedArray([1, 2, 3]));
 
-  tag = new cbor.Tagged(73, Buffer.from('000100020003', 'hex'))
-  t.deepEqual(_toTypedArray(tag.value, tag), new Int16Array([1, 2, 3]))
-})
+  tag = new cbor.Tagged(73, Buffer.from('000100020003', 'hex'));
+  t.deepEqual(_toTypedArray(tag.value, tag), new Int16Array([1, 2, 3]));
+});
 
 test('null converter', t => {
-  const buf = Buffer.from('c100', 'hex')
-  t.deepEqual(cbor.decode(buf), new Date(0))
-  t.deepEqual(cbor.decode(buf, {tags: {1: null}}), new cbor.Tagged(1, 0))
-})
+  const buf = Buffer.from('c100', 'hex');
+  t.deepEqual(cbor.decode(buf), new Date(0));
+  t.deepEqual(cbor.decode(buf, {tags: {1: null}}), new cbor.Tagged(1, 0));
+});
diff --git a/packages/cbor/test/test-vectors.ava.js b/packages/cbor/test/test-vectors.ava.js
index c0b3191d..00c48558 100644
--- a/packages/cbor/test/test-vectors.ava.js
+++ b/packages/cbor/test/test-vectors.ava.js
@@ -1,33 +1,33 @@
 /* eslint-disable no-console */
-'use strict'
-const cbor = require(process.env.CBOR_PACKAGE || '../')
-const test = require('ava')
-const util = require('util')
-const fs = require('fs')
-const path = require('path')
-const Buffer = cbor.encode(0).constructor
+'use strict';
+const cbor = require(process.env.CBOR_PACKAGE || '../');
+const test = require('ava');
+const util = require('util');
+const fs = require('fs');
+const path = require('path');
+const Buffer = cbor.encode(0).constructor;
 const readFile = util.promisify ?
   util.promisify(fs.readFile) :
   (...args) => new Promise((resolve, reject) => {
-    fs.readFile(...args, (er, res) => (er ? reject(er) : resolve(res)))
-  })
+    fs.readFile(...args, (er, res) => (er ? reject(er) : resolve(res)));
+  });
 
-let vectors = null
-let failures = null
+let vectors = null;
+let failures = null;
 
 test.before(async t => {
   // Read tests in.  Edit them to make the big integers come out correctly.
-  let vecStr = null
+  let vecStr = null;
   const vectorDir = path.resolve(
     __dirname, '..', '..', '..', 'test-vectors'
-  )
-  const appendix_a = path.join(vectorDir, 'appendix_a.json')
+  );
+  const appendix_a = path.join(vectorDir, 'appendix_a.json');
   try {
-    vecStr = await readFile(appendix_a, {encoding: 'utf8'})
+    vecStr = await readFile(appendix_a, {encoding: 'utf8'});
   } catch (ignored) {
     t.fail(`"${appendix_a}" not found.
-use command \`git submodule update --init\` to load test-vectors`)
-    return
+use command \`git submodule update --init\` to load test-vectors`);
+    return;
   }
 
   // HACK: don't lose data when JSON parsing
@@ -37,80 +37,82 @@ use command \`git submodule update --init\` to load test-vectors`)
       "___TYPE___": "number",
       "___VALUE___": "$"
     }`
-  )
+  );
   vectors = JSON.parse(vecStr, (key, value) => {
     if (!value) {
-      return value
+      return value;
     }
     if (value.___TYPE___ === 'number') {
-      const v = value.___VALUE___
-      const f = Number.parseFloat(v)
+      const v = value.___VALUE___;
+      const f = Number.parseFloat(v);
       try {
-        const bi = BigInt(v)
+        const bi = BigInt(v);
         if ((bi > Number.MAX_SAFE_INTEGER) || (bi < Number.MIN_SAFE_INTEGER)) {
-          return bi
+          return bi;
         }
-      } catch (ignored) {}
-      return f
+      } catch (ignored) {
+        // Ignored
+      }
+      return f;
     }
-    return value
-  })
+    return value;
+  });
 
-  let failStr = null
-  const fail = path.join(vectorDir, 'fail.json')
+  let failStr = null;
+  const fail = path.join(vectorDir, 'fail.json');
   try {
-    failStr = await readFile(fail, {encoding: 'utf8'})
+    failStr = await readFile(fail, {encoding: 'utf8'});
   } catch (ignored) {
     t.fail(`"${fail}" not found.
-use command \`git submodule update --init\` to load test-vectors`)
-    return
+use command \`git submodule update --init\` to load test-vectors`);
+    return;
   }
-  failures = JSON.parse(failStr)
-})
+  failures = JSON.parse(failStr);
+});
 
 test('vectors', t => {
-  t.truthy(Array.isArray(vectors))
+  t.truthy(Array.isArray(vectors));
   for (const v of vectors) {
-    t.truthy(v.hex)
-    const buffer = Buffer.from(v.hex, 'hex')
+    t.truthy(v.hex);
+    const buffer = Buffer.from(v.hex, 'hex');
 
-    let decoded = null
+    let decoded = null;
     try {
-      decoded = cbor.decode(buffer)
+      decoded = cbor.decode(buffer);
     } catch (e) {
-      console.log('DECODE ERROR', buffer.toString('hex'))
-      throw e
+      console.log('DECODE ERROR', buffer.toString('hex'));
+      throw e;
     }
-    const encoded = cbor.encodeCanonical(decoded)
-    const redecoded = cbor.decode(encoded)
+    const encoded = cbor.encodeCanonical(decoded);
+    const redecoded = cbor.decode(encoded);
 
-    t.truthy(Object.prototype.hasOwnProperty.call(v, 'cbor'))
+    t.truthy(Object.prototype.hasOwnProperty.call(v, 'cbor'));
     t.deepEqual(
       Buffer.from(v.cbor, 'base64'),
       buffer,
       'base64 and hex encoded bytes mismatched '
-    )
+    );
 
     if (decoded && (typeof decoded === 'object')) {
-      delete decoded[cbor.Tagged.INTERNAL_JSON]
-      delete redecoded[cbor.Tagged.INTERNAL_JSON]
+      delete decoded[cbor.Tagged.INTERNAL_JSON];
+      delete redecoded[cbor.Tagged.INTERNAL_JSON];
     }
     t.deepEqual(
       decoded,
       redecoded,
       `round trip error: ${v.hex} -> ${encoded.toString('hex')}`
-    )
+    );
 
     if (Object.prototype.hasOwnProperty.call(v, 'diagnostic')) {
       cbor.diagnose(buffer)
         .then(d => t.deepEqual(
           d.trim().replace(/_\d+(?$|\))/, '$'),
           v.diagnostic
-        ))
+        ));
     }
 
     if (Object.prototype.hasOwnProperty.call(v, 'decoded')) {
-      t.deepEqual(decoded, v.decoded, `Hex: "${v.hex}"`)
+      t.deepEqual(decoded, v.decoded, `Hex: "${v.hex}"`);
 
       if (v.roundtrip) {
         // TODO: Don't know how to make these round-trip.  See:
@@ -122,22 +124,22 @@ test('vectors', t => {
           'fa47c35000',
           'f9c400',
         ].indexOf(v.hex) === -1) {
-          t.deepEqual(encoded.toString('hex'), v.hex)
+          t.deepEqual(encoded.toString('hex'), v.hex);
         } else {
           // Trigger if assumptions change
-          t.notDeepEqual(encoded, buffer)
+          t.notDeepEqual(encoded, buffer);
         }
       }
     }
   }
-})
+});
 
 test('errors', async t => {
-  t.plan(failures.length)
+  t.plan(failures.length);
   for (const f of failures) {
     await t.throwsAsync(async _ => {
-      await cbor.decodeAll(f.hex, 'hex')
-      console.log('NO THROW', f)
-    })
+      await cbor.decodeAll(f.hex, 'hex');
+      console.log('NO THROW', f);
+    });
   }
-})
+});
diff --git a/packages/cbor/test/utils.ava.js b/packages/cbor/test/utils.ava.js
index fb5274d8..45fa65ca 100644
--- a/packages/cbor/test/utils.ava.js
+++ b/packages/cbor/test/utils.ava.js
@@ -1,87 +1,87 @@
-'use strict'
+'use strict';
 
-const test = require('ava')
-const utils = require('../lib/utils')
-const {lbe} = require('./cases')
-const {hex, bin} = utils
-const {Buffer} = require('buffer') // NOT the mangled version
+const test = require('ava');
+const utils = require('../lib/utils');
+const {lbe} = require('./cases');
+const {hex, bin} = utils;
+const {Buffer} = require('buffer'); // NOT the mangled version
 
 test('bin', t => {
-  t.deepEqual(utils.bin('1'), hex('01'))
-  t.deepEqual(utils.bin('11'), hex('03'))
-  t.deepEqual(utils.bin('1100 0000 0000'), hex('0c00'))
-})
+  t.deepEqual(utils.bin('1'), hex('01'));
+  t.deepEqual(utils.bin('11'), hex('03'));
+  t.deepEqual(utils.bin('1100 0000 0000'), hex('0c00'));
+});
 
 test('parseCBORint', t => {
-  t.is(utils.parseCBORint(24, hex('ff')), 255)
-  t.is(utils.parseCBORint(25, hex('ffff')), 65535)
-  t.is(utils.parseCBORint(26, hex('00010000')), 65536)
-  t.is(utils.parseCBORint(27, hex('0000000100000000')), 4294967296)
+  t.is(utils.parseCBORint(24, hex('ff')), 255);
+  t.is(utils.parseCBORint(25, hex('ffff')), 65535);
+  t.is(utils.parseCBORint(26, hex('00010000')), 65536);
+  t.is(utils.parseCBORint(27, hex('0000000100000000')), 4294967296);
   t.throws(() => {
-    utils.parseCBORint(28, hex('ff'))
-  })
+    utils.parseCBORint(28, hex('ff'));
+  });
   t.throws(() => {
-    utils.parseCBORint(27, hex('ff'))
-  })
-})
+    utils.parseCBORint(27, hex('ff'));
+  });
+});
 
 test('parseCBORfloat', t => {
-  t.is(utils.parseCBORfloat(bin('0 00000 0000000000')), 0)
+  t.is(utils.parseCBORfloat(bin('0 00000 0000000000')), 0);
   t.is(utils.parseCBORfloat(bin('0 00000000 00000000000000000000000')),
-    0)
+    0);
   t.is(utils.parseCBORfloat(bin(
     '0 00000000000 0000000000000000000000000000000000000000000000000000'
-  )), 0)
+  )), 0);
   t.throws(() => {
-    utils.parseCBORfloat(hex('ff'))
-  })
+    utils.parseCBORfloat(hex('ff'));
+  });
   t.throws(() => {
-    utils.parseCBORfloat(hex('ff'))
-  })
-})
+    utils.parseCBORfloat(hex('ff'));
+  });
+});
 
 test('parseHalf', t => {
-  t.is(utils.parseHalf(bin('0 01111 0000000000')), 1)
-  t.deepEqual(utils.parseHalf(bin('1 10000 0000000000')), -2)
-  t.is(utils.parseHalf(bin('0 11110 1111111111')), 65504)
-  t.is(utils.parseHalf(bin('0 00001 0000000000')), 0.00006103515625)
-  t.is(utils.parseHalf(bin('0 00000 0000000000')), 0)
-  t.deepEqual(utils.parseHalf(bin('1 00000 0000000000')), -0)
-  t.deepEqual(utils.parseHalf(bin('0 11111 0000000000')), Infinity)
-  t.deepEqual(utils.parseHalf(bin('1 11111 0000000000')), -Infinity)
-})
+  t.is(utils.parseHalf(bin('0 01111 0000000000')), 1);
+  t.deepEqual(utils.parseHalf(bin('1 10000 0000000000')), -2);
+  t.is(utils.parseHalf(bin('0 11110 1111111111')), 65504);
+  t.is(utils.parseHalf(bin('0 00001 0000000000')), 0.00006103515625);
+  t.is(utils.parseHalf(bin('0 00000 0000000000')), 0);
+  t.deepEqual(utils.parseHalf(bin('1 00000 0000000000')), -0);
+  t.deepEqual(utils.parseHalf(bin('0 11111 0000000000')), Infinity);
+  t.deepEqual(utils.parseHalf(bin('1 11111 0000000000')), -Infinity);
+});
 
 test('arrayEqual', t => {
-  t.is(utils.arrayEqual(), true)
-  t.is(utils.arrayEqual([]), false)
-  t.is(utils.arrayEqual([], []), true)
-  t.is(utils.arrayEqual([1], []), false)
-  t.is(utils.arrayEqual([1, 2, 3], [1, 2, 3]), true)
-  t.is(utils.arrayEqual([1, 2, 3], [1, 2, 4]), false)
-})
+  t.is(utils.arrayEqual(), true);
+  t.is(utils.arrayEqual([]), false);
+  t.is(utils.arrayEqual([], []), true);
+  t.is(utils.arrayEqual([1], []), false);
+  t.is(utils.arrayEqual([1, 2, 3], [1, 2, 3]), true);
+  t.is(utils.arrayEqual([1, 2, 3], [1, 2, 4]), false);
+});
 
 test('guessEncoding', t => {
-  const buf = Buffer.from('0102', 'hex')
+  const buf = Buffer.from('0102', 'hex');
   const nof = utils.guessEncoding(
     buf.buffer.slice(buf.offset, buf.offset + buf.length)
-  )
-  t.is(nof.read().toString('hex'), '0102')
-  const ab = new ArrayBuffer(256)
-  const u16 = new Uint16Array(ab, 100, 3)
-  u16[0] = 512
-  u16[1] = 256
-  u16[2] = 1
-  const nof2 = utils.guessEncoding(u16)
-  t.is(nof2.read().toString('hex'), lbe('000200010100', '020001000001'))
-  t.throws(() => utils.guessEncoding())
-})
+  );
+  t.is(nof.read().toString('hex'), '0102');
+  const ab = new ArrayBuffer(256);
+  const u16 = new Uint16Array(ab, 100, 3);
+  u16[0] = 512;
+  u16[1] = 256;
+  u16[2] = 1;
+  const nof2 = utils.guessEncoding(u16);
+  t.is(nof2.read().toString('hex'), lbe('000200010100', '020001000001'));
+  t.throws(() => utils.guessEncoding());
+});
 
 test('cborValueToString', t => {
   // eslint-disable-next-line symbol-description
-  t.is(utils.cborValueToString(Symbol()), 'Symbol')
-  t.is(utils.cborValueToString(Symbol(')')), ')')
-  t.is(utils.cborValueToString(Symbol('))')), '))')
-  t.is(utils.cborValueToString(Symbol('(()')), '(()')
-  t.is(utils.cborValueToString(Symbol('foo')), 'foo')
-  t.is(utils.cborValueToString(Symbol('')), 'Symbol')
-})
+  t.is(utils.cborValueToString(Symbol()), 'Symbol');
+  t.is(utils.cborValueToString(Symbol(')')), ')');
+  t.is(utils.cborValueToString(Symbol('))')), '))');
+  t.is(utils.cborValueToString(Symbol('(()')), '(()');
+  t.is(utils.cborValueToString(Symbol('foo')), 'foo');
+  t.is(utils.cborValueToString(Symbol('')), 'Symbol');
+});
diff --git a/packages/cbor/vendor/binary-parse-stream/README.md b/packages/cbor/vendor/binary-parse-stream/README.md
index 54d01196..74315028 100644
--- a/packages/cbor/vendor/binary-parse-stream/README.md
+++ b/packages/cbor/vendor/binary-parse-stream/README.md
@@ -13,8 +13,8 @@
 ## Usage
 
 ```js
-const BinaryParseStream = require('binary-parse-stream')
-const {One} = BinaryParseStream // -1
+const BinaryParseStream = require('binary-parse-stream');
+const {One} = BinaryParseStream; // -1
 ```
 
   BinaryParseStream is a TransformStream that consumes buffers and outputs objects on the other end.
@@ -31,16 +31,16 @@ const {One} = BinaryParseStream // -1
 ```js
 class SillyProtocolParseStream extends BinaryParseStream {
   constructor(options) {
-    super(options)
-    this.count = 0
+    super(options);
+    this.count = 0;
   }
 
   *_parse() {
-    const type = (yield 4).readUInt32BE(0, true)
-    const length = yield -1
-    const buf = yield length
-    this.count++
-    return {type, buf}
+    const type = (yield 4).readUInt32BE(0, true);
+    const length = yield -1;
+    const buf = yield length;
+    this.count++;
+    return {type, buf};
   }
 }
 ```
diff --git a/packages/cbor/vendor/binary-parse-stream/index.js b/packages/cbor/vendor/binary-parse-stream/index.js
index e3b1cafc..938ce1c6 100644
--- a/packages/cbor/vendor/binary-parse-stream/index.js
+++ b/packages/cbor/vendor/binary-parse-stream/index.js
@@ -7,9 +7,10 @@
 // binary-parse-stream is now unmaintained, so I have rewritten it as
 // more modern JS so I can get tsc to help check types.
 
-'use strict'
-const stream = require('stream')
-const NoFilter = require('nofilter')
+'use strict';
+// eslint-disable-next-line n/prefer-node-protocol
+const stream = require('stream');
+const NoFilter = require('nofilter');
 
 /**
  * BinaryParseStream is a TransformStream that consumes buffers and outputs
@@ -28,16 +29,16 @@ class BinaryParseStream extends stream.Transform {
    * @param {stream.TransformOptions} options Stream options.
    */
   constructor(options) {
-    super(options)
+    super(options);
     // Doesn't work to pass these in as opts, for some reason
     // also, work around typescript not knowing TransformStream internals
     // eslint-disable-next-line dot-notation
-    this['_writableState'].objectMode = false
+    this['_writableState'].objectMode = false;
     // eslint-disable-next-line dot-notation
-    this['_readableState'].objectMode = true
+    this['_readableState'].objectMode = true;
 
-    this.bs = new NoFilter()
-    this.__restart()
+    this.bs = new NoFilter();
+    this.__restart();
   }
 
   /**
@@ -49,33 +50,33 @@ class BinaryParseStream extends stream.Transform {
    * @ignore
    */
   _transform(fresh, encoding, cb) {
-    this.bs.write(fresh)
+    this.bs.write(fresh);
 
     while (this.bs.length >= this.__needed) {
-      let ret = null
+      let ret = null;
       const chunk = (this.__needed === null) ?
         undefined :
-        this.bs.read(this.__needed)
+        this.bs.read(this.__needed);
 
       try {
-        ret = this.__parser.next(chunk)
+        ret = this.__parser.next(chunk);
       } catch (e) {
-        return cb(e)
+        return cb(e);
       }
 
       if (this.__needed) {
-        this.__fresh = false
+        this.__fresh = false;
       }
 
       if (ret.done) {
-        this.push(ret.value)
-        this.__restart()
+        this.push(ret.value);
+        this.__restart();
       } else {
-        this.__needed = ret.value || Infinity
+        this.__needed = ret.value || Infinity;
       }
     }
 
-    return cb()
+    return cb();
   }
 
   /**
@@ -87,13 +88,13 @@ class BinaryParseStream extends stream.Transform {
    */
   /* istanbul ignore next */
   *_parse() { // eslint-disable-line class-methods-use-this, require-yield
-    throw new Error('Must be implemented in subclass')
+    throw new Error('Must be implemented in subclass');
   }
 
   __restart() {
-    this.__needed = null
-    this.__parser = this._parse()
-    this.__fresh = true
+    this.__needed = null;
+    this.__parser = this._parse();
+    this.__fresh = true;
   }
 
   /**
@@ -103,8 +104,8 @@ class BinaryParseStream extends stream.Transform {
    * @ignore
    */
   _flush(cb) {
-    cb(this.__fresh ? null : new Error('unexpected end of input'))
+    cb(this.__fresh ? null : new Error('unexpected end of input'));
   }
 }
 
-module.exports = BinaryParseStream
+module.exports = BinaryParseStream;
diff --git a/packages/parcel-demo/.eslintrc.cjs b/packages/parcel-demo/.eslintrc.cjs
deleted file mode 100644
index 3728c171..00000000
--- a/packages/parcel-demo/.eslintrc.cjs
+++ /dev/null
@@ -1,15 +0,0 @@
-module.exports = {
-  env: {
-    browser: true,
-  },
-  parserOptions: {sourceType: 'module'},
-  rules: {
-    'node/no-unsupported-features/es-syntax': [
-      'error',
-      {
-        version: '>=12.19',
-        ignores: ['modules'],
-      },
-    ],
-  },
-}
diff --git a/packages/parcel-demo/package.json b/packages/parcel-demo/package.json
index b30f3be3..f5560a33 100644
--- a/packages/parcel-demo/package.json
+++ b/packages/parcel-demo/package.json
@@ -19,23 +19,23 @@
     "directory": "packages/parcel-demo"
   },
   "devDependencies": {
-    "@parcel/core": "2.8.3",
-    "@parcel/optimizer-data-url": "2.8.3",
-    "@parcel/transformer-inline-string": "2.8.3",
-    "bignumber.js": "9.1.1",
-    "buffer": "5.5.0",
+    "@parcel/core": "2.12.0",
+    "@parcel/optimizer-data-url": "2.12.0",
+    "@parcel/transformer-inline-string": "2.12.0",
+    "bignumber.js": "9.1.2",
+    "buffer": "6.0.3",
     "cbor": "^9.0.2",
     "cbor-bigdecimal": "^9.0.0",
     "copyfiles": "^2.4.1",
     "events": "3.3.0",
-    "node-inspect-extracted": "^2.0.2",
-    "parcel": "2.8.3",
-    "postcss": "^8.4.23",
+    "node-inspect-extracted": "^3.0.2",
+    "parcel": "2.12.0",
+    "postcss": "^8.4.47",
     "process": "0.11.10",
-    "regenerator-runtime": "^0.13.11",
-    "rimraf": "^5.0.0",
+    "regenerator-runtime": "^0.14.1",
+    "rimraf": "^6.0.1",
     "stream-browserify": "3.0.0",
-    "svgo": "3.0.2"
+    "svgo": "3.3.2"
   },
   "engines": {
     "node": ">=16"
diff --git a/packages/parcel-demo/src/index-p.js b/packages/parcel-demo/src/index-p.js
index d510687d..2dc1bcda 100644
--- a/packages/parcel-demo/src/index-p.js
+++ b/packages/parcel-demo/src/index-p.js
@@ -1,111 +1,111 @@
-import 'regenerator-runtime/runtime.js'
-import * as cbor from 'cbor'
-import {Buffer} from 'buffer'
-import bdec from 'cbor-bigdecimal'
-import {inspect} from 'node-inspect-extracted'
+import 'regenerator-runtime/runtime.js';
+import * as cbor from 'cbor';
+import {Buffer} from 'buffer';
+import bdec from 'cbor-bigdecimal';
+import {inspect} from 'node-inspect-extracted';
 
-bdec(cbor)
+bdec(cbor);
 
-const ofmt = document.getElementById('output-fmt')
-const otxt = document.getElementById('output-text')
-const itxt = document.getElementById('input-text')
-const ifmt = document.getElementById('input-fmt')
-const copy = document.getElementById('copy')
+const ofmt = document.getElementById('output-fmt');
+const otxt = document.getElementById('output-text');
+const itxt = document.getElementById('input-text');
+const ifmt = document.getElementById('input-fmt');
+const copy = document.getElementById('copy');
 
 function error(e) {
-  copy.disabled = true
-  otxt.value = e.toString()
+  copy.disabled = true;
+  otxt.value = e.toString();
 }
 
 // Convert any input to a buffer
 function input() {
-  const inp = ifmt.selectedOptions[0].label
-  const txt = itxt.value
+  const inp = ifmt.selectedOptions[0].label;
+  const txt = itxt.value;
   switch (inp) {
     case 'JSON':
-      return cbor.encodeOne(JSON.parse(txt), {canonical: true})
+      return cbor.encodeOne(JSON.parse(txt), {canonical: true});
     case 'hex':
     case 'base64':
-      return Buffer.from(txt, inp)
+      return Buffer.from(txt, inp);
     default:
-      throw new Error(`Unknown input: "${inp}"`)
+      throw new Error(`Unknown input: "${inp}"`);
   }
 }
 
 // Convert a buffer to the desired output format
 function output(buf, typ) {
-  const outp = ofmt.selectedOptions[0].label
+  const outp = ofmt.selectedOptions[0].label;
   switch (outp) {
     case 'hex':
     case 'base64':
-      copy.disabled = false
-      otxt.value = buf.toString(outp)
-      break
+      copy.disabled = false;
+      otxt.value = buf.toString(outp);
+      break;
     case 'commented':
-      copy.disabled = true
+      copy.disabled = true;
       cbor.comment(buf).then(txt => {
-        otxt.value = txt
-      }, error)
-      break
+        otxt.value = txt;
+      }, error);
+      break;
     case 'diagnostic':
-      copy.disabled = true
+      copy.disabled = true;
       cbor.diagnose(buf).then(txt => {
-        otxt.value = txt
-      }, error)
-      break
+        otxt.value = txt;
+      }, error);
+      break;
     case 'js':
-      copy.disabled = true
+      copy.disabled = true;
       cbor.decodeFirst(buf).then(o => {
         otxt.value = inspect(o, {
           depth: Infinity,
           compact: 1,
           maxArrayLength: Infinity,
           breakLength: otxt.cols - 1,
-        })
-      }, error)
-      break
+        });
+      }, error);
+      break;
     case 'JSON':
-      copy.disabled = false
+      copy.disabled = false;
       cbor.decodeFirst(buf).then(o => {
-        otxt.value = JSON.stringify(o, null, 2)
-      }, error)
-      break
+        otxt.value = JSON.stringify(o, null, 2);
+      }, error);
+      break;
     default:
-      throw new Error(`Unknown output: "${outp}"`)
+      throw new Error(`Unknown output: "${outp}"`);
   }
 }
 
 function convert() {
   try {
-    output(input())
+    output(input());
   } catch (e) {
-    error(e)
+    error(e);
   }
 }
 
-ofmt.oninput = convert
-ifmt.oninput = convert
+ofmt.oninput = convert;
+ifmt.oninput = convert;
 copy.onclick = () => {
   // Copy output to input, and guess the new input format
-  itxt.value = otxt.value
-  const sel = ofmt.selectedOptions[0].label
+  itxt.value = otxt.value;
+  const sel = ofmt.selectedOptions[0].label;
   for (const o of ifmt.options) {
     if (o.label === sel) {
-      ifmt.selectedIndex = o.index
-      break
+      ifmt.selectedIndex = o.index;
+      break;
     }
   }
-}
+};
 
 // Debounce
-let timeout = null
+let timeout = null;
 itxt.oninput = () => {
-  clearTimeout(timeout)
+  clearTimeout(timeout);
   timeout = setTimeout(() => {
-    timeout = null
-    convert()
-  }, 300)
-}
+    timeout = null;
+    convert();
+  }, 300);
+};
 
 // Make sure that initial output is set
-convert()
+convert();
diff --git a/packages/plain-demo/.npmrc b/packages/plain-demo/.npmrc
index 4c1bf779..b6f27f13 100644
--- a/packages/plain-demo/.npmrc
+++ b/packages/plain-demo/.npmrc
@@ -1,2 +1 @@
 engine-strict=true
-package-lock=false
diff --git a/packages/plain-demo/build.js b/packages/plain-demo/build.js
index eeea6f15..0cebadb4 100755
--- a/packages/plain-demo/build.js
+++ b/packages/plain-demo/build.js
@@ -1,79 +1,79 @@
 /* eslint-disable no-console */
-'use strict'
+'use strict';
 
-const fs = require('fs')
-const path = require('path')
-const bresolve = require('browser-resolve')
+const fs = require('node:fs');
+const path = require('node:path');
+const bresolve = require('browser-resolve');
 
-const src = path.join(__dirname, 'src')
-const dist = path.join(__dirname, 'dist')
+const src = path.join(__dirname, 'src');
+const dist = path.join(__dirname, 'dist');
 try {
   fs.rmSync(dist, {
     recursive: true,
     force: true,
-  })
+  });
 } catch (ignored) {
-  console.warn(`Warning: could not delete "${dist}"`)
+  console.warn(`Warning: could not delete "${dist}"`);
 }
 
-const have = new Set()
-const needed = new Set()
-const transform = new Set()
+const have = new Set();
+const needed = new Set();
+const transform = new Set();
 
 try {
-  fs.mkdirSync(dist)
+  fs.mkdirSync(dist);
 } catch (ignored) {
-  console.warn(`Warning: could not create "${dist}"`)
+  console.warn(`Warning: could not create "${dist}"`);
 }
 
 // eslint-disable-next-line prefer-named-capture-group
-const script = / !have.has(x)))
+const scripts = new Set([...needed].filter(x => !have.has(x)));
 // Find the scripts we don't have yet.  Assume each one is
 // a single file.
-const scriptNames = {}
+const scriptNames = {};
 for (const s of scripts) {
-  const scriptSrc = bresolve.sync(s, {filename: __filename})
-  const local = path.basename(scriptSrc)
-  scriptNames[s] = local
+  const scriptSrc = bresolve.sync(s, {filename: __filename});
+  const local = path.basename(scriptSrc);
+  scriptNames[s] = local;
 
-  console.log(`Resolve: ${s} (${path.relative(__dirname, scriptSrc)})`)
-  fs.copyFileSync(scriptSrc, path.join(dist, local))
+  console.log(`Resolve: ${s} (${path.relative(__dirname, scriptSrc)})`);
+  fs.copyFileSync(scriptSrc, path.join(dist, local));
 }
 
 for (const s of transform) {
-  const srcFile = path.join(src, s)
-  let html = fs.readFileSync(srcFile, 'utf8')
+  const srcFile = path.join(src, s);
+  let html = fs.readFileSync(srcFile, 'utf8');
   html = html.replace(script, (m, orig) => {
-    const local = scriptNames[orig]
-    return local ? `