mirror of
https://github.com/nextcloud/server.git
synced 2026-03-07 16:01:08 -05:00
2 lines
59 KiB
JavaScript
2 lines
59 KiB
JavaScript
var Qt={},Pt={};Pt.byteLength=oe,Pt.toByteArray=se,Pt.fromByteArray=he;for(var ht=[],rt=[],ne=typeof Uint8Array<"u"?Uint8Array:Array,Gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt=0,re=Gt.length;vt<re;++vt)ht[vt]=Gt[vt],rt[Gt.charCodeAt(vt)]=vt;rt[45]=62,rt[95]=63;function Kt(m){var b=m.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var L=m.indexOf("=");L===-1&&(L=b);var T=L===b?0:4-L%4;return[L,T]}function oe(m){var b=Kt(m),L=b[0],T=b[1];return(L+T)*3/4-T}function ie(m,b,L){return(b+L)*3/4-L}function se(m){var b,L=Kt(m),T=L[0],I=L[1],v=new ne(ie(m,T,I)),B=0,N=I>0?T-4:T,S;for(S=0;S<N;S+=4)b=rt[m.charCodeAt(S)]<<18|rt[m.charCodeAt(S+1)]<<12|rt[m.charCodeAt(S+2)]<<6|rt[m.charCodeAt(S+3)],v[B++]=b>>16&255,v[B++]=b>>8&255,v[B++]=b&255;return I===2&&(b=rt[m.charCodeAt(S)]<<2|rt[m.charCodeAt(S+1)]>>4,v[B++]=b&255),I===1&&(b=rt[m.charCodeAt(S)]<<10|rt[m.charCodeAt(S+1)]<<4|rt[m.charCodeAt(S+2)]>>2,v[B++]=b>>8&255,v[B++]=b&255),v}function fe(m){return ht[m>>18&63]+ht[m>>12&63]+ht[m>>6&63]+ht[m&63]}function ue(m,b,L){for(var T,I=[],v=b;v<L;v+=3)T=(m[v]<<16&16711680)+(m[v+1]<<8&65280)+(m[v+2]&255),I.push(fe(T));return I.join("")}function he(m){for(var b,L=m.length,T=L%3,I=[],v=16383,B=0,N=L-T;B<N;B+=v)I.push(ue(m,B,B+v>N?N:B+v));return T===1?(b=m[L-1],I.push(ht[b>>2]+ht[b<<4&63]+"==")):T===2&&(b=(m[L-2]<<8)+m[L-1],I.push(ht[b>>10]+ht[b>>4&63]+ht[b<<2&63]+"=")),I.join("")}var Xt={};Xt.read=function(m,b,L,T,I){var v,B,N=I*8-T-1,S=(1<<N)-1,_=S>>1,a=-7,M=L?I-1:0,G=L?-1:1,X=m[b+M];for(M+=G,v=X&(1<<-a)-1,X>>=-a,a+=N;a>0;v=v*256+m[b+M],M+=G,a-=8);for(B=v&(1<<-a)-1,v>>=-a,a+=T;a>0;B=B*256+m[b+M],M+=G,a-=8);if(v===0)v=1-_;else{if(v===S)return B?NaN:(X?-1:1)*(1/0);B=B+Math.pow(2,T),v=v-_}return(X?-1:1)*B*Math.pow(2,v-T)},Xt.write=function(m,b,L,T,I,v){var B,N,S,_=v*8-I-1,a=(1<<_)-1,M=a>>1,G=I===23?Math.pow(2,-24)-Math.pow(2,-77):0,X=T?0:v-1,ot=T?1:-1,wt=b<0||b===0&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(N=isNaN(b)?1:0,B=a):(B=Math.floor(Math.log(b)/Math.LN2),b*(S=Math.pow(2,-B))<1&&(B--,S*=2),B+M>=1?b+=G/S:b+=G*Math.pow(2,1-M),b*S>=2&&(B++,S/=2),B+M>=a?(N=0,B=a):B+M>=1?(N=(b*S-1)*Math.pow(2,I),B=B+M):(N=b*Math.pow(2,M-1)*Math.pow(2,I),B=0));I>=8;m[L+X]=N&255,X+=ot,N/=256,I-=8);for(B=B<<I|N,_+=I;_>0;m[L+X]=B&255,X+=ot,B/=256,_-=8);m[L+X-ot]|=wt*128};(function(m){const b=Pt,L=Xt,T=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;m.Buffer=a,m.SlowBuffer=O,m.INSPECT_MAX_BYTES=50;const I=2147483647;m.kMaxLength=I;const{Uint8Array:v,ArrayBuffer:B,SharedArrayBuffer:N}=globalThis;a.TYPED_ARRAY_SUPPORT=S(),!a.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 S(){try{const t=new v(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,v.prototype),Object.setPrototypeOf(t,n),t.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function _(t){if(t>I)throw new RangeError('The value "'+t+'" is invalid for option "size"');const n=new v(t);return Object.setPrototypeOf(n,a.prototype),n}function a(t,n,o){if(typeof t=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ot(t)}return M(t,n,o)}a.poolSize=8192;function M(t,n,o){if(typeof t=="string")return wt(t,n);if(B.isView(t))return g(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(nt(t,B)||t&&nt(t.buffer,B)||typeof N<"u"&&(nt(t,N)||t&&nt(t.buffer,N)))return y(t,n,o);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const s=t.valueOf&&t.valueOf();if(s!=null&&s!==t)return a.from(s,n,o);const u=d(t);if(u)return u;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return a.from(t[Symbol.toPrimitive]("string"),n,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}a.from=function(t,n,o){return M(t,n,o)},Object.setPrototypeOf(a.prototype,v.prototype),Object.setPrototypeOf(a,v);function G(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 X(t,n,o){return G(t),t<=0?_(t):n!==void 0?typeof o=="string"?_(t).fill(n,o):_(t).fill(n):_(t)}a.alloc=function(t,n,o){return X(t,n,o)};function ot(t){return G(t),_(t<0?0:R(t)|0)}a.allocUnsafe=function(t){return ot(t)},a.allocUnsafeSlow=function(t){return ot(t)};function wt(t,n){if((typeof n!="string"||n==="")&&(n="utf8"),!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);const o=C(t,n)|0;let s=_(o);const u=s.write(t,n);return u!==o&&(s=s.slice(0,u)),s}function at(t){const n=t.length<0?0:R(t.length)|0,o=_(n);for(let s=0;s<n;s+=1)o[s]=t[s]&255;return o}function g(t){if(nt(t,v)){const n=new v(t);return y(n.buffer,n.byteOffset,n.byteLength)}return at(t)}function y(t,n,o){if(n<0||t.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<n+(o||0))throw new RangeError('"length" is outside of buffer bounds');let s;return n===void 0&&o===void 0?s=new v(t):o===void 0?s=new v(t,n):s=new v(t,n,o),Object.setPrototypeOf(s,a.prototype),s}function d(t){if(a.isBuffer(t)){const n=R(t.length)|0,o=_(n);return o.length===0||t.copy(o,0,0,n),o}if(t.length!==void 0)return typeof t.length!="number"||mt(t.length)?_(0):at(t);if(t.type==="Buffer"&&Array.isArray(t.data))return at(t.data)}function R(t){if(t>=I)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I.toString(16)+" bytes");return t|0}function O(t){return+t!=t&&(t=0),a.alloc(+t)}a.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==a.prototype},a.compare=function(t,n){if(nt(t,v)&&(t=a.from(t,t.offset,t.byteLength)),nt(n,v)&&(n=a.from(n,n.offset,n.byteLength)),!a.isBuffer(t)||!a.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;let o=t.length,s=n.length;for(let u=0,c=Math.min(o,s);u<c;++u)if(t[u]!==n[u]){o=t[u],s=n[u];break}return o<s?-1:s<o?1:0},a.isEncoding=function(t){switch(String(t).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}},a.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);let o;if(n===void 0)for(n=0,o=0;o<t.length;++o)n+=t[o].length;const s=a.allocUnsafe(n);let u=0;for(o=0;o<t.length;++o){let c=t[o];if(nt(c,v))u+c.length>s.length?(a.isBuffer(c)||(c=a.from(c)),c.copy(s,u)):v.prototype.set.call(s,c,u);else if(a.isBuffer(c))c.copy(s,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=c.length}return s};function C(t,n){if(a.isBuffer(t))return t.length;if(B.isView(t)||nt(t,B))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);const o=t.length,s=arguments.length>2&&arguments[2]===!0;if(!s&&o===0)return 0;let u=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":return Lt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o*2;case"hex":return o>>>1;case"base64":return Q(t).length;default:if(u)return s?-1:Lt(t).length;n=(""+n).toLowerCase(),u=!0}}a.byteLength=C;function A(t,n,o){let s=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((o===void 0||o>this.length)&&(o=this.length),o<=0)||(o>>>=0,n>>>=0,o<=n))return"";for(t||(t="utf8");;)switch(t){case"hex":return It(this,n,o);case"utf8":case"utf-8":return Et(this,n,o);case"ascii":return Ot(this,n,o);case"latin1":case"binary":return jt(this,n,o);case"base64":return lt(this,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kt(this,n,o);default:if(s)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}a.prototype._isBuffer=!0;function U(t,n,o){const s=t[n];t[n]=t[o],t[o]=s}a.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<t;n+=2)U(this,n,n+1);return this},a.prototype.swap32=function(){const t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<t;n+=4)U(this,n,n+3),U(this,n+1,n+2);return this},a.prototype.swap64=function(){const t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<t;n+=8)U(this,n,n+7),U(this,n+1,n+6),U(this,n+2,n+5),U(this,n+3,n+4);return this},a.prototype.toString=function(){const t=this.length;return t===0?"":arguments.length===0?Et(this,0,t):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0},a.prototype.inspect=function(){let t="";const n=m.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},T&&(a.prototype[T]=a.prototype.inspect),a.prototype.compare=function(t,n,o,s,u){if(nt(t,v)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(n===void 0&&(n=0),o===void 0&&(o=t?t.length:0),s===void 0&&(s=0),u===void 0&&(u=this.length),n<0||o>t.length||s<0||u>this.length)throw new RangeError("out of range index");if(s>=u&&n>=o)return 0;if(s>=u)return-1;if(n>=o)return 1;if(n>>>=0,o>>>=0,s>>>=0,u>>>=0,this===t)return 0;let c=u-s,w=o-n;const j=Math.min(c,w),q=this.slice(s,u),k=t.slice(n,o);for(let P=0;P<j;++P)if(q[P]!==k[P]){c=q[P],w=k[P];break}return c<w?-1:w<c?1:0};function Y(t,n,o,s,u){if(t.length===0)return-1;if(typeof o=="string"?(s=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,mt(o)&&(o=u?0:t.length-1),o<0&&(o=t.length+o),o>=t.length){if(u)return-1;o=t.length-1}else if(o<0)if(u)o=0;else return-1;if(typeof n=="string"&&(n=a.from(n,s)),a.isBuffer(n))return n.length===0?-1:$(t,n,o,s,u);if(typeof n=="number")return n=n&255,typeof v.prototype.indexOf=="function"?u?v.prototype.indexOf.call(t,n,o):v.prototype.lastIndexOf.call(t,n,o):$(t,[n],o,s,u);throw new TypeError("val must be string, number or Buffer")}function $(t,n,o,s,u){let c=1,w=t.length,j=n.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(t.length<2||n.length<2)return-1;c=2,w/=2,j/=2,o/=2}function q(P,x){return c===1?P[x]:P.readUInt16BE(x*c)}let k;if(u){let P=-1;for(k=o;k<w;k++)if(q(t,k)===q(n,P===-1?0:k-P)){if(P===-1&&(P=k),k-P+1===j)return P*c}else P!==-1&&(k-=k-P),P=-1}else for(o+j>w&&(o=w-j),k=o;k>=0;k--){let P=!0;for(let x=0;x<j;x++)if(q(t,k+x)!==q(n,x)){P=!1;break}if(P)return k}return-1}a.prototype.includes=function(t,n,o){return this.indexOf(t,n,o)!==-1},a.prototype.indexOf=function(t,n,o){return Y(this,t,n,o,!0)},a.prototype.lastIndexOf=function(t,n,o){return Y(this,t,n,o,!1)};function Z(t,n,o,s){o=Number(o)||0;const u=t.length-o;s?(s=Number(s),s>u&&(s=u)):s=u;const c=n.length;s>c/2&&(s=c/2);let w;for(w=0;w<s;++w){const j=parseInt(n.substr(w*2,2),16);if(mt(j))return w;t[o+w]=j}return w}function l(t,n,o,s){return bt(Lt(n,t.length-o),t,o,s)}function J(t,n,o,s){return bt(Yt(n),t,o,s)}function it(t,n,o,s){return bt(Q(n),t,o,s)}function et(t,n,o,s){return bt(H(n,t.length-o),t,o,s)}a.prototype.write=function(t,n,o,s){if(n===void 0)s="utf8",o=this.length,n=0;else if(o===void 0&&typeof n=="string")s=n,o=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(o)?(o=o>>>0,s===void 0&&(s="utf8")):(s=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-n;if((o===void 0||o>u)&&(o=u),t.length>0&&(o<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");let c=!1;for(;;)switch(s){case"hex":return Z(this,t,n,o);case"utf8":case"utf-8":return l(this,t,n,o);case"ascii":case"latin1":case"binary":return J(this,t,n,o);case"base64":return it(this,t,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,t,n,o);default:if(c)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),c=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(t,n,o){return n===0&&o===t.length?b.fromByteArray(t):b.fromByteArray(t.slice(n,o))}function Et(t,n,o){o=Math.min(t.length,o);const s=[];let u=n;for(;u<o;){const c=t[u];let w=null,j=c>239?4:c>223?3:c>191?2:1;if(u+j<=o){let q,k,P,x;switch(j){case 1:c<128&&(w=c);break;case 2:q=t[u+1],(q&192)===128&&(x=(c&31)<<6|q&63,x>127&&(w=x));break;case 3:q=t[u+1],k=t[u+2],(q&192)===128&&(k&192)===128&&(x=(c&15)<<12|(q&63)<<6|k&63,x>2047&&(x<55296||x>57343)&&(w=x));break;case 4:q=t[u+1],k=t[u+2],P=t[u+3],(q&192)===128&&(k&192)===128&&(P&192)===128&&(x=(c&15)<<18|(q&63)<<12|(k&63)<<6|P&63,x>65535&&x<1114112&&(w=x))}}w===null?(w=65533,j=1):w>65535&&(w-=65536,s.push(w>>>10&1023|55296),w=56320|w&1023),s.push(w),u+=j}return $t(s)}const Bt=4096;function $t(t){const n=t.length;if(n<=Bt)return String.fromCharCode.apply(String,t);let o="",s=0;for(;s<n;)o+=String.fromCharCode.apply(String,t.slice(s,s+=Bt));return o}function Ot(t,n,o){let s="";o=Math.min(t.length,o);for(let u=n;u<o;++u)s+=String.fromCharCode(t[u]&127);return s}function jt(t,n,o){let s="";o=Math.min(t.length,o);for(let u=n;u<o;++u)s+=String.fromCharCode(t[u]);return s}function It(t,n,o){const s=t.length;(!n||n<0)&&(n=0),(!o||o<0||o>s)&&(o=s);let u="";for(let c=n;c<o;++c)u+=_t[t[c]];return u}function kt(t,n,o){const s=t.slice(n,o);let u="";for(let c=0;c<s.length-1;c+=2)u+=String.fromCharCode(s[c]+s[c+1]*256);return u}a.prototype.slice=function(t,n){const o=this.length;t=~~t,n=n===void 0?o:~~n,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),n<0?(n+=o,n<0&&(n=0)):n>o&&(n=o),n<t&&(n=t);const s=this.subarray(t,n);return Object.setPrototypeOf(s,a.prototype),s};function V(t,n,o){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+n>o)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(t,n,o){t=t>>>0,n=n>>>0,o||V(t,n,this.length);let s=this[t],u=1,c=0;for(;++c<n&&(u*=256);)s+=this[t+c]*u;return s},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,n,o){t=t>>>0,n=n>>>0,o||V(t,n,this.length);let s=this[t+--n],u=1;for(;n>0&&(u*=256);)s+=this[t+--n]*u;return s},a.prototype.readUint8=a.prototype.readUInt8=function(t,n){return t=t>>>0,n||V(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,n){return t=t>>>0,n||V(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,n){return t=t>>>0,n||V(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,n){return t=t>>>0,n||V(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,n){return t=t>>>0,n||V(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readBigUInt64LE=st(function(t){t=t>>>0,ct(t,"offset");const n=this[t],o=this[t+7];(n===void 0||o===void 0)&&dt(t,this.length-8);const s=n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,u=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(s)+(BigInt(u)<<BigInt(32))}),a.prototype.readBigUInt64BE=st(function(t){t=t>>>0,ct(t,"offset");const n=this[t],o=this[t+7];(n===void 0||o===void 0)&&dt(t,this.length-8);const s=n*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],u=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return(BigInt(s)<<BigInt(32))+BigInt(u)}),a.prototype.readIntLE=function(t,n,o){t=t>>>0,n=n>>>0,o||V(t,n,this.length);let s=this[t],u=1,c=0;for(;++c<n&&(u*=256);)s+=this[t+c]*u;return u*=128,s>=u&&(s-=Math.pow(2,8*n)),s},a.prototype.readIntBE=function(t,n,o){t=t>>>0,n=n>>>0,o||V(t,n,this.length);let s=n,u=1,c=this[t+--s];for(;s>0&&(u*=256);)c+=this[t+--s]*u;return u*=128,c>=u&&(c-=Math.pow(2,8*n)),c},a.prototype.readInt8=function(t,n){return t=t>>>0,n||V(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},a.prototype.readInt16LE=function(t,n){t=t>>>0,n||V(t,2,this.length);const o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o},a.prototype.readInt16BE=function(t,n){t=t>>>0,n||V(t,2,this.length);const o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o},a.prototype.readInt32LE=function(t,n){return t=t>>>0,n||V(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,n){return t=t>>>0,n||V(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readBigInt64LE=st(function(t){t=t>>>0,ct(t,"offset");const n=this[t],o=this[t+7];(n===void 0||o===void 0)&&dt(t,this.length-8);const s=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return(BigInt(s)<<BigInt(32))+BigInt(n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)}),a.prototype.readBigInt64BE=st(function(t){t=t>>>0,ct(t,"offset");const n=this[t],o=this[t+7];(n===void 0||o===void 0)&&dt(t,this.length-8);const s=(n<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(s)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)}),a.prototype.readFloatLE=function(t,n){return t=t>>>0,n||V(t,4,this.length),L.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,n){return t=t>>>0,n||V(t,4,this.length),L.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,n){return t=t>>>0,n||V(t,8,this.length),L.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,n){return t=t>>>0,n||V(t,8,this.length),L.read(this,t,!1,52,8)};function tt(t,n,o,s,u,c){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>u||n<c)throw new RangeError('"value" argument is out of bounds');if(o+s>t.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,n,o,s){if(t=+t,n=n>>>0,o=o>>>0,!s){const w=Math.pow(2,8*o)-1;tt(this,t,n,o,w,0)}let u=1,c=0;for(this[n]=t&255;++c<o&&(u*=256);)this[n+c]=t/u&255;return n+o},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,n,o,s){if(t=+t,n=n>>>0,o=o>>>0,!s){const w=Math.pow(2,8*o)-1;tt(this,t,n,o,w,0)}let u=o-1,c=1;for(this[n+u]=t&255;--u>=0&&(c*=256);)this[n+u]=t/c&255;return n+o},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,1,255,0),this[n]=t&255,n+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,2,65535,0),this[n]=t&255,this[n+1]=t>>>8,n+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=t&255,n+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255,n+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};function ft(t,n,o,s,u){Ut(n,s,u,t,o,7);let c=Number(n&BigInt(4294967295));t[o++]=c,c=c>>8,t[o++]=c,c=c>>8,t[o++]=c,c=c>>8,t[o++]=c;let w=Number(n>>BigInt(32)&BigInt(4294967295));return t[o++]=w,w=w>>8,t[o++]=w,w=w>>8,t[o++]=w,w=w>>8,t[o++]=w,o}function At(t,n,o,s,u){Ut(n,s,u,t,o,7);let c=Number(n&BigInt(4294967295));t[o+7]=c,c=c>>8,t[o+6]=c,c=c>>8,t[o+5]=c,c=c>>8,t[o+4]=c;let w=Number(n>>BigInt(32)&BigInt(4294967295));return t[o+3]=w,w=w>>8,t[o+2]=w,w=w>>8,t[o+1]=w,w=w>>8,t[o]=w,o+8}a.prototype.writeBigUInt64LE=st(function(t,n=0){return ft(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=st(function(t,n=0){return At(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(t,n,o,s){if(t=+t,n=n>>>0,!s){const j=Math.pow(2,8*o-1);tt(this,t,n,o,j-1,-j)}let u=0,c=1,w=0;for(this[n]=t&255;++u<o&&(c*=256);)t<0&&w===0&&this[n+u-1]!==0&&(w=1),this[n+u]=(t/c>>0)-w&255;return n+o},a.prototype.writeIntBE=function(t,n,o,s){if(t=+t,n=n>>>0,!s){const j=Math.pow(2,8*o-1);tt(this,t,n,o,j-1,-j)}let u=o-1,c=1,w=0;for(this[n+u]=t&255;--u>=0&&(c*=256);)t<0&&w===0&&this[n+u+1]!==0&&(w=1),this[n+u]=(t/c>>0)-w&255;return n+o},a.prototype.writeInt8=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=t&255,n+1},a.prototype.writeInt16LE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,2,32767,-32768),this[n]=t&255,this[n+1]=t>>>8,n+2},a.prototype.writeInt16BE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=t&255,n+2},a.prototype.writeInt32LE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,4,2147483647,-2147483648),this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4},a.prototype.writeInt32BE=function(t,n,o){return t=+t,n=n>>>0,o||tt(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4},a.prototype.writeBigInt64LE=st(function(t,n=0){return ft(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=st(function(t,n=0){return At(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Tt(t,n,o,s,u,c){if(o+s>t.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function St(t,n,o,s,u){return n=+n,o=o>>>0,u||Tt(t,n,o,4),L.write(t,n,o,s,23,4),o+4}a.prototype.writeFloatLE=function(t,n,o){return St(this,t,n,!0,o)},a.prototype.writeFloatBE=function(t,n,o){return St(this,t,n,!1,o)};function Nt(t,n,o,s,u){return n=+n,o=o>>>0,u||Tt(t,n,o,8),L.write(t,n,o,s,52,8),o+8}a.prototype.writeDoubleLE=function(t,n,o){return Nt(this,t,n,!0,o)},a.prototype.writeDoubleBE=function(t,n,o){return Nt(this,t,n,!1,o)},a.prototype.copy=function(t,n,o,s){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!s&&s!==0&&(s=this.length),n>=t.length&&(n=t.length),n||(n=0),s>0&&s<o&&(s=o),s===o||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),t.length-n<s-o&&(s=t.length-n+o);const u=s-o;return this===t&&typeof v.prototype.copyWithin=="function"?this.copyWithin(n,o,s):v.prototype.set.call(t,this.subarray(o,s),n),u},a.prototype.fill=function(t,n,o,s){if(typeof t=="string"){if(typeof n=="string"?(s=n,n=0,o=this.length):typeof o=="string"&&(s=o,o=this.length),s!==void 0&&typeof s!="string")throw new TypeError("encoding must be a string");if(typeof s=="string"&&!a.isEncoding(s))throw new TypeError("Unknown encoding: "+s);if(t.length===1){const c=t.charCodeAt(0);(s==="utf8"&&c<128||s==="latin1")&&(t=c)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(n<0||this.length<n||this.length<o)throw new RangeError("Out of range index");if(o<=n)return this;n=n>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let u;if(typeof t=="number")for(u=n;u<o;++u)this[u]=t;else{const c=a.isBuffer(t)?t:a.from(t,s),w=c.length;if(w===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(u=0;u<o-n;++u)this[u+n]=c[u%w]}return this};const pt={};function Rt(t,n,o){pt[t]=class extends o{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(s){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:s,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}Rt("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Rt("ERR_INVALID_ARG_TYPE",function(t,n){return`The "${t}" argument must be of type number. Received type ${typeof n}`},TypeError),Rt("ERR_OUT_OF_RANGE",function(t,n,o){let s=`The value of "${t}" is out of range.`,u=o;return Number.isInteger(o)&&Math.abs(o)>2**32?u=Ct(String(o)):typeof o=="bigint"&&(u=String(o),(o>BigInt(2)**BigInt(32)||o<-(BigInt(2)**BigInt(32)))&&(u=Ct(u)),u+="n"),s+=` It must be ${n}. Received ${u}`,s},RangeError);function Ct(t){let n="",o=t.length;const s=t[0]==="-"?1:0;for(;o>=s+4;o-=3)n=`_${t.slice(o-3,o)}${n}`;return`${t.slice(0,o)}${n}`}function Dt(t,n,o){ct(n,"offset"),(t[n]===void 0||t[n+o]===void 0)&&dt(n,t.length-(o+1))}function Ut(t,n,o,s,u,c){if(t>o||t<n){const w=typeof n=="bigint"?"n":"";let j;throw n===0||n===BigInt(0)?j=`>= 0${w} and < 2${w} ** ${(c+1)*8}${w}`:j=`>= -(2${w} ** ${(c+1)*8-1}${w}) and < 2 ** ${(c+1)*8-1}${w}`,new pt.ERR_OUT_OF_RANGE("value",j,t)}Dt(s,u,c)}function ct(t,n){if(typeof t!="number")throw new pt.ERR_INVALID_ARG_TYPE(n,"number",t)}function dt(t,n,o){throw Math.floor(t)!==t?(ct(t,o),new pt.ERR_OUT_OF_RANGE("offset","an integer",t)):n<0?new pt.ERR_BUFFER_OUT_OF_BOUNDS:new pt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${n}`,t)}const Ft=/[^+/0-9A-Za-z-_]/g;function zt(t){if(t=t.split("=")[0],t=t.trim().replace(Ft,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Lt(t,n){n=n||1/0;let o;const s=t.length;let u=null;const c=[];for(let w=0;w<s;++w){if(o=t.charCodeAt(w),o>55295&&o<57344){if(!u){if(o>56319){(n-=3)>-1&&c.push(239,191,189);continue}else if(w+1===s){(n-=3)>-1&&c.push(239,191,189);continue}u=o;continue}if(o<56320){(n-=3)>-1&&c.push(239,191,189),u=o;continue}o=(u-55296<<10|o-56320)+65536}else u&&(n-=3)>-1&&c.push(239,191,189);if(u=null,o<128){if((n-=1)<0)break;c.push(o)}else if(o<2048){if((n-=2)<0)break;c.push(o>>6|192,o&63|128)}else if(o<65536){if((n-=3)<0)break;c.push(o>>12|224,o>>6&63|128,o&63|128)}else if(o<1114112){if((n-=4)<0)break;c.push(o>>18|240,o>>12&63|128,o>>6&63|128,o&63|128)}else throw new Error("Invalid code point")}return c}function Yt(t){const n=[];for(let o=0;o<t.length;++o)n.push(t.charCodeAt(o)&255);return n}function H(t,n){let o,s,u;const c=[];for(let w=0;w<t.length&&!((n-=2)<0);++w)o=t.charCodeAt(w),s=o>>8,u=o%256,c.push(u),c.push(s);return c}function Q(t){return b.toByteArray(zt(t))}function bt(t,n,o,s){let u;for(u=0;u<s&&!(u+o>=n.length||u>=t.length);++u)n[u+o]=t[u];return u}function nt(t,n){return t instanceof n||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===n.name}function mt(t){return t!==t}const _t=(function(){const t="0123456789abcdef",n=new Array(256);for(let o=0;o<16;++o){const s=o*16;for(let u=0;u<16;++u)n[s+u]=t[o]+t[u]}return n})();function st(t){return typeof BigInt>"u"?gt:t}function gt(){throw new Error("BigInt not supported")}})(Qt);const ce=Qt.Buffer;function pe(m,b=100,L={}){if(typeof m!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof m}\`.`);if(b<0)throw new RangeError("`wait` must not be negative.");if(typeof L=="boolean")throw new TypeError("The `options` parameter must be an object, not a boolean. Use `{immediate: true}` instead.");const{immediate:T}=L;let I,v,B,N,S;function _(){const G=I,X=v;return I=void 0,v=void 0,S=m.apply(G,X),S}function a(){const G=Date.now()-N;G<b&&G>=0?B=setTimeout(a,b-G):(B=void 0,T||(S=_()))}const M=function(...G){if(I&&this!==I&&Object.getPrototypeOf(this)===Object.getPrototypeOf(I))throw new Error("Debounced method called with different contexts of the same prototype.");I=this,v=G,N=Date.now();const X=T&&!B;if(B||(B=setTimeout(a,b)),X)return S=_(),S};return Object.defineProperty(M,"isPending",{get(){return B!==void 0}}),M.clear=()=>{B&&(clearTimeout(B),B=void 0,I=void 0,v=void 0)},M.flush=()=>{B&&M.trigger()},M.trigger=()=>{S=_(),M.clear()},M}var Ht={},Wt;function ae(){return Wt||(Wt=1,(function(m){Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var b={},L={};L.byteLength=a,L.toByteArray=G,L.fromByteArray=wt;for(var T=[],I=[],v=typeof Uint8Array<"u"?Uint8Array:Array,B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=0,S=B.length;N<S;++N)T[N]=B[N],I[B.charCodeAt(N)]=N;I[45]=62,I[95]=63;function _(y){var d=y.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var R=y.indexOf("=");R===-1&&(R=d);var O=R===d?0:4-R%4;return[R,O]}function a(y){var d=_(y),R=d[0],O=d[1];return(R+O)*3/4-O}function M(y,d,R){return(d+R)*3/4-R}function G(y){var d,R=_(y),O=R[0],C=R[1],A=new v(M(y,O,C)),U=0,Y=C>0?O-4:O,$;for($=0;$<Y;$+=4)d=I[y.charCodeAt($)]<<18|I[y.charCodeAt($+1)]<<12|I[y.charCodeAt($+2)]<<6|I[y.charCodeAt($+3)],A[U++]=d>>16&255,A[U++]=d>>8&255,A[U++]=d&255;return C===2&&(d=I[y.charCodeAt($)]<<2|I[y.charCodeAt($+1)]>>4,A[U++]=d&255),C===1&&(d=I[y.charCodeAt($)]<<10|I[y.charCodeAt($+1)]<<4|I[y.charCodeAt($+2)]>>2,A[U++]=d>>8&255,A[U++]=d&255),A}function X(y){return T[y>>18&63]+T[y>>12&63]+T[y>>6&63]+T[y&63]}function ot(y,d,R){for(var O,C=[],A=d;A<R;A+=3)O=(y[A]<<16&16711680)+(y[A+1]<<8&65280)+(y[A+2]&255),C.push(X(O));return C.join("")}function wt(y){for(var d,R=y.length,O=R%3,C=[],A=16383,U=0,Y=R-O;U<Y;U+=A)C.push(ot(y,U,U+A>Y?Y:U+A));return O===1?(d=y[R-1],C.push(T[d>>2]+T[d<<4&63]+"==")):O===2&&(d=(y[R-2]<<8)+y[R-1],C.push(T[d>>10]+T[d>>4&63]+T[d<<2&63]+"=")),C.join("")}var at={};at.read=function(y,d,R,O,C){var A,U,Y=C*8-O-1,$=(1<<Y)-1,Z=$>>1,l=-7,J=R?C-1:0,it=R?-1:1,et=y[d+J];for(J+=it,A=et&(1<<-l)-1,et>>=-l,l+=Y;l>0;A=A*256+y[d+J],J+=it,l-=8);for(U=A&(1<<-l)-1,A>>=-l,l+=O;l>0;U=U*256+y[d+J],J+=it,l-=8);if(A===0)A=1-Z;else{if(A===$)return U?NaN:(et?-1:1)*(1/0);U=U+Math.pow(2,O),A=A-Z}return(et?-1:1)*U*Math.pow(2,A-O)},at.write=function(y,d,R,O,C,A){var U,Y,$,Z=A*8-C-1,l=(1<<Z)-1,J=l>>1,it=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,et=O?0:A-1,lt=O?1:-1,Et=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(Y=isNaN(d)?1:0,U=l):(U=Math.floor(Math.log(d)/Math.LN2),d*($=Math.pow(2,-U))<1&&(U--,$*=2),U+J>=1?d+=it/$:d+=it*Math.pow(2,1-J),d*$>=2&&(U++,$/=2),U+J>=l?(Y=0,U=l):U+J>=1?(Y=(d*$-1)*Math.pow(2,C),U=U+J):(Y=d*Math.pow(2,J-1)*Math.pow(2,C),U=0));C>=8;y[R+et]=Y&255,et+=lt,Y/=256,C-=8);for(U=U<<C|Y,Z+=C;Z>0;y[R+et]=U&255,et+=lt,U/=256,Z-=8);y[R+et-lt]|=Et*128},(function(y){const d=L,R=at,O=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;y.Buffer=l,y.SlowBuffer=kt,y.INSPECT_MAX_BYTES=50;const C=2147483647;y.kMaxLength=C;const{Uint8Array:A,ArrayBuffer:U,SharedArrayBuffer:Y}=globalThis;l.TYPED_ARRAY_SUPPORT=$(),!l.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 $(){try{const e=new A(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,A.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function Z(e){if(e>C)throw new RangeError('The value "'+e+'" is invalid for option "size"');const r=new A(e);return Object.setPrototypeOf(r,l.prototype),r}function l(e,r,i){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return lt(e)}return J(e,r,i)}l.poolSize=8192;function J(e,r,i){if(typeof e=="string")return Et(e,r);if(U.isView(e))return $t(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ut(e,U)||e&&ut(e.buffer,U)||typeof Y<"u"&&(ut(e,Y)||e&&ut(e.buffer,Y)))return Ot(e,r,i);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const f=e.valueOf&&e.valueOf();if(f!=null&&f!==e)return l.from(f,r,i);const h=jt(e);if(h)return h;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return l.from(e[Symbol.toPrimitive]("string"),r,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}l.from=function(e,r,i){return J(e,r,i)},Object.setPrototypeOf(l.prototype,A.prototype),Object.setPrototypeOf(l,A);function it(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function et(e,r,i){return it(e),e<=0?Z(e):r!==void 0?typeof i=="string"?Z(e).fill(r,i):Z(e).fill(r):Z(e)}l.alloc=function(e,r,i){return et(e,r,i)};function lt(e){return it(e),Z(e<0?0:It(e)|0)}l.allocUnsafe=function(e){return lt(e)},l.allocUnsafeSlow=function(e){return lt(e)};function Et(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const i=V(e,r)|0;let f=Z(i);const h=f.write(e,r);return h!==i&&(f=f.slice(0,h)),f}function Bt(e){const r=e.length<0?0:It(e.length)|0,i=Z(r);for(let f=0;f<r;f+=1)i[f]=e[f]&255;return i}function $t(e){if(ut(e,A)){const r=new A(e);return Ot(r.buffer,r.byteOffset,r.byteLength)}return Bt(e)}function Ot(e,r,i){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(i||0))throw new RangeError('"length" is outside of buffer bounds');let f;return r===void 0&&i===void 0?f=new A(e):i===void 0?f=new A(e,r):f=new A(e,r,i),Object.setPrototypeOf(f,l.prototype),f}function jt(e){if(l.isBuffer(e)){const r=It(e.length)|0,i=Z(r);return i.length===0||e.copy(i,0,0,r),i}if(e.length!==void 0)return typeof e.length!="number"||xt(e.length)?Z(0):Bt(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Bt(e.data)}function It(e){if(e>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return e|0}function kt(e){return+e!=e&&(e=0),l.alloc(+e)}l.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==l.prototype},l.compare=function(e,r){if(ut(e,A)&&(e=l.from(e,e.offset,e.byteLength)),ut(r,A)&&(r=l.from(r,r.offset,r.byteLength)),!l.isBuffer(e)||!l.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,f=r.length;for(let h=0,p=Math.min(i,f);h<p;++h)if(e[h]!==r[h]){i=e[h],f=r[h];break}return i<f?-1:f<i?1:0},l.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}},l.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return l.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;const f=l.allocUnsafe(r);let h=0;for(i=0;i<e.length;++i){let p=e[i];if(ut(p,A))h+p.length>f.length?(l.isBuffer(p)||(p=l.from(p)),p.copy(f,h)):A.prototype.set.call(f,p,h);else if(l.isBuffer(p))p.copy(f,h);else throw new TypeError('"list" argument must be an Array of Buffers');h+=p.length}return f};function V(e,r){if(l.isBuffer(e))return e.length;if(U.isView(e)||ut(e,U))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const i=e.length,f=arguments.length>2&&arguments[2]===!0;if(!f&&i===0)return 0;let h=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return x(e).length;default:if(h)return f?-1:q(e).length;r=(""+r).toLowerCase(),h=!0}}l.byteLength=V;function tt(e,r,i){let f=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,r>>>=0,i<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return Lt(this,r,i);case"utf8":case"utf-8":return Ut(this,r,i);case"ascii":return Ft(this,r,i);case"latin1":case"binary":return zt(this,r,i);case"base64":return Dt(this,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,r,i);default:if(f)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),f=!0}}l.prototype._isBuffer=!0;function ft(e,r,i){const f=e[r];e[r]=e[i],e[i]=f}l.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)ft(this,r,r+1);return this},l.prototype.swap32=function(){const 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)ft(this,r,r+3),ft(this,r+1,r+2);return this},l.prototype.swap64=function(){const 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)ft(this,r,r+7),ft(this,r+1,r+6),ft(this,r+2,r+5),ft(this,r+3,r+4);return this},l.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?Ut(this,0,e):tt.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:l.compare(this,e)===0},l.prototype.inspect=function(){let e="";const r=y.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},O&&(l.prototype[O]=l.prototype.inspect),l.prototype.compare=function(e,r,i,f,h){if(ut(e,A)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),f===void 0&&(f=0),h===void 0&&(h=this.length),r<0||i>e.length||f<0||h>this.length)throw new RangeError("out of range index");if(f>=h&&r>=i)return 0;if(f>=h)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,f>>>=0,h>>>=0,this===e)return 0;let p=h-f,E=i-r;const F=Math.min(p,E),K=this.slice(f,h),z=e.slice(r,i);for(let D=0;D<F;++D)if(K[D]!==z[D]){p=K[D],E=z[D];break}return p<E?-1:E<p?1:0};function At(e,r,i,f,h){if(e.length===0)return-1;if(typeof i=="string"?(f=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,xt(i)&&(i=h?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(h)return-1;i=e.length-1}else if(i<0)if(h)i=0;else return-1;if(typeof r=="string"&&(r=l.from(r,f)),l.isBuffer(r))return r.length===0?-1:Tt(e,r,i,f,h);if(typeof r=="number")return r=r&255,typeof A.prototype.indexOf=="function"?h?A.prototype.indexOf.call(e,r,i):A.prototype.lastIndexOf.call(e,r,i):Tt(e,[r],i,f,h);throw new TypeError("val must be string, number or Buffer")}function Tt(e,r,i,f,h){let p=1,E=e.length,F=r.length;if(f!==void 0&&(f=String(f).toLowerCase(),f==="ucs2"||f==="ucs-2"||f==="utf16le"||f==="utf-16le")){if(e.length<2||r.length<2)return-1;p=2,E/=2,F/=2,i/=2}function K(D,W){return p===1?D[W]:D.readUInt16BE(W*p)}let z;if(h){let D=-1;for(z=i;z<E;z++)if(K(e,z)===K(r,D===-1?0:z-D)){if(D===-1&&(D=z),z-D+1===F)return D*p}else D!==-1&&(z-=z-D),D=-1}else for(i+F>E&&(i=E-F),z=i;z>=0;z--){let D=!0;for(let W=0;W<F;W++)if(K(e,z+W)!==K(r,W)){D=!1;break}if(D)return z}return-1}l.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1},l.prototype.indexOf=function(e,r,i){return At(this,e,r,i,!0)},l.prototype.lastIndexOf=function(e,r,i){return At(this,e,r,i,!1)};function St(e,r,i,f){i=Number(i)||0;const h=e.length-i;f?(f=Number(f),f>h&&(f=h)):f=h;const p=r.length;f>p/2&&(f=p/2);let E;for(E=0;E<f;++E){const F=parseInt(r.substr(E*2,2),16);if(xt(F))return E;e[i+E]=F}return E}function Nt(e,r,i,f){return Mt(q(r,e.length-i),e,i,f)}function pt(e,r,i,f){return Mt(k(r),e,i,f)}function Rt(e,r,i,f){return Mt(x(r),e,i,f)}function Ct(e,r,i,f){return Mt(P(r,e.length-i),e,i,f)}l.prototype.write=function(e,r,i,f){if(r===void 0)f="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")f=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,f===void 0&&(f="utf8")):(f=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const h=this.length-r;if((i===void 0||i>h)&&(i=h),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");let p=!1;for(;;)switch(f){case"hex":return St(this,e,r,i);case"utf8":case"utf-8":return Nt(this,e,r,i);case"ascii":case"latin1":case"binary":return pt(this,e,r,i);case"base64":return Rt(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ct(this,e,r,i);default:if(p)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),p=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Dt(e,r,i){return r===0&&i===e.length?d.fromByteArray(e):d.fromByteArray(e.slice(r,i))}function Ut(e,r,i){i=Math.min(e.length,i);const f=[];let h=r;for(;h<i;){const p=e[h];let E=null,F=p>239?4:p>223?3:p>191?2:1;if(h+F<=i){let K,z,D,W;switch(F){case 1:p<128&&(E=p);break;case 2:K=e[h+1],(K&192)===128&&(W=(p&31)<<6|K&63,W>127&&(E=W));break;case 3:K=e[h+1],z=e[h+2],(K&192)===128&&(z&192)===128&&(W=(p&15)<<12|(K&63)<<6|z&63,W>2047&&(W<55296||W>57343)&&(E=W));break;case 4:K=e[h+1],z=e[h+2],D=e[h+3],(K&192)===128&&(z&192)===128&&(D&192)===128&&(W=(p&15)<<18|(K&63)<<12|(z&63)<<6|D&63,W>65535&&W<1114112&&(E=W))}}E===null?(E=65533,F=1):E>65535&&(E-=65536,f.push(E>>>10&1023|55296),E=56320|E&1023),f.push(E),h+=F}return dt(f)}const ct=4096;function dt(e){const r=e.length;if(r<=ct)return String.fromCharCode.apply(String,e);let i="",f=0;for(;f<r;)i+=String.fromCharCode.apply(String,e.slice(f,f+=ct));return i}function Ft(e,r,i){let f="";i=Math.min(e.length,i);for(let h=r;h<i;++h)f+=String.fromCharCode(e[h]&127);return f}function zt(e,r,i){let f="";i=Math.min(e.length,i);for(let h=r;h<i;++h)f+=String.fromCharCode(e[h]);return f}function Lt(e,r,i){const f=e.length;(!r||r<0)&&(r=0),(!i||i<0||i>f)&&(i=f);let h="";for(let p=r;p<i;++p)h+=te[e[p]];return h}function Yt(e,r,i){const f=e.slice(r,i);let h="";for(let p=0;p<f.length-1;p+=2)h+=String.fromCharCode(f[p]+f[p+1]*256);return h}l.prototype.slice=function(e,r){const 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);const f=this.subarray(e,r);return Object.setPrototypeOf(f,l.prototype),f};function H(e,r,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>i)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||H(e,r,this.length);let f=this[e],h=1,p=0;for(;++p<r&&(h*=256);)f+=this[e+p]*h;return f},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||H(e,r,this.length);let f=this[e+--r],h=1;for(;r>0&&(h*=256);)f+=this[e+--r]*h;return f},l.prototype.readUint8=l.prototype.readUInt8=function(e,r){return e=e>>>0,r||H(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||H(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||H(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=yt(function(e){e=e>>>0,u(e,"offset");const r=this[e],i=this[e+7];(r===void 0||i===void 0)&&c(e,this.length-8);const f=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,h=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(f)+(BigInt(h)<<BigInt(32))}),l.prototype.readBigUInt64BE=yt(function(e){e=e>>>0,u(e,"offset");const r=this[e],i=this[e+7];(r===void 0||i===void 0)&&c(e,this.length-8);const f=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],h=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(f)<<BigInt(32))+BigInt(h)}),l.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||H(e,r,this.length);let f=this[e],h=1,p=0;for(;++p<r&&(h*=256);)f+=this[e+p]*h;return h*=128,f>=h&&(f-=Math.pow(2,8*r)),f},l.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||H(e,r,this.length);let f=r,h=1,p=this[e+--f];for(;f>0&&(h*=256);)p+=this[e+--f]*h;return h*=128,p>=h&&(p-=Math.pow(2,8*r)),p},l.prototype.readInt8=function(e,r){return e=e>>>0,r||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},l.prototype.readInt16LE=function(e,r){e=e>>>0,r||H(e,2,this.length);const i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},l.prototype.readInt16BE=function(e,r){e=e>>>0,r||H(e,2,this.length);const i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},l.prototype.readInt32LE=function(e,r){return e=e>>>0,r||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,r){return e=e>>>0,r||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=yt(function(e){e=e>>>0,u(e,"offset");const r=this[e],i=this[e+7];(r===void 0||i===void 0)&&c(e,this.length-8);const f=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(f)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),l.prototype.readBigInt64BE=yt(function(e){e=e>>>0,u(e,"offset");const r=this[e],i=this[e+7];(r===void 0||i===void 0)&&c(e,this.length-8);const f=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(f)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)}),l.prototype.readFloatLE=function(e,r){return e=e>>>0,r||H(e,4,this.length),R.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,r){return e=e>>>0,r||H(e,4,this.length),R.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||H(e,8,this.length),R.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||H(e,8,this.length),R.read(this,e,!1,52,8)};function Q(e,r,i,f,h,p){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>h||r<p)throw new RangeError('"value" argument is out of bounds');if(i+f>e.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,r,i,f){if(e=+e,r=r>>>0,i=i>>>0,!f){const E=Math.pow(2,8*i)-1;Q(this,e,r,i,E,0)}let h=1,p=0;for(this[r]=e&255;++p<i&&(h*=256);)this[r+p]=e/h&255;return r+i},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,r,i,f){if(e=+e,r=r>>>0,i=i>>>0,!f){const E=Math.pow(2,8*i)-1;Q(this,e,r,i,E,0)}let h=i-1,p=1;for(this[r+h]=e&255;--h>=0&&(p*=256);)this[r+h]=e/p&255;return r+i},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||Q(this,e,r,1,255,0),this[r]=e&255,r+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Q(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Q(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Q(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},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Q(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 bt(e,r,i,f,h){s(r,f,h,e,i,7);let p=Number(r&BigInt(4294967295));e[i++]=p,p=p>>8,e[i++]=p,p=p>>8,e[i++]=p,p=p>>8,e[i++]=p;let E=Number(r>>BigInt(32)&BigInt(4294967295));return e[i++]=E,E=E>>8,e[i++]=E,E=E>>8,e[i++]=E,E=E>>8,e[i++]=E,i}function nt(e,r,i,f,h){s(r,f,h,e,i,7);let p=Number(r&BigInt(4294967295));e[i+7]=p,p=p>>8,e[i+6]=p,p=p>>8,e[i+5]=p,p=p>>8,e[i+4]=p;let E=Number(r>>BigInt(32)&BigInt(4294967295));return e[i+3]=E,E=E>>8,e[i+2]=E,E=E>>8,e[i+1]=E,E=E>>8,e[i]=E,i+8}l.prototype.writeBigUInt64LE=yt(function(e,r=0){return bt(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=yt(function(e,r=0){return nt(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(e,r,i,f){if(e=+e,r=r>>>0,!f){const F=Math.pow(2,8*i-1);Q(this,e,r,i,F-1,-F)}let h=0,p=1,E=0;for(this[r]=e&255;++h<i&&(p*=256);)e<0&&E===0&&this[r+h-1]!==0&&(E=1),this[r+h]=(e/p>>0)-E&255;return r+i},l.prototype.writeIntBE=function(e,r,i,f){if(e=+e,r=r>>>0,!f){const F=Math.pow(2,8*i-1);Q(this,e,r,i,F-1,-F)}let h=i-1,p=1,E=0;for(this[r+h]=e&255;--h>=0&&(p*=256);)e<0&&E===0&&this[r+h+1]!==0&&(E=1),this[r+h]=(e/p>>0)-E&255;return r+i},l.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||Q(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1},l.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||Q(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2},l.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||Q(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2},l.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||Q(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},l.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||Q(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},l.prototype.writeBigInt64LE=yt(function(e,r=0){return bt(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=yt(function(e,r=0){return nt(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function mt(e,r,i,f,h,p){if(i+f>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function _t(e,r,i,f,h){return r=+r,i=i>>>0,h||mt(e,r,i,4),R.write(e,r,i,f,23,4),i+4}l.prototype.writeFloatLE=function(e,r,i){return _t(this,e,r,!0,i)},l.prototype.writeFloatBE=function(e,r,i){return _t(this,e,r,!1,i)};function st(e,r,i,f,h){return r=+r,i=i>>>0,h||mt(e,r,i,8),R.write(e,r,i,f,52,8),i+8}l.prototype.writeDoubleLE=function(e,r,i){return st(this,e,r,!0,i)},l.prototype.writeDoubleBE=function(e,r,i){return st(this,e,r,!1,i)},l.prototype.copy=function(e,r,i,f){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!f&&f!==0&&(f=this.length),r>=e.length&&(r=e.length),r||(r=0),f>0&&f<i&&(f=i),f===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(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),e.length-r<f-i&&(f=e.length-r+i);const h=f-i;return this===e&&typeof A.prototype.copyWithin=="function"?this.copyWithin(r,i,f):A.prototype.set.call(e,this.subarray(i,f),r),h},l.prototype.fill=function(e,r,i,f){if(typeof e=="string"){if(typeof r=="string"?(f=r,r=0,i=this.length):typeof i=="string"&&(f=i,i=this.length),f!==void 0&&typeof f!="string")throw new TypeError("encoding must be a string");if(typeof f=="string"&&!l.isEncoding(f))throw new TypeError("Unknown encoding: "+f);if(e.length===1){const p=e.charCodeAt(0);(f==="utf8"&&p<128||f==="latin1")&&(e=p)}}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 h;if(typeof e=="number")for(h=r;h<i;++h)this[h]=e;else{const p=l.isBuffer(e)?e:l.from(e,f),E=p.length;if(E===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(h=0;h<i-r;++h)this[h+r]=p[h%E]}return this};const gt={};function t(e,r,i){gt[e]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(f){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:f,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}t("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),t("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError),t("ERR_OUT_OF_RANGE",function(e,r,i){let f=`The value of "${e}" is out of range.`,h=i;return Number.isInteger(i)&&Math.abs(i)>2**32?h=n(String(i)):typeof i=="bigint"&&(h=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(h=n(h)),h+="n"),f+=` It must be ${r}. Received ${h}`,f},RangeError);function n(e){let r="",i=e.length;const f=e[0]==="-"?1:0;for(;i>=f+4;i-=3)r=`_${e.slice(i-3,i)}${r}`;return`${e.slice(0,i)}${r}`}function o(e,r,i){u(r,"offset"),(e[r]===void 0||e[r+i]===void 0)&&c(r,e.length-(i+1))}function s(e,r,i,f,h,p){if(e>i||e<r){const E=typeof r=="bigint"?"n":"";let F;throw r===0||r===BigInt(0)?F=`>= 0${E} and < 2${E} ** ${(p+1)*8}${E}`:F=`>= -(2${E} ** ${(p+1)*8-1}${E}) and < 2 ** ${(p+1)*8-1}${E}`,new gt.ERR_OUT_OF_RANGE("value",F,e)}o(f,h,p)}function u(e,r){if(typeof e!="number")throw new gt.ERR_INVALID_ARG_TYPE(r,"number",e)}function c(e,r,i){throw Math.floor(e)!==e?(u(e,i),new gt.ERR_OUT_OF_RANGE("offset","an integer",e)):r<0?new gt.ERR_BUFFER_OUT_OF_BOUNDS:new gt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${r}`,e)}const w=/[^+/0-9A-Za-z-_]/g;function j(e){if(e=e.split("=")[0],e=e.trim().replace(w,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function q(e,r){r=r||1/0;let i;const f=e.length;let h=null;const p=[];for(let E=0;E<f;++E){if(i=e.charCodeAt(E),i>55295&&i<57344){if(!h){if(i>56319){(r-=3)>-1&&p.push(239,191,189);continue}else if(E+1===f){(r-=3)>-1&&p.push(239,191,189);continue}h=i;continue}if(i<56320){(r-=3)>-1&&p.push(239,191,189),h=i;continue}i=(h-55296<<10|i-56320)+65536}else h&&(r-=3)>-1&&p.push(239,191,189);if(h=null,i<128){if((r-=1)<0)break;p.push(i)}else if(i<2048){if((r-=2)<0)break;p.push(i>>6|192,i&63|128)}else if(i<65536){if((r-=3)<0)break;p.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((r-=4)<0)break;p.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return p}function k(e){const r=[];for(let i=0;i<e.length;++i)r.push(e.charCodeAt(i)&255);return r}function P(e,r){let i,f,h;const p=[];for(let E=0;E<e.length&&!((r-=2)<0);++E)i=e.charCodeAt(E),f=i>>8,h=i%256,p.push(h),p.push(f);return p}function x(e){return d.toByteArray(j(e))}function Mt(e,r,i,f){let h;for(h=0;h<f&&!(h+i>=r.length||h>=e.length);++h)r[h+i]=e[h];return h}function ut(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function xt(e){return e!==e}const te=(function(){const e="0123456789abcdef",r=new Array(256);for(let i=0;i<16;++i){const f=i*16;for(let h=0;h<16;++h)r[f+h]=e[i]+e[h]}return r})();function yt(e){return typeof BigInt>"u"?ee:e}function ee(){throw new Error("BigInt not supported")}})(b);const g=b.Buffer;m.Blob=b.Blob,m.BlobOptions=b.BlobOptions,m.Buffer=b.Buffer,m.File=b.File,m.FileOptions=b.FileOptions,m.INSPECT_MAX_BYTES=b.INSPECT_MAX_BYTES,m.SlowBuffer=b.SlowBuffer,m.TranscodeEncoding=b.TranscodeEncoding,m.atob=b.atob,m.btoa=b.btoa,m.constants=b.constants,m.default=g,m.isAscii=b.isAscii,m.isUtf8=b.isUtf8,m.kMaxLength=b.kMaxLength,m.kStringMaxLength=b.kStringMaxLength,m.resolveObjectURL=b.resolveObjectURL,m.transcode=b.transcode})(Ht)),Ht}var Vt={},qt={exports:{}},Zt;function le(){return Zt||(Zt=1,(function(m,b){var L=ae(),T=L.Buffer;function I(B,N){for(var S in B)N[S]=B[S]}T.from&&T.alloc&&T.allocUnsafe&&T.allocUnsafeSlow?m.exports=L:(I(L,b),b.Buffer=v);function v(B,N,S){return T(B,N,S)}I(T,v),v.from=function(B,N,S){if(typeof B=="number")throw new TypeError("Argument must not be a number");return T(B,N,S)},v.alloc=function(B,N,S){if(typeof B!="number")throw new TypeError("Argument must be a number");var _=T(B);return N!==void 0?typeof S=="string"?_.fill(N,S):_.fill(N):_.fill(0),_},v.allocUnsafe=function(B){if(typeof B!="number")throw new TypeError("Argument must be a number");return T(B)},v.allocUnsafeSlow=function(B){if(typeof B!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(B)}})(qt,qt.exports)),qt.exports}var Jt;function ge(){if(Jt)return Vt;Jt=1;var m=le().Buffer,b=m.isEncoding||function(g){switch(g=""+g,g&&g.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 L(g){if(!g)return"utf8";for(var y;;)switch(g){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 g;default:if(y)return;g=(""+g).toLowerCase(),y=!0}}function T(g){var y=L(g);if(typeof y!="string"&&(m.isEncoding===b||!b(g)))throw new Error("Unknown encoding: "+g);return y||g}Vt.StringDecoder=I;function I(g){this.encoding=T(g);var y;switch(this.encoding){case"utf16le":this.text=M,this.end=G,y=4;break;case"utf8":this.fillLast=S,y=4;break;case"base64":this.text=X,this.end=ot,y=3;break;default:this.write=wt,this.end=at;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=m.allocUnsafe(y)}I.prototype.write=function(g){if(g.length===0)return"";var y,d;if(this.lastNeed){if(y=this.fillLast(g),y===void 0)return"";d=this.lastNeed,this.lastNeed=0}else d=0;return d<g.length?y?y+this.text(g,d):this.text(g,d):y||""},I.prototype.end=a,I.prototype.text=_,I.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function v(g){return g<=127?0:g>>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function B(g,y,d){var R=y.length-1;if(R<d)return 0;var O=v(y[R]);return O>=0?(O>0&&(g.lastNeed=O-1),O):--R<d||O===-2?0:(O=v(y[R]),O>=0?(O>0&&(g.lastNeed=O-2),O):--R<d||O===-2?0:(O=v(y[R]),O>=0?(O>0&&(O===2?O=0:g.lastNeed=O-3),O):0))}function N(g,y,d){if((y[0]&192)!==128)return g.lastNeed=0,"<22>";if(g.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return g.lastNeed=1,"<22>";if(g.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return g.lastNeed=2,"<22>"}}function S(g){var y=this.lastTotal-this.lastNeed,d=N(this,g);if(d!==void 0)return d;if(this.lastNeed<=g.length)return g.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,y,0,g.length),this.lastNeed-=g.length}function _(g,y){var d=B(this,g,y);if(!this.lastNeed)return g.toString("utf8",y);this.lastTotal=d;var R=g.length-(d-this.lastNeed);return g.copy(this.lastChar,0,R),g.toString("utf8",y,R)}function a(g){var y=g&&g.length?this.write(g):"";return this.lastNeed?y+"<22>":y}function M(g,y){if((g.length-y)%2===0){var d=g.toString("utf16le",y);if(d){var R=d.charCodeAt(d.length-1);if(R>=55296&&R<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],d.slice(0,-1)}return d}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",y,g.length-1)}function G(g){var y=g&&g.length?this.write(g):"";if(this.lastNeed){var d=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,d)}return y}function X(g,y){var d=(g.length-y)%3;return d===0?g.toString("base64",y):(this.lastNeed=3-d,this.lastTotal=3,d===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",y,g.length-d))}function ot(g){var y=g&&g.length?this.write(g):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function wt(g){return g.toString(this.encoding)}function at(g){return g&&g.length?this.write(g):""}return Vt}export{ce as B,ae as a,pe as d,ge as r};
|
||
//# sourceMappingURL=string_decoder-mL5xNZ9K.chunk.mjs.map
|