@leordev-web5/api
Version:
SDK for accessing the features and capabilities of Web5
1 lines • 2.69 MB
JavaScript
var E3e=Object.create;var TS=Object.defineProperty;var B3e=Object.getOwnPropertyDescriptor;var x3e=Object.getOwnPropertyNames;var C3e=Object.getPrototypeOf,S3e=Object.prototype.hasOwnProperty;var oV=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var oi=(t,e)=>()=>(t&&(e=t(t=0)),e);var X=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),At=(t,e)=>{for(var r in e)TS(t,r,{get:e[r],enumerable:!0})},sV=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of x3e(e))!S3e.call(t,n)&&n!==r&&TS(t,n,{get:()=>e[n],enumerable:!(i=B3e(e,n))||i.enumerable});return t};var it=(t,e,r)=>(r=t!=null?E3e(C3e(t)):{},sV(e||!t||!t.__esModule?TS(r,"default",{value:t,enumerable:!0}):r,t)),BR=t=>sV(TS({},"__esModule",{value:!0}),t);var CR=X(RS=>{"use strict";v();RS.byteLength=Q3e;RS.toByteArray=k3e;RS.fromByteArray=R3e;var Uu=[],Xc=[],_3e=typeof Uint8Array<"u"?Uint8Array:Array,xR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(yy=0,aV=xR.length;yy<aV;++yy)Uu[yy]=xR[yy],Xc[xR.charCodeAt(yy)]=yy;var yy,aV;Xc[45]=62;Xc[95]=63;function cV(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function Q3e(t){var e=cV(t),r=e[0],i=e[1];return(r+i)*3/4-i}function D3e(t,e,r){return(e+r)*3/4-r}function k3e(t){var e,r=cV(t),i=r[0],n=r[1],o=new _3e(D3e(t,i,n)),s=0,c=n>0?i-4:i,d;for(d=0;d<c;d+=4)e=Xc[t.charCodeAt(d)]<<18|Xc[t.charCodeAt(d+1)]<<12|Xc[t.charCodeAt(d+2)]<<6|Xc[t.charCodeAt(d+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return n===2&&(e=Xc[t.charCodeAt(d)]<<2|Xc[t.charCodeAt(d+1)]>>4,o[s++]=e&255),n===1&&(e=Xc[t.charCodeAt(d)]<<10|Xc[t.charCodeAt(d+1)]<<4|Xc[t.charCodeAt(d+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function M3e(t){return Uu[t>>18&63]+Uu[t>>12&63]+Uu[t>>6&63]+Uu[t&63]}function T3e(t,e,r){for(var i,n=[],o=e;o<r;o+=3)i=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),n.push(M3e(i));return n.join("")}function R3e(t){for(var e,r=t.length,i=r%3,n=[],o=16383,s=0,c=r-i;s<c;s+=o)n.push(T3e(t,s,s+o>c?c:s+o));return i===1?(e=t[r-1],n.push(Uu[e>>2]+Uu[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(Uu[e>>10]+Uu[e>>4&63]+Uu[e<<2&63]+"=")),n.join("")}});var _R=X(SR=>{v();SR.read=function(t,e,r,i,n){var o,s,c=n*8-i-1,d=(1<<c)-1,l=d>>1,u=-7,g=r?n-1:0,B=r?-1:1,S=t[e+g];for(g+=B,o=S&(1<<-u)-1,S>>=-u,u+=c;u>0;o=o*256+t[e+g],g+=B,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+t[e+g],g+=B,u-=8);if(o===0)o=1-l;else{if(o===d)return s?NaN:(S?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-l}return(S?-1:1)*s*Math.pow(2,o-i)};SR.write=function(t,e,r,i,n,o){var s,c,d,l=o*8-n-1,u=(1<<l)-1,g=u>>1,B=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:o-1,x=i?1:-1,C=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-s))<1&&(s--,d*=2),s+g>=1?e+=B/d:e+=B*Math.pow(2,1-g),e*d>=2&&(s++,d/=2),s+g>=u?(c=0,s=u):s+g>=1?(c=(e*d-1)*Math.pow(2,n),s=s+g):(c=e*Math.pow(2,g-1)*Math.pow(2,n),s=0));n>=8;t[r+S]=c&255,S+=x,c/=256,n-=8);for(s=s<<n|c,l+=n;l>0;t[r+S]=s&255,S+=x,s/=256,l-=8);t[r+S-x]|=C*128}});var vV=X(LI=>{"use strict";v();var QR=CR(),qI=_R(),fV=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;LI.Buffer=ze;LI.SlowBuffer=O3e;LI.INSPECT_MAX_BYTES=50;var US=2147483647;LI.kMaxLength=US;ze.TYPED_ARRAY_SUPPORT=U3e();!ze.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function U3e(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(ze.prototype,"parent",{enumerable:!0,get:function(){if(ze.isBuffer(this))return this.buffer}});Object.defineProperty(ze.prototype,"offset",{enumerable:!0,get:function(){if(ze.isBuffer(this))return this.byteOffset}});function _l(t){if(t>US)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,ze.prototype),e}function ze(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return TR(t)}return hV(t,e,r)}ze.poolSize=8192;function hV(t,e,r){if(typeof t=="string")return N3e(t,e);if(ArrayBuffer.isView(t))return K3e(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Fu(t,ArrayBuffer)||t&&Fu(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Fu(t,SharedArrayBuffer)||t&&Fu(t.buffer,SharedArrayBuffer)))return kR(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return ze.from(i,e,r);var n=P3e(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return ze.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}ze.from=function(t,e,r){return hV(t,e,r)};Object.setPrototypeOf(ze.prototype,Uint8Array.prototype);Object.setPrototypeOf(ze,Uint8Array);function lV(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function F3e(t,e,r){return lV(t),t<=0?_l(t):e!==void 0?typeof r=="string"?_l(t).fill(e,r):_l(t).fill(e):_l(t)}ze.alloc=function(t,e,r){return F3e(t,e,r)};function TR(t){return lV(t),_l(t<0?0:RR(t)|0)}ze.allocUnsafe=function(t){return TR(t)};ze.allocUnsafeSlow=function(t){return TR(t)};function N3e(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!ze.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=pV(t,e)|0,i=_l(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function DR(t){for(var e=t.length<0?0:RR(t.length)|0,r=_l(e),i=0;i<e;i+=1)r[i]=t[i]&255;return r}function K3e(t){if(Fu(t,Uint8Array)){var e=new Uint8Array(t);return kR(e.buffer,e.byteOffset,e.byteLength)}return DR(t)}function kR(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return e===void 0&&r===void 0?i=new Uint8Array(t):r===void 0?i=new Uint8Array(t,e):i=new Uint8Array(t,e,r),Object.setPrototypeOf(i,ze.prototype),i}function P3e(t){if(ze.isBuffer(t)){var e=RR(t.length)|0,r=_l(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||UR(t.length)?_l(0):DR(t);if(t.type==="Buffer"&&Array.isArray(t.data))return DR(t.data)}function RR(t){if(t>=US)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+US.toString(16)+" bytes");return t|0}function O3e(t){return+t!=t&&(t=0),ze.alloc(+t)}ze.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==ze.prototype};ze.compare=function(e,r){if(Fu(e,Uint8Array)&&(e=ze.from(e,e.offset,e.byteLength)),Fu(r,Uint8Array)&&(r=ze.from(r,r.offset,r.byteLength)),!ze.isBuffer(e)||!ze.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var i=e.length,n=r.length,o=0,s=Math.min(i,n);o<s;++o)if(e[o]!==r[o]){i=e[o],n=r[o];break}return i<n?-1:n<i?1:0};ze.isEncoding=function(e){switch(String(e).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}};ze.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return ze.alloc(0);var i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;var n=ze.allocUnsafe(r),o=0;for(i=0;i<e.length;++i){var s=e[i];if(Fu(s,Uint8Array))o+s.length>n.length?ze.from(s).copy(n,o):Uint8Array.prototype.set.call(n,s,o);else if(ze.isBuffer(s))s.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=s.length}return n};function pV(t,e){if(ze.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Fu(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return MR(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return IV(t).length;default:if(n)return i?-1:MR(t).length;e=(""+e).toLowerCase(),n=!0}}ze.byteLength=pV;function q3e(t,e,r){var i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return $3e(this,e,r);case"utf8":case"utf-8":return gV(this,e,r);case"ascii":return V3e(this,e,r);case"latin1":case"binary":return W3e(this,e,r);case"base64":return J3e(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z3e(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}ze.prototype._isBuffer=!0;function my(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}ze.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)my(this,r,r+1);return this};ze.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)my(this,r,r+3),my(this,r+1,r+2);return this};ze.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)my(this,r,r+7),my(this,r+1,r+6),my(this,r+2,r+5),my(this,r+3,r+4);return this};ze.prototype.toString=function(){var e=this.length;return e===0?"":arguments.length===0?gV(this,0,e):q3e.apply(this,arguments)};ze.prototype.toLocaleString=ze.prototype.toString;ze.prototype.equals=function(e){if(!ze.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:ze.compare(this,e)===0};ze.prototype.inspect=function(){var e="",r=LI.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};fV&&(ze.prototype[fV]=ze.prototype.inspect);ze.prototype.compare=function(e,r,i,n,o){if(Fu(e,Uint8Array)&&(e=ze.from(e,e.offset,e.byteLength)),!ze.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),r<0||i>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=i)return 0;if(n>=o)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var s=o-n,c=i-r,d=Math.min(s,c),l=this.slice(n,o),u=e.slice(r,i),g=0;g<d;++g)if(l[g]!==u[g]){s=l[g],c=u[g];break}return s<c?-1:c<s?1:0};function AV(t,e,r,i,n){if(t.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,UR(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=ze.from(e,i)),ze.isBuffer(e))return e.length===0?-1:dV(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):dV(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function dV(t,e,r,i,n){var o=1,s=t.length,c=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;o=2,s/=2,c/=2,r/=2}function d(S,x){return o===1?S[x]:S.readUInt16BE(x*o)}var l;if(n){var u=-1;for(l=r;l<s;l++)if(d(t,l)===d(e,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===c)return u*o}else u!==-1&&(l-=l-u),u=-1}else for(r+c>s&&(r=s-c),l=r;l>=0;l--){for(var g=!0,B=0;B<c;B++)if(d(t,l+B)!==d(e,B)){g=!1;break}if(g)return l}return-1}ze.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};ze.prototype.indexOf=function(e,r,i){return AV(this,e,r,i,!0)};ze.prototype.lastIndexOf=function(e,r,i){return AV(this,e,r,i,!1)};function L3e(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s<i;++s){var c=parseInt(e.substr(s*2,2),16);if(UR(c))return s;t[r+s]=c}return s}function H3e(t,e,r,i){return FS(MR(e,t.length-r),t,r,i)}function G3e(t,e,r,i){return FS(t8e(e),t,r,i)}function j3e(t,e,r,i){return FS(IV(e),t,r,i)}function z3e(t,e,r,i){return FS(r8e(e,t.length-r),t,r,i)}ze.prototype.write=function(e,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-r;if((i===void 0||i>o)&&(i=o),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return L3e(this,e,r,i);case"utf8":case"utf-8":return H3e(this,e,r,i);case"ascii":case"latin1":case"binary":return G3e(this,e,r,i);case"base64":return j3e(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z3e(this,e,r,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}};ze.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J3e(t,e,r){return e===0&&r===t.length?QR.fromByteArray(t):QR.fromByteArray(t.slice(e,r))}function gV(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var o=t[n],s=null,c=o>239?4:o>223?3:o>191?2:1;if(n+c<=r){var d,l,u,g;switch(c){case 1:o<128&&(s=o);break;case 2:d=t[n+1],(d&192)===128&&(g=(o&31)<<6|d&63,g>127&&(s=g));break;case 3:d=t[n+1],l=t[n+2],(d&192)===128&&(l&192)===128&&(g=(o&15)<<12|(d&63)<<6|l&63,g>2047&&(g<55296||g>57343)&&(s=g));break;case 4:d=t[n+1],l=t[n+2],u=t[n+3],(d&192)===128&&(l&192)===128&&(u&192)===128&&(g=(o&15)<<18|(d&63)<<12|(l&63)<<6|u&63,g>65535&&g<1114112&&(s=g))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|s&1023),i.push(s),n+=c}return Y3e(i)}var uV=4096;function Y3e(t){var e=t.length;if(e<=uV)return String.fromCharCode.apply(String,t);for(var r="",i=0;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=uV));return r}function V3e(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]&127);return i}function W3e(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function $3e(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",o=e;o<r;++o)n+=i8e[t[o]];return n}function Z3e(t,e,r){for(var i=t.slice(e,r),n="",o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}ze.prototype.slice=function(e,r){var i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);var n=this.subarray(e,r);return Object.setPrototypeOf(n,ze.prototype),n};function Eo(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}ze.prototype.readUintLE=ze.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Eo(e,r,this.length);for(var n=this[e],o=1,s=0;++s<r&&(o*=256);)n+=this[e+s]*o;return n};ze.prototype.readUintBE=ze.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Eo(e,r,this.length);for(var n=this[e+--r],o=1;r>0&&(o*=256);)n+=this[e+--r]*o;return n};ze.prototype.readUint8=ze.prototype.readUInt8=function(e,r){return e=e>>>0,r||Eo(e,1,this.length),this[e]};ze.prototype.readUint16LE=ze.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Eo(e,2,this.length),this[e]|this[e+1]<<8};ze.prototype.readUint16BE=ze.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Eo(e,2,this.length),this[e]<<8|this[e+1]};ze.prototype.readUint32LE=ze.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Eo(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};ze.prototype.readUint32BE=ze.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Eo(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};ze.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Eo(e,r,this.length);for(var n=this[e],o=1,s=0;++s<r&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*r)),n};ze.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Eo(e,r,this.length);for(var n=r,o=1,s=this[e+--n];n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*r)),s};ze.prototype.readInt8=function(e,r){return e=e>>>0,r||Eo(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};ze.prototype.readInt16LE=function(e,r){e=e>>>0,r||Eo(e,2,this.length);var i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};ze.prototype.readInt16BE=function(e,r){e=e>>>0,r||Eo(e,2,this.length);var i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};ze.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Eo(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};ze.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Eo(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};ze.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Eo(e,4,this.length),qI.read(this,e,!0,23,4)};ze.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Eo(e,4,this.length),qI.read(this,e,!1,23,4)};ze.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Eo(e,8,this.length),qI.read(this,e,!0,52,8)};ze.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Eo(e,8,this.length),qI.read(this,e,!1,52,8)};function Ca(t,e,r,i,n,o){if(!ze.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}ze.prototype.writeUintLE=ze.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){var o=Math.pow(2,8*i)-1;Ca(this,e,r,i,o,0)}var s=1,c=0;for(this[r]=e&255;++c<i&&(s*=256);)this[r+c]=e/s&255;return r+i};ze.prototype.writeUintBE=ze.prototype.writeUIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){var o=Math.pow(2,8*i)-1;Ca(this,e,r,i,o,0)}var s=i-1,c=1;for(this[r+s]=e&255;--s>=0&&(c*=256);)this[r+s]=e/c&255;return r+i};ze.prototype.writeUint8=ze.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,1,255,0),this[r]=e&255,r+1};ze.prototype.writeUint16LE=ze.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};ze.prototype.writeUint16BE=ze.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};ze.prototype.writeUint32LE=ze.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};ze.prototype.writeUint32BE=ze.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};ze.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){var o=Math.pow(2,8*i-1);Ca(this,e,r,i,o-1,-o)}var s=0,c=1,d=0;for(this[r]=e&255;++s<i&&(c*=256);)e<0&&d===0&&this[r+s-1]!==0&&(d=1),this[r+s]=(e/c>>0)-d&255;return r+i};ze.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){var o=Math.pow(2,8*i-1);Ca(this,e,r,i,o-1,-o)}var s=i-1,c=1,d=0;for(this[r+s]=e&255;--s>=0&&(c*=256);)e<0&&d===0&&this[r+s+1]!==0&&(d=1),this[r+s]=(e/c>>0)-d&255;return r+i};ze.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};ze.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};ze.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};ze.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};ze.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Ca(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function yV(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function mV(t,e,r,i,n){return e=+e,r=r>>>0,n||yV(t,e,r,4,34028234663852886e22,-34028234663852886e22),qI.write(t,e,r,i,23,4),r+4}ze.prototype.writeFloatLE=function(e,r,i){return mV(this,e,r,!0,i)};ze.prototype.writeFloatBE=function(e,r,i){return mV(this,e,r,!1,i)};function wV(t,e,r,i,n){return e=+e,r=r>>>0,n||yV(t,e,r,8,17976931348623157e292,-17976931348623157e292),qI.write(t,e,r,i,52,8),r+8}ze.prototype.writeDoubleLE=function(e,r,i){return wV(this,e,r,!0,i)};ze.prototype.writeDoubleBE=function(e,r,i){return wV(this,e,r,!1,i)};ze.prototype.copy=function(e,r,i,n){if(!ze.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);var o=n-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),r),o};ze.prototype.fill=function(e,r,i,n){if(typeof e=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!ze.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){var o=e.charCodeAt(0);(n==="utf8"&&o<128||n==="latin1")&&(e=o)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=r;s<i;++s)this[s]=e;else{var c=ze.isBuffer(e)?e:ze.from(e,n),d=c.length;if(d===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<i-r;++s)this[s+r]=c[s%d]}return this};var X3e=/[^+/0-9A-Za-z-_]/g;function e8e(t){if(t=t.split("=")[0],t=t.trim().replace(X3e,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function MR(t,e){e=e||1/0;for(var r,i=t.length,n=null,o=[],s=0;s<i;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function t8e(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function r8e(t,e){for(var r,i,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}function IV(t){return QR.toByteArray(e8e(t))}function FS(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Fu(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function UR(t){return t!==t}var i8e=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=r*16,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()});var kl=X((Ept,xV)=>{v();var qn=xV.exports={},Nu,Ku;function FR(){throw new Error("setTimeout has not been defined")}function NR(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Nu=setTimeout:Nu=FR}catch{Nu=FR}try{typeof clearTimeout=="function"?Ku=clearTimeout:Ku=NR}catch{Ku=NR}})();function bV(t){if(Nu===setTimeout)return setTimeout(t,0);if((Nu===FR||!Nu)&&setTimeout)return Nu=setTimeout,setTimeout(t,0);try{return Nu(t,0)}catch{try{return Nu.call(null,t,0)}catch{return Nu.call(this,t,0)}}}function n8e(t){if(Ku===clearTimeout)return clearTimeout(t);if((Ku===NR||!Ku)&&clearTimeout)return Ku=clearTimeout,clearTimeout(t);try{return Ku(t)}catch{try{return Ku.call(null,t)}catch{return Ku.call(this,t)}}}var Ql=[],HI=!1,wy,NS=-1;function o8e(){!HI||!wy||(HI=!1,wy.length?Ql=wy.concat(Ql):NS=-1,Ql.length&&EV())}function EV(){if(!HI){var t=bV(o8e);HI=!0;for(var e=Ql.length;e;){for(wy=Ql,Ql=[];++NS<e;)wy&&wy[NS].run();NS=-1,e=Ql.length}wy=null,HI=!1,n8e(t)}}qn.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Ql.push(new BV(t,e)),Ql.length===1&&!HI&&bV(EV)};function BV(t,e){this.fun=t,this.array=e}BV.prototype.run=function(){this.fun.apply(null,this.array)};qn.title="browser";qn.browser=!0;qn.env={};qn.argv=[];qn.version="";qn.versions={};function Dl(){}qn.on=Dl;qn.addListener=Dl;qn.once=Dl;qn.off=Dl;qn.removeListener=Dl;qn.removeAllListeners=Dl;qn.emit=Dl;qn.prependListener=Dl;qn.prependOnceListener=Dl;qn.listeners=function(t){return[]};qn.binding=function(t){throw new Error("process.binding is not supported")};qn.cwd=function(){return"/"};qn.chdir=function(t){throw new Error("process.chdir is not supported")};qn.umask=function(){return 0}});var N,M,xpt,v=oi(()=>{N=it(vV()),M=it(kl()),xpt=function(t){function e(){var i=this||self;return delete t.prototype.__magic__,i}if(typeof globalThis=="object")return globalThis;if(this)return e();t.defineProperty(t.prototype,"__magic__",{configurable:!0,get:e});var r=__magic__;return r}(Object)});var OV=X(PV=>{"use strict";v();PV.supports=function(...e){let r=e.reduce((i,n)=>Object.assign(i,n),{});return Object.assign(r,{snapshots:r.snapshots||!1,permanence:r.permanence||!1,seek:r.seek||!1,clear:r.clear||!1,getMany:r.getMany||!1,keyIterator:r.keyIterator||!1,valueIterator:r.valueIterator||!1,iteratorNextv:r.iteratorNextv||!1,iteratorAll:r.iteratorAll||!1,status:r.status||!1,createIfMissing:r.createIfMissing||!1,errorIfExists:r.errorIfExists||!1,deferredOpen:r.deferredOpen||!1,promises:r.promises||!1,streams:r.streams||!1,encodings:Object.assign({},r.encodings),events:Object.assign({},r.events),additionalMethods:Object.assign({},r.additionalMethods)})}});var Ad=X((HAt,qV)=>{"use strict";v();qV.exports=class extends Error{constructor(e,r){super(e||""),typeof r=="object"&&r!==null&&(r.code&&(this.code=String(r.code)),r.expected&&(this.expected=!0),r.transient&&(this.transient=!0),r.cause&&(this.cause=r.cause)),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}});var si=X($I=>{"use strict";v();var YR=CR(),VI=_R(),LV=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$I.Buffer=He;$I.SlowBuffer=O8e;$I.INSPECT_MAX_BYTES=50;var PS=2147483647;$I.kMaxLength=PS;He.TYPED_ARRAY_SUPPORT=U8e();!He.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function U8e(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(He.prototype,"parent",{enumerable:!0,get:function(){if(He.isBuffer(this))return this.buffer}});Object.defineProperty(He.prototype,"offset",{enumerable:!0,get:function(){if(He.isBuffer(this))return this.byteOffset}});function Ml(t){if(t>PS)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,He.prototype),e}function He(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ZR(t)}return zV(t,e,r)}He.poolSize=8192;function zV(t,e,r){if(typeof t=="string")return N8e(t,e);if(ArrayBuffer.isView(t))return K8e(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Pu(t,ArrayBuffer)||t&&Pu(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pu(t,SharedArrayBuffer)||t&&Pu(t.buffer,SharedArrayBuffer)))return WR(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return He.from(i,e,r);let n=P8e(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return He.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}He.from=function(t,e,r){return zV(t,e,r)};Object.setPrototypeOf(He.prototype,Uint8Array.prototype);Object.setPrototypeOf(He,Uint8Array);function JV(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function F8e(t,e,r){return JV(t),t<=0?Ml(t):e!==void 0?typeof r=="string"?Ml(t).fill(e,r):Ml(t).fill(e):Ml(t)}He.alloc=function(t,e,r){return F8e(t,e,r)};function ZR(t){return JV(t),Ml(t<0?0:XR(t)|0)}He.allocUnsafe=function(t){return ZR(t)};He.allocUnsafeSlow=function(t){return ZR(t)};function N8e(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!He.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=YV(t,e)|0,i=Ml(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function VR(t){let e=t.length<0?0:XR(t.length)|0,r=Ml(e);for(let i=0;i<e;i+=1)r[i]=t[i]&255;return r}function K8e(t){if(Pu(t,Uint8Array)){let e=new Uint8Array(t);return WR(e.buffer,e.byteOffset,e.byteLength)}return VR(t)}function WR(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&r===void 0?i=new Uint8Array(t):r===void 0?i=new Uint8Array(t,e):i=new Uint8Array(t,e,r),Object.setPrototypeOf(i,He.prototype),i}function P8e(t){if(He.isBuffer(t)){let e=XR(t.length)|0,r=Ml(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||tU(t.length)?Ml(0):VR(t);if(t.type==="Buffer"&&Array.isArray(t.data))return VR(t.data)}function XR(t){if(t>=PS)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+PS.toString(16)+" bytes");return t|0}function O8e(t){return+t!=t&&(t=0),He.alloc(+t)}He.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==He.prototype};He.compare=function(e,r){if(Pu(e,Uint8Array)&&(e=He.from(e,e.offset,e.byteLength)),Pu(r,Uint8Array)&&(r=He.from(r,r.offset,r.byteLength)),!He.isBuffer(e)||!He.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let i=e.length,n=r.length;for(let o=0,s=Math.min(i,n);o<s;++o)if(e[o]!==r[o]){i=e[o],n=r[o];break}return i<n?-1:n<i?1:0};He.isEncoding=function(e){switch(String(e).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}};He.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return He.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;let n=He.allocUnsafe(r),o=0;for(i=0;i<e.length;++i){let s=e[i];if(Pu(s,Uint8Array))o+s.length>n.length?(He.isBuffer(s)||(s=He.from(s)),s.copy(n,o)):Uint8Array.prototype.set.call(n,s,o);else if(He.isBuffer(s))s.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=s.length}return n};function YV(t,e){if(He.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Pu(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $R(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return iW(t).length;default:if(n)return i?-1:$R(t).length;e=(""+e).toLowerCase(),n=!0}}He.byteLength=YV;function q8e(t,e,r){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return $8e(this,e,r);case"utf8":case"utf-8":return WV(this,e,r);case"ascii":return V8e(this,e,r);case"latin1":case"binary":return W8e(this,e,r);case"base64":return J8e(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z8e(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}He.prototype._isBuffer=!0;function xy(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}He.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)xy(this,r,r+1);return this};He.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)xy(this,r,r+3),xy(this,r+1,r+2);return this};He.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)xy(this,r,r+7),xy(this,r+1,r+6),xy(this,r+2,r+5),xy(this,r+3,r+4);return this};He.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?WV(this,0,e):q8e.apply(this,arguments)};He.prototype.toLocaleString=He.prototype.toString;He.prototype.equals=function(e){if(!He.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:He.compare(this,e)===0};He.prototype.inspect=function(){let e="",r=$I.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};LV&&(He.prototype[LV]=He.prototype.inspect);He.prototype.compare=function(e,r,i,n,o){if(Pu(e,Uint8Array)&&(e=He.from(e,e.offset,e.byteLength)),!He.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),r<0||i>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=i)return 0;if(n>=o)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,o>>>=0,this===e)return 0;let s=o-n,c=i-r,d=Math.min(s,c),l=this.slice(n,o),u=e.slice(r,i);for(let g=0;g<d;++g)if(l[g]!==u[g]){s=l[g],c=u[g];break}return s<c?-1:c<s?1:0};function VV(t,e,r,i,n){if(t.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,tU(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=He.from(e,i)),He.isBuffer(e))return e.length===0?-1:HV(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):HV(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function HV(t,e,r,i,n){let o=1,s=t.length,c=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;o=2,s/=2,c/=2,r/=2}function d(u,g){return o===1?u[g]:u.readUInt16BE(g*o)}let l;if(n){let u=-1;for(l=r;l<s;l++)if(d(t,l)===d(e,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===c)return u*o}else u!==-1&&(l-=l-u),u=-1}else for(r+c>s&&(r=s-c),l=r;l>=0;l--){let u=!0;for(let g=0;g<c;g++)if(d(t,l+g)!==d(e,g)){u=!1;break}if(u)return l}return-1}He.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};He.prototype.indexOf=function(e,r,i){return VV(this,e,r,i,!0)};He.prototype.lastIndexOf=function(e,r,i){return VV(this,e,r,i,!1)};function L8e(t,e,r,i){r=Number(r)||0;let n=t.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let o=e.length;i>o/2&&(i=o/2);let s;for(s=0;s<i;++s){let c=parseInt(e.substr(s*2,2),16);if(tU(c))return s;t[r+s]=c}return s}function H8e(t,e,r,i){return OS($R(e,t.length-r),t,r,i)}function G8e(t,e,r,i){return OS(rSe(e),t,r,i)}function j8e(t,e,r,i){return OS(iW(e),t,r,i)}function z8e(t,e,r,i){return OS(iSe(e,t.length-r),t,r,i)}He.prototype.write=function(e,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((i===void 0||i>o)&&(i=o),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return L8e(this,e,r,i);case"utf8":case"utf-8":return H8e(this,e,r,i);case"ascii":case"latin1":case"binary":return G8e(this,e,r,i);case"base64":return j8e(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z8e(this,e,r,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}};He.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J8e(t,e,r){return e===0&&r===t.length?YR.fromByteArray(t):YR.fromByteArray(t.slice(e,r))}function WV(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let o=t[n],s=null,c=o>239?4:o>223?3:o>191?2:1;if(n+c<=r){let d,l,u,g;switch(c){case 1:o<128&&(s=o);break;case 2:d=t[n+1],(d&192)===128&&(g=(o&31)<<6|d&63,g>127&&(s=g));break;case 3:d=t[n+1],l=t[n+2],(d&192)===128&&(l&192)===128&&(g=(o&15)<<12|(d&63)<<6|l&63,g>2047&&(g<55296||g>57343)&&(s=g));break;case 4:d=t[n+1],l=t[n+2],u=t[n+3],(d&192)===128&&(l&192)===128&&(u&192)===128&&(g=(o&15)<<18|(d&63)<<12|(l&63)<<6|u&63,g>65535&&g<1114112&&(s=g))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|s&1023),i.push(s),n+=c}return Y8e(i)}var GV=4096;function Y8e(t){let e=t.length;if(e<=GV)return String.fromCharCode.apply(String,t);let r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=GV));return r}function V8e(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]&127);return i}function W8e(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function $8e(t,e,r){let i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);let n="";for(let o=e;o<r;++o)n+=nSe[t[o]];return n}function Z8e(t,e,r){let i=t.slice(e,r),n="";for(let o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}He.prototype.slice=function(e,r){let i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);let n=this.subarray(e,r);return Object.setPrototypeOf(n,He.prototype),n};function Bo(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}He.prototype.readUintLE=He.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Bo(e,r,this.length);let n=this[e],o=1,s=0;for(;++s<r&&(o*=256);)n+=this[e+s]*o;return n};He.prototype.readUintBE=He.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Bo(e,r,this.length);let n=this[e+--r],o=1;for(;r>0&&(o*=256);)n+=this[e+--r]*o;return n};He.prototype.readUint8=He.prototype.readUInt8=function(e,r){return e=e>>>0,r||Bo(e,1,this.length),this[e]};He.prototype.readUint16LE=He.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Bo(e,2,this.length),this[e]|this[e+1]<<8};He.prototype.readUint16BE=He.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Bo(e,2,this.length),this[e]<<8|this[e+1]};He.prototype.readUint32LE=He.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Bo(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};He.prototype.readUint32BE=He.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Bo(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};He.prototype.readBigUInt64LE=Hp(function(e){e=e>>>0,WI(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&S2(e,this.length-8);let n=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))});He.prototype.readBigUInt64BE=Hp(function(e){e=e>>>0,WI(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&S2(e,this.length-8);let n=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(o)});He.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Bo(e,r,this.length);let n=this[e],o=1,s=0;for(;++s<r&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*r)),n};He.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Bo(e,r,this.length);let n=r,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*r)),s};He.prototype.readInt8=function(e,r){return e=e>>>0,r||Bo(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};He.prototype.readInt16LE=function(e,r){e=e>>>0,r||Bo(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};He.prototype.readInt16BE=function(e,r){e=e>>>0,r||Bo(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};He.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Bo(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};He.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Bo(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};He.prototype.readBigInt64LE=Hp(function(e){e=e>>>0,WI(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&S2(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});He.prototype.readBigInt64BE=Hp(function(e){e=e>>>0,WI(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&S2(e,this.length-8);let n=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)});He.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Bo(e,4,this.length),VI.read(this,e,!0,23,4)};He.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Bo(e,4,this.length),VI.read(this,e,!1,23,4)};He.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Bo(e,8,this.length),VI.read(this,e,!0,52,8)};He.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Bo(e,8,this.length),VI.read(this,e,!1,52,8)};function Sa(t,e,r,i,n,o){if(!He.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}He.prototype.writeUintLE=He.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let c=Math.pow(2,8*i)-1;Sa(this,e,r,i,c,0)}let o=1,s=0;for(this[r]=e&255;++s<i&&(o*=256);)this[r+s]=e/o&255;return r+i};He.prototype.writeUintBE=He.prototype.writeUIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let c=Math.pow(2,8*i)-1;Sa(this,e,r,i,c,0)}let o=i-1,s=1;for(this[r+o]=e&255;--o>=0&&(s*=256);)this[r+o]=e/s&255;return r+i};He.prototype.writeUint8=He.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,1,255,0),this[r]=e&255,r+1};He.prototype.writeUint16LE=He.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};He.prototype.writeUint16BE=He.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};He.prototype.writeUint32LE=He.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};He.prototype.writeUint32BE=He.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function $V(t,e,r,i,n){rW(e,i,n,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,r}function ZV(t,e,r,i,n){rW(e,i,n,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o=o>>8,t[r+6]=o,o=o>>8,t[r+5]=o,o=o>>8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s=s>>8,t[r+2]=s,s=s>>8,t[r+1]=s,s=s>>8,t[r]=s,r+8}He.prototype.writeBigUInt64LE=Hp(function(e,r=0){return $V(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});He.prototype.writeBigUInt64BE=Hp(function(e,r=0){return ZV(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});He.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let d=Math.pow(2,8*i-1);Sa(this,e,r,i,d-1,-d)}let o=0,s=1,c=0;for(this[r]=e&255;++o<i&&(s*=256);)e<0&&c===0&&this[r+o-1]!==0&&(c=1),this[r+o]=(e/s>>0)-c&255;return r+i};He.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let d=Math.pow(2,8*i-1);Sa(this,e,r,i,d-1,-d)}let o=i-1,s=1,c=0;for(this[r+o]=e&255;--o>=0&&(s*=256);)e<0&&c===0&&this[r+o+1]!==0&&(c=1),this[r+o]=(e/s>>0)-c&255;return r+i};He.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};He.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};He.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};He.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};He.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Sa(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};He.prototype.writeBigInt64LE=Hp(function(e,r=0){return $V(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});He.prototype.writeBigInt64BE=Hp(function(e,r=0){return ZV(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function XV(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function eW(t,e,r,i,n){return e=+e,r=r>>>0,n||XV(t,e,r,4,34028234663852886e22,-34028234663852886e22),VI.write(t,e,r,i,23,4),r+4}He.prototype.writeFloatLE=function(e,r,i){return eW(this,e,r,!0,i)};He.prototype.writeFloatBE=function(e,r,i){return eW(this,e,r,!1,i)};function tW(t,e,r,i,n){return e=+e,r=r>>>0,n||XV(t,e,r,8,17976931348623157e292,-17976931348623157e292),VI.write(t,e,r,i,52,8),r+8}He.prototype.writeDoubleLE=function(e,r,i){return tW(this,e,r,!0,i)};He.prototype.writeDoubleBE=function(e,r,i){return tW(this,e,r,!1,i)};He.prototype.copy=function(e,r,i,n){if(!He.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);let o=n-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),r),o};He.prototype.fill=function(e,r,i,n){if(typeof e=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!He.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){let s=e.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(e=s)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let o;if(typeof e=="number")for(o=r;o<i;++o)this[o]=e;else{let s=He.isBuffer(e)?e:He.from(e,n),c=s.length;if(c===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<i-r;++o)this[o+r]=s[o%c]}return this};var YI={};function eU(t,e,r){YI[t]=class extends r{constructor(){super(),Object.defineProperty(this,"m