UNPKG

minter-js-sdk

Version:
1 lines 736 kB
var e=1e6,t=1e6,r="[big.js] ",i=r+"Invalid ",n=i+"decimal places",o=i+"rounding mode",a=r+"Division by zero",s={},u=void 0,c=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function l(e,t,r,i){var n=e.c;if(r===u&&(r=e.constructor.RM),0!==r&&1!==r&&2!==r&&3!==r)throw Error(o);if(t<1)i=3===r&&(i||!!n[0])||0===t&&(1===r&&n[0]>=5||2===r&&(n[0]>5||5===n[0]&&(i||n[1]!==u))),n.length=1,i?(e.e=e.e-t+1,n[0]=1):n[0]=e.e=0;else if(t<n.length){if(i=1===r&&n[t]>=5||2===r&&(n[t]>5||5===n[t]&&(i||n[t+1]!==u||1&n[t-1]))||3===r&&(i||!!n[0]),n.length=t,i)for(;++n[--t]>9;)if(n[t]=0,0===t){++e.e,n.unshift(1);break}for(t=n.length;!n[--t];)n.pop()}return e}function f(e,t,r){var i=e.e,n=e.c.join(""),o=n.length;if(t)n=n.charAt(0)+(o>1?"."+n.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)n="0"+n;n="0."+n}else if(i>0)if(++i>o)for(i-=o;i--;)n+="0";else i<o&&(n=n.slice(0,i)+"."+n.slice(i));else o>1&&(n=n.charAt(0)+"."+n.slice(1));return e.s<0&&r?"-"+n:n}s.abs=function(){var e=new this.constructor(this);return e.s=1,e},s.cmp=function(e){var t,r=this,i=r.c,n=(e=new r.constructor(e)).c,o=r.s,a=e.s,s=r.e,u=e.e;if(!i[0]||!n[0])return i[0]?o:n[0]?-a:0;if(o!=a)return o;if(t=o<0,s!=u)return s>u^t?1:-1;for(a=(s=i.length)<(u=n.length)?s:u,o=-1;++o<a;)if(i[o]!=n[o])return i[o]>n[o]^t?1:-1;return s==u?0:s>u^t?1:-1},s.div=function(t){var r=this,i=r.constructor,o=r.c,s=(t=new i(t)).c,c=r.s==t.s?1:-1,f=i.DP;if(f!==~~f||f<0||f>e)throw Error(n);if(!s[0])throw Error(a);if(!o[0])return t.s=c,t.c=[t.e=0],t;var d,h,p,m,b,v=s.slice(),g=d=s.length,y=o.length,w=o.slice(0,d),_=w.length,k=t,E=k.c=[],S=0,x=f+(k.e=r.e-t.e)+1;for(k.s=c,c=x<0?0:x,v.unshift(0);_++<d;)w.push(0);do{for(p=0;p<10;p++){if(d!=(_=w.length))m=d>_?1:-1;else for(b=-1,m=0;++b<d;)if(s[b]!=w[b]){m=s[b]>w[b]?1:-1;break}if(!(m<0))break;for(h=_==d?s:v;_;){if(w[--_]<h[_]){for(b=_;b&&!w[--b];)w[b]=9;--w[b],w[_]+=10}w[_]-=h[_]}for(;!w[0];)w.shift()}E[S++]=m?p:++p,w[0]&&m?w[_]=o[g]||0:w=[o[g]]}while((g++<y||w[0]!==u)&&c--);return E[0]||1==S||(E.shift(),k.e--,x--),S>x&&l(k,x,i.RM,w[0]!==u),k},s.eq=function(e){return 0===this.cmp(e)},s.gt=function(e){return this.cmp(e)>0},s.gte=function(e){return this.cmp(e)>-1},s.lt=function(e){return this.cmp(e)<0},s.lte=function(e){return this.cmp(e)<1},s.minus=s.sub=function(e){var t,r,i,n,o=this,a=o.constructor,s=o.s,u=(e=new a(e)).s;if(s!=u)return e.s=-u,o.plus(e);var c=o.c.slice(),l=o.e,f=e.c,d=e.e;if(!c[0]||!f[0])return f[0]?e.s=-u:c[0]?e=new a(o):e.s=1,e;if(s=l-d){for((n=s<0)?(s=-s,i=c):(d=l,i=f),i.reverse(),u=s;u--;)i.push(0);i.reverse()}else for(r=((n=c.length<f.length)?c:f).length,s=u=0;u<r;u++)if(c[u]!=f[u]){n=c[u]<f[u];break}if(n&&(i=c,c=f,f=i,e.s=-e.s),(u=(r=f.length)-(t=c.length))>0)for(;u--;)c[t++]=0;for(u=t;r>s;){if(c[--r]<f[r]){for(t=r;t&&!c[--t];)c[t]=9;--c[t],c[r]+=10}c[r]-=f[r]}for(;0===c[--u];)c.pop();for(;0===c[0];)c.shift(),--d;return c[0]||(e.s=1,c=[d=0]),e.c=c,e.e=d,e},s.mod=function(e){var t,r=this,i=r.constructor,n=r.s,o=(e=new i(e)).s;if(!e.c[0])throw Error(a);return r.s=e.s=1,t=1==e.cmp(r),r.s=n,e.s=o,t?new i(r):(n=i.DP,o=i.RM,i.DP=i.RM=0,r=r.div(e),i.DP=n,i.RM=o,this.minus(r.times(e)))},s.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},s.plus=s.add=function(e){var t,r,i,n=this,o=n.constructor;if(e=new o(e),n.s!=e.s)return e.s=-e.s,n.minus(e);var a=n.e,s=n.c,u=e.e,c=e.c;if(!s[0]||!c[0])return c[0]||(s[0]?e=new o(n):e.s=n.s),e;if(s=s.slice(),t=a-u){for(t>0?(u=a,i=c):(t=-t,i=s),i.reverse();t--;)i.push(0);i.reverse()}for(s.length-c.length<0&&(i=c,c=s,s=i),t=c.length,r=0;t;s[t]%=10)r=(s[--t]=s[t]+c[t]+r)/10|0;for(r&&(s.unshift(r),++u),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=u,e},s.pow=function(e){var r=this,n=new r.constructor("1"),o=n,a=e<0;if(e!==~~e||e<-1e6||e>t)throw Error(i+"exponent");for(a&&(e=-e);1&e&&(o=o.times(r)),e>>=1;)r=r.times(r);return a?n.div(o):o},s.prec=function(t,r){if(t!==~~t||t<1||t>e)throw Error(i+"precision");return l(new this.constructor(this),t,r)},s.round=function(t,r){if(t===u)t=0;else if(t!==~~t||t<-e||t>e)throw Error(n);return l(new this.constructor(this),t+this.e+1,r)},s.sqrt=function(){var e,t,i,n=this,o=n.constructor,a=n.s,s=n.e,u=new o("0.5");if(!n.c[0])return new o(n);if(a<0)throw Error(r+"No square root");0===(a=Math.sqrt(n+""))||a===1/0?((t=n.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new o(((a=Math.sqrt(t))==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+s)):e=new o(a+""),s=e.e+(o.DP+=4);do{i=e,e=u.times(i.plus(n.div(i)))}while(i.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return l(e,(o.DP-=4)+e.e+1,o.RM)},s.times=s.mul=function(e){var t,r=this,i=r.constructor,n=r.c,o=(e=new i(e)).c,a=n.length,s=o.length,u=r.e,c=e.e;if(e.s=r.s==e.s?1:-1,!n[0]||!o[0])return e.c=[e.e=0],e;for(e.e=u+c,a<s&&(t=n,n=o,o=t,c=a,a=s,s=c),t=new Array(c=a+s);c--;)t[c]=0;for(u=s;u--;){for(s=0,c=a+u;c>u;)s=t[c]+o[u]*n[c-u-1]+s,t[c--]=s%10,s=s/10|0;t[c]=s}for(s?++e.e:t.shift(),u=t.length;!t[--u];)t.pop();return e.c=t,e},s.toExponential=function(t,r){var i=this,o=i.c[0];if(t!==u){if(t!==~~t||t<0||t>e)throw Error(n);for(i=l(new i.constructor(i),++t,r);i.c.length<t;)i.c.push(0)}return f(i,!0,!!o)},s.toFixed=function(t,r){var i=this,o=i.c[0];if(t!==u){if(t!==~~t||t<0||t>e)throw Error(n);for(t=t+(i=l(new i.constructor(i),t+i.e+1,r)).e+1;i.c.length<t;)i.c.push(0)}return f(i,!1,!!o)},s[Symbol.for("nodejs.util.inspect.custom")]=s.toJSON=s.toString=function(){var e=this,t=e.constructor;return f(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},s.toNumber=function(){var e=Number(f(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(r+"Imprecise conversion");return e},s.toPrecision=function(t,r){var n=this,o=n.constructor,a=n.c[0];if(t!==u){if(t!==~~t||t<1||t>e)throw Error(i+"precision");for(n=l(new o(n),t,r);n.c.length<t;)n.c.push(0)}return f(n,t<=n.e||n.e<=o.NE||n.e>=o.PE,!!a)},s.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(r+"valueOf disallowed");return f(e,e.e<=t.NE||e.e>=t.PE,!0)};var d=function e(){function t(r){var n=this;if(!(n instanceof t))return r===u?e():new t(r);if(r instanceof t)n.s=r.s,n.e=r.e,n.c=r.c.slice();else{if("string"!=typeof r){if(!0===t.strict&&"bigint"!=typeof r)throw TypeError(i+"value");r=0===r&&1/r<0?"-0":String(r)}!function(e,t){var r,n,o;if(!c.test(t))throw Error(i+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".",""));(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length);for(o=t.length,n=0;n<o&&"0"==t.charAt(n);)++n;if(n==o)e.c=[e.e=0];else{for(;o>0&&"0"==t.charAt(--o););for(e.e=r-n-1,e.c=[],r=0;n<=o;)e.c[r++]=+t.charAt(n++)}}(n,r)}n.constructor=t}return t.prototype=s,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=false,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}();var h=0;d.DP=34,d.RM=2,d.prototype.toString=function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:18,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.RM;return"string"==typeof(e=this.toFixed(r,i))&&(t||-1===e.indexOf(".")||(e=/[eE]/.test(e)?e.replace(/\.?0*(?=[eE])/,""):e.replace(/\.?0*$/,"")),e=e.replace(/^0+(?!\.)(?!$)/,"")),e};var p="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m=[],b=[],v="undefined"!=typeof Uint8Array?Uint8Array:Array,g=!1;function y(){g=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)m[t]=e[t],b[e.charCodeAt(t)]=t;b["-".charCodeAt(0)]=62,b["_".charCodeAt(0)]=63}function w(e,t,r){for(var i,n,o=[],a=t;a<r;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(m[(n=i)>>18&63]+m[n>>12&63]+m[n>>6&63]+m[63&n]);return o.join("")}function _(e){var t;g||y();for(var r=e.length,i=r%3,n="",o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(w(e,s,s+a>u?u:s+a));return 1===i?(t=e[r-1],n+=m[t>>2],n+=m[t<<4&63],n+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],n+=m[t>>10],n+=m[t>>4&63],n+=m[t<<2&63],n+="="),o.push(n),o.join("")}function k(e,t,r,i,n){var o,a,s=8*n-i-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?n-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=i;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,i),o-=c}return(h?-1:1)*a*Math.pow(2,o-i)}function E(e,t,r,i,n,o){var a,s,u,c=8*o-n-1,l=(1<<c)-1,f=l>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,n),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;e[r+h]=255&s,h+=p,s/=256,n-=8);for(a=a<<n|s,c+=n;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}var S={}.toString,x=Array.isArray||function(e){return"[object Array]"==S.call(e)};O.TYPED_ARRAY_SUPPORT=void 0===p.TYPED_ARRAY_SUPPORT||p.TYPED_ARRAY_SUPPORT;var M=A();function A(){return O.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(e,t){if(A()<t)throw new RangeError("Invalid typed array length");return O.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=O.prototype:(null===e&&(e=new O(t)),e.length=t),e}function O(e,t,r){if(!(O.TYPED_ARRAY_SUPPORT||this instanceof O))return new O(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return j(this,e)}return z(this,e,t,r)}function z(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i);O.TYPED_ARRAY_SUPPORT?(e=t).__proto__=O.prototype:e=P(e,t);return e}(e,t,r,i):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!O.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|B(t,r);e=T(e,i);var n=e.write(t,r);n!==i&&(e=e.slice(0,n));return e}(e,t,r):function(e,t){if(L(t)){var r=0|I(t.length);return 0===(e=T(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?T(e,0):P(e,t);if("Buffer"===t.type&&x(t.data))return P(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function R(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function j(e,t){if(R(t),e=T(e,t<0?0:0|I(t)),!O.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function P(e,t){var r=t.length<0?0:0|I(t.length);e=T(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function I(e){if(e>=A())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A().toString(16)+" bytes");return 0|e}function L(e){return!(null==e||!e._isBuffer)}function B(e,t){if(L(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ce(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return le(e).length;default:if(i)return ce(e).length;t=(""+t).toLowerCase(),i=!0}}function C(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return X(this,t,r);case"utf8":case"utf-8":return G(this,t,r);case"ascii":return J(this,t,r);case"latin1":case"binary":return $(this,t,r);case"base64":return Y(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function D(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function N(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=O.from(t,i)),L(t))return 0===t.length?-1:q(e,t,r,i,n);if("number"==typeof t)return t&=255,O.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):q(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function q(e,t,r,i,n){var o,a=1,s=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var l=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var f=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function U(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;a<i;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function K(e,t,r,i){return fe(ce(t,e.length-r),e,r,i)}function F(e,t,r,i){return fe(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function V(e,t,r,i){return F(e,t,r,i)}function H(e,t,r,i){return fe(le(t),e,r,i)}function W(e,t,r,i){return fe(function(e,t){for(var r,i,n,o=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(r=e.charCodeAt(a))>>8,n=r%256,o.push(n),o.push(i);return o}(t,e.length-r),e,r,i)}function Y(e,t,r){return 0===t&&r===e.length?_(e):_(e.slice(t,r))}function G(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var o,a,s,u,c=e[n],l=null,f=c>239?4:c>223?3:c>191?2:1;if(n+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[n+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[n+1],a=e[n+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[n+1],a=e[n+2],s=e[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l),n+=f}return function(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=Z));return r}(i)}O.poolSize=8192,O._augment=function(e){return e.__proto__=O.prototype,e},O.from=function(e,t,r){return z(null,e,t,r)},O.TYPED_ARRAY_SUPPORT&&(O.prototype.__proto__=Uint8Array.prototype,O.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&O[Symbol.species]),O.alloc=function(e,t,r){return function(e,t,r,i){return R(t),t<=0?T(e,t):void 0!==r?"string"==typeof i?T(e,t).fill(r,i):T(e,t).fill(r):T(e,t)}(null,e,t,r)},O.allocUnsafe=function(e){return j(null,e)},O.allocUnsafeSlow=function(e){return j(null,e)},O.isBuffer=de,O.compare=function(e,t){if(!L(e)||!L(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},O.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},O.concat=function(e,t){if(!x(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return O.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=O.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(!L(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},O.byteLength=B,O.prototype._isBuffer=!0,O.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)D(this,t,t+1);return this},O.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)D(this,t,t+3),D(this,t+1,t+2);return this},O.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;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},O.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?G(this,0,e):C.apply(this,arguments)},O.prototype.equals=function(e){if(!L(e))throw new TypeError("Argument must be a Buffer");return this===e||0===O.compare(this,e)},O.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},O.prototype.compare=function(e,t,r,i,n){if(!L(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(i,n),c=e.slice(t,r),l=0;l<s;++l)if(u[l]!==c[l]){o=u[l],a=c[l];break}return o<a?-1:a<o?1:0},O.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},O.prototype.indexOf=function(e,t,r){return N(this,e,t,r,!0)},O.prototype.lastIndexOf=function(e,t,r){return N(this,e,t,r,!1)},O.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return U(this,e,t,r);case"utf8":case"utf-8":return K(this,e,t,r);case"ascii":return F(this,e,t,r);case"latin1":case"binary":return V(this,e,t,r);case"base64":return H(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;function J(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function $(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function X(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",o=t;o<r;++o)n+=ue(e[o]);return n}function Q(e,t,r){for(var i=e.slice(t,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function ee(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function te(e,t,r,i,n,o){if(!L(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function re(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(e.length-r,2);n<o;++n)e[r+n]=(t&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function ie(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(e.length-r,4);n<o;++n)e[r+n]=t>>>8*(i?n:3-n)&255}function ne(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function oe(e,t,r,i,n){return n||ne(e,0,r,4),E(e,t,r,i,23,4),r+4}function ae(e,t,r,i,n){return n||ne(e,0,r,8),E(e,t,r,i,52,8),r+8}O.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),O.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=O.prototype;else{var n=t-e;r=new O(n,void 0);for(var o=0;o<n;++o)r[o]=this[o+e]}return r},O.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||ee(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i},O.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||ee(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},O.prototype.readUInt8=function(e,t){return t||ee(e,1,this.length),this[e]},O.prototype.readUInt16LE=function(e,t){return t||ee(e,2,this.length),this[e]|this[e+1]<<8},O.prototype.readUInt16BE=function(e,t){return t||ee(e,2,this.length),this[e]<<8|this[e+1]},O.prototype.readUInt32LE=function(e,t){return t||ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},O.prototype.readUInt32BE=function(e,t){return t||ee(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},O.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||ee(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},O.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||ee(e,t,this.length);for(var i=t,n=1,o=this[e+--i];i>0&&(n*=256);)o+=this[e+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},O.prototype.readInt8=function(e,t){return t||ee(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},O.prototype.readInt16LE=function(e,t){t||ee(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},O.prototype.readInt16BE=function(e,t){t||ee(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},O.prototype.readInt32LE=function(e,t){return t||ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},O.prototype.readInt32BE=function(e,t){return t||ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},O.prototype.readFloatLE=function(e,t){return t||ee(e,4,this.length),k(this,e,!0,23,4)},O.prototype.readFloatBE=function(e,t){return t||ee(e,4,this.length),k(this,e,!1,23,4)},O.prototype.readDoubleLE=function(e,t){return t||ee(e,8,this.length),k(this,e,!0,52,8)},O.prototype.readDoubleBE=function(e,t){return t||ee(e,8,this.length),k(this,e,!1,52,8)},O.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||te(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},O.prototype.writeUIntBE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||te(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},O.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,1,255,0),O.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},O.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,2,65535,0),O.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):re(this,e,t,!0),t+2},O.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,2,65535,0),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):re(this,e,t,!1),t+2},O.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,4,4294967295,0),O.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ie(this,e,t,!0),t+4},O.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,4,4294967295,0),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ie(this,e,t,!1),t+4},O.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);te(this,e,t,r,n-1,-n)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},O.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);te(this,e,t,r,n-1,-n)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},O.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,1,127,-128),O.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},O.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,2,32767,-32768),O.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):re(this,e,t,!0),t+2},O.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,2,32767,-32768),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):re(this,e,t,!1),t+2},O.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,4,2147483647,-2147483648),O.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ie(this,e,t,!0),t+4},O.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||te(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ie(this,e,t,!1),t+4},O.prototype.writeFloatLE=function(e,t,r){return oe(this,e,t,!0,r)},O.prototype.writeFloatBE=function(e,t,r){return oe(this,e,t,!1,r)},O.prototype.writeDoubleLE=function(e,t,r){return ae(this,e,t,!0,r)},O.prototype.writeDoubleBE=function(e,t,r){return ae(this,e,t,!1,r)},O.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),e.length-t<i-r&&(i=e.length-t+r);var n,o=i-r;if(this===e&&r<t&&t<i)for(n=o-1;n>=0;--n)e[n+t]=this[n+r];else if(o<1e3||!O.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},O.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!O.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=L(e)?e:ce(new O(e,i).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var se=/[^+\/0-9A-Za-z-_]/g;function ue(e){return e<16?"0"+e.toString(16):e.toString(16)}function ce(e,t){var r;t=t||1/0;for(var i=e.length,n=null,o=[],a=0;a<i;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function le(e){return function(e){var t,r,i,n,o,a;g||y();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new v(3*s/4-o),i=o>0?s-4:s;var u=0;for(t=0,r=0;t<i;t+=4,r+=3)n=b[e.charCodeAt(t)]<<18|b[e.charCodeAt(t+1)]<<12|b[e.charCodeAt(t+2)]<<6|b[e.charCodeAt(t+3)],a[u++]=n>>16&255,a[u++]=n>>8&255,a[u++]=255&n;return 2===o?(n=b[e.charCodeAt(t)]<<2|b[e.charCodeAt(t+1)]>>4,a[u++]=255&n):1===o&&(n=b[e.charCodeAt(t)]<<10|b[e.charCodeAt(t+1)]<<4|b[e.charCodeAt(t+2)]>>2,a[u++]=n>>8&255,a[u++]=255&n),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(se,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function fe(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function de(e){return null!=e&&(!!e._isBuffer||he(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&he(e.slice(0,0))}(e))}function he(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var pe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function me(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function be(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),r}function ve(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ge(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}var ye="Impossible case. Please create issue.",we="The tweak was out of range or the resulted private key is invalid",_e="The tweak was out of range or equal to zero",ke="Unknow error on context randomization",Ee="Private Key is invalid",Se="Public Key could not be parsed",xe="Public Key serialization error",Me="The sum of the public keys is not valid",Ae="Signature could not be parsed",Te="The nonce generation function failed, or the private key was invalid",Oe="Public key could not be recover",ze="Scalar was invalid (zero or overflow)";function Re(e,t){if(!e)throw new Error(t)}function je(e,t,r){if(Re(t instanceof Uint8Array,"Expected ".concat(e," to be an Uint8Array")),void 0!==r)if(Array.isArray(r)){var i=r.join(", "),n="Expected ".concat(e," to be an Uint8Array with length [").concat(i,"]");Re(r.includes(t.length),n)}else{var o="Expected ".concat(e," to be an Uint8Array with length ").concat(r);Re(t.length===r,o)}}function Pe(e){Re("Boolean"===Le(e),"Expected compressed to be a Boolean")}function Ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),je("output",e,t),e}function Le(e){return Object.prototype.toString.call(e).slice(8,-1)}var Be={},Ce="6.5.4",De={};function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}var qe={exports:{}},Ue=be(Object.freeze({__proto__:null,Buffer:O,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),O.alloc(+e)},isBuffer:de,kMaxLength:M}));!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===Ne(e)?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Ue.Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function u(e,t,r,i){for(var n=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;n*=i,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"===Ne(e)&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"===Ne(e))return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)a=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,a=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=s(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=s(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,a=o%i,s=Math.min(o,o-a)+r,c=0,l=r;l<s;l+=i)c=u(e,l,l+i,t),this.imuln(n),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var f=1;for(c=u(e,l,e.length,t),l=0;l<a;l++)f*=t;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<i;c++){for(var l=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(n=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<n|o)).toString(16);i=0!=(o=s>>>24-n&16777215)||a!==this.length-1?c[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],h=f[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);i=(p=p.idivn(h)).isZero()?m+i:c[d-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-n;s++)c[s]=0;for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[o-s-1]=a}return c},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,r){var i,n,o,a=e.words,s=t.words,u=r.words,c=0,l=0|a[0],f=8191&l,d=l>>>13,h=0|a[1],p=8191&h,m=h>>>13,b=0|a[2],v=8191&b,g=b>>>13,y=0|a[3],w=8191&y,_=y>>>13,k=0|a[4],E=8191&k,S=k>>>13,x=0|a[5],M=8191&x,A=x>>>13,T=0|a[6],O=8191&T,z=T>>>13,R=0|a[7],j=8191&R,P=R>>>13,I=0|a[8],L=8191&I,B=I>>>13,C=0|a[9],D=8191&C,N=C>>>13,q=0|s[0],U=8191&q,K=q>>>13,F=0|s[1],V=8191&F,H=F>>>13,W=0|s[2],Y=8191&W,G=W>>>13,Z=0|s[3],J=8191&Z,$=Z>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],oe=8191&ne,ae=ne>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(i=Math.imul(f,U))|0)+((8191&(n=(n=Math.imul(f,K))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,K))+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,K))+Math.imul(m,U)|0,o=Math.imul(m,K);var ve=(c+(i=i+Math.imul(f,V)|0)|0)+((8191&(n=(n=n+Math.imul(f,H)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,U),n=(n=Math.imul(v,K))+Math.imul(g,U)|0,o=Math.imul(g,K),i=i+Math.imul(p,V)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,H)|0;var ge=(c+(i=i+Math.imul(f,Y)|0)|0)+((8191&(n=(n=n+Math.imul(f,G)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,K))+Math.imul(_,U)|0,o=Math.imul(_,K),i=i+Math.imul(v,V)|0,n=(n=n+Math.imul(v,H)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,H)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,G)|0;var ye=(c+(i=i+Math.imul(f,J)|0)|0)+((8191&(n=(n=n+Math.imul(f,$)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,$)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,K))+Math.imul(S,U)|0,o=Math.imul(S,K),i=i+Math.imul(w,V)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,G)|0,i=i+Math.imul(p,J)|0,n=(n=n+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0;var we=(c+(i=i+Math.imul(f,Q)|0)|0)+((8191&(n=(n=n+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(M,U),n=(n=Math.imul(M,K))+Math.imul(A,U)|0,o=Math.imul(A,K),i=i+Math.imul(E,V)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,H)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(v,J)|0,n=(n=n+Math.imul(v,$)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,$)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(i=i+Math.imul(f,re)|0)|0)+((8191&(n=(n=n+Math.imul(f,ie)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(O,U),n=(n=Math.imul(O,K))+Math.imul(z,U)|0,o=Math.imul(z,K),i=i+Math.imul(M,V)|0,n=(n=n+Math.imul(M,H)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,H)|0,i=i+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,G)|0,i=i+Math.imul(w,J)|0,n=(n=n+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,i=i+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var ke=(c+(i=i+Math.imul(f,oe)|0)|0)+((8191&(n=(n=n+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,K))+Math.imul(P,U)|0,o=Math.imul(P,K),i=i+Math.imul(O,V)|0,n=(n=n+Math.imul(O,H)|0)+Math.imul(z,V)|0,o=o+Math.imul(z,H)|0,i=i+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(E,J)|0,n=(n=n+Math.imul(E,$)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,$)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(v,re)|0,n=(n=n+Math.imul(v,ie)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(c+(i=i+Math.imul(f,ue)|0)|0)+((8191&(n=(n=n+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(L,U),n=(n=Math.imul(L,K))+Math.imul(B,U)|0,o=Math.imul(B,K),i=i+Math.imul(j,V)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,H)|0,i=i+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(z,Y)|0,o=o+Math.imul(z,G)|0,i=i+Math.imul(M,J)|0,n=(n=n+Math.imul(M,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(v,oe)|0,n=(n=n+Math.imul(v,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Se=(c+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(D,U),n=(n=Math.imul(D,K))+Math.imul(N,U)|0,o=Math.imul(N,K),i=i+Math.imul(L,V)|0,n=(n=n+Math.imul(L,H)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,H)|0,i=i+Math.imul(j,Y)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,G)|0,i=i+Math.imul(O,J)|0,n=(n=n+Math.imul(O,$)|0)+Math.imul(z,J)|0,o=o+Math.imul(z,$)|0,i=i+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(E,re)|0,n=(n=n+Math.imul(E,ie)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,i=i+Math.imul(v,ue)|0,n=(n=n+Math.imul(v,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,i=i+Math.imul(p,fe)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var xe=(c+(i=i+Math.imul(f,pe)|0)|0)+((8191&(n=(n=n+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,me)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(D,V),n=(n=Math.imul(D,H))+Math.imul(N,V)|0,o=Math.imul(N,H),i=i+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(j,J)|0,n=(n=n+Math.imul(j,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,i=i+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(z,Q)|0,o=o+Math.imul(z,ee)|0,i=i+Math.imul(M,re)|0,n=(n=n+Math.imul(M,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(E,oe)|0,n=(n=n+Math.i