@ultrade/shared 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/common/index.js +1 -1
- package/dist/browser/common/mappers/index.js +1 -1
- package/dist/browser/common/mappers/trade.mapper.js +1 -1
- package/dist/browser/constants/index.js +1 -1
- package/dist/browser/enums/index.js +1 -1
- package/dist/browser/helpers/assert.helper.js +1 -1
- package/dist/browser/helpers/atomic.helper.js +1 -1
- package/dist/browser/helpers/balance.helper.js +1 -1
- package/dist/browser/helpers/codex/common.helper.js +2 -2
- package/dist/browser/helpers/codex/index.js +2 -2
- package/dist/browser/helpers/codex/mbr.helper.js +1 -1
- package/dist/browser/helpers/codex/mna.helper.js +1 -1
- package/dist/browser/helpers/codex/order.helper.js +1 -1
- package/dist/browser/helpers/codex/setGlobal.helper.js +1 -1
- package/dist/browser/helpers/codex/transfer.helper.js +2 -2
- package/dist/browser/helpers/codex/txn.helper.js +1 -1
- package/dist/browser/helpers/codex.helper.js +6 -6
- package/dist/browser/helpers/eth.helper.js +2 -2
- package/dist/browser/helpers/order.helper.js +1 -1
- package/dist/browser/helpers/pair.helper.js +1 -1
- package/dist/browser/helpers/withdraw.helper.js +2 -2
- package/dist/browser/interfaces/index.js +1 -1
- package/dist/constants/settings.d.ts +2 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/settings.enum.d.ts +37 -0
- package/dist/helpers/codex.helper.d.ts +2 -2
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/order.interface.d.ts +1 -1
- package/dist/interfaces/pair.interface.d.ts +13 -0
- package/dist/interfaces/settings.interface.d.ts +25 -0
- package/dist/node/common/index.js +1 -1
- package/dist/node/common/mappers/index.js +1 -1
- package/dist/node/common/mappers/trade.mapper.js +1 -1
- package/dist/node/constants/index.js +1 -1
- package/dist/node/enums/index.js +1 -1
- package/dist/node/helpers/assert.helper.js +1 -1
- package/dist/node/helpers/atomic.helper.js +1 -1
- package/dist/node/helpers/balance.helper.js +1 -1
- package/dist/node/helpers/codex/common.helper.js +2 -2
- package/dist/node/helpers/codex/index.js +2 -2
- package/dist/node/helpers/codex/mbr.helper.js +1 -1
- package/dist/node/helpers/codex/mna.helper.js +1 -1
- package/dist/node/helpers/codex/order.helper.js +1 -1
- package/dist/node/helpers/codex/setGlobal.helper.js +1 -1
- package/dist/node/helpers/codex/transfer.helper.js +2 -2
- package/dist/node/helpers/codex/txn.helper.js +1 -1
- package/dist/node/helpers/codex.helper.js +6 -6
- package/dist/node/helpers/eth.helper.js +2 -2
- package/dist/node/helpers/order.helper.js +1 -1
- package/dist/node/helpers/pair.helper.js +1 -1
- package/dist/node/helpers/withdraw.helper.js +2 -2
- package/dist/node/interfaces/index.js +1 -1
- package/package.json +27 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function H(){throw new Error("setTimeout has not been defined")}function K(){throw new Error("clearTimeout has not been defined")}var R=H,w=K;typeof globalThis.setTimeout=="function"&&(R=setTimeout);typeof globalThis.clearTimeout=="function"&&(w=clearTimeout);function V(t){if(R===setTimeout)return setTimeout(t,0);if((R===H||!R)&&setTimeout)return R=setTimeout,setTimeout(t,0);try{return R(t,0)}catch{try{return R.call(null,t,0)}catch{return R.call(this,t,0)}}}function Er(t){if(w===clearTimeout)return clearTimeout(t);if((w===K||!w)&&clearTimeout)return w=clearTimeout,clearTimeout(t);try{return w(t)}catch{try{return w.call(null,t)}catch{return w.call(this,t)}}}var A=[],O=!1,I,v=-1;function sr(){!O||!I||(O=!1,I.length?A=I.concat(A):v=-1,A.length&&X())}function X(){if(!O){var t=V(sr);O=!0;for(var r=A.length;r;){for(I=A,A=[];++v<r;)I&&I[v].run();v=-1,r=A.length}I=null,O=!1,Er(t)}}function pr(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];A.push(new q(t,r)),A.length===1&&!O&&V(X)}function q(t,r){this.fun=t,this.array=r}q.prototype.run=function(){this.fun.apply(null,this.array)};var hr="browser",Tr="browser",_r=!0,dr={},br=[],mr="",gr={},Ar={},xr={};function y(){}var Rr=y,wr=y,Ir=y,yr=y,Nr=y,Sr=y,Dr=y;function Or(t){throw new Error("process.binding is not supported")}function vr(){return"/"}function Cr(t){throw new Error("process.chdir is not supported")}function Pr(){return 0}var D=globalThis.performance||{},Lr=D.now||D.mozNow||D.msNow||D.oNow||D.webkitNow||function(){return new Date().getTime()};function Mr(t){var r=Lr.call(D)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}var Ur=new Date;function kr(){var t=new Date,r=t-Ur;return r/1e3}var h={nextTick:pr,title:hr,browser:_r,env:dr,argv:br,version:mr,versions:gr,on:Rr,addListener:wr,once:Ir,off:yr,removeListener:Nr,removeAllListeners:Sr,emit:Dr,binding:Or,cwd:vr,chdir:Cr,umask:Pr,hrtime:Mr,platform:Tr,release:Ar,config:xr,uptime:kr},W={};Object.keys(W).forEach(t=>{let r=t.split("."),e=h;for(let n=0;n<r.length;n++){let i=r[n];n===r.length-1?e[i]=W[t]:e=e[i]||(e[i]={})}});var m=[],d=[],Br=typeof Uint8Array<"u"?Uint8Array:Array,Y=!1;function z(){Y=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)m[r]=t[r],d[t.charCodeAt(r)]=r;d[45]=62,d[95]=63}function Yr(t){Y||z();var r,e,n,i,a,o,c=t.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[c-2]==="="?2:t[c-1]==="="?1:0,o=new Br(c*3/4-a),n=a>0?c-4:c;var l=0;for(r=0,e=0;r<n;r+=4,e+=3)i=d[t.charCodeAt(r)]<<18|d[t.charCodeAt(r+1)]<<12|d[t.charCodeAt(r+2)]<<6|d[t.charCodeAt(r+3)],o[l++]=i>>16&255,o[l++]=i>>8&255,o[l++]=i&255;return a===2?(i=d[t.charCodeAt(r)]<<2|d[t.charCodeAt(r+1)]>>4,o[l++]=i&255):a===1&&(i=d[t.charCodeAt(r)]<<10|d[t.charCodeAt(r+1)]<<4|d[t.charCodeAt(r+2)]>>2,o[l++]=i>>8&255,o[l++]=i&255),o}function Fr(t){return m[t>>18&63]+m[t>>12&63]+m[t>>6&63]+m[t&63]}function Gr(t,r,e){for(var n,i=[],a=r;a<e;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Fr(n));return i.join("")}function Q(t){Y||z();for(var r,e=t.length,n=e%3,i="",a=[],o=16383,c=0,l=e-n;c<l;c+=o)a.push(Gr(t,c,c+o>l?l:c+o));return n===1?(r=t[e-1],i+=m[r>>2],i+=m[r<<4&63],i+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],i+=m[r>>10],i+=m[r>>4&63],i+=m[r<<2&63],i+="="),a.push(i),a.join("")}u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function C(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function x(t,r){if(C()<r)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=u.prototype):(t===null&&(t=new u(r)),t.length=r),t}function u(t,r,e){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return F(this,t)}return Z(this,t,r,e)}u.poolSize=8192;u._augment=function(t){return t.__proto__=u.prototype,t};function Z(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?Kr(t,r,e,n):typeof r=="string"?Hr(t,r,e):Vr(t,r)}u.from=function(t,r,e){return Z(null,t,r,e)};u.kMaxLength=C();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&u[Symbol.species]);function j(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Wr(t,r,e,n){return j(r),r<=0?x(t,r):e!==void 0?typeof n=="string"?x(t,r).fill(e,n):x(t,r).fill(e):x(t,r)}u.alloc=function(t,r,e){return Wr(null,t,r,e)};function F(t,r){if(j(r),t=x(t,r<0?0:G(r)|0),!u.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}u.allocUnsafe=function(t){return F(null,t)};u.allocUnsafeSlow=function(t){return F(null,t)};function Hr(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=rr(r,e)|0;t=x(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function B(t,r){var e=r.length<0?0:G(r.length)|0;t=x(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function Kr(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),u.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=u.prototype):t=B(t,r),t}function Vr(t,r){if(g(r)){var e=G(r.length)|0;return t=x(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||fe(r.length)?x(t,0):B(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return B(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function G(t){if(t>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return t|0}u.isBuffer=Ee;function g(t){return!!(t!=null&&t._isBuffer)}u.compare=function(r,e){if(!g(r)||!g(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,a=0,o=Math.min(n,i);a<o;++a)if(r[a]!==e[a]){n=r[a],i=e[a];break}return n<i?-1:i<n?1:0};u.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};u.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return u.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=u.allocUnsafe(e),a=0;for(n=0;n<r.length;++n){var o=r[n];if(!g(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function rr(t,r){if(g(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return P(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return ur(t).length;default:if(n)return P(t).length;r=(""+r).toLowerCase(),n=!0}}u.byteLength=rr;function Xr(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return te(this,r,e);case"utf8":case"utf-8":return nr(this,r,e);case"ascii":return re(this,r,e);case"latin1":case"binary":return ee(this,r,e);case"base64":return Zr(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function N(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}u.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)N(this,e,e+1);return this};u.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)N(this,e,e+3),N(this,e+1,e+2);return this};u.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)N(this,e,e+7),N(this,e+1,e+6),N(this,e+2,e+5),N(this,e+3,e+4);return this};u.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?nr(this,0,r):Xr.apply(this,arguments)};u.prototype.equals=function(r){if(!g(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:u.compare(this,r)===0};u.prototype.compare=function(r,e,n,i,a){if(!g(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,a>>>=0,this===r)return 0;for(var o=a-i,c=n-e,l=Math.min(o,c),E=this.slice(i,a),s=r.slice(e,n),f=0;f<l;++f)if(E[f]!==s[f]){o=E[f],c=s[f];break}return o<c?-1:c<o?1:0};function er(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=u.from(r,n)),g(r))return r.length===0?-1:J(t,r,e,n,i);if(typeof r=="number")return r=r&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):J(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function J(t,r,e,n,i){var a=1,o=t.length,c=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;a=2,o/=2,c/=2,e/=2}function l(_,S){return a===1?_[S]:_.readUInt16BE(S*a)}var E;if(i){var s=-1;for(E=e;E<o;E++)if(l(t,E)===l(r,s===-1?0:E-s)){if(s===-1&&(s=E),E-s+1===c)return s*a}else s!==-1&&(E-=E-s),s=-1}else for(e+c>o&&(e=o-c),E=e;E>=0;E--){for(var f=!0,b=0;b<c;b++)if(l(t,E+b)!==l(r,b)){f=!1;break}if(f)return E}return-1}u.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};u.prototype.indexOf=function(r,e,n){return er(this,r,e,n,!0)};u.prototype.lastIndexOf=function(r,e,n){return er(this,r,e,n,!1)};function qr(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var a=r.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var c=parseInt(r.substr(o*2,2),16);if(isNaN(c))return o;t[e+o]=c}return o}function Qr(t,r,e,n){return U(P(r,t.length-e),t,e,n)}function tr(t,r,e,n){return U(ce(r),t,e,n)}function Jr(t,r,e,n){return tr(t,r,e,n)}function $r(t,r,e,n){return U(ur(r),t,e,n)}function zr(t,r,e,n){return U(le(r,t.length-e),t,e,n)}u.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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");var a=this.length-e;if((n===void 0||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return qr(this,r,e,n);case"utf8":case"utf-8":return Qr(this,r,e,n);case"ascii":return tr(this,r,e,n);case"latin1":case"binary":return Jr(this,r,e,n);case"base64":return $r(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zr(this,r,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Zr(t,r,e){return r===0&&e===t.length?Q(t):Q(t.slice(r,e))}function nr(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var a=t[i],o=null,c=a>239?4:a>223?3:a>191?2:1;if(i+c<=e){var l,E,s,f;switch(c){case 1:a<128&&(o=a);break;case 2:l=t[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=t[i+1],E=t[i+2],(l&192)===128&&(E&192)===128&&(f=(a&15)<<12|(l&63)<<6|E&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=t[i+1],E=t[i+2],s=t[i+3],(l&192)===128&&(E&192)===128&&(s&192)===128&&(f=(a&15)<<18|(l&63)<<12|(E&63)<<6|s&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,c=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=c}return jr(n)}var $=4096;function jr(t){var r=t.length;if(r<=$)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=$));return e}function re(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function ee(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function te(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",a=r;a<e;++a)i+=ue(t[a]);return i}function ne(t,r,e){for(var n=t.slice(r,e),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}u.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(u.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=u.prototype;else{var a=e-r;i=new u(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+r]}return i};function p(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return i};u.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i};u.prototype.readUInt8=function(r,e){return e||p(r,1,this.length),this[r]};u.prototype.readUInt16LE=function(r,e){return e||p(r,2,this.length),this[r]|this[r+1]<<8};u.prototype.readUInt16BE=function(r,e){return e||p(r,2,this.length),this[r]<<8|this[r+1]};u.prototype.readUInt32LE=function(r,e){return e||p(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};u.prototype.readUInt32BE=function(r,e){return e||p(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};u.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};u.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=e,a=1,o=this[r+--i];i>0&&(a*=256);)o+=this[r+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*e)),o};u.prototype.readInt8=function(r,e){return e||p(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};u.prototype.readInt16LE=function(r,e){e||p(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(r,e){e||p(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(r,e){return e||p(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};u.prototype.readInt32BE=function(r,e){return e||p(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};u.prototype.readFloatLE=function(r,e){return e||p(r,4,this.length),k(this,r,!0,23,4)};u.prototype.readFloatBE=function(r,e){return e||p(r,4,this.length),k(this,r,!1,23,4)};u.prototype.readDoubleLE=function(r,e){return e||p(r,8,this.length),k(this,r,!0,52,8)};u.prototype.readDoubleBE=function(r,e){return e||p(r,8,this.length),k(this,r,!1,52,8)};function T(t,r,e,n,i,a){if(!g(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<a)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;T(this,r,e,n,a,0)}var o=1,c=0;for(this[e]=r&255;++c<n&&(o*=256);)this[e+c]=r/o&255;return e+n};u.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;T(this,r,e,n,a,0)}var o=n-1,c=1;for(this[e+o]=r&255;--o>=0&&(c*=256);)this[e+o]=r/c&255;return e+n};u.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function L(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,a=Math.min(t.length-e,2);i<a;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}u.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):L(this,r,e,!0),e+2};u.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):L(this,r,e,!1),e+2};function M(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,a=Math.min(t.length-e,4);i<a;++i)t[e+i]=r>>>(n?i:3-i)*8&255}u.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):M(this,r,e,!0),e+4};u.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};u.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);T(this,r,e,n,a-1,-a)}var o=0,c=1,l=0;for(this[e]=r&255;++o<n&&(c*=256);)r<0&&l===0&&this[e+o-1]!==0&&(l=1),this[e+o]=(r/c>>0)-l&255;return e+n};u.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);T(this,r,e,n,a-1,-a)}var o=n-1,c=1,l=0;for(this[e+o]=r&255;--o>=0&&(c*=256);)r<0&&l===0&&this[e+o+1]!==0&&(l=1),this[e+o]=(r/c>>0)-l&255;return e+n};u.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};u.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):L(this,r,e,!0),e+2};u.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):L(this,r,e,!1),e+2};u.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):M(this,r,e,!0),e+4};u.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};function ir(t,r,e,n,i,a){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function ar(t,r,e,n,i){return i||ir(t,r,e,4,34028234663852886e22,-34028234663852886e22),lr(t,r,e,n,23,4),e+4}u.prototype.writeFloatLE=function(r,e,n){return ar(this,r,e,!0,n)};u.prototype.writeFloatBE=function(r,e,n){return ar(this,r,e,!1,n)};function or(t,r,e,n,i){return i||ir(t,r,e,8,17976931348623157e292,-17976931348623157e292),lr(t,r,e,n,52,8),e+8}u.prototype.writeDoubleLE=function(r,e,n){return or(this,r,e,!0,n)};u.prototype.writeDoubleBE=function(r,e,n){return or(this,r,e,!1,n)};u.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var a=i-n,o;if(this===r&&n<e&&e<i)for(o=a-1;o>=0;--o)r[o+e]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)r[o+e]=this[o+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+a),e);return a};u.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var a=r.charCodeAt(0);a<256&&(r=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var o;if(typeof r=="number")for(o=e;o<n;++o)this[o]=r;else{var c=g(r)?r:P(new u(r,i).toString()),l=c.length;for(o=0;o<n-e;++o)this[o+e]=c[o%l]}return this};var ie=/[^+\/0-9A-Za-z-_]/g;function ae(t){if(t=oe(t).replace(ie,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function oe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ue(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,r){r=r||1/0;for(var e,n=t.length,i=null,a=[],o=0;o<n;++o){if(e=t.charCodeAt(o),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(r-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function ce(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function le(t,r){for(var e,n,i,a=[],o=0;o<t.length&&!((r-=2)<0);++o)e=t.charCodeAt(o),n=e>>8,i=e%256,a.push(i),a.push(n);return a}function ur(t){return Yr(ae(t))}function U(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function fe(t){return t!==t}function Ee(t){return t!=null&&(!!t._isBuffer||cr(t)||se(t))}function cr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function se(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&cr(t.slice(0,0))}function k(t,r,e,n,i){var a,o,c=i*8-n-1,l=(1<<c)-1,E=l>>1,s=-7,f=e?i-1:0,b=e?-1:1,_=t[r+f];for(f+=b,a=_&(1<<-s)-1,_>>=-s,s+=c;s>0;a=a*256+t[r+f],f+=b,s-=8);for(o=a&(1<<-s)-1,a>>=-s,s+=n;s>0;o=o*256+t[r+f],f+=b,s-=8);if(a===0)a=1-E;else{if(a===l)return o?NaN:(_?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-E}return(_?-1:1)*o*Math.pow(2,a-n)}function lr(t,r,e,n,i,a){var o,c,l,E=a*8-i-1,s=(1<<E)-1,f=s>>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:a-1,S=n?1:-1,fr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,o=s):(o=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?r+=b/l:r+=b*Math.pow(2,1-f),r*l>=2&&(o++,l/=2),o+f>=s?(c=0,o=s):o+f>=1?(c=(r*l-1)*Math.pow(2,i),o=o+f):(c=r*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[e+_]=c&255,_+=S,c/=256,i-=8);for(o=o<<i|c,E+=i;E>0;t[e+_]=o&255,_+=S,o/=256,E-=8);t[e+_-S]|=fr*128}var me=864e5,ge=30;var we=18,Ie=1e5,ye=1e3,Ne=9e4,Se=30,De=60,Oe=328,ve=1,Ce=18,Pe=36,Le=248;var Be={"0x4343545055534443000000000000000000000000000000000000000000000000":65537};var We={SUCCESS:200,CREATED:201,ACCEPTED:202,NOCONTENT:204,BADREQUEST:400,FORBIDDEN:403,NOTFOUND:404,TIMEOUT:408,TOOMANYREQ:429,INTERNALSERVER:500,BADGATEWAYS:502,SERVICEUNAVILABLE:503,GATEWAYTIMEOUT:504},He={INSERT:"Data has been saved successfully.",ERROR:"Some error has been occured. Please try again.",SUCCESS:"Your request is executed successfully!",REQUIRED:"coin_type or price param is required",CAPTCHATEXTNOTFOUND:"Captcha text not found.",CAPTCHA_VERIFICATION_FAILED:"Captcha is not verified.",NOTEMPTY:"coin_type or price should not be empty",PAIR_LIST:"Pair list",PAIR_STATUS:"Pair status has been changed",ACTIVE_USERS:"Active Users",SETTINGS_NOT_FOUND:"No settings found in DB.",TRADE_IS_HALT:"Trading is disabled.",KYC_REQUIRED:"KYC is required for this action.",EMAIL_NOT_VERIFIED:"Your email is not verified.Please verify first.",NOT_BETA_USER:"Trade only works for beta user.",WRONG_PAIR_KEY:"Pair key not found.",PAIRDISABLED:"Temporarily order placement has been disabled for this pair. Please try again later.",BALANCE_NOT_SUFFICIENT:"You have insufficient balance.",MIN_TRADE_NOT_MATCHED:"Minimum trade limit does not matched.",ORDER_PLACED_SUCCESSFULLY:"Order has been placed successfully.",ORDER_NOT_FOUND:"Sorry this order id does not found.",ORDER_ALREADY_MATCHED:"Order already matched.",ORDER_ALREADY_CANCELED:"Order already cancelled.",ORDER_CANCELED_SUCCESSFULLY:"order successfully cancelled",ORDER_LIST:"Order list fetched successfully.",ORDER_EXIT:"Successfully exited from the position.",PAIRERR:"please provide pair param",ORDERSIDE:"side param is required",ORDERTYPE:"type param is required",ORDERIDREQ:"order_id param is required",ORDERDETAIL:"order detail",COMMODITYORICE:"commodity price",COMMODITYSPOT:"commodity spot updated",TOKEN_INSERTED:"ERC token has been added",PARAMREQ:"Parameter missing",EXIST:"Token Already Exist",BREACHEDTOKENS:"List of breached tokens",API_EXPOSE:{TOKEN_NOT_FOUND:"Token not found, Please get token and set to header.",ERROR:"Something went wrong, Please try again later"},LIMITED_UNITS:"ONLY {{units}} units are available. You can place your order with this amount",UNITS_UNAVAIL:"Amount unavailable",ORDER:{ERROR:"An error has been occured",UNITS_UNAVAIL:"Amount unavailable",LIMITED_UNITS:"ONLY {{units}} units are available. You can place your order with this amount",PLACED:"Order has been placed",NOPARAMS:"empty body params",ORDER_NOT_FOUND:"Sorry this order id not found.",ORDER_ALREADY_MATCHED:"Order already matched.",ORDER_ALREADY_CANCELED:"Order already cancelled.",ORDER_CANCELED_SUCCESSFULLY:"Order cancelled successfully"},DOMAIN_NOT_FOUND:"domain not found"},Ke={SMALLESTUNIT:h.env.SMALLEST_UNIT},Ve={SMALLEST_UNITS:h.env.SMALLEST_UNIT},Xe={AVAILABLE_ASSETS_PER_USER:1,AVAILABLE_ASSETS_PER_IP:3};var $e=`{"theme1":{"value":"${h.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`;var tt=["point-system.discordEnabled","point-system.telegramBotName","point-system.telegramBotId","point-system.telegramEnabled","point-system.telegramGroupId","point-system.telegramGroupName","point-system.twitterAccountId","point-system.twitterAccountName","point-system.twitterEnabled","point-system.twitterJobEnabled","point-system.guideLink"];var ot=t=>`By signing this message, you confirm that the wallet is a trusted one ${t}; Data: `;export{Ke as BIGNUMBER,Ve as CALCULATIONS,Be as CCTP_UNIFIED_ASSETS,me as DAY_MILLISECONDS,Ne as DEFAULT_FEE_SHARE,Se as DEFAULT_ORDER_EXPIRATION_DAYS,ge as EXPIRE_DAYS,we as FACTOR_PRICE_DECIMAL,Ie as FEE_SCALE,ye as FRONTEND_FEE_SCALE,Ce as MAX_TOKEN_DECIMAL,De as MIN_ORDER_EXPIRATION_MINS,Oe as ORDER_DATA_BYTES_LENGTH,ve as ORDER_MSG_VERSION,tt as PointSystemSettingsIds,We as RESPONSES,He as RES_MSG,Xe as SERVER,Pe as SHARE_DATA_LENGTH,Le as WITHDRAW_DATA_BYTES_LENGTH,ot as messageForSigning};
|
|
1
|
+
function H(){throw new Error("setTimeout has not been defined")}function K(){throw new Error("clearTimeout has not been defined")}var R=H,w=K;typeof globalThis.setTimeout=="function"&&(R=setTimeout);typeof globalThis.clearTimeout=="function"&&(w=clearTimeout);function V(t){if(R===setTimeout)return setTimeout(t,0);if((R===H||!R)&&setTimeout)return R=setTimeout,setTimeout(t,0);try{return R(t,0)}catch{try{return R.call(null,t,0)}catch{return R.call(this,t,0)}}}function Er(t){if(w===clearTimeout)return clearTimeout(t);if((w===K||!w)&&clearTimeout)return w=clearTimeout,clearTimeout(t);try{return w(t)}catch{try{return w.call(null,t)}catch{return w.call(this,t)}}}var A=[],D=!1,I,v=-1;function sr(){!D||!I||(D=!1,I.length?A=I.concat(A):v=-1,A.length&&X())}function X(){if(!D){var t=V(sr);D=!0;for(var r=A.length;r;){for(I=A,A=[];++v<r;)I&&I[v].run();v=-1,r=A.length}I=null,D=!1,Er(t)}}function pr(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];A.push(new q(t,r)),A.length===1&&!D&&V(X)}function q(t,r){this.fun=t,this.array=r}q.prototype.run=function(){this.fun.apply(null,this.array)};var hr="browser",Tr="browser",_r=!0,dr={},br=[],mr="",gr={},Ar={},xr={};function y(){}var Rr=y,wr=y,Ir=y,yr=y,Nr=y,Sr=y,Or=y;function Dr(t){throw new Error("process.binding is not supported")}function vr(){return"/"}function Cr(t){throw new Error("process.chdir is not supported")}function Pr(){return 0}var O=globalThis.performance||{},Lr=O.now||O.mozNow||O.msNow||O.oNow||O.webkitNow||function(){return new Date().getTime()};function Mr(t){var r=Lr.call(O)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}var Ur=new Date;function kr(){var t=new Date,r=t-Ur;return r/1e3}var h={nextTick:pr,title:hr,browser:_r,env:dr,argv:br,version:mr,versions:gr,on:Rr,addListener:wr,once:Ir,off:yr,removeListener:Nr,removeAllListeners:Sr,emit:Or,binding:Dr,cwd:vr,chdir:Cr,umask:Pr,hrtime:Mr,platform:Tr,release:Ar,config:xr,uptime:kr},W={};Object.keys(W).forEach(t=>{let r=t.split("."),e=h;for(let n=0;n<r.length;n++){let i=r[n];n===r.length-1?e[i]=W[t]:e=e[i]||(e[i]={})}});var m=[],d=[],Br=typeof Uint8Array<"u"?Uint8Array:Array,Y=!1;function z(){Y=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)m[r]=t[r],d[t.charCodeAt(r)]=r;d[45]=62,d[95]=63}function Yr(t){Y||z();var r,e,n,i,a,o,c=t.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[c-2]==="="?2:t[c-1]==="="?1:0,o=new Br(c*3/4-a),n=a>0?c-4:c;var l=0;for(r=0,e=0;r<n;r+=4,e+=3)i=d[t.charCodeAt(r)]<<18|d[t.charCodeAt(r+1)]<<12|d[t.charCodeAt(r+2)]<<6|d[t.charCodeAt(r+3)],o[l++]=i>>16&255,o[l++]=i>>8&255,o[l++]=i&255;return a===2?(i=d[t.charCodeAt(r)]<<2|d[t.charCodeAt(r+1)]>>4,o[l++]=i&255):a===1&&(i=d[t.charCodeAt(r)]<<10|d[t.charCodeAt(r+1)]<<4|d[t.charCodeAt(r+2)]>>2,o[l++]=i>>8&255,o[l++]=i&255),o}function Fr(t){return m[t>>18&63]+m[t>>12&63]+m[t>>6&63]+m[t&63]}function Gr(t,r,e){for(var n,i=[],a=r;a<e;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Fr(n));return i.join("")}function Q(t){Y||z();for(var r,e=t.length,n=e%3,i="",a=[],o=16383,c=0,l=e-n;c<l;c+=o)a.push(Gr(t,c,c+o>l?l:c+o));return n===1?(r=t[e-1],i+=m[r>>2],i+=m[r<<4&63],i+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],i+=m[r>>10],i+=m[r>>4&63],i+=m[r<<2&63],i+="="),a.push(i),a.join("")}u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function C(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function x(t,r){if(C()<r)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=u.prototype):(t===null&&(t=new u(r)),t.length=r),t}function u(t,r,e){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return F(this,t)}return Z(this,t,r,e)}u.poolSize=8192;u._augment=function(t){return t.__proto__=u.prototype,t};function Z(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?Kr(t,r,e,n):typeof r=="string"?Hr(t,r,e):Vr(t,r)}u.from=function(t,r,e){return Z(null,t,r,e)};u.kMaxLength=C();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&u[Symbol.species]);function j(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Wr(t,r,e,n){return j(r),r<=0?x(t,r):e!==void 0?typeof n=="string"?x(t,r).fill(e,n):x(t,r).fill(e):x(t,r)}u.alloc=function(t,r,e){return Wr(null,t,r,e)};function F(t,r){if(j(r),t=x(t,r<0?0:G(r)|0),!u.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}u.allocUnsafe=function(t){return F(null,t)};u.allocUnsafeSlow=function(t){return F(null,t)};function Hr(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=rr(r,e)|0;t=x(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function B(t,r){var e=r.length<0?0:G(r.length)|0;t=x(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function Kr(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),u.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=u.prototype):t=B(t,r),t}function Vr(t,r){if(g(r)){var e=G(r.length)|0;return t=x(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||fe(r.length)?x(t,0):B(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return B(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function G(t){if(t>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return t|0}u.isBuffer=Ee;function g(t){return!!(t!=null&&t._isBuffer)}u.compare=function(r,e){if(!g(r)||!g(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,a=0,o=Math.min(n,i);a<o;++a)if(r[a]!==e[a]){n=r[a],i=e[a];break}return n<i?-1:i<n?1:0};u.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};u.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return u.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=u.allocUnsafe(e),a=0;for(n=0;n<r.length;++n){var o=r[n];if(!g(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function rr(t,r){if(g(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return P(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return ur(t).length;default:if(n)return P(t).length;r=(""+r).toLowerCase(),n=!0}}u.byteLength=rr;function Xr(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return te(this,r,e);case"utf8":case"utf-8":return nr(this,r,e);case"ascii":return re(this,r,e);case"latin1":case"binary":return ee(this,r,e);case"base64":return Zr(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function N(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}u.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)N(this,e,e+1);return this};u.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)N(this,e,e+3),N(this,e+1,e+2);return this};u.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)N(this,e,e+7),N(this,e+1,e+6),N(this,e+2,e+5),N(this,e+3,e+4);return this};u.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?nr(this,0,r):Xr.apply(this,arguments)};u.prototype.equals=function(r){if(!g(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:u.compare(this,r)===0};u.prototype.compare=function(r,e,n,i,a){if(!g(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,a>>>=0,this===r)return 0;for(var o=a-i,c=n-e,l=Math.min(o,c),E=this.slice(i,a),s=r.slice(e,n),f=0;f<l;++f)if(E[f]!==s[f]){o=E[f],c=s[f];break}return o<c?-1:c<o?1:0};function er(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=u.from(r,n)),g(r))return r.length===0?-1:J(t,r,e,n,i);if(typeof r=="number")return r=r&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):J(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function J(t,r,e,n,i){var a=1,o=t.length,c=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;a=2,o/=2,c/=2,e/=2}function l(_,S){return a===1?_[S]:_.readUInt16BE(S*a)}var E;if(i){var s=-1;for(E=e;E<o;E++)if(l(t,E)===l(r,s===-1?0:E-s)){if(s===-1&&(s=E),E-s+1===c)return s*a}else s!==-1&&(E-=E-s),s=-1}else for(e+c>o&&(e=o-c),E=e;E>=0;E--){for(var f=!0,b=0;b<c;b++)if(l(t,E+b)!==l(r,b)){f=!1;break}if(f)return E}return-1}u.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};u.prototype.indexOf=function(r,e,n){return er(this,r,e,n,!0)};u.prototype.lastIndexOf=function(r,e,n){return er(this,r,e,n,!1)};function qr(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var a=r.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var c=parseInt(r.substr(o*2,2),16);if(isNaN(c))return o;t[e+o]=c}return o}function Qr(t,r,e,n){return U(P(r,t.length-e),t,e,n)}function tr(t,r,e,n){return U(ce(r),t,e,n)}function Jr(t,r,e,n){return tr(t,r,e,n)}function $r(t,r,e,n){return U(ur(r),t,e,n)}function zr(t,r,e,n){return U(le(r,t.length-e),t,e,n)}u.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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");var a=this.length-e;if((n===void 0||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return qr(this,r,e,n);case"utf8":case"utf-8":return Qr(this,r,e,n);case"ascii":return tr(this,r,e,n);case"latin1":case"binary":return Jr(this,r,e,n);case"base64":return $r(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zr(this,r,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Zr(t,r,e){return r===0&&e===t.length?Q(t):Q(t.slice(r,e))}function nr(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var a=t[i],o=null,c=a>239?4:a>223?3:a>191?2:1;if(i+c<=e){var l,E,s,f;switch(c){case 1:a<128&&(o=a);break;case 2:l=t[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=t[i+1],E=t[i+2],(l&192)===128&&(E&192)===128&&(f=(a&15)<<12|(l&63)<<6|E&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=t[i+1],E=t[i+2],s=t[i+3],(l&192)===128&&(E&192)===128&&(s&192)===128&&(f=(a&15)<<18|(l&63)<<12|(E&63)<<6|s&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,c=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=c}return jr(n)}var $=4096;function jr(t){var r=t.length;if(r<=$)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=$));return e}function re(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function ee(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function te(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",a=r;a<e;++a)i+=ue(t[a]);return i}function ne(t,r,e){for(var n=t.slice(r,e),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}u.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(u.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=u.prototype;else{var a=e-r;i=new u(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+r]}return i};function p(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return i};u.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i};u.prototype.readUInt8=function(r,e){return e||p(r,1,this.length),this[r]};u.prototype.readUInt16LE=function(r,e){return e||p(r,2,this.length),this[r]|this[r+1]<<8};u.prototype.readUInt16BE=function(r,e){return e||p(r,2,this.length),this[r]<<8|this[r+1]};u.prototype.readUInt32LE=function(r,e){return e||p(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};u.prototype.readUInt32BE=function(r,e){return e||p(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};u.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=this[r],a=1,o=0;++o<e&&(a*=256);)i+=this[r+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};u.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||p(r,e,this.length);for(var i=e,a=1,o=this[r+--i];i>0&&(a*=256);)o+=this[r+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*e)),o};u.prototype.readInt8=function(r,e){return e||p(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};u.prototype.readInt16LE=function(r,e){e||p(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(r,e){e||p(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(r,e){return e||p(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};u.prototype.readInt32BE=function(r,e){return e||p(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};u.prototype.readFloatLE=function(r,e){return e||p(r,4,this.length),k(this,r,!0,23,4)};u.prototype.readFloatBE=function(r,e){return e||p(r,4,this.length),k(this,r,!1,23,4)};u.prototype.readDoubleLE=function(r,e){return e||p(r,8,this.length),k(this,r,!0,52,8)};u.prototype.readDoubleBE=function(r,e){return e||p(r,8,this.length),k(this,r,!1,52,8)};function T(t,r,e,n,i,a){if(!g(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<a)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;T(this,r,e,n,a,0)}var o=1,c=0;for(this[e]=r&255;++c<n&&(o*=256);)this[e+c]=r/o&255;return e+n};u.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;T(this,r,e,n,a,0)}var o=n-1,c=1;for(this[e+o]=r&255;--o>=0&&(c*=256);)this[e+o]=r/c&255;return e+n};u.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function L(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,a=Math.min(t.length-e,2);i<a;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}u.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):L(this,r,e,!0),e+2};u.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):L(this,r,e,!1),e+2};function M(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,a=Math.min(t.length-e,4);i<a;++i)t[e+i]=r>>>(n?i:3-i)*8&255}u.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):M(this,r,e,!0),e+4};u.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};u.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);T(this,r,e,n,a-1,-a)}var o=0,c=1,l=0;for(this[e]=r&255;++o<n&&(c*=256);)r<0&&l===0&&this[e+o-1]!==0&&(l=1),this[e+o]=(r/c>>0)-l&255;return e+n};u.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);T(this,r,e,n,a-1,-a)}var o=n-1,c=1,l=0;for(this[e+o]=r&255;--o>=0&&(c*=256);)r<0&&l===0&&this[e+o+1]!==0&&(l=1),this[e+o]=(r/c>>0)-l&255;return e+n};u.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};u.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):L(this,r,e,!0),e+2};u.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):L(this,r,e,!1),e+2};u.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):M(this,r,e,!0),e+4};u.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||T(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),u.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};function ir(t,r,e,n,i,a){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function ar(t,r,e,n,i){return i||ir(t,r,e,4,34028234663852886e22,-34028234663852886e22),lr(t,r,e,n,23,4),e+4}u.prototype.writeFloatLE=function(r,e,n){return ar(this,r,e,!0,n)};u.prototype.writeFloatBE=function(r,e,n){return ar(this,r,e,!1,n)};function or(t,r,e,n,i){return i||ir(t,r,e,8,17976931348623157e292,-17976931348623157e292),lr(t,r,e,n,52,8),e+8}u.prototype.writeDoubleLE=function(r,e,n){return or(this,r,e,!0,n)};u.prototype.writeDoubleBE=function(r,e,n){return or(this,r,e,!1,n)};u.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var a=i-n,o;if(this===r&&n<e&&e<i)for(o=a-1;o>=0;--o)r[o+e]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)r[o+e]=this[o+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+a),e);return a};u.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var a=r.charCodeAt(0);a<256&&(r=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var o;if(typeof r=="number")for(o=e;o<n;++o)this[o]=r;else{var c=g(r)?r:P(new u(r,i).toString()),l=c.length;for(o=0;o<n-e;++o)this[o+e]=c[o%l]}return this};var ie=/[^+\/0-9A-Za-z-_]/g;function ae(t){if(t=oe(t).replace(ie,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function oe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ue(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,r){r=r||1/0;for(var e,n=t.length,i=null,a=[],o=0;o<n;++o){if(e=t.charCodeAt(o),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(r-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function ce(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function le(t,r){for(var e,n,i,a=[],o=0;o<t.length&&!((r-=2)<0);++o)e=t.charCodeAt(o),n=e>>8,i=e%256,a.push(i),a.push(n);return a}function ur(t){return Yr(ae(t))}function U(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function fe(t){return t!==t}function Ee(t){return t!=null&&(!!t._isBuffer||cr(t)||se(t))}function cr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function se(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&cr(t.slice(0,0))}function k(t,r,e,n,i){var a,o,c=i*8-n-1,l=(1<<c)-1,E=l>>1,s=-7,f=e?i-1:0,b=e?-1:1,_=t[r+f];for(f+=b,a=_&(1<<-s)-1,_>>=-s,s+=c;s>0;a=a*256+t[r+f],f+=b,s-=8);for(o=a&(1<<-s)-1,a>>=-s,s+=n;s>0;o=o*256+t[r+f],f+=b,s-=8);if(a===0)a=1-E;else{if(a===l)return o?NaN:(_?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-E}return(_?-1:1)*o*Math.pow(2,a-n)}function lr(t,r,e,n,i,a){var o,c,l,E=a*8-i-1,s=(1<<E)-1,f=s>>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:a-1,S=n?1:-1,fr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,o=s):(o=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?r+=b/l:r+=b*Math.pow(2,1-f),r*l>=2&&(o++,l/=2),o+f>=s?(c=0,o=s):o+f>=1?(c=(r*l-1)*Math.pow(2,i),o=o+f):(c=r*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[e+_]=c&255,_+=S,c/=256,i-=8);for(o=o<<i|c,E+=i;E>0;t[e+_]=o&255,_+=S,o/=256,E-=8);t[e+_-S]|=fr*128}var me=864e5,ge=30;var we=18,Ie=1e5,ye=1e3,Ne=9e4,Se=30,Oe=60,De=328,ve=1,Ce=18,Pe=36,Le=248;var Be={"0x4343545055534443000000000000000000000000000000000000000000000000":65537};var We={SUCCESS:200,CREATED:201,ACCEPTED:202,NOCONTENT:204,BADREQUEST:400,FORBIDDEN:403,NOTFOUND:404,TIMEOUT:408,TOOMANYREQ:429,INTERNALSERVER:500,BADGATEWAYS:502,SERVICEUNAVILABLE:503,GATEWAYTIMEOUT:504},He={INSERT:"Data has been saved successfully.",ERROR:"Some error has been occured. Please try again.",SUCCESS:"Your request is executed successfully!",REQUIRED:"coin_type or price param is required",CAPTCHATEXTNOTFOUND:"Captcha text not found.",CAPTCHA_VERIFICATION_FAILED:"Captcha is not verified.",NOTEMPTY:"coin_type or price should not be empty",PAIR_LIST:"Pair list",PAIR_STATUS:"Pair status has been changed",ACTIVE_USERS:"Active Users",SETTINGS_NOT_FOUND:"No settings found in DB.",TRADE_IS_HALT:"Trading is disabled.",KYC_REQUIRED:"KYC is required for this action.",EMAIL_NOT_VERIFIED:"Your email is not verified.Please verify first.",NOT_BETA_USER:"Trade only works for beta user.",WRONG_PAIR_KEY:"Pair key not found.",PAIRDISABLED:"Temporarily order placement has been disabled for this pair. Please try again later.",BALANCE_NOT_SUFFICIENT:"You have insufficient balance.",MIN_TRADE_NOT_MATCHED:"Minimum trade limit does not matched.",ORDER_PLACED_SUCCESSFULLY:"Order has been placed successfully.",ORDER_NOT_FOUND:"Sorry this order id does not found.",ORDER_ALREADY_MATCHED:"Order already matched.",ORDER_ALREADY_CANCELED:"Order already cancelled.",ORDER_CANCELED_SUCCESSFULLY:"order successfully cancelled",ORDER_LIST:"Order list fetched successfully.",ORDER_EXIT:"Successfully exited from the position.",PAIRERR:"please provide pair param",ORDERSIDE:"side param is required",ORDERTYPE:"type param is required",ORDERIDREQ:"order_id param is required",ORDERDETAIL:"order detail",COMMODITYORICE:"commodity price",COMMODITYSPOT:"commodity spot updated",TOKEN_INSERTED:"ERC token has been added",PARAMREQ:"Parameter missing",EXIST:"Token Already Exist",BREACHEDTOKENS:"List of breached tokens",API_EXPOSE:{TOKEN_NOT_FOUND:"Token not found, Please get token and set to header.",ERROR:"Something went wrong, Please try again later"},LIMITED_UNITS:"ONLY {{units}} units are available. You can place your order with this amount",UNITS_UNAVAIL:"Amount unavailable",ORDER:{ERROR:"An error has been occured",UNITS_UNAVAIL:"Amount unavailable",LIMITED_UNITS:"ONLY {{units}} units are available. You can place your order with this amount",PLACED:"Order has been placed",NOPARAMS:"empty body params",ORDER_NOT_FOUND:"Sorry this order id not found.",ORDER_ALREADY_MATCHED:"Order already matched.",ORDER_ALREADY_CANCELED:"Order already cancelled.",ORDER_CANCELED_SUCCESSFULLY:"Order cancelled successfully"},DOMAIN_NOT_FOUND:"domain not found"},Ke={SMALLESTUNIT:h.env.SMALLEST_UNIT},Ve={SMALLEST_UNITS:h.env.SMALLEST_UNIT},Xe={AVAILABLE_ASSETS_PER_USER:1,AVAILABLE_ASSETS_PER_IP:3};var $e=`{"theme1":{"value":"${h.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${h.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`;var tt=["point-system.discordEnabled","point-system.telegramBotName","point-system.telegramBotId","point-system.telegramEnabled","point-system.telegramGroupId","point-system.telegramGroupName","point-system.twitterAccountId","point-system.twitterAccountName","point-system.twitterEnabled","point-system.twitterJobEnabled","point-system.guideLink"],nt=["obdex","kycTradeRequirementEnabled","newTab","reportButtons"],it=["geoblock","pinnedPairs","customMenuItems","chartInt"];var ct=t=>`By signing this message, you confirm that the wallet is a trusted one ${t}; Data: `;export{Ke as BIGNUMBER,nt as BOOLEAN_SETTINGS,Ve as CALCULATIONS,Be as CCTP_UNIFIED_ASSETS,me as DAY_MILLISECONDS,Ne as DEFAULT_FEE_SHARE,Se as DEFAULT_ORDER_EXPIRATION_DAYS,ge as EXPIRE_DAYS,we as FACTOR_PRICE_DECIMAL,Ie as FEE_SCALE,ye as FRONTEND_FEE_SCALE,it as JSON_ARRAY_SETTINGS,Ce as MAX_TOKEN_DECIMAL,Oe as MIN_ORDER_EXPIRATION_MINS,De as ORDER_DATA_BYTES_LENGTH,ve as ORDER_MSG_VERSION,tt as PointSystemSettingsIds,We as RESPONSES,He as RES_MSG,Xe as SERVER,Pe as SHARE_DATA_LENGTH,Le as WITHDRAW_DATA_BYTES_LENGTH,ct as messageForSigning};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function V(){throw new Error("setTimeout has not been defined")}function H(){throw new Error("clearTimeout has not been defined")}var b=V,C=H;typeof globalThis.setTimeout=="function"&&(b=setTimeout);typeof globalThis.clearTimeout=="function"&&(C=clearTimeout);function K(e){if(b===setTimeout)return setTimeout(e,0);if((b===V||!b)&&setTimeout)return b=setTimeout,setTimeout(e,0);try{return b(e,0)}catch{try{return b.call(null,e,0)}catch{return b.call(this,e,0)}}}function _r(e){if(C===clearTimeout)return clearTimeout(e);if((C===H||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(e);try{return C(e)}catch{try{return C.call(null,e)}catch{return C.call(this,e)}}}var T=[],O=!1,d,L=-1;function Ir(){!O||!d||(O=!1,d.length?T=d.concat(T):L=-1,T.length&&z())}function z(){if(!O){var e=K(Ir);O=!0;for(var r=T.length;r;){for(d=T,T=[];++L<r;)d&&d[L].run();L=-1,r=T.length}d=null,O=!1,_r(e)}}function wr(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];T.push(new J(e,r)),T.length===1&&!O&&K(z)}function J(e,r){this.fun=e,this.array=r}J.prototype.run=function(){this.fun.apply(null,this.array)};var Rr="browser",Tr="browser",Nr=!0,br={},Cr=[],dr="",gr={},Dr={},vr={};function g(){}var Or=g,Lr=g,yr=g,Ur=g,Pr=g,Br=g,Sr=g;function Yr(e){throw new Error("process.binding is not supported")}function Mr(){return"/"}function kr(e){throw new Error("process.chdir is not supported")}function Gr(){return 0}var v=globalThis.performance||{},Fr=v.now||v.mozNow||v.msNow||v.oNow||v.webkitNow||function(){return new Date().getTime()};function Wr(e){var r=Fr.call(v)*.001,t=Math.floor(r),i=Math.floor(r%1*1e9);return e&&(t=t-e[0],i=i-e[1],i<0&&(t--,i+=1e9)),[t,i]}var Vr=new Date;function Hr(){var e=new Date,r=e-Vr;return r/1e3}var E={nextTick:wr,title:Rr,browser:Nr,env:br,argv:Cr,version:dr,versions:gr,on:Or,addListener:Lr,once:yr,off:Ur,removeListener:Pr,removeAllListeners:Br,emit:Sr,binding:Yr,cwd:Mr,chdir:kr,umask:Gr,hrtime:Wr,platform:Tr,release:Dr,config:vr,uptime:Hr},W={};Object.keys(W).forEach(e=>{let r=e.split("."),t=E;for(let i=0;i<r.length;i++){let n=r[i];i===r.length-1?t[n]=W[e]:t=t[n]||(t[n]={})}});var w=[],_=[],Kr=typeof Uint8Array<"u"?Uint8Array:Array,k=!1;function Z(){k=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,t=e.length;r<t;++r)w[r]=e[r],_[e.charCodeAt(r)]=r;_[45]=62,_[95]=63}function zr(e){k||Z();var r,t,i,n,o,p,c=e.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=e[c-2]==="="?2:e[c-1]==="="?1:0,p=new Kr(c*3/4-o),i=o>0?c-4:c;var s=0;for(r=0,t=0;r<i;r+=4,t+=3)n=_[e.charCodeAt(r)]<<18|_[e.charCodeAt(r+1)]<<12|_[e.charCodeAt(r+2)]<<6|_[e.charCodeAt(r+3)],p[s++]=n>>16&255,p[s++]=n>>8&255,p[s++]=n&255;return o===2?(n=_[e.charCodeAt(r)]<<2|_[e.charCodeAt(r+1)]>>4,p[s++]=n&255):o===1&&(n=_[e.charCodeAt(r)]<<10|_[e.charCodeAt(r+1)]<<4|_[e.charCodeAt(r+2)]>>2,p[s++]=n>>8&255,p[s++]=n&255),p}function Jr(e){return w[e>>18&63]+w[e>>12&63]+w[e>>6&63]+w[e&63]}function Xr(e,r,t){for(var i,n=[],o=r;o<t;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],n.push(Jr(i));return n.join("")}function X(e){k||Z();for(var r,t=e.length,i=t%3,n="",o=[],p=16383,c=0,s=t-i;c<s;c+=p)o.push(Xr(e,c,c+p>s?s:c+p));return i===1?(r=e[t-1],n+=w[r>>2],n+=w[r<<4&63],n+="=="):i===2&&(r=(e[t-2]<<8)+e[t-1],n+=w[r>>10],n+=w[r>>4&63],n+=w[r<<2&63],n+="="),o.push(n),o.join("")}h.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function y(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function N(e,r){if(y()<r)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=h.prototype):(e===null&&(e=new h(r)),e.length=r),e}function h(e,r,t){if(!h.TYPED_ARRAY_SUPPORT&&!(this instanceof h))return new h(e,r,t);if(typeof e=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return G(this,e)}return $(this,e,r,t)}h.poolSize=8192;h._augment=function(e){return e.__proto__=h.prototype,e};function $(e,r,t,i){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?Zr(e,r,t,i):typeof r=="string"?Qr(e,r,t):$r(e,r)}h.from=function(e,r,t){return $(null,e,r,t)};h.kMaxLength=y();h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&h[Symbol.species]);function j(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function qr(e,r,t,i){return j(r),r<=0?N(e,r):t!==void 0?typeof i=="string"?N(e,r).fill(t,i):N(e,r).fill(t):N(e,r)}h.alloc=function(e,r,t){return qr(null,e,r,t)};function G(e,r){if(j(r),e=N(e,r<0?0:F(r)|0),!h.TYPED_ARRAY_SUPPORT)for(var t=0;t<r;++t)e[t]=0;return e}h.allocUnsafe=function(e){return G(null,e)};h.allocUnsafeSlow=function(e){return G(null,e)};function Qr(e,r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!h.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var i=rr(r,t)|0;e=N(e,i);var n=e.write(r,t);return n!==i&&(e=e.slice(0,n)),e}function M(e,r){var t=r.length<0?0:F(r.length)|0;e=N(e,t);for(var i=0;i<t;i+=1)e[i]=r[i]&255;return e}function Zr(e,r,t,i){if(r.byteLength,t<0||r.byteLength<t)throw new RangeError("'offset' is out of bounds");if(r.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");return t===void 0&&i===void 0?r=new Uint8Array(r):i===void 0?r=new Uint8Array(r,t):r=new Uint8Array(r,t,i),h.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=h.prototype):e=M(e,r),e}function $r(e,r){if(R(r)){var t=F(r.length)|0;return e=N(e,t),e.length===0||r.copy(e,0,0,t),e}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||At(r.length)?N(e,0):M(e,r);if(r.type==="Buffer"&&Array.isArray(r.data))return M(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function F(e){if(e>=y())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y().toString(16)+" bytes");return e|0}h.isBuffer=_t;function R(e){return!!(e!=null&&e._isBuffer)}h.compare=function(r,t){if(!R(r)||!R(t))throw new TypeError("Arguments must be Buffers");if(r===t)return 0;for(var i=r.length,n=t.length,o=0,p=Math.min(i,n);o<p;++o)if(r[o]!==t[o]){i=r[o],n=t[o];break}return i<n?-1:n<i?1:0};h.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};h.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return h.alloc(0);var i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;var n=h.allocUnsafe(t),o=0;for(i=0;i<r.length;++i){var p=r[i];if(!R(p))throw new TypeError('"list" argument must be an Array of Buffers');p.copy(n,o),o+=p.length}return n};function rr(e,r){if(R(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;if(t===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return hr(e).length;default:if(i)return U(e).length;r=(""+r).toLowerCase(),i=!0}}h.byteLength=rr;function jr(e,r,t){var i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return at(this,r,t);case"utf8":case"utf-8":return ir(this,r,t);case"ascii":return ht(this,r,t);case"latin1":case"binary":return ct(this,r,t);case"base64":return ot(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}h.prototype._isBuffer=!0;function D(e,r,t){var i=e[r];e[r]=e[t],e[t]=i}h.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)D(this,t,t+1);return this};h.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)D(this,t,t+3),D(this,t+1,t+2);return this};h.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)D(this,t,t+7),D(this,t+1,t+6),D(this,t+2,t+5),D(this,t+3,t+4);return this};h.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?ir(this,0,r):jr.apply(this,arguments)};h.prototype.equals=function(r){if(!R(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:h.compare(this,r)===0};h.prototype.compare=function(r,t,i,n,o){if(!R(r))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),t<0||i>r.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=i)return 0;if(n>=o)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,o>>>=0,this===r)return 0;for(var p=o-n,c=i-t,s=Math.min(p,c),f=this.slice(n,o),l=r.slice(t,i),a=0;a<s;++a)if(f[a]!==l[a]){p=f[a],c=l[a];break}return p<c?-1:c<p?1:0};function tr(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=h.from(r,i)),R(r))return r.length===0?-1:q(e,r,t,i,n);if(typeof r=="number")return r=r&255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):q(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}function q(e,r,t,i,n){var o=1,p=e.length,c=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,p/=2,c/=2,t/=2}function s(A,u){return o===1?A[u]:A.readUInt16BE(u*o)}var f;if(n){var l=-1;for(f=t;f<p;f++)if(s(e,f)===s(r,l===-1?0:f-l)){if(l===-1&&(l=f),f-l+1===c)return l*o}else l!==-1&&(f-=f-l),l=-1}else for(t+c>p&&(t=p-c),f=t;f>=0;f--){for(var a=!0,I=0;I<c;I++)if(s(e,f+I)!==s(r,I)){a=!1;break}if(a)return f}return-1}h.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1};h.prototype.indexOf=function(r,t,i){return tr(this,r,t,i,!0)};h.prototype.lastIndexOf=function(r,t,i){return tr(this,r,t,i,!1)};function rt(e,r,t,i){t=Number(t)||0;var n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var p=0;p<i;++p){var c=parseInt(r.substr(p*2,2),16);if(isNaN(c))return p;e[t+p]=c}return p}function tt(e,r,t,i){return S(U(r,e.length-t),e,t,i)}function er(e,r,t,i){return S(xt(r),e,t,i)}function et(e,r,t,i){return er(e,r,t,i)}function it(e,r,t,i){return S(hr(r),e,t,i)}function nt(e,r,t,i){return S(mt(r,e.length-t),e,t,i)}h.prototype.write=function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(i)?(i=i|0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((i===void 0||i>o)&&(i=o),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return rt(this,r,t,i);case"utf8":case"utf-8":return tt(this,r,t,i);case"ascii":return er(this,r,t,i);case"latin1":case"binary":return et(this,r,t,i);case"base64":return it(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,r,t,i);default:if(p)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}};h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ot(e,r,t){return r===0&&t===e.length?X(e):X(e.slice(r,t))}function ir(e,r,t){t=Math.min(e.length,t);for(var i=[],n=r;n<t;){var o=e[n],p=null,c=o>239?4:o>223?3:o>191?2:1;if(n+c<=t){var s,f,l,a;switch(c){case 1:o<128&&(p=o);break;case 2:s=e[n+1],(s&192)===128&&(a=(o&31)<<6|s&63,a>127&&(p=a));break;case 3:s=e[n+1],f=e[n+2],(s&192)===128&&(f&192)===128&&(a=(o&15)<<12|(s&63)<<6|f&63,a>2047&&(a<55296||a>57343)&&(p=a));break;case 4:s=e[n+1],f=e[n+2],l=e[n+3],(s&192)===128&&(f&192)===128&&(l&192)===128&&(a=(o&15)<<18|(s&63)<<12|(f&63)<<6|l&63,a>65535&&a<1114112&&(p=a))}}p===null?(p=65533,c=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|p&1023),i.push(p),n+=c}return pt(i)}var Q=4096;function pt(e){var r=e.length;if(r<=Q)return String.fromCharCode.apply(String,e);for(var t="",i=0;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=Q));return t}function ht(e,r,t){var i="";t=Math.min(e.length,t);for(var n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}function ct(e,r,t){var i="";t=Math.min(e.length,t);for(var n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}function at(e,r,t){var i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);for(var n="",o=r;o<t;++o)n+=Et(e[o]);return n}function st(e,r,t){for(var i=e.slice(r,t),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}h.prototype.slice=function(r,t){var i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);var n;if(h.TYPED_ARRAY_SUPPORT)n=this.subarray(r,t),n.__proto__=h.prototype;else{var o=t-r;n=new h(o,void 0);for(var p=0;p<o;++p)n[p]=this[p+r]}return n};function x(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUIntLE=function(r,t,i){r=r|0,t=t|0,i||x(r,t,this.length);for(var n=this[r],o=1,p=0;++p<t&&(o*=256);)n+=this[r+p]*o;return n};h.prototype.readUIntBE=function(r,t,i){r=r|0,t=t|0,i||x(r,t,this.length);for(var n=this[r+--t],o=1;t>0&&(o*=256);)n+=this[r+--t]*o;return n};h.prototype.readUInt8=function(r,t){return t||x(r,1,this.length),this[r]};h.prototype.readUInt16LE=function(r,t){return t||x(r,2,this.length),this[r]|this[r+1]<<8};h.prototype.readUInt16BE=function(r,t){return t||x(r,2,this.length),this[r]<<8|this[r+1]};h.prototype.readUInt32LE=function(r,t){return t||x(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};h.prototype.readUInt32BE=function(r,t){return t||x(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};h.prototype.readIntLE=function(r,t,i){r=r|0,t=t|0,i||x(r,t,this.length);for(var n=this[r],o=1,p=0;++p<t&&(o*=256);)n+=this[r+p]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n};h.prototype.readIntBE=function(r,t,i){r=r|0,t=t|0,i||x(r,t,this.length);for(var n=t,o=1,p=this[r+--n];n>0&&(o*=256);)p+=this[r+--n]*o;return o*=128,p>=o&&(p-=Math.pow(2,8*t)),p};h.prototype.readInt8=function(r,t){return t||x(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};h.prototype.readInt16LE=function(r,t){t||x(r,2,this.length);var i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};h.prototype.readInt16BE=function(r,t){t||x(r,2,this.length);var i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};h.prototype.readInt32LE=function(r,t){return t||x(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};h.prototype.readInt32BE=function(r,t){return t||x(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};h.prototype.readFloatLE=function(r,t){return t||x(r,4,this.length),Y(this,r,!0,23,4)};h.prototype.readFloatBE=function(r,t){return t||x(r,4,this.length),Y(this,r,!1,23,4)};h.prototype.readDoubleLE=function(r,t){return t||x(r,8,this.length),Y(this,r,!0,52,8)};h.prototype.readDoubleBE=function(r,t){return t||x(r,8,this.length),Y(this,r,!1,52,8)};function m(e,r,t,i,n,o){if(!R(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<o)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}h.prototype.writeUIntLE=function(r,t,i,n){if(r=+r,t=t|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;m(this,r,t,i,o,0)}var p=1,c=0;for(this[t]=r&255;++c<i&&(p*=256);)this[t+c]=r/p&255;return t+i};h.prototype.writeUIntBE=function(r,t,i,n){if(r=+r,t=t|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;m(this,r,t,i,o,0)}var p=i-1,c=1;for(this[t+p]=r&255;--p>=0&&(c*=256);)this[t+p]=r/c&255;return t+i};h.prototype.writeUInt8=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,1,255,0),h.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[t]=r&255,t+1};function P(e,r,t,i){r<0&&(r=65535+r+1);for(var n=0,o=Math.min(e.length-t,2);n<o;++n)e[t+n]=(r&255<<8*(i?n:1-n))>>>(i?n:1-n)*8}h.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=r&255,this[t+1]=r>>>8):P(this,r,t,!0),t+2};h.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=r&255):P(this,r,t,!1),t+2};function B(e,r,t,i){r<0&&(r=4294967295+r+1);for(var n=0,o=Math.min(e.length-t,4);n<o;++n)e[t+n]=r>>>(i?n:3-n)*8&255}h.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255):B(this,r,t,!0),t+4};h.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255):B(this,r,t,!1),t+4};h.prototype.writeIntLE=function(r,t,i,n){if(r=+r,t=t|0,!n){var o=Math.pow(2,8*i-1);m(this,r,t,i,o-1,-o)}var p=0,c=1,s=0;for(this[t]=r&255;++p<i&&(c*=256);)r<0&&s===0&&this[t+p-1]!==0&&(s=1),this[t+p]=(r/c>>0)-s&255;return t+i};h.prototype.writeIntBE=function(r,t,i,n){if(r=+r,t=t|0,!n){var o=Math.pow(2,8*i-1);m(this,r,t,i,o-1,-o)}var p=i-1,c=1,s=0;for(this[t+p]=r&255;--p>=0&&(c*=256);)r<0&&s===0&&this[t+p+1]!==0&&(s=1),this[t+p]=(r/c>>0)-s&255;return t+i};h.prototype.writeInt8=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,1,127,-128),h.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[t]=r&255,t+1};h.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=r&255,this[t+1]=r>>>8):P(this,r,t,!0),t+2};h.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=r&255):P(this,r,t,!1),t+2};h.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24):B(this,r,t,!0),t+4};h.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t|0,i||m(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),h.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255):B(this,r,t,!1),t+4};function nr(e,r,t,i,n,o){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function or(e,r,t,i,n){return n||nr(e,r,t,4,34028234663852886e22,-34028234663852886e22),ar(e,r,t,i,23,4),t+4}h.prototype.writeFloatLE=function(r,t,i){return or(this,r,t,!0,i)};h.prototype.writeFloatBE=function(r,t,i){return or(this,r,t,!1,i)};function pr(e,r,t,i,n){return n||nr(e,r,t,8,17976931348623157e292,-17976931348623157e292),ar(e,r,t,i,52,8),t+8}h.prototype.writeDoubleLE=function(r,t,i){return pr(this,r,t,!0,i)};h.prototype.writeDoubleBE=function(r,t,i){return pr(this,r,t,!1,i)};h.prototype.copy=function(r,t,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-i&&(n=r.length-t+i);var o=n-i,p;if(this===r&&i<t&&t<n)for(p=o-1;p>=0;--p)r[p+t]=this[p+i];else if(o<1e3||!h.TYPED_ARRAY_SUPPORT)for(p=0;p<o;++p)r[p+t]=this[p+i];else Uint8Array.prototype.set.call(r,this.subarray(i,i+o),t);return o};h.prototype.fill=function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),r.length===1){var o=r.charCodeAt(0);o<256&&(r=o)}if(n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else typeof r=="number"&&(r=r&255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);var p;if(typeof r=="number")for(p=t;p<i;++p)this[p]=r;else{var c=R(r)?r:U(new h(r,n).toString()),s=c.length;for(p=0;p<i-t;++p)this[p+t]=c[p%s]}return this};var ft=/[^+\/0-9A-Za-z-_]/g;function ut(e){if(e=lt(e).replace(ft,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function lt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Et(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,r){r=r||1/0;for(var t,i=e.length,n=null,o=[],p=0;p<i;++p){if(t=e.charCodeAt(p),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(p+1===i){(r-=3)>-1&&o.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function xt(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function mt(e,r){for(var t,i,n,o=[],p=0;p<e.length&&!((r-=2)<0);++p)t=e.charCodeAt(p),i=t>>8,n=t%256,o.push(n),o.push(i);return o}function hr(e){return zr(ut(e))}function S(e,r,t,i){for(var n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function At(e){return e!==e}function _t(e){return e!=null&&(!!e._isBuffer||cr(e)||It(e))}function cr(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function It(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&cr(e.slice(0,0))}function Y(e,r,t,i,n){var o,p,c=n*8-i-1,s=(1<<c)-1,f=s>>1,l=-7,a=t?n-1:0,I=t?-1:1,A=e[r+a];for(a+=I,o=A&(1<<-l)-1,A>>=-l,l+=c;l>0;o=o*256+e[r+a],a+=I,l-=8);for(p=o&(1<<-l)-1,o>>=-l,l+=i;l>0;p=p*256+e[r+a],a+=I,l-=8);if(o===0)o=1-f;else{if(o===s)return p?NaN:(A?-1:1)*(1/0);p=p+Math.pow(2,i),o=o-f}return(A?-1:1)*p*Math.pow(2,o-i)}function ar(e,r,t,i,n,o){var p,c,s,f=o*8-n-1,l=(1<<f)-1,a=l>>1,I=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:o-1,u=i?1:-1,Ar=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,p=l):(p=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-p))<1&&(p--,s*=2),p+a>=1?r+=I/s:r+=I*Math.pow(2,1-a),r*s>=2&&(p++,s/=2),p+a>=l?(c=0,p=l):p+a>=1?(c=(r*s-1)*Math.pow(2,n),p=p+a):(c=r*Math.pow(2,a-1)*Math.pow(2,n),p=0));n>=8;e[t+A]=c&255,A+=u,c/=256,n-=8);for(p=p<<n|c,f+=n;f>0;e[t+A]=p&255,A+=u,p/=256,f-=8);e[t+A-u]|=Ar*128}var wt=(u=>(u[u.Solana=1]="Solana",u[u.Algorand=8]="Algorand",u[u.Polygon=5]="Polygon",u[u.Bsc=4]="Bsc",u[u.Avalanche=6]="Avalanche",u[u.Arbitrum=23]="Arbitrum",u[u.Optimism=24]="Optimism",u[u.Base=30]="Base",u[u.Ethereum=2]="Ethereum",u[u.Sepolia=10002]="Sepolia",u[u.ArbitrumSepolia=10003]="ArbitrumSepolia",u[u.BaseSepolia=10004]="BaseSepolia",u[u.OptimismSepolia=10005]="OptimismSepolia",u[u.PolygonAmoy=10007]="PolygonAmoy",u))(wt||{}),ae={1:"Solana",2:"Ethereum",5:"Polygon",4:"BNB Chain",6:"Avalanche",8:"Algorand",23:"Arbitrum",24:"Optimism",30:"Base",10002:"Ethereum Sepolia",10003:"Arbitrum Sepolia",10004:"Base Sepolia",10005:"Optimism Sepolia",10007:"Polygon Amoy"},se={4:["","https://bsc-testnet.public.blastapi.io","https://bsc-testnet.blockpi.network/v1/rpc/private","https://bsc-testnet-rpc.publicnode.com","https://api.zan.top/bsc-testnet","https://data-seed-prebsc-2-s1.bnbchain.org:8545","https://data-seed-prebsc-2-s2.bnbchain.org:8545","https://data-seed-prebsc-2-s3.bnbchain.org:8545","https://data-seed-prebsc-1-s1.bnbchain.org:8545","https://data-seed-prebsc-1-s2.bnbchain.org:8545","https://data-seed-prebsc-1-s3.bnbchain.org:8545","https://endpoints.omniatech.io/v1/bsc/testnet/public"],6:["","https://rpc.ankr.com/avalanche_fuji","https://rpc.ankr.com/avalanche_fuji-c","https://api.avax-test.network/ext/bc/C/rpc","https://ava-testnet.public.blastapi.io/ext/bc/C/rpc","https://endpoints.omniatech.io/v1/avax/fuji/public","https://avalanche-fuji.blockpi.network/v1/rpc/private","https://avalanche-fuji-c-chain-rpc.publicnode.com","https://avalanche-fuji.blockpi.network/v1/rpc/private"],10002:["https://ethereum-sepolia-rpc.publicnode.com","https://sepolia.gateway.tenderly.co","https://eth-sepolia.public.blastapi.io","https://ethereum-sepolia.blockpi.network/v1/rpc/private","https://sepolia.drpc.org","https://endpoints.omniatech.io/v1/eth/sepolia/public","https://1rpc.io/sepolia","https://gateway.tenderly.co/public/sepolia","https://sepolia.gateway.tenderly.co","https://api.zan.top/eth-sepolia","https://ethereum-sepolia.rpc.subquery.network/public"],10003:["","https://arbitrum-sepolia.blockpi.network/v1/rpc/private ","https://arbitrum-sepolia.gateway.tenderly.co","https://endpoints.omniatech.io/v1/arbitrum/sepolia/public","https://api.zan.top/arb-sepolia","https://sepolia-rollup.arbitrum.io/rpc"],10004:["","https://sepolia.base.org","https://base-sepolia-rpc.publicnode.com","https://base-sepolia.gateway.tenderly.co","https://base-sepolia.blockpi.network/v1/rpc/private","https://node.histori.xyz/base-sepolia/8ry9f6t9dct1se2hlagxnd9n2a"],10005:["","https://optimism-sepolia.blockpi.network/v1/rpc/private","https://sepolia.optimism.io","https://api.zan.top/opt-sepolia","https://optimism-sepolia.gateway.tenderly.co","https://optimism-sepolia.drpc.org","https://endpoints.omniatech.io/v1/op/sepolia/public"],10007:["https://rpc-amoy.polygon.technology","https://polygon-amoy-bor-rpc.publicnode.com","https://rpc.ankr.com/polygon_amoy","https://polygon-amoy.drpc.org","https://api.zan.top/polygon-amoy","https://polygon-amoy.gateway.tenderly.co"]},fe={2:["","https://eth.llamarpc.com","https://ethereum.blockpi.network/v1/rpc/public","https://eth-mainnet.nodereal.io/v1/1659dfb40aa24bbb8153a677b98064d7","https://uk.rpc.blxrbdn.com","https://singapore.rpc.blxrbdn.com","https://virginia.rpc.blxrbdn.com","https://eth-mainnet.public.blastapi.io","https://api.securerpc.com/v1","https://mainnet.gateway.tenderly.co","https://eth-pokt.nodies.app","https://eth.blockrazor.xyz","https://eth.merkle.io","https://gateway.tenderly.co/public/mainnet","https://eth.rpc.blxrbdn.com"],4:["","https://bsc.blockrazor.xyz","https://bscrpc.com","https://bsc-mainnet.public.blastapi.io","https://binance.llamarpc.com","https://go.getblock.io/cc778cdbdf5c4b028ec9456e0e6c0cf3","https://bsc-pokt.nodies.app","https://56.rpc.thirdweb.com","https://bsc.blockpi.network/v1/rpc/private","https://bsc.rpc.blxrbdn.com","https://bsc-dataseed.bnbchain.org","https://endpoints.omniatech.io/v1/bsc/mainnet/public","https://bsc-dataseed1.ninicoin.io","https://bsc-dataseed2.defibit.io","https://bsc-dataseed2.ninicoin.io","https://0.48.club","https://bsc-dataseed3.defibit.io"],5:["","https://polygon.llamarpc.com","https://polygon-rpc.com","https://rpc-mainnet.matic.quiknode.pro","https://endpoints.omniatech.io/v1/matic/mainnet/public","https://polygon-pokt.nodies.app","https://polygon-bor-rpc.publicnode.com","https://polygon.rpc.subquery.network/public","https://polygon-bor-rpc.publicnode.com","https://polygon.blockpi.network/v1/rpc/private","https://polygon.api.onfinality.io/public","https://polygon.lava.build","https://api.zan.top/polygon-mainnet","https://polygon.meowrpc.com"],6:["","https://avalanche-c-chain-rpc.publicnode.com","https://ava-mainnet.public.blastapi.io/ext/bc/C/rpc","https://endpoints.omniatech.io/v1/avax/mainnet/public","https://avalanche-c-chain-rpc.publicnode.com","https://avalanche.blockpi.network/v1/rpc/private","https://avalanche.public-rpc.com","https://avalanche.drpc.org","https://avax.meowrpc.com","https://endpoints.omniatech.io/v1/avax/mainnet/public","https://api.avax.network/ext/bc/C/rpc","https://1rpc.io/avax/c","https://avax-pokt.nodies.app/ext/bc/C/rpc","https://endpoints.omniatech.io/v1/avax/mainnet/public","https://api.zan.top/avax-mainnet/ext/bc/C/rpc"],23:["","https://arbitrum.llamarpc.com","https://arbitrum.rpc.subquery.network/public","https://endpoints.omniatech.io/v1/arbitrum/one/public","https://arbitrum.meowrpc.com","https://arbitrum.gateway.tenderly.co","https://arbitrum-one.public.blastapi.io","https://arb1.lava.build","https://arbitrum-one.publicnode.com","https://arbitrum.blockpi.network/v1/rpc/public","https://arb-pokt.nodies.app","https://api.zan.top/arb-one","https://arb1.arbitrum.io/rpc","https://arbitrum.drpc.org","https://1rpc.io/arb"],24:["","https://optimism.llamarpc.com","https://op-pokt.nodies.app","https://optimism-mainnet.public.blastapi.io","https://optimism.blockpi.network/v1/rpc/public","https://endpoints.omniatech.io/v1/op/mainnet/public","https://optimism-rpc.publicnode.com","https://optimism.drpc.org","https://1rpc.io/op","https://optimism.gateway.tenderly.co","https://optimism.lava.build","https://optimism.rpc.subquery.network/public","https://mainnet.optimism.io","https://optimism-rpc.publicnode.com","https://gateway.tenderly.co/public/optimism"],30:["","https://base.llamarpc.com","https://base-mainnet.public.blastapi.io","https://base-rpc.publicnode.com","https://base.blockpi.network/v1/rpc/public","https://base.drpc.org","https://mainnet.base.org","https://base.api.onfinality.io/public","https://base-pokt.nodies.app","https://1rpc.io/base","https://developer-access-mainnet.base.org","https://endpoints.omniatech.io/v1/base/mainnet/public","https://base.rpc.subquery.network/public","https://base.api.onfinality.io/public","https://base.meowrpc.com","https://base.gateway.tenderly.co"]};var Rt=(n=>(n[n.Off=0]="Off",n[n.Full=1]="Full",n[n.Partial=2]="Partial",n[n.Scheduled=3]="Scheduled",n))(Rt||{});var Tt=(o=>(o[o.SELF_TRADE=1]="SELF_TRADE",o[o.FULL_FILLED=2]="FULL_FILLED",o[o.FULL_CANCELLED=3]="FULL_CANCELLED",o[o.PARTIALLY_CANCELLED=4]="PARTIALLY_CANCELLED",o[o.CREATED=5]="CREATED",o))(Tt||{});var Nt=(s=>(s.USERS_READ="users.read",s.FOLLOWS_READ="follows.read",s.FOLLOWS_WRITE="follows.write",s.TWEET_READ="tweet.read",s.TWEET_WRITE="tweet.write",s.OFFLINE_ACCESS="offline.access",s.LIKE_READ="like.read",s.LIKE_WRITE="like.write",s))(Nt||{});var sr=(f=>(f.MFT_AUDIO_LINK="mft.audioLink",f.MFT_TITLE="mft.title",f.MODE_PRE_SALE="mode.preSale",f.MAKER_FEE="makerFee",f.TAKER_FEE="takerFee",f.VIEW_BASE_COIN_ICON_LINK="view.baseCoinIconLink",f.VIEW_BASE_COIN_MARKET_LINK="view.baseCoinMarketLink",f.VIEW_PRICE_COIN_ICON_LINK="view.priceCoinIconLink",f.VIEW_PRICE_COIN_MARKET_LINK="view.priceCoinMarketLink",f))(sr||{}),bt=sr;var fr=(t=>(t[t.Buy=0]="Buy",t[t.Sell=1]="Sell",t))(fr||{}),Ct=fr;var ur=(o=>(o[o.Open=1]="Open",o[o.Canceled=2]="Canceled",o[o.Matched=3]="Matched",o[o.SelfMatched=4]="SelfMatched",o[o.Expired=5]="Expired",o))(ur||{}),dt=ur;var lr=(n=>(n[n.Limit=0]="Limit",n[n.IOC=1]="IOC",n[n.POST=2]="POST",n[n.Market=3]="Market",n))(lr||{}),gt=lr;var Er=(t=>(t.User="User",t.Api="API",t))(Er||{});var Dt=(n=>(n.COMPANY="COMPANY",n.TWITTER="TWITTER",n.DISCORD="DISCORD",n.TELEGRAM="TELEGRAM",n))(Dt||{}),vt=(a=>(a[a.TWITTER_FOLLOW=1]="TWITTER_FOLLOW",a[a.TWITTER_REPLY=2]="TWITTER_REPLY",a[a.TWITTER_RETWEET=3]="TWITTER_RETWEET",a[a.TWITTER_LIKE=4]="TWITTER_LIKE",a[a.COMPANY_FIRST_LOGIN=5]="COMPANY_FIRST_LOGIN",a[a.COMPANY_CONFIRM_EMAIL=6]="COMPANY_CONFIRM_EMAIL",a[a.COMPANY_DEPOSIT=7]="COMPANY_DEPOSIT",a[a.COMPANY_TRADE=8]="COMPANY_TRADE",a[a.TELEGRAM_JOIN_GROUP=9]="TELEGRAM_JOIN_GROUP",a[a.DISCORD_JOIN_SERVER=10]="DISCORD_JOIN_SERVER",a[a.AFFILIATE_POINTS_REWARD=11]="AFFILIATE_POINTS_REWARD",a))(vt||{}),ke=[1,9,10,6,5];var Ot=(n=>(n.CREATED="created",n.STARTED="started",n.PAUSED="paused",n.CLOSED="closed",n))(Ot||{}),Lt=(t=>(t.Post="POST",t.Comment="COMMENT",t))(Lt||{});var yt=(p=>(p.INSTRUCTIONS="INSTRUCTIONS",p.TEXT_STYLE="TEXT_STYLE",p.TEXT_TONE="TEXT_TONE",p.REACTION_TYPE="REACTION_TYPE",p.COMMENT_LENGTH="COMMENT_LENGTH",p.CONTEXT="CONTEXT",p))(yt||{});var Ut=(p=>(p[p.FEE_TIER_1=1]="FEE_TIER_1",p[p.FEE_TIER_2=2]="FEE_TIER_2",p[p.FEE_TIER_3=3]="FEE_TIER_3",p[p.FEE_TIER_4=4]="FEE_TIER_4",p[p.FEE_TIER_5=5]="FEE_TIER_5",p[p.FEE_TIER_6=6]="FEE_TIER_6",p))(Ut||{}),Pt=(t=>(t[t.Approve=1]="Approve",t[t.Reject=0]="Reject",t))(Pt||{}),Bt=(o=>(o.INITIATED="INITIATED",o.CREATED="CREATED",o.PROCESSING="PROCESSING",o.APPROVED="APPROVED",o.REJECTED="REJECTED",o))(Bt||{});var St=(o=>(o.INVITED_ACCOUNTS_COUNT="invitedAccountsCount",o.CREATED_AT="createdAt",o.FEE_SHARE="feeShare",o.ADDRESS="address",o.REFERRAL_TRADING_VOLUME="referralTradingVolume",o))(St||{});var Yt=(p=>(p.ACTIVE="ACTIVE",p.FAILED="FAILED",p.STARTING="STARTING",p.DRAINING="DRAINING",p.TERMINATING="TERMINATING",p.TERMINATED="TERMINATED",p))(Yt||{}),Mt=(o=>(o.MATCHING_ENGINE="me",o.ORDER_SERVICE="ors",o.API="api",o.SOCKET_SERVICE="ws",o.TRANSACTION_SERVICE="tns",o))(Mt||{}),kt=(o=>(o.ACTIVE="ACTIVE",o.FAILED="FAILED",o.UNASSIGNED="UNASSIGNED",o.ASSIGNED="ASSIGNED",o.STARTING="STARTING",o))(kt||{});var Gt=(n=>(n.Pending="pending",n.Completed="completed",n.Failed="failed",n.Received="received",n))(Gt||{}),Ft=(i=>(i.Deposit="deposit",i.Withdraw="withdraw",i.Rebalance="rebalance",i))(Ft||{}),Wt=(i=>(i.PENDING="pending",i.COMPLETED="completed",i.FAILED="failed",i))(Wt||{}),Vt=(o=>(o.USER_TO_TMC="user_to_tmc",o.TMC_TO_USER="tmc_to_user",o.RELAYER_TO_TMC="relayer_to_tmc",o.RELAYER_TO_CODEX="relayer_to_codex",o.RELAYER_TO_CIRCLE="relayer_to_circle",o))(Vt||{});var Ht=(i=>(i.Unconfirmed="UNCONFIRMED",i.Confirmed="CONFIRMED",i.Rejected="REJECTED",i))(Ht||{}),Kt=(i=>(i.RESUBMITTED="RESUBMITTED",i.PROCESSED="PROCESSED",i.REMATCHED="REMATCHED",i))(Kt||{});var zt=(n=>(n[n.FIRST=1]="FIRST",n[n.SECOND=2]="SECOND",n[n.THIRD=3]="THIRD",n[n.FOURTH=4]="FOURTH",n))(zt||{}),Jt=(c=>(c.REBATE_TIER="rebateTier",c.CREATED_AT="createdAt",c.NAME="name",c.TAKER_FEE="takerFee",c.ENABLED="enabled",c.ADDRESS="address",c.CHAIN="chainId",c))(Jt||{});var Xt=(t=>(t.ASCENDING="ASC",t.DESCENDING="DESC",t))(Xt||{});var xr=(n=>(n.GLOBAL_PAIR_DELISTING="GLOBAL_PAIR_DELISTING",n.GLOBAL_NEW_PAIR_LISTING="GLOBAL_NEW_PAIR_LISTING",n.GLOBAL_SYSTEM_MAINTENANCE="GLOBAL_SYSTEM_MAINTENANCE",n.GLOBAL_SMART_CONTRACT_UPDATE="GLOBAL_SMART_CONTRACT_UPDATE",n))(xr||{}),mr=(i=>(i.ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT="ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT",i.ACCOUNT_KYC_STATUS_CHANGED="ACCOUNT_KYC_STATUS_CHANGED",i.ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED="ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED",i))(mr||{}),mi={...xr,...mr},qt=(i=>(i.CRITICAL="CRITICAL",i.IMPORTANT="IMPORTANT",i.INFO="INFO",i))(qt||{}),Qt=(t=>(t.UNREAD="UNREAD",t.READ="READ",t))(Qt||{}),Zt=(i=>(i.PENDING="PENDING",i.PROCESSED="PROCESSED",i.FAILED="FAILED",i))(Zt||{});var $t=(p=>(p.STRING="string",p.BOOLEAN="boolean",p.INT="int",p.FLOAT="float",p.SINGLE_CHOICE="single-choice",p.MULTI_CHOICE="multi-choice",p))($t||{});var jt=(c=>(c.VERSION="version",c.LAST_ALGO_BLOCK="last_algo_block",c.PRICES_PROVIDER_API_KEY="prices_provider_api_key",c.DEFAULT_API_DOMAIN="default_api_domain",c.NONCE_ACCOUNTS_SOLANA="nonce_accounts_solana",c.ARCHIVE_DATA_BATCH_SIZE="archive_data_batch_size",c.ARCHIVE_TASK_LOCK="archive_task_lock",c))(jt||{});var re=(i=>(i.SUCCESS="success",i.FAILED="failed",i.PENDING="pending",i))(re||{});var te=(i=>(i.SOLANA="SOLANA",i.ALGORAND="ALGORAND",i.EVM="EVM",i))(te||{});var ee=(o=>(o.CONNECTED="CONNECTED",o.CONNECTING="CONNECTING",o.DISCONNECTED="DISCONNECTED",o.DISCONNECTING="DISCONNECTING",o.PENDING="PENDING",o))(ee||{});export{mr as AccountNotificationEnum,vt as ActionEnum,Dt as ActionSource,Ft as ActionTypeEnum,St as AffiliateSortByEnum,bt as AvailablePairSettings,Wt as CCTPStatus,ae as ChainNames,wt as Chains,mi as CombinedNotificationEnum,Yt as ComponentStatusType,Mt as ComponentType,Ut as FeeTier,xr as GlobalNotificationEnum,fe as HTTPSRPC_MAINNET,se as HTTPSRPC_TESTNET,Bt as KYCAuthenticationStatus,Pt as LastLookAction,Rt as MaintenanceMode,zt as MarketMakerRebateTier,Jt as MarketMakerSortByEnum,ke as NON_REPEATABLE_ACTIONS,Tt as Notification,qt as NotificationPriorityEnum,Qt as NotificationStatusEnum,Gt as OperationStatusEnum,Ct as OrderSide,dt as OrderStatus,gt as OrderType,kt as PairComponentStatusType,yt as PromptTypeEnum,ee as RabbitConnectionStatus,Zt as ScheduledNotificationStatusEnum,Ot as SeasonStatusEnum,$t as SettingTypeColumn,Xt as SortDirectionEnum,jt as StateType,Ht as TradeStatus,Kt as TradeSubStatus,Er as TradingKeyType,Vt as TransactionType,Lt as TweetType,Nt as TwitterAccessScopeEnum,re as UpgradeStatus,te as WithdrawalWalletType};
|
|
1
|
+
function V(){throw new Error("setTimeout has not been defined")}function K(){throw new Error("clearTimeout has not been defined")}var C=V,D=K;typeof globalThis.setTimeout=="function"&&(C=setTimeout);typeof globalThis.clearTimeout=="function"&&(D=clearTimeout);function z(t){if(C===setTimeout)return setTimeout(t,0);if((C===V||!C)&&setTimeout)return C=setTimeout,setTimeout(t,0);try{return C(t,0)}catch{try{return C.call(null,t,0)}catch{return C.call(this,t,0)}}}function Tr(t){if(D===clearTimeout)return clearTimeout(t);if((D===K||!D)&&clearTimeout)return D=clearTimeout,clearTimeout(t);try{return D(t)}catch{try{return D.call(null,t)}catch{return D.call(this,t)}}}var N=[],y=!1,d,g=-1;function Ir(){!y||!d||(y=!1,d.length?N=d.concat(N):g=-1,N.length&&J())}function J(){if(!y){var t=z(Ir);y=!0;for(var r=N.length;r;){for(d=N,N=[];++g<r;)d&&d[g].run();g=-1,r=N.length}d=null,y=!1,Tr(t)}}function Rr(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];N.push(new X(t,r)),N.length===1&&!y&&z(J)}function X(t,r){this.fun=t,this.array=r}X.prototype.run=function(){this.fun.apply(null,this.array)};var wr="browser",Nr="browser",br=!0,Cr={},Dr=[],dr="",Or={},Lr={},vr={};function O(){}var yr=O,gr=O,Ur=O,Pr=O,Br=O,Mr=O,Fr=O;function kr(t){throw new Error("process.binding is not supported")}function Gr(){return"/"}function Yr(t){throw new Error("process.chdir is not supported")}function Sr(){return 0}var v=globalThis.performance||{},Wr=v.now||v.mozNow||v.msNow||v.oNow||v.webkitNow||function(){return new Date().getTime()};function Hr(t){var r=Wr.call(v)*.001,e=Math.floor(r),i=Math.floor(r%1*1e9);return t&&(e=e-t[0],i=i-t[1],i<0&&(e--,i+=1e9)),[e,i]}var Vr=new Date;function Kr(){var t=new Date,r=t-Vr;return r/1e3}var m={nextTick:Rr,title:wr,browser:br,env:Cr,argv:Dr,version:dr,versions:Or,on:yr,addListener:gr,once:Ur,off:Pr,removeListener:Br,removeAllListeners:Mr,emit:Fr,binding:kr,cwd:Gr,chdir:Yr,umask:Sr,hrtime:Hr,platform:Nr,release:Lr,config:vr,uptime:Kr},H={};Object.keys(H).forEach(t=>{let r=t.split("."),e=m;for(let i=0;i<r.length;i++){let n=r[i];i===r.length-1?e[n]=H[t]:e=e[n]||(e[n]={})}});var R=[],T=[],zr=typeof Uint8Array<"u"?Uint8Array:Array,Y=!1;function $(){Y=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)R[r]=t[r],T[t.charCodeAt(r)]=r;T[45]=62,T[95]=63}function Jr(t){Y||$();var r,e,i,n,o,p,c=t.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=t[c-2]==="="?2:t[c-1]==="="?1:0,p=new zr(c*3/4-o),i=o>0?c-4:c;var f=0;for(r=0,e=0;r<i;r+=4,e+=3)n=T[t.charCodeAt(r)]<<18|T[t.charCodeAt(r+1)]<<12|T[t.charCodeAt(r+2)]<<6|T[t.charCodeAt(r+3)],p[f++]=n>>16&255,p[f++]=n>>8&255,p[f++]=n&255;return o===2?(n=T[t.charCodeAt(r)]<<2|T[t.charCodeAt(r+1)]>>4,p[f++]=n&255):o===1&&(n=T[t.charCodeAt(r)]<<10|T[t.charCodeAt(r+1)]<<4|T[t.charCodeAt(r+2)]>>2,p[f++]=n>>8&255,p[f++]=n&255),p}function Xr(t){return R[t>>18&63]+R[t>>12&63]+R[t>>6&63]+R[t&63]}function qr(t,r,e){for(var i,n=[],o=r;o<e;o+=3)i=(t[o]<<16)+(t[o+1]<<8)+t[o+2],n.push(Xr(i));return n.join("")}function q(t){Y||$();for(var r,e=t.length,i=e%3,n="",o=[],p=16383,c=0,f=e-i;c<f;c+=p)o.push(qr(t,c,c+p>f?f:c+p));return i===1?(r=t[e-1],n+=R[r>>2],n+=R[r<<4&63],n+="=="):i===2&&(r=(t[e-2]<<8)+t[e-1],n+=R[r>>10],n+=R[r>>4&63],n+=R[r<<2&63],n+="="),o.push(n),o.join("")}a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function U(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(t,r){if(U()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=a.prototype):(t===null&&(t=new a(r)),t.length=r),t}function a(t,r,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return S(this,t)}return j(this,t,r,e)}a.poolSize=8192;a._augment=function(t){return t.__proto__=a.prototype,t};function j(t,r,e,i){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?$r(t,r,e,i):typeof r=="string"?Zr(t,r,e):jr(t,r)}a.from=function(t,r,e){return j(null,t,r,e)};a.kMaxLength=U();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&a[Symbol.species]);function rr(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Qr(t,r,e,i){return rr(r),r<=0?b(t,r):e!==void 0?typeof i=="string"?b(t,r).fill(e,i):b(t,r).fill(e):b(t,r)}a.alloc=function(t,r,e){return Qr(null,t,r,e)};function S(t,r){if(rr(r),t=b(t,r<0?0:W(r)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}a.allocUnsafe=function(t){return S(null,t)};a.allocUnsafeSlow=function(t){return S(null,t)};function Zr(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var i=er(r,e)|0;t=b(t,i);var n=t.write(r,e);return n!==i&&(t=t.slice(0,n)),t}function G(t,r){var e=r.length<0?0:W(r.length)|0;t=b(t,e);for(var i=0;i<e;i+=1)t[i]=r[i]&255;return t}function $r(t,r,e,i){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(i||0))throw new RangeError("'length' is out of bounds");return e===void 0&&i===void 0?r=new Uint8Array(r):i===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,i),a.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=a.prototype):t=G(t,r),t}function jr(t,r){if(w(r)){var e=W(r.length)|0;return t=b(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||xe(r.length)?b(t,0):G(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return G(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function W(t){if(t>=U())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+U().toString(16)+" bytes");return t|0}a.isBuffer=Te;function w(t){return!!(t!=null&&t._isBuffer)}a.compare=function(r,e){if(!w(r)||!w(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var i=r.length,n=e.length,o=0,p=Math.min(i,n);o<p;++o)if(r[o]!==e[o]){i=r[o],n=e[o];break}return i<n?-1:n<i?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var i;if(e===void 0)for(e=0,i=0;i<r.length;++i)e+=r[i].length;var n=a.allocUnsafe(e),o=0;for(i=0;i<r.length;++i){var p=r[i];if(!w(p))throw new TypeError('"list" argument must be an Array of Buffers');p.copy(n,o),o+=p.length}return n};function er(t,r){if(w(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return P(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return cr(t).length;default:if(i)return P(t).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=er;function re(t,r,e){var i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return fe(this,r,e);case"utf8":case"utf-8":return nr(this,r,e);case"ascii":return ce(this,r,e);case"latin1":case"binary":return he(this,r,e);case"base64":return pe(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,r,e);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}a.prototype._isBuffer=!0;function L(t,r,e){var i=t[r];t[r]=t[e],t[e]=i}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)L(this,e,e+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)L(this,e,e+3),L(this,e+1,e+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)L(this,e,e+7),L(this,e+1,e+6),L(this,e+2,e+5),L(this,e+3,e+4);return this};a.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?nr(this,0,r):re.apply(this,arguments)};a.prototype.equals=function(r){if(!w(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.compare=function(r,e,i,n,o){if(!w(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),e<0||i>r.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=i)return 0;if(n>=o)return-1;if(e>=i)return 1;if(e>>>=0,i>>>=0,n>>>=0,o>>>=0,this===r)return 0;for(var p=o-n,c=i-e,f=Math.min(p,c),u=this.slice(n,o),E=r.slice(e,i),h=0;h<f;++h)if(u[h]!==E[h]){p=u[h],c=E[h];break}return p<c?-1:c<p?1:0};function tr(t,r,e,i,n){if(t.length===0)return-1;if(typeof e=="string"?(i=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=n?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(n)return-1;e=t.length-1}else if(e<0)if(n)e=0;else return-1;if(typeof r=="string"&&(r=a.from(r,i)),w(r))return r.length===0?-1:Q(t,r,e,i,n);if(typeof r=="number")return r=r&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):Q(t,[r],e,i,n);throw new TypeError("val must be string, number or Buffer")}function Q(t,r,e,i,n){var o=1,p=t.length,c=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||r.length<2)return-1;o=2,p/=2,c/=2,e/=2}function f(x,s){return o===1?x[s]:x.readUInt16BE(s*o)}var u;if(n){var E=-1;for(u=e;u<p;u++)if(f(t,u)===f(r,E===-1?0:u-E)){if(E===-1&&(E=u),u-E+1===c)return E*o}else E!==-1&&(u-=u-E),E=-1}else for(e+c>p&&(e=p-c),u=e;u>=0;u--){for(var h=!0,I=0;I<c;I++)if(f(t,u+I)!==f(r,I)){h=!1;break}if(h)return u}return-1}a.prototype.includes=function(r,e,i){return this.indexOf(r,e,i)!==-1};a.prototype.indexOf=function(r,e,i){return tr(this,r,e,i,!0)};a.prototype.lastIndexOf=function(r,e,i){return tr(this,r,e,i,!1)};function ee(t,r,e,i){e=Number(e)||0;var n=t.length-e;i?(i=Number(i),i>n&&(i=n)):i=n;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var p=0;p<i;++p){var c=parseInt(r.substr(p*2,2),16);if(isNaN(c))return p;t[e+p]=c}return p}function te(t,r,e,i){return F(P(r,t.length-e),t,e,i)}function ir(t,r,e,i){return F(Ae(r),t,e,i)}function ie(t,r,e,i){return ir(t,r,e,i)}function ne(t,r,e,i){return F(cr(r),t,e,i)}function oe(t,r,e,i){return F(_e(r,t.length-e),t,e,i)}a.prototype.write=function(r,e,i,n){if(e===void 0)n="utf8",i=this.length,e=0;else if(i===void 0&&typeof e=="string")n=e,i=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(i)?(i=i|0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((i===void 0||i>o)&&(i=o),r.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return ee(this,r,e,i);case"utf8":case"utf-8":return te(this,r,e,i);case"ascii":return ir(this,r,e,i);case"latin1":case"binary":return ie(this,r,e,i);case"base64":return ne(this,r,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,r,e,i);default:if(p)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function pe(t,r,e){return r===0&&e===t.length?q(t):q(t.slice(r,e))}function nr(t,r,e){e=Math.min(t.length,e);for(var i=[],n=r;n<e;){var o=t[n],p=null,c=o>239?4:o>223?3:o>191?2:1;if(n+c<=e){var f,u,E,h;switch(c){case 1:o<128&&(p=o);break;case 2:f=t[n+1],(f&192)===128&&(h=(o&31)<<6|f&63,h>127&&(p=h));break;case 3:f=t[n+1],u=t[n+2],(f&192)===128&&(u&192)===128&&(h=(o&15)<<12|(f&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(p=h));break;case 4:f=t[n+1],u=t[n+2],E=t[n+3],(f&192)===128&&(u&192)===128&&(E&192)===128&&(h=(o&15)<<18|(f&63)<<12|(u&63)<<6|E&63,h>65535&&h<1114112&&(p=h))}}p===null?(p=65533,c=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|p&1023),i.push(p),n+=c}return ae(i)}var Z=4096;function ae(t){var r=t.length;if(r<=Z)return String.fromCharCode.apply(String,t);for(var e="",i=0;i<r;)e+=String.fromCharCode.apply(String,t.slice(i,i+=Z));return e}function ce(t,r,e){var i="";e=Math.min(t.length,e);for(var n=r;n<e;++n)i+=String.fromCharCode(t[n]&127);return i}function he(t,r,e){var i="";e=Math.min(t.length,e);for(var n=r;n<e;++n)i+=String.fromCharCode(t[n]);return i}function fe(t,r,e){var i=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>i)&&(e=i);for(var n="",o=r;o<e;++o)n+=me(t[o]);return n}function ue(t,r,e){for(var i=t.slice(r,e),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}a.prototype.slice=function(r,e){var i=this.length;r=~~r,e=e===void 0?i:~~e,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),e<r&&(e=r);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(r,e),n.__proto__=a.prototype;else{var o=e-r;n=new a(o,void 0);for(var p=0;p<o;++p)n[p]=this[p+r]}return n};function A(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUIntLE=function(r,e,i){r=r|0,e=e|0,i||A(r,e,this.length);for(var n=this[r],o=1,p=0;++p<e&&(o*=256);)n+=this[r+p]*o;return n};a.prototype.readUIntBE=function(r,e,i){r=r|0,e=e|0,i||A(r,e,this.length);for(var n=this[r+--e],o=1;e>0&&(o*=256);)n+=this[r+--e]*o;return n};a.prototype.readUInt8=function(r,e){return e||A(r,1,this.length),this[r]};a.prototype.readUInt16LE=function(r,e){return e||A(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUInt16BE=function(r,e){return e||A(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUInt32LE=function(r,e){return e||A(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUInt32BE=function(r,e){return e||A(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,e,i){r=r|0,e=e|0,i||A(r,e,this.length);for(var n=this[r],o=1,p=0;++p<e&&(o*=256);)n+=this[r+p]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n};a.prototype.readIntBE=function(r,e,i){r=r|0,e=e|0,i||A(r,e,this.length);for(var n=e,o=1,p=this[r+--n];n>0&&(o*=256);)p+=this[r+--n]*o;return o*=128,p>=o&&(p-=Math.pow(2,8*e)),p};a.prototype.readInt8=function(r,e){return e||A(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,e){e||A(r,2,this.length);var i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};a.prototype.readInt16BE=function(r,e){e||A(r,2,this.length);var i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};a.prototype.readInt32LE=function(r,e){return e||A(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,e){return e||A(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,e){return e||A(r,4,this.length),k(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,e){return e||A(r,4,this.length),k(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,e){return e||A(r,8,this.length),k(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,e){return e||A(r,8,this.length),k(this,r,!1,52,8)};function _(t,r,e,i,n,o){if(!w(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<o)throw new RangeError('"value" argument is out of bounds');if(e+i>t.length)throw new RangeError("Index out of range")}a.prototype.writeUIntLE=function(r,e,i,n){if(r=+r,e=e|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;_(this,r,e,i,o,0)}var p=1,c=0;for(this[e]=r&255;++c<i&&(p*=256);)this[e+c]=r/p&255;return e+i};a.prototype.writeUIntBE=function(r,e,i,n){if(r=+r,e=e|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;_(this,r,e,i,o,0)}var p=i-1,c=1;for(this[e+p]=r&255;--p>=0&&(c*=256);)this[e+p]=r/c&255;return e+i};a.prototype.writeUInt8=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function B(t,r,e,i){r<0&&(r=65535+r+1);for(var n=0,o=Math.min(t.length-e,2);n<o;++n)t[e+n]=(r&255<<8*(i?n:1-n))>>>(i?n:1-n)*8}a.prototype.writeUInt16LE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):B(this,r,e,!0),e+2};a.prototype.writeUInt16BE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):B(this,r,e,!1),e+2};function M(t,r,e,i){r<0&&(r=4294967295+r+1);for(var n=0,o=Math.min(t.length-e,4);n<o;++n)t[e+n]=r>>>(i?n:3-n)*8&255}a.prototype.writeUInt32LE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):M(this,r,e,!0),e+4};a.prototype.writeUInt32BE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};a.prototype.writeIntLE=function(r,e,i,n){if(r=+r,e=e|0,!n){var o=Math.pow(2,8*i-1);_(this,r,e,i,o-1,-o)}var p=0,c=1,f=0;for(this[e]=r&255;++p<i&&(c*=256);)r<0&&f===0&&this[e+p-1]!==0&&(f=1),this[e+p]=(r/c>>0)-f&255;return e+i};a.prototype.writeIntBE=function(r,e,i,n){if(r=+r,e=e|0,!n){var o=Math.pow(2,8*i-1);_(this,r,e,i,o-1,-o)}var p=i-1,c=1,f=0;for(this[e+p]=r&255;--p>=0&&(c*=256);)r<0&&f===0&&this[e+p+1]!==0&&(f=1),this[e+p]=(r/c>>0)-f&255;return e+i};a.prototype.writeInt8=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};a.prototype.writeInt16LE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):B(this,r,e,!0),e+2};a.prototype.writeInt16BE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):B(this,r,e,!1),e+2};a.prototype.writeInt32LE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):M(this,r,e,!0),e+4};a.prototype.writeInt32BE=function(r,e,i){return r=+r,e=e|0,i||_(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):M(this,r,e,!1),e+4};function or(t,r,e,i,n,o){if(e+i>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function pr(t,r,e,i,n){return n||or(t,r,e,4,34028234663852886e22,-34028234663852886e22),fr(t,r,e,i,23,4),e+4}a.prototype.writeFloatLE=function(r,e,i){return pr(this,r,e,!0,i)};a.prototype.writeFloatBE=function(r,e,i){return pr(this,r,e,!1,i)};function ar(t,r,e,i,n){return n||or(t,r,e,8,17976931348623157e292,-17976931348623157e292),fr(t,r,e,i,52,8),e+8}a.prototype.writeDoubleLE=function(r,e,i){return ar(this,r,e,!0,i)};a.prototype.writeDoubleBE=function(r,e,i){return ar(this,r,e,!1,i)};a.prototype.copy=function(r,e,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),e>=r.length&&(e=r.length),e||(e=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-e<n-i&&(n=r.length-e+i);var o=n-i,p;if(this===r&&i<e&&e<n)for(p=o-1;p>=0;--p)r[p+e]=this[p+i];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(p=0;p<o;++p)r[p+e]=this[p+i];else Uint8Array.prototype.set.call(r,this.subarray(i,i+o),e);return o};a.prototype.fill=function(r,e,i,n){if(typeof r=="string"){if(typeof e=="string"?(n=e,e=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),r.length===1){var o=r.charCodeAt(0);o<256&&(r=o)}if(n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;e=e>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);var p;if(typeof r=="number")for(p=e;p<i;++p)this[p]=r;else{var c=w(r)?r:P(new a(r,n).toString()),f=c.length;for(p=0;p<i-e;++p)this[p+e]=c[p%f]}return this};var se=/[^+\/0-9A-Za-z-_]/g;function le(t){if(t=Ee(t).replace(se,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Ee(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function me(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,r){r=r||1/0;for(var e,i=t.length,n=null,o=[],p=0;p<i;++p){if(e=t.charCodeAt(p),e>55295&&e<57344){if(!n){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(p+1===i){(r-=3)>-1&&o.push(239,191,189);continue}n=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),n=e;continue}e=(n-55296<<10|e-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Ae(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function _e(t,r){for(var e,i,n,o=[],p=0;p<t.length&&!((r-=2)<0);++p)e=t.charCodeAt(p),i=e>>8,n=e%256,o.push(n),o.push(i);return o}function cr(t){return Jr(le(t))}function F(t,r,e,i){for(var n=0;n<i&&!(n+e>=r.length||n>=t.length);++n)r[n+e]=t[n];return n}function xe(t){return t!==t}function Te(t){return t!=null&&(!!t._isBuffer||hr(t)||Ie(t))}function hr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Ie(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&hr(t.slice(0,0))}function k(t,r,e,i,n){var o,p,c=n*8-i-1,f=(1<<c)-1,u=f>>1,E=-7,h=e?n-1:0,I=e?-1:1,x=t[r+h];for(h+=I,o=x&(1<<-E)-1,x>>=-E,E+=c;E>0;o=o*256+t[r+h],h+=I,E-=8);for(p=o&(1<<-E)-1,o>>=-E,E+=i;E>0;p=p*256+t[r+h],h+=I,E-=8);if(o===0)o=1-u;else{if(o===f)return p?NaN:(x?-1:1)*(1/0);p=p+Math.pow(2,i),o=o-u}return(x?-1:1)*p*Math.pow(2,o-i)}function fr(t,r,e,i,n,o){var p,c,f,u=o*8-n-1,E=(1<<u)-1,h=E>>1,I=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=i?0:o-1,s=i?1:-1,xr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,p=E):(p=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-p))<1&&(p--,f*=2),p+h>=1?r+=I/f:r+=I*Math.pow(2,1-h),r*f>=2&&(p++,f/=2),p+h>=E?(c=0,p=E):p+h>=1?(c=(r*f-1)*Math.pow(2,n),p=p+h):(c=r*Math.pow(2,h-1)*Math.pow(2,n),p=0));n>=8;t[e+x]=c&255,x+=s,c/=256,n-=8);for(p=p<<n|c,u+=n;u>0;t[e+x]=p&255,x+=s,p/=256,u-=8);t[e+x-s]|=xr*128}var Re=(s=>(s[s.Solana=1]="Solana",s[s.Algorand=8]="Algorand",s[s.Polygon=5]="Polygon",s[s.Bsc=4]="Bsc",s[s.Avalanche=6]="Avalanche",s[s.Arbitrum=23]="Arbitrum",s[s.Optimism=24]="Optimism",s[s.Base=30]="Base",s[s.Ethereum=2]="Ethereum",s[s.Sepolia=10002]="Sepolia",s[s.ArbitrumSepolia=10003]="ArbitrumSepolia",s[s.BaseSepolia=10004]="BaseSepolia",s[s.OptimismSepolia=10005]="OptimismSepolia",s[s.PolygonAmoy=10007]="PolygonAmoy",s))(Re||{}),ut={1:"Solana",2:"Ethereum",5:"Polygon",4:"BNB Chain",6:"Avalanche",8:"Algorand",23:"Arbitrum",24:"Optimism",30:"Base",10002:"Ethereum Sepolia",10003:"Arbitrum Sepolia",10004:"Base Sepolia",10005:"Optimism Sepolia",10007:"Polygon Amoy"},st={4:["","https://bsc-testnet.public.blastapi.io","https://bsc-testnet.blockpi.network/v1/rpc/private","https://bsc-testnet-rpc.publicnode.com","https://api.zan.top/bsc-testnet","https://data-seed-prebsc-2-s1.bnbchain.org:8545","https://data-seed-prebsc-2-s2.bnbchain.org:8545","https://data-seed-prebsc-2-s3.bnbchain.org:8545","https://data-seed-prebsc-1-s1.bnbchain.org:8545","https://data-seed-prebsc-1-s2.bnbchain.org:8545","https://data-seed-prebsc-1-s3.bnbchain.org:8545","https://endpoints.omniatech.io/v1/bsc/testnet/public"],6:["","https://rpc.ankr.com/avalanche_fuji","https://rpc.ankr.com/avalanche_fuji-c","https://api.avax-test.network/ext/bc/C/rpc","https://ava-testnet.public.blastapi.io/ext/bc/C/rpc","https://endpoints.omniatech.io/v1/avax/fuji/public","https://avalanche-fuji.blockpi.network/v1/rpc/private","https://avalanche-fuji-c-chain-rpc.publicnode.com","https://avalanche-fuji.blockpi.network/v1/rpc/private"],10002:["https://ethereum-sepolia-rpc.publicnode.com","https://sepolia.gateway.tenderly.co","https://eth-sepolia.public.blastapi.io","https://ethereum-sepolia.blockpi.network/v1/rpc/private","https://sepolia.drpc.org","https://endpoints.omniatech.io/v1/eth/sepolia/public","https://1rpc.io/sepolia","https://gateway.tenderly.co/public/sepolia","https://sepolia.gateway.tenderly.co","https://api.zan.top/eth-sepolia","https://ethereum-sepolia.rpc.subquery.network/public"],10003:["","https://arbitrum-sepolia.blockpi.network/v1/rpc/private ","https://arbitrum-sepolia.gateway.tenderly.co","https://endpoints.omniatech.io/v1/arbitrum/sepolia/public","https://api.zan.top/arb-sepolia","https://sepolia-rollup.arbitrum.io/rpc"],10004:["","https://sepolia.base.org","https://base-sepolia-rpc.publicnode.com","https://base-sepolia.gateway.tenderly.co","https://base-sepolia.blockpi.network/v1/rpc/private","https://node.histori.xyz/base-sepolia/8ry9f6t9dct1se2hlagxnd9n2a"],10005:["","https://optimism-sepolia.blockpi.network/v1/rpc/private","https://sepolia.optimism.io","https://api.zan.top/opt-sepolia","https://optimism-sepolia.gateway.tenderly.co","https://optimism-sepolia.drpc.org","https://endpoints.omniatech.io/v1/op/sepolia/public"],10007:["https://rpc-amoy.polygon.technology","https://polygon-amoy-bor-rpc.publicnode.com","https://rpc.ankr.com/polygon_amoy","https://polygon-amoy.drpc.org","https://api.zan.top/polygon-amoy","https://polygon-amoy.gateway.tenderly.co"]},lt={2:["","https://eth.llamarpc.com","https://ethereum.blockpi.network/v1/rpc/public","https://eth-mainnet.nodereal.io/v1/1659dfb40aa24bbb8153a677b98064d7","https://uk.rpc.blxrbdn.com","https://singapore.rpc.blxrbdn.com","https://virginia.rpc.blxrbdn.com","https://eth-mainnet.public.blastapi.io","https://api.securerpc.com/v1","https://mainnet.gateway.tenderly.co","https://eth-pokt.nodies.app","https://eth.blockrazor.xyz","https://eth.merkle.io","https://gateway.tenderly.co/public/mainnet","https://eth.rpc.blxrbdn.com"],4:["","https://bsc.blockrazor.xyz","https://bscrpc.com","https://bsc-mainnet.public.blastapi.io","https://binance.llamarpc.com","https://go.getblock.io/cc778cdbdf5c4b028ec9456e0e6c0cf3","https://bsc-pokt.nodies.app","https://56.rpc.thirdweb.com","https://bsc.blockpi.network/v1/rpc/private","https://bsc.rpc.blxrbdn.com","https://bsc-dataseed.bnbchain.org","https://endpoints.omniatech.io/v1/bsc/mainnet/public","https://bsc-dataseed1.ninicoin.io","https://bsc-dataseed2.defibit.io","https://bsc-dataseed2.ninicoin.io","https://0.48.club","https://bsc-dataseed3.defibit.io"],5:["","https://polygon.llamarpc.com","https://polygon-rpc.com","https://rpc-mainnet.matic.quiknode.pro","https://endpoints.omniatech.io/v1/matic/mainnet/public","https://polygon-pokt.nodies.app","https://polygon-bor-rpc.publicnode.com","https://polygon.rpc.subquery.network/public","https://polygon-bor-rpc.publicnode.com","https://polygon.blockpi.network/v1/rpc/private","https://polygon.api.onfinality.io/public","https://polygon.lava.build","https://api.zan.top/polygon-mainnet","https://polygon.meowrpc.com"],6:["","https://avalanche-c-chain-rpc.publicnode.com","https://ava-mainnet.public.blastapi.io/ext/bc/C/rpc","https://endpoints.omniatech.io/v1/avax/mainnet/public","https://avalanche-c-chain-rpc.publicnode.com","https://avalanche.blockpi.network/v1/rpc/private","https://avalanche.public-rpc.com","https://avalanche.drpc.org","https://avax.meowrpc.com","https://endpoints.omniatech.io/v1/avax/mainnet/public","https://api.avax.network/ext/bc/C/rpc","https://1rpc.io/avax/c","https://avax-pokt.nodies.app/ext/bc/C/rpc","https://endpoints.omniatech.io/v1/avax/mainnet/public","https://api.zan.top/avax-mainnet/ext/bc/C/rpc"],23:["","https://arbitrum.llamarpc.com","https://arbitrum.rpc.subquery.network/public","https://endpoints.omniatech.io/v1/arbitrum/one/public","https://arbitrum.meowrpc.com","https://arbitrum.gateway.tenderly.co","https://arbitrum-one.public.blastapi.io","https://arb1.lava.build","https://arbitrum-one.publicnode.com","https://arbitrum.blockpi.network/v1/rpc/public","https://arb-pokt.nodies.app","https://api.zan.top/arb-one","https://arb1.arbitrum.io/rpc","https://arbitrum.drpc.org","https://1rpc.io/arb"],24:["","https://optimism.llamarpc.com","https://op-pokt.nodies.app","https://optimism-mainnet.public.blastapi.io","https://optimism.blockpi.network/v1/rpc/public","https://endpoints.omniatech.io/v1/op/mainnet/public","https://optimism-rpc.publicnode.com","https://optimism.drpc.org","https://1rpc.io/op","https://optimism.gateway.tenderly.co","https://optimism.lava.build","https://optimism.rpc.subquery.network/public","https://mainnet.optimism.io","https://optimism-rpc.publicnode.com","https://gateway.tenderly.co/public/optimism"],30:["","https://base.llamarpc.com","https://base-mainnet.public.blastapi.io","https://base-rpc.publicnode.com","https://base.blockpi.network/v1/rpc/public","https://base.drpc.org","https://mainnet.base.org","https://base.api.onfinality.io/public","https://base-pokt.nodies.app","https://1rpc.io/base","https://developer-access-mainnet.base.org","https://endpoints.omniatech.io/v1/base/mainnet/public","https://base.rpc.subquery.network/public","https://base.api.onfinality.io/public","https://base.meowrpc.com","https://base.gateway.tenderly.co"]};var we=(n=>(n[n.Off=0]="Off",n[n.Full=1]="Full",n[n.Partial=2]="Partial",n[n.Scheduled=3]="Scheduled",n))(we||{});var Ne=(o=>(o[o.SELF_TRADE=1]="SELF_TRADE",o[o.FULL_FILLED=2]="FULL_FILLED",o[o.FULL_CANCELLED=3]="FULL_CANCELLED",o[o.PARTIALLY_CANCELLED=4]="PARTIALLY_CANCELLED",o[o.CREATED=5]="CREATED",o))(Ne||{});var be=(f=>(f.USERS_READ="users.read",f.FOLLOWS_READ="follows.read",f.FOLLOWS_WRITE="follows.write",f.TWEET_READ="tweet.read",f.TWEET_WRITE="tweet.write",f.OFFLINE_ACCESS="offline.access",f.LIKE_READ="like.read",f.LIKE_WRITE="like.write",f))(be||{});var ur=(u=>(u.MFT_AUDIO_LINK="mft.audioLink",u.MFT_TITLE="mft.title",u.MODE_PRE_SALE="mode.preSale",u.MAKER_FEE="makerFee",u.TAKER_FEE="takerFee",u.VIEW_BASE_COIN_ICON_LINK="view.baseCoinIconLink",u.VIEW_BASE_COIN_MARKET_LINK="view.baseCoinMarketLink",u.VIEW_PRICE_COIN_ICON_LINK="view.priceCoinIconLink",u.VIEW_PRICE_COIN_MARKET_LINK="view.priceCoinMarketLink",u))(ur||{}),Ce=ur;var sr=(e=>(e[e.Buy=0]="Buy",e[e.Sell=1]="Sell",e))(sr||{}),De=sr;var lr=(o=>(o[o.Open=1]="Open",o[o.Canceled=2]="Canceled",o[o.Matched=3]="Matched",o[o.SelfMatched=4]="SelfMatched",o[o.Expired=5]="Expired",o))(lr||{}),de=lr;var Er=(n=>(n[n.Limit=0]="Limit",n[n.IOC=1]="IOC",n[n.POST=2]="POST",n[n.Market=3]="Market",n))(Er||{}),Oe=Er;var mr=(e=>(e.User="User",e.Api="API",e))(mr||{});var Le=(n=>(n.COMPANY="COMPANY",n.TWITTER="TWITTER",n.DISCORD="DISCORD",n.TELEGRAM="TELEGRAM",n))(Le||{}),ve=(h=>(h[h.TWITTER_FOLLOW=1]="TWITTER_FOLLOW",h[h.TWITTER_REPLY=2]="TWITTER_REPLY",h[h.TWITTER_RETWEET=3]="TWITTER_RETWEET",h[h.TWITTER_LIKE=4]="TWITTER_LIKE",h[h.COMPANY_FIRST_LOGIN=5]="COMPANY_FIRST_LOGIN",h[h.COMPANY_CONFIRM_EMAIL=6]="COMPANY_CONFIRM_EMAIL",h[h.COMPANY_DEPOSIT=7]="COMPANY_DEPOSIT",h[h.COMPANY_TRADE=8]="COMPANY_TRADE",h[h.TELEGRAM_JOIN_GROUP=9]="TELEGRAM_JOIN_GROUP",h[h.DISCORD_JOIN_SERVER=10]="DISCORD_JOIN_SERVER",h[h.AFFILIATE_POINTS_REWARD=11]="AFFILIATE_POINTS_REWARD",h))(ve||{}),St=[1,9,10,6,5];var ye=(n=>(n.CREATED="created",n.STARTED="started",n.PAUSED="paused",n.CLOSED="closed",n))(ye||{}),ge=(e=>(e.Post="POST",e.Comment="COMMENT",e))(ge||{});var Ue=(p=>(p.INSTRUCTIONS="INSTRUCTIONS",p.TEXT_STYLE="TEXT_STYLE",p.TEXT_TONE="TEXT_TONE",p.REACTION_TYPE="REACTION_TYPE",p.COMMENT_LENGTH="COMMENT_LENGTH",p.CONTEXT="CONTEXT",p))(Ue||{});var Pe=(p=>(p[p.FEE_TIER_1=1]="FEE_TIER_1",p[p.FEE_TIER_2=2]="FEE_TIER_2",p[p.FEE_TIER_3=3]="FEE_TIER_3",p[p.FEE_TIER_4=4]="FEE_TIER_4",p[p.FEE_TIER_5=5]="FEE_TIER_5",p[p.FEE_TIER_6=6]="FEE_TIER_6",p))(Pe||{}),Be=(e=>(e[e.Approve=1]="Approve",e[e.Reject=0]="Reject",e))(Be||{}),Me=(o=>(o.INITIATED="INITIATED",o.CREATED="CREATED",o.PROCESSING="PROCESSING",o.APPROVED="APPROVED",o.REJECTED="REJECTED",o))(Me||{});var Fe=(o=>(o.INVITED_ACCOUNTS_COUNT="invitedAccountsCount",o.CREATED_AT="createdAt",o.FEE_SHARE="feeShare",o.ADDRESS="address",o.REFERRAL_TRADING_VOLUME="referralTradingVolume",o))(Fe||{});var ke=(p=>(p.ACTIVE="ACTIVE",p.FAILED="FAILED",p.STARTING="STARTING",p.DRAINING="DRAINING",p.TERMINATING="TERMINATING",p.TERMINATED="TERMINATED",p))(ke||{}),Ge=(o=>(o.MATCHING_ENGINE="me",o.ORDER_SERVICE="ors",o.API="api",o.SOCKET_SERVICE="ws",o.TRANSACTION_SERVICE="tns",o))(Ge||{}),Ye=(o=>(o.ACTIVE="ACTIVE",o.FAILED="FAILED",o.UNASSIGNED="UNASSIGNED",o.ASSIGNED="ASSIGNED",o.STARTING="STARTING",o))(Ye||{});var Se=(n=>(n.Pending="pending",n.Completed="completed",n.Failed="failed",n.Received="received",n))(Se||{}),We=(i=>(i.Deposit="deposit",i.Withdraw="withdraw",i.Rebalance="rebalance",i))(We||{}),He=(i=>(i.PENDING="pending",i.COMPLETED="completed",i.FAILED="failed",i))(He||{}),Ve=(o=>(o.USER_TO_TMC="user_to_tmc",o.TMC_TO_USER="tmc_to_user",o.RELAYER_TO_TMC="relayer_to_tmc",o.RELAYER_TO_CODEX="relayer_to_codex",o.RELAYER_TO_CIRCLE="relayer_to_circle",o))(Ve||{});var Ke=(i=>(i.Unconfirmed="UNCONFIRMED",i.Confirmed="CONFIRMED",i.Rejected="REJECTED",i))(Ke||{}),ze=(i=>(i.RESUBMITTED="RESUBMITTED",i.PROCESSED="PROCESSED",i.REMATCHED="REMATCHED",i))(ze||{});var Je=(n=>(n[n.FIRST=1]="FIRST",n[n.SECOND=2]="SECOND",n[n.THIRD=3]="THIRD",n[n.FOURTH=4]="FOURTH",n))(Je||{}),Xe=(c=>(c.REBATE_TIER="rebateTier",c.CREATED_AT="createdAt",c.NAME="name",c.TAKER_FEE="takerFee",c.ENABLED="enabled",c.ADDRESS="address",c.CHAIN="chainId",c))(Xe||{});var qe=(e=>(e.ASCENDING="ASC",e.DESCENDING="DESC",e))(qe||{});var Ar=(n=>(n.GLOBAL_PAIR_DELISTING="GLOBAL_PAIR_DELISTING",n.GLOBAL_NEW_PAIR_LISTING="GLOBAL_NEW_PAIR_LISTING",n.GLOBAL_SYSTEM_MAINTENANCE="GLOBAL_SYSTEM_MAINTENANCE",n.GLOBAL_SMART_CONTRACT_UPDATE="GLOBAL_SMART_CONTRACT_UPDATE",n))(Ar||{}),_r=(i=>(i.ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT="ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT",i.ACCOUNT_KYC_STATUS_CHANGED="ACCOUNT_KYC_STATUS_CHANGED",i.ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED="ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED",i))(_r||{}),xi={...Ar,..._r},Qe=(i=>(i.CRITICAL="CRITICAL",i.IMPORTANT="IMPORTANT",i.INFO="INFO",i))(Qe||{}),Ze=(e=>(e.UNREAD="UNREAD",e.READ="READ",e))(Ze||{}),$e=(i=>(i.PENDING="PENDING",i.PROCESSED="PROCESSED",i.FAILED="FAILED",i))($e||{});var je=(p=>(p.STRING="string",p.BOOLEAN="boolean",p.INT="int",p.FLOAT="float",p.SINGLE_CHOICE="single-choice",p.MULTI_CHOICE="multi-choice",p))(je||{});var rt=(c=>(c.VERSION="version",c.LAST_ALGO_BLOCK="last_algo_block",c.PRICES_PROVIDER_API_KEY="prices_provider_api_key",c.DEFAULT_API_DOMAIN="default_api_domain",c.NONCE_ACCOUNTS_SOLANA="nonce_accounts_solana",c.ARCHIVE_DATA_BATCH_SIZE="archive_data_batch_size",c.ARCHIVE_TASK_LOCK="archive_task_lock",c))(rt||{});var et=(i=>(i.SUCCESS="success",i.FAILED="failed",i.PENDING="pending",i))(et||{});var tt=(i=>(i.SOLANA="SOLANA",i.ALGORAND="ALGORAND",i.EVM="EVM",i))(tt||{});var it=(o=>(o.CONNECTED="CONNECTED",o.CONNECTING="CONNECTING",o.DISCONNECTED="DISCONNECTED",o.DISCONNECTING="DISCONNECTING",o.PENDING="PENDING",o))(it||{});var nt=(l=>(l.ENABLED="company.enabled",l.APP_TITLE="company.appTitle",l.DOMAIN="company.domain",l.DIRECT_SETTLE="company.directSettlement",l.KYC="markets.kycTradeRequirementEnabled",l.GEOBLOCK="company.geoblock",l.LOGO="appearance.logo",l.THEMES="appearance.themes",l.NEW_TAB="appearance.newTab",l.TARGET="appearance.target",l.REPORT_BUTTONS="appearance.reportButtons",l.CUSTOM_MENU_ITEMS="appearance.customMenuItems",l.APPEARANCE_CHART_TYPE="appearance.chartType",l.APPEARANCE_CHART_INT="appearance.chartInt",l.AMM="product.amm",l.OBDEX="product.obdex",l.POINTS="product.pointSystem",l.AFFILIATE_DASHBOARD_THRESHOLD="product.affiliateDashboardThreshold",l.AFFILIATE_DEFAULT_FEE_SHARE="product.affiliateDefaultFeeShare",l.AFFILIATE_DASHBOARD_VISIBILITY="product.affiliateDashboardVisibility",l.AMM_FEE="company.ammFee",l.FEE_SHARE="company.feeShare",l.MIN_FEE="company.minFee",l.MAKER_FEE="company.makerFee",l.TAKER_FEE="company.takerFee",l.PINNED_PAIRS="markets.pinnedPairs",l.TWITTER_ENABLED="point-system.twitterEnabled",l.TWITTER_JOB_ENABLED="point-system.twitterJobEnabled",l.TWITTER_HASHTAGS="point-system.twitterHashtags",l.TWITTER_ACCOUNT_NAME="point-system.twitterAccountName",l.DISCORD_ENABLED="point-system.discordEnabled",l.TELEGRAM_ENABLED="point-system.telegramEnabled",l.TELEGRAM_GROUP_NAME="point-system.telegramGroupName",l.TELEGRAM_BOT_NAME="point-system.telegramBotName",l.GUIDE_LINK="point-system.guideLink",l))(nt||{});export{_r as AccountNotificationEnum,ve as ActionEnum,Le as ActionSource,We as ActionTypeEnum,Fe as AffiliateSortByEnum,Ce as AvailablePairSettings,He as CCTPStatus,ut as ChainNames,Re as Chains,xi as CombinedNotificationEnum,ke as ComponentStatusType,Ge as ComponentType,Pe as FeeTier,Ar as GlobalNotificationEnum,lt as HTTPSRPC_MAINNET,st as HTTPSRPC_TESTNET,Me as KYCAuthenticationStatus,Be as LastLookAction,we as MaintenanceMode,Je as MarketMakerRebateTier,Xe as MarketMakerSortByEnum,St as NON_REPEATABLE_ACTIONS,Ne as Notification,Qe as NotificationPriorityEnum,Ze as NotificationStatusEnum,Se as OperationStatusEnum,De as OrderSide,de as OrderStatus,Oe as OrderType,Ye as PairComponentStatusType,Ue as PromptTypeEnum,it as RabbitConnectionStatus,$e as ScheduledNotificationStatusEnum,ye as SeasonStatusEnum,nt as SettingIds,je as SettingTypeColumn,qe as SortDirectionEnum,rt as StateType,Ke as TradeStatus,ze as TradeSubStatus,mr as TradingKeyType,Ve as TransactionType,ge as TweetType,be as TwitterAccessScopeEnum,et as UpgradeStatus,tt as WithdrawalWalletType};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function J(){throw new Error("setTimeout has not been defined")}function $(){throw new Error("clearTimeout has not been defined")}var x=J,N=$;typeof globalThis.setTimeout=="function"&&(x=setTimeout);typeof globalThis.clearTimeout=="function"&&(N=clearTimeout);function Z(t){if(x===setTimeout)return setTimeout(t,0);if((x===J||!x)&&setTimeout)return x=setTimeout,setTimeout(t,0);try{return x(t,0)}catch{try{return x.call(null,t,0)}catch{return x.call(this,t,0)}}}function xr(t){if(N===clearTimeout)return clearTimeout(t);if((N===$||!N)&&clearTimeout)return N=clearTimeout,clearTimeout(t);try{return N(t)}catch{try{return N.call(null,t)}catch{return N.call(this,t)}}}var I=[],y=!1,O,U=-1;function Nr(){!y||!O||(y=!1,O.length?I=O.concat(I):U=-1,I.length&&j())}function j(){if(!y){var t=Z(Nr);y=!0;for(var r=I.length;r;){for(O=I,I=[];++U<r;)O&&O[U].run();U=-1,r=I.length}O=null,y=!1,xr(t)}}function Or(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];I.push(new rr(t,r)),I.length===1&&!y&&Z(j)}function rr(t,r){this.fun=t,this.array=r}rr.prototype.run=function(){this.fun.apply(null,this.array)};var wr="browser",Dr="browser",Cr=!0,Sr={},Lr=[],yr="",vr={},Pr={},Mr={};function w(){}var Ur=w,kr=w,Br=w,Yr=w,Fr=w,Gr=w,Hr=w;function Wr(t){throw new Error("process.binding is not supported")}function Kr(){return"/"}function Vr(t){throw new Error("process.chdir is not supported")}function Xr(){return 0}var L=globalThis.performance||{},qr=L.now||L.mozNow||L.msNow||L.oNow||L.webkitNow||function(){return new Date().getTime()};function zr(t){var r=qr.call(L)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}var Qr=new Date;function Jr(){var t=new Date,r=t-Qr;return r/1e3}var c={nextTick:Or,title:wr,browser:Cr,env:Sr,argv:Lr,version:yr,versions:vr,on:Ur,addListener:kr,once:Br,off:Yr,removeListener:Fr,removeAllListeners:Gr,emit:Hr,binding:Wr,cwd:Kr,chdir:Vr,umask:Xr,hrtime:zr,platform:Dr,release:Pr,config:Mr,uptime:Jr},Q={};Object.keys(Q).forEach(t=>{let r=t.split("."),e=c;for(let n=0;n<r.length;n++){let i=r[n];n===r.length-1?e[i]=Q[t]:e=e[i]||(e[i]={})}});var g=[],b=[],$r=typeof Uint8Array<"u"?Uint8Array:Array,V=!1;function ir(){V=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)g[r]=t[r],b[t.charCodeAt(r)]=r;b[45]=62,b[95]=63}function Zr(t){V||ir();var r,e,n,i,a,s,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[p-2]==="="?2:t[p-1]==="="?1:0,s=new $r(p*3/4-a),n=a>0?p-4:p;var u=0;for(r=0,e=0;r<n;r+=4,e+=3)i=b[t.charCodeAt(r)]<<18|b[t.charCodeAt(r+1)]<<12|b[t.charCodeAt(r+2)]<<6|b[t.charCodeAt(r+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=i&255;return a===2?(i=b[t.charCodeAt(r)]<<2|b[t.charCodeAt(r+1)]>>4,s[u++]=i&255):a===1&&(i=b[t.charCodeAt(r)]<<10|b[t.charCodeAt(r+1)]<<4|b[t.charCodeAt(r+2)]>>2,s[u++]=i>>8&255,s[u++]=i&255),s}function jr(t){return g[t>>18&63]+g[t>>12&63]+g[t>>6&63]+g[t&63]}function re(t,r,e){for(var n,i=[],a=r;a<e;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(jr(n));return i.join("")}function er(t){V||ir();for(var r,e=t.length,n=e%3,i="",a=[],s=16383,p=0,u=e-n;p<u;p+=s)a.push(re(t,p,p+s>u?u:p+s));return n===1?(r=t[e-1],i+=g[r>>2],i+=g[r<<4&63],i+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],i+=g[r>>10],i+=g[r>>4&63],i+=g[r<<2&63],i+="="),a.push(i),a.join("")}o.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function k(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function R(t,r){if(k()<r)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=o.prototype):(t===null&&(t=new o(r)),t.length=r),t}function o(t,r,e){if(!o.TYPED_ARRAY_SUPPORT&&!(this instanceof o))return new o(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return X(this,t)}return or(this,t,r,e)}o.poolSize=8192;o._augment=function(t){return t.__proto__=o.prototype,t};function or(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?ne(t,r,e,n):typeof r=="string"?te(t,r,e):ie(t,r)}o.from=function(t,r,e){return or(null,t,r,e)};o.kMaxLength=k();o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&o[Symbol.species]);function ar(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function ee(t,r,e,n){return ar(r),r<=0?R(t,r):e!==void 0?typeof n=="string"?R(t,r).fill(e,n):R(t,r).fill(e):R(t,r)}o.alloc=function(t,r,e){return ee(null,t,r,e)};function X(t,r){if(ar(r),t=R(t,r<0?0:q(r)|0),!o.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}o.allocUnsafe=function(t){return X(null,t)};o.allocUnsafeSlow=function(t){return X(null,t)};function te(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!o.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=sr(r,e)|0;t=R(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function K(t,r){var e=r.length<0?0:q(r.length)|0;t=R(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function ne(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),o.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=o.prototype):t=K(t,r),t}function ie(t,r){if(A(r)){var e=q(r.length)|0;return t=R(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||Re(r.length)?R(t,0):K(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return K(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function q(t){if(t>=k())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+k().toString(16)+" bytes");return t|0}o.isBuffer=xe;function A(t){return!!(t!=null&&t._isBuffer)}o.compare=function(r,e){if(!A(r)||!A(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,a=0,s=Math.min(n,i);a<s;++a)if(r[a]!==e[a]){n=r[a],i=e[a];break}return n<i?-1:i<n?1:0};o.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};o.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=o.allocUnsafe(e),a=0;for(n=0;n<r.length;++n){var s=r[n];if(!A(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,a),a+=s.length}return i};function sr(t,r){if(A(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return mr(t).length;default:if(n)return B(t).length;r=(""+r).toLowerCase(),n=!0}}o.byteLength=sr;function oe(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return fe(this,r,e);case"utf8":case"utf-8":return cr(this,r,e);case"ascii":return he(this,r,e);case"latin1":case"binary":return me(this,r,e);case"base64":return le(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function D(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}o.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)D(this,e,e+1);return this};o.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)D(this,e,e+3),D(this,e+1,e+2);return this};o.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)D(this,e,e+7),D(this,e+1,e+6),D(this,e+2,e+5),D(this,e+3,e+4);return this};o.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?cr(this,0,r):oe.apply(this,arguments)};o.prototype.equals=function(r){if(!A(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0};o.prototype.compare=function(r,e,n,i,a){if(!A(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,a>>>=0,this===r)return 0;for(var s=a-i,p=n-e,u=Math.min(s,p),E=this.slice(i,a),h=r.slice(e,n),l=0;l<u;++l)if(E[l]!==h[l]){s=E[l],p=h[l];break}return s<p?-1:p<s?1:0};function pr(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=o.from(r,n)),A(r))return r.length===0?-1:tr(t,r,e,n,i);if(typeof r=="number")return r=r&255,o.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):tr(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function tr(t,r,e,n,i){var a=1,s=t.length,p=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;a=2,s/=2,p/=2,e/=2}function u(d,S){return a===1?d[S]:d.readUInt16BE(S*a)}var E;if(i){var h=-1;for(E=e;E<s;E++)if(u(t,E)===u(r,h===-1?0:E-h)){if(h===-1&&(h=E),E-h+1===p)return h*a}else h!==-1&&(E-=E-h),h=-1}else for(e+p>s&&(e=s-p),E=e;E>=0;E--){for(var l=!0,T=0;T<p;T++)if(u(t,E+T)!==u(r,T)){l=!1;break}if(l)return E}return-1}o.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};o.prototype.indexOf=function(r,e,n){return pr(this,r,e,n,!0)};o.prototype.lastIndexOf=function(r,e,n){return pr(this,r,e,n,!1)};function ae(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var a=r.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;s<n;++s){var p=parseInt(r.substr(s*2,2),16);if(isNaN(p))return s;t[e+s]=p}return s}function se(t,r,e,n){return G(B(r,t.length-e),t,e,n)}function ur(t,r,e,n){return G(Ae(r),t,e,n)}function pe(t,r,e,n){return ur(t,r,e,n)}function ue(t,r,e,n){return G(mr(r),t,e,n)}function ce(t,r,e,n){return G(Ie(r,t.length-e),t,e,n)}o.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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");var a=this.length-e;if((n===void 0||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return ae(this,r,e,n);case"utf8":case"utf-8":return se(this,r,e,n);case"ascii":return ur(this,r,e,n);case"latin1":case"binary":return pe(this,r,e,n);case"base64":return ue(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,r,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function le(t,r,e){return r===0&&e===t.length?er(t):er(t.slice(r,e))}function cr(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var a=t[i],s=null,p=a>239?4:a>223?3:a>191?2:1;if(i+p<=e){var u,E,h,l;switch(p){case 1:a<128&&(s=a);break;case 2:u=t[i+1],(u&192)===128&&(l=(a&31)<<6|u&63,l>127&&(s=l));break;case 3:u=t[i+1],E=t[i+2],(u&192)===128&&(E&192)===128&&(l=(a&15)<<12|(u&63)<<6|E&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:u=t[i+1],E=t[i+2],h=t[i+3],(u&192)===128&&(E&192)===128&&(h&192)===128&&(l=(a&15)<<18|(u&63)<<12|(E&63)<<6|h&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,p=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=p}return Ee(n)}var nr=4096;function Ee(t){var r=t.length;if(r<=nr)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=nr));return e}function he(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function me(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function fe(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",a=r;a<e;++a)i+=ge(t[a]);return i}function _e(t,r,e){for(var n=t.slice(r,e),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}o.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(o.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=o.prototype;else{var a=e-r;i=new o(a,void 0);for(var s=0;s<a;++s)i[s]=this[s+r]}return i};function m(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=this[r],a=1,s=0;++s<e&&(a*=256);)i+=this[r+s]*a;return i};o.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i};o.prototype.readUInt8=function(r,e){return e||m(r,1,this.length),this[r]};o.prototype.readUInt16LE=function(r,e){return e||m(r,2,this.length),this[r]|this[r+1]<<8};o.prototype.readUInt16BE=function(r,e){return e||m(r,2,this.length),this[r]<<8|this[r+1]};o.prototype.readUInt32LE=function(r,e){return e||m(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};o.prototype.readUInt32BE=function(r,e){return e||m(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};o.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=this[r],a=1,s=0;++s<e&&(a*=256);)i+=this[r+s]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};o.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=e,a=1,s=this[r+--i];i>0&&(a*=256);)s+=this[r+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*e)),s};o.prototype.readInt8=function(r,e){return e||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};o.prototype.readInt16LE=function(r,e){e||m(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};o.prototype.readInt16BE=function(r,e){e||m(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};o.prototype.readInt32LE=function(r,e){return e||m(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};o.prototype.readInt32BE=function(r,e){return e||m(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};o.prototype.readFloatLE=function(r,e){return e||m(r,4,this.length),H(this,r,!0,23,4)};o.prototype.readFloatBE=function(r,e){return e||m(r,4,this.length),H(this,r,!1,23,4)};o.prototype.readDoubleLE=function(r,e){return e||m(r,8,this.length),H(this,r,!0,52,8)};o.prototype.readDoubleBE=function(r,e){return e||m(r,8,this.length),H(this,r,!1,52,8)};function _(t,r,e,n,i,a){if(!A(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<a)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}o.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;_(this,r,e,n,a,0)}var s=1,p=0;for(this[e]=r&255;++p<n&&(s*=256);)this[e+p]=r/s&255;return e+n};o.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;_(this,r,e,n,a,0)}var s=n-1,p=1;for(this[e+s]=r&255;--s>=0&&(p*=256);)this[e+s]=r/p&255;return e+n};o.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function Y(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,a=Math.min(t.length-e,2);i<a;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}o.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):Y(this,r,e,!0),e+2};o.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):Y(this,r,e,!1),e+2};function F(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,a=Math.min(t.length-e,4);i<a;++i)t[e+i]=r>>>(n?i:3-i)*8&255}o.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):F(this,r,e,!0),e+4};o.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):F(this,r,e,!1),e+4};o.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);_(this,r,e,n,a-1,-a)}var s=0,p=1,u=0;for(this[e]=r&255;++s<n&&(p*=256);)r<0&&u===0&&this[e+s-1]!==0&&(u=1),this[e+s]=(r/p>>0)-u&255;return e+n};o.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);_(this,r,e,n,a-1,-a)}var s=n-1,p=1,u=0;for(this[e+s]=r&255;--s>=0&&(p*=256);)r<0&&u===0&&this[e+s+1]!==0&&(u=1),this[e+s]=(r/p>>0)-u&255;return e+n};o.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};o.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):Y(this,r,e,!0),e+2};o.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):Y(this,r,e,!1),e+2};o.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):F(this,r,e,!0),e+4};o.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||_(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):F(this,r,e,!1),e+4};function lr(t,r,e,n,i,a){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Er(t,r,e,n,i){return i||lr(t,r,e,4,34028234663852886e22,-34028234663852886e22),_r(t,r,e,n,23,4),e+4}o.prototype.writeFloatLE=function(r,e,n){return Er(this,r,e,!0,n)};o.prototype.writeFloatBE=function(r,e,n){return Er(this,r,e,!1,n)};function hr(t,r,e,n,i){return i||lr(t,r,e,8,17976931348623157e292,-17976931348623157e292),_r(t,r,e,n,52,8),e+8}o.prototype.writeDoubleLE=function(r,e,n){return hr(this,r,e,!0,n)};o.prototype.writeDoubleBE=function(r,e,n){return hr(this,r,e,!1,n)};o.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var a=i-n,s;if(this===r&&n<e&&e<i)for(s=a-1;s>=0;--s)r[s+e]=this[s+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(s=0;s<a;++s)r[s+e]=this[s+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+a),e);return a};o.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var a=r.charCodeAt(0);a<256&&(r=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var s;if(typeof r=="number")for(s=e;s<n;++s)this[s]=r;else{var p=A(r)?r:B(new o(r,i).toString()),u=p.length;for(s=0;s<n-e;++s)this[s+e]=p[s%u]}return this};var de=/[^+\/0-9A-Za-z-_]/g;function be(t){if(t=Te(t).replace(de,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Te(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ge(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,r){r=r||1/0;for(var e,n=t.length,i=null,a=[],s=0;s<n;++s){if(e=t.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(r-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function Ae(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function Ie(t,r){for(var e,n,i,a=[],s=0;s<t.length&&!((r-=2)<0);++s)e=t.charCodeAt(s),n=e>>8,i=e%256,a.push(i),a.push(n);return a}function mr(t){return Zr(be(t))}function G(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function Re(t){return t!==t}function xe(t){return t!=null&&(!!t._isBuffer||fr(t)||Ne(t))}function fr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Ne(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&fr(t.slice(0,0))}function H(t,r,e,n,i){var a,s,p=i*8-n-1,u=(1<<p)-1,E=u>>1,h=-7,l=e?i-1:0,T=e?-1:1,d=t[r+l];for(l+=T,a=d&(1<<-h)-1,d>>=-h,h+=p;h>0;a=a*256+t[r+l],l+=T,h-=8);for(s=a&(1<<-h)-1,a>>=-h,h+=n;h>0;s=s*256+t[r+l],l+=T,h-=8);if(a===0)a=1-E;else{if(a===u)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-E}return(d?-1:1)*s*Math.pow(2,a-n)}function _r(t,r,e,n,i,a){var s,p,u,E=a*8-i-1,h=(1<<E)-1,l=h>>1,T=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,S=n?1:-1,Rr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,s=h):(s=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+l>=1?r+=T/u:r+=T*Math.pow(2,1-l),r*u>=2&&(s++,u/=2),s+l>=h?(p=0,s=h):s+l>=1?(p=(r*u-1)*Math.pow(2,i),s=s+l):(p=r*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[e+d]=p&255,d+=S,p/=256,i-=8);for(s=s<<i|p,E+=i;E>0;t[e+d]=s&255,d+=S,s/=256,E-=8);t[e+d-S]|=Rr*128}import z from"bignumber.js";z.config({DECIMAL_PLACES:40,EXPONENTIAL_AT:45});function dr(t,r){return M(t,r,"*")}function W(t,r){return!!M(t,r,">=")}function v(t,r){return!!M(t,r,">")}function C(t,r){return!!M(t,r,"==")}function Oe(t,r){return M(t,r,"mod")}function P(t,r){return C(Oe(t,r),0)}function M(t,r,e){switch(t=new z(String(t)),r=new z(String(r)),e.toLowerCase()){case"-":return t.minus(r).toString();case"+":return t.plus(r).toString();case"*":case"x":return t.multipliedBy(r).toString();case"\xF7":case"/":return t.dividedBy(r).toString();case">=":return t.isGreaterThanOrEqualTo(r);case">":return t.isGreaterThan(r);case"<=":return t.isLessThanOrEqualTo(r);case"<":return t.isLessThan(r);case"==":return t.isEqualTo(r);case"mod":return t.modulo(r);default:break}}var br=(t,r)=>String(t).toLowerCase()===String(r).toLowerCase();var Ze={SMALLESTUNIT:c.env.SMALLEST_UNIT},je={SMALLEST_UNITS:c.env.SMALLEST_UNIT};var nt=`{"theme1":{"value":"${c.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${c.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${c.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`;var ut=["point-system.discordEnabled","point-system.telegramBotName","point-system.telegramBotId","point-system.telegramEnabled","point-system.telegramGroupId","point-system.telegramGroupName","point-system.twitterAccountId","point-system.twitterAccountName","point-system.twitterEnabled","point-system.twitterJobEnabled","point-system.guideLink"];var Tr=(i=>(i.GLOBAL_PAIR_DELISTING="GLOBAL_PAIR_DELISTING",i.GLOBAL_NEW_PAIR_LISTING="GLOBAL_NEW_PAIR_LISTING",i.GLOBAL_SYSTEM_MAINTENANCE="GLOBAL_SYSTEM_MAINTENANCE",i.GLOBAL_SMART_CONTRACT_UPDATE="GLOBAL_SMART_CONTRACT_UPDATE",i))(Tr||{}),gr=(n=>(n.ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT="ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT",n.ACCOUNT_KYC_STATUS_CHANGED="ACCOUNT_KYC_STATUS_CHANGED",n.ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED="ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED",n))(gr||{}),Cn={...Tr,...gr};var Ui=(t,r)=>{Ir("base",{address:String(t.baseTokenAddress),chainId:t.baseTokenChainId},r.baseAsset),Ir("price",{address:String(t.priceTokenAddress),chainId:t.priceTokenChainId},r.priceAsset),Ce(t,r)},Ir=(t,r,e)=>{f(Number(r.chainId)===Number(e.chainId),`Invalid ${t}TokenChainId, must be ${e.chainId}`),f(e.chainId===1&&String(r.address)===String(e.address)||e.chainId===8&&Number(r.address)===Number(e.address)||br(r.address,e.address),`Invalid ${t}TokenAddress, must be ${e.address}`)},ki=t=>{f(t.expiredTime>=Math.floor(Date.now()/1e3)+3600,"Expiration time shorter than 1 hour")},Ce=(t,r)=>{if(f(C(1,t.version),`Invalid order message version. Current is ${1}`),f(C(t.decimalPrice,0)||C(dr(t.decimalPrice,10**18),t.price),"Invalid price or decimalPrice"),f(!isNaN(t.random),"Invalid random, must be a number"),f(t.random>0,"Invalid random, must be greater than 0"),f(t.random<=Number.MAX_SAFE_INTEGER,"Invalid random, must no more than 2^53-1"),f(t.expiredTime>=Math.floor(Date.now()/1e3),"Invalid expiration time"),f(["B","S"].includes(t.orderSide),"Invalid order side"),f(["L","P","I","M"].includes(t.orderType),"Invalid order type"),t.orderType==="M"&&t.orderSide==="S")f(C(t.price,0)&&v(t.amount,0),"Invalid market order amount or price"),f(P(t.amount,r.min_size_increment)&&W(t.amount,r.min_order_size),"Invalid market order amount");else{if(t.orderType==="M"&&t.orderSide==="B"&&C(t.amount,0))throw new Error("Buy murket order by total is not implemented yet");t.orderType==="M"&&t.orderSide==="B"&&v(t.amount,0)?f(v(t.price,0)&&P(t.amount,r.min_size_increment)&&W(t.amount,r.min_order_size),"Invalid buy market order by amount"):(f(v(t.price,0)&&v(t.amount,0),"Invalid order amount or price is zero"),f(P(t.amount,r.min_size_increment)&&W(t.amount,r.min_order_size)&&P(t.price,r.min_price_increment),"Invalid order amount or price"))}},f=(t,r)=>{if(!t)throw new Error(r)};export{Ce as assertOrder,Ui as assertOrderData,ki as assertOrderExpirationAtCreationMoment};
|
|
1
|
+
function Q(){throw new Error("setTimeout has not been defined")}function $(){throw new Error("clearTimeout has not been defined")}var x=Q,N=$;typeof globalThis.setTimeout=="function"&&(x=setTimeout);typeof globalThis.clearTimeout=="function"&&(N=clearTimeout);function Z(t){if(x===setTimeout)return setTimeout(t,0);if((x===Q||!x)&&setTimeout)return x=setTimeout,setTimeout(t,0);try{return x(t,0)}catch{try{return x.call(null,t,0)}catch{return x.call(this,t,0)}}}function xr(t){if(N===clearTimeout)return clearTimeout(t);if((N===$||!N)&&clearTimeout)return N=clearTimeout,clearTimeout(t);try{return N(t)}catch{try{return N.call(null,t)}catch{return N.call(this,t)}}}var I=[],S=!1,O,U=-1;function Nr(){!S||!O||(S=!1,O.length?I=O.concat(I):U=-1,I.length&&j())}function j(){if(!S){var t=Z(Nr);S=!0;for(var r=I.length;r;){for(O=I,I=[];++U<r;)O&&O[U].run();U=-1,r=I.length}O=null,S=!1,xr(t)}}function Or(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];I.push(new rr(t,r)),I.length===1&&!S&&Z(j)}function rr(t,r){this.fun=t,this.array=r}rr.prototype.run=function(){this.fun.apply(null,this.array)};var Dr="browser",wr="browser",Cr=!0,yr={},Lr=[],Sr="",Pr={},vr={},Mr={};function D(){}var Ur=D,kr=D,Br=D,Fr=D,Yr=D,Gr=D,Hr=D;function Wr(t){throw new Error("process.binding is not supported")}function Kr(){return"/"}function Vr(t){throw new Error("process.chdir is not supported")}function Xr(){return 0}var L=globalThis.performance||{},qr=L.now||L.mozNow||L.msNow||L.oNow||L.webkitNow||function(){return new Date().getTime()};function zr(t){var r=qr.call(L)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}var Jr=new Date;function Qr(){var t=new Date,r=t-Jr;return r/1e3}var u={nextTick:Or,title:Dr,browser:Cr,env:yr,argv:Lr,version:Sr,versions:Pr,on:Ur,addListener:kr,once:Br,off:Fr,removeListener:Yr,removeAllListeners:Gr,emit:Hr,binding:Wr,cwd:Kr,chdir:Vr,umask:Xr,hrtime:zr,platform:wr,release:vr,config:Mr,uptime:Qr},J={};Object.keys(J).forEach(t=>{let r=t.split("."),e=u;for(let n=0;n<r.length;n++){let i=r[n];n===r.length-1?e[i]=J[t]:e=e[i]||(e[i]={})}});var A=[],b=[],$r=typeof Uint8Array<"u"?Uint8Array:Array,V=!1;function ir(){V=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)A[r]=t[r],b[t.charCodeAt(r)]=r;b[45]=62,b[95]=63}function Zr(t){V||ir();var r,e,n,i,a,p,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[s-2]==="="?2:t[s-1]==="="?1:0,p=new $r(s*3/4-a),n=a>0?s-4:s;var c=0;for(r=0,e=0;r<n;r+=4,e+=3)i=b[t.charCodeAt(r)]<<18|b[t.charCodeAt(r+1)]<<12|b[t.charCodeAt(r+2)]<<6|b[t.charCodeAt(r+3)],p[c++]=i>>16&255,p[c++]=i>>8&255,p[c++]=i&255;return a===2?(i=b[t.charCodeAt(r)]<<2|b[t.charCodeAt(r+1)]>>4,p[c++]=i&255):a===1&&(i=b[t.charCodeAt(r)]<<10|b[t.charCodeAt(r+1)]<<4|b[t.charCodeAt(r+2)]>>2,p[c++]=i>>8&255,p[c++]=i&255),p}function jr(t){return A[t>>18&63]+A[t>>12&63]+A[t>>6&63]+A[t&63]}function re(t,r,e){for(var n,i=[],a=r;a<e;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(jr(n));return i.join("")}function er(t){V||ir();for(var r,e=t.length,n=e%3,i="",a=[],p=16383,s=0,c=e-n;s<c;s+=p)a.push(re(t,s,s+p>c?c:s+p));return n===1?(r=t[e-1],i+=A[r>>2],i+=A[r<<4&63],i+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],i+=A[r>>10],i+=A[r>>4&63],i+=A[r<<2&63],i+="="),a.push(i),a.join("")}o.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;function k(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function R(t,r){if(k()<r)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=o.prototype):(t===null&&(t=new o(r)),t.length=r),t}function o(t,r,e){if(!o.TYPED_ARRAY_SUPPORT&&!(this instanceof o))return new o(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return X(this,t)}return or(this,t,r,e)}o.poolSize=8192;o._augment=function(t){return t.__proto__=o.prototype,t};function or(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?ne(t,r,e,n):typeof r=="string"?te(t,r,e):ie(t,r)}o.from=function(t,r,e){return or(null,t,r,e)};o.kMaxLength=k();o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&o[Symbol.species]);function ar(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function ee(t,r,e,n){return ar(r),r<=0?R(t,r):e!==void 0?typeof n=="string"?R(t,r).fill(e,n):R(t,r).fill(e):R(t,r)}o.alloc=function(t,r,e){return ee(null,t,r,e)};function X(t,r){if(ar(r),t=R(t,r<0?0:q(r)|0),!o.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}o.allocUnsafe=function(t){return X(null,t)};o.allocUnsafeSlow=function(t){return X(null,t)};function te(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!o.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=pr(r,e)|0;t=R(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function K(t,r){var e=r.length<0?0:q(r.length)|0;t=R(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function ne(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),o.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=o.prototype):t=K(t,r),t}function ie(t,r){if(g(r)){var e=q(r.length)|0;return t=R(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||Re(r.length)?R(t,0):K(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return K(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function q(t){if(t>=k())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+k().toString(16)+" bytes");return t|0}o.isBuffer=xe;function g(t){return!!(t!=null&&t._isBuffer)}o.compare=function(r,e){if(!g(r)||!g(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,a=0,p=Math.min(n,i);a<p;++a)if(r[a]!==e[a]){n=r[a],i=e[a];break}return n<i?-1:i<n?1:0};o.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};o.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=o.allocUnsafe(e),a=0;for(n=0;n<r.length;++n){var p=r[n];if(!g(p))throw new TypeError('"list" argument must be an Array of Buffers');p.copy(i,a),a+=p.length}return i};function pr(t,r){if(g(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return mr(t).length;default:if(n)return B(t).length;r=(""+r).toLowerCase(),n=!0}}o.byteLength=pr;function oe(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return _e(this,r,e);case"utf8":case"utf-8":return ur(this,r,e);case"ascii":return he(this,r,e);case"latin1":case"binary":return me(this,r,e);case"base64":return le(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function w(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}o.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)w(this,e,e+1);return this};o.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)w(this,e,e+3),w(this,e+1,e+2);return this};o.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)w(this,e,e+7),w(this,e+1,e+6),w(this,e+2,e+5),w(this,e+3,e+4);return this};o.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?ur(this,0,r):oe.apply(this,arguments)};o.prototype.equals=function(r){if(!g(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0};o.prototype.compare=function(r,e,n,i,a){if(!g(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,a>>>=0,this===r)return 0;for(var p=a-i,s=n-e,c=Math.min(p,s),E=this.slice(i,a),h=r.slice(e,n),l=0;l<c;++l)if(E[l]!==h[l]){p=E[l],s=h[l];break}return p<s?-1:s<p?1:0};function sr(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=o.from(r,n)),g(r))return r.length===0?-1:tr(t,r,e,n,i);if(typeof r=="number")return r=r&255,o.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):tr(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function tr(t,r,e,n,i){var a=1,p=t.length,s=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;a=2,p/=2,s/=2,e/=2}function c(T,y){return a===1?T[y]:T.readUInt16BE(y*a)}var E;if(i){var h=-1;for(E=e;E<p;E++)if(c(t,E)===c(r,h===-1?0:E-h)){if(h===-1&&(h=E),E-h+1===s)return h*a}else h!==-1&&(E-=E-h),h=-1}else for(e+s>p&&(e=p-s),E=e;E>=0;E--){for(var l=!0,d=0;d<s;d++)if(c(t,E+d)!==c(r,d)){l=!1;break}if(l)return E}return-1}o.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};o.prototype.indexOf=function(r,e,n){return sr(this,r,e,n,!0)};o.prototype.lastIndexOf=function(r,e,n){return sr(this,r,e,n,!1)};function ae(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var a=r.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var p=0;p<n;++p){var s=parseInt(r.substr(p*2,2),16);if(isNaN(s))return p;t[e+p]=s}return p}function pe(t,r,e,n){return G(B(r,t.length-e),t,e,n)}function cr(t,r,e,n){return G(ge(r),t,e,n)}function se(t,r,e,n){return cr(t,r,e,n)}function ce(t,r,e,n){return G(mr(r),t,e,n)}function ue(t,r,e,n){return G(Ie(r,t.length-e),t,e,n)}o.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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");var a=this.length-e;if((n===void 0||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return ae(this,r,e,n);case"utf8":case"utf-8":return pe(this,r,e,n);case"ascii":return cr(this,r,e,n);case"latin1":case"binary":return se(this,r,e,n);case"base64":return ce(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,r,e,n);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function le(t,r,e){return r===0&&e===t.length?er(t):er(t.slice(r,e))}function ur(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var a=t[i],p=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=e){var c,E,h,l;switch(s){case 1:a<128&&(p=a);break;case 2:c=t[i+1],(c&192)===128&&(l=(a&31)<<6|c&63,l>127&&(p=l));break;case 3:c=t[i+1],E=t[i+2],(c&192)===128&&(E&192)===128&&(l=(a&15)<<12|(c&63)<<6|E&63,l>2047&&(l<55296||l>57343)&&(p=l));break;case 4:c=t[i+1],E=t[i+2],h=t[i+3],(c&192)===128&&(E&192)===128&&(h&192)===128&&(l=(a&15)<<18|(c&63)<<12|(E&63)<<6|h&63,l>65535&&l<1114112&&(p=l))}}p===null?(p=65533,s=1):p>65535&&(p-=65536,n.push(p>>>10&1023|55296),p=56320|p&1023),n.push(p),i+=s}return Ee(n)}var nr=4096;function Ee(t){var r=t.length;if(r<=nr)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=nr));return e}function he(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function me(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function _e(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",a=r;a<e;++a)i+=Ae(t[a]);return i}function fe(t,r,e){for(var n=t.slice(r,e),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}o.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(o.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=o.prototype;else{var a=e-r;i=new o(a,void 0);for(var p=0;p<a;++p)i[p]=this[p+r]}return i};function m(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=this[r],a=1,p=0;++p<e&&(a*=256);)i+=this[r+p]*a;return i};o.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i};o.prototype.readUInt8=function(r,e){return e||m(r,1,this.length),this[r]};o.prototype.readUInt16LE=function(r,e){return e||m(r,2,this.length),this[r]|this[r+1]<<8};o.prototype.readUInt16BE=function(r,e){return e||m(r,2,this.length),this[r]<<8|this[r+1]};o.prototype.readUInt32LE=function(r,e){return e||m(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};o.prototype.readUInt32BE=function(r,e){return e||m(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};o.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=this[r],a=1,p=0;++p<e&&(a*=256);)i+=this[r+p]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*e)),i};o.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||m(r,e,this.length);for(var i=e,a=1,p=this[r+--i];i>0&&(a*=256);)p+=this[r+--i]*a;return a*=128,p>=a&&(p-=Math.pow(2,8*e)),p};o.prototype.readInt8=function(r,e){return e||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};o.prototype.readInt16LE=function(r,e){e||m(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};o.prototype.readInt16BE=function(r,e){e||m(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};o.prototype.readInt32LE=function(r,e){return e||m(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};o.prototype.readInt32BE=function(r,e){return e||m(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};o.prototype.readFloatLE=function(r,e){return e||m(r,4,this.length),H(this,r,!0,23,4)};o.prototype.readFloatBE=function(r,e){return e||m(r,4,this.length),H(this,r,!1,23,4)};o.prototype.readDoubleLE=function(r,e){return e||m(r,8,this.length),H(this,r,!0,52,8)};o.prototype.readDoubleBE=function(r,e){return e||m(r,8,this.length),H(this,r,!1,52,8)};function f(t,r,e,n,i,a){if(!g(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<a)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}o.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;f(this,r,e,n,a,0)}var p=1,s=0;for(this[e]=r&255;++s<n&&(p*=256);)this[e+s]=r/p&255;return e+n};o.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;f(this,r,e,n,a,0)}var p=n-1,s=1;for(this[e+p]=r&255;--p>=0&&(s*=256);)this[e+p]=r/s&255;return e+n};o.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function F(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,a=Math.min(t.length-e,2);i<a;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}o.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):F(this,r,e,!0),e+2};o.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):F(this,r,e,!1),e+2};function Y(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,a=Math.min(t.length-e,4);i<a;++i)t[e+i]=r>>>(n?i:3-i)*8&255}o.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):Y(this,r,e,!0),e+4};o.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Y(this,r,e,!1),e+4};o.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);f(this,r,e,n,a-1,-a)}var p=0,s=1,c=0;for(this[e]=r&255;++p<n&&(s*=256);)r<0&&c===0&&this[e+p-1]!==0&&(c=1),this[e+p]=(r/s>>0)-c&255;return e+n};o.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var a=Math.pow(2,8*n-1);f(this,r,e,n,a-1,-a)}var p=n-1,s=1,c=0;for(this[e+p]=r&255;--p>=0&&(s*=256);)r<0&&c===0&&this[e+p+1]!==0&&(c=1),this[e+p]=(r/s>>0)-c&255;return e+n};o.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};o.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):F(this,r,e,!0),e+2};o.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):F(this,r,e,!1),e+2};o.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):Y(this,r,e,!0),e+4};o.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||f(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),o.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Y(this,r,e,!1),e+4};function lr(t,r,e,n,i,a){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Er(t,r,e,n,i){return i||lr(t,r,e,4,34028234663852886e22,-34028234663852886e22),fr(t,r,e,n,23,4),e+4}o.prototype.writeFloatLE=function(r,e,n){return Er(this,r,e,!0,n)};o.prototype.writeFloatBE=function(r,e,n){return Er(this,r,e,!1,n)};function hr(t,r,e,n,i){return i||lr(t,r,e,8,17976931348623157e292,-17976931348623157e292),fr(t,r,e,n,52,8),e+8}o.prototype.writeDoubleLE=function(r,e,n){return hr(this,r,e,!0,n)};o.prototype.writeDoubleBE=function(r,e,n){return hr(this,r,e,!1,n)};o.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var a=i-n,p;if(this===r&&n<e&&e<i)for(p=a-1;p>=0;--p)r[p+e]=this[p+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(p=0;p<a;++p)r[p+e]=this[p+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+a),e);return a};o.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var a=r.charCodeAt(0);a<256&&(r=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var p;if(typeof r=="number")for(p=e;p<n;++p)this[p]=r;else{var s=g(r)?r:B(new o(r,i).toString()),c=s.length;for(p=0;p<n-e;++p)this[p+e]=s[p%c]}return this};var Te=/[^+\/0-9A-Za-z-_]/g;function be(t){if(t=de(t).replace(Te,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function de(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ae(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,r){r=r||1/0;for(var e,n=t.length,i=null,a=[],p=0;p<n;++p){if(e=t.charCodeAt(p),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(p+1===n){(r-=3)>-1&&a.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&a.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&a.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;a.push(e)}else if(e<2048){if((r-=2)<0)break;a.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;a.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;a.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return a}function ge(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function Ie(t,r){for(var e,n,i,a=[],p=0;p<t.length&&!((r-=2)<0);++p)e=t.charCodeAt(p),n=e>>8,i=e%256,a.push(i),a.push(n);return a}function mr(t){return Zr(be(t))}function G(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function Re(t){return t!==t}function xe(t){return t!=null&&(!!t._isBuffer||_r(t)||Ne(t))}function _r(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Ne(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&_r(t.slice(0,0))}function H(t,r,e,n,i){var a,p,s=i*8-n-1,c=(1<<s)-1,E=c>>1,h=-7,l=e?i-1:0,d=e?-1:1,T=t[r+l];for(l+=d,a=T&(1<<-h)-1,T>>=-h,h+=s;h>0;a=a*256+t[r+l],l+=d,h-=8);for(p=a&(1<<-h)-1,a>>=-h,h+=n;h>0;p=p*256+t[r+l],l+=d,h-=8);if(a===0)a=1-E;else{if(a===c)return p?NaN:(T?-1:1)*(1/0);p=p+Math.pow(2,n),a=a-E}return(T?-1:1)*p*Math.pow(2,a-n)}function fr(t,r,e,n,i,a){var p,s,c,E=a*8-i-1,h=(1<<E)-1,l=h>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:a-1,y=n?1:-1,Rr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,p=h):(p=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-p))<1&&(p--,c*=2),p+l>=1?r+=d/c:r+=d*Math.pow(2,1-l),r*c>=2&&(p++,c/=2),p+l>=h?(s=0,p=h):p+l>=1?(s=(r*c-1)*Math.pow(2,i),p=p+l):(s=r*Math.pow(2,l-1)*Math.pow(2,i),p=0));i>=8;t[e+T]=s&255,T+=y,s/=256,i-=8);for(p=p<<i|s,E+=i;E>0;t[e+T]=p&255,T+=y,p/=256,E-=8);t[e+T-y]|=Rr*128}import z from"bignumber.js";z.config({DECIMAL_PLACES:40,EXPONENTIAL_AT:45});function Tr(t,r){return M(t,r,"*")}function W(t,r){return!!M(t,r,">=")}function P(t,r){return!!M(t,r,">")}function C(t,r){return!!M(t,r,"==")}function Oe(t,r){return M(t,r,"mod")}function v(t,r){return C(Oe(t,r),0)}function M(t,r,e){switch(t=new z(String(t)),r=new z(String(r)),e.toLowerCase()){case"-":return t.minus(r).toString();case"+":return t.plus(r).toString();case"*":case"x":return t.multipliedBy(r).toString();case"\xF7":case"/":return t.dividedBy(r).toString();case">=":return t.isGreaterThanOrEqualTo(r);case">":return t.isGreaterThan(r);case"<=":return t.isLessThanOrEqualTo(r);case"<":return t.isLessThan(r);case"==":return t.isEqualTo(r);case"mod":return t.modulo(r);default:break}}var br=(t,r)=>String(t).toLowerCase()===String(r).toLowerCase();var Ze={SMALLESTUNIT:u.env.SMALLEST_UNIT},je={SMALLEST_UNITS:u.env.SMALLEST_UNIT};var nt=`{"theme1":{"value":"${u.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${u.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${u.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`;var ct=["point-system.discordEnabled","point-system.telegramBotName","point-system.telegramBotId","point-system.telegramEnabled","point-system.telegramGroupId","point-system.telegramGroupName","point-system.twitterAccountId","point-system.twitterAccountName","point-system.twitterEnabled","point-system.twitterJobEnabled","point-system.guideLink"];var dr=(i=>(i.GLOBAL_PAIR_DELISTING="GLOBAL_PAIR_DELISTING",i.GLOBAL_NEW_PAIR_LISTING="GLOBAL_NEW_PAIR_LISTING",i.GLOBAL_SYSTEM_MAINTENANCE="GLOBAL_SYSTEM_MAINTENANCE",i.GLOBAL_SMART_CONTRACT_UPDATE="GLOBAL_SMART_CONTRACT_UPDATE",i))(dr||{}),Ar=(n=>(n.ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT="ACCOUNT_POINTS_UNLOCK_ACHIEVEMENT",n.ACCOUNT_KYC_STATUS_CHANGED="ACCOUNT_KYC_STATUS_CHANGED",n.ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED="ACCOUNT_AFFILIATE_DASHBOARD_UNLOCKED",n))(Ar||{}),Cn={...dr,...Ar};var Yi=(t,r)=>{Ir("base",{address:String(t.baseTokenAddress),chainId:t.baseTokenChainId},r.baseAsset),Ir("price",{address:String(t.priceTokenAddress),chainId:t.priceTokenChainId},r.priceAsset),Ce(t,r)},Ir=(t,r,e)=>{_(Number(r.chainId)===Number(e.chainId),`Invalid ${t}TokenChainId, must be ${e.chainId}`),_(e.chainId===1&&String(r.address)===String(e.address)||e.chainId===8&&Number(r.address)===Number(e.address)||br(r.address,e.address),`Invalid ${t}TokenAddress, must be ${e.address}`)},Gi=t=>{_(t.expiredTime>=Math.floor(Date.now()/1e3)+3600,"Expiration time shorter than 1 hour")},Ce=(t,r)=>{if(_(C(1,t.version),`Invalid order message version. Current is ${1}`),_(C(t.decimalPrice,0)||C(Tr(t.decimalPrice,10**18),t.price),"Invalid price or decimalPrice"),_(!isNaN(t.random),"Invalid random, must be a number"),_(t.random>0,"Invalid random, must be greater than 0"),_(t.random<=Number.MAX_SAFE_INTEGER,"Invalid random, must no more than 2^53-1"),_(t.expiredTime>=Math.floor(Date.now()/1e3),"Invalid expiration time"),_(["B","S"].includes(t.orderSide),"Invalid order side"),_(["L","P","I","M"].includes(t.orderType),"Invalid order type"),t.orderType==="M"&&t.orderSide==="S")_(C(t.price,0)&&P(t.amount,0),"Invalid market order amount or price"),_(v(t.amount,r.min_size_increment)&&W(t.amount,r.min_order_size),"Invalid market order amount");else{if(t.orderType==="M"&&t.orderSide==="B"&&C(t.amount,0))throw new Error("Buy murket order by total is not implemented yet");t.orderType==="M"&&t.orderSide==="B"&&P(t.amount,0)?_(P(t.price,0)&&v(t.amount,r.min_size_increment)&&W(t.amount,r.min_order_size),"Invalid buy market order by amount"):(_(P(t.price,0)&&P(t.amount,0),"Invalid order amount or price is zero"),_(v(t.amount,r.min_size_increment)&&W(t.amount,r.min_order_size)&&v(t.price,r.min_price_increment),"Invalid order amount or price"))}},_=(t,r)=>{if(!t)throw new Error(r)};export{Ce as assertOrder,Yi as assertOrderData,Gi as assertOrderExpirationAtCreationMoment};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|