opentrader
Version:
OpenTrader is a powerful open-source crypto trading bot designated to automate your trading strategies on various cryptocurrency exchanges.
6 lines • 116 kB
JavaScript
import{b3 as Re,b0 as Z,b4 as gi,a$ as ze}from"./index-Du-vO1Hr.js";import{h as vi}from"./__vite-browser-external-v7f2oYTb.js";var Ye={},De={exports:{}},_t;function pt(){if(_t)return De.exports;_t=1;var o=typeof Reflect=="object"?Reflect:null,m=o&&typeof o.apply=="function"?o.apply:function(p,_,R){return Function.prototype.apply.call(p,_,R)},w;o&&typeof o.ownKeys=="function"?w=o.ownKeys:Object.getOwnPropertySymbols?w=function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:w=function(p){return Object.getOwnPropertyNames(p)};function A(s){console&&console.warn&&console.warn(s)}var M=Number.isNaN||function(p){return p!==p};function c(){c.init.call(this)}De.exports=c,De.exports.once=f,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var S=10;function u(s){if(typeof s!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof s)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return S},set:function(s){if(typeof s!="number"||s<0||M(s))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+s+".");S=s}}),c.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},c.prototype.setMaxListeners=function(p){if(typeof p!="number"||p<0||M(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this};function l(s){return s._maxListeners===void 0?c.defaultMaxListeners:s._maxListeners}c.prototype.getMaxListeners=function(){return l(this)},c.prototype.emit=function(p){for(var _=[],R=1;R<arguments.length;R++)_.push(arguments[R]);var x=p==="error",k=this._events;if(k!==void 0)x=x&&k.error===void 0;else if(!x)return!1;if(x){var V;if(_.length>0&&(V=_[0]),V instanceof Error)throw V;var J=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw J.context=V,J}var E=k[p];if(E===void 0)return!1;if(typeof E=="function")m(E,this,_);else for(var Q=E.length,re=G(E,Q),R=0;R<Q;++R)m(re[R],this,_);return!0};function O(s,p,_,R){var x,k,V;if(u(_),k=s._events,k===void 0?(k=s._events=Object.create(null),s._eventsCount=0):(k.newListener!==void 0&&(s.emit("newListener",p,_.listener?_.listener:_),k=s._events),V=k[p]),V===void 0)V=k[p]=_,++s._eventsCount;else if(typeof V=="function"?V=k[p]=R?[_,V]:[V,_]:R?V.unshift(_):V.push(_),x=l(s),x>0&&V.length>x&&!V.warned){V.warned=!0;var J=new Error("Possible EventEmitter memory leak detected. "+V.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");J.name="MaxListenersExceededWarning",J.emitter=s,J.type=p,J.count=V.length,A(J)}return s}c.prototype.addListener=function(p,_){return O(this,p,_,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(p,_){return O(this,p,_,!0)};function L(){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 I(s,p,_){var R={fired:!1,wrapFn:void 0,target:s,type:p,listener:_},x=L.bind(R);return x.listener=_,R.wrapFn=x,x}c.prototype.once=function(p,_){return u(_),this.on(p,I(this,p,_)),this},c.prototype.prependOnceListener=function(p,_){return u(_),this.prependListener(p,I(this,p,_)),this},c.prototype.removeListener=function(p,_){var R,x,k,V,J;if(u(_),x=this._events,x===void 0)return this;if(R=x[p],R===void 0)return this;if(R===_||R.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete x[p],x.removeListener&&this.emit("removeListener",p,R.listener||_));else if(typeof R!="function"){for(k=-1,V=R.length-1;V>=0;V--)if(R[V]===_||R[V].listener===_){J=R[V].listener,k=V;break}if(k<0)return this;k===0?R.shift():y(R,k),R.length===1&&(x[p]=R[0]),x.removeListener!==void 0&&this.emit("removeListener",p,J||_)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(p){var _,R,x;if(R=this._events,R===void 0)return this;if(R.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):R[p]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete R[p]),this;if(arguments.length===0){var k=Object.keys(R),V;for(x=0;x<k.length;++x)V=k[x],V!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=R[p],typeof _=="function")this.removeListener(p,_);else if(_!==void 0)for(x=_.length-1;x>=0;x--)this.removeListener(p,_[x]);return this};function P(s,p,_){var R=s._events;if(R===void 0)return[];var x=R[p];return x===void 0?[]:typeof x=="function"?_?[x.listener||x]:[x]:_?B(x):G(x,x.length)}c.prototype.listeners=function(p){return P(this,p,!0)},c.prototype.rawListeners=function(p){return P(this,p,!1)},c.listenerCount=function(s,p){return typeof s.listenerCount=="function"?s.listenerCount(p):q.call(s,p)},c.prototype.listenerCount=q;function q(s){var p=this._events;if(p!==void 0){var _=p[s];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?w(this._events):[]};function G(s,p){for(var _=new Array(p),R=0;R<p;++R)_[R]=s[R];return _}function y(s,p){for(;p+1<s.length;p++)s[p]=s[p+1];s.pop()}function B(s){for(var p=new Array(s.length),_=0;_<p.length;++_)p[_]=s[_].listener||s[_];return p}function f(s,p){return new Promise(function(_,R){function x(V){s.removeListener(p,k),R(V)}function k(){typeof s.removeListener=="function"&&s.removeListener("error",x),_([].slice.call(arguments))}d(s,p,k,{once:!0}),p!=="error"&&h(s,x,{once:!0})})}function h(s,p,_){typeof s.on=="function"&&d(s,"error",p,_)}function d(s,p,_,R){if(typeof s.on=="function")R.once?s.once(p,_):s.on(p,_);else if(typeof s.addEventListener=="function")s.addEventListener(p,function x(k){R.once&&s.removeEventListener(p,x),_(k)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof s)}return De.exports}var Ue={exports:{}},St;function Be(){return St||(St=1,typeof Object.create=="function"?Ue.exports=function(m,w){w&&(m.super_=w,m.prototype=Object.create(w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}))}:Ue.exports=function(m,w){if(w){m.super_=w;var A=function(){};A.prototype=w.prototype,m.prototype=new A,m.prototype.constructor=m}}),Ue.exports}var Je,At;function zn(){return At||(At=1,Je=pt().EventEmitter),Je}var Ke={},Rt;function ke(){return Rt||(Rt=1,function(o){Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var m={},w={};w.byteLength=L,w.toByteArray=P,w.fromByteArray=y;for(var A=[],M=[],c=typeof Uint8Array<"u"?Uint8Array:Array,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,l=S.length;u<l;++u)A[u]=S[u],M[S.charCodeAt(u)]=u;M[45]=62,M[95]=63;function O(h){var d=h.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=h.indexOf("=");s===-1&&(s=d);var p=s===d?0:4-s%4;return[s,p]}function L(h){var d=O(h),s=d[0],p=d[1];return(s+p)*3/4-p}function I(h,d,s){return(d+s)*3/4-s}function P(h){var d,s=O(h),p=s[0],_=s[1],R=new c(I(h,p,_)),x=0,k=_>0?p-4:p,V;for(V=0;V<k;V+=4)d=M[h.charCodeAt(V)]<<18|M[h.charCodeAt(V+1)]<<12|M[h.charCodeAt(V+2)]<<6|M[h.charCodeAt(V+3)],R[x++]=d>>16&255,R[x++]=d>>8&255,R[x++]=d&255;return _===2&&(d=M[h.charCodeAt(V)]<<2|M[h.charCodeAt(V+1)]>>4,R[x++]=d&255),_===1&&(d=M[h.charCodeAt(V)]<<10|M[h.charCodeAt(V+1)]<<4|M[h.charCodeAt(V+2)]>>2,R[x++]=d>>8&255,R[x++]=d&255),R}function q(h){return A[h>>18&63]+A[h>>12&63]+A[h>>6&63]+A[h&63]}function G(h,d,s){for(var p,_=[],R=d;R<s;R+=3)p=(h[R]<<16&16711680)+(h[R+1]<<8&65280)+(h[R+2]&255),_.push(q(p));return _.join("")}function y(h){for(var d,s=h.length,p=s%3,_=[],R=16383,x=0,k=s-p;x<k;x+=R)_.push(G(h,x,x+R>k?k:x+R));return p===1?(d=h[s-1],_.push(A[d>>2]+A[d<<4&63]+"==")):p===2&&(d=(h[s-2]<<8)+h[s-1],_.push(A[d>>10]+A[d>>4&63]+A[d<<2&63]+"=")),_.join("")}var B={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */B.read=function(h,d,s,p,_){var R,x,k=_*8-p-1,V=(1<<k)-1,J=V>>1,E=-7,Q=s?_-1:0,re=s?-1:1,ie=h[d+Q];for(Q+=re,R=ie&(1<<-E)-1,ie>>=-E,E+=k;E>0;R=R*256+h[d+Q],Q+=re,E-=8);for(x=R&(1<<-E)-1,R>>=-E,E+=p;E>0;x=x*256+h[d+Q],Q+=re,E-=8);if(R===0)R=1-J;else{if(R===V)return x?NaN:(ie?-1:1)*(1/0);x=x+Math.pow(2,p),R=R-J}return(ie?-1:1)*x*Math.pow(2,R-p)},B.write=function(h,d,s,p,_,R){var x,k,V,J=R*8-_-1,E=(1<<J)-1,Q=E>>1,re=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,ie=p?0:R-1,ue=p?1:-1,he=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(k=isNaN(d)?1:0,x=E):(x=Math.floor(Math.log(d)/Math.LN2),d*(V=Math.pow(2,-x))<1&&(x--,V*=2),x+Q>=1?d+=re/V:d+=re*Math.pow(2,1-Q),d*V>=2&&(x++,V/=2),x+Q>=E?(k=0,x=E):x+Q>=1?(k=(d*V-1)*Math.pow(2,_),x=x+Q):(k=d*Math.pow(2,Q-1)*Math.pow(2,_),x=0));_>=8;h[s+ie]=k&255,ie+=ue,k/=256,_-=8);for(x=x<<_|k,J+=_;J>0;h[s+ie]=x&255,ie+=ue,x/=256,J-=8);h[s+ie-ue]|=he*128};/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/(function(h){const d=w,s=B,p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;h.Buffer=E,h.SlowBuffer=T,h.INSPECT_MAX_BYTES=50;const _=2147483647;h.kMaxLength=_;const{Uint8Array:R,ArrayBuffer:x,SharedArrayBuffer:k}=globalThis;E.TYPED_ARRAY_SUPPORT=V(),!E.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 V(){try{const t=new R(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,R.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(E.prototype,"parent",{enumerable:!0,get:function(){if(E.isBuffer(this))return this.buffer}}),Object.defineProperty(E.prototype,"offset",{enumerable:!0,get:function(){if(E.isBuffer(this))return this.byteOffset}});function J(t){if(t>_)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new R(t);return Object.setPrototypeOf(e,E.prototype),e}function E(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ue(t)}return Q(t,e,r)}E.poolSize=8192;function Q(t,e,r){if(typeof t=="string")return he(t,e);if(x.isView(t))return pe(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(me(t,x)||t&&me(t.buffer,x)||typeof k<"u"&&(me(t,k)||t&&me(t.buffer,k)))return ae(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const a=t.valueOf&&t.valueOf();if(a!=null&&a!==t)return E.from(a,e,r);const v=ve(t);if(v)return v;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return E.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}E.from=function(t,e,r){return Q(t,e,r)},Object.setPrototypeOf(E.prototype,R.prototype),Object.setPrototypeOf(E,R);function re(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 ie(t,e,r){return re(t),t<=0?J(t):e!==void 0?typeof r=="string"?J(t).fill(e,r):J(t).fill(e):J(t)}E.alloc=function(t,e,r){return ie(t,e,r)};function ue(t){return re(t),J(t<0?0:de(t)|0)}E.allocUnsafe=function(t){return ue(t)},E.allocUnsafeSlow=function(t){return ue(t)};function he(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!E.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=N(t,e)|0;let a=J(r);const v=a.write(t,e);return v!==r&&(a=a.slice(0,v)),a}function ce(t){const e=t.length<0?0:de(t.length)|0,r=J(e);for(let a=0;a<e;a+=1)r[a]=t[a]&255;return r}function pe(t){if(me(t,R)){const e=new R(t);return ae(e.buffer,e.byteOffset,e.byteLength)}return ce(t)}function ae(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let a;return e===void 0&&r===void 0?a=new R(t):r===void 0?a=new R(t,e):a=new R(t,e,r),Object.setPrototypeOf(a,E.prototype),a}function ve(t){if(E.isBuffer(t)){const e=de(t.length)|0,r=J(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||Ve(t.length)?J(0):ce(t);if(t.type==="Buffer"&&Array.isArray(t.data))return ce(t.data)}function de(t){if(t>=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return t|0}function T(t){return+t!=t&&(t=0),E.alloc(+t)}E.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==E.prototype},E.compare=function(e,r){if(me(e,R)&&(e=E.from(e,e.offset,e.byteLength)),me(r,R)&&(r=E.from(r,r.offset,r.byteLength)),!E.isBuffer(e)||!E.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let a=e.length,v=r.length;for(let F=0,U=Math.min(a,v);F<U;++F)if(e[F]!==r[F]){a=e[F],v=r[F];break}return a<v?-1:v<a?1:0},E.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}},E.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return E.alloc(0);let a;if(r===void 0)for(r=0,a=0;a<e.length;++a)r+=e[a].length;const v=E.allocUnsafe(r);let F=0;for(a=0;a<e.length;++a){let U=e[a];if(me(U,R))F+U.length>v.length?(E.isBuffer(U)||(U=E.from(U)),U.copy(v,F)):R.prototype.set.call(v,U,F);else if(E.isBuffer(U))U.copy(v,F);else throw new TypeError('"list" argument must be an Array of Buffers');F+=U.length}return v};function N(t,e){if(E.isBuffer(t))return t.length;if(x.isView(t)||me(t,x))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 r=t.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&r===0)return 0;let v=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return He(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Et(t).length;default:if(v)return a?-1:He(t).length;e=(""+e).toLowerCase(),v=!0}}E.byteLength=N;function W(t,e,r){let a=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return be(this,e,r);case"utf8":case"utf-8":return K(this,e,r);case"ascii":return ye(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return z(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,e,r);default:if(a)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}E.prototype._isBuffer=!0;function g(t,e,r){const a=t[e];t[e]=t[r],t[r]=a}E.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)g(this,r,r+1);return this},E.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)g(this,r,r+3),g(this,r+1,r+2);return this},E.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)g(this,r,r+7),g(this,r+1,r+6),g(this,r+2,r+5),g(this,r+3,r+4);return this},E.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?K(this,0,e):W.apply(this,arguments)},E.prototype.toLocaleString=E.prototype.toString,E.prototype.equals=function(e){if(!E.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:E.compare(this,e)===0},E.prototype.inspect=function(){let e="";const r=h.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},p&&(E.prototype[p]=E.prototype.inspect),E.prototype.compare=function(e,r,a,v,F){if(me(e,R)&&(e=E.from(e,e.offset,e.byteLength)),!E.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),a===void 0&&(a=e?e.length:0),v===void 0&&(v=0),F===void 0&&(F=this.length),r<0||a>e.length||v<0||F>this.length)throw new RangeError("out of range index");if(v>=F&&r>=a)return 0;if(v>=F)return-1;if(r>=a)return 1;if(r>>>=0,a>>>=0,v>>>=0,F>>>=0,this===e)return 0;let U=F-v,X=a-r;const se=Math.min(U,X),oe=this.slice(v,F),le=e.slice(r,a);for(let te=0;te<se;++te)if(oe[te]!==le[te]){U=oe[te],X=le[te];break}return U<X?-1:X<U?1:0};function b(t,e,r,a,v){if(t.length===0)return-1;if(typeof r=="string"?(a=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Ve(r)&&(r=v?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(v)return-1;r=t.length-1}else if(r<0)if(v)r=0;else return-1;if(typeof e=="string"&&(e=E.from(e,a)),E.isBuffer(e))return e.length===0?-1:C(t,e,r,a,v);if(typeof e=="number")return e=e&255,typeof R.prototype.indexOf=="function"?v?R.prototype.indexOf.call(t,e,r):R.prototype.lastIndexOf.call(t,e,r):C(t,[e],r,a,v);throw new TypeError("val must be string, number or Buffer")}function C(t,e,r,a,v){let F=1,U=t.length,X=e.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(t.length<2||e.length<2)return-1;F=2,U/=2,X/=2,r/=2}function se(le,te){return F===1?le[te]:le.readUInt16BE(te*F)}let oe;if(v){let le=-1;for(oe=r;oe<U;oe++)if(se(t,oe)===se(e,le===-1?0:oe-le)){if(le===-1&&(le=oe),oe-le+1===X)return le*F}else le!==-1&&(oe-=oe-le),le=-1}else for(r+X>U&&(r=U-X),oe=r;oe>=0;oe--){let le=!0;for(let te=0;te<X;te++)if(se(t,oe+te)!==se(e,te)){le=!1;break}if(le)return oe}return-1}E.prototype.includes=function(e,r,a){return this.indexOf(e,r,a)!==-1},E.prototype.indexOf=function(e,r,a){return b(this,e,r,a,!0)},E.prototype.lastIndexOf=function(e,r,a){return b(this,e,r,a,!1)};function $(t,e,r,a){r=Number(r)||0;const v=t.length-r;a?(a=Number(a),a>v&&(a=v)):a=v;const F=e.length;a>F/2&&(a=F/2);let U;for(U=0;U<a;++U){const X=parseInt(e.substr(U*2,2),16);if(Ve(X))return U;t[r+U]=X}return U}function H(t,e,r,a){return Ne(He(e,t.length-r),t,r,a)}function n(t,e,r,a){return Ne(hi(e),t,r,a)}function i(t,e,r,a){return Ne(Et(e),t,r,a)}function j(t,e,r,a){return Ne(pi(e,t.length-r),t,r,a)}E.prototype.write=function(e,r,a,v){if(r===void 0)v="utf8",a=this.length,r=0;else if(a===void 0&&typeof r=="string")v=r,a=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(a)?(a=a>>>0,v===void 0&&(v="utf8")):(v=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const F=this.length-r;if((a===void 0||a>F)&&(a=F),e.length>0&&(a<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let U=!1;for(;;)switch(v){case"hex":return $(this,e,r,a);case"utf8":case"utf-8":return H(this,e,r,a);case"ascii":case"latin1":case"binary":return n(this,e,r,a);case"base64":return i(this,e,r,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,r,a);default:if(U)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),U=!0}},E.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(t,e,r){return e===0&&r===t.length?d.fromByteArray(t):d.fromByteArray(t.slice(e,r))}function K(t,e,r){r=Math.min(t.length,r);const a=[];let v=e;for(;v<r;){const F=t[v];let U=null,X=F>239?4:F>223?3:F>191?2:1;if(v+X<=r){let se,oe,le,te;switch(X){case 1:F<128&&(U=F);break;case 2:se=t[v+1],(se&192)===128&&(te=(F&31)<<6|se&63,te>127&&(U=te));break;case 3:se=t[v+1],oe=t[v+2],(se&192)===128&&(oe&192)===128&&(te=(F&15)<<12|(se&63)<<6|oe&63,te>2047&&(te<55296||te>57343)&&(U=te));break;case 4:se=t[v+1],oe=t[v+2],le=t[v+3],(se&192)===128&&(oe&192)===128&&(le&192)===128&&(te=(F&15)<<18|(se&63)<<12|(oe&63)<<6|le&63,te>65535&&te<1114112&&(U=te))}}U===null?(U=65533,X=1):U>65535&&(U-=65536,a.push(U>>>10&1023|55296),U=56320|U&1023),a.push(U),v+=X}return ee(a)}const Y=4096;function ee(t){const e=t.length;if(e<=Y)return String.fromCharCode.apply(String,t);let r="",a=0;for(;a<e;)r+=String.fromCharCode.apply(String,t.slice(a,a+=Y));return r}function ye(t,e,r){let a="";r=Math.min(t.length,r);for(let v=e;v<r;++v)a+=String.fromCharCode(t[v]&127);return a}function D(t,e,r){let a="";r=Math.min(t.length,r);for(let v=e;v<r;++v)a+=String.fromCharCode(t[v]);return a}function be(t,e,r){const a=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>a)&&(r=a);let v="";for(let F=e;F<r;++F)v+=di[t[F]];return v}function ge(t,e,r){const a=t.slice(e,r);let v="";for(let F=0;F<a.length-1;F+=2)v+=String.fromCharCode(a[F]+a[F+1]*256);return v}E.prototype.slice=function(e,r){const a=this.length;e=~~e,r=r===void 0?a:~~r,e<0?(e+=a,e<0&&(e=0)):e>a&&(e=a),r<0?(r+=a,r<0&&(r=0)):r>a&&(r=a),r<e&&(r=e);const v=this.subarray(e,r);return Object.setPrototypeOf(v,E.prototype),v};function ne(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}E.prototype.readUintLE=E.prototype.readUIntLE=function(e,r,a){e=e>>>0,r=r>>>0,a||ne(e,r,this.length);let v=this[e],F=1,U=0;for(;++U<r&&(F*=256);)v+=this[e+U]*F;return v},E.prototype.readUintBE=E.prototype.readUIntBE=function(e,r,a){e=e>>>0,r=r>>>0,a||ne(e,r,this.length);let v=this[e+--r],F=1;for(;r>0&&(F*=256);)v+=this[e+--r]*F;return v},E.prototype.readUint8=E.prototype.readUInt8=function(e,r){return e=e>>>0,r||ne(e,1,this.length),this[e]},E.prototype.readUint16LE=E.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||ne(e,2,this.length),this[e]|this[e+1]<<8},E.prototype.readUint16BE=E.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||ne(e,2,this.length),this[e]<<8|this[e+1]},E.prototype.readUint32LE=E.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||ne(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},E.prototype.readUint32BE=E.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||ne(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},E.prototype.readBigUInt64LE=Ae(function(e){e=e>>>0,Pe(e,"offset");const r=this[e],a=this[e+7];(r===void 0||a===void 0)&&Me(e,this.length-8);const v=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,F=this[++e]+this[++e]*2**8+this[++e]*2**16+a*2**24;return BigInt(v)+(BigInt(F)<<BigInt(32))}),E.prototype.readBigUInt64BE=Ae(function(e){e=e>>>0,Pe(e,"offset");const r=this[e],a=this[e+7];(r===void 0||a===void 0)&&Me(e,this.length-8);const v=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],F=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+a;return(BigInt(v)<<BigInt(32))+BigInt(F)}),E.prototype.readIntLE=function(e,r,a){e=e>>>0,r=r>>>0,a||ne(e,r,this.length);let v=this[e],F=1,U=0;for(;++U<r&&(F*=256);)v+=this[e+U]*F;return F*=128,v>=F&&(v-=Math.pow(2,8*r)),v},E.prototype.readIntBE=function(e,r,a){e=e>>>0,r=r>>>0,a||ne(e,r,this.length);let v=r,F=1,U=this[e+--v];for(;v>0&&(F*=256);)U+=this[e+--v]*F;return F*=128,U>=F&&(U-=Math.pow(2,8*r)),U},E.prototype.readInt8=function(e,r){return e=e>>>0,r||ne(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},E.prototype.readInt16LE=function(e,r){e=e>>>0,r||ne(e,2,this.length);const a=this[e]|this[e+1]<<8;return a&32768?a|4294901760:a},E.prototype.readInt16BE=function(e,r){e=e>>>0,r||ne(e,2,this.length);const a=this[e+1]|this[e]<<8;return a&32768?a|4294901760:a},E.prototype.readInt32LE=function(e,r){return e=e>>>0,r||ne(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},E.prototype.readInt32BE=function(e,r){return e=e>>>0,r||ne(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},E.prototype.readBigInt64LE=Ae(function(e){e=e>>>0,Pe(e,"offset");const r=this[e],a=this[e+7];(r===void 0||a===void 0)&&Me(e,this.length-8);const v=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(a<<24);return(BigInt(v)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),E.prototype.readBigInt64BE=Ae(function(e){e=e>>>0,Pe(e,"offset");const r=this[e],a=this[e+7];(r===void 0||a===void 0)&&Me(e,this.length-8);const v=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(v)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+a)}),E.prototype.readFloatLE=function(e,r){return e=e>>>0,r||ne(e,4,this.length),s.read(this,e,!0,23,4)},E.prototype.readFloatBE=function(e,r){return e=e>>>0,r||ne(e,4,this.length),s.read(this,e,!1,23,4)},E.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||ne(e,8,this.length),s.read(this,e,!0,52,8)},E.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||ne(e,8,this.length),s.read(this,e,!1,52,8)};function fe(t,e,r,a,v,F){if(!E.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>v||e<F)throw new RangeError('"value" argument is out of bounds');if(r+a>t.length)throw new RangeError("Index out of range")}E.prototype.writeUintLE=E.prototype.writeUIntLE=function(e,r,a,v){if(e=+e,r=r>>>0,a=a>>>0,!v){const X=Math.pow(2,8*a)-1;fe(this,e,r,a,X,0)}let F=1,U=0;for(this[r]=e&255;++U<a&&(F*=256);)this[r+U]=e/F&255;return r+a},E.prototype.writeUintBE=E.prototype.writeUIntBE=function(e,r,a,v){if(e=+e,r=r>>>0,a=a>>>0,!v){const X=Math.pow(2,8*a)-1;fe(this,e,r,a,X,0)}let F=a-1,U=1;for(this[r+F]=e&255;--F>=0&&(U*=256);)this[r+F]=e/U&255;return r+a},E.prototype.writeUint8=E.prototype.writeUInt8=function(e,r,a){return e=+e,r=r>>>0,a||fe(this,e,r,1,255,0),this[r]=e&255,r+1},E.prototype.writeUint16LE=E.prototype.writeUInt16LE=function(e,r,a){return e=+e,r=r>>>0,a||fe(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2},E.prototype.writeUint16BE=E.prototype.writeUInt16BE=function(e,r,a){return e=+e,r=r>>>0,a||fe(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2},E.prototype.writeUint32LE=E.prototype.writeUInt32LE=function(e,r,a){return e=+e,r=r>>>0,a||fe(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},E.prototype.writeUint32BE=E.prototype.writeUInt32BE=function(e,r,a){return e=+e,r=r>>>0,a||fe(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 we(t,e,r,a,v){mt(e,a,v,t,r,7);let F=Number(e&BigInt(4294967295));t[r++]=F,F=F>>8,t[r++]=F,F=F>>8,t[r++]=F,F=F>>8,t[r++]=F;let U=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=U,U=U>>8,t[r++]=U,U=U>>8,t[r++]=U,U=U>>8,t[r++]=U,r}function Te(t,e,r,a,v){mt(e,a,v,t,r,7);let F=Number(e&BigInt(4294967295));t[r+7]=F,F=F>>8,t[r+6]=F,F=F>>8,t[r+5]=F,F=F>>8,t[r+4]=F;let U=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=U,U=U>>8,t[r+2]=U,U=U>>8,t[r+1]=U,U=U>>8,t[r]=U,r+8}E.prototype.writeBigUInt64LE=Ae(function(e,r=0){return we(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))}),E.prototype.writeBigUInt64BE=Ae(function(e,r=0){return Te(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))}),E.prototype.writeIntLE=function(e,r,a,v){if(e=+e,r=r>>>0,!v){const se=Math.pow(2,8*a-1);fe(this,e,r,a,se-1,-se)}let F=0,U=1,X=0;for(this[r]=e&255;++F<a&&(U*=256);)e<0&&X===0&&this[r+F-1]!==0&&(X=1),this[r+F]=(e/U>>0)-X&255;return r+a},E.prototype.writeIntBE=function(e,r,a,v){if(e=+e,r=r>>>0,!v){const se=Math.pow(2,8*a-1);fe(this,e,r,a,se-1,-se)}let F=a-1,U=1,X=0;for(this[r+F]=e&255;--F>=0&&(U*=256);)e<0&&X===0&&this[r+F+1]!==0&&(X=1),this[r+F]=(e/U>>0)-X&255;return r+a},E.prototype.writeInt8=function(e,r,a){return e=+e,r=r>>>0,a||fe(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1},E.prototype.writeInt16LE=function(e,r,a){return e=+e,r=r>>>0,a||fe(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2},E.prototype.writeInt16BE=function(e,r,a){return e=+e,r=r>>>0,a||fe(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2},E.prototype.writeInt32LE=function(e,r,a){return e=+e,r=r>>>0,a||fe(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},E.prototype.writeInt32BE=function(e,r,a){return e=+e,r=r>>>0,a||fe(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},E.prototype.writeBigInt64LE=Ae(function(e,r=0){return we(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),E.prototype.writeBigInt64BE=Ae(function(e,r=0){return Te(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Se(t,e,r,a,v,F){if(r+a>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ee(t,e,r,a,v){return e=+e,r=r>>>0,v||Se(t,e,r,4),s.write(t,e,r,a,23,4),r+4}E.prototype.writeFloatLE=function(e,r,a){return Ee(this,e,r,!0,a)},E.prototype.writeFloatBE=function(e,r,a){return Ee(this,e,r,!1,a)};function _e(t,e,r,a,v){return e=+e,r=r>>>0,v||Se(t,e,r,8),s.write(t,e,r,a,52,8),r+8}E.prototype.writeDoubleLE=function(e,r,a){return _e(this,e,r,!0,a)},E.prototype.writeDoubleBE=function(e,r,a){return _e(this,e,r,!1,a)},E.prototype.copy=function(e,r,a,v){if(!E.isBuffer(e))throw new TypeError("argument should be a Buffer");if(a||(a=0),!v&&v!==0&&(v=this.length),r>=e.length&&(r=e.length),r||(r=0),v>0&&v<a&&(v=a),v===a||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),e.length-r<v-a&&(v=e.length-r+a);const F=v-a;return this===e&&typeof R.prototype.copyWithin=="function"?this.copyWithin(r,a,v):R.prototype.set.call(e,this.subarray(a,v),r),F},E.prototype.fill=function(e,r,a,v){if(typeof e=="string"){if(typeof r=="string"?(v=r,r=0,a=this.length):typeof a=="string"&&(v=a,a=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!E.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(e.length===1){const U=e.charCodeAt(0);(v==="utf8"&&U<128||v==="latin1")&&(e=U)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<a)throw new RangeError("Out of range index");if(a<=r)return this;r=r>>>0,a=a===void 0?this.length:a>>>0,e||(e=0);let F;if(typeof e=="number")for(F=r;F<a;++F)this[F]=e;else{const U=E.isBuffer(e)?e:E.from(e,v),X=U.length;if(X===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(F=0;F<a-r;++F)this[F+r]=U[F%X]}return this};const Oe={};function Ge(t,e,r){Oe[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(v){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:v,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}Ge("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ge("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),Ge("ERR_OUT_OF_RANGE",function(t,e,r){let a=`The value of "${t}" is out of range.`,v=r;return Number.isInteger(r)&&Math.abs(r)>2**32?v=wt(String(r)):typeof r=="bigint"&&(v=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(v=wt(v)),v+="n"),a+=` It must be ${e}. Received ${v}`,a},RangeError);function wt(t){let e="",r=t.length;const a=t[0]==="-"?1:0;for(;r>=a+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function si(t,e,r){Pe(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&Me(e,t.length-(r+1))}function mt(t,e,r,a,v,F){if(t>r||t<e){const U=typeof e=="bigint"?"n":"";let X;throw e===0||e===BigInt(0)?X=`>= 0${U} and < 2${U} ** ${(F+1)*8}${U}`:X=`>= -(2${U} ** ${(F+1)*8-1}${U}) and < 2 ** ${(F+1)*8-1}${U}`,new Oe.ERR_OUT_OF_RANGE("value",X,t)}si(a,v,F)}function Pe(t,e){if(typeof t!="number")throw new Oe.ERR_INVALID_ARG_TYPE(e,"number",t)}function Me(t,e,r){throw Math.floor(t)!==t?(Pe(t,r),new Oe.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new Oe.ERR_BUFFER_OUT_OF_BOUNDS:new Oe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}const li=/[^+/0-9A-Za-z-_]/g;function ci(t){if(t=t.split("=")[0],t=t.trim().replace(li,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function He(t,e){e=e||1/0;let r;const a=t.length;let v=null;const F=[];for(let U=0;U<a;++U){if(r=t.charCodeAt(U),r>55295&&r<57344){if(!v){if(r>56319){(e-=3)>-1&&F.push(239,191,189);continue}else if(U+1===a){(e-=3)>-1&&F.push(239,191,189);continue}v=r;continue}if(r<56320){(e-=3)>-1&&F.push(239,191,189),v=r;continue}r=(v-55296<<10|r-56320)+65536}else v&&(e-=3)>-1&&F.push(239,191,189);if(v=null,r<128){if((e-=1)<0)break;F.push(r)}else if(r<2048){if((e-=2)<0)break;F.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;F.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;F.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return F}function hi(t){const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function pi(t,e){let r,a,v;const F=[];for(let U=0;U<t.length&&!((e-=2)<0);++U)r=t.charCodeAt(U),a=r>>8,v=r%256,F.push(v),F.push(a);return F}function Et(t){return d.toByteArray(ci(t))}function Ne(t,e,r,a){let v;for(v=0;v<a&&!(v+r>=e.length||v>=t.length);++v)e[v+r]=t[v];return v}function me(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Ve(t){return t!==t}const di=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const a=r*16;for(let v=0;v<16;++v)e[a+v]=t[r]+t[v]}return e}();function Ae(t){return typeof BigInt>"u"?yi:t}function yi(){throw new Error("BigInt not supported")}})(m);const f=m.Buffer;o.Blob=m.Blob,o.BlobOptions=m.BlobOptions,o.Buffer=m.Buffer,o.File=m.File,o.FileOptions=m.FileOptions,o.INSPECT_MAX_BYTES=m.INSPECT_MAX_BYTES,o.SlowBuffer=m.SlowBuffer,o.TranscodeEncoding=m.TranscodeEncoding,o.atob=m.atob,o.btoa=m.btoa,o.constants=m.constants,o.default=f,o.isAscii=m.isAscii,o.isUtf8=m.isUtf8,o.kMaxLength=m.kMaxLength,o.kStringMaxLength=m.kStringMaxLength,o.resolveObjectURL=m.resolveObjectURL,o.transcode=m.transcode}(Ke)),Ke}var Xe={},Ze={},Qe,Bt;function Yn(){return Bt||(Bt=1,Qe=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var m={},w=Symbol("test"),A=Object(w);if(typeof w=="string"||Object.prototype.toString.call(w)!=="[object Symbol]"||Object.prototype.toString.call(A)!=="[object Symbol]")return!1;var M=42;m[w]=M;for(var c in m)return!1;if(typeof Object.keys=="function"&&Object.keys(m).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(m).length!==0)return!1;var S=Object.getOwnPropertySymbols(m);if(S.length!==1||S[0]!==w||!Object.prototype.propertyIsEnumerable.call(m,w))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(m,w);if(u.value!==M||u.enumerable!==!0)return!1}return!0}),Qe}var er,Tt;function We(){if(Tt)return er;Tt=1;var o=Yn();return er=function(){return o()&&!!Symbol.toStringTag},er}var rr,Ot;function Jn(){return Ot||(Ot=1,rr=Object),rr}var tr,Pt;function bi(){return Pt||(Pt=1,tr=Error),tr}var nr,It;function wi(){return It||(It=1,nr=EvalError),nr}var ir,Ft;function mi(){return Ft||(Ft=1,ir=RangeError),ir}var or,xt;function Ei(){return xt||(xt=1,or=ReferenceError),or}var ar,Mt;function Kn(){return Mt||(Mt=1,ar=SyntaxError),ar}var fr,Lt;function Le(){return Lt||(Lt=1,fr=TypeError),fr}var ur,jt;function _i(){return jt||(jt=1,ur=URIError),ur}var sr,Ct;function Si(){return Ct||(Ct=1,sr=Math.abs),sr}var lr,Nt;function Ai(){return Nt||(Nt=1,lr=Math.floor),lr}var cr,Dt;function Ri(){return Dt||(Dt=1,cr=Math.max),cr}var hr,Ut;function Bi(){return Ut||(Ut=1,hr=Math.min),hr}var pr,qt;function Ti(){return qt||(qt=1,pr=Math.pow),pr}var dr,kt;function Oi(){return kt||(kt=1,dr=Math.round),dr}var yr,Wt;function Pi(){return Wt||(Wt=1,yr=Number.isNaN||function(m){return m!==m}),yr}var gr,$t;function Ii(){if($t)return gr;$t=1;var o=Pi();return gr=function(w){return o(w)||w===0?w:w<0?-1:1},gr}var vr,Gt;function Fi(){return Gt||(Gt=1,vr=Object.getOwnPropertyDescriptor),vr}var br,Ht;function Fe(){if(Ht)return br;Ht=1;var o=Fi();if(o)try{o([],"length")}catch{o=null}return br=o,br}var wr,Vt;function $e(){if(Vt)return wr;Vt=1;var o=Object.defineProperty||!1;if(o)try{o({},"a",{value:1})}catch{o=!1}return wr=o,wr}var mr,zt;function xi(){if(zt)return mr;zt=1;var o=typeof Symbol<"u"&&Symbol,m=Yn();return mr=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:m()},mr}var Er,Yt;function Xn(){return Yt||(Yt=1,Er=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Er}var _r,Jt;function Zn(){if(Jt)return _r;Jt=1;var o=Jn();return _r=o.getPrototypeOf||null,_r}var Sr,Kt;function Mi(){if(Kt)return Sr;Kt=1;var o="Function.prototype.bind called on incompatible ",m=Object.prototype.toString,w=Math.max,A="[object Function]",M=function(l,O){for(var L=[],I=0;I<l.length;I+=1)L[I]=l[I];for(var P=0;P<O.length;P+=1)L[P+l.length]=O[P];return L},c=function(l,O){for(var L=[],I=O,P=0;I<l.length;I+=1,P+=1)L[P]=l[I];return L},S=function(u,l){for(var O="",L=0;L<u.length;L+=1)O+=u[L],L+1<u.length&&(O+=l);return O};return Sr=function(l){var O=this;if(typeof O!="function"||m.apply(O)!==A)throw new TypeError(o+O);for(var L=c(arguments,1),I,P=function(){if(this instanceof I){var f=O.apply(this,M(L,arguments));return Object(f)===f?f:this}return O.apply(l,M(L,arguments))},q=w(0,O.length-L.length),G=[],y=0;y<q;y++)G[y]="$"+y;if(I=Function("binder","return function ("+S(G,",")+"){ return binder.apply(this,arguments); }")(P),O.prototype){var B=function(){};B.prototype=O.prototype,I.prototype=new B,B.prototype=null}return I},Sr}var Ar,Xt;function je(){if(Xt)return Ar;Xt=1;var o=Mi();return Ar=Function.prototype.bind||o,Ar}var Rr,Zt;function dt(){return Zt||(Zt=1,Rr=Function.prototype.call),Rr}var Br,Qt;function yt(){return Qt||(Qt=1,Br=Function.prototype.apply),Br}var Tr,en;function Li(){return en||(en=1,Tr=typeof Reflect<"u"&&Reflect&&Reflect.apply),Tr}var Or,rn;function Qn(){if(rn)return Or;rn=1;var o=je(),m=yt(),w=dt(),A=Li();return Or=A||o.call(w,m),Or}var Pr,tn;function gt(){if(tn)return Pr;tn=1;var o=je(),m=Le(),w=dt(),A=Qn();return Pr=function(c){if(c.length<1||typeof c[0]!="function")throw new m("a function is required");return A(o,w,c)},Pr}var Ir,nn;function ji(){if(nn)return Ir;nn=1;var o=gt(),m=Fe(),w;try{w=[].__proto__===Array.prototype}catch(S){if(!S||typeof S!="object"||!("code"in S)||S.code!=="ERR_PROTO_ACCESS")throw S}var A=!!w&&m&&m(Object.prototype,"__proto__"),M=Object,c=M.getPrototypeOf;return Ir=A&&typeof A.get=="function"?o([A.get]):typeof c=="function"?function(u){return c(u==null?u:M(u))}:!1,Ir}var Fr,on;function ei(){if(on)return Fr;on=1;var o=Xn(),m=Zn(),w=ji();return Fr=o?function(M){return o(M)}:m?function(M){if(!M||typeof M!="object"&&typeof M!="function")throw new TypeError("getProto: not an object");return m(M)}:w?function(M){return w(M)}:null,Fr}var xr,an;function ri(){if(an)return xr;an=1;var o=Function.prototype.call,m=Object.prototype.hasOwnProperty,w=je();return xr=w.call(o,m),xr}var Mr,fn;function ti(){if(fn)return Mr;fn=1;var o,m=Jn(),w=bi(),A=wi(),M=mi(),c=Ei(),S=Kn(),u=Le(),l=_i(),O=Si(),L=Ai(),I=Ri(),P=Bi(),q=Ti(),G=Oi(),y=Ii(),B=Function,f=function($){try{return B('"use strict"; return ('+$+").constructor;")()}catch{}},h=Fe(),d=$e(),s=function(){throw new u},p=h?function(){try{return arguments.callee,s}catch{try{return h(arguments,"callee").get}catch{return s}}}():s,_=xi()(),R=ei(),x=Zn(),k=Xn(),V=yt(),J=dt(),E={},Q=typeof Uint8Array>"u"||!R?o:R(Uint8Array),re={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":_&&R?R([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":E,"%AsyncGenerator%":E,"%AsyncGeneratorFunction%":E,"%AsyncIteratorPrototype%":E,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":w,"%eval%":eval,"%EvalError%":A,"%Float16Array%":typeof Float16Array>"u"?o:Float16Array,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":B,"%GeneratorFunction%":E,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&R?R(R([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!R?o:R(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":m,"%Object.getOwnPropertyDescriptor%":h,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":M,"%ReferenceError%":c,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!R?o:R(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&R?R(""[Symbol.iterator]()):o,"%Symbol%":_?Symbol:o,"%SyntaxError%":S,"%ThrowTypeError%":p,"%TypedArray%":Q,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet,"%Function.prototype.call%":J,"%Function.prototype.apply%":V,"%Object.defineProperty%":d,"%Object.getPrototypeOf%":x,"%Math.abs%":O,"%Math.floor%":L,"%Math.max%":I,"%Math.min%":P,"%Math.pow%":q,"%Math.round%":G,"%Math.sign%":y,"%Reflect.getPrototypeOf%":k};if(R)try{null.error}catch($){var ie=R(R($));re["%Error.prototype%"]=ie}var ue=function $(H){var n;if(H==="%AsyncFunction%")n=f("async function () {}");else if(H==="%GeneratorFunction%")n=f("function* () {}");else if(H==="%AsyncGeneratorFunction%")n=f("async function* () {}");else if(H==="%AsyncGenerator%"){var i=$("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if(H==="%AsyncIteratorPrototype%"){var j=$("%AsyncGenerator%");j&&R&&(n=R(j.prototype))}return re[H]=n,n},he={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ce=je(),pe=ri(),ae=ce.call(J,Array.prototype.concat),ve=ce.call(V,Array.prototype.splice),de=ce.call(J,String.prototype.replace),T=ce.call(J,String.prototype.slice),N=ce.call(J,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,g=/\\(\\)?/g,b=function(H){var n=T(H,0,1),i=T(H,-1);if(n==="%"&&i!=="%")throw new S("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&n!=="%")throw new S("invalid intrinsic syntax, expected opening `%`");var j=[];return de(H,W,function(z,K,Y,ee){j[j.length]=Y?de(ee,g,"$1"):K||z}),j},C=function(H,n){var i=H,j;if(pe(he,i)&&(j=he[i],i="%"+j[0]+"%"),pe(re,i)){var z=re[i];if(z===E&&(z=ue(i)),typeof z>"u"&&!n)throw new u("intrinsic "+H+" exists, but is not available. Please file an issue!");return{alias:j,name:i,value:z}}throw new S("intrinsic "+H+" does not exist!")};return Mr=function(H,n){if(typeof H!="string"||H.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new u('"allowMissing" argument must be a boolean');if(N(/^%?[^%]*%?$/,H)===null)throw new S("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=b(H),j=i.length>0?i[0]:"",z=C("%"+j+"%",n),K=z.name,Y=z.value,ee=!1,ye=z.alias;ye&&(j=ye[0],ve(i,ae([0,1],ye)));for(var D=1,be=!0;D<i.length;D+=1){var ge=i[D],ne=T(ge,0,1),fe=T(ge,-1);if((ne==='"'||ne==="'"||ne==="`"||fe==='"'||fe==="'"||fe==="`")&&ne!==fe)throw new S("property names with quotes must have matching quotes");if((ge==="constructor"||!be)&&(ee=!0),j+="."+ge,K="%"+j+"%",pe(re,K))Y=re[K];else if(Y!=null){if(!(ge in Y)){if(!n)throw new u("base intrinsic for "+H+" exists, but the property is not available.");return}if(h&&D+1>=i.length){var we=h(Y,ge);be=!!we,be&&"get"in we&&!("originalValue"in we.get)?Y=we.get:Y=Y[ge]}else be=pe(Y,ge),Y=Y[ge];be&&!ee&&(re[K]=Y)}}return Y},Mr}var Lr,un;function Ce(){if(un)return Lr;un=1;var o=ti(),m=gt(),w=m([o("%String.prototype.indexOf%")]);return Lr=function(M,c){var S=o(M,!!c);return typeof S=="function"&&w(M,".prototype.")>-1?m([S]):S},Lr}var jr,sn;function Ci(){if(sn)return jr;sn=1;var o=We()(),m=Ce(),w=m("Object.prototype.toString"),A=function(u){return o&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:w(u)==="[object Arguments]"},M=function(u){return A(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&w(u)!=="[object Array]"&&"callee"in u&&w(u.callee)==="[object Function]"},c=function(){return A(arguments)}();return A.isLegacyArguments=M,jr=c?A:M,jr}var Cr,ln;function Ni(){if(ln)return Cr;ln=1;var o=Ce(),m=We()(),w=ri(),A=Fe(),M;if(m){var c=o("RegExp.prototype.exec"),S={},u=function(){throw S},l={toString:u,valueOf:u};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=u),M=function(P){if(!P||typeof P!="object")return!1;var q=A(P,"lastIndex"),G=q&&w(q,"value");if(!G)return!1;try{c(P,l)}catch(y){return y===S}}}else{var O=o("Object.prototype.toString"),L="[object RegExp]";M=function(P){return!P||typeof P!="object"&&typeof P!="function"?!1:O(P)===L}}return Cr=M,Cr}var Nr,cn;function Di(){if(cn)return Nr;cn=1;var o=Ce(),m=Ni(),w=o("RegExp.prototype.exec"),A=Le();return Nr=function(c){if(!m(c))throw new A("`regex` must be a RegExp");return function(u){return w(c,u)!==null}},Nr}var Dr,hn;function Ui(){if(hn)return Dr;hn=1;var o=Ce(),m=Di(),w=m(/^\s*(?:function)?\*/),A=We()(),M=ei(),c=o("Object.prototype.toString"),S=o("Function.prototype.toString"),u=function(){if(!A)return!1;try{return Function("return function*() {}")()}catch{}},l;return Dr=function(L){if(typeof L!="function")return!1;if(w(S(L)))return!0;if(!A){var I=c(L);return I==="[