ioredis-mock
Version:
This library emulates ioredis by performing all operations in-memory.
4 lines • 1.39 MB
JavaScript
var dJ=Object.create;var hv=Object.defineProperty;var pJ=Object.getOwnPropertyDescriptor;var mJ=Object.getOwnPropertyNames;var yJ=Object.getPrototypeOf,gJ=Object.prototype.hasOwnProperty;var Lp=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var K=(e,t)=>()=>(e&&(t=e(e=0)),t);var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yA=(e,t)=>{for(var r in t)hv(e,r,{get:t[r],enumerable:!0})},_J=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mJ(t))!gJ.call(e,i)&&i!==r&&hv(e,i,{get:()=>t[i],enumerable:!(n=pJ(t,i))||n.enumerable});return e};var mt=(e,t,r)=>(r=e!=null?dJ(yJ(e)):{},_J(t||!e||!e.__esModule?hv(r,"default",{value:e,enumerable:!0}):r,e));var _A=I(gA=>{b();(function(e,t){"use strict";if(e.setImmediate)return;var r=1,n={},i=!1,o=e.document,h;function g(H){typeof H!="function"&&(H=new Function(""+H));for(var D=new Array(arguments.length-1),Se=0;Se<D.length;Se++)D[Se]=arguments[Se+1];var De={callback:H,args:D};return n[r]=De,h(r),r++}function v(H){delete n[H]}function w(H){var D=H.callback,Se=H.args;switch(Se.length){case 0:D();break;case 1:D(Se[0]);break;case 2:D(Se[0],Se[1]);break;case 3:D(Se[0],Se[1],Se[2]);break;default:D.apply(t,Se);break}}function k(H){if(i)setTimeout(k,0,H);else{var D=n[H];if(D){i=!0;try{w(D)}finally{v(H),i=!1}}}}function A(){h=function(H){S(function(){k(H)})}}function R(){if(e.postMessage&&!e.importScripts){var H=!0,D=e.onmessage;return e.onmessage=function(){H=!1},e.postMessage("","*"),e.onmessage=D,H}}function O(){var H="setImmediate$"+Math.random()+"$",D=function(Se){Se.source===e&&typeof Se.data=="string"&&Se.data.indexOf(H)===0&&k(+Se.data.slice(H.length))};e.addEventListener?e.addEventListener("message",D,!1):e.attachEvent("onmessage",D),h=function(Se){e.postMessage(H+Se,"*")}}function B(){var H=new MessageChannel;H.port1.onmessage=function(D){var Se=D.data;k(Se)},h=function(D){H.port2.postMessage(D)}}function L(){var H=o.documentElement;h=function(D){var Se=o.createElement("script");Se.onreadystatechange=function(){k(D),Se.onreadystatechange=null,H.removeChild(Se),Se=null},H.appendChild(Se)}}function X(){h=function(H){setTimeout(k,0,H)}}var P=Object.getPrototypeOf&&Object.getPrototypeOf(e);P=P&&P.setTimeout?P:e,{}.toString.call(e.process)==="[object process]"?A():R()?O():e.MessageChannel?B():o&&"onreadystatechange"in o.createElement("script")?L():X(),P.setImmediate=g,P.clearImmediate=v})(typeof self>"u"?typeof window>"u"?gA:window:self)});var bA=I((XFe,vA)=>{b();vA.exports=T||bJ;var ou=window.performance||{},vJ=ou.now||ou.mozNow||ou.msNow||ou.oNow||ou.webkitNow||function(){return new Date().getTime()};function bJ(e){var t=vJ.call(ou)*.001,r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r=r-e[0],n=n-e[1],n<0&&(r--,n+=1e9)),[r,n]}});var kA=I(Gp=>{"use strict";b();Gp.byteLength=wJ;Gp.toByteArray=MJ;Gp.fromByteArray=SJ;var ys=[],wi=[],xJ=typeof Uint8Array<"u"?Uint8Array:Array,dv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(wl=0,xA=dv.length;wl<xA;++wl)ys[wl]=dv[wl],wi[dv.charCodeAt(wl)]=wl;var wl,xA;wi[45]=62;wi[95]=63;function wA(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function wJ(e){var t=wA(e),r=t[0],n=t[1];return(r+n)*3/4-n}function kJ(e,t,r){return(t+r)*3/4-r}function MJ(e){var t,r=wA(e),n=r[0],i=r[1],o=new xJ(kJ(e,n,i)),h=0,g=i>0?n-4:n,v;for(v=0;v<g;v+=4)t=wi[e.charCodeAt(v)]<<18|wi[e.charCodeAt(v+1)]<<12|wi[e.charCodeAt(v+2)]<<6|wi[e.charCodeAt(v+3)],o[h++]=t>>16&255,o[h++]=t>>8&255,o[h++]=t&255;return i===2&&(t=wi[e.charCodeAt(v)]<<2|wi[e.charCodeAt(v+1)]>>4,o[h++]=t&255),i===1&&(t=wi[e.charCodeAt(v)]<<10|wi[e.charCodeAt(v+1)]<<4|wi[e.charCodeAt(v+2)]>>2,o[h++]=t>>8&255,o[h++]=t&255),o}function AJ(e){return ys[e>>18&63]+ys[e>>12&63]+ys[e>>6&63]+ys[e&63]}function EJ(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(AJ(n));return i.join("")}function SJ(e){for(var t,r=e.length,n=r%3,i=[],o=16383,h=0,g=r-n;h<g;h+=o)i.push(EJ(e,h,h+o>g?g:h+o));return n===1?(t=e[r-1],i.push(ys[t>>2]+ys[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(ys[t>>10]+ys[t>>4&63]+ys[t<<2&63]+"=")),i.join("")}});var MA=I(pv=>{b();pv.read=function(e,t,r,n,i){var o,h,g=i*8-n-1,v=(1<<g)-1,w=v>>1,k=-7,A=r?i-1:0,R=r?-1:1,O=e[t+A];for(A+=R,o=O&(1<<-k)-1,O>>=-k,k+=g;k>0;o=o*256+e[t+A],A+=R,k-=8);for(h=o&(1<<-k)-1,o>>=-k,k+=n;k>0;h=h*256+e[t+A],A+=R,k-=8);if(o===0)o=1-w;else{if(o===v)return h?NaN:(O?-1:1)*(1/0);h=h+Math.pow(2,n),o=o-w}return(O?-1:1)*h*Math.pow(2,o-n)};pv.write=function(e,t,r,n,i,o){var h,g,v,w=o*8-i-1,k=(1<<w)-1,A=k>>1,R=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=n?0:o-1,B=n?1:-1,L=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(g=isNaN(t)?1:0,h=k):(h=Math.floor(Math.log(t)/Math.LN2),t*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+A>=1?t+=R/v:t+=R*Math.pow(2,1-A),t*v>=2&&(h++,v/=2),h+A>=k?(g=0,h=k):h+A>=1?(g=(t*v-1)*Math.pow(2,i),h=h+A):(g=t*Math.pow(2,A-1)*Math.pow(2,i),h=0));i>=8;e[r+O]=g&255,O+=B,g/=256,i-=8);for(h=h<<i|g,w+=i;w>0;e[r+O]=h&255,O+=B,h/=256,w-=8);e[r+O-B]|=L*128}});var ii=I(cu=>{"use strict";b();var mv=kA(),fu=MA(),AA=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;cu.Buffer=Te;cu.SlowBuffer=BJ;cu.INSPECT_MAX_BYTES=50;var Kp=2147483647;cu.kMaxLength=Kp;Te.TYPED_ARRAY_SUPPORT=TJ();!Te.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 TJ(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(Te.prototype,"parent",{enumerable:!0,get:function(){if(Te.isBuffer(this))return this.buffer}});Object.defineProperty(Te.prototype,"offset",{enumerable:!0,get:function(){if(Te.isBuffer(this))return this.byteOffset}});function oa(e){if(e>Kp)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Te.prototype),t}function Te(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return vv(e)}return RA(e,t,r)}Te.poolSize=8192;function RA(e,t,r){if(typeof e=="string")return OJ(e,t);if(ArrayBuffer.isView(e))return IJ(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(gs(e,ArrayBuffer)||e&&gs(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(gs(e,SharedArrayBuffer)||e&&gs(e.buffer,SharedArrayBuffer)))return gv(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Te.from(n,t,r);let i=NJ(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Te.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Te.from=function(e,t,r){return RA(e,t,r)};Object.setPrototypeOf(Te.prototype,Uint8Array.prototype);Object.setPrototypeOf(Te,Uint8Array);function OA(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 RJ(e,t,r){return OA(e),e<=0?oa(e):t!==void 0?typeof r=="string"?oa(e).fill(t,r):oa(e).fill(t):oa(e)}Te.alloc=function(e,t,r){return RJ(e,t,r)};function vv(e){return OA(e),oa(e<0?0:bv(e)|0)}Te.allocUnsafe=function(e){return vv(e)};Te.allocUnsafeSlow=function(e){return vv(e)};function OJ(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Te.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=IA(e,t)|0,n=oa(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function yv(e){let t=e.length<0?0:bv(e.length)|0,r=oa(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function IJ(e){if(gs(e,Uint8Array)){let t=new Uint8Array(e);return gv(t.buffer,t.byteOffset,t.byteLength)}return yv(e)}function gv(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,Te.prototype),n}function NJ(e){if(Te.isBuffer(e)){let t=bv(e.length)|0,r=oa(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||wv(e.length)?oa(0):yv(e);if(e.type==="Buffer"&&Array.isArray(e.data))return yv(e.data)}function bv(e){if(e>=Kp)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Kp.toString(16)+" bytes");return e|0}function BJ(e){return+e!=e&&(e=0),Te.alloc(+e)}Te.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Te.prototype};Te.compare=function(t,r){if(gs(t,Uint8Array)&&(t=Te.from(t,t.offset,t.byteLength)),gs(r,Uint8Array)&&(r=Te.from(r,r.offset,r.byteLength)),!Te.isBuffer(t)||!Te.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let o=0,h=Math.min(n,i);o<h;++o)if(t[o]!==r[o]){n=t[o],i=r[o];break}return n<i?-1:i<n?1:0};Te.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}};Te.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Te.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=Te.allocUnsafe(r),o=0;for(n=0;n<t.length;++n){let h=t[n];if(gs(h,Uint8Array))o+h.length>i.length?(Te.isBuffer(h)||(h=Te.from(h)),h.copy(i,o)):Uint8Array.prototype.set.call(i,h,o);else if(Te.isBuffer(h))h.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=h.length}return i};function IA(e,t){if(Te.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||gs(e,ArrayBuffer))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);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return _v(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return LA(e).length;default:if(i)return n?-1:_v(e).length;t=(""+t).toLowerCase(),i=!0}}Te.byteLength=IA;function CJ(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return zJ(this,t,r);case"utf8":case"utf-8":return BA(this,t,r);case"ascii":return KJ(this,t,r);case"latin1":case"binary":return HJ(this,t,r);case"base64":return LJ(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jJ(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Te.prototype._isBuffer=!0;function kl(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Te.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)kl(this,r,r+1);return this};Te.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)kl(this,r,r+3),kl(this,r+1,r+2);return this};Te.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)kl(this,r,r+7),kl(this,r+1,r+6),kl(this,r+2,r+5),kl(this,r+3,r+4);return this};Te.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?BA(this,0,t):CJ.apply(this,arguments)};Te.prototype.toLocaleString=Te.prototype.toString;Te.prototype.equals=function(t){if(!Te.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:Te.compare(this,t)===0};Te.prototype.inspect=function(){let t="",r=cu.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};AA&&(Te.prototype[AA]=Te.prototype.inspect);Te.prototype.compare=function(t,r,n,i,o){if(gs(t,Uint8Array)&&(t=Te.from(t,t.offset,t.byteLength)),!Te.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;let h=o-i,g=n-r,v=Math.min(h,g),w=this.slice(i,o),k=t.slice(r,n);for(let A=0;A<v;++A)if(w[A]!==k[A]){h=w[A],g=k[A];break}return h<g?-1:g<h?1:0};function NA(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,wv(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=Te.from(t,n)),Te.isBuffer(t))return t.length===0?-1:EA(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):EA(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function EA(e,t,r,n,i){let o=1,h=e.length,g=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,h/=2,g/=2,r/=2}function v(k,A){return o===1?k[A]:k.readUInt16BE(A*o)}let w;if(i){let k=-1;for(w=r;w<h;w++)if(v(e,w)===v(t,k===-1?0:w-k)){if(k===-1&&(k=w),w-k+1===g)return k*o}else k!==-1&&(w-=w-k),k=-1}else for(r+g>h&&(r=h-g),w=r;w>=0;w--){let k=!0;for(let A=0;A<g;A++)if(v(e,w+A)!==v(t,A)){k=!1;break}if(k)return w}return-1}Te.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};Te.prototype.indexOf=function(t,r,n){return NA(this,t,r,n,!0)};Te.prototype.lastIndexOf=function(t,r,n){return NA(this,t,r,n,!1)};function UJ(e,t,r,n){r=Number(r)||0;let i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let h;for(h=0;h<n;++h){let g=parseInt(t.substr(h*2,2),16);if(wv(g))return h;e[r+h]=g}return h}function DJ(e,t,r,n){return Hp(_v(t,e.length-r),e,r,n)}function PJ(e,t,r,n){return Hp($J(t),e,r,n)}function FJ(e,t,r,n){return Hp(LA(t),e,r,n)}function qJ(e,t,r,n){return Hp(YJ(t,e.length-r),e,r,n)}Te.prototype.write=function(t,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let h=!1;for(;;)switch(i){case"hex":return UJ(this,t,r,n);case"utf8":case"utf-8":return DJ(this,t,r,n);case"ascii":case"latin1":case"binary":return PJ(this,t,r,n);case"base64":return FJ(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qJ(this,t,r,n);default:if(h)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),h=!0}};Te.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function LJ(e,t,r){return t===0&&r===e.length?mv.fromByteArray(e):mv.fromByteArray(e.slice(t,r))}function BA(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let o=e[i],h=null,g=o>239?4:o>223?3:o>191?2:1;if(i+g<=r){let v,w,k,A;switch(g){case 1:o<128&&(h=o);break;case 2:v=e[i+1],(v&192)===128&&(A=(o&31)<<6|v&63,A>127&&(h=A));break;case 3:v=e[i+1],w=e[i+2],(v&192)===128&&(w&192)===128&&(A=(o&15)<<12|(v&63)<<6|w&63,A>2047&&(A<55296||A>57343)&&(h=A));break;case 4:v=e[i+1],w=e[i+2],k=e[i+3],(v&192)===128&&(w&192)===128&&(k&192)===128&&(A=(o&15)<<18|(v&63)<<12|(w&63)<<6|k&63,A>65535&&A<1114112&&(h=A))}}h===null?(h=65533,g=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|h&1023),n.push(h),i+=g}return GJ(n)}var SA=4096;function GJ(e){let t=e.length;if(t<=SA)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=SA));return r}function KJ(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function HJ(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function zJ(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let o=t;o<r;++o)i+=ZJ[e[o]];return i}function jJ(e,t,r){let n=e.slice(t,r),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}Te.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let i=this.subarray(t,r);return Object.setPrototypeOf(i,Te.prototype),i};function en(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}Te.prototype.readUintLE=Te.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||en(t,r,this.length);let i=this[t],o=1,h=0;for(;++h<r&&(o*=256);)i+=this[t+h]*o;return i};Te.prototype.readUintBE=Te.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||en(t,r,this.length);let i=this[t+--r],o=1;for(;r>0&&(o*=256);)i+=this[t+--r]*o;return i};Te.prototype.readUint8=Te.prototype.readUInt8=function(t,r){return t=t>>>0,r||en(t,1,this.length),this[t]};Te.prototype.readUint16LE=Te.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||en(t,2,this.length),this[t]|this[t+1]<<8};Te.prototype.readUint16BE=Te.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||en(t,2,this.length),this[t]<<8|this[t+1]};Te.prototype.readUint32LE=Te.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||en(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Te.prototype.readUint32BE=Te.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||en(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Te.prototype.readBigUInt64LE=mo(function(t){t=t>>>0,uu(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&D0(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,o=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<<BigInt(32))});Te.prototype.readBigUInt64BE=mo(function(t){t=t>>>0,uu(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&D0(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],o=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});Te.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||en(t,r,this.length);let i=this[t],o=1,h=0;for(;++h<r&&(o*=256);)i+=this[t+h]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};Te.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||en(t,r,this.length);let i=r,o=1,h=this[t+--i];for(;i>0&&(o*=256);)h+=this[t+--i]*o;return o*=128,h>=o&&(h-=Math.pow(2,8*r)),h};Te.prototype.readInt8=function(t,r){return t=t>>>0,r||en(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Te.prototype.readInt16LE=function(t,r){t=t>>>0,r||en(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Te.prototype.readInt16BE=function(t,r){t=t>>>0,r||en(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Te.prototype.readInt32LE=function(t,r){return t=t>>>0,r||en(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Te.prototype.readInt32BE=function(t,r){return t=t>>>0,r||en(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Te.prototype.readBigInt64LE=mo(function(t){t=t>>>0,uu(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&D0(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});Te.prototype.readBigInt64BE=mo(function(t){t=t>>>0,uu(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&D0(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});Te.prototype.readFloatLE=function(t,r){return t=t>>>0,r||en(t,4,this.length),fu.read(this,t,!0,23,4)};Te.prototype.readFloatBE=function(t,r){return t=t>>>0,r||en(t,4,this.length),fu.read(this,t,!1,23,4)};Te.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||en(t,8,this.length),fu.read(this,t,!0,52,8)};Te.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||en(t,8,this.length),fu.read(this,t,!1,52,8)};function zn(e,t,r,n,i,o){if(!Te.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}Te.prototype.writeUintLE=Te.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let g=Math.pow(2,8*n)-1;zn(this,t,r,n,g,0)}let o=1,h=0;for(this[r]=t&255;++h<n&&(o*=256);)this[r+h]=t/o&255;return r+n};Te.prototype.writeUintBE=Te.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let g=Math.pow(2,8*n)-1;zn(this,t,r,n,g,0)}let o=n-1,h=1;for(this[r+o]=t&255;--o>=0&&(h*=256);)this[r+o]=t/h&255;return r+n};Te.prototype.writeUint8=Te.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,1,255,0),this[r]=t&255,r+1};Te.prototype.writeUint16LE=Te.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Te.prototype.writeUint16BE=Te.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Te.prototype.writeUint32LE=Te.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Te.prototype.writeUint32BE=Te.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function CA(e,t,r,n,i){qA(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let h=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=h,h=h>>8,e[r++]=h,h=h>>8,e[r++]=h,h=h>>8,e[r++]=h,r}function UA(e,t,r,n,i){qA(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let h=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=h,h=h>>8,e[r+2]=h,h=h>>8,e[r+1]=h,h=h>>8,e[r]=h,r+8}Te.prototype.writeBigUInt64LE=mo(function(t,r=0){return CA(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Te.prototype.writeBigUInt64BE=mo(function(t,r=0){return UA(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Te.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let v=Math.pow(2,8*n-1);zn(this,t,r,n,v-1,-v)}let o=0,h=1,g=0;for(this[r]=t&255;++o<n&&(h*=256);)t<0&&g===0&&this[r+o-1]!==0&&(g=1),this[r+o]=(t/h>>0)-g&255;return r+n};Te.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let v=Math.pow(2,8*n-1);zn(this,t,r,n,v-1,-v)}let o=n-1,h=1,g=0;for(this[r+o]=t&255;--o>=0&&(h*=256);)t<0&&g===0&&this[r+o+1]!==0&&(g=1),this[r+o]=(t/h>>0)-g&255;return r+n};Te.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Te.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Te.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Te.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Te.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||zn(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Te.prototype.writeBigInt64LE=mo(function(t,r=0){return CA(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Te.prototype.writeBigInt64BE=mo(function(t,r=0){return UA(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function DA(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function PA(e,t,r,n,i){return t=+t,r=r>>>0,i||DA(e,t,r,4,34028234663852886e22,-34028234663852886e22),fu.write(e,t,r,n,23,4),r+4}Te.prototype.writeFloatLE=function(t,r,n){return PA(this,t,r,!0,n)};Te.prototype.writeFloatBE=function(t,r,n){return PA(this,t,r,!1,n)};function FA(e,t,r,n,i){return t=+t,r=r>>>0,i||DA(e,t,r,8,17976931348623157e292,-17976931348623157e292),fu.write(e,t,r,n,52,8),r+8}Te.prototype.writeDoubleLE=function(t,r,n){return FA(this,t,r,!0,n)};Te.prototype.writeDoubleBE=function(t,r,n){return FA(this,t,r,!1,n)};Te.prototype.copy=function(t,r,n,i){if(!Te.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);let o=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),o};Te.prototype.fill=function(t,r,n,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!Te.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){let h=t.charCodeAt(0);(i==="utf8"&&h<128||i==="latin1")&&(t=h)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let o;if(typeof t=="number")for(o=r;o<n;++o)this[o]=t;else{let h=Te.isBuffer(t)?t:Te.from(t,i),g=h.length;if(g===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=h[o%g]}return this};var lu={};function xv(e,t,r){lu[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}xv("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);xv("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);xv("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=TA(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=TA(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function TA(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function VJ(e,t,r){uu(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&D0(t,e.length-(r+1))}function qA(e,t,r,n,i,o){if(e>r||e<t){let h=typeof t=="bigint"?"n":"",g;throw o>3?t===0||t===BigInt(0)?g=`>= 0${h} and < 2${h} ** ${(o+1)*8}${h}`:g=`>= -(2${h} ** ${(o+1)*8-1}${h}) and < 2 ** ${(o+1)*8-1}${h}`:g=`>= ${t}${h} and <= ${r}${h}`,new lu.ERR_OUT_OF_RANGE("value",g,e)}VJ(n,i,o)}function uu(e,t){if(typeof e!="number")throw new lu.ERR_INVALID_ARG_TYPE(t,"number",e)}function D0(e,t,r){throw Math.floor(e)!==e?(uu(e,r),new lu.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new lu.ERR_BUFFER_OUT_OF_BOUNDS:new lu.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var WJ=/[^+/0-9A-Za-z-_]/g;function XJ(e){if(e=e.split("=")[0],e=e.trim().replace(WJ,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function _v(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let h=0;h<n;++h){if(r=e.charCodeAt(h),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(h+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=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 $J(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function YJ(e,t){let r,n,i,o=[];for(let h=0;h<e.length&&!((t-=2)<0);++h)r=e.charCodeAt(h),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function LA(e){return mv.toByteArray(XJ(e))}function Hp(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function gs(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function wv(e){return e!==e}var ZJ=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t})();function mo(e){return typeof BigInt>"u"?JJ:e}function JJ(){throw new Error("BigInt not supported")}});function S(e){Promise.resolve().then(()=>{e()})}var nqe,GA,KA,T,b=K(()=>{nqe=mt(_A()),GA=mt(bA()),KA=mt(ii());window.Buffer=KA.Buffer;T=GA.default});var la=I((sqe,kv)=>{"use strict";b();var hu=typeof Reflect=="object"?Reflect:null,HA=hu&&typeof hu.apply=="function"?hu.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},zp;hu&&typeof hu.ownKeys=="function"?zp=hu.ownKeys:Object.getOwnPropertySymbols?zp=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:zp=function(t){return Object.getOwnPropertyNames(t)};function QJ(e){console&&console.warn&&console.warn(e)}var jA=Number.isNaN||function(t){return t!==t};function kt(){kt.init.call(this)}kv.exports=kt;kv.exports.once=nQ;kt.EventEmitter=kt;kt.prototype._events=void 0;kt.prototype._eventsCount=0;kt.prototype._maxListeners=void 0;var zA=10;function jp(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(kt,"defaultMaxListeners",{enumerable:!0,get:function(){return zA},set:function(e){if(typeof e!="number"||e<0||jA(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");zA=e}});kt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};kt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||jA(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function VA(e){return e._maxListeners===void 0?kt.defaultMaxListeners:e._maxListeners}kt.prototype.getMaxListeners=function(){return VA(this)};kt.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var h;if(r.length>0&&(h=r[0]),h instanceof Error)throw h;var g=new Error("Unhandled error."+(h?" ("+h.message+")":""));throw g.context=h,g}var v=o[t];if(v===void 0)return!1;if(typeof v=="function")HA(v,this,r);else for(var w=v.length,k=ZA(v,w),n=0;n<w;++n)HA(k[n],this,r);return!0};function WA(e,t,r,n){var i,o,h;if(jp(r),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),h=o[t]),h===void 0)h=o[t]=r,++e._eventsCount;else if(typeof h=="function"?h=o[t]=n?[r,h]:[h,r]:n?h.unshift(r):h.push(r),i=VA(e),i>0&&h.length>i&&!h.warned){h.warned=!0;var g=new Error("Possible EventEmitter memory leak detected. "+h.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");g.name="MaxListenersExceededWarning",g.emitter=e,g.type=t,g.count=h.length,QJ(g)}return e}kt.prototype.addListener=function(t,r){return WA(this,t,r,!1)};kt.prototype.on=kt.prototype.addListener;kt.prototype.prependListener=function(t,r){return WA(this,t,r,!0)};function eQ(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function XA(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=eQ.bind(n);return i.listener=r,n.wrapFn=i,i}kt.prototype.once=function(t,r){return jp(r),this.on(t,XA(this,t,r)),this};kt.prototype.prependOnceListener=function(t,r){return jp(r),this.prependListener(t,XA(this,t,r)),this};kt.prototype.removeListener=function(t,r){var n,i,o,h,g;if(jp(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(o=-1,h=n.length-1;h>=0;h--)if(n[h]===r||n[h].listener===r){g=n[h].listener,o=h;break}if(o<0)return this;o===0?n.shift():tQ(n,o),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,g||r)}return this};kt.prototype.off=kt.prototype.removeListener;kt.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var o=Object.keys(n),h;for(i=0;i<o.length;++i)h=o[i],h!=="removeListener"&&this.removeAllListeners(h);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function $A(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?rQ(i):ZA(i,i.length)}kt.prototype.listeners=function(t){return $A(this,t,!0)};kt.prototype.rawListeners=function(t){return $A(this,t,!1)};kt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):YA.call(e,t)};kt.prototype.listenerCount=YA;function YA(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}kt.prototype.eventNames=function(){return this._eventsCount>0?zp(this._events):[]};function ZA(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function tQ(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function rQ(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function nQ(e,t){return new Promise(function(r,n){function i(h){e.removeListener(t,o),n(h)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),r([].slice.call(arguments))}JA(e,t,o,{once:!0}),t!=="error"&&iQ(e,i,{once:!0})})}function iQ(e,t,r){typeof e.on=="function"&&JA(e,"error",t,r)}function JA(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var QA=I((du,pu)=>{b();(function(e){var t=typeof du=="object"&&du&&!du.nodeType&&du,r=typeof pu=="object"&&pu&&!pu.nodeType&&pu,n=typeof window=="object"&&window;(n.global===n||n.window===n||n.self===n)&&(e=n);var i,o=2147483647,h=36,g=1,v=26,w=38,k=700,A=72,R=128,O="-",B=/^xn--/,L=/[^\x20-\x7E]/,X=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=h-g,D=Math.floor,Se=String.fromCharCode,De;function Ce(d){throw new RangeError(P[d])}function Ke(d,a){for(var p=d.length,M=[];p--;)M[p]=a(d[p]);return M}function j(d,a){var p=d.split("@"),M="";p.length>1&&(M=p[0]+"@",d=p[1]),d=d.replace(X,".");var x=d.split("."),E=Ke(x,a).join(".");return M+E}function Ne(d){for(var a=[],p=0,M=d.length,x,E;p<M;)x=d.charCodeAt(p++),x>=55296&&x<=56319&&p<M?(E=d.charCodeAt(p++),(E&64512)==56320?a.push(((x&1023)<<10)+(E&1023)+65536):(a.push(x),p--)):a.push(x);return a}function y(d){return Ke(d,function(a){var p="";return a>65535&&(a-=65536,p+=Se(a>>>10&1023|55296),a=56320|a&1023),p+=Se(a),p}).join("")}function s(d){return d-48<10?d-22:d-65<26?d-65:d-97<26?d-97:h}function l(d,a){return d+22+75*(d<26)-((a!=0)<<5)}function u(d,a,p){var M=0;for(d=p?D(d/k):d>>1,d+=D(d/a);d>H*v>>1;M+=h)d=D(d/H);return D(M+(H+1)*d/(d+w))}function f(d){var a=[],p=d.length,M,x=0,E=R,N=A,C,U,Re,F,q,ft,V,W,wt;for(C=d.lastIndexOf(O),C<0&&(C=0),U=0;U<C;++U)d.charCodeAt(U)>=128&&Ce("not-basic"),a.push(d.charCodeAt(U));for(Re=C>0?C+1:0;Re<p;){for(F=x,q=1,ft=h;Re>=p&&Ce("invalid-input"),V=s(d.charCodeAt(Re++)),(V>=h||V>D((o-x)/q))&&Ce("overflow"),x+=V*q,W=ft<=N?g:ft>=N+v?v:ft-N,!(V<W);ft+=h)wt=h-W,q>D(o/wt)&&Ce("overflow"),q*=wt;M=a.length+1,N=u(x-F,M,F==0),D(x/M)>o-E&&Ce("overflow"),E+=D(x/M),x%=M,a.splice(x++,0,E)}return y(a)}function c(d){var a,p,M,x,E,N,C,U,Re,F,q,ft=[],V,W,wt,$;for(d=Ne(d),V=d.length,a=R,p=0,E=A,N=0;N<V;++N)q=d[N],q<128&&ft.push(Se(q));for(M=x=ft.length,x&&ft.push(O);M<V;){for(C=o,N=0;N<V;++N)q=d[N],q>=a&&q<C&&(C=q);for(W=M+1,C-a>D((o-p)/W)&&Ce("overflow"),p+=(C-a)*W,a=C,N=0;N<V;++N)if(q=d[N],q<a&&++p>o&&Ce("overflow"),q==a){for(U=p,Re=h;F=Re<=E?g:Re>=E+v?v:Re-E,!(U<F);Re+=h)$=U-F,wt=h-F,ft.push(Se(l(F+$%wt,0))),U=D($/wt);ft.push(Se(l(U,0))),E=u(p,W,M==x),p=0,++M}++p,++a}return ft.join("")}function m(d){return j(d,function(a){return B.test(a)?f(a.slice(4).toLowerCase()):a})}function _(d){return j(d,function(a){return L.test(a)?"xn--"+c(a):a})}if(i={version:"1.4.1",ucs2:{decode:Ne,encode:y},decode:f,encode:c,toASCII:_,toUnicode:m},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(t&&r)if(pu.exports==t)r.exports=i;else for(De in i)i.hasOwnProperty(De)&&(t[De]=i[De]);else e.punycode=i})(du)});var _s=I((lqe,eE)=>{"use strict";b();eE.exports=TypeError});var tE=I(()=>{b()});var G0=I((dqe,xE)=>{b();var Bv=typeof Map=="function"&&Map.prototype,Mv=Object.getOwnPropertyDescriptor&&Bv?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Wp=Bv&&Mv&&typeof Mv.get=="function"?Mv.get:null,rE=Bv&&Map.prototype.forEach,Cv=typeof Set=="function"&&Set.prototype,Av=Object.getOwnPropertyDescriptor&&Cv?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xp=Cv&&Av&&typeof Av.get=="function"?Av.get:null,nE=Cv&&Set.prototype.forEach,sQ=typeof WeakMap=="function"&&WeakMap.prototype,F0=sQ?WeakMap.prototype.has:null,aQ=typeof WeakSet=="function"&&WeakSet.prototype,q0=aQ?WeakSet.prototype.has:null,oQ=typeof WeakRef=="function"&&WeakRef.prototype,iE=oQ?WeakRef.prototype.deref:null,lQ=Boolean.prototype.valueOf,fQ=Object.prototype.toString,uQ=Function.prototype.toString,cQ=String.prototype.match,Uv=String.prototype.slice,yo=String.prototype.replace,hQ=String.prototype.toUpperCase,sE=String.prototype.toLowerCase,pE=RegExp.prototype.test,aE=Array.prototype.concat,vs=Array.prototype.join,dQ=Array.prototype.slice,oE=Math.floor,Tv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ev=Object.getOwnPropertySymbols,Rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,mu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",L0=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===mu||!0)?Symbol.toStringTag:null,mE=Object.prototype.propertyIsEnumerable,lE=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function fE(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||pE.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-oE(-e):oE(e);if(n!==e){var i=String(n),o=Uv.call(t,i.length+1);return yo.call(i,r,"$&_")+"."+yo.call(yo.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return yo.call(t,r,"$&_")}var Ov=tE(),uE=Ov.custom,cE=_E(uE)?uE:null,yE={__proto__:null,double:'"',single:"'"},pQ={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};xE.exports=function e(t,r,n,i){var o=r||{};if(fa(o,"quoteStyle")&&!fa(yE,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fa(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var h=fa(o,"customInspect")?o.customInspect:!0;if(typeof h!="boolean"&&h!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fa(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fa(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return bE(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var v=String(t);return g?fE(t,v):v}if(typeof t=="bigint"){var w=String(t)+"n";return g?fE(t,w):w}var k=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=k&&k>0&&typeof t=="object")return Iv(t)?"[Array]":"[Object]";var A=NQ(o,n);if(typeof i>"u")i=[];else if(vE(i,t)>=0)return"[Circular]";function R(u,f,c){if(f&&(i=dQ.call(i),i.push(f)),c){var m={depth:o.depth};return fa(o,"quoteStyle")&&(m.quoteStyle=o.quoteStyle),e(u,m,n+1,i)}return e(u,o,n+1,i)}if(typeof t=="function"&&!hE(t)){var O=kQ(t),B=Vp(t,R);return"[Function"+(O?": "+O:" (anonymous)")+"]"+(B.length>0?" { "+vs.call(B,", ")+" }":"")}if(_E(t)){var L=mu?yo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Rv.call(t);return typeof t=="object"&&!mu?P0(L):L}if(RQ(t)){for(var X="<"+sE.call(String(t.nodeName)),P=t.attributes||[],H=0;H<P.length;H++)X+=" "+P[H].name+"="+gE(mQ(P[H].value),"double",o);return X+=">",t.childNodes&&t.childNodes.length&&(X+="..."),X+="</"+sE.call(String(t.nodeName))+">",X}if(Iv(t)){if(t.length===0)return"[]";var D=Vp(t,R);return A&&!IQ(D)?"["+Nv(D,A)+"]":"[ "+vs.call(D,", ")+" ]"}if(gQ(t)){var Se=Vp(t,R);return!("cause"in Error.prototype)&&"cause"in t&&!mE.call(t,"cause")?"{ ["+String(t)+"] "+vs.call(aE.call("[cause]: "+R(t.cause),Se),", ")+" }":Se.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+vs.call(Se,", ")+" }"}if(typeof t=="object"&&h){if(cE&&typeof t[cE]=="function"&&Ov)return Ov(t,{depth:k-n});if(h!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(MQ(t)){var De=[];return rE&&rE.call(t,function(u,f){De.push(R(f,t,!0)+" => "+R(u,t))}),dE("Map",Wp.call(t),De,A)}if(SQ(t)){var Ce=[];return nE&&nE.call(t,function(u){Ce.push(R(u,t))}),dE("Set",Xp.call(t),Ce,A)}if(AQ(t))return Sv("WeakMap");if(TQ(t))return Sv("WeakSet");if(EQ(t))return Sv("WeakRef");if(vQ(t))return P0(R(Number(t)));if(xQ(t))return P0(R(Tv.call(t)));if(bQ(t))return P0(lQ.call(t));if(_Q(t))return P0(R(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof window<"u"&&t===window)return"{ [object globalThis] }";if(!yQ(t)&&!hE(t)){var Ke=Vp(t,R),j=lE?lE(t)===Object.prototype:t instanceof Object||t.constructor===Object,Ne=t instanceof Object?"":"null prototype",y=!j&&L0&&Object(t)===t&&L0 in t?Uv.call(go(t),8,-1):Ne?"Object":"",s=j||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",l=s+(y||Ne?"["+vs.call(aE.call([],y||[],Ne||[]),": ")+"] ":"");return Ke.length===0?l+"{}":A?l+"{"+Nv(Ke,A)+"}":l+"{ "+vs.call(Ke,", ")+" }"}return String(t)};function gE(e,t,r){var n=r.quoteStyle||t,i=yE[n];return i+e+i}function mQ(e){return yo.call(String(e),/"/g,""")}function Ml(e){return!L0||!(typeof e=="object"&&(L0 in e||typeof e[L0]<"u"))}function Iv(e){return go(e)==="[object Array]"&&Ml(e)}function yQ(e){return go(e)==="[object Date]"&&Ml(e)}function hE(e){return go(e)==="[object RegExp]"&&Ml(e)}function gQ(e){return go(e)==="[object Error]"&&Ml(e)}function _Q(e){return go(e)==="[object String]"&&Ml(e)}function vQ(e){return go(e)==="[object Number]"&&Ml(e)}function bQ(e){return go(e)==="[object Boolean]"&&Ml(e)}function _E(e){if(mu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Rv)return!1;try{return Rv.call(e),!0}catch{}return!1}function xQ(e){if(!e||typeof e!="object"||!Tv)return!1;try{return Tv.call(e),!0}catch{}return!1}var wQ=Object.prototype.hasOwnProperty||function(e){return e in this};function fa(e,t){return wQ.call(e,t)}function go(e){return fQ.call(e)}function kQ(e){if(e.name)return e.name;var t=cQ.call(uQ.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function vE(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function MQ(e){if(!Wp||!e||typeof e!="object")return!1;try{Wp.call(e);try{Xp.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function AQ(e){if(!F0||!e||typeof e!="object")return!1;try{F0.call(e,F0);try{q0.call(e,q0)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function EQ(e){if(!iE||!e||typeof e!="object")return!1;try{return iE.call(e),!0}catch{}return!1}function SQ(e){if(!Xp||!e||typeof e!="object")return!1;try{Xp.call(e);try{Wp.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function TQ(e){if(!q0||!e||typeof e!="object")return!1;try{q0.call(e,q0);try{F0.call(e,F0)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function RQ(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function bE(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return bE(Uv.call(e,0,t.maxStringLength),t)+n}var i=pQ[t.quoteStyle||"single"];i.lastIndex=0;var o=yo.call(yo.call(e,i,"\\$1"),/[\x00-\x1f]/g,OQ);return gE(o,"single",t)}function OQ(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+hQ.call(t.toString(16))}function P0(e){return"Object("+e+")"}function Sv(e){return e+" { ? }"}function dE(e,t,r,n){var i=n?Nv(r,n):vs.call(r,", ");return e+" ("+t+") {"+i+"}"}function IQ(e){for(var t=0;t<e.length;t++)if(vE(e[t],`
`)>=0)return!1;return!0}function NQ(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=vs.call(Array(e.indent+1)," ");else return null;return{base:r,prev:vs.call(Array(t+1),r)}}function Nv(e,t){if(e.length===0)return"";var r=`
`+t.prev+t.base;return r+vs.call(e,","+r)+`
`+t.prev}function Vp(e,t){var r=Iv(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=fa(e,i)?t(e[i],e):""}var o=typeof Ev=="function"?Ev(e):[],h;if(mu){h={};for(var g=0;g<o.length;g++)h["$"+o[g]]=o[g]}for(var v in e)fa(e,v)&&(r&&String(Number(v))===v&&v<e.length||mu&&h["$"+v]instanceof Symbol||(pE.call(/[^\w$]/,v)?n.push(t(v,e)+": "+t(e[v],e)):n.push(v+": "+t(e[v],e))));if(typeof Ev=="function")for(var w=0;w<o.length;w++)mE.call(e,o[w])&&n.push("["+t(o[w])+"]: "+t(e[o[w]],e));return n}});var kE=I((mqe,wE)=>{"use strict";b();var BQ=G0(),CQ=_s(),$p=function(e,t,r){for(var n=e,i;(i=n.next)!=null;n=i)if(i.key===t)return n.next=i.next,r||(i.next=e.next,e.next=i),i},UQ=function(e,t){if(e){var r=$p(e,t);return r&&r.value}},DQ=function(e,t,r){var n=$p(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},PQ=function(e,t){return e?!!$p(e,t):!1},FQ=function(e,t){if(e)return $p(e,t,!0)};wE.exports=function(){var t,r={assert:function(n){if(!r.has(n))throw new CQ("Side channel does not contain "+BQ(n))},delete:function(n){var i=t&&t.next,o=FQ(t,n);return o&&i&&i===o&&(t=void 0),!!o},get:function(n){return UQ(t,n)},has:function(n){return PQ(t,n)},set:function(n,i){t||(t={next:void 0}),DQ(t,n,i)}};return r}});var Dv=I((gqe,ME)=>{"use strict";b();ME.exports=Object});var EE=I((vqe,AE)=>{"use strict";b();AE.ex