import{C as Nr,J as V,N as ht,a2 as ft,Q as st}from"./index.CP7CqW-Z.js";var F={},Y={};Y.byteLength=$r;Y.toByteArray=Or;Y.fromByteArray=jr;var C=[],R=[],kr=typeof Uint8Array<"u"?Uint8Array:Array,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var $=0,Dr=K.length;$<Dr;++$)C[$]=K[$],R[K.charCodeAt($)]=$;R[45]=62;R[95]=63;function pr(s){var f=s.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=s.indexOf("=");l===-1&&(l=f);var y=l===f?0:4-l%4;return[l,y]}function $r(s){var f=pr(s),l=f[0],y=f[1];return(l+y)*3/4-y}function Pr(s,f,l){return(f+l)*3/4-l}function Or(s){var f,l=pr(s),y=l[0],w=l[1],h=new kr(Pr(s,y,w)),p=0,x=w>0?y-4:y,B;for(B=0;B<x;B+=4)f=R[s.charCodeAt(B)]<<18|R[s.charCodeAt(B+1)]<<12|R[s.charCodeAt(B+2)]<<6|R[s.charCodeAt(B+3)],h[p++]=f>>16&255,h[p++]=f>>8&255,h[p++]=f&255;return w===2&&(f=R[s.charCodeAt(B)]<<2|R[s.charCodeAt(B+1)]>>4,h[p++]=f&255),w===1&&(f=R[s.charCodeAt(B)]<<10|R[s.charCodeAt(B+1)]<<4|R[s.charCodeAt(B+2)]>>2,h[p++]=f>>8&255,h[p++]=f&255),h}function Gr(s){return C[s>>18&63]+C[s>>12&63]+C[s>>6&63]+C[s&63]}function Yr(s,f,l){for(var y,w=[],h=f;h<l;h+=3)y=(s[h]<<16&16711680)+(s[h+1]<<8&65280)+(s[h+2]&255),w.push(Gr(y));return w.join("")}function jr(s){for(var f,l=s.length,y=l%3,w=[],h=16383,p=0,x=l-y;p<x;p+=h)w.push(Yr(s,p,p+h>x?x:p+h));return y===1?(f=s[l-1],w.push(C[f>>2]+C[f<<4&63]+"==")):y===2&&(f=(s[l-2]<<8)+s[l-1],w.push(C[f>>10]+C[f>>4&63]+C[f<<2&63]+"=")),w.join("")}var Q={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Q.read=function(s,f,l,y,w){var h,p,x=w*8-y-1,B=(1<<x)-1,E=B>>1,o=-7,U=l?w-1:0,S=l?-1:1,T=s[f+U];for(U+=S,h=T&(1<<-o)-1,T>>=-o,o+=x;o>0;h=h*256+s[f+U],U+=S,o-=8);for(p=h&(1<<-o)-1,h>>=-o,o+=y;o>0;p=p*256+s[f+U],U+=S,o-=8);if(h===0)h=1-E;else{if(h===B)return p?NaN:(T?-1:1)*(1/0);p=p+Math.pow(2,y),h=h-E}return(T?-1:1)*p*Math.pow(2,h-y)};Q.write=function(s,f,l,y,w,h){var p,x,B,E=h*8-w-1,o=(1<<E)-1,U=o>>1,S=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=y?0:h-1,M=y?1:-1,j=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(x=isNaN(f)?1:0,p=o):(p=Math.floor(Math.log(f)/Math.LN2),f*(B=Math.pow(2,-p))<1&&(p--,B*=2),p+U>=1?f+=S/B:f+=S*Math.pow(2,1-U),f*B>=2&&(p++,B/=2),p+U>=o?(x=0,p=o):p+U>=1?(x=(f*B-1)*Math.pow(2,w),p=p+U):(x=f*Math.pow(2,U-1)*Math.pow(2,w),p=0));w>=8;s[l+T]=x&255,T+=M,x/=256,w-=8);for(p=p<<w|x,E+=w;E>0;s[l+T]=p&255,T+=M,p/=256,E-=8);s[l+T-M]|=j*128};/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */(function(s){const f=Y,l=Q,y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;s.Buffer=o,s.SlowBuffer=wr,s.INSPECT_MAX_BYTES=50;const w=2147483647;s.kMaxLength=w;const{Uint8Array:h,ArrayBuffer:p,SharedArrayBuffer:x}=globalThis;o.TYPED_ARRAY_SUPPORT=B(),!o.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 B(){try{const n=new h(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,h.prototype),Object.setPrototypeOf(n,r),n.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function E(n){if(n>w)throw new RangeError('The value "'+n+'" is invalid for option "size"');const r=new h(n);return Object.setPrototypeOf(r,o.prototype),r}function o(n,r,t){if(typeof n=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return M(n)}return U(n,r,t)}o.poolSize=8192;function U(n,r,t){if(typeof n=="string")return j(n,r);if(p.isView(n))return lr(n);if(n==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(_(n,p)||n&&_(n.buffer,p)||typeof x<"u"&&(_(n,x)||n&&_(n.buffer,x)))return W(n,r,t);if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const i=n.valueOf&&n.valueOf();if(i!=null&&i!==n)return o.from(i,r,t);const e=ar(n);if(e)return e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof n[Symbol.toPrimitive]=="function")return o.from(n[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}o.from=function(n,r,t){return U(n,r,t)},Object.setPrototypeOf(o.prototype,h.prototype),Object.setPrototypeOf(o,h);function S(n){if(typeof n!="number")throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function T(n,r,t){return S(n),n<=0?E(n):r!==void 0?typeof t=="string"?E(n).fill(r,t):E(n).fill(r):E(n)}o.alloc=function(n,r,t){return T(n,r,t)};function M(n){return S(n),E(n<0?0:X(n)|0)}o.allocUnsafe=function(n){return M(n)},o.allocUnsafeSlow=function(n){return M(n)};function j(n,r){if((typeof r!="string"||r==="")&&(r="utf8"),!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const t=Z(n,r)|0;let i=E(t);const e=i.write(n,r);return e!==t&&(i=i.slice(0,e)),i}function q(n){const r=n.length<0?0:X(n.length)|0,t=E(r);for(let i=0;i<r;i+=1)t[i]=n[i]&255;return t}function lr(n){if(_(n,h)){const r=new h(n);return W(r.buffer,r.byteOffset,r.byteLength)}return q(n)}function W(n,r,t){if(r<0||n.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(n.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return r===void 0&&t===void 0?i=new h(n):t===void 0?i=new h(n,r):i=new h(n,r,t),Object.setPrototypeOf(i,o.prototype),i}function ar(n){if(o.isBuffer(n)){const r=X(n.length)|0,t=E(r);return t.length===0||n.copy(t,0,0,r),t}if(n.length!==void 0)return typeof n.length!="number"||J(n.length)?E(0):q(n);if(n.type==="Buffer"&&Array.isArray(n.data))return q(n.data)}function X(n){if(n>=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return n|0}function wr(n){return+n!=n&&(n=0),o.alloc(+n)}o.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==o.prototype},o.compare=function(r,t){if(_(r,h)&&(r=o.from(r,r.offset,r.byteLength)),_(t,h)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(r)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let i=r.length,e=t.length;for(let u=0,c=Math.min(i,e);u<c;++u)if(r[u]!==t[u]){i=r[u],e=t[u];break}return i<e?-1:e<i?1:0},o.isEncoding=function(r){switch(String(r).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}},o.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;const e=o.allocUnsafe(t);let u=0;for(i=0;i<r.length;++i){let c=r[i];if(_(c,h))u+c.length>e.length?(o.isBuffer(c)||(c=o.from(c)),c.copy(e,u)):h.prototype.set.call(e,c,u);else if(o.isBuffer(c))c.copy(e,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=c.length}return e};function Z(n,r){if(o.isBuffer(n))return n.length;if(p.isView(n)||_(n,p))return n.byteLength;if(typeof n!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);const t=n.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let e=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return H(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return sr(n).length;default:if(e)return i?-1:H(n).length;r=(""+r).toLowerCase(),e=!0}}o.byteLength=Z;function yr(n,r,t){let i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(n||(n="utf8");;)switch(n){case"hex":return Ur(this,r,t);case"utf8":case"utf-8":return tr(this,r,t);case"ascii":return Fr(this,r,t);case"latin1":case"binary":return Ar(this,r,t);case"base64":return mr(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return br(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),i=!0}}o.prototype._isBuffer=!0;function N(n,r,t){const i=n[r];n[r]=n[t],n[t]=i}o.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)N(this,t,t+1);return this},o.prototype.swap32=function(){const r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)N(this,t,t+3),N(this,t+1,t+2);return this},o.prototype.swap64=function(){const r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)N(this,t,t+7),N(this,t+1,t+6),N(this,t+2,t+5),N(this,t+3,t+4);return this},o.prototype.toString=function(){const r=this.length;return r===0?"":arguments.length===0?tr(this,0,r):yr.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(r){if(!o.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0},o.prototype.inspect=function(){let r="";const t=s.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},y&&(o.prototype[y]=o.prototype.inspect),o.prototype.compare=function(r,t,i,e,u){if(_(r,h)&&(r=o.from(r,r.offset,r.byteLength)),!o.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),e===void 0&&(e=0),u===void 0&&(u=this.length),t<0||i>r.length||e<0||u>this.length)throw new RangeError("out of range index");if(e>=u&&t>=i)return 0;if(e>=u)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,e>>>=0,u>>>=0,this===r)return 0;let c=u-e,a=i-t;const m=Math.min(c,a),g=this.slice(e,u),I=r.slice(t,i);for(let d=0;d<m;++d)if(g[d]!==I[d]){c=g[d],a=I[d];break}return c<a?-1:a<c?1:0};function v(n,r,t,i,e){if(n.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,J(t)&&(t=e?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(e)return-1;t=n.length-1}else if(t<0)if(e)t=0;else return-1;if(typeof r=="string"&&(r=o.from(r,i)),o.isBuffer(r))return r.length===0?-1:rr(n,r,t,i,e);if(typeof r=="number")return r=r&255,typeof h.prototype.indexOf=="function"?e?h.prototype.indexOf.call(n,r,t):h.prototype.lastIndexOf.call(n,r,t):rr(n,[r],t,i,e);throw new TypeError("val must be string, number or Buffer")}function rr(n,r,t,i,e){let u=1,c=n.length,a=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(n.length<2||r.length<2)return-1;u=2,c/=2,a/=2,t/=2}function m(I,d){return u===1?I[d]:I.readUInt16BE(d*u)}let g;if(e){let I=-1;for(g=t;g<c;g++)if(m(n,g)===m(r,I===-1?0:g-I)){if(I===-1&&(I=g),g-I+1===a)return I*u}else I!==-1&&(g-=g-I),I=-1}else for(t+a>c&&(t=c-a),g=t;g>=0;g--){let I=!0;for(let d=0;d<a;d++)if(m(n,g+d)!==m(r,d)){I=!1;break}if(I)return g}return-1}o.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1},o.prototype.indexOf=function(r,t,i){return v(this,r,t,i,!0)},o.prototype.lastIndexOf=function(r,t,i){return v(this,r,t,i,!1)};function xr(n,r,t,i){t=Number(t)||0;const e=n.length-t;i?(i=Number(i),i>e&&(i=e)):i=e;const u=r.length;i>u/2&&(i=u/2);let c;for(c=0;c<i;++c){const a=parseInt(r.substr(c*2,2),16);if(J(a))return c;n[t+c]=a}return c}function Br(n,r,t,i){return G(H(r,n.length-t),n,t,i)}function Er(n,r,t,i){return G(Cr(r),n,t,i)}function dr(n,r,t,i){return G(sr(r),n,t,i)}function gr(n,r,t,i){return G(Sr(r,n.length-t),n,t,i)}o.prototype.write=function(r,t,i,e){if(t===void 0)e="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")e=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,e===void 0&&(e="utf8")):(e=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-t;if((i===void 0||i>u)&&(i=u),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");let c=!1;for(;;)switch(e){case"hex":return xr(this,r,t,i);case"utf8":case"utf-8":return Br(this,r,t,i);case"ascii":case"latin1":case"binary":return Er(this,r,t,i);case"base64":return dr(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gr(this,r,t,i);default:if(c)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),c=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function mr(n,r,t){return r===0&&t===n.length?f.fromByteArray(n):f.fromByteArray(n.slice(r,t))}function tr(n,r,t){t=Math.min(n.length,t);const i=[];let e=r;for(;e<t;){const u=n[e];let c=null,a=u>239?4:u>223?3:u>191?2:1;if(e+a<=t){let m,g,I,d;switch(a){case 1:u<128&&(c=u);break;case 2:m=n[e+1],(m&192)===128&&(d=(u&31)<<6|m&63,d>127&&(c=d));break;case 3:m=n[e+1],g=n[e+2],(m&192)===128&&(g&192)===128&&(d=(u&15)<<12|(m&63)<<6|g&63,d>2047&&(d<55296||d>57343)&&(c=d));break;case 4:m=n[e+1],g=n[e+2],I=n[e+3],(m&192)===128&&(g&192)===128&&(I&192)===128&&(d=(u&15)<<18|(m&63)<<12|(g&63)<<6|I&63,d>65535&&d<1114112&&(c=d))}}c===null?(c=65533,a=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|c&1023),i.push(c),e+=a}return Ir(i)}const nr=4096;function Ir(n){const r=n.length;if(r<=nr)return String.fromCharCode.apply(String,n);let t="",i=0;for(;i<r;)t+=String.fromCharCode.apply(String,n.slice(i,i+=nr));return t}function Fr(n,r,t){let i="";t=Math.min(n.length,t);for(let e=r;e<t;++e)i+=String.fromCharCode(n[e]&127);return i}function Ar(n,r,t){let i="";t=Math.min(n.length,t);for(let e=r;e<t;++e)i+=String.fromCharCode(n[e]);return i}function Ur(n,r,t){const i=n.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);let e="";for(let u=r;u<t;++u)e+=Lr[n[u]];return e}function br(n,r,t){const i=n.slice(r,t);let e="";for(let u=0;u<i.length-1;u+=2)e+=String.fromCharCode(i[u]+i[u+1]*256);return e}o.prototype.slice=function(r,t){const i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);const e=this.subarray(r,t);return Object.setPrototypeOf(e,o.prototype),e};function A(n,r,t){if(n%1!==0||n<0)throw new RangeError("offset is not uint");if(n+r>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||A(r,t,this.length);let e=this[r],u=1,c=0;for(;++c<t&&(u*=256);)e+=this[r+c]*u;return e},o.prototype.readUintBE=o.prototype.readUIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||A(r,t,this.length);let e=this[r+--t],u=1;for(;t>0&&(u*=256);)e+=this[r+--t]*u;return e},o.prototype.readUint8=o.prototype.readUInt8=function(r,t){return r=r>>>0,t||A(r,1,this.length),this[r]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||A(r,2,this.length),this[r]|this[r+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||A(r,2,this.length),this[r]<<8|this[r+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||A(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||A(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},o.prototype.readBigUInt64LE=L(function(r){r=r>>>0,D(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&O(r,this.length-8);const e=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,u=this[++r]+this[++r]*2**8+this[++r]*2**16+i*2**24;return BigInt(e)+(BigInt(u)<<BigInt(32))}),o.prototype.readBigUInt64BE=L(function(r){r=r>>>0,D(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&O(r,this.length-8);const e=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],u=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i;return(BigInt(e)<<BigInt(32))+BigInt(u)}),o.prototype.readIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||A(r,t,this.length);let e=this[r],u=1,c=0;for(;++c<t&&(u*=256);)e+=this[r+c]*u;return u*=128,e>=u&&(e-=Math.pow(2,8*t)),e},o.prototype.readIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||A(r,t,this.length);let e=t,u=1,c=this[r+--e];for(;e>0&&(u*=256);)c+=this[r+--e]*u;return u*=128,c>=u&&(c-=Math.pow(2,8*t)),c},o.prototype.readInt8=function(r,t){return r=r>>>0,t||A(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},o.prototype.readInt16LE=function(r,t){r=r>>>0,t||A(r,2,this.length);const i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i},o.prototype.readInt16BE=function(r,t){r=r>>>0,t||A(r,2,this.length);const i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i},o.prototype.readInt32LE=function(r,t){return r=r>>>0,t||A(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},o.prototype.readInt32BE=function(r,t){return r=r>>>0,t||A(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},o.prototype.readBigInt64LE=L(function(r){r=r>>>0,D(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&O(r,this.length-8);const e=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(i<<24);return(BigInt(e)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),o.prototype.readBigInt64BE=L(function(r){r=r>>>0,D(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&O(r,this.length-8);const e=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(e)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i)}),o.prototype.readFloatLE=function(r,t){return r=r>>>0,t||A(r,4,this.length),l.read(this,r,!0,23,4)},o.prototype.readFloatBE=function(r,t){return r=r>>>0,t||A(r,4,this.length),l.read(this,r,!1,23,4)},o.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||A(r,8,this.length),l.read(this,r,!0,52,8)},o.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||A(r,8,this.length),l.read(this,r,!1,52,8)};function b(n,r,t,i,e,u){if(!o.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>e||r<u)throw new RangeError('"value" argument is out of bounds');if(t+i>n.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(r,t,i,e){if(r=+r,t=t>>>0,i=i>>>0,!e){const a=Math.pow(2,8*i)-1;b(this,r,t,i,a,0)}let u=1,c=0;for(this[t]=r&255;++c<i&&(u*=256);)this[t+c]=r/u&255;return t+i},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(r,t,i,e){if(r=+r,t=t>>>0,i=i>>>0,!e){const a=Math.pow(2,8*i)-1;b(this,r,t,i,a,0)}let u=i-1,c=1;for(this[t+u]=r&255;--u>=0&&(c*=256);)this[t+u]=r/c&255;return t+i},o.prototype.writeUint8=o.prototype.writeUInt8=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,1,255,0),this[t]=r&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function ir(n,r,t,i,e){fr(r,i,e,n,t,7);let u=Number(r&BigInt(4294967295));n[t++]=u,u=u>>8,n[t++]=u,u=u>>8,n[t++]=u,u=u>>8,n[t++]=u;let c=Number(r>>BigInt(32)&BigInt(4294967295));return n[t++]=c,c=c>>8,n[t++]=c,c=c>>8,n[t++]=c,c=c>>8,n[t++]=c,t}function er(n,r,t,i,e){fr(r,i,e,n,t,7);let u=Number(r&BigInt(4294967295));n[t+7]=u,u=u>>8,n[t+6]=u,u=u>>8,n[t+5]=u,u=u>>8,n[t+4]=u;let c=Number(r>>BigInt(32)&BigInt(4294967295));return n[t+3]=c,c=c>>8,n[t+2]=c,c=c>>8,n[t+1]=c,c=c>>8,n[t]=c,t+8}o.prototype.writeBigUInt64LE=L(function(r,t=0){return ir(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=L(function(r,t=0){return er(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(r,t,i,e){if(r=+r,t=t>>>0,!e){const m=Math.pow(2,8*i-1);b(this,r,t,i,m-1,-m)}let u=0,c=1,a=0;for(this[t]=r&255;++u<i&&(c*=256);)r<0&&a===0&&this[t+u-1]!==0&&(a=1),this[t+u]=(r/c>>0)-a&255;return t+i},o.prototype.writeIntBE=function(r,t,i,e){if(r=+r,t=t>>>0,!e){const m=Math.pow(2,8*i-1);b(this,r,t,i,m-1,-m)}let u=i-1,c=1,a=0;for(this[t+u]=r&255;--u>=0&&(c*=256);)r<0&&a===0&&this[t+u+1]!==0&&(a=1),this[t+u]=(r/c>>0)-a&255;return t+i},o.prototype.writeInt8=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},o.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},o.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||b(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},o.prototype.writeBigInt64LE=L(function(r,t=0){return ir(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=L(function(r,t=0){return er(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function or(n,r,t,i,e,u){if(t+i>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ur(n,r,t,i,e){return r=+r,t=t>>>0,e||or(n,r,t,4),l.write(n,r,t,i,23,4),t+4}o.prototype.writeFloatLE=function(r,t,i){return ur(this,r,t,!0,i)},o.prototype.writeFloatBE=function(r,t,i){return ur(this,r,t,!1,i)};function cr(n,r,t,i,e){return r=+r,t=t>>>0,e||or(n,r,t,8),l.write(n,r,t,i,52,8),t+8}o.prototype.writeDoubleLE=function(r,t,i){return cr(this,r,t,!0,i)},o.prototype.writeDoubleBE=function(r,t,i){return cr(this,r,t,!1,i)},o.prototype.copy=function(r,t,i,e){if(!o.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!e&&e!==0&&(e=this.length),t>=r.length&&(t=r.length),t||(t=0),e>0&&e<i&&(e=i),e===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),r.length-t<e-i&&(e=r.length-t+i);const u=e-i;return this===r&&typeof h.prototype.copyWithin=="function"?this.copyWithin(t,i,e):h.prototype.set.call(r,this.subarray(i,e),t),u},o.prototype.fill=function(r,t,i,e){if(typeof r=="string"){if(typeof t=="string"?(e=t,t=0,i=this.length):typeof i=="string"&&(e=i,i=this.length),e!==void 0&&typeof e!="string")throw new TypeError("encoding must be a string");if(typeof e=="string"&&!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);if(r.length===1){const c=r.charCodeAt(0);(e==="utf8"&&c<128||e==="latin1")&&(r=c)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);let u;if(typeof r=="number")for(u=t;u<i;++u)this[u]=r;else{const c=o.isBuffer(r)?r:o.from(r,e),a=c.length;if(a===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<i-t;++u)this[u+t]=c[u%a]}return this};const k={};function z(n,r,t){k[n]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${n}]`,this.stack,delete this.name}get code(){return n}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${n}]: ${this.message}`}}}z("ERR_BUFFER_OUT_OF_BOUNDS",function(n){return n?`${n} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),z("ERR_INVALID_ARG_TYPE",function(n,r){return`The "${n}" argument must be of type number. Received type ${typeof r}`},TypeError),z("ERR_OUT_OF_RANGE",function(n,r,t){let i=`The value of "${n}" is out of range.`,e=t;return Number.isInteger(t)&&Math.abs(t)>2**32?e=hr(String(t)):typeof t=="bigint"&&(e=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(e=hr(e)),e+="n"),i+=` It must be ${r}. Received ${e}`,i},RangeError);function hr(n){let r="",t=n.length;const i=n[0]==="-"?1:0;for(;t>=i+4;t-=3)r=`_${n.slice(t-3,t)}${r}`;return`${n.slice(0,t)}${r}`}function Tr(n,r,t){D(r,"offset"),(n[r]===void 0||n[r+t]===void 0)&&O(r,n.length-(t+1))}function fr(n,r,t,i,e,u){if(n>t||n<r){const c=typeof r=="bigint"?"n":"";let a;throw u>3?r===0||r===BigInt(0)?a=`>= 0${c} and < 2${c} ** ${(u+1)*8}${c}`:a=`>= -(2${c} ** ${(u+1)*8-1}${c}) and < 2 ** ${(u+1)*8-1}${c}`:a=`>= ${r}${c} and <= ${t}${c}`,new k.ERR_OUT_OF_RANGE("value",a,n)}Tr(i,e,u)}function D(n,r){if(typeof n!="number")throw new k.ERR_INVALID_ARG_TYPE(r,"number",n)}function O(n,r,t){throw Math.floor(n)!==n?(D(n,t),new k.ERR_OUT_OF_RANGE(t||"offset","an integer",n)):r<0?new k.ERR_BUFFER_OUT_OF_BOUNDS:new k.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,n)}const Rr=/[^+/0-9A-Za-z-_]/g;function _r(n){if(n=n.split("=")[0],n=n.trim().replace(Rr,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function H(n,r){r=r||1/0;let t;const i=n.length;let e=null;const u=[];for(let c=0;c<i;++c){if(t=n.charCodeAt(c),t>55295&&t<57344){if(!e){if(t>56319){(r-=3)>-1&&u.push(239,191,189);continue}else if(c+1===i){(r-=3)>-1&&u.push(239,191,189);continue}e=t;continue}if(t<56320){(r-=3)>-1&&u.push(239,191,189),e=t;continue}t=(e-55296<<10|t-56320)+65536}else e&&(r-=3)>-1&&u.push(239,191,189);if(e=null,t<128){if((r-=1)<0)break;u.push(t)}else if(t<2048){if((r-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}function Cr(n){const r=[];for(let t=0;t<n.length;++t)r.push(n.charCodeAt(t)&255);return r}function Sr(n,r){let t,i,e;const u=[];for(let c=0;c<n.length&&!((r-=2)<0);++c)t=n.charCodeAt(c),i=t>>8,e=t%256,u.push(e),u.push(i);return u}function sr(n){return f.toByteArray(_r(n))}function G(n,r,t,i){let e;for(e=0;e<i&&!(e+t>=r.length||e>=n.length);++e)r[e+t]=n[e];return e}function _(n,r){return n instanceof r||n!=null&&n.constructor!=null&&n.constructor.name!=null&&n.constructor.name===r.name}function J(n){return n!==n}const Lr=function(){const n="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){const i=t*16;for(let e=0;e<16;++e)r[i+e]=n[t]+n[e]}return r}();function L(n){return typeof BigInt>"u"?Mr:n}function Mr(){throw new Error("BigInt not supported")}})(F);const qr=F.Buffer,Wr=F.Blob,Xr=F.BlobOptions,zr=F.Buffer,Hr=F.File,Jr=F.FileOptions,Vr=F.INSPECT_MAX_BYTES,Kr=F.SlowBuffer,Qr=F.TranscodeEncoding,Zr=F.atob,vr=F.btoa,rt=F.constants,tt=F.isAscii,nt=F.isUtf8,it=F.kMaxLength,et=F.kStringMaxLength,ot=F.resolveObjectURL,ut=F.transcode,lt=Object.freeze(Object.defineProperty({__proto__:null,Blob:Wr,BlobOptions:Xr,Buffer:zr,File:Hr,FileOptions:Jr,INSPECT_MAX_BYTES:Vr,SlowBuffer:Kr,TranscodeEncoding:Qr,atob:Zr,btoa:vr,constants:rt,default:qr,isAscii:tt,isUtf8:nt,kMaxLength:it,kStringMaxLength:et,resolveObjectURL:ot,transcode:ut},Symbol.toStringTag,{value:"Module"})),P=[];function at(s,f=V){let l;const y=new Set;function w(x){if(Nr(s,x)&&(s=x,l)){const B=!P.length;for(const E of y)E[1](),P.push(E,s);if(B){for(let E=0;E<P.length;E+=2)P[E][0](P[E+1]);P.length=0}}}function h(x){w(x(s))}function p(x,B=V){const E=[x,B];return y.add(E),y.size===1&&(l=f(w,h)||V),x(s),()=>{y.delete(E),y.size===0&&l&&(l(),l=null)}}return{set:w,update:h,subscribe:p}}export{qr as B,lt as d,at as w};
