@blockcerts/blockcerts-verifier 1.61.0 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle-stats.html +1 -1
- package/dist/{EcdsaSecp256k1Signature2019-Z9cbZqwb-BZqYyWXC.js → EcdsaSecp256k1Signature2019-aV3C41Ue-_mP0Wq_n.js} +2 -2
- package/dist/{Ed25519Signature2020-gHlOabgN-BQNMKhh-.js → Ed25519Signature2020-CL2yKnJW-NRYSGvkI.js} +5 -5
- package/dist/{HashlinkVerifier-JKby3RuX-Bn4E9EeP.js → HashlinkVerifier-MEwSZe4T-BdYYAALa.js} +1 -1
- package/dist/{MerkleProof2017-qKpIAsVw-Diu6ftp6.js → MerkleProof2017-CNSx436a-FBaGRIN1.js} +1 -1
- package/dist/{MerkleProof2019-lYqSLW83-CdVVDNe8.js → MerkleProof2019-DnbP3r0f-Cp4GWjQh.js} +1 -1
- package/dist/{checkCredentialSchemaConformity-wYKX-T36-TKejNdGn.js → checkCredentialSchemaConformity-QPmIWPLG-De1kKyvF.js} +1 -1
- package/dist/{checkRevocationStatusList2021-Zs7RTfS8-B_SBTuUQ.js → checkRevocationStatusList2021-Cy-rWyh7-CVOeAbdp.js} +1 -1
- package/dist/controlVerificationMethod-CXzAI0QS-b45qIaR4.js +1 -0
- package/dist/{did-key-common.esm-pD02457t-BaQe2n2J.js → did-key-common.esm-CJj7pea6-Er8YwHoJ.js} +3 -3
- package/dist/{did-key-ed25519.esm-QkrYsBOv-KuYPtNeV.js → did-key-ed25519.esm-hEATvNhJ-CHAq7sf1.js} +1 -1
- package/dist/{did-key-secp256k1.esm-byA8GFc3-AosubhwX.js → did-key-secp256k1.esm-CIEM56eq-EQahxyFZ.js} +1 -1
- package/dist/{index-zUaES8qy-CMAhMZvu.js → index-DWAZG7Ja-CBt_boC3.js} +2 -2
- package/dist/{jsonld-signatures-Lb-laFSH-v4kRGxlk.js → jsonld-signatures-zDEkNjYR-D3vK8GYH.js} +7 -7
- package/dist/main.js +42 -32
- package/dist/{x25519-axOdeC_8-BeczdkXC.js → x25519-BzvT3haI-DcUk09rC.js} +1 -1
- package/package.json +2 -2
- package/dist/controlVerificationMethod-MnvnHDi1-BAzkUIZW.js +0 -1
- /package/dist/{Suite-Bhitn5l3-D1ucdMDB.js → Suite-B7Vy9AuU-D1ucdMDB.js} +0 -0
- /package/dist/{_commonjs-dynamic-modules-F7P8sER7-BHR_E30J.js → _commonjs-dynamic-modules-COweQ1RR-BHR_E30J.js} +0 -0
- /package/dist/{base64url-qi3FT6uz-vkTPfQOh.js → base64url-Cy03LJLt-vkTPfQOh.js} +0 -0
- /package/dist/{elliptic-ycTr8sXF-D-NH8siB.js → elliptic-DVE5q-l5-D-NH8siB.js} +0 -0
- /package/dist/{ensureNotRevoked-EDQJmT-v-DvMIgM4L.js → ensureNotRevoked-bD_ITwQb-DvMIgM4L.js} +0 -0
- /package/dist/{ensureValidIssuingKey-_gUzjB7e-frafTbMl.js → ensureValidIssuingKey-wRebznsK-frafTbMl.js} +0 -0
- /package/dist/{index-tKimblBp-Dgus2xdV.js → index-CcA_A5fd-Dgus2xdV.js} +0 -0
- /package/dist/{index-CZOUZnn4-ZifknGWx.js → index-DUjMpuQT-ZifknGWx.js} +0 -0
- /package/dist/{index-qAZ-fmOX-CHN5LgUq.js → index-yP42zfkJ-CHN5LgUq.js} +0 -0
- /package/dist/{jsonld-8ujMRGin-D_C9ciG_.js → jsonld-Pr6hPH-i-D_C9ciG_.js} +0 -0
- /package/dist/{pako.esm-jjCKMBM4-HambcU-w.js → pako.esm-DnD5dZGi-HambcU-w.js} +0 -0
- /package/dist/{sha256-OznnmV9J-BYFBxJ7m.js → sha256-wKiO0px2-BYFBxJ7m.js} +0 -0
- /package/dist/{tslib.es6-M1zqH4el-CmLYFWVC.js → tslib.es6-CNEFicEt-CmLYFWVC.js} +0 -0
package/dist/{HashlinkVerifier-JKby3RuX-Bn4E9EeP.js → HashlinkVerifier-MEwSZe4T-BdYYAALa.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as l,g as n,s as u}from"./main.js";import{c as e}from"./_commonjs-dynamic-modules-
|
|
1
|
+
import{a as l,g as n,s as u}from"./main.js";import{c as e}from"./_commonjs-dynamic-modules-COweQ1RR-BHR_E30J.js";var t,r={exports:{}};
|
|
2
2
|
/*! For license information please see cbor.js.LICENSE.txt */t=()=>(()=>{var l={8599:l=>{const{AbortController:n,AbortSignal:u}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;l.exports=n,l.exports.AbortSignal=u,l.exports.default=n},9742:(l,n)=>{n.byteLength=function(l){var n=o(l),u=n[0],e=n[1];return 3*(u+e)/4-e},n.toByteArray=function(l){var n,u,r=o(l),i=r[0],s=r[1],a=new t(function(l,n,u){return 3*(n+u)/4-u}(0,i,s)),c=0,f=s>0?i-4:i;for(u=0;u<f;u+=4)n=e[l.charCodeAt(u)]<<18|e[l.charCodeAt(u+1)]<<12|e[l.charCodeAt(u+2)]<<6|e[l.charCodeAt(u+3)],a[c++]=n>>16&255,a[c++]=n>>8&255,a[c++]=255&n;return 2===s&&(n=e[l.charCodeAt(u)]<<2|e[l.charCodeAt(u+1)]>>4,a[c++]=255&n),1===s&&(n=e[l.charCodeAt(u)]<<10|e[l.charCodeAt(u+1)]<<4|e[l.charCodeAt(u+2)]>>2,a[c++]=n>>8&255,a[c++]=255&n),a},n.fromByteArray=function(l){for(var n,e=l.length,t=e%3,r=[],i=16383,o=0,a=e-t;o<a;o+=i)r.push(s(l,o,o+i>a?a:o+i));return 1===t?(n=l[e-1],r.push(u[n>>2]+u[n<<4&63]+"==")):2===t&&(n=(l[e-2]<<8)+l[e-1],r.push(u[n>>10]+u[n>>4&63]+u[n<<2&63]+"=")),r.join("")};for(var u=[],e=[],t="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)u[i]=r[i],e[r.charCodeAt(i)]=i;function o(l){var n=l.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var u=l.indexOf("=");return-1===u&&(u=n),[u,u===n?0:4-u%4]}function s(l,n,e){for(var t,r,i=[],o=n;o<e;o+=3)t=(l[o]<<16&16711680)+(l[o+1]<<8&65280)+(255&l[o+2]),i.push(u[(r=t)>>18&63]+u[r>>12&63]+u[r>>6&63]+u[63&r]);return i.join("")}e["-".charCodeAt(0)]=62,e["_".charCodeAt(0)]=63},8764:(l,n,u)=>{const e=u(9742),t=u(645),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=s,n.SlowBuffer=function(l){return+l!=l&&(l=0),s.alloc(+l)},n.INSPECT_MAX_BYTES=50;const i=2147483647;function o(l){if(l>i)throw new RangeError('The value "'+l+'" is invalid for option "size"');const n=new Uint8Array(l);return Object.setPrototypeOf(n,s.prototype),n}function s(l,n,u){if("number"==typeof l){if("string"==typeof n)throw new TypeError('The "string" argument must be of type string. Received type number');return f(l)}return a(l,n,u)}function a(l,n,u){if("string"==typeof l)return function(l,n){if("string"==typeof n&&""!==n||(n="utf8"),!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);const u=0|g(l,n);let e=o(u);const t=e.write(l,n);return t!==u&&(e=e.slice(0,t)),e}(l,n);if(ArrayBuffer.isView(l))return function(l){if(q(l,Uint8Array)){const n=new Uint8Array(l);return d(n.buffer,n.byteOffset,n.byteLength)}return h(l)}(l);if(null==l)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(q(l,ArrayBuffer)||l&&q(l.buffer,ArrayBuffer))return d(l,n,u);if("undefined"!=typeof SharedArrayBuffer&&(q(l,SharedArrayBuffer)||l&&q(l.buffer,SharedArrayBuffer)))return d(l,n,u);if("number"==typeof l)throw new TypeError('The "value" argument must not be of type number. Received type number');const e=l.valueOf&&l.valueOf();if(null!=e&&e!==l)return s.from(e,n,u);const t=function(l){if(s.isBuffer(l)){const n=0|p(l.length),u=o(n);return 0===u.length||l.copy(u,0,0,n),u}return void 0!==l.length?"number"!=typeof l.length||J(l.length)?o(0):h(l):"Buffer"===l.type&&Array.isArray(l.data)?h(l.data):void 0}(l);if(t)return t;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof l[Symbol.toPrimitive])return s.from(l[Symbol.toPrimitive]("string"),n,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}function c(l){if("number"!=typeof l)throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function f(l){return c(l),o(l<0?0:0|p(l))}function h(l){const n=l.length<0?0:0|p(l.length),u=o(n);for(let e=0;e<n;e+=1)u[e]=255&l[e];return u}function d(l,n,u){if(n<0||l.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<n+(u||0))throw new RangeError('"length" is outside of buffer bounds');let e;return e=void 0===n&&void 0===u?new Uint8Array(l):void 0===u?new Uint8Array(l,n):new Uint8Array(l,n,u),Object.setPrototypeOf(e,s.prototype),e}function p(l){if(l>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|l}function g(l,n){if(s.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||q(l,ArrayBuffer))return l.byteLength;if("string"!=typeof l)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof l);const u=l.length,e=arguments.length>2&&!0===arguments[2];if(!e&&0===u)return 0;let t=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Y(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*u;case"hex":return u>>>1;case"base64":return V(l).length;default:if(t)return e?-1:Y(l).length;n=(""+n).toLowerCase(),t=!0}}function y(l,n,u){let e=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===u||u>this.length)&&(u=this.length),u<=0)return"";if((u>>>=0)<=(n>>>=0))return"";for(l||(l="utf8");;)switch(l){case"hex":return U(this,n,u);case"utf8":case"utf-8":return I(this,n,u);case"ascii":return B(this,n,u);case"latin1":case"binary":return x(this,n,u);case"base64":return T(this,n,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,n,u);default:if(e)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),e=!0}}function b(l,n,u){const e=l[n];l[n]=l[u],l[u]=e}function w(l,n,u,e,t){if(0===l.length)return-1;if("string"==typeof u?(e=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),J(u=+u)&&(u=t?0:l.length-1),u<0&&(u=l.length+u),u>=l.length){if(t)return-1;u=l.length-1}else if(u<0){if(!t)return-1;u=0}if("string"==typeof n&&(n=s.from(n,e)),s.isBuffer(n))return 0===n.length?-1:m(l,n,u,e,t);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?t?Uint8Array.prototype.indexOf.call(l,n,u):Uint8Array.prototype.lastIndexOf.call(l,n,u):m(l,[n],u,e,t);throw new TypeError("val must be string, number or Buffer")}function m(l,n,u,e,t){let r,i=1,o=l.length,s=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(l.length<2||n.length<2)return-1;i=2,o/=2,s/=2,u/=2}function a(l,n){return 1===i?l[n]:l.readUInt16BE(n*i)}if(t){let e=-1;for(r=u;r<o;r++)if(a(l,r)===a(n,-1===e?0:r-e)){if(-1===e&&(e=r),r-e+1===s)return e*i}else-1!==e&&(r-=r-e),e=-1}else for(u+s>o&&(u=o-s),r=u;r>=0;r--){let u=!0;for(let e=0;e<s;e++)if(a(l,r+e)!==a(n,e)){u=!1;break}if(u)return r}return-1}function _(l,n,u,e){u=Number(u)||0;const t=l.length-u;e?(e=Number(e))>t&&(e=t):e=t;const r=n.length;let i;for(e>r/2&&(e=r/2),i=0;i<e;++i){const e=parseInt(n.substr(2*i,2),16);if(J(e))return i;l[u+i]=e}return i}function E(l,n,u,e){return z(Y(n,l.length-u),l,u,e)}function S(l,n,u,e){return z(function(l){const n=[];for(let u=0;u<l.length;++u)n.push(255&l.charCodeAt(u));return n}(n),l,u,e)}function A(l,n,u,e){return z(V(n),l,u,e)}function v(l,n,u,e){return z(function(l,n){let u,e,t;const r=[];for(let i=0;i<l.length&&!((n-=2)<0);++i)u=l.charCodeAt(i),e=u>>8,t=u%256,r.push(t),r.push(e);return r}(n,l.length-u),l,u,e)}function T(l,n,u){return 0===n&&u===l.length?e.fromByteArray(l):e.fromByteArray(l.slice(n,u))}function I(l,n,u){u=Math.min(l.length,u);const e=[];let t=n;for(;t<u;){const n=l[t];let r=null,i=n>239?4:n>223?3:n>191?2:1;if(t+i<=u){let u,e,o,s;switch(i){case 1:n<128&&(r=n);break;case 2:u=l[t+1],128==(192&u)&&(s=(31&n)<<6|63&u,s>127&&(r=s));break;case 3:u=l[t+1],e=l[t+2],128==(192&u)&&128==(192&e)&&(s=(15&n)<<12|(63&u)<<6|63&e,s>2047&&(s<55296||s>57343)&&(r=s));break;case 4:u=l[t+1],e=l[t+2],o=l[t+3],128==(192&u)&&128==(192&e)&&128==(192&o)&&(s=(15&n)<<18|(63&u)<<12|(63&e)<<6|63&o,s>65535&&s<1114112&&(r=s))}}null===r?(r=65533,i=1):r>65535&&(r-=65536,e.push(r>>>10&1023|55296),r=56320|1023&r),e.push(r),t+=i}return function(l){const n=l.length;if(n<=R)return String.fromCharCode.apply(String,l);let u="",e=0;for(;e<n;)u+=String.fromCharCode.apply(String,l.slice(e,e+=R));return u}(e)}n.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=function(){try{const l=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(l,n),42===l.foo()}catch(l){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(l,n,u){return a(l,n,u)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(l,n,u){return function(l,n,u){return c(l),l<=0?o(l):void 0!==n?"string"==typeof u?o(l).fill(n,u):o(l).fill(n):o(l)}(l,n,u)},s.allocUnsafe=function(l){return f(l)},s.allocUnsafeSlow=function(l){return f(l)},s.isBuffer=function(l){return null!=l&&!0===l._isBuffer&&l!==s.prototype},s.compare=function(l,n){if(q(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),q(n,Uint8Array)&&(n=s.from(n,n.offset,n.byteLength)),!s.isBuffer(l)||!s.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===n)return 0;let u=l.length,e=n.length;for(let t=0,r=Math.min(u,e);t<r;++t)if(l[t]!==n[t]){u=l[t],e=n[t];break}return u<e?-1:e<u?1:0},s.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(l,n){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(0===l.length)return s.alloc(0);let u;if(void 0===n)for(n=0,u=0;u<l.length;++u)n+=l[u].length;const e=s.allocUnsafe(n);let t=0;for(u=0;u<l.length;++u){let n=l[u];if(q(n,Uint8Array))t+n.length>e.length?(s.isBuffer(n)||(n=s.from(n)),n.copy(e,t)):Uint8Array.prototype.set.call(e,n,t);else{if(!s.isBuffer(n))throw new TypeError('"list" argument must be an Array of Buffers');n.copy(e,t)}t+=n.length}return e},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const l=this.length;if(l%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<l;n+=2)b(this,n,n+1);return this},s.prototype.swap32=function(){const l=this.length;if(l%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<l;n+=4)b(this,n,n+3),b(this,n+1,n+2);return this},s.prototype.swap64=function(){const l=this.length;if(l%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<l;n+=8)b(this,n,n+7),b(this,n+1,n+6),b(this,n+2,n+5),b(this,n+3,n+4);return this},s.prototype.toString=function(){const l=this.length;return 0===l?"":0===arguments.length?I(this,0,l):y.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(l){if(!s.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l||0===s.compare(this,l)},s.prototype.inspect=function(){let l="";const u=n.INSPECT_MAX_BYTES;return l=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(l+=" ... "),"<Buffer "+l+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(l,n,u,e,t){if(q(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(void 0===n&&(n=0),void 0===u&&(u=l?l.length:0),void 0===e&&(e=0),void 0===t&&(t=this.length),n<0||u>l.length||e<0||t>this.length)throw new RangeError("out of range index");if(e>=t&&n>=u)return 0;if(e>=t)return-1;if(n>=u)return 1;if(this===l)return 0;let r=(t>>>=0)-(e>>>=0),i=(u>>>=0)-(n>>>=0);const o=Math.min(r,i),a=this.slice(e,t),c=l.slice(n,u);for(let l=0;l<o;++l)if(a[l]!==c[l]){r=a[l],i=c[l];break}return r<i?-1:i<r?1:0},s.prototype.includes=function(l,n,u){return-1!==this.indexOf(l,n,u)},s.prototype.indexOf=function(l,n,u){return w(this,l,n,u,!0)},s.prototype.lastIndexOf=function(l,n,u){return w(this,l,n,u,!1)},s.prototype.write=function(l,n,u,e){if(void 0===n)e="utf8",u=this.length,n=0;else if(void 0===u&&"string"==typeof n)e=n,u=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n>>>=0,isFinite(u)?(u>>>=0,void 0===e&&(e="utf8")):(e=u,u=void 0)}const t=this.length-n;if((void 0===u||u>t)&&(u=t),l.length>0&&(u<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");let r=!1;for(;;)switch(e){case"hex":return _(this,l,n,u);case"utf8":case"utf-8":return E(this,l,n,u);case"ascii":case"latin1":case"binary":return S(this,l,n,u);case"base64":return A(this,l,n,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,l,n,u);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),r=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function B(l,n,u){let e="";u=Math.min(l.length,u);for(let t=n;t<u;++t)e+=String.fromCharCode(127&l[t]);return e}function x(l,n,u){let e="";u=Math.min(l.length,u);for(let t=n;t<u;++t)e+=String.fromCharCode(l[t]);return e}function U(l,n,u){const e=l.length;(!n||n<0)&&(n=0),(!u||u<0||u>e)&&(u=e);let t="";for(let e=n;e<u;++e)t+=X[l[e]];return t}function N(l,n,u){const e=l.slice(n,u);let t="";for(let l=0;l<e.length-1;l+=2)t+=String.fromCharCode(e[l]+256*e[l+1]);return t}function k(l,n,u){if(l%1!=0||l<0)throw new RangeError("offset is not uint");if(l+n>u)throw new RangeError("Trying to access beyond buffer length")}function O(l,n,u,e,t,r){if(!s.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>t||n<r)throw new RangeError('"value" argument is out of bounds');if(u+e>l.length)throw new RangeError("Index out of range")}function L(l,n,u,e,t){W(n,e,t,l,u,7);let r=Number(n&BigInt(4294967295));l[u++]=r,r>>=8,l[u++]=r,r>>=8,l[u++]=r,r>>=8,l[u++]=r;let i=Number(n>>BigInt(32)&BigInt(4294967295));return l[u++]=i,i>>=8,l[u++]=i,i>>=8,l[u++]=i,i>>=8,l[u++]=i,u}function M(l,n,u,e,t){W(n,e,t,l,u,7);let r=Number(n&BigInt(4294967295));l[u+7]=r,r>>=8,l[u+6]=r,r>>=8,l[u+5]=r,r>>=8,l[u+4]=r;let i=Number(n>>BigInt(32)&BigInt(4294967295));return l[u+3]=i,i>>=8,l[u+2]=i,i>>=8,l[u+1]=i,i>>=8,l[u]=i,u+8}function P(l,n,u,e,t,r){if(u+e>l.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function C(l,n,u,e,r){return n=+n,u>>>=0,r||P(l,0,u,4),t.write(l,n,u,e,23,4),u+4}function j(l,n,u,e,r){return n=+n,u>>>=0,r||P(l,0,u,8),t.write(l,n,u,e,52,8),u+8}s.prototype.slice=function(l,n){const u=this.length;(l=~~l)<0?(l+=u)<0&&(l=0):l>u&&(l=u),(n=void 0===n?u:~~n)<0?(n+=u)<0&&(n=0):n>u&&(n=u),n<l&&(n=l);const e=this.subarray(l,n);return Object.setPrototypeOf(e,s.prototype),e},s.prototype.readUintLE=s.prototype.readUIntLE=function(l,n,u){l>>>=0,n>>>=0,u||k(l,n,this.length);let e=this[l],t=1,r=0;for(;++r<n&&(t*=256);)e+=this[l+r]*t;return e},s.prototype.readUintBE=s.prototype.readUIntBE=function(l,n,u){l>>>=0,n>>>=0,u||k(l,n,this.length);let e=this[l+--n],t=1;for(;n>0&&(t*=256);)e+=this[l+--n]*t;return e},s.prototype.readUint8=s.prototype.readUInt8=function(l,n){return l>>>=0,n||k(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,n){return l>>>=0,n||k(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,n){return l>>>=0,n||k(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,n){return l>>>=0,n||k(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+16777216*this[l+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,n){return l>>>=0,n||k(l,4,this.length),16777216*this[l]+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readBigUInt64LE=Q((function(l){K(l>>>=0,"offset");const n=this[l],u=this[l+7];void 0!==n&&void 0!==u||G(l,this.length-8);const e=n+256*this[++l]+65536*this[++l]+this[++l]*2**24,t=this[++l]+256*this[++l]+65536*this[++l]+u*2**24;return BigInt(e)+(BigInt(t)<<BigInt(32))})),s.prototype.readBigUInt64BE=Q((function(l){K(l>>>=0,"offset");const n=this[l],u=this[l+7];void 0!==n&&void 0!==u||G(l,this.length-8);const e=n*2**24+65536*this[++l]+256*this[++l]+this[++l],t=this[++l]*2**24+65536*this[++l]+256*this[++l]+u;return(BigInt(e)<<BigInt(32))+BigInt(t)})),s.prototype.readIntLE=function(l,n,u){l>>>=0,n>>>=0,u||k(l,n,this.length);let e=this[l],t=1,r=0;for(;++r<n&&(t*=256);)e+=this[l+r]*t;return t*=128,e>=t&&(e-=Math.pow(2,8*n)),e},s.prototype.readIntBE=function(l,n,u){l>>>=0,n>>>=0,u||k(l,n,this.length);let e=n,t=1,r=this[l+--e];for(;e>0&&(t*=256);)r+=this[l+--e]*t;return t*=128,r>=t&&(r-=Math.pow(2,8*n)),r},s.prototype.readInt8=function(l,n){return l>>>=0,n||k(l,1,this.length),128&this[l]?-1*(255-this[l]+1):this[l]},s.prototype.readInt16LE=function(l,n){l>>>=0,n||k(l,2,this.length);const u=this[l]|this[l+1]<<8;return 32768&u?4294901760|u:u},s.prototype.readInt16BE=function(l,n){l>>>=0,n||k(l,2,this.length);const u=this[l+1]|this[l]<<8;return 32768&u?4294901760|u:u},s.prototype.readInt32LE=function(l,n){return l>>>=0,n||k(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,n){return l>>>=0,n||k(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readBigInt64LE=Q((function(l){K(l>>>=0,"offset");const n=this[l],u=this[l+7];void 0!==n&&void 0!==u||G(l,this.length-8);const e=this[l+4]+256*this[l+5]+65536*this[l+6]+(u<<24);return(BigInt(e)<<BigInt(32))+BigInt(n+256*this[++l]+65536*this[++l]+this[++l]*2**24)})),s.prototype.readBigInt64BE=Q((function(l){K(l>>>=0,"offset");const n=this[l],u=this[l+7];void 0!==n&&void 0!==u||G(l,this.length-8);const e=(n<<24)+65536*this[++l]+256*this[++l]+this[++l];return(BigInt(e)<<BigInt(32))+BigInt(this[++l]*2**24+65536*this[++l]+256*this[++l]+u)})),s.prototype.readFloatLE=function(l,n){return l>>>=0,n||k(l,4,this.length),t.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,n){return l>>>=0,n||k(l,4,this.length),t.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,n){return l>>>=0,n||k(l,8,this.length),t.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,n){return l>>>=0,n||k(l,8,this.length),t.read(this,l,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,n,u,e){l=+l,n>>>=0,u>>>=0,e||O(this,l,n,u,Math.pow(2,8*u)-1,0);let t=1,r=0;for(this[n]=255&l;++r<u&&(t*=256);)this[n+r]=l/t&255;return n+u},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(l,n,u,e){l=+l,n>>>=0,u>>>=0,e||O(this,l,n,u,Math.pow(2,8*u)-1,0);let t=u-1,r=1;for(this[n+t]=255&l;--t>=0&&(r*=256);)this[n+t]=l/r&255;return n+u},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,1,255,0),this[n]=255&l,n+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,2,65535,0),this[n]=255&l,this[n+1]=l>>>8,n+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,2,65535,0),this[n]=l>>>8,this[n+1]=255&l,n+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,4,4294967295,0),this[n+3]=l>>>24,this[n+2]=l>>>16,this[n+1]=l>>>8,this[n]=255&l,n+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,4,4294967295,0),this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l,n+4},s.prototype.writeBigUInt64LE=Q((function(l,n=0){return L(this,l,n,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=Q((function(l,n=0){return M(this,l,n,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(l,n,u,e){if(l=+l,n>>>=0,!e){const e=Math.pow(2,8*u-1);O(this,l,n,u,e-1,-e)}let t=0,r=1,i=0;for(this[n]=255&l;++t<u&&(r*=256);)l<0&&0===i&&0!==this[n+t-1]&&(i=1),this[n+t]=(l/r>>0)-i&255;return n+u},s.prototype.writeIntBE=function(l,n,u,e){if(l=+l,n>>>=0,!e){const e=Math.pow(2,8*u-1);O(this,l,n,u,e-1,-e)}let t=u-1,r=1,i=0;for(this[n+t]=255&l;--t>=0&&(r*=256);)l<0&&0===i&&0!==this[n+t+1]&&(i=1),this[n+t]=(l/r>>0)-i&255;return n+u},s.prototype.writeInt8=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,1,127,-128),l<0&&(l=255+l+1),this[n]=255&l,n+1},s.prototype.writeInt16LE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,2,32767,-32768),this[n]=255&l,this[n+1]=l>>>8,n+2},s.prototype.writeInt16BE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,2,32767,-32768),this[n]=l>>>8,this[n+1]=255&l,n+2},s.prototype.writeInt32LE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,4,2147483647,-2147483648),this[n]=255&l,this[n+1]=l>>>8,this[n+2]=l>>>16,this[n+3]=l>>>24,n+4},s.prototype.writeInt32BE=function(l,n,u){return l=+l,n>>>=0,u||O(this,l,n,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l,n+4},s.prototype.writeBigInt64LE=Q((function(l,n=0){return L(this,l,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=Q((function(l,n=0){return M(this,l,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(l,n,u){return C(this,l,n,!0,u)},s.prototype.writeFloatBE=function(l,n,u){return C(this,l,n,!1,u)},s.prototype.writeDoubleLE=function(l,n,u){return j(this,l,n,!0,u)},s.prototype.writeDoubleBE=function(l,n,u){return j(this,l,n,!1,u)},s.prototype.copy=function(l,n,u,e){if(!s.isBuffer(l))throw new TypeError("argument should be a Buffer");if(u||(u=0),e||0===e||(e=this.length),n>=l.length&&(n=l.length),n||(n=0),e>0&&e<u&&(e=u),e===u)return 0;if(0===l.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(u<0||u>=this.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),l.length-n<e-u&&(e=l.length-n+u);const t=e-u;return this===l&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(n,u,e):Uint8Array.prototype.set.call(l,this.subarray(u,e),n),t},s.prototype.fill=function(l,n,u,e){if("string"==typeof l){if("string"==typeof n?(e=n,n=0,u=this.length):"string"==typeof u&&(e=u,u=this.length),void 0!==e&&"string"!=typeof e)throw new TypeError("encoding must be a string");if("string"==typeof e&&!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);if(1===l.length){const n=l.charCodeAt(0);("utf8"===e&&n<128||"latin1"===e)&&(l=n)}}else"number"==typeof l?l&=255:"boolean"==typeof l&&(l=Number(l));if(n<0||this.length<n||this.length<u)throw new RangeError("Out of range index");if(u<=n)return this;let t;if(n>>>=0,u=void 0===u?this.length:u>>>0,l||(l=0),"number"==typeof l)for(t=n;t<u;++t)this[t]=l;else{const r=s.isBuffer(l)?l:s.from(l,e),i=r.length;if(0===i)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(t=0;t<u-n;++t)this[t+n]=r[t%i]}return this};const D={};function F(l,n,u){D[l]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${l}]`,this.stack,delete this.name}get code(){return l}set code(l){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:l,writable:!0})}toString(){return`${this.name} [${l}]: ${this.message}`}}}function $(l){let n="",u=l.length;const e="-"===l[0]?1:0;for(;u>=e+4;u-=3)n=`_${l.slice(u-3,u)}${n}`;return`${l.slice(0,u)}${n}`}function W(l,n,u,e,t,r){if(l>u||l<n){const e="bigint"==typeof n?"n":"";let t;throw t=r>3?0===n||n===BigInt(0)?`>= 0${e} and < 2${e} ** ${8*(r+1)}${e}`:`>= -(2${e} ** ${8*(r+1)-1}${e}) and < 2 ** ${8*(r+1)-1}${e}`:`>= ${n}${e} and <= ${u}${e}`,new D.ERR_OUT_OF_RANGE("value",t,l)}!function(l,n,u){K(n,"offset"),void 0!==l[n]&&void 0!==l[n+u]||G(n,l.length-(u+1))}(e,t,r)}function K(l,n){if("number"!=typeof l)throw new D.ERR_INVALID_ARG_TYPE(n,"number",l)}function G(l,n,u){if(Math.floor(l)!==l)throw K(l,u),new D.ERR_OUT_OF_RANGE(u||"offset","an integer",l);if(n<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${n}`,l)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(l){return l?`${l} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(l,n){return`The "${l}" argument must be of type number. Received type ${typeof n}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(l,n,u){let e=`The value of "${l}" is out of range.`,t=u;return Number.isInteger(u)&&Math.abs(u)>2**32?t=$(String(u)):"bigint"==typeof u&&(t=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(t=$(t)),t+="n"),e+=` It must be ${n}. Received ${t}`,e}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function Y(l,n){let u;n=n||1/0;const e=l.length;let t=null;const r=[];for(let i=0;i<e;++i){if(u=l.charCodeAt(i),u>55295&&u<57344){if(!t){if(u>56319){(n-=3)>-1&&r.push(239,191,189);continue}if(i+1===e){(n-=3)>-1&&r.push(239,191,189);continue}t=u;continue}if(u<56320){(n-=3)>-1&&r.push(239,191,189),t=u;continue}u=65536+(t-55296<<10|u-56320)}else t&&(n-=3)>-1&&r.push(239,191,189);if(t=null,u<128){if((n-=1)<0)break;r.push(u)}else if(u<2048){if((n-=2)<0)break;r.push(u>>6|192,63&u|128)}else if(u<65536){if((n-=3)<0)break;r.push(u>>12|224,u>>6&63|128,63&u|128)}else{if(!(u<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;r.push(u>>18|240,u>>12&63|128,u>>6&63|128,63&u|128)}}return r}function V(l){return e.toByteArray(function(l){if((l=(l=l.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;l.length%4!=0;)l+="=";return l}(l))}function z(l,n,u,e){let t;for(t=0;t<e&&!(t+u>=n.length||t>=l.length);++t)n[t+u]=l[t];return t}function q(l,n){return l instanceof n||null!=l&&null!=l.constructor&&null!=l.constructor.name&&l.constructor.name===n.name}function J(l){return l!=l}const X=function(){const l="0123456789abcdef",n=new Array(256);for(let u=0;u<16;++u){const e=16*u;for(let t=0;t<16;++t)n[e+t]=l[u]+l[t]}return n}();function Q(l){return"undefined"==typeof BigInt?Z:l}function Z(){throw new Error("BigInt not supported")}},2141:(l,n,u)=>{const e=u(2020),t=u(4694),r=u(6774),i=u(4666),o=u(9032),s=u(4785),a=u(3070),c=u(8112);l.exports={Commented:e,Diagnose:t,Decoder:r,Encoder:i,Simple:o,Tagged:s,Map:a,SharedValueEncoder:c,comment:e.comment,decodeAll:r.decodeAll,decodeFirst:r.decodeFirst,decodeAllSync:r.decodeAllSync,decodeFirstSync:r.decodeFirstSync,diagnose:t.diagnose,encode:i.encode,encodeCanonical:i.encodeCanonical,encodeOne:i.encodeOne,encodeAsync:i.encodeAsync,decode:r.decodeFirstSync,leveldb:{decode:r.decodeFirstSync,encode:i.encode,buffer:!0,name:"cbor"},reset(){i.reset(),s.reset()}}},2020:(l,n,u)=>{const e=u(2830),t=u(9873),r=u(6774),i=u(4202),{MT:o,NUMBYTES:s,SYMS:a}=u(9066),{Buffer:c}=u(8764);function f(l){return l>1?"s":""}class h extends e.Transform{constructor(l={}){const{depth:n=1,max_depth:u=10,no_summary:e=!1,tags:t={},preferWeb:o,encoding:s,...a}=l;super({...a,readableObjectMode:!1,writableObjectMode:!1}),this.depth=n,this.max_depth=u,this.all=new i,t[24]||(t[24]=this._tag_24.bind(this)),this.parser=new r({tags:t,max_depth:u,preferWeb:o,encoding:s}),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)),e||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(l){const n=new h({depth:this.depth+1,no_summary:!0});n.on("data",(l=>this.push(l))),n.on("error",(l=>this.emit("error",l))),n.end(l)}_transform(l,n,u){this.parser.write(l,n,u)}_flush(l){return this.parser._flush(l)}static comment(l,n={},u=null){if(null==l)throw new Error("input required");({options:n,cb:u}=function(l,n){switch(typeof l){case"function":return{options:{},cb:l};case"string":return{options:{encoding:l},cb:n};case"number":return{options:{max_depth:l},cb:n};case"object":return{options:l||{},cb:n};default:throw new TypeError("Unknown option type")}}(n,u));const e=new i,{encoding:r="hex",...o}=n,s=new h(o);let a=null;return"function"==typeof u?(s.on("end",(()=>{u(null,e.toString("utf8"))})),s.on("error",u)):a=new Promise(((l,n)=>{s.on("end",(()=>{l(e.toString("utf8"))})),s.on("error",n)})),s.pipe(e),t.guessEncoding(l,r).pipe(s),a}_on_error(l){this.push("ERROR: "),this.push(l.toString()),this.push("\n")}_on_read(l){this.all.write(l);const n=l.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(n);let u=2*(this.max_depth-this.depth)-n.length;u<1&&(u=1),this.push(new Array(u+1).join(" ")),this.push("-- ")}_on_more(l,n,u,e){let t="";switch(this.depth++,l){case o.POS_INT:t="Positive number,";break;case o.NEG_INT:t="Negative number,";break;case o.ARRAY:t="Array, length";break;case o.MAP:t="Map, count";break;case o.BYTE_STRING:t="Bytes, length";break;case o.UTF8_STRING:t="String, length";break;case o.SIMPLE_FLOAT:t=1===n?"Simple value,":"Float,"}this.push(`${t} next ${n} byte${f(n)}\n`)}_on_start_string(l,n,u,e){let t="";switch(this.depth++,l){case o.BYTE_STRING:t=`Bytes, length: ${n}`;break;case o.UTF8_STRING:t=`String, length: ${n.toString()}`}this.push(`${t}\n`)}_on_start(l,n,u,e){switch(this.depth++,u){case o.ARRAY:this.push(`[${e}], `);break;case o.MAP:e%2?this.push(`{Val:${Math.floor(e/2)}}, `):this.push(`{Key:${Math.floor(e/2)}}, `)}switch(l){case o.TAG:this.push(`Tag #${n}`),24===n&&this.push(" Encoded CBOR data item");break;case o.ARRAY:n===a.STREAM?this.push("Array (streaming)"):this.push(`Array, ${n} item${f(n)}`);break;case o.MAP:n===a.STREAM?this.push("Map (streaming)"):this.push(`Map, ${n} pair${f(n)}`);break;case o.BYTE_STRING:this.push("Bytes (streaming)");break;case o.UTF8_STRING:this.push("String (streaming)")}this.push("\n")}_on_stop(l){this.depth--}_on_value(l,n,u,e){if(l!==a.BREAK)switch(n){case o.ARRAY:this.push(`[${u}], `);break;case o.MAP:u%2?this.push(`{Val:${Math.floor(u/2)}}, `):this.push(`{Key:${Math.floor(u/2)}}, `)}const r=t.cborValueToString(l,-1/0);switch("string"==typeof l||c.isBuffer(l)?(l.length>0&&(this.push(r),this.push("\n")),this.depth--):(this.push(r),this.push("\n")),e){case s.ONE:case s.TWO:case s.FOUR:case s.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}l.exports=h},9066:(l,n)=>{n.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},n.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},n.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},n.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},n.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")},n.SHIFT32=4294967296,n.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(n.SHIFT32)}},6774:(l,n,u)=>{const e=u(71),t=u(4785),r=u(9032),i=u(9873),o=u(4202),s=(u(2830),u(9066)),{MT:a,NUMBYTES:c,SYMS:f,BI:h}=s,{Buffer:d}=u(8764),p=Symbol("count"),g=Symbol("major type"),y=Symbol("error"),b=Symbol("not found");function w(l,n,u){const e=[];return e[p]=u,e[f.PARENT]=l,e[g]=n,e}function m(l,n){const u=new o;return u[p]=-1,u[f.PARENT]=l,u[g]=n,u}class _ extends Error{constructor(l,n){super(`Unexpected data: 0x${l.toString(16)}`),this.name="UnexpectedDataError",this.byte=l,this.value=n}}function E(l,n){switch(typeof l){case"function":return{options:{},cb:l};case"string":return{options:{encoding:l},cb:n};case"object":return{options:l||{},cb:n};default:throw new TypeError("Unknown option type")}}class S extends e{constructor(l={}){const{tags:n={},max_depth:u=-1,preferWeb:e=!1,required:t=!1,encoding:r="hex",extendedResults:i=!1,preventDuplicateKeys:s=!1,...a}=l;super({defaultEncoding:r,...a}),this.running=!0,this.max_depth=u,this.tags=n,this.preferWeb=e,this.extendedResults=i,this.required=t,this.preventDuplicateKeys=s,i&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new o)}static nullcheck(l){switch(l){case f.NULL:return null;case f.UNDEFINED:return;case b:throw new Error("Value not found");default:return l}}static decodeFirstSync(l,n={}){if(null==l)throw new TypeError("input required");({options:n}=E(n));const{encoding:u="hex",...e}=n,t=new S(e),r=i.guessEncoding(l,u),o=t._parse();let s=o.next();for(;!s.done;){const l=r.read(s.value);if(null==l||l.length!==s.value)throw new Error("Insufficient data");t.extendedResults&&t.valueBytes.write(l),s=o.next(l)}let a=null;if(t.extendedResults)a=s.value,a.unused=r.read();else if(a=S.nullcheck(s.value),r.length>0){const l=r.read(1);throw r.unshift(l),new _(l[0],a)}return a}static decodeAllSync(l,n={}){if(null==l)throw new TypeError("input required");({options:n}=E(n));const{encoding:u="hex",...e}=n,t=new S(e),r=i.guessEncoding(l,u),o=[];for(;r.length>0;){const l=t._parse();let n=l.next();for(;!n.done;){const u=r.read(n.value);if(null==u||u.length!==n.value)throw new Error("Insufficient data");t.extendedResults&&t.valueBytes.write(u),n=l.next(u)}o.push(S.nullcheck(n.value))}return o}static decodeFirst(l,n={},u=null){if(null==l)throw new TypeError("input required");({options:n,cb:u}=E(n,u));const{encoding:e="hex",required:t=!1,...r}=n,o=new S(r);let s=b;const a=i.guessEncoding(l,e),c=new Promise(((l,n)=>{o.on("data",(l=>{s=S.nullcheck(l),o.close()})),o.once("error",(u=>o.extendedResults&&u instanceof _?(s.unused=o.bs.slice(),l(s)):(s!==b&&(u.value=s),s=y,o.close(),n(u)))),o.once("end",(()=>{switch(s){case b:return t?n(new Error("No CBOR found")):l(s);case y:return;default:return l(s)}}))}));return"function"==typeof u&&c.then((l=>u(null,l)),u),a.pipe(o),c}static decodeAll(l,n={},u=null){if(null==l)throw new TypeError("input required");({options:n,cb:u}=E(n,u));const{encoding:e="hex",...t}=n,r=new S(t),o=[];r.on("data",(l=>o.push(S.nullcheck(l))));const s=new Promise(((l,n)=>{r.on("error",n),r.on("end",(()=>l(o)))}));return"function"==typeof u&&s.then((l=>u(void 0,l)),(l=>u(l,void 0))),i.guessEncoding(l,e).pipe(r),s}close(){this.running=!1,this.__fresh=!0}_onRead(l){this.valueBytes.write(l)}*_parse(){let l=null,n=0,u=null;for(;;){if(this.max_depth>=0&&n>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[e]=yield 1;if(!this.running)throw this.bs.unshift(d.from([e])),new _(e);const s=e>>5,y=31&e,b=null==l?void 0:l[g],E=null==l?void 0:l.length;switch(y){case c.ONE:this.emit("more-bytes",s,1,b,E),[u]=yield 1;break;case c.TWO:case c.FOUR:case c.EIGHT:{const l=1<<y-24;this.emit("more-bytes",s,l,b,E);const n=yield l;u=s===a.SIMPLE_FLOAT?n:i.parseCBORint(y,n);break}case 28:case 29:case 30:throw this.running=!1,new Error(`Additional info not implemented: ${y}`);case c.INDEFINITE:switch(s){case a.POS_INT:case a.NEG_INT:case a.TAG:throw new Error(`Invalid indefinite encoding for MT ${s}`)}u=-1;break;default:u=y}switch(s){case a.POS_INT:break;case a.NEG_INT:u=u===Number.MAX_SAFE_INTEGER?h.NEG_MAX:"bigint"==typeof u?h.MINUS_ONE-u:-1-u;break;case a.BYTE_STRING:case a.UTF8_STRING:switch(u){case 0:this.emit("start-string",s,u,b,E),u=s===a.UTF8_STRING?"":this.preferWeb?new Uint8Array(0):d.allocUnsafe(0);break;case-1:this.emit("start",s,f.STREAM,b,E),l=m(l,s),n++;continue;default:this.emit("start-string",s,u,b,E),u=yield u,s===a.UTF8_STRING?u=i.utf8(u):this.preferWeb&&(u=new Uint8Array(u.buffer,u.byteOffset,u.length))}break;case a.ARRAY:case a.MAP:switch(u){case 0:u=s===a.MAP?{}:[];break;case-1:this.emit("start",s,f.STREAM,b,E),l=w(l,s,-1),n++;continue;default:this.emit("start",s,u,b,E),l=w(l,s,u*(s-3)),n++;continue}break;case a.TAG:this.emit("start",s,u,b,E),l=w(l,s,1),l.push(u),n++;continue;case a.SIMPLE_FLOAT:if("number"==typeof u){if(y===c.ONE&&u<32)throw new Error(`Invalid two-byte encoding of simple value ${u}`);const n=null!=l;u=r.decode(u,n,n&&l[p]<0)}else u=i.parseCBORfloat(u)}this.emit("value",u,b,E,y);let A=!1;for(;null!=l;){if(u===f.BREAK)l[p]=1;else if(Array.isArray(l))l.push(u);else{const n=l[g];if(null!=n&&n!==s)throw this.running=!1,new Error("Invalid major type in indefinite encoding");l.write(u)}if(0!=--l[p]){A=!0;break}if(--n,delete l[p],Array.isArray(l))switch(l[g]){case a.ARRAY:u=l;break;case a.MAP:{let n=!0;if(l.length%2!=0)throw new Error(`Invalid map length: ${l.length}`);for(let u=0,e=l.length;u<e;u+=2)if("string"!=typeof l[u]||"__proto__"===l[u]){n=!1;break}if(n){u={};for(let n=0,e=l.length;n<e;n+=2){if(this.preventDuplicateKeys&&Object.prototype.hasOwnProperty.call(u,l[n]))throw new Error("Duplicate keys in a map");u[l[n]]=l[n+1]}}else{u=new Map;for(let n=0,e=l.length;n<e;n+=2){if(this.preventDuplicateKeys&&u.has(l[n]))throw new Error("Duplicate keys in a map");u.set(l[n],l[n+1])}}break}case a.TAG:u=new t(l[0],l[1]).convert(this.tags)}else if(l instanceof o)switch(l[g]){case a.BYTE_STRING:u=l.slice(),this.preferWeb&&(u=new Uint8Array(u.buffer,u.byteOffset,u.length));break;case a.UTF8_STRING:u=l.toString("utf-8")}this.emit("stop",l[g]);const e=l;l=l[f.PARENT],delete e[f.PARENT],delete e[g]}if(!A){if(this.extendedResults){const l=this.valueBytes.slice(),n={value:S.nullcheck(u),bytes:l,length:l.length};return this.valueBytes=new o,n}return u}}}}S.NOT_FOUND=b,l.exports=S},4694:(l,n,u)=>{const e=u(2830),t=u(6774),r=u(9873),i=u(4202),{MT:o,SYMS:s}=u(9066);class a extends e.Transform{constructor(l={}){const{separator:n="\n",stream_errors:u=!1,tags:e,max_depth:r,preferWeb:i,encoding:o,...s}=l;super({...s,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=n,this.stream_errors=u,this.parser=new t({tags:e,max_depth:r,preferWeb:i,encoding:o}),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(l,n,u){this.parser.write(l,n,u)}_flush(l){this.parser._flush((n=>this.stream_errors?(n&&this._on_error(n),l()):l(n)))}static diagnose(l,n={},u=null){if(null==l)throw new TypeError("input required");({options:n,cb:u}=function(l,n){switch(typeof l){case"function":return{options:{},cb:l};case"string":return{options:{encoding:l},cb:n};case"object":return{options:l||{},cb:n};default:throw new TypeError("Unknown option type")}}(n,u));const{encoding:e="hex",...t}=n,o=new i,s=new a(t);let c=null;return"function"==typeof u?(s.on("end",(()=>u(null,o.toString("utf8")))),s.on("error",u)):c=new Promise(((l,n)=>{s.on("end",(()=>l(o.toString("utf8")))),s.on("error",n)})),s.pipe(o),r.guessEncoding(l,e).pipe(s),c}_on_error(l){this.stream_errors?this.push(l.toString()):this.emit("error",l)}_on_more(l,n,u,e){l===o.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[n])}_fore(l,n){switch(l){case o.BYTE_STRING:case o.UTF8_STRING:case o.ARRAY:n>0&&this.push(", ");break;case o.MAP:n>0&&(n%2?this.push(": "):this.push(", "))}}_on_value(l,n,u){if(l===s.BREAK)return;this._fore(n,u);const e=this.float_bytes;this.float_bytes=-1,this.push(r.cborValueToString(l,e))}_on_start(l,n,u,e){switch(this._fore(u,e),l){case o.TAG:this.push(`${n}(`);break;case o.ARRAY:this.push("[");break;case o.MAP:this.push("{");break;case o.BYTE_STRING:case o.UTF8_STRING:this.push("(")}n===s.STREAM&&this.push("_ ")}_on_stop(l){switch(l){case o.TAG:this.push(")");break;case o.ARRAY:this.push("]");break;case o.MAP:this.push("}");break;case o.BYTE_STRING:case o.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}l.exports=a},4666:(l,n,u)=>{const e=u(2830),t=u(4202),r=u(9873),i=u(9066),{MT:o,NUMBYTES:s,SHIFT32:a,SIMPLE:c,SYMS:f,TAG:h,BI:d}=i,{Buffer:p}=u(8764),g=o.SIMPLE_FLOAT<<5|s.TWO,y=o.SIMPLE_FLOAT<<5|s.FOUR,b=o.SIMPLE_FLOAT<<5|s.EIGHT,w=o.SIMPLE_FLOAT<<5|c.TRUE,m=o.SIMPLE_FLOAT<<5|c.FALSE,_=o.SIMPLE_FLOAT<<5|c.UNDEFINED,E=o.SIMPLE_FLOAT<<5|c.NULL,S=p.from([255]),A=p.from("f97e00","hex"),v=p.from("f9fc00","hex"),T=p.from("f97c00","hex"),I=p.from("f98000","hex"),R={};let B={};class x extends e.Transform{constructor(l={}){const{canonical:n=!1,encodeUndefined:u,disallowUndefinedKeys:e=!1,dateType:t="number",collapseBigIntegers:r=!1,detectLoops:i=!1,omitUndefinedProperties:o=!1,genTypes:s=[],...a}=l;if(super({...a,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=n,this.encodeUndefined=u,this.disallowUndefinedKeys=e,this.dateType=function(l){if(!l)return"number";switch(l.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 "${l}"`)}(t),this.collapseBigIntegers=!!this.canonical||r,this.detectLoops=void 0,"boolean"==typeof i)i&&(this.detectLoops=new WeakSet);else{if(!(i instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=i}if(this.omitUndefinedProperties=o,this.semanticTypes={...x.SEMANTIC_TYPES},Array.isArray(s))for(let l=0,n=s.length;l<n;l+=2)this.addSemanticType(s[l],s[l+1]);else for(const[l,n]of Object.entries(s))this.addSemanticType(l,n)}_transform(l,n,u){u(!1===this.pushAny(l)?new Error("Push Error"):void 0)}_flush(l){l()}_pushUInt8(l){const n=p.allocUnsafe(1);return n.writeUInt8(l,0),this.push(n)}_pushUInt16BE(l){const n=p.allocUnsafe(2);return n.writeUInt16BE(l,0),this.push(n)}_pushUInt32BE(l){const n=p.allocUnsafe(4);return n.writeUInt32BE(l,0),this.push(n)}_pushFloatBE(l){const n=p.allocUnsafe(4);return n.writeFloatBE(l,0),this.push(n)}_pushDoubleBE(l){const n=p.allocUnsafe(8);return n.writeDoubleBE(l,0),this.push(n)}_pushNaN(){return this.push(A)}_pushInfinity(l){const n=l<0?v:T;return this.push(n)}_pushFloat(l){if(this.canonical){const n=p.allocUnsafe(2);if(r.writeHalf(n,l))return this._pushUInt8(g)&&this.push(n)}return Math.fround(l)===l?this._pushUInt8(y)&&this._pushFloatBE(l):this._pushUInt8(b)&&this._pushDoubleBE(l)}_pushInt(l,n,u){const e=n<<5;if(l<24)return this._pushUInt8(e|l);if(l<=255)return this._pushUInt8(e|s.ONE)&&this._pushUInt8(l);if(l<=65535)return this._pushUInt8(e|s.TWO)&&this._pushUInt16BE(l);if(l<=4294967295)return this._pushUInt8(e|s.FOUR)&&this._pushUInt32BE(l);let t=Number.MAX_SAFE_INTEGER;return n===o.NEG_INT&&t--,l<=t?this._pushUInt8(e|s.EIGHT)&&this._pushUInt32BE(Math.floor(l/a))&&this._pushUInt32BE(l%a):n===o.NEG_INT?this._pushFloat(u):this._pushFloat(l)}_pushIntNum(l){return Object.is(l,-0)?this.push(I):l<0?this._pushInt(-l-1,o.NEG_INT,l):this._pushInt(l,o.POS_INT)}_pushNumber(l){return isNaN(l)?this._pushNaN():isFinite(l)?Math.round(l)===l?this._pushIntNum(l):this._pushFloat(l):this._pushInfinity(l)}_pushString(l){const n=p.byteLength(l,"utf8");return this._pushInt(n,o.UTF8_STRING)&&this.push(l,"utf8")}_pushBoolean(l){return this._pushUInt8(l?w:m)}_pushUndefined(l){switch(typeof this.encodeUndefined){case"undefined":return this._pushUInt8(_);case"function":return this.pushAny(this.encodeUndefined(l));case"object":{const l=r.bufferishToBuffer(this.encodeUndefined);if(l)return this.push(l)}}return this.pushAny(this.encodeUndefined)}_pushNull(l){return this._pushUInt8(E)}_pushTag(l){return this._pushInt(l,o.TAG)}_pushJSBigint(l){let n=o.POS_INT,u=h.POS_BIGINT;if(l<0&&(l=-l+d.MINUS_ONE,n=o.NEG_INT,u=h.NEG_BIGINT),this.collapseBigIntegers&&l<=d.MAXINT64)return l<=4294967295?this._pushInt(Number(l),n):this._pushUInt8(n<<5|s.EIGHT)&&this._pushUInt32BE(Number(l/d.SHIFT32))&&this._pushUInt32BE(Number(l%d.SHIFT32));let e=l.toString(16);e.length%2&&(e=`0${e}`);const t=p.from(e,"hex");return this._pushTag(u)&&x._pushBuffer(this,t)}_pushObject(l,n){if(!l)return this._pushNull(l);if(!(n={indefinite:!1,skipTypes:!1,...n}).indefinite&&this.detectLoops){if(this.detectLoops.has(l))throw new Error("Loop detected while CBOR encoding.\nCall removeLoopDetectors before resuming.");this.detectLoops.add(l)}if(!n.skipTypes){const n=l.encodeCBOR;if("function"==typeof n)return n.call(l,this);const u=this.semanticTypes[l.constructor.name];if(u)return u.call(l,this,l)}const u=Object.keys(l).filter((n=>{const u=typeof l[n];return"function"!==u&&(!this.omitUndefinedProperties||"undefined"!==u)})),e={};if(this.canonical&&u.sort(((l,n)=>{const u=e[l]||(e[l]=x.encode(l)),t=e[n]||(e[n]=x.encode(n));return u.compare(t)})),n.indefinite){if(!this._pushUInt8(o.MAP<<5|s.INDEFINITE))return!1}else if(!this._pushInt(u.length,o.MAP))return!1;let t=null;for(let n=0,r=u.length;n<r;n++){const r=u[n];if(this.canonical&&(t=e[r])){if(!this.push(t))return!1}else if(!this._pushString(r))return!1;if(!this.pushAny(l[r]))return!1}if(n.indefinite){if(!this.push(S))return!1}else this.detectLoops&&this.detectLoops.delete(l);return!0}_encodeAll(l){const n=new t({highWaterMark:this.readableHighWaterMark});this.pipe(n);for(const n of l)this.pushAny(n);return this.end(),n.read()}addSemanticType(l,n){const u="string"==typeof l?l:l.name,e=this.semanticTypes[u];if(n){if("function"!=typeof n)throw new TypeError("fun must be of type function");this.semanticTypes[u]=n}else e&&delete this.semanticTypes[u];return e}pushAny(l){switch(typeof l){case"number":return this._pushNumber(l);case"bigint":return this._pushJSBigint(l);case"string":return this._pushString(l);case"boolean":return this._pushBoolean(l);case"undefined":return this._pushUndefined(l);case"object":return this._pushObject(l);case"symbol":switch(l){case f.NULL:return this._pushNull(null);case f.UNDEFINED:return this._pushUndefined(void 0);default:throw new TypeError(`Unknown symbol: ${l.toString()}`)}default:throw new TypeError(`Unknown type: ${typeof l}, ${"function"==typeof l.toString?l.toString():""}`)}}static pushArray(l,n,u){u={indefinite:!1,...u};const e=n.length;if(u.indefinite){if(!l._pushUInt8(o.ARRAY<<5|s.INDEFINITE))return!1}else if(!l._pushInt(e,o.ARRAY))return!1;for(let u=0;u<e;u++)if(!l.pushAny(n[u]))return!1;return!(u.indefinite&&!l.push(S))}removeLoopDetectors(){return!!this.detectLoops&&(this.detectLoops=new WeakSet,!0)}static _pushDate(l,n){switch(l.dateType){case"string":return l._pushTag(h.DATE_STRING)&&l._pushString(n.toISOString());case"int":return l._pushTag(h.DATE_EPOCH)&&l._pushIntNum(Math.round(n.getTime()/1e3));case"float":return l._pushTag(h.DATE_EPOCH)&&l._pushFloat(n.getTime()/1e3);default:return l._pushTag(h.DATE_EPOCH)&&l.pushAny(n.getTime()/1e3)}}static _pushBuffer(l,n){return l._pushInt(n.length,o.BYTE_STRING)&&l.push(n)}static _pushNoFilter(l,n){return x._pushBuffer(l,n.slice())}static _pushRegexp(l,n){return l._pushTag(h.REGEXP)&&l.pushAny(n.source)}static _pushSet(l,n){if(!l._pushTag(h.SET))return!1;if(!l._pushInt(n.size,o.ARRAY))return!1;for(const u of n)if(!l.pushAny(u))return!1;return!0}static _pushURL(l,n){return l._pushTag(h.URI)&&l.pushAny(n.toString())}static _pushBoxed(l,n){return l.pushAny(n.valueOf())}static _pushMap(l,n,u){u={indefinite:!1,...u};let e=[...n.entries()];if(l.omitUndefinedProperties&&(e=e.filter((([l,n])=>void 0!==n))),u.indefinite){if(!l._pushUInt8(o.MAP<<5|s.INDEFINITE))return!1}else if(!l._pushInt(e.length,o.MAP))return!1;if(l.canonical){const n=new x({genTypes:l.semanticTypes,canonical:l.canonical,detectLoops:Boolean(l.detectLoops),dateType:l.dateType,disallowUndefinedKeys:l.disallowUndefinedKeys,collapseBigIntegers:l.collapseBigIntegers}),u=new t({highWaterMark:l.readableHighWaterMark});n.pipe(u),e.sort((([l],[e])=>{n.pushAny(l);const t=u.read();n.pushAny(e);const r=u.read();return t.compare(r)}));for(const[n,u]of e){if(l.disallowUndefinedKeys&&void 0===n)throw new Error("Invalid Map key: undefined");if(!l.pushAny(n)||!l.pushAny(u))return!1}}else for(const[n,u]of e){if(l.disallowUndefinedKeys&&void 0===n)throw new Error("Invalid Map key: undefined");if(!l.pushAny(n)||!l.pushAny(u))return!1}return!(u.indefinite&&!l.push(S))}static _pushTypedArray(l,n){let u=64,e=n.BYTES_PER_ELEMENT;const{name:t}=n.constructor;return t.startsWith("Float")?(u|=16,e/=2):t.includes("U")||(u|=8),(t.includes("Clamped")||1!==e&&!r.isBigEndian())&&(u|=4),u|={1:0,2:1,4:2,8:3}[e],!!l._pushTag(u)&&x._pushBuffer(l,p.from(n.buffer,n.byteOffset,n.byteLength))}static _pushArrayBuffer(l,n){return x._pushBuffer(l,p.from(n))}static encodeIndefinite(l,n,u={}){if(null==n){if(null==this)throw new Error("No object to encode");n=this}const{chunkSize:e=4096}=u;let t=!0;const i=typeof n;let a=null;if("string"===i){t=t&&l._pushUInt8(o.UTF8_STRING<<5|s.INDEFINITE);let u=0;for(;u<n.length;){const r=u+e;t=t&&l._pushString(n.slice(u,r)),u=r}t=t&&l.push(S)}else if(a=r.bufferishToBuffer(n)){t=t&&l._pushUInt8(o.BYTE_STRING<<5|s.INDEFINITE);let n=0;for(;n<a.length;){const u=n+e;t=t&&x._pushBuffer(l,a.slice(n,u)),n=u}t=t&&l.push(S)}else if(Array.isArray(n))t=t&&x.pushArray(l,n,{indefinite:!0});else if(n instanceof Map)t=t&&x._pushMap(l,n,{indefinite:!0});else{if("object"!==i)throw new Error("Invalid indefinite encoding");t=t&&l._pushObject(n,{indefinite:!0,skipTypes:!0})}return t}static encode(...l){return(new x)._encodeAll(l)}static encodeCanonical(...l){return new x({canonical:!0})._encodeAll(l)}static encodeOne(l,n){return new x(n)._encodeAll([l])}static encodeAsync(l,n){return new Promise(((u,e)=>{const t=[],r=new x(n);r.on("data",(l=>t.push(l))),r.on("error",e),r.on("finish",(()=>u(p.concat(t)))),r.pushAny(l),r.end()}))}static get SEMANTIC_TYPES(){return B}static set SEMANTIC_TYPES(l){B=l}static reset(){x.SEMANTIC_TYPES={...R}}}Object.assign(R,{Array:x.pushArray,Date:x._pushDate,Buffer:x._pushBuffer,[p.name]:x._pushBuffer,Map:x._pushMap,NoFilter:x._pushNoFilter,[t.name]:x._pushNoFilter,RegExp:x._pushRegexp,Set:x._pushSet,ArrayBuffer:x._pushArrayBuffer,Uint8ClampedArray:x._pushTypedArray,Uint8Array:x._pushTypedArray,Uint16Array:x._pushTypedArray,Uint32Array:x._pushTypedArray,Int8Array:x._pushTypedArray,Int16Array:x._pushTypedArray,Int32Array:x._pushTypedArray,Float32Array:x._pushTypedArray,Float64Array:x._pushTypedArray,URL:x._pushURL,Boolean:x._pushBoxed,Number:x._pushBoxed,String:x._pushBoxed}),"undefined"!=typeof BigUint64Array&&(R[BigUint64Array.name]=x._pushTypedArray),"undefined"!=typeof BigInt64Array&&(R[BigInt64Array.name]=x._pushTypedArray),x.reset(),l.exports=x},3070:(l,n,u)=>{const{Buffer:e}=u(8764),t=u(4666),r=u(6774),{MT:i}=u(9066);class o extends Map{constructor(l){super(l)}static _encode(l){return t.encodeCanonical(l).toString("base64")}static _decode(l){return r.decodeFirstSync(l,"base64")}get(l){return super.get(o._encode(l))}set(l,n){return super.set(o._encode(l),n)}delete(l){return super.delete(o._encode(l))}has(l){return super.has(o._encode(l))}*keys(){for(const l of super.keys())yield o._decode(l)}*entries(){for(const l of super.entries())yield[o._decode(l[0]),l[1]]}[Symbol.iterator](){return this.entries()}forEach(l,n){if("function"!=typeof l)throw new TypeError("Must be function");for(const n of super.entries())l.call(this,n[1],o._decode(n[0]),this)}encodeCBOR(l){if(!l._pushInt(this.size,i.MAP))return!1;if(l.canonical){const n=Array.from(super.entries()).map((l=>[e.from(l[0],"base64"),l[1]]));n.sort(((l,n)=>l[0].compare(n[0])));for(const u of n)if(!l.push(u[0])||!l.pushAny(u[1]))return!1}else for(const n of super.entries())if(!l.push(e.from(n[0],"base64"))||!l.pushAny(n[1]))return!1;return!0}}l.exports=o},1226:l=>{class n{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(l){const u=this.map.get(l);if(u)return u.length>1?u[0]||this.recording?u[1]:(u[0]=!0,n.FIRST):this.recording?(u.push(this.count++),u[1]):n.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(l,[!1]),n.NEVER}}n.NEVER=-1,n.FIRST=-2,l.exports=n},8112:(l,n,u)=>{const e=u(4666),t=u(1226),{Buffer:r}=u(8764);class i extends e{constructor(l){super(l),this.valueSharing=new t}_pushObject(l,n){if(null!==l){const n=this.valueSharing.check(l);switch(n){case t.FIRST:this._pushTag(28);break;case t.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(n)}}return super._pushObject(l,n)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...l){const n=new i;n.on("data",(()=>{}));for(const u of l)n.pushAny(u);return n.stopRecording(),n.removeAllListeners("data"),n._encodeAll(l)}static encodeCanonical(...l){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(l,n){const u=new i(n);return u.on("data",(()=>{})),u.pushAny(l),u.stopRecording(),u.removeAllListeners("data"),u._encodeAll([l])}static encodeAsync(l,n){return new Promise(((u,e)=>{const t=[],o=new i(n);o.on("data",(()=>{})),o.on("error",e),o.on("finish",(()=>u(r.concat(t)))),o.pushAny(l),o.stopRecording(),o.removeAllListeners("data"),o.on("data",(l=>t.push(l))),o.pushAny(l),o.end()}))}}l.exports=i},9032:(l,n,u)=>{const{MT:e,SIMPLE:t,SYMS:r}=u(9066);class i{constructor(l){if("number"!=typeof l)throw new Error("Invalid Simple type: "+typeof l);if(l<0||l>255||(0|l)!==l)throw new Error(`value must be a small positive integer: ${l}`);this.value=l}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](l,n){return`simple(${this.value})`}encodeCBOR(l){return l._pushInt(this.value,e.SIMPLE_FLOAT)}static isSimple(l){return l instanceof i}static decode(l,n=!0,u=!1){switch(l){case t.FALSE:return!1;case t.TRUE:return!0;case t.NULL:return n?null:r.NULL;case t.UNDEFINED:if(n)return;return r.UNDEFINED;case-1:if(!n||!u)throw new Error("Invalid BREAK");return r.BREAK;default:return new i(l)}}}l.exports=i},4785:(l,n,u)=>{const e=u(9066),t=u(9873),r=Symbol("INTERNAL_JSON");function i(l,n){if(t.isBufferish(l))l.toJSON=n;else if(Array.isArray(l))for(const u of l)i(u,n);else if(l&&"object"==typeof l&&(!(l instanceof p)||l.tag<21||l.tag>23))for(const u of Object.values(l))i(u,n)}function o(){return t.base64(this)}function s(){return t.base64url(this)}function a(){return this.toString("hex")}const c={0:l=>new Date(l),1:l=>new Date(1e3*l),2:l=>t.bufferToBigInt(l),3:l=>e.BI.MINUS_ONE-t.bufferToBigInt(l),21:(l,n)=>(t.isBufferish(l)?n[r]=s:i(l,s),n),22:(l,n)=>(t.isBufferish(l)?n[r]=o:i(l,o),n),23:(l,n)=>(t.isBufferish(l)?n[r]=a:i(l,a),n),32:l=>new URL(l),33:(l,n)=>{if(!l.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const u=l.length%4;if(1===u)throw new Error("Invalid base64url length");if(2===u){if(-1==="AQgw".indexOf(l[l.length-1]))throw new Error("Invalid base64 padding")}else if(3===u&&-1==="AEIMQUYcgkosw048".indexOf(l[l.length-1]))throw new Error("Invalid base64 padding");return n},34:(l,n)=>{const u=l.match(/^[a-zA-Z0-9+/]+(?<padding>={0,2})$/);if(!u)throw new Error("Invalid base64 characters");if(l.length%4!=0)throw new Error("Invalid base64 length");if("="===u.groups.padding){if(-1==="AQgw".indexOf(l[l.length-2]))throw new Error("Invalid base64 padding")}else if("=="===u.groups.padding&&-1==="AEIMQUYcgkosw048".indexOf(l[l.length-3]))throw new Error("Invalid base64 padding");return n},35:l=>new RegExp(l),258:l=>new Set(l)},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(l,n){if(!t.isBufferish(l))throw new TypeError("val not a buffer");const{tag:u}=n,e=f[u];if(!e)throw new Error(`Invalid typed array tag: ${u}`);const r=2**(((16&u)>>4)+(3&u));return!(4&u)!==t.isBigEndian()&&r>1&&function(l,n,u,e){const t=new DataView(l),[r,i]={2:[t.getUint16,t.setUint16],4:[t.getUint32,t.setUint32],8:[t.getBigUint64,t.setBigUint64]}[n],o=u+e;for(let l=u;l<o;l+=n)i.call(t,l,r.call(t,l,!0))}(l.buffer,r,l.byteOffset,l.byteLength),new e(l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength))}"undefined"!=typeof BigUint64Array&&(f[67]=BigUint64Array,f[71]=BigUint64Array),"undefined"!=typeof BigInt64Array&&(f[75]=BigInt64Array,f[79]=BigInt64Array);for(const l of Object.keys(f))c[l]=h;let d={};class p{constructor(l,n,u){if(this.tag=l,this.value=n,this.err=u,"number"!=typeof this.tag)throw new Error(`Invalid tag type (${typeof this.tag})`);if(this.tag<0||(0|this.tag)!==this.tag)throw new Error(`Tag must be a positive integer: ${this.tag}`)}toJSON(){if(this[r])return this[r].call(this.value);const l={tag:this.tag,value:this.value};return this.err&&(l.err=this.err),l}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(l){return l._pushTag(this.tag),l.pushAny(this.value)}convert(l){let n=null==l?void 0:l[this.tag];if(null===n)return this;if("function"!=typeof n&&(n=p.TAGS[this.tag],"function"!=typeof n))return this;try{return n.call(this,this.value,this)}catch(l){return l&&l.message&&l.message.length>0?this.err=l.message:this.err=l,this}}static get TAGS(){return d}static set TAGS(l){d=l}static reset(){p.TAGS={...c}}}p.INTERNAL_JSON=r,p.reset(),l.exports=p},9873:(l,n,u)=>{const{Buffer:e}=u(8764),t=u(4202),r=u(2830),i=u(9066),{NUMBYTES:o,SHIFT32:s,BI:a,SYMS:c}=i,f=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});n.utf8=l=>f.decode(l),n.utf8.checksUTF8=!0,n.isBufferish=function(l){return l&&"object"==typeof l&&(e.isBuffer(l)||l instanceof Uint8Array||l instanceof Uint8ClampedArray||l instanceof ArrayBuffer||l instanceof DataView)},n.bufferishToBuffer=function(l){return e.isBuffer(l)?l:ArrayBuffer.isView(l)?e.from(l.buffer,l.byteOffset,l.byteLength):l instanceof ArrayBuffer?e.from(l):null},n.parseCBORint=function(l,n){switch(l){case o.ONE:return n.readUInt8(0);case o.TWO:return n.readUInt16BE(0);case o.FOUR:return n.readUInt32BE(0);case o.EIGHT:{const l=n.readUInt32BE(0),u=n.readUInt32BE(4);return l>2097151?BigInt(l)*a.SHIFT32+BigInt(u):l*s+u}default:throw new Error(`Invalid additional info for int: ${l}`)}},n.writeHalf=function(l,n){const u=e.allocUnsafe(4);u.writeFloatBE(n,0);const t=u.readUInt32BE(0);if(0!=(8191&t))return!1;let r=t>>16&32768;const i=t>>23&255,o=8388607&t;if(i>=113&&i<=142)r+=(i-112<<10)+(o>>13);else{if(!(i>=103&&i<113))return!1;if(o&(1<<126-i)-1)return!1;r+=o+8388608>>126-i}return l.writeUInt16BE(r),!0},n.parseHalf=function(l){const n=128&l[0]?-1:1,u=(124&l[0])>>2,e=(3&l[0])<<8|l[1];return u?31===u?n*(e?NaN:1/0):n*2**(u-25)*(1024+e):5.960464477539063e-8*n*e},n.parseCBORfloat=function(l){switch(l.length){case 2:return n.parseHalf(l);case 4:return l.readFloatBE(0);case 8:return l.readDoubleBE(0);default:throw new Error(`Invalid float size: ${l.length}`)}},n.hex=function(l){return e.from(l.replace(/^0x/,""),"hex")},n.bin=function(l){let n=0,u=(l=l.replace(/\s/g,"")).length%8||8;const t=[];for(;u<=l.length;)t.push(parseInt(l.slice(n,u),2)),n=u,u+=8;return e.from(t)},n.arrayEqual=function(l,n){return null==l&&null==n||null!=l&&null!=n&&l.length===n.length&&l.every(((l,u)=>l===n[u]))},n.bufferToBigInt=function(l){return BigInt(`0x${l.toString("hex")}`)},n.cborValueToString=function(l,u=-1){switch(typeof l){case"symbol":{switch(l){case c.NULL:return"null";case c.UNDEFINED:return"undefined";case c.BREAK:return"BREAK"}if(l.description)return l.description;const n=l.toString().match(/^Symbol\((?<name>.*)\)/);return n&&n.groups.name?n.groups.name:"Symbol"}case"string":return JSON.stringify(l);case"bigint":return l.toString();case"number":{const n=Object.is(l,-0)?"-0":String(l);return u>0?`${n}_${u}`:n}case"object":{const e=n.bufferishToBuffer(l);if(e){const l=e.toString("hex");return u===-1/0?l:`h'${l}'`}return"function"==typeof l[Symbol.for("nodejs.util.inspect.custom")]?l[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(l)?"[]":"{}"}}return String(l)},n.guessEncoding=function(l,u){if("string"==typeof l)return new t(l,null==u?"hex":u);const e=n.bufferishToBuffer(l);if(e)return new t(e);if((i=l)instanceof r.Readable||["read","on","pipe"].every((l=>"function"==typeof i[l])))return l;var i;throw new Error("Unknown input type")};const h={"=":"","+":"-","/":"_"};n.base64url=function(l){return n.bufferishToBuffer(l).toString("base64").replace(/[=+/]/g,(l=>h[l]))},n.base64=function(l){return n.bufferishToBuffer(l).toString("base64")},n.isBigEndian=function(){const l=new Uint8Array(4);return!((new Uint32Array(l.buffer)[0]=1)&l[0])}},4202:(l,n,u)=>{const e=u(2830),{Buffer:t}=u(8764),r=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class i extends e.Transform{constructor(l,n,u={}){let e=null,r=null;switch(typeof l){case"object":t.isBuffer(l)?e=l:l&&(u=l);break;case"string":e=l;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof n){case"object":n&&(u=n);break;case"string":r=n;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!u||"object"!=typeof u)throw new TypeError("Invalid options");null==e&&(e=u.input),null==r&&(r=u.inputEncoding),delete u.input,delete u.inputEncoding;const i=null==u.watchPipe||u.watchPipe;delete u.watchPipe;const o=Boolean(u.readError);delete u.readError,super(u),this.readError=o,i&&this.on("pipe",(l=>{const n=l._readableState.objectMode;if(this.length>0&&n!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=n,this._writableState.objectMode=n})),null!=e&&this.end(e,r)}static isNoFilter(l){return l instanceof this}static compare(l,n){if(!(l instanceof this))throw new TypeError("Arguments must be NoFilters");return l===n?0:l.compare(n)}static concat(l,n){if(!Array.isArray(l))throw new TypeError("list argument must be an Array of NoFilters");if(0===l.length||0===n)return t.alloc(0);null==n&&(n=l.reduce(((l,n)=>{if(!(n instanceof i))throw new TypeError("list argument must be an Array of NoFilters");return l+n.length}),0));let u=!0,e=!0;const r=l.map((l=>{if(!(l instanceof i))throw new TypeError("list argument must be an Array of NoFilters");const n=l.slice();return t.isBuffer(n)?e=!1:u=!1,n}));if(u)return t.concat(r,n);if(e)return[].concat(...r).slice(0,n);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(l,n,u){this._readableState.objectMode||t.isBuffer(l)||(l=t.from(l,n)),this.push(l),u()}_bufArray(){let l=this._readableState.buffer;if(!Array.isArray(l)){let n=l.head;for(l=[];null!=n;)l.push(n.data),n=n.next}return l}read(l){const n=super.read(l);if(null!=n){if(this.emit("read",n),this.readError&&n.length<l)throw new Error(`Read ${n.length}, wanted ${l}`)}else if(this.readError)throw new Error(`No data available, wanted ${l}`);return n}readFull(l){let n=null,u=null,e=null;return new Promise(((t,r)=>{this.length>=l?t(this.read(l)):this.writableFinished?r(new Error(`Stream finished before ${l} bytes were available`)):(n=n=>{this.length>=l&&t(this.read(l))},u=()=>{r(new Error(`Stream finished before ${l} bytes were available`))},e=r,this.on("readable",n),this.on("error",e),this.on("finish",u))})).finally((()=>{n&&(this.removeListener("readable",n),this.removeListener("error",e),this.removeListener("finish",u))}))}promise(l){let n=!1;return new Promise(((u,e)=>{this.on("finish",(()=>{const e=this.read();null==l||n||(n=!0,l(null,e)),u(e)})),this.on("error",(u=>{null==l||n||(n=!0,l(u)),e(u)}))}))}compare(l){if(!(l instanceof i))throw new TypeError("Arguments must be NoFilters");if(this===l)return 0;const n=this.slice(),u=l.slice();if(t.isBuffer(n)&&t.isBuffer(u))return n.compare(u);throw new Error("Cannot compare streams in object mode")}equals(l){return 0===this.compare(l)}slice(l,n){if(this._readableState.objectMode)return this._bufArray().slice(l,n);const u=this._bufArray();switch(u.length){case 0:return t.alloc(0);case 1:return u[0].slice(l,n);default:return t.concat(u).slice(l,n)}}get(l){return this.slice()[l]}toJSON(){const l=this.slice();return t.isBuffer(l)?l.toJSON():l}toString(l,n,u){const e=this.slice(n,u);return t.isBuffer(e)?l&&"utf8"!==l?e.toString(l):r.decode(e):JSON.stringify(e)}[Symbol.for("nodejs.util.inspect.custom")](l,n){const u=this._bufArray().map((l=>t.isBuffer(l)?n.stylize(l.toString("hex"),"string"):JSON.stringify(l))).join(", ");return`${this.constructor.name} [${u}]`}get length(){return this._readableState.length}writeBigInt(l){let n=l.toString(16);if(l<0){const u=BigInt(Math.floor(n.length/2));n=(l=(BigInt(1)<<u*BigInt(8))+l).toString(16)}return n.length%2&&(n=`0${n}`),this.push(t.from(n,"hex"))}readUBigInt(l){const n=this.read(l);return t.isBuffer(n)?BigInt(`0x${n.toString("hex")}`):null}readBigInt(l){const n=this.read(l);if(!t.isBuffer(n))return null;let u=BigInt(`0x${n.toString("hex")}`);return 128&n[0]&&(u-=BigInt(1)<<BigInt(n.length)*BigInt(8)),u}writeUInt8(l){const n=t.from([l]);return this.push(n)}writeUInt16LE(l){const n=t.alloc(2);return n.writeUInt16LE(l),this.push(n)}writeUInt16BE(l){const n=t.alloc(2);return n.writeUInt16BE(l),this.push(n)}writeUInt32LE(l){const n=t.alloc(4);return n.writeUInt32LE(l),this.push(n)}writeUInt32BE(l){const n=t.alloc(4);return n.writeUInt32BE(l),this.push(n)}writeInt8(l){const n=t.from([l]);return this.push(n)}writeInt16LE(l){const n=t.alloc(2);return n.writeUInt16LE(l),this.push(n)}writeInt16BE(l){const n=t.alloc(2);return n.writeUInt16BE(l),this.push(n)}writeInt32LE(l){const n=t.alloc(4);return n.writeUInt32LE(l),this.push(n)}writeInt32BE(l){const n=t.alloc(4);return n.writeUInt32BE(l),this.push(n)}writeFloatLE(l){const n=t.alloc(4);return n.writeFloatLE(l),this.push(n)}writeFloatBE(l){const n=t.alloc(4);return n.writeFloatBE(l),this.push(n)}writeDoubleLE(l){const n=t.alloc(8);return n.writeDoubleLE(l),this.push(n)}writeDoubleBE(l){const n=t.alloc(8);return n.writeDoubleBE(l),this.push(n)}writeBigInt64LE(l){const n=t.alloc(8);return n.writeBigInt64LE(l),this.push(n)}writeBigInt64BE(l){const n=t.alloc(8);return n.writeBigInt64BE(l),this.push(n)}writeBigUInt64LE(l){const n=t.alloc(8);return n.writeBigUInt64LE(l),this.push(n)}writeBigUInt64BE(l){const n=t.alloc(8);return n.writeBigUInt64BE(l),this.push(n)}readUInt8(){const l=this.read(1);return t.isBuffer(l)?l.readUInt8():null}readUInt16LE(){const l=this.read(2);return t.isBuffer(l)?l.readUInt16LE():null}readUInt16BE(){const l=this.read(2);return t.isBuffer(l)?l.readUInt16BE():null}readUInt32LE(){const l=this.read(4);return t.isBuffer(l)?l.readUInt32LE():null}readUInt32BE(){const l=this.read(4);return t.isBuffer(l)?l.readUInt32BE():null}readInt8(){const l=this.read(1);return t.isBuffer(l)?l.readInt8():null}readInt16LE(){const l=this.read(2);return t.isBuffer(l)?l.readInt16LE():null}readInt16BE(){const l=this.read(2);return t.isBuffer(l)?l.readInt16BE():null}readInt32LE(){const l=this.read(4);return t.isBuffer(l)?l.readInt32LE():null}readInt32BE(){const l=this.read(4);return t.isBuffer(l)?l.readInt32BE():null}readFloatLE(){const l=this.read(4);return t.isBuffer(l)?l.readFloatLE():null}readFloatBE(){const l=this.read(4);return t.isBuffer(l)?l.readFloatBE():null}readDoubleLE(){const l=this.read(8);return t.isBuffer(l)?l.readDoubleLE():null}readDoubleBE(){const l=this.read(8);return t.isBuffer(l)?l.readDoubleBE():null}readBigInt64LE(){const l=this.read(8);return t.isBuffer(l)?l.readBigInt64LE():null}readBigInt64BE(){const l=this.read(8);return t.isBuffer(l)?l.readBigInt64BE():null}readBigUInt64LE(){const l=this.read(8);return t.isBuffer(l)?l.readBigUInt64LE():null}readBigUInt64BE(){const l=this.read(8);return t.isBuffer(l)?l.readBigUInt64BE():null}}l.exports=i},71:(l,n,u)=>{const e=u(2830),t=u(4202);class r extends e.Transform{constructor(l){super(l),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new t,this.__restart()}_transform(l,n,u){for(this.bs.write(l);this.bs.length>=this.__needed;){let n=null;const e=null===this.__needed?void 0:this.bs.read(this.__needed);try{n=this.__parser.next(e)}catch(l){return u(l)}this.__needed&&(this.__fresh=!1),n.done?(this.push(n.value),this.__restart()):this.__needed=n.value||1/0}return u()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(l){l(this.__fresh?null:new Error("unexpected end of input"))}}l.exports=r},7187:l=>{var n,u="object"==typeof Reflect?Reflect:null,e=u&&"function"==typeof u.apply?u.apply:function(l,n,u){return Function.prototype.apply.call(l,n,u)};n=u&&"function"==typeof u.ownKeys?u.ownKeys:Object.getOwnPropertySymbols?function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:function(l){return Object.getOwnPropertyNames(l)};var t=Number.isNaN||function(l){return l!=l};function r(){r.init.call(this)}l.exports=r,l.exports.once=function(l,n){return new Promise((function(u,e){function t(u){l.removeListener(n,r),e(u)}function r(){"function"==typeof l.removeListener&&l.removeListener("error",t),u([].slice.call(arguments))}g(l,n,r,{once:!0}),"error"!==n&&function(l,n,u){"function"==typeof l.on&&g(l,"error",n,{once:!0})}(l,t)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var i=10;function o(l){if("function"!=typeof l)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}function s(l){return void 0===l._maxListeners?r.defaultMaxListeners:l._maxListeners}function a(l,n,u,e){var t,r,i,a;if(o(u),void 0===(r=l._events)?(r=l._events=Object.create(null),l._eventsCount=0):(void 0!==r.newListener&&(l.emit("newListener",n,u.listener?u.listener:u),r=l._events),i=r[n]),void 0===i)i=r[n]=u,++l._eventsCount;else if("function"==typeof i?i=r[n]=e?[u,i]:[i,u]:e?i.unshift(u):i.push(u),(t=s(l))>0&&i.length>t&&!i.warned){i.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=l,c.type=n,c.count=i.length,a=c,console&&console.warn&&console.warn(a)}return l}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(l,n,u){var e={fired:!1,wrapFn:void 0,target:l,type:n,listener:u},t=c.bind(e);return t.listener=u,e.wrapFn=t,t}function h(l,n,u){var e=l._events;if(void 0===e)return[];var t=e[n];return void 0===t?[]:"function"==typeof t?u?[t.listener||t]:[t]:u?function(l){for(var n=new Array(l.length),u=0;u<n.length;++u)n[u]=l[u].listener||l[u];return n}(t):p(t,t.length)}function d(l){var n=this._events;if(void 0!==n){var u=n[l];if("function"==typeof u)return 1;if(void 0!==u)return u.length}return 0}function p(l,n){for(var u=new Array(n),e=0;e<n;++e)u[e]=l[e];return u}function g(l,n,u,e){if("function"==typeof l.on)e.once?l.once(n,u):l.on(n,u);else{if("function"!=typeof l.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof l);l.addEventListener(n,(function t(r){e.once&&l.removeEventListener(n,t),u(r)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(l){if("number"!=typeof l||l<0||t(l))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+l+".");i=l}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(l){if("number"!=typeof l||l<0||t(l))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+l+".");return this._maxListeners=l,this},r.prototype.getMaxListeners=function(){return s(this)},r.prototype.emit=function(l){for(var n=[],u=1;u<arguments.length;u++)n.push(arguments[u]);var t="error"===l,r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;if(t){var i;if(n.length>0&&(i=n[0]),i instanceof Error)throw i;var o=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw o.context=i,o}var s=r[l];if(void 0===s)return!1;if("function"==typeof s)e(s,this,n);else{var a=s.length,c=p(s,a);for(u=0;u<a;++u)e(c[u],this,n)}return!0},r.prototype.addListener=function(l,n){return a(this,l,n,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(l,n){return a(this,l,n,!0)},r.prototype.once=function(l,n){return o(n),this.on(l,f(this,l,n)),this},r.prototype.prependOnceListener=function(l,n){return o(n),this.prependListener(l,f(this,l,n)),this},r.prototype.removeListener=function(l,n){var u,e,t,r,i;if(o(n),void 0===(e=this._events))return this;if(void 0===(u=e[l]))return this;if(u===n||u.listener===n)0==--this._eventsCount?this._events=Object.create(null):(delete e[l],e.removeListener&&this.emit("removeListener",l,u.listener||n));else if("function"!=typeof u){for(t=-1,r=u.length-1;r>=0;r--)if(u[r]===n||u[r].listener===n){i=u[r].listener,t=r;break}if(t<0)return this;0===t?u.shift():function(l,n){for(;n+1<l.length;n++)l[n]=l[n+1];l.pop()}(u,t),1===u.length&&(e[l]=u[0]),void 0!==e.removeListener&&this.emit("removeListener",l,i||n)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(l){var n,u,e;if(void 0===(u=this._events))return this;if(void 0===u.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==u[l]&&(0==--this._eventsCount?this._events=Object.create(null):delete u[l]),this;if(0===arguments.length){var t,r=Object.keys(u);for(e=0;e<r.length;++e)"removeListener"!==(t=r[e])&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(n=u[l]))this.removeListener(l,n);else if(void 0!==n)for(e=n.length-1;e>=0;e--)this.removeListener(l,n[e]);return this},r.prototype.listeners=function(l){return h(this,l,!0)},r.prototype.rawListeners=function(l){return h(this,l,!1)},r.listenerCount=function(l,n){return"function"==typeof l.listenerCount?l.listenerCount(n):d.call(l,n)},r.prototype.listenerCount=d,r.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},645:(l,n)=>{n.read=function(l,n,u,e,t){var r,i,o=8*t-e-1,s=(1<<o)-1,a=s>>1,c=-7,f=u?t-1:0,h=u?-1:1,d=l[n+f];for(f+=h,r=d&(1<<-c)-1,d>>=-c,c+=o;c>0;r=256*r+l[n+f],f+=h,c-=8);for(i=r&(1<<-c)-1,r>>=-c,c+=e;c>0;i=256*i+l[n+f],f+=h,c-=8);if(0===r)r=1-a;else{if(r===s)return i?NaN:1/0*(d?-1:1);i+=Math.pow(2,e),r-=a}return(d?-1:1)*i*Math.pow(2,r-e)},n.write=function(l,n,u,e,t,r){var i,o,s,a=8*r-t-1,c=(1<<a)-1,f=c>>1,h=23===t?Math.pow(2,-24)-Math.pow(2,-77):0,d=e?0:r-1,p=e?1:-1,g=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(o=isNaN(n)?1:0,i=c):(i=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-i))<1&&(i--,s*=2),(n+=i+f>=1?h/s:h*Math.pow(2,1-f))*s>=2&&(i++,s/=2),i+f>=c?(o=0,i=c):i+f>=1?(o=(n*s-1)*Math.pow(2,t),i+=f):(o=n*Math.pow(2,f-1)*Math.pow(2,t),i=0));t>=8;l[u+d]=255&o,d+=p,o/=256,t-=8);for(i=i<<t|o,a+=t;a>0;l[u+d]=255&i,d+=p,i/=256,a-=8);l[u+d-p]|=128*g}},5717:l=>{"function"==typeof Object.create?l.exports=function(l,n){n&&(l.super_=n,l.prototype=Object.create(n.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}))}:l.exports=function(l,n){if(n){l.super_=n;var u=function(){};u.prototype=n.prototype,l.prototype=new u,l.prototype.constructor=l}}},4155:l=>{var n,u,e=l.exports={};function t(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(l){if(n===setTimeout)return setTimeout(l,0);if((n===t||!n)&&setTimeout)return n=setTimeout,setTimeout(l,0);try{return n(l,0)}catch(u){try{return n.call(null,l,0)}catch(u){return n.call(this,l,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:t}catch(l){n=t}try{u="function"==typeof clearTimeout?clearTimeout:r}catch(l){u=r}}();var o,s=[],a=!1,c=-1;function f(){a&&o&&(a=!1,o.length?s=o.concat(s):c=-1,s.length&&h())}function h(){if(!a){var l=i(f);a=!0;for(var n=s.length;n;){for(o=s,s=[];++c<n;)o&&o[c].run();c=-1,n=s.length}o=null,a=!1,function(l){if(u===clearTimeout)return clearTimeout(l);if((u===r||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(l);try{return u(l)}catch(n){try{return u.call(null,l)}catch(n){return u.call(this,l)}}}(l)}}function d(l,n){this.fun=l,this.array=n}function p(){}e.nextTick=function(l){var n=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)n[u-1]=arguments[u];s.push(new d(l,n)),1!==s.length||a||i(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=p,e.addListener=p,e.once=p,e.off=p,e.removeListener=p,e.removeAllListeners=p,e.emit=p,e.prependListener=p,e.prependOnceListener=p,e.listeners=function(l){return[]},e.binding=function(l){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(l){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},6753:(l,n,u)=>{l.exports=u(5099).Duplex},2725:(l,n,u)=>{l.exports=u(5099).PassThrough},9481:(l,n,u)=>{l.exports=u(5099).Readable},4605:(l,n,u)=>{l.exports=u(5099).Transform},4229:(l,n,u)=>{l.exports=u(5099).Writable},196:(l,n,u)=>{const{AbortError:e,codes:t}=u(4381),{isNodeStream:r,isWebStream:i,kControllerErrorFunction:o}=u(5874),s=u(8610),{ERR_INVALID_ARG_TYPE:a}=t;l.exports.addAbortSignal=function(n,u){if(((l,n)=>{if("object"!=typeof l||!("aborted"in l))throw new a("signal","AbortSignal",l)})(n),!r(u)&&!i(u))throw new a("stream",["ReadableStream","WritableStream","Stream"],u);return l.exports.addAbortSignalNoValidate(n,u)},l.exports.addAbortSignalNoValidate=function(l,n){if("object"!=typeof l||!("aborted"in l))return n;const u=r(n)?()=>{n.destroy(new e(void 0,{cause:l.reason}))}:()=>{n[o](new e(void 0,{cause:l.reason}))};return l.aborted?u():(l.addEventListener("abort",u),s(n,(()=>l.removeEventListener("abort",u)))),n}},7327:(l,n,u)=>{const{StringPrototypeSlice:e,SymbolIterator:t,TypedArrayPrototypeSet:r,Uint8Array:i}=u(9061),{Buffer:o}=u(8764),{inspect:s}=u(6087);l.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(l){const n={data:l,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(l){const n={data:l,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length}shift(){if(0===this.length)return;const l=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,l}clear(){this.head=this.tail=null,this.length=0}join(l){if(0===this.length)return"";let n=this.head,u=""+n.data;for(;null!==(n=n.next);)u+=l+n.data;return u}concat(l){if(0===this.length)return o.alloc(0);const n=o.allocUnsafe(l>>>0);let u=this.head,e=0;for(;u;)r(n,u.data,e),e+=u.data.length,u=u.next;return n}consume(l,n){const u=this.head.data;if(l<u.length){const n=u.slice(0,l);return this.head.data=u.slice(l),n}return l===u.length?this.shift():n?this._getString(l):this._getBuffer(l)}first(){return this.head.data}*[t](){for(let l=this.head;l;l=l.next)yield l.data}_getString(l){let n="",u=this.head,t=0;do{const r=u.data;if(!(l>r.length)){l===r.length?(n+=r,++t,u.next?this.head=u.next:this.head=this.tail=null):(n+=e(r,0,l),this.head=u,u.data=e(r,l));break}n+=r,l-=r.length,++t}while(null!==(u=u.next));return this.length-=t,n}_getBuffer(l){const n=o.allocUnsafe(l),u=l;let e=this.head,t=0;do{const o=e.data;if(!(l>o.length)){l===o.length?(r(n,o,u-l),++t,e.next?this.head=e.next:this.head=this.tail=null):(r(n,new i(o.buffer,o.byteOffset,l),u-l),this.head=e,e.data=o.slice(l));break}r(n,o,u-l),l-=o.length,++t}while(null!==(e=e.next));return this.length-=t,n}[Symbol.for("nodejs.util.inspect.custom")](l,n){return s(this,{...n,depth:0,customInspect:!1})}}},299:(l,n,u)=>{const{pipeline:e}=u(9946),t=u(8672),{destroyer:r}=u(1195),{isNodeStream:i,isReadable:o,isWritable:s,isWebStream:a,isTransformStream:c,isWritableStream:f,isReadableStream:h}=u(5874),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:g}}=u(4381),y=u(8610);l.exports=function(...l){if(0===l.length)throw new g("streams");if(1===l.length)return t.from(l[0]);const n=[...l];if("function"==typeof l[0]&&(l[0]=t.from(l[0])),"function"==typeof l[l.length-1]){const n=l.length-1;l[n]=t.from(l[n])}for(let u=0;u<l.length;++u)if(i(l[u])||a(l[u])){if(u<l.length-1&&!(o(l[u])||h(l[u])||c(l[u])))throw new p(`streams[${u}]`,n[u],"must be readable");if(u>0&&!(s(l[u])||f(l[u])||c(l[u])))throw new p(`streams[${u}]`,n[u],"must be writable")}let u,b,w,m,_;const E=l[0],S=e(l,(function(l){const n=m;m=null,n?n(l):l?_.destroy(l):v||A||_.destroy()})),A=!!(s(E)||f(E)||c(E)),v=!!(o(S)||h(S)||c(S));if(_=new t({writableObjectMode:!(null==E||!E.writableObjectMode),readableObjectMode:!(null==S||!S.writableObjectMode),writable:A,readable:v}),A){if(i(E))_._write=function(l,n,e){E.write(l,n)?e():u=e},_._final=function(l){E.end(),b=l},E.on("drain",(function(){if(u){const l=u;u=null,l()}}));else if(a(E)){const l=(c(E)?E.writable:E).getWriter();_._write=async function(n,u,e){try{await l.ready,l.write(n).catch((()=>{})),e()}catch(l){e(l)}},_._final=async function(n){try{await l.ready,l.close().catch((()=>{})),b=n}catch(l){n(l)}}}const l=c(S)?S.readable:S;y(l,(()=>{if(b){const l=b;b=null,l()}}))}if(v)if(i(S))S.on("readable",(function(){if(w){const l=w;w=null,l()}})),S.on("end",(function(){_.push(null)})),_._read=function(){for(;;){const l=S.read();if(null===l)return void(w=_._read);if(!_.push(l))return}};else if(a(S)){const l=(c(S)?S.readable:S).getReader();_._read=async function(){for(;;)try{const{value:n,done:u}=await l.read();if(!_.push(n))return;if(u)return void _.push(null)}catch{return}}}return _._destroy=function(l,n){l||null===m||(l=new d),w=null,u=null,b=null,null===m?n(l):(m=n,i(S)&&r(S,l))},_}},1195:(l,n,u)=>{const e=u(4155),{aggregateTwoErrors:t,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:i}=u(4381),{Symbol:o}=u(9061),{kDestroyed:s,isDestroyed:a,isFinished:c,isServerRequest:f}=u(5874),h=o("kDestroy"),d=o("kConstruct");function p(l,n,u){l&&(l.stack,n&&!n.errored&&(n.errored=l),u&&!u.errored&&(u.errored=l))}function g(l,n,u){let t=!1;function r(n){if(t)return;t=!0;const r=l._readableState,i=l._writableState;p(n,i,r),i&&(i.closed=!0),r&&(r.closed=!0),"function"==typeof u&&u(n),n?e.nextTick(y,l,n):e.nextTick(b,l)}try{l._destroy(n||null,r)}catch(n){r(n)}}function y(l,n){w(l,n),b(l)}function b(l){const n=l._readableState,u=l._writableState;u&&(u.closeEmitted=!0),n&&(n.closeEmitted=!0),(null!=u&&u.emitClose||null!=n&&n.emitClose)&&l.emit("close")}function w(l,n){const u=l._readableState,e=l._writableState;null!=e&&e.errorEmitted||null!=u&&u.errorEmitted||(e&&(e.errorEmitted=!0),u&&(u.errorEmitted=!0),l.emit("error",n))}function m(l,n,u){const t=l._readableState,r=l._writableState;if(null!=r&&r.destroyed||null!=t&&t.destroyed)return this;null!=t&&t.autoDestroy||null!=r&&r.autoDestroy?l.destroy(n):n&&(n.stack,r&&!r.errored&&(r.errored=n),t&&!t.errored&&(t.errored=n),u?e.nextTick(w,l,n):w(l,n))}function _(l){let n=!1;function u(u){if(n)return void m(l,null!=u?u:new r);n=!0;const t=l._readableState,i=l._writableState,o=i||t;t&&(t.constructed=!0),i&&(i.constructed=!0),o.destroyed?l.emit(h,u):u?m(l,u,!0):e.nextTick(E,l)}try{l._construct((l=>{e.nextTick(u,l)}))}catch(l){e.nextTick(u,l)}}function E(l){l.emit(d)}function S(l){return(null==l?void 0:l.setHeader)&&"function"==typeof l.abort}function A(l){l.emit("close")}function v(l,n){l.emit("error",n),e.nextTick(A,l)}l.exports={construct:function(l,n){if("function"!=typeof l._construct)return;const u=l._readableState,t=l._writableState;u&&(u.constructed=!1),t&&(t.constructed=!1),l.once(d,n),l.listenerCount(d)>1||e.nextTick(_,l)},destroyer:function(l,n){l&&!a(l)&&(n||c(l)||(n=new i),f(l)?(l.socket=null,l.destroy(n)):S(l)?l.abort():S(l.req)?l.req.abort():"function"==typeof l.destroy?l.destroy(n):"function"==typeof l.close?l.close():n?e.nextTick(v,l,n):e.nextTick(A,l),l.destroyed||(l[s]=!0))},destroy:function(l,n){const u=this._readableState,e=this._writableState,r=e||u;return null!=e&&e.destroyed||null!=u&&u.destroyed?("function"==typeof n&&n(),this):(p(l,e,u),e&&(e.destroyed=!0),u&&(u.destroyed=!0),r.constructed?g(this,l,n):this.once(h,(function(u){g(this,t(u,l),n)})),this)},undestroy:function(){const l=this._readableState,n=this._writableState;l&&(l.constructed=!0,l.closed=!1,l.closeEmitted=!1,l.destroyed=!1,l.errored=null,l.errorEmitted=!1,l.reading=!1,l.ended=!1===l.readable,l.endEmitted=!1===l.readable),n&&(n.constructed=!0,n.destroyed=!1,n.closed=!1,n.closeEmitted=!1,n.errored=null,n.errorEmitted=!1,n.finalCalled=!1,n.prefinished=!1,n.ended=!1===n.writable,n.ending=!1===n.writable,n.finished=!1===n.writable)},errorOrDestroy:m}},8672:(l,n,u)=>{const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:i}=u(9061);l.exports=a;const o=u(911),s=u(6304);i(a.prototype,o.prototype),i(a,o);{const l=r(s.prototype);for(let n=0;n<l.length;n++){const u=l[n];a.prototype[u]||(a.prototype[u]=s.prototype[u])}}function a(l){if(!(this instanceof a))return new a(l);o.call(this,l),s.call(this,l),l?(this.allowHalfOpen=!1!==l.allowHalfOpen,!1===l.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===l.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let c,f;function h(){return void 0===c&&(c={}),c}e(a.prototype,{writable:{__proto__:null,...t(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(s.prototype,"writableLength")},writableFinished:{__proto__:null,...t(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(s.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(l){this._readableState&&this._writableState&&(this._readableState.destroyed=l,this._writableState.destroyed=l)}}}),a.fromWeb=function(l,n){return h().newStreamDuplexFromReadableWritablePair(l,n)},a.toWeb=function(l){return h().newReadableWritablePairFromDuplex(l)},a.from=function(l){return f||(f=u(7946)),f(l,"body")}},7946:(l,n,u)=>{const e=u(4155),t=u(8764),{isReadable:r,isWritable:i,isIterable:o,isNodeStream:s,isReadableNodeStream:a,isWritableNodeStream:c,isDuplexNodeStream:f}=u(5874),h=u(8610),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g}}=u(4381),{destroyer:y}=u(1195),b=u(8672),w=u(911),{createDeferredPromise:m}=u(6087),_=u(6307),E=globalThis.Blob||t.Blob,S=void 0!==E?function(l){return l instanceof E}:function(l){return!1},A=globalThis.AbortController||u(8599).AbortController,{FunctionPrototypeCall:v}=u(9061);class T extends b{constructor(l){super(l),!1===(null==l?void 0:l.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==l?void 0:l.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(l){const n=l.readable&&"function"!=typeof l.readable.read?w.wrap(l.readable):l.readable,u=l.writable;let e,t,o,s,a,c=!!r(n),f=!!i(u);function p(l){const n=s;s=null,n?n(l):l&&a.destroy(l)}return a=new T({readableObjectMode:!(null==n||!n.readableObjectMode),writableObjectMode:!(null==u||!u.writableObjectMode),readable:c,writable:f}),f&&(h(u,(l=>{f=!1,l&&y(n,l),p(l)})),a._write=function(l,n,t){u.write(l,n)?t():e=t},a._final=function(l){u.end(),t=l},u.on("drain",(function(){if(e){const l=e;e=null,l()}})),u.on("finish",(function(){if(t){const l=t;t=null,l()}}))),c&&(h(n,(l=>{c=!1,l&&y(n,l),p(l)})),n.on("readable",(function(){if(o){const l=o;o=null,l()}})),n.on("end",(function(){a.push(null)})),a._read=function(){for(;;){const l=n.read();if(null===l)return void(o=a._read);if(!a.push(l))return}}),a._destroy=function(l,r){l||null===s||(l=new d),o=null,e=null,t=null,null===s?r(l):(s=r,y(u,l),y(n,l))},a}l.exports=function l(n,u){if(f(n))return n;if(a(n))return I({readable:n});if(c(n))return I({writable:n});if(s(n))return I({writable:!1,readable:!1});if("function"==typeof n){const{value:l,write:t,final:r,destroy:i}=function(l){let{promise:n,resolve:u}=m();const t=new A,r=t.signal;return{value:l(async function*(){for(;;){const l=n;n=null;const{chunk:t,done:i,cb:o}=await l;if(e.nextTick(o),i)return;if(r.aborted)throw new d(void 0,{cause:r.reason});({promise:n,resolve:u}=m()),yield t}}(),{signal:r}),write(l,n,e){const t=u;u=null,t({chunk:l,done:!1,cb:e})},final(l){const n=u;u=null,n({done:!0,cb:l})},destroy(l,n){t.abort(),n(l)}}}(n);if(o(l))return _(T,l,{objectMode:!0,write:t,final:r,destroy:i});const s=null==l?void 0:l.then;if("function"==typeof s){let n;const u=v(s,l,(l=>{if(null!=l)throw new g("nully","body",l)}),(l=>{y(n,l)}));return n=new T({objectMode:!0,readable:!1,write:t,final(l){r((async()=>{try{await u,e.nextTick(l,null)}catch(n){e.nextTick(l,n)}}))},destroy:i})}throw new g("Iterable, AsyncIterable or AsyncFunction",u,l)}if(S(n))return l(n.arrayBuffer());if(o(n))return _(T,n,{objectMode:!0,writable:!1});if("object"==typeof(null==n?void 0:n.writable)||"object"==typeof(null==n?void 0:n.readable))return I({readable:null!=n&&n.readable?a(null==n?void 0:n.readable)?null==n?void 0:n.readable:l(n.readable):void 0,writable:null!=n&&n.writable?c(null==n?void 0:n.writable)?null==n?void 0:n.writable:l(n.writable):void 0});const t=null==n?void 0:n.then;if("function"==typeof t){let l;return v(t,n,(n=>{null!=n&&l.push(n),l.push(null)}),(n=>{y(l,n)})),l=new T({objectMode:!0,writable:!1,read(){}})}throw new p(u,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],n)}},8610:(l,n,u)=>{const e=u(4155),{AbortError:t,codes:r}=u(4381),{ERR_INVALID_ARG_TYPE:i,ERR_STREAM_PREMATURE_CLOSE:o}=r,{kEmptyObject:s,once:a}=u(6087),{validateAbortSignal:c,validateFunction:f,validateObject:h,validateBoolean:d}=u(6547),{Promise:p,PromisePrototypeThen:g}=u(9061),{isClosed:y,isReadable:b,isReadableNodeStream:w,isReadableStream:m,isReadableFinished:_,isReadableErrored:E,isWritable:S,isWritableNodeStream:A,isWritableStream:v,isWritableFinished:T,isWritableErrored:I,isNodeStream:R,willEmitClose:B,kIsClosedPromise:x}=u(5874),U=()=>{};function N(l,n,u){var r,d;if(2===arguments.length?(u=n,n=s):null==n?n=s:h(n,"options"),f(u,"callback"),c(n.signal,"options.signal"),u=a(u),m(l)||v(l))return function(l,n,u){let r=!1,i=U;if(n.signal)if(i=()=>{r=!0,u.call(l,new t(void 0,{cause:n.signal.reason}))},n.signal.aborted)e.nextTick(i);else{const e=u;u=a(((...u)=>{n.signal.removeEventListener("abort",i),e.apply(l,u)})),n.signal.addEventListener("abort",i)}const o=(...n)=>{r||e.nextTick((()=>u.apply(l,n)))};return g(l[x].promise,o,o),U}(l,n,u);if(!R(l))throw new i("stream",["ReadableStream","WritableStream","Stream"],l);const p=null!==(r=n.readable)&&void 0!==r?r:w(l),N=null!==(d=n.writable)&&void 0!==d?d:A(l),k=l._writableState,O=l._readableState,L=()=>{l.writable||C()};let M=B(l)&&w(l)===p&&A(l)===N,P=T(l,!1);const C=()=>{P=!0,l.destroyed&&(M=!1),(!M||l.readable&&!p)&&(p&&!j||u.call(l))};let j=_(l,!1);const D=()=>{j=!0,l.destroyed&&(M=!1),(!M||l.writable&&!N)&&(N&&!P||u.call(l))},F=n=>{u.call(l,n)};let $=y(l);const W=()=>{$=!0;const n=I(l)||E(l);return n&&"boolean"!=typeof n?u.call(l,n):p&&!j&&w(l,!0)&&!_(l,!1)?u.call(l,new o):!N||P||T(l,!1)?void u.call(l):u.call(l,new o)},K=()=>{$=!0;const n=I(l)||E(l);if(n&&"boolean"!=typeof n)return u.call(l,n);u.call(l)},G=()=>{l.req.on("finish",C)};!function(l){return l.setHeader&&"function"==typeof l.abort}(l)?N&&!k&&(l.on("end",L),l.on("close",L)):(l.on("complete",C),M||l.on("abort",W),l.req?G():l.on("request",G)),M||"boolean"!=typeof l.aborted||l.on("aborted",W),l.on("end",D),l.on("finish",C),!1!==n.error&&l.on("error",F),l.on("close",W),$?e.nextTick(W):null!=k&&k.errorEmitted||null!=O&&O.errorEmitted?M||e.nextTick(K):(p||M&&!b(l)||!P&&!1!==S(l))&&(N||M&&!S(l)||!j&&!1!==b(l))?O&&l.req&&l.aborted&&e.nextTick(K):e.nextTick(K);const H=()=>{u=U,l.removeListener("aborted",W),l.removeListener("complete",C),l.removeListener("abort",W),l.removeListener("request",G),l.req&&l.req.removeListener("finish",C),l.removeListener("end",L),l.removeListener("close",L),l.removeListener("finish",C),l.removeListener("end",D),l.removeListener("error",F),l.removeListener("close",W)};if(n.signal&&!$){const r=()=>{const e=u;H(),e.call(l,new t(void 0,{cause:n.signal.reason}))};if(n.signal.aborted)e.nextTick(r);else{const e=u;u=a(((...u)=>{n.signal.removeEventListener("abort",r),e.apply(l,u)})),n.signal.addEventListener("abort",r)}}return H}l.exports=N,l.exports.finished=function(l,n){var u;let e=!1;return null===n&&(n=s),null!==(u=n)&&void 0!==u&&u.cleanup&&(d(n.cleanup,"cleanup"),e=n.cleanup),new p(((u,t)=>{const r=N(l,n,(l=>{e&&r(),l?t(l):u()}))}))}},6307:(l,n,u)=>{const e=u(4155),{PromisePrototypeThen:t,SymbolAsyncIterator:r,SymbolIterator:i}=u(9061),{Buffer:o}=u(8764),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:a}=u(4381).codes;l.exports=function(l,n,u){let c,f;if("string"==typeof n||n instanceof o)return new l({objectMode:!0,...u,read(){this.push(n),this.push(null)}});if(n&&n[r])f=!0,c=n[r]();else{if(!n||!n[i])throw new s("iterable",["Iterable"],n);f=!1,c=n[i]()}const h=new l({objectMode:!0,highWaterMark:1,...u});let d=!1;return h._read=function(){d||(d=!0,async function(){for(;;){try{const{value:l,done:n}=f?await c.next():c.next();if(n)h.push(null);else{const n=l&&"function"==typeof l.then?await l:l;if(null===n)throw d=!1,new a;if(h.push(n))continue;d=!1}}catch(l){h.destroy(l)}break}}())},h._destroy=function(l,n){t(async function(l){const n=null!=l,u="function"==typeof c.throw;if(n&&u){const{value:n,done:u}=await c.throw(l);if(await n,u)return}if("function"==typeof c.return){const{value:l}=await c.return();await l}}(l),(()=>e.nextTick(n,l)),(u=>e.nextTick(n,u||l)))},h}},4870:(l,n,u)=>{const{ArrayIsArray:e,ObjectSetPrototypeOf:t}=u(9061),{EventEmitter:r}=u(7187);function i(l){r.call(this,l)}function o(l,n,u){if("function"==typeof l.prependListener)return l.prependListener(n,u);l._events&&l._events[n]?e(l._events[n])?l._events[n].unshift(u):l._events[n]=[u,l._events[n]]:l.on(n,u)}t(i.prototype,r.prototype),t(i,r),i.prototype.pipe=function(l,n){const u=this;function e(n){l.writable&&!1===l.write(n)&&u.pause&&u.pause()}function t(){u.readable&&u.resume&&u.resume()}u.on("data",e),l.on("drain",t),l._isStdio||n&&!1===n.end||(u.on("end",s),u.on("close",a));let i=!1;function s(){i||(i=!0,l.end())}function a(){i||(i=!0,"function"==typeof l.destroy&&l.destroy())}function c(l){f(),0===r.listenerCount(this,"error")&&this.emit("error",l)}function f(){u.removeListener("data",e),l.removeListener("drain",t),u.removeListener("end",s),u.removeListener("close",a),u.removeListener("error",c),l.removeListener("error",c),u.removeListener("end",f),u.removeListener("close",f),l.removeListener("close",f)}return o(u,"error",c),o(l,"error",c),u.on("end",f),u.on("close",f),l.on("close",f),l.emit("pipe",u),l},l.exports={Stream:i,prependListener:o}},4382:(l,n,u)=>{const e=globalThis.AbortController||u(8599).AbortController,{codes:{ERR_INVALID_ARG_VALUE:t,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:i,ERR_OUT_OF_RANGE:o},AbortError:s}=u(4381),{validateAbortSignal:a,validateInteger:c,validateObject:f}=u(6547),h=u(9061).Symbol("kWeak"),{finished:d}=u(8610),p=u(299),{addAbortSignalNoValidate:g}=u(196),{isWritable:y,isNodeStream:b}=u(5874),{ArrayPrototypePush:w,MathFloor:m,Number:_,NumberIsNaN:E,Promise:S,PromiseReject:A,PromisePrototypeThen:v,Symbol:T}=u(9061),I=T("kEmpty"),R=T("kEof");function B(l,n){if("function"!=typeof l)throw new r("fn",["Function","AsyncFunction"],l);null!=n&&f(n,"options"),null!=(null==n?void 0:n.signal)&&a(n.signal,"options.signal");let u=1;return null!=(null==n?void 0:n.concurrency)&&(u=m(n.concurrency)),c(u,"concurrency",1),async function*(){var t,r;const i=new e,o=this,a=[],c=i.signal,f={signal:c},h=()=>i.abort();let d,p;null!=n&&null!==(t=n.signal)&&void 0!==t&&t.aborted&&h(),null==n||null===(r=n.signal)||void 0===r||r.addEventListener("abort",h);let g=!1;function y(){g=!0}!async function(){try{for await(let n of o){var e;if(g)return;if(c.aborted)throw new s;try{n=l(n,f)}catch(l){n=A(l)}n!==I&&("function"==typeof(null===(e=n)||void 0===e?void 0:e.catch)&&n.catch(y),a.push(n),d&&(d(),d=null),!g&&a.length&&a.length>=u&&await new S((l=>{p=l})))}a.push(R)}catch(l){const n=A(l);v(n,void 0,y),a.push(n)}finally{var t;g=!0,d&&(d(),d=null),null==n||null===(t=n.signal)||void 0===t||t.removeEventListener("abort",h)}}();try{for(;;){for(;a.length>0;){const l=await a[0];if(l===R)return;if(c.aborted)throw new s;l!==I&&(yield l),a.shift(),p&&(p(),p=null)}await new S((l=>{d=l}))}}finally{i.abort(),g=!0,p&&(p(),p=null)}}.call(this)}async function x(l,n=void 0){for await(const u of U.call(this,l,n))return!0;return!1}function U(l,n){if("function"!=typeof l)throw new r("fn",["Function","AsyncFunction"],l);return B.call(this,(async function(n,u){return await l(n,u)?n:I}),n)}class N extends i{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function k(l){if(l=_(l),E(l))return 0;if(l<0)throw new o("number",">= 0",l);return l}l.exports.streamReturningOperators={asIndexedPairs:function(l=void 0){return null!=l&&f(l,"options"),null!=(null==l?void 0:l.signal)&&a(l.signal,"options.signal"),async function*(){let n=0;for await(const e of this){var u;if(null!=l&&null!==(u=l.signal)&&void 0!==u&&u.aborted)throw new s({cause:l.signal.reason});yield[n++,e]}}.call(this)},drop:function(l,n=void 0){return null!=n&&f(n,"options"),null!=(null==n?void 0:n.signal)&&a(n.signal,"options.signal"),l=k(l),async function*(){var u;if(null!=n&&null!==(u=n.signal)&&void 0!==u&&u.aborted)throw new s;for await(const u of this){var e;if(null!=n&&null!==(e=n.signal)&&void 0!==e&&e.aborted)throw new s;l--<=0&&(yield u)}}.call(this)},filter:U,flatMap:function(l,n){const u=B.call(this,l,n);return async function*(){for await(const l of u)yield*l}.call(this)},map:B,take:function(l,n=void 0){return null!=n&&f(n,"options"),null!=(null==n?void 0:n.signal)&&a(n.signal,"options.signal"),l=k(l),async function*(){var u;if(null!=n&&null!==(u=n.signal)&&void 0!==u&&u.aborted)throw new s;for await(const u of this){var e;if(null!=n&&null!==(e=n.signal)&&void 0!==e&&e.aborted)throw new s;if(!(l-- >0))return;yield u}}.call(this)},compose:function(l,n){if(null!=n&&f(n,"options"),null!=(null==n?void 0:n.signal)&&a(n.signal,"options.signal"),b(l)&&!y(l))throw new t("stream",l,"must be writable");const u=p(this,l);return null!=n&&n.signal&&g(n.signal,u),u}},l.exports.promiseReturningOperators={every:async function(l,n=void 0){if("function"!=typeof l)throw new r("fn",["Function","AsyncFunction"],l);return!await x.call(this,(async(...n)=>!await l(...n)),n)},forEach:async function(l,n){if("function"!=typeof l)throw new r("fn",["Function","AsyncFunction"],l);for await(const u of B.call(this,(async function(n,u){return await l(n,u),I}),n));},reduce:async function(l,n,u){var t;if("function"!=typeof l)throw new r("reducer",["Function","AsyncFunction"],l);null!=u&&f(u,"options"),null!=(null==u?void 0:u.signal)&&a(u.signal,"options.signal");let i=arguments.length>1;if(null!=u&&null!==(t=u.signal)&&void 0!==t&&t.aborted){const l=new s(void 0,{cause:u.signal.reason});throw this.once("error",(()=>{})),await d(this.destroy(l)),l}const o=new e,c=o.signal;if(null!=u&&u.signal){const l={once:!0,[h]:this};u.signal.addEventListener("abort",(()=>o.abort()),l)}let p=!1;try{for await(const e of this){var g;if(p=!0,null!=u&&null!==(g=u.signal)&&void 0!==g&&g.aborted)throw new s;i?n=await l(n,e,{signal:c}):(n=e,i=!0)}if(!p&&!i)throw new N}finally{o.abort()}return n},toArray:async function(l){null!=l&&f(l,"options"),null!=(null==l?void 0:l.signal)&&a(l.signal,"options.signal");const n=[];for await(const e of this){var u;if(null!=l&&null!==(u=l.signal)&&void 0!==u&&u.aborted)throw new s(void 0,{cause:l.signal.reason});w(n,e)}return n},some:x,find:async function(l,n){for await(const u of U.call(this,l,n))return u}}},917:(l,n,u)=>{const{ObjectSetPrototypeOf:e}=u(9061);l.exports=r;const t=u(1161);function r(l){if(!(this instanceof r))return new r(l);t.call(this,l)}e(r.prototype,t.prototype),e(r,t),r.prototype._transform=function(l,n,u){u(null,l)}},9946:(l,n,u)=>{const e=u(4155),{ArrayIsArray:t,Promise:r,SymbolAsyncIterator:i}=u(9061),o=u(8610),{once:s}=u(6087),a=u(1195),c=u(8672),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:d,ERR_MISSING_ARGS:p,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:b}=u(4381),{validateFunction:w,validateAbortSignal:m}=u(6547),{isIterable:_,isReadable:E,isReadableNodeStream:S,isNodeStream:A,isTransformStream:v,isWebStream:T,isReadableStream:I,isReadableEnded:R}=u(5874),B=globalThis.AbortController||u(8599).AbortController;let x,U;function N(l,n,u){let e=!1;return l.on("close",(()=>{e=!0})),{destroy:n=>{e||(e=!0,a.destroyer(l,n||new g("pipe")))},cleanup:o(l,{readable:n,writable:u},(l=>{e=!l}))}}function k(l){if(_(l))return l;if(S(l))return async function*(l){U||(U=u(911)),yield*U.prototype[i].call(l)}(l);throw new h("val",["Readable","Iterable","AsyncIterable"],l)}async function O(l,n,u,{end:e}){let t,i=null;const s=l=>{if(l&&(t=l),i){const l=i;i=null,l()}},a=()=>new r(((l,n)=>{t?n(t):i=()=>{t?n(t):l()}}));n.on("drain",s);const c=o(n,{readable:!1},s);try{n.writableNeedDrain&&await a();for await(const u of l)n.write(u)||await a();e&&n.end(),await a(),u()}catch(l){u(t!==l?f(t,l):l)}finally{c(),n.off("drain",s)}}async function L(l,n,u,{end:e}){v(n)&&(n=n.writable);const t=n.getWriter();try{for await(const n of l)await t.ready,t.write(n).catch((()=>{}));await t.ready,e&&await t.close(),u()}catch(l){try{await t.abort(l),u(l)}catch(l){u(l)}}}function M(l,n,r){if(1===l.length&&t(l[0])&&(l=l[0]),l.length<2)throw new p("streams");const i=new B,o=i.signal,s=null==r?void 0:r.signal,a=[];function f(){C(new b)}let g,y;m(s,"options.signal"),null==s||s.addEventListener("abort",f);const w=[];let R,U=0;function M(l){C(l,0==--U)}function C(l,u){if(!l||g&&"ERR_STREAM_PREMATURE_CLOSE"!==g.code||(g=l),g||u){for(;w.length;)w.shift()(g);null==s||s.removeEventListener("abort",f),i.abort(),u&&(g||a.forEach((l=>l())),e.nextTick(n,g,y))}}for(let $=0;$<l.length;$++){const W=l[$],K=$<l.length-1,G=$>0,H=K||!1!==(null==r?void 0:r.end),Y=$===l.length-1;if(A(W)){if(H){const{destroy:V,cleanup:z}=N(W,K,G);w.push(V),E(W)&&Y&&a.push(z)}function j(l){l&&"AbortError"!==l.name&&"ERR_STREAM_PREMATURE_CLOSE"!==l.code&&M(l)}W.on("error",j),E(W)&&Y&&a.push((()=>{W.removeListener("error",j)}))}if(0===$)if("function"==typeof W){if(R=W({signal:o}),!_(R))throw new d("Iterable, AsyncIterable or Stream","source",R)}else R=_(W)||S(W)||v(W)?W:c.from(W);else if("function"==typeof W){var D;if(R=v(R)?k(null===(D=R)||void 0===D?void 0:D.readable):k(R),R=W(R,{signal:o}),K){if(!_(R,!0))throw new d("AsyncIterable",`transform[${$-1}]`,R)}else{var F;x||(x=u(917));const q=new x({objectMode:!0}),J=null===(F=R)||void 0===F?void 0:F.then;if("function"==typeof J)U++,J.call(R,(l=>{y=l,null!=l&&q.write(l),H&&q.end(),e.nextTick(M)}),(l=>{q.destroy(l),e.nextTick(M,l)}));else if(_(R,!0))U++,O(R,q,M,{end:H});else{if(!I(R)&&!v(R))throw new d("AsyncIterable or Promise","destination",R);{const Z=R.readable||R;U++,O(Z,q,M,{end:H})}}R=q;const{destroy:X,cleanup:Q}=N(R,!1,!0);w.push(X),Y&&a.push(Q)}}else if(A(W)){if(S(R)){U+=2;const ll=P(R,W,M,{end:H});E(W)&&Y&&a.push(ll)}else if(v(R)||I(R)){const nl=R.readable||R;U++,O(nl,W,M,{end:H})}else{if(!_(R))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);U++,O(R,W,M,{end:H})}R=W}else if(T(W)){if(S(R))U++,L(k(R),W,M,{end:H});else if(I(R)||_(R))U++,L(R,W,M,{end:H});else{if(!v(R))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);U++,L(R.readable,W,M,{end:H})}R=W}else R=c.from(W)}return(null!=o&&o.aborted||null!=s&&s.aborted)&&e.nextTick(f),R}function P(l,n,u,{end:t}){let r=!1;if(n.on("close",(()=>{r||u(new y)})),l.pipe(n,{end:!1}),t){function i(){r=!0,n.end()}R(l)?e.nextTick(i):l.once("end",i)}else u();return o(l,{readable:!0,writable:!1},(n=>{const e=l._readableState;n&&"ERR_STREAM_PREMATURE_CLOSE"===n.code&&e&&e.ended&&!e.errored&&!e.errorEmitted?l.once("end",u).once("error",u):u(n)})),o(n,{readable:!1,writable:!0},u)}l.exports={pipelineImpl:M,pipeline:function(...l){return M(l,s(function(l){return w(l[l.length-1],"streams[stream.length - 1]"),l.pop()}(l)))}}},911:(l,n,u)=>{const e=u(4155),{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:i,NumberParseInt:o,ObjectDefineProperties:s,ObjectKeys:a,ObjectSetPrototypeOf:c,Promise:f,SafeSet:h,SymbolAsyncIterator:d,Symbol:p}=u(9061);l.exports=D,D.ReadableState=j;const{EventEmitter:g}=u(7187),{Stream:y,prependListener:b}=u(4870),{Buffer:w}=u(8764),{addAbortSignal:m}=u(196),_=u(8610);let E=u(6087).debuglog("stream",(l=>{E=l}));const S=u(7327),A=u(1195),{getHighWaterMark:v,getDefaultHighWaterMark:T}=u(2457),{aggregateTwoErrors:I,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:B,ERR_OUT_OF_RANGE:x,ERR_STREAM_PUSH_AFTER_EOF:U,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N}}=u(4381),{validateObject:k}=u(6547),O=p("kPaused"),{StringDecoder:L}=u(2553),M=u(6307);c(D.prototype,y.prototype),c(D,y);const P=()=>{},{errorOrDestroy:C}=A;function j(l,n,e){"boolean"!=typeof e&&(e=n instanceof u(8672)),this.objectMode=!(!l||!l.objectMode),e&&(this.objectMode=this.objectMode||!(!l||!l.readableObjectMode)),this.highWaterMark=l?v(this,l,"readableHighWaterMark",e):T(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[O]=null,this.errorEmitted=!1,this.emitClose=!l||!1!==l.emitClose,this.autoDestroy=!l||!1!==l.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=l&&l.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,l&&l.encoding&&(this.decoder=new L(l.encoding),this.encoding=l.encoding)}function D(l){if(!(this instanceof D))return new D(l);const n=this instanceof u(8672);this._readableState=new j(l,this,n),l&&("function"==typeof l.read&&(this._read=l.read),"function"==typeof l.destroy&&(this._destroy=l.destroy),"function"==typeof l.construct&&(this._construct=l.construct),l.signal&&!n&&m(l.signal,this)),y.call(this,l),A.construct(this,(()=>{this._readableState.needReadable&&H(this,this._readableState)}))}function F(l,n,u,e){E("readableAddChunk",n);const t=l._readableState;let r;if(t.objectMode||("string"==typeof n?(u=u||t.defaultEncoding,t.encoding!==u&&(e&&t.encoding?n=w.from(n,u).toString(t.encoding):(n=w.from(n,u),u=""))):n instanceof w?u="":y._isUint8Array(n)?(n=y._uint8ArrayToBuffer(n),u=""):null!=n&&(r=new R("chunk",["string","Buffer","Uint8Array"],n))),r)C(l,r);else if(null===n)t.reading=!1,function(l,n){if(E("onEofChunk"),!n.ended){if(n.decoder){const l=n.decoder.end();l&&l.length&&(n.buffer.push(l),n.length+=n.objectMode?1:l.length)}n.ended=!0,n.sync?K(l):(n.needReadable=!1,n.emittedReadable=!0,G(l))}}(l,t);else if(t.objectMode||n&&n.length>0)if(e)if(t.endEmitted)C(l,new N);else{if(t.destroyed||t.errored)return!1;$(l,t,n,!0)}else if(t.ended)C(l,new U);else{if(t.destroyed||t.errored)return!1;t.reading=!1,t.decoder&&!u?(n=t.decoder.write(n),t.objectMode||0!==n.length?$(l,t,n,!1):H(l,t)):$(l,t,n,!1)}else e||(t.reading=!1,H(l,t));return!t.ended&&(t.length<t.highWaterMark||0===t.length)}function $(l,n,u,e){n.flowing&&0===n.length&&!n.sync&&l.listenerCount("data")>0?(n.multiAwaitDrain?n.awaitDrainWriters.clear():n.awaitDrainWriters=null,n.dataEmitted=!0,l.emit("data",u)):(n.length+=n.objectMode?1:u.length,e?n.buffer.unshift(u):n.buffer.push(u),n.needReadable&&K(l)),H(l,n)}function W(l,n){return l<=0||0===n.length&&n.ended?0:n.objectMode?1:i(l)?n.flowing&&n.length?n.buffer.first().length:n.length:l<=n.length?l:n.ended?n.length:0}function K(l){const n=l._readableState;E("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(E("emitReadable",n.flowing),n.emittedReadable=!0,e.nextTick(G,l))}function G(l){const n=l._readableState;E("emitReadable_",n.destroyed,n.length,n.ended),n.destroyed||n.errored||!n.length&&!n.ended||(l.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,J(l)}function H(l,n){!n.readingMore&&n.constructed&&(n.readingMore=!0,e.nextTick(Y,l,n))}function Y(l,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){const u=n.length;if(E("maybeReadMore read 0"),l.read(0),u===n.length)break}n.readingMore=!1}function V(l){const n=l._readableState;n.readableListening=l.listenerCount("readable")>0,n.resumeScheduled&&!1===n[O]?n.flowing=!0:l.listenerCount("data")>0?l.resume():n.readableListening||(n.flowing=null)}function z(l){E("readable nexttick read 0"),l.read(0)}function q(l,n){E("resume",n.reading),n.reading||l.read(0),n.resumeScheduled=!1,l.emit("resume"),J(l),n.flowing&&!n.reading&&l.read(0)}function J(l){const n=l._readableState;for(E("flow",n.flowing);n.flowing&&null!==l.read(););}function X(l,n){"function"!=typeof l.read&&(l=D.wrap(l,{objectMode:!0}));const u=async function*(l,n){let u,e=P;function t(n){this===l?(e(),e=P):e=n}l.on("readable",t);const r=_(l,{writable:!1},(l=>{u=l?I(u,l):null,e(),e=P}));try{for(;;){const n=l.destroyed?null:l.read();if(null!==n)yield n;else{if(u)throw u;if(null===u)return;await new f(t)}}}catch(l){throw u=I(u,l),u}finally{!u&&!1===(null==n?void 0:n.destroyOnReturn)||void 0!==u&&!l._readableState.autoDestroy?(l.off("readable",t),r()):A.destroyer(l,null)}}(l,n);return u.stream=l,u}function Q(l,n){if(0===n.length)return null;let u;return n.objectMode?u=n.buffer.shift():!l||l>=n.length?(u=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.first():n.buffer.concat(n.length),n.buffer.clear()):u=n.buffer.consume(l,n.decoder),u}function Z(l){const n=l._readableState;E("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,e.nextTick(ll,n,l))}function ll(l,n){if(E("endReadableNT",l.endEmitted,l.length),!l.errored&&!l.closeEmitted&&!l.endEmitted&&0===l.length)if(l.endEmitted=!0,n.emit("end"),n.writable&&!1===n.allowHalfOpen)e.nextTick(nl,n);else if(l.autoDestroy){const l=n._writableState;(!l||l.autoDestroy&&(l.finished||!1===l.writable))&&n.destroy()}}function nl(l){l.writable&&!l.writableEnded&&!l.destroyed&&l.end()}let ul;function el(){return void 0===ul&&(ul={}),ul}D.prototype.destroy=A.destroy,D.prototype._undestroy=A.undestroy,D.prototype._destroy=function(l,n){n(l)},D.prototype[g.captureRejectionSymbol]=function(l){this.destroy(l)},D.prototype.push=function(l,n){return F(this,l,n,!1)},D.prototype.unshift=function(l,n){return F(this,l,n,!0)},D.prototype.isPaused=function(){const l=this._readableState;return!0===l[O]||!1===l.flowing},D.prototype.setEncoding=function(l){const n=new L(l);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;const u=this._readableState.buffer;let e="";for(const l of u)e+=n.write(l);return u.clear(),""!==e&&u.push(e),this._readableState.length=e.length,this},D.prototype.read=function(l){E("read",l),void 0===l?l=NaN:r(l)||(l=o(l,10));const n=this._readableState,u=l;if(l>n.highWaterMark&&(n.highWaterMark=function(l){if(l>1073741824)throw new x("size","<= 1GiB",l);return l--,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,++l}(l)),0!==l&&(n.emittedReadable=!1),0===l&&n.needReadable&&((0!==n.highWaterMark?n.length>=n.highWaterMark:n.length>0)||n.ended))return E("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?Z(this):K(this),null;if(0===(l=W(l,n))&&n.ended)return 0===n.length&&Z(this),null;let e,t=n.needReadable;if(E("need readable",t),(0===n.length||n.length-l<n.highWaterMark)&&(t=!0,E("length less than watermark",t)),n.ended||n.reading||n.destroyed||n.errored||!n.constructed)t=!1,E("reading, ended or constructing",t);else if(t){E("do read"),n.reading=!0,n.sync=!0,0===n.length&&(n.needReadable=!0);try{this._read(n.highWaterMark)}catch(l){C(this,l)}n.sync=!1,n.reading||(l=W(u,n))}return e=l>0?Q(l,n):null,null===e?(n.needReadable=n.length<=n.highWaterMark,l=0):(n.length-=l,n.multiAwaitDrain?n.awaitDrainWriters.clear():n.awaitDrainWriters=null),0===n.length&&(n.ended||(n.needReadable=!0),u!==l&&n.ended&&Z(this)),null===e||n.errorEmitted||n.closeEmitted||(n.dataEmitted=!0,this.emit("data",e)),e},D.prototype._read=function(l){throw new B("_read()")},D.prototype.pipe=function(l,n){const u=this,t=this._readableState;1===t.pipes.length&&(t.multiAwaitDrain||(t.multiAwaitDrain=!0,t.awaitDrainWriters=new h(t.awaitDrainWriters?[t.awaitDrainWriters]:[]))),t.pipes.push(l),E("pipe count=%d opts=%j",t.pipes.length,n);const r=n&&!1===n.end||l===e.stdout||l===e.stderr?g:i;function i(){E("onend"),l.end()}let o;t.endEmitted?e.nextTick(r):u.once("end",r),l.on("unpipe",(function n(e,r){E("onunpipe"),e===u&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,E("cleanup"),l.removeListener("close",d),l.removeListener("finish",p),o&&l.removeListener("drain",o),l.removeListener("error",f),l.removeListener("unpipe",n),u.removeListener("end",i),u.removeListener("end",g),u.removeListener("data",c),s=!0,o&&t.awaitDrainWriters&&(!l._writableState||l._writableState.needDrain)&&o())}));let s=!1;function a(){s||(1===t.pipes.length&&t.pipes[0]===l?(E("false write response, pause",0),t.awaitDrainWriters=l,t.multiAwaitDrain=!1):t.pipes.length>1&&t.pipes.includes(l)&&(E("false write response, pause",t.awaitDrainWriters.size),t.awaitDrainWriters.add(l)),u.pause()),o||(o=function(l,n){return function(){const u=l._readableState;u.awaitDrainWriters===n?(E("pipeOnDrain",1),u.awaitDrainWriters=null):u.multiAwaitDrain&&(E("pipeOnDrain",u.awaitDrainWriters.size),u.awaitDrainWriters.delete(n)),u.awaitDrainWriters&&0!==u.awaitDrainWriters.size||!l.listenerCount("data")||l.resume()}}(u,l),l.on("drain",o))}function c(n){E("ondata");const u=l.write(n);E("dest.write",u),!1===u&&a()}function f(n){if(E("onerror",n),g(),l.removeListener("error",f),0===l.listenerCount("error")){const u=l._writableState||l._readableState;u&&!u.errorEmitted?C(l,n):l.emit("error",n)}}function d(){l.removeListener("finish",p),g()}function p(){E("onfinish"),l.removeListener("close",d),g()}function g(){E("unpipe"),u.unpipe(l)}return u.on("data",c),b(l,"error",f),l.once("close",d),l.once("finish",p),l.emit("pipe",u),!0===l.writableNeedDrain?t.flowing&&a():t.flowing||(E("pipe resume"),u.resume()),l},D.prototype.unpipe=function(l){const n=this._readableState;if(0===n.pipes.length)return this;if(!l){const l=n.pipes;n.pipes=[],this.pause();for(let n=0;n<l.length;n++)l[n].emit("unpipe",this,{hasUnpiped:!1});return this}const u=t(n.pipes,l);return-1===u||(n.pipes.splice(u,1),0===n.pipes.length&&this.pause(),l.emit("unpipe",this,{hasUnpiped:!1})),this},D.prototype.on=function(l,n){const u=y.prototype.on.call(this,l,n),t=this._readableState;return"data"===l?(t.readableListening=this.listenerCount("readable")>0,!1!==t.flowing&&this.resume()):"readable"===l&&(t.endEmitted||t.readableListening||(t.readableListening=t.needReadable=!0,t.flowing=!1,t.emittedReadable=!1,E("on readable",t.length,t.reading),t.length?K(this):t.reading||e.nextTick(z,this))),u},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(l,n){const u=y.prototype.removeListener.call(this,l,n);return"readable"===l&&e.nextTick(V,this),u},D.prototype.off=D.prototype.removeListener,D.prototype.removeAllListeners=function(l){const n=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==l&&void 0!==l||e.nextTick(V,this),n},D.prototype.resume=function(){const l=this._readableState;return l.flowing||(E("resume"),l.flowing=!l.readableListening,function(l,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(q,l,n))}(this,l)),l[O]=!1,this},D.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[O]=!0,this},D.prototype.wrap=function(l){let n=!1;l.on("data",(u=>{!this.push(u)&&l.pause&&(n=!0,l.pause())})),l.on("end",(()=>{this.push(null)})),l.on("error",(l=>{C(this,l)})),l.on("close",(()=>{this.destroy()})),l.on("destroy",(()=>{this.destroy()})),this._read=()=>{n&&l.resume&&(n=!1,l.resume())};const u=a(l);for(let n=1;n<u.length;n++){const e=u[n];void 0===this[e]&&"function"==typeof l[e]&&(this[e]=l[e].bind(l))}return this},D.prototype[d]=function(){return X(this)},D.prototype.iterator=function(l){return void 0!==l&&k(l,"options"),X(this,l)},s(D.prototype,{readable:{__proto__:null,get(){const l=this._readableState;return!(!l||!1===l.readable||l.destroyed||l.errorEmitted||l.endEmitted)},set(l){this._readableState&&(this._readableState.readable=!!l)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(l){this._readableState&&(this._readableState.flowing=l)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(l){this._readableState&&(this._readableState.destroyed=l)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),s(j.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[O]},set(l){this[O]=!!l}}}),D._fromList=Q,D.from=function(l,n){return M(D,l,n)},D.fromWeb=function(l,n){return el().newStreamReadableFromReadableStream(l,n)},D.toWeb=function(l,n){return el().newReadableStreamFromStreamReadable(l,n)},D.wrap=function(l,n){var u,e;return new D({objectMode:null===(u=null!==(e=l.readableObjectMode)&&void 0!==e?e:l.objectMode)||void 0===u||u,...n,destroy(n,u){A.destroyer(l,n),u(n)}}).wrap(l)}},2457:(l,n,u)=>{const{MathFloor:e,NumberIsInteger:t}=u(9061),{ERR_INVALID_ARG_VALUE:r}=u(4381).codes;function i(l){return l?16:16384}l.exports={getHighWaterMark:function(l,n,u,o){const s=function(l,n,u){return null!=l.highWaterMark?l.highWaterMark:n?l[u]:null}(n,o,u);if(null!=s){if(!t(s)||s<0)throw new r(o?`options.${u}`:"options.highWaterMark",s);return e(s)}return i(l.objectMode)},getDefaultHighWaterMark:i}},1161:(l,n,u)=>{const{ObjectSetPrototypeOf:e,Symbol:t}=u(9061);l.exports=a;const{ERR_METHOD_NOT_IMPLEMENTED:r}=u(4381).codes,i=u(8672),{getHighWaterMark:o}=u(2457);e(a.prototype,i.prototype),e(a,i);const s=t("kCallback");function a(l){if(!(this instanceof a))return new a(l);const n=l?o(this,l,"readableHighWaterMark",!0):null;0===n&&(l={...l,highWaterMark:null,readableHighWaterMark:n,writableHighWaterMark:l.writableHighWaterMark||0}),i.call(this,l),this._readableState.sync=!1,this[s]=null,l&&("function"==typeof l.transform&&(this._transform=l.transform),"function"==typeof l.flush&&(this._flush=l.flush)),this.on("prefinish",f)}function c(l){"function"!=typeof this._flush||this.destroyed?(this.push(null),l&&l()):this._flush(((n,u)=>{n?l?l(n):this.destroy(n):(null!=u&&this.push(u),this.push(null),l&&l())}))}function f(){this._final!==c&&c.call(this)}a.prototype._final=c,a.prototype._transform=function(l,n,u){throw new r("_transform()")},a.prototype._write=function(l,n,u){const e=this._readableState,t=this._writableState,r=e.length;this._transform(l,n,((l,n)=>{l?u(l):(null!=n&&this.push(n),t.ended||r===e.length||e.length<e.highWaterMark?u():this[s]=u)}))},a.prototype._read=function(){if(this[s]){const l=this[s];this[s]=null,l()}}},5874:(l,n,u)=>{const{Symbol:e,SymbolAsyncIterator:t,SymbolIterator:r,SymbolFor:i}=u(9061),o=e("kDestroyed"),s=e("kIsErrored"),a=e("kIsReadable"),c=e("kIsDisturbed"),f=i("nodejs.webstream.isClosedPromise"),h=i("nodejs.webstream.controllerErrorFunction");function d(l,n=!1){var u;return!(!l||"function"!=typeof l.pipe||"function"!=typeof l.on||n&&("function"!=typeof l.pause||"function"!=typeof l.resume)||l._writableState&&!1===(null===(u=l._readableState)||void 0===u?void 0:u.readable)||l._writableState&&!l._readableState)}function p(l){var n;return!(!l||"function"!=typeof l.write||"function"!=typeof l.on||l._readableState&&!1===(null===(n=l._writableState)||void 0===n?void 0:n.writable))}function g(l){return l&&(l._readableState||l._writableState||"function"==typeof l.write&&"function"==typeof l.on||"function"==typeof l.pipe&&"function"==typeof l.on)}function y(l){return!(!l||g(l)||"function"!=typeof l.pipeThrough||"function"!=typeof l.getReader||"function"!=typeof l.cancel)}function b(l){return!(!l||g(l)||"function"!=typeof l.getWriter||"function"!=typeof l.abort)}function w(l){return!(!l||g(l)||"object"!=typeof l.readable||"object"!=typeof l.writable)}function m(l){if(!g(l))return null;const n=l._writableState,u=l._readableState,e=n||u;return!!(l.destroyed||l[o]||null!=e&&e.destroyed)}function _(l){if(!p(l))return null;if(!0===l.writableEnded)return!0;const n=l._writableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.ended)?null:n.ended)}function E(l,n){if(!d(l))return null;const u=l._readableState;return(null==u||!u.errored)&&("boolean"!=typeof(null==u?void 0:u.endEmitted)?null:!!(u.endEmitted||!1===n&&!0===u.ended&&0===u.length))}function S(l){return l&&null!=l[a]?l[a]:"boolean"!=typeof(null==l?void 0:l.readable)?null:!m(l)&&d(l)&&l.readable&&!E(l)}function A(l){return"boolean"!=typeof(null==l?void 0:l.writable)?null:!m(l)&&p(l)&&l.writable&&!_(l)}function v(l){return"boolean"==typeof l._closed&&"boolean"==typeof l._defaultKeepAlive&&"boolean"==typeof l._removedConnection&&"boolean"==typeof l._removedContLen}function T(l){return"boolean"==typeof l._sent100&&v(l)}l.exports={kDestroyed:o,isDisturbed:function(l){var n;return!(!l||!(null!==(n=l[c])&&void 0!==n?n:l.readableDidRead||l.readableAborted))},kIsDisturbed:c,isErrored:function(l){var n,u,e,t,r,i,o,a,c,f;return!(!l||!(null!==(n=null!==(u=null!==(e=null!==(t=null!==(r=null!==(i=l[s])&&void 0!==i?i:l.readableErrored)&&void 0!==r?r:l.writableErrored)&&void 0!==t?t:null===(o=l._readableState)||void 0===o?void 0:o.errorEmitted)&&void 0!==e?e:null===(a=l._writableState)||void 0===a?void 0:a.errorEmitted)&&void 0!==u?u:null===(c=l._readableState)||void 0===c?void 0:c.errored)&&void 0!==n?n:null===(f=l._writableState)||void 0===f?void 0:f.errored))},kIsErrored:s,isReadable:S,kIsReadable:a,kIsClosedPromise:f,kControllerErrorFunction:h,isClosed:function(l){if(!g(l))return null;if("boolean"==typeof l.closed)return l.closed;const n=l._writableState,u=l._readableState;return"boolean"==typeof(null==n?void 0:n.closed)||"boolean"==typeof(null==u?void 0:u.closed)?(null==n?void 0:n.closed)||(null==u?void 0:u.closed):"boolean"==typeof l._closed&&v(l)?l._closed:null},isDestroyed:m,isDuplexNodeStream:function(l){return!(!l||"function"!=typeof l.pipe||!l._readableState||"function"!=typeof l.on||"function"!=typeof l.write)},isFinished:function(l,n){return g(l)?!(!m(l)&&(!1!==(null==n?void 0:n.readable)&&S(l)||!1!==(null==n?void 0:n.writable)&&A(l))):null},isIterable:function(l,n){return null!=l&&(!0===n?"function"==typeof l[t]:!1===n?"function"==typeof l[r]:"function"==typeof l[t]||"function"==typeof l[r])},isReadableNodeStream:d,isReadableStream:y,isReadableEnded:function(l){if(!d(l))return null;if(!0===l.readableEnded)return!0;const n=l._readableState;return!(!n||n.errored)&&("boolean"!=typeof(null==n?void 0:n.ended)?null:n.ended)},isReadableFinished:E,isReadableErrored:function(l){var n,u;return g(l)?l.readableErrored?l.readableErrored:null!==(n=null===(u=l._readableState)||void 0===u?void 0:u.errored)&&void 0!==n?n:null:null},isNodeStream:g,isWebStream:function(l){return y(l)||b(l)||w(l)},isWritable:A,isWritableNodeStream:p,isWritableStream:b,isWritableEnded:_,isWritableFinished:function(l,n){if(!p(l))return null;if(!0===l.writableFinished)return!0;const u=l._writableState;return(null==u||!u.errored)&&("boolean"!=typeof(null==u?void 0:u.finished)?null:!!(u.finished||!1===n&&!0===u.ended&&0===u.length))},isWritableErrored:function(l){var n,u;return g(l)?l.writableErrored?l.writableErrored:null!==(n=null===(u=l._writableState)||void 0===u?void 0:u.errored)&&void 0!==n?n:null:null},isServerRequest:function(l){var n;return"boolean"==typeof l._consuming&&"boolean"==typeof l._dumped&&void 0===(null===(n=l.req)||void 0===n?void 0:n.upgradeOrConnect)},isServerResponse:T,willEmitClose:function(l){if(!g(l))return null;const n=l._writableState,u=l._readableState,e=n||u;return!e&&T(l)||!!(e&&e.autoDestroy&&e.emitClose&&!1===e.closed)},isTransformStream:w}},6304:(l,n,u)=>{const e=u(4155),{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:i,ObjectDefineProperty:o,ObjectDefineProperties:s,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:h}=u(9061);l.exports=L,L.WritableState=k;const{EventEmitter:d}=u(7187),p=u(4870).Stream,{Buffer:g}=u(8764),y=u(1195),{addAbortSignal:b}=u(196),{getHighWaterMark:w,getDefaultHighWaterMark:m}=u(2457),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:v,ERR_STREAM_ALREADY_FINISHED:T,ERR_STREAM_NULL_VALUES:I,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:B}=u(4381).codes,{errorOrDestroy:x}=y;function U(){}a(L.prototype,p.prototype),a(L,p);const N=f("kOnFinished");function k(l,n,e){"boolean"!=typeof e&&(e=n instanceof u(8672)),this.objectMode=!(!l||!l.objectMode),e&&(this.objectMode=this.objectMode||!(!l||!l.writableObjectMode)),this.highWaterMark=l?w(this,l,"writableHighWaterMark",e):m(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const t=!(!l||!1!==l.decodeStrings);this.decodeStrings=!t,this.defaultEncoding=l&&l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=j.bind(void 0,n),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=!l||!1!==l.emitClose,this.autoDestroy=!l||!1!==l.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function O(l){l.buffered=[],l.bufferedIndex=0,l.allBuffers=!0,l.allNoop=!0}function L(l){const n=this instanceof u(8672);if(!n&&!i(L,this))return new L(l);this._writableState=new k(l,this,n),l&&("function"==typeof l.write&&(this._write=l.write),"function"==typeof l.writev&&(this._writev=l.writev),"function"==typeof l.destroy&&(this._destroy=l.destroy),"function"==typeof l.final&&(this._final=l.final),"function"==typeof l.construct&&(this._construct=l.construct),l.signal&&b(l.signal,this)),p.call(this,l),y.construct(this,(()=>{const l=this._writableState;l.writing||W(this,l),G(this,l)}))}function M(l,n,u,t){const r=l._writableState;if("function"==typeof u)t=u,u=r.defaultEncoding;else{if(u){if("buffer"!==u&&!g.isEncoding(u))throw new B(u)}else u=r.defaultEncoding;"function"!=typeof t&&(t=U)}if(null===n)throw new I;if(!r.objectMode)if("string"==typeof n)!1!==r.decodeStrings&&(n=g.from(n,u),u="buffer");else if(n instanceof g)u="buffer";else{if(!p._isUint8Array(n))throw new _("chunk",["string","Buffer","Uint8Array"],n);n=p._uint8ArrayToBuffer(n),u="buffer"}let i;return r.ending?i=new R:r.destroyed&&(i=new v("write")),i?(e.nextTick(t,i),x(l,i,!0),i):(r.pendingcb++,function(l,n,u,e,t){const r=n.objectMode?1:u.length;n.length+=r;const i=n.length<n.highWaterMark;return i||(n.needDrain=!0),n.writing||n.corked||n.errored||!n.constructed?(n.buffered.push({chunk:u,encoding:e,callback:t}),n.allBuffers&&"buffer"!==e&&(n.allBuffers=!1),n.allNoop&&t!==U&&(n.allNoop=!1)):(n.writelen=r,n.writecb=t,n.writing=!0,n.sync=!0,l._write(u,e,n.onwrite),n.sync=!1),i&&!n.errored&&!n.destroyed}(l,r,n,u,t))}function P(l,n,u,e,t,r,i){n.writelen=e,n.writecb=i,n.writing=!0,n.sync=!0,n.destroyed?n.onwrite(new v("write")):u?l._writev(t,n.onwrite):l._write(t,r,n.onwrite),n.sync=!1}function C(l,n,u,e){--n.pendingcb,e(u),$(n),x(l,u)}function j(l,n){const u=l._writableState,t=u.sync,r=u.writecb;"function"==typeof r?(u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0,n?(n.stack,u.errored||(u.errored=n),l._readableState&&!l._readableState.errored&&(l._readableState.errored=n),t?e.nextTick(C,l,u,n,r):C(l,u,n,r)):(u.buffered.length>u.bufferedIndex&&W(l,u),t?null!==u.afterWriteTickInfo&&u.afterWriteTickInfo.cb===r?u.afterWriteTickInfo.count++:(u.afterWriteTickInfo={count:1,cb:r,stream:l,state:u},e.nextTick(D,u.afterWriteTickInfo)):F(l,u,1,r))):x(l,new S)}function D({stream:l,state:n,count:u,cb:e}){return n.afterWriteTickInfo=null,F(l,n,u,e)}function F(l,n,u,e){for(!n.ending&&!l.destroyed&&0===n.length&&n.needDrain&&(n.needDrain=!1,l.emit("drain"));u-- >0;)n.pendingcb--,e();n.destroyed&&$(n),G(l,n)}function $(l){if(l.writing)return;for(let u=l.bufferedIndex;u<l.buffered.length;++u){var n;const{chunk:e,callback:t}=l.buffered[u],r=l.objectMode?1:e.length;l.length-=r,t(null!==(n=l.errored)&&void 0!==n?n:new v("write"))}const u=l[N].splice(0);for(let n=0;n<u.length;n++){var e;u[n](null!==(e=l.errored)&&void 0!==e?e:new v("end"))}O(l)}function W(l,n){if(n.corked||n.bufferProcessing||n.destroyed||!n.constructed)return;const{buffered:u,bufferedIndex:e,objectMode:r}=n,i=u.length-e;if(!i)return;let o=e;if(n.bufferProcessing=!0,i>1&&l._writev){n.pendingcb-=i-1;const e=n.allNoop?U:l=>{for(let n=o;n<u.length;++n)u[n].callback(l)},r=n.allNoop&&0===o?u:t(u,o);r.allBuffers=n.allBuffers,P(l,n,!0,n.length,r,"",e),O(n)}else{do{const{chunk:e,encoding:t,callback:i}=u[o];u[o++]=null,P(l,n,!1,r?1:e.length,e,t,i)}while(o<u.length&&!n.writing);o===u.length?O(n):o>256?(u.splice(0,o),n.bufferedIndex=0):n.bufferedIndex=o}n.bufferProcessing=!1}function K(l){return l.ending&&!l.destroyed&&l.constructed&&0===l.length&&!l.errored&&0===l.buffered.length&&!l.finished&&!l.writing&&!l.errorEmitted&&!l.closeEmitted}function G(l,n,u){K(n)&&(function(l,n){n.prefinished||n.finalCalled||("function"!=typeof l._final||n.destroyed?(n.prefinished=!0,l.emit("prefinish")):(n.finalCalled=!0,function(l,n){let u=!1;function t(t){if(u)x(l,null!=t?t:S());else if(u=!0,n.pendingcb--,t){const u=n[N].splice(0);for(let l=0;l<u.length;l++)u[l](t);x(l,t,n.sync)}else K(n)&&(n.prefinished=!0,l.emit("prefinish"),n.pendingcb++,e.nextTick(H,l,n))}n.sync=!0,n.pendingcb++;try{l._final(t)}catch(l){t(l)}n.sync=!1}(l,n)))}(l,n),0===n.pendingcb&&(u?(n.pendingcb++,e.nextTick(((l,n)=>{K(n)?H(l,n):n.pendingcb--}),l,n)):K(n)&&(n.pendingcb++,H(l,n))))}function H(l,n){n.pendingcb--,n.finished=!0;const u=n[N].splice(0);for(let l=0;l<u.length;l++)u[l]();if(l.emit("finish"),n.autoDestroy){const n=l._readableState;(!n||n.autoDestroy&&(n.endEmitted||!1===n.readable))&&l.destroy()}}k.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},o(k.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),o(L,h,{__proto__:null,value:function(l){return!!i(this,l)||this===L&&l&&l._writableState instanceof k}}),L.prototype.pipe=function(){x(this,new A)},L.prototype.write=function(l,n,u){return!0===M(this,l,n,u)},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){const l=this._writableState;l.corked&&(l.corked--,l.writing||W(this,l))},L.prototype.setDefaultEncoding=function(l){if("string"==typeof l&&(l=c(l)),!g.isEncoding(l))throw new B(l);return this._writableState.defaultEncoding=l,this},L.prototype._write=function(l,n,u){if(!this._writev)throw new E("_write()");this._writev([{chunk:l,encoding:n}],u)},L.prototype._writev=null,L.prototype.end=function(l,n,u){const t=this._writableState;let i;if("function"==typeof l?(u=l,l=null,n=null):"function"==typeof n&&(u=n,n=null),null!=l){const u=M(this,l,n);u instanceof r&&(i=u)}return t.corked&&(t.corked=1,this.uncork()),i||(t.errored||t.ending?t.finished?i=new T("end"):t.destroyed&&(i=new v("end")):(t.ending=!0,G(this,t,!0),t.ended=!0)),"function"==typeof u&&(i||t.finished?e.nextTick(u,i):t[N].push(u)),this},s(L.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(l){this._writableState&&(this._writableState.destroyed=l)}},writable:{__proto__:null,get(){const l=this._writableState;return!(!l||!1===l.writable||l.destroyed||l.errored||l.ending||l.ended)},set(l){this._writableState&&(this._writableState.writable=!!l)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const l=this._writableState;return!!l&&!l.destroyed&&!l.ending&&l.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const Y=y.destroy;let V;function z(){return void 0===V&&(V={}),V}L.prototype.destroy=function(l,n){const u=this._writableState;return!u.destroyed&&(u.bufferedIndex<u.buffered.length||u[N].length)&&e.nextTick($,u),Y.call(this,l,n),this},L.prototype._undestroy=y.undestroy,L.prototype._destroy=function(l,n){n(l)},L.prototype[d.captureRejectionSymbol]=function(l){this.destroy(l)},L.fromWeb=function(l,n){return z().newStreamWritableFromWritableStream(l,n)},L.toWeb=function(l){return z().newWritableStreamFromStreamWritable(l)}},6547:(l,n,u)=>{const{ArrayIsArray:e,ArrayPrototypeIncludes:t,ArrayPrototypeJoin:r,ArrayPrototypeMap:i,NumberIsInteger:o,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:a,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:p,StringPrototypeToUpperCase:g,StringPrototypeTrim:y}=u(9061),{hideStackFrames:b,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:m,ERR_INVALID_ARG_VALUE:_,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:S}}=u(4381),{normalizeEncoding:A}=u(6087),{isAsyncFunction:v,isArrayBufferView:T}=u(6087).types,I={},R=/^[0-7]+$/,B=b(((l,n,u=c,e=a)=>{if("number"!=typeof l)throw new m(n,"number",l);if(!o(l))throw new E(n,"an integer",l);if(l<u||l>e)throw new E(n,`>= ${u} && <= ${e}`,l)})),x=b(((l,n,u=-2147483648,e=2147483647)=>{if("number"!=typeof l)throw new m(n,"number",l);if(!o(l))throw new E(n,"an integer",l);if(l<u||l>e)throw new E(n,`>= ${u} && <= ${e}`,l)})),U=b(((l,n,u=!1)=>{if("number"!=typeof l)throw new m(n,"number",l);if(!o(l))throw new E(n,"an integer",l);const e=u?1:0,t=4294967295;if(l<e||l>t)throw new E(n,`>= ${e} && <= ${t}`,l)}));function N(l,n){if("string"!=typeof l)throw new m(n,"string",l)}const k=b(((l,n,u)=>{if(!t(u,l)){const e=r(i(u,(l=>"string"==typeof l?`'${l}'`:p(l))),", ");throw new _(n,l,"must be one of: "+e)}}));function O(l,n){if("boolean"!=typeof l)throw new m(n,"boolean",l)}function L(l,n,u){return null!=l&&h(l,n)?l[n]:u}const M=b(((l,n,u=null)=>{const t=L(u,"allowArray",!1),r=L(u,"allowFunction",!1);if(!L(u,"nullable",!1)&&null===l||!t&&e(l)||"object"!=typeof l&&(!r||"function"!=typeof l))throw new m(n,"Object",l)})),P=b(((l,n)=>{if(null!=l&&"object"!=typeof l&&"function"!=typeof l)throw new m(n,"a dictionary",l)})),C=b(((l,n,u=0)=>{if(!e(l))throw new m(n,"Array",l);if(l.length<u)throw new _(n,l,`must be longer than ${u}`)})),j=b(((l,n="buffer")=>{if(!T(l))throw new m(n,["Buffer","TypedArray","DataView"],l)})),D=b(((l,n)=>{if(void 0!==l&&(null===l||"object"!=typeof l||!("aborted"in l)))throw new m(n,"AbortSignal",l)})),F=b(((l,n)=>{if("function"!=typeof l)throw new m(n,"Function",l)})),$=b(((l,n)=>{if("function"!=typeof l||v(l))throw new m(n,"Function",l)})),W=b(((l,n)=>{if(void 0!==l)throw new m(n,"undefined",l)})),K=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function G(l,n){if(void 0===l||!d(K,l))throw new _(n,l,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}l.exports={isInt32:function(l){return l===(0|l)},isUint32:function(l){return l===l>>>0},parseFileMode:function(l,n,u){if(void 0===l&&(l=u),"string"==typeof l){if(null===d(R,l))throw new _(n,l,"must be a 32-bit unsigned integer or an octal string");l=f(l,8)}return U(l,n),l},validateArray:C,validateStringArray:function(l,n){C(l,n);for(let u=0;u<l.length;u++)N(l[u],`${n}[${u}]`)},validateBooleanArray:function(l,n){C(l,n);for(let u=0;u<l.length;u++)O(l[u],`${n}[${u}]`)},validateBoolean:O,validateBuffer:j,validateDictionary:P,validateEncoding:function(l,n){const u=A(n),e=l.length;if("hex"===u&&e%2!=0)throw new _("encoding",n,`is invalid for data of length ${e}`)},validateFunction:F,validateInt32:x,validateInteger:B,validateNumber:function(l,n,u=void 0,e){if("number"!=typeof l)throw new m(n,"number",l);if(null!=u&&l<u||null!=e&&l>e||(null!=u||null!=e)&&s(l))throw new E(n,`${null!=u?`>= ${u}`:""}${null!=u&&null!=e?" && ":""}${null!=e?`<= ${e}`:""}`,l)},validateObject:M,validateOneOf:k,validatePlainFunction:$,validatePort:function(l,n="Port",u=!0){if("number"!=typeof l&&"string"!=typeof l||"string"==typeof l&&0===y(l).length||+l!=+l>>>0||l>65535||0===l&&!u)throw new w(n,l,u);return 0|l},validateSignalName:function(l,n="signal"){if(N(l,n),void 0===I[l]){if(void 0!==I[g(l)])throw new S(l+" (signals must use all capital letters)");throw new S(l)}},validateString:N,validateUint32:U,validateUndefined:W,validateUnion:function(l,n,u){if(!t(u,l))throw new m(n,`('${r(u,"|")}')`,l)},validateAbortSignal:D,validateLinkHeaderValue:function(l){if("string"==typeof l)return G(l,"hints"),l;if(e(l)){const n=l.length;let u="";if(0===n)return u;for(let e=0;e<n;e++){const t=l[e];G(t,"hints"),u+=t,e!==n-1&&(u+=", ")}return u}throw new _("hints",l,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},4381:(l,n,u)=>{const{format:e,inspect:t,AggregateError:r}=u(6087),i=globalThis.AggregateError||r,o=Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],a=/^([A-Z][a-z0-9]*)+$/,c={};function f(l,n){if(!l)throw new c.ERR_INTERNAL_ASSERTION(n)}function h(l){let n="",u=l.length;const e="-"===l[0]?1:0;for(;u>=e+4;u-=3)n=`_${l.slice(u-3,u)}${n}`;return`${l.slice(0,u)}${n}`}function d(l,n,u){u||(u=Error);class t extends u{constructor(...u){super(function(l,n,u){if("function"==typeof n)return f(n.length<=u.length,`Code: ${l}; The provided arguments length (${u.length}) does not match the required ones (${n.length}).`),n(...u);const t=(n.match(/%[dfijoOs]/g)||[]).length;return f(t===u.length,`Code: ${l}; The provided arguments length (${u.length}) does not match the required ones (${t}).`),0===u.length?n:e(n,...u)}(l,n,u))}toString(){return`${this.name} [${l}]: ${this.message}`}}Object.defineProperties(t.prototype,{name:{value:u.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${l}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),t.prototype.code=l,t.prototype[o]=!0,c[l]=t}function p(l){const n="__node_internal_"+l.name;return Object.defineProperty(l,"name",{value:n}),l}class g extends Error{constructor(l="The operation was aborted",n=void 0){if(void 0!==n&&"object"!=typeof n)throw new c.ERR_INVALID_ARG_TYPE("options","Object",n);super(l,n),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((l,n,u)=>{f("string"==typeof l,"'name' must be a string"),Array.isArray(n)||(n=[n]);let e="The ";l.endsWith(" argument")?e+=`${l} `:e+=`"${l}" ${l.includes(".")?"property":"argument"} `,e+="must be ";const r=[],i=[],o=[];for(const l of n)f("string"==typeof l,"All expected entries have to be of type string"),s.includes(l)?r.push(l.toLowerCase()):a.test(l)?i.push(l):(f("object"!==l,'The value "object" should be written as "Object"'),o.push(l));if(i.length>0){const l=r.indexOf("object");-1!==l&&(r.splice(r,l,1),i.push("Object"))}if(r.length>0){switch(r.length){case 1:e+=`of type ${r[0]}`;break;case 2:e+=`one of type ${r[0]} or ${r[1]}`;break;default:{const l=r.pop();e+=`one of type ${r.join(", ")}, or ${l}`}}(i.length>0||o.length>0)&&(e+=" or ")}if(i.length>0){switch(i.length){case 1:e+=`an instance of ${i[0]}`;break;case 2:e+=`an instance of ${i[0]} or ${i[1]}`;break;default:{const l=i.pop();e+=`an instance of ${i.join(", ")}, or ${l}`}}o.length>0&&(e+=" or ")}switch(o.length){case 0:break;case 1:o[0].toLowerCase()!==o[0]&&(e+="an "),e+=`${o[0]}`;break;case 2:e+=`one of ${o[0]} or ${o[1]}`;break;default:{const l=o.pop();e+=`one of ${o.join(", ")}, or ${l}`}}if(null==u)e+=`. Received ${u}`;else if("function"==typeof u&&u.name)e+=`. Received function ${u.name}`;else if("object"==typeof u){var c;null!==(c=u.constructor)&&void 0!==c&&c.name?e+=`. Received an instance of ${u.constructor.name}`:e+=`. Received ${t(u,{depth:-1})}`}else{let l=t(u,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),e+=`. Received type ${typeof u} (${l})`}return e}),TypeError),d("ERR_INVALID_ARG_VALUE",((l,n,u="is invalid")=>{let e=t(n);return e.length>128&&(e=e.slice(0,128)+"..."),`The ${l.includes(".")?"property":"argument"} '${l}' ${u}. Received ${e}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((l,n,u)=>{var e;return`Expected ${l} to be returned from the "${n}" function but got ${null!=u&&null!==(e=u.constructor)&&void 0!==e&&e.name?`instance of ${u.constructor.name}`:"type "+typeof u}.`}),TypeError),d("ERR_MISSING_ARGS",((...l)=>{let n;f(l.length>0,"At least one arg needs to be specified");const u=l.length;switch(l=(Array.isArray(l)?l:[l]).map((l=>`"${l}"`)).join(" or "),u){case 1:n+=`The ${l[0]} argument`;break;case 2:n+=`The ${l[0]} and ${l[1]} arguments`;break;default:{const u=l.pop();n+=`The ${l.join(", ")}, and ${u} arguments`}}return`${n} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((l,n,u)=>{let e;return f(n,'Missing "range" argument'),Number.isInteger(u)&&Math.abs(u)>2**32?e=h(String(u)):"bigint"==typeof u?(e=String(u),(u>2n**32n||u<-(2n**32n))&&(e=h(e)),e+="n"):e=t(u),`The value of "${l}" is out of range. It must be ${n}. Received ${e}`}),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),l.exports={AbortError:g,aggregateTwoErrors:p((function(l,n){if(l&&n&&l!==n){if(Array.isArray(n.errors))return n.errors.push(l),n;const u=new i([n,l],n.message);return u.code=n.code,u}return l||n})),hideStackFrames:p,codes:c}},9061:l=>{l.exports={ArrayIsArray:l=>Array.isArray(l),ArrayPrototypeIncludes:(l,n)=>l.includes(n),ArrayPrototypeIndexOf:(l,n)=>l.indexOf(n),ArrayPrototypeJoin:(l,n)=>l.join(n),ArrayPrototypeMap:(l,n)=>l.map(n),ArrayPrototypePop:(l,n)=>l.pop(n),ArrayPrototypePush:(l,n)=>l.push(n),ArrayPrototypeSlice:(l,n,u)=>l.slice(n,u),Error:Error,FunctionPrototypeCall:(l,n,...u)=>l.call(n,...u),FunctionPrototypeSymbolHasInstance:(l,n)=>Function.prototype[Symbol.hasInstance].call(l,n),MathFloor:Math.floor,Number: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:(l,n)=>Object.defineProperties(l,n),ObjectDefineProperty:(l,n,u)=>Object.defineProperty(l,n,u),ObjectGetOwnPropertyDescriptor:(l,n)=>Object.getOwnPropertyDescriptor(l,n),ObjectKeys:l=>Object.keys(l),ObjectSetPrototypeOf:(l,n)=>Object.setPrototypeOf(l,n),Promise:Promise,PromisePrototypeCatch:(l,n)=>l.catch(n),PromisePrototypeThen:(l,n,u)=>l.then(n,u),PromiseReject:l=>Promise.reject(l),ReflectApply:Reflect.apply,RegExpPrototypeTest:(l,n)=>l.test(n),SafeSet:Set,String:String,StringPrototypeSlice:(l,n,u)=>l.slice(n,u),StringPrototypeToLowerCase:l=>l.toLowerCase(),StringPrototypeToUpperCase:l=>l.toUpperCase(),StringPrototypeTrim:l=>l.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(l,n,u)=>l.set(n,u),Uint8Array:Uint8Array}},6087:(l,n,u)=>{const e=u(8764),t=Object.getPrototypeOf((async function(){})).constructor,r=globalThis.Blob||e.Blob,i=void 0!==r?function(l){return l instanceof r}:function(l){return!1};class o extends Error{constructor(l){if(!Array.isArray(l))throw new TypeError("Expected input to be an Array, got "+typeof l);let n="";for(let u=0;u<l.length;u++)n+=` ${l[u].stack}\n`;super(n),this.name="AggregateError",this.errors=l}}l.exports={AggregateError:o,kEmptyObject:Object.freeze({}),once(l){let n=!1;return function(...u){n||(n=!0,l.apply(this,u))}},createDeferredPromise:function(){let l,n;return{promise:new Promise(((u,e)=>{l=u,n=e})),resolve:l,reject:n}},promisify:l=>new Promise(((n,u)=>{l(((l,...e)=>l?u(l):n(...e)))})),debuglog:()=>function(){},format:(l,...n)=>l.replace(/%([sdifj])/g,(function(...[l,u]){const e=n.shift();return"f"===u?e.toFixed(6):"j"===u?JSON.stringify(e):"s"===u&&"object"==typeof e?`${e.constructor!==Object?e.constructor.name:""} {}`.trim():e.toString()})),inspect(l){switch(typeof l){case"string":if(l.includes("'")){if(!l.includes('"'))return`"${l}"`;if(!l.includes("`")&&!l.includes("${"))return`\`${l}\``}return`'${l}'`;case"number":return isNaN(l)?"NaN":Object.is(l,-0)?String(l):l;case"bigint":return`${String(l)}n`;case"boolean":case"undefined":return String(l);case"object":return"{}"}},types:{isAsyncFunction:l=>l instanceof t,isArrayBufferView:l=>ArrayBuffer.isView(l)},isBlob:i},l.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5099:(l,n,u)=>{const{Buffer:e}=u(8764),{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:i}=u(9061),{promisify:{custom:o}}=u(6087),{streamReturningOperators:s,promiseReturningOperators:a}=u(4382),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=u(4381),f=u(299),{pipeline:h}=u(9946),{destroyer:d}=u(1195),p=u(8610),g=u(7854),y=u(5874),b=l.exports=u(4870).Stream;b.isDisturbed=y.isDisturbed,b.isErrored=y.isErrored,b.isReadable=y.isReadable,b.Readable=u(911);for(const _ of r(s)){const E=s[_];function w(...l){if(new.target)throw c();return b.Readable.from(i(E,this,l))}t(w,"name",{__proto__:null,value:E.name}),t(w,"length",{__proto__:null,value:E.length}),t(b.Readable.prototype,_,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const S of r(a)){const A=a[S];function w(...l){if(new.target)throw c();return i(A,this,l)}t(w,"name",{__proto__:null,value:A.name}),t(w,"length",{__proto__:null,value:A.length}),t(b.Readable.prototype,S,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}b.Writable=u(6304),b.Duplex=u(8672),b.Transform=u(1161),b.PassThrough=u(917),b.pipeline=h;const{addAbortSignal:m}=u(196);b.addAbortSignal=m,b.finished=p,b.destroy=d,b.compose=f,t(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),t(h,o,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),t(p,o,{__proto__:null,enumerable:!0,get:()=>g.finished}),b.Stream=b,b._isUint8Array=function(l){return l instanceof Uint8Array},b._uint8ArrayToBuffer=function(l){return e.from(l.buffer,l.byteOffset,l.byteLength)}},7854:(l,n,u)=>{const{ArrayPrototypePop:e,Promise:t}=u(9061),{isIterable:r,isNodeStream:i,isWebStream:o}=u(5874),{pipelineImpl:s}=u(9946),{finished:a}=u(8610);u(2830),l.exports={finished:a,pipeline:function(...l){return new t(((n,u)=>{let t,a;const c=l[l.length-1];if(c&&"object"==typeof c&&!i(c)&&!r(c)&&!o(c)){const n=e(l);t=n.signal,a=n.end}s(l,((l,e)=>{l?u(l):n(e)}),{signal:t,end:a})}))}}},9509:(l,n,u)=>{var e=u(8764),t=e.Buffer;function r(l,n){for(var u in l)n[u]=l[u]}function i(l,n,u){return t(l,n,u)}t.from&&t.alloc&&t.allocUnsafe&&t.allocUnsafeSlow?l.exports=e:(r(e,n),n.Buffer=i),i.prototype=Object.create(t.prototype),r(t,i),i.from=function(l,n,u){if("number"==typeof l)throw new TypeError("Argument must not be a number");return t(l,n,u)},i.alloc=function(l,n,u){if("number"!=typeof l)throw new TypeError("Argument must be a number");var e=t(l);return void 0!==n?"string"==typeof u?e.fill(n,u):e.fill(n):e.fill(0),e},i.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return t(l)},i.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return e.SlowBuffer(l)}},2830:(l,n,u)=>{l.exports=t;var e=u(7187).EventEmitter;function t(){e.call(this)}u(5717)(t,e),t.Readable=u(9481),t.Writable=u(4229),t.Duplex=u(6753),t.Transform=u(4605),t.PassThrough=u(2725),t.finished=u(8610),t.pipeline=u(9946),t.Stream=t,t.prototype.pipe=function(l,n){var u=this;function t(n){l.writable&&!1===l.write(n)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}u.on("data",t),l.on("drain",r),l._isStdio||n&&!1===n.end||(u.on("end",o),u.on("close",s));var i=!1;function o(){i||(i=!0,l.end())}function s(){i||(i=!0,"function"==typeof l.destroy&&l.destroy())}function a(l){if(c(),0===e.listenerCount(this,"error"))throw l}function c(){u.removeListener("data",t),l.removeListener("drain",r),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),l.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),l.removeListener("close",c)}return u.on("error",a),l.on("error",a),u.on("end",c),u.on("close",c),l.on("close",c),l.emit("pipe",u),l}},2553:(l,n,u)=>{var e=u(9509).Buffer,t=e.isEncoding||function(l){switch((l=""+l)&&l.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 r(l){var n;switch(this.encoding=function(l){var n=function(l){if(!l)return"utf8";for(var n;;)switch(l){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 l;default:if(n)return;l=(""+l).toLowerCase(),n=!0}}(l);if("string"!=typeof n&&(e.isEncoding===t||!t(l)))throw new Error("Unknown encoding: "+l);return n||l}(l),this.encoding){case"utf16le":this.text=s,this.end=a,n=4;break;case"utf8":this.fillLast=o,n=4;break;case"base64":this.text=c,this.end=f,n=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function i(l){return l<=127?0:l>>5==6?2:l>>4==14?3:l>>3==30?4:l>>6==2?-1:-2}function o(l){var n=this.lastTotal-this.lastNeed,u=function(l,n,u){if(128!=(192&n[0]))return l.lastNeed=0,"�";if(l.lastNeed>1&&n.length>1){if(128!=(192&n[1]))return l.lastNeed=1,"�";if(l.lastNeed>2&&n.length>2&&128!=(192&n[2]))return l.lastNeed=2,"�"}}(this,l);return void 0!==u?u:this.lastNeed<=l.length?(l.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(l.copy(this.lastChar,n,0,l.length),void(this.lastNeed-=l.length))}function s(l,n){if((l.length-n)%2==0){var u=l.toString("utf16le",n);if(u){var e=u.charCodeAt(u.length-1);if(e>=55296&&e<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",n,l.length-1)}function a(l){var n=l&&l.length?this.write(l):"";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,u)}return n}function c(l,n){var u=(l.length-n)%3;return 0===u?l.toString("base64",n):(this.lastNeed=3-u,this.lastTotal=3,1===u?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",n,l.length-u))}function f(l){var n=l&&l.length?this.write(l):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function h(l){return l.toString(this.encoding)}function d(l){return l&&l.length?this.write(l):""}n.StringDecoder=r,r.prototype.write=function(l){if(0===l.length)return"";var n,u;if(this.lastNeed){if(void 0===(n=this.fillLast(l)))return"";u=this.lastNeed,this.lastNeed=0}else u=0;return u<l.length?n?n+this.text(l,u):this.text(l,u):n||""},r.prototype.end=function(l){var n=l&&l.length?this.write(l):"";return this.lastNeed?n+"�":n},r.prototype.text=function(l,n){var u=function(l,n,u){var e=n.length-1;if(e<u)return 0;var t=i(n[e]);return t>=0?(t>0&&(l.lastNeed=t-1),t):--e<u||-2===t?0:(t=i(n[e]))>=0?(t>0&&(l.lastNeed=t-2),t):--e<u||-2===t?0:(t=i(n[e]))>=0?(t>0&&(2===t?t=0:l.lastNeed=t-3),t):0}(this,l,n);if(!this.lastNeed)return l.toString("utf8",n);this.lastTotal=u;var e=l.length-(u-this.lastNeed);return l.copy(this.lastChar,0,e),l.toString("utf8",n,e)},r.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length}}},n={};function u(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return l[e](r,r.exports,u),r.exports}u.n=l=>{var n=l&&l.__esModule?()=>l.default:()=>l;return u.d(n,{a:n}),n},u.d=(l,n)=>{for(var e in n)u.o(n,e)&&!u.o(l,e)&&Object.defineProperty(l,e,{enumerable:!0,get:n[e]})},u.o=(l,n)=>Object.prototype.hasOwnProperty.call(l,n),u.r=l=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var e={};return(()=>{u.r(e);var l=u(2141),n={};for(const u in l)"default"!==u&&(n[u]=()=>l[u]);u.d(e,n)})(),e})();var i=r.exports=t();function o(l){if("string"==typeof l)return(new TextEncoder).encode(l);if(!(l instanceof Uint8Array))throw new TypeError('"data" be a string or Uint8Array.');return l}
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright (c) 2019 Digital Bazaar, Inc. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,r as t,b as i,V as s,e as r,f as o,h as a}from"./main.js";import"./pako.esm-
|
|
1
|
+
import{d as e,r as t,b as i,V as s,e as r,f as o,h as a}from"./main.js";import"./pako.esm-DnD5dZGi-HambcU-w.js";import{j as n}from"./jsonld-Pr6hPH-i-D_C9ciG_.js";import{s as c}from"./sha256-wKiO0px2-BYFBxJ7m.js";import{e as h}from"./ensureValidIssuingKey-wRebznsK-frafTbMl.js";import"./index-CcA_A5fd-Dgus2xdV.js";import{S as u}from"./Suite-B7Vy9AuU-D1ucdMDB.js";function p(e){e=e.trim();const t=[];for(let i=0;i<e.length;i+=2)t.push(parseInt(e.substring(i,i+2),16));return t}function f(e){const t=o(e);return"proof"in t?function(e){const t=o(e);if(!Array.isArray(e.proof))return delete t.proof,t;const i=e.proof.find((e=>"ChainedProof2021"!==e.type));return t.proof=i,t}(t):("signature"in t&&delete t.signature,t)}async function l(e){e["@context"].find((e=>i(e)&&"@vocab"in e))||e["@context"].push({"@vocab":"http://fallback.org/"});const t=f(e),o={algorithm:"URDNA2015",format:"application/nquads",documentLoader:function(e){return e in a?{contextUrl:null,document:a[e],documentUrl:e}:n.documentLoader(e)}};let h;try{h=await n.normalize(t,o)}catch(e){throw console.error(e),new s("computeLocalHash",r("errors","failedJsonLdNormalization"))}const u=function(e){const t=e.split("\n"),i=/<http:\/\/fallback\.org\/(.*)>/,s=t.map((e=>i.exec(e))).filter((e=>null!=e));if(s.length>0){const e=s.map((e=>e[1])).sort();return Array.from(new Set(e))}return null}(h);if(u)throw new s("computeLocalHash",`${r("errors","foundUnmappedFields")}: ${u.join(", ")}`);return c(function(e){const t=[];for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);s<128?t.push(s):s<2048?t.push(192|s>>6,128|63&s):s<55296||s>=57344?t.push(224|s>>12,128|s>>6&63,128|63&s):(i++,s=65536+((1023&s)<<10|1023&e.charCodeAt(i)),t.push(240|s>>18,128|s>>12&63,128|s>>6&63,128|63&s))}return t}(h))}var d;!function(e){e.getTransactionId="getTransactionId",e.computeLocalHash="computeLocalHash",e.fetchRemoteHash="fetchRemoteHash",e.parseIssuerKeys="parseIssuerKeys",e.compareHashes="compareHashes",e.checkMerkleRoot="checkMerkleRoot",e.checkReceipt="checkReceipt",e.checkAuthenticity="checkAuthenticity"}(d||(d={}));class y extends u{verificationProcess=[d.getTransactionId,d.computeLocalHash,d.fetchRemoteHash,d.compareHashes,d.checkMerkleRoot,d.checkReceipt,d.parseIssuerKeys,d.checkAuthenticity];transactionId;localHash;documentToVerify;txData;chain;explorerAPIs;receipt;issuerPublicKeyList;issuer;proof;type="MerkleProof2017";constructor(t){super(t),t.executeStep&&(this.executeStep=t.executeStep),this.documentToVerify=t.document,this.explorerAPIs=t.explorerAPIs,this.issuer=t.issuer,this.proof=t.proof,this.validateProofType(),this.receipt=this.documentToVerify.signature,this.chain=e.certificates.getChain("",this.receipt),this.transactionId=e.certificates.getTransactionId(this.receipt),this.adaptVerificationProcessToChain()}async init(){}async verifyProof(){for(const e of this.verificationProcess){if(!this[e])return void console.error("verification logic for",e,"not implemented");await this[e]()}}async verifyIdentity(){}getProofVerificationSteps(t){return this.verificationProcess.map((i=>e.verifier.convertToVerificationSubsteps(t,i)))}getIdentityVerificationSteps(){return[]}getIssuerPublicKey(){return e.chains.isMockChain(this.chain)?"This mock chain does not support issuing addresses":this.txData?this.txData.issuingAddress:void console.error("Trying to access issuing address when txData not available yet. Did you run the `verify` method yet?")}getIssuerName(){return this.issuer.name}getIssuerProfileDomain(){const e=new URL(this.getIssuerProfileUrl());return e?.hostname}getIssuerProfileUrl(){return this.issuer.id}getSigningDate(){return this.documentToVerify.issuedOn}getChain(){return this.chain}getReceipt(){return this.receipt}getTransactionIdString(){return e.certificates.getTransactionId(this.getReceipt())}getTransactionLink(){return e.certificates.getTransactionLink(this.getTransactionIdString(),this.getChain()).transactionLink}getRawTransactionLink(){return e.certificates.getTransactionLink(this.getTransactionIdString(),this.getChain()).rawTransactionLink}validateProofType(){if(this.proof.type[0]!==this.type)throw new Error(`Incompatible proof type passed. Expected: ${this.type}, Got: ${this.proof.type[0]}`)}adaptVerificationProcessToChain(){e.chains.isMockChain(this.chain)&&(t(this.verificationProcess,d.getTransactionId),t(this.verificationProcess,d.fetchRemoteHash),t(this.verificationProcess,d.parseIssuerKeys),t(this.verificationProcess,d.checkMerkleRoot),t(this.verificationProcess,d.checkAuthenticity))}async executeStep(e,t,i){throw new Error("doAction method needs to be overwritten by injecting from CVJS")}async getTransactionId(){await this.executeStep(d.getTransactionId,(()=>function(e){if("string"==typeof e&&e.length>0)return e;throw new s("getTransactionId",r("errors","isTransactionIdValid"))}(this.transactionId)),this.type)}async computeLocalHash(){this.localHash=await this.executeStep(d.computeLocalHash,(async()=>await l(this.documentToVerify)),this.type)}async fetchRemoteHash(){this.txData=await this.executeStep(d.fetchRemoteHash,(async()=>await e.verifier.lookForTx({transactionId:this.transactionId,chain:this.chain.code,explorerAPIs:this.explorerAPIs})),this.type)}async compareHashes(){await this.executeStep(d.compareHashes,(()=>function(e,t){if(e!==t)throw new s("compareHashes",r("errors","ensureHashesEqual"));return!0}(this.localHash,this.receipt.targetHash)),this.type)}async checkMerkleRoot(){await this.executeStep(d.checkMerkleRoot,(()=>function(e,t){if(e!==t)throw new s("checkMerkleRoot",r("errors","ensureMerkleRootEqual"));return!0}(this.receipt.merkleRoot,this.txData.remoteHash)),this.type)}async checkReceipt(){await this.executeStep(d.checkReceipt,(()=>{!function(e){let t=e.targetHash;const i=e.merkleRoot;try{const i=e.proof??e.path;if(i)for(const e in i){const r=i[e];let o;if(void 0!==r.left)o=p(`${r.left}${t}`),t=c(o);else{if(void 0===r.right)throw new s("checkReceipt","Trigger catch error.");o=p(`${t}${r.right}`),t=c(o)}}}catch(e){throw new s("checkReceipt",r("errors","ensureValidReceipt"))}if(t!==i)throw new s("checkReceipt",r("errors","invalidMerkleReceipt"))}(this.receipt)}),this.type)}async parseIssuerKeys(){this.issuerPublicKeyList=await this.executeStep(d.parseIssuerKeys,(()=>e.verifier.parseIssuerKeys(this.issuer)),this.type)}async checkAuthenticity(){await this.executeStep(d.checkAuthenticity,(()=>{h(this.issuerPublicKeyList,this.txData.issuingAddress,this.txData.time)}),this.type)}}export{y as default};
|