UNPKG

jcc-moac-abi

Version:

Decoder and encoder for the MOAC ABI and decode events from MOAC transactions

1 lines 288 kB
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.jcc_moac_abi=r():t.jcc_moac_abi=r()}(window,function(){return n={},t.m=r=[function(t,r,n){var e=n(266),i=n(283),o=n(29),u=n(2),a=n(288);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?u(t)?i(t[0],t[1]):e(t):a(t)}},function(t,r,n){var e=n(29),i=n(124),o=n(86);t.exports=function(t,r){return o(i(t,r,e),t+"")}},function(t,r){var n=Array.isArray;t.exports=n},function(t,r,n){var e=n(233);t.exports=function(t){var r=e(t),n=r%1;return r==r?n?r-n:r:0}},function(t,r){t.exports=function(t,r){for(var n=-1,e=null==t?0:t.length,i=Array(e);++n<e;)i[n]=r(t[n],n,t);return i}},function(t,r,n){var e=n(121),i="object"==typeof self&&self&&self.Object===Object&&self,o=e||i||Function("return this")();t.exports=o},function(t,r){t.exports=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}},function(t,r,n){var e=n(46),i=n(9);t.exports=function(t){return i(t)&&e(t)}},function(t,r,n){var e=n(135),i=n(375),o=n(46);t.exports=function(t){return o(t)?e(t,!0):i(t)}},function(t,r){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,r,n){var e=n(135),i=n(137),o=n(46);t.exports=function(t){return o(t)?e(t):i(t)}},function(t,r,n){function e(t){u.config(s.MC_BIGNUMBER_ROUNDING_MODE);var r=a.padLeft(a.toTwosComplement(t).toString(16),64);return new c(r)}function i(t){var r=t.staticPart()||"0";return"1"===new u(r.substr(0,1),16).toString(2).substr(0,1)?new u(r,16).minus(new u("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new u(r,16)}function o(t){var r=t.staticPart()||"0";return new u(r,16)}var u=n(56),a=n(14),s=n(190),c=n(191);t.exports={formatInputInt:e,formatInputBytes:function(t){var r=a.toHex(t).substr(2),n=Math.floor((r.length+63)/64);return r=a.padRight(r,64*n),new c(r)},formatInputDynamicBytes:function(t){var r=a.toHex(t).substr(2),n=r.length/2,i=Math.floor((r.length+63)/64);return r=a.padRight(r,64*i),new c(e(n).value+r)},formatInputString:function(t){var r=a.fromUtf8(t).substr(2),n=r.length/2,i=Math.floor((r.length+63)/64);return r=a.padRight(r,64*i),new c(e(n).value+r)},formatInputBool:function(t){return new c("000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0"))},formatInputReal:function(t){return e(new u(t).times(new u(2).pow(128)))},formatInputTuple:function(t){return e(new u(t).times(new u(2).pow(128)))},formatOutputInt:i,formatOutputUInt:o,formatOutputReal:function(t){return i(t).dividedBy(new u(2).pow(128))},formatOutputUReal:function(t){return o(t).dividedBy(new u(2).pow(128))},formatOutputBool:function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t.staticPart()},formatOutputBytes:function(t,r){var n=r.match(/^bytes([0-9]*)/),e=parseInt(n[1]);return"0x"+t.staticPart().slice(0,2*e)},formatOutputDynamicBytes:function(t){var r=2*new u(t.dynamicPart().slice(0,64),16).toNumber();return"0x"+t.dynamicPart().substr(64,r)},formatOutputString:function(t){var r=2*new u(t.dynamicPart().slice(0,64),16).toNumber();return a.toUtf8(t.dynamicPart().substr(64,r))},formatOutputAddress:function(t){var r=t.staticPart();return"0x"+r.slice(r.length-40,r.length)},formatOutputTuple:function(t){var r="tuple";return-1<t.indexOf("[]")&&(r="tuple[]",t=t.slice(0,-2)),{type:r,name:t}}}},function(t,r,n){var e=n(58),i=n(237);t.exports=function t(r,n,o,u,a){var s=-1,c=r.length;for(o=o||i,a=a||[];++s<c;){var f=r[s];0<n&&o(f)?1<n?t(f,n-1,o,u,a):e(a,f):u||(a[a.length]=f)}return a}},function(t,r){t.exports=function(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}},function(t,r,n){var e=n(41),i=n(56),o=n(57),u=n(112),a=(n(218),n(222),n(25)),s=n(78);function c(t,r,n){return new Array(r-t.length+1).join(n||"0")+t}function f(t,r){t=u.encode(t);for(var n="",e=0;e<t.length;e++){var i=t.charCodeAt(e);if(0===i){if(!r)break;n+="00"}else{var o=i.toString(16);n+=o.length<2?"0"+o:o}}return"0x"+n}function l(t){var r=g(t),n=r.toString(16);return r.isLessThan(0)?"-0x"+n.substr(1):"0x"+n}var h={nomc:"0",sha:"1",ksha:"1000",Ksha:"1000",femtomc:"1000",msha:"1000000",Msha:"1000000",picomc:"1000000",gsha:"1000000000",Gsha:"1000000000",nanomc:"1000000000",nano:"1000000000",xiao:"1000000000",micromc:"1000000000000",micro:"1000000000000",sand:"1000000000000",millimc:"1000000000000000",milli:"1000000000000000",mc:"1000000000000000000",kmc:"1000000000000000000000",grand:"1000000000000000000000",mmc:"1000000000000000000000000",gmc:"1000000000000000000000000000",tmc:"1000000000000000000000000000000"};function p(t){if(x(t))return l(+t);if(b(t))return l(t);if("object"==typeof t)return f(JSON.stringify(t));if(w(t)){if(0===t.indexOf("-0x"))return l(t);if(0===t.indexOf("0x"))return t;if(!isFinite(t))return f(t,1)}return l(t)}function d(t){t=t?t.toLowerCase():"mc";var r=h[t];if(void 0===r)throw new Error("This unit ["+t+"] doesn't exists, please use the one of the following units"+JSON.stringify(h,null,2));return new i(r,10)}function v(t){return/^0x[0-9a-f]{40}$/i.test(t)}var m,g=function(t){return b(t=t||0)?t:!w(t)||0!==t.indexOf("0x")&&0!==t.indexOf("-0x")?new i(t.toString(10),10):new i(t.toLowerCase().replace("0x",""),16)},y=function(t){t=t.replace("0x","");for(var r=o(t.toLowerCase()),n=0;n<40;n++)if(7<parseInt(r[n],16)&&t[n].toUpperCase()!==t[n]||parseInt(r[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},b=function(t){return t instanceof i||t&&t.constructor&&"BigNumber"===t.constructor.name},w=function(t){return"string"==typeof t||t&&t.constructor&&"String"===t.constructor.name},x=(m=function(t){return(e.isString(t)||e.isNumber(t))&&/^(-)?0x[0-9a-f]*$/i.test(t)},function(t){return"boolean"==typeof t});t.exports={padLeft:c,padRight:function(t,r,n){return t+new Array(r-t.length+1).join(n||"0")},BigIntToHex:function(t){return"0x"+function(t){return t.length%2==1&&(t=t.replace("0x","0x0")),t}(new a(t,10).toString(16))},numberToHex:function(t){if(e.isNull(t)||e.isUndefined(t))return t;if(!isFinite(t)&&!m(t))throw new Error('Given input "'+t+'" is not a number.');var r=function(t){try{return s.apply(null,arguments)}catch(r){throw new Error(r+' Given value: "'+t+'"')}}(t),n=r.toString(16);return r.lt(new a(0))?"-0x"+n.substr(1):"0x"+n},toHex:p,toDecimal:function(t){return g(t).toNumber()},fromDecimal:l,toUtf8:function(t){var r="",n=0,e=t.length;for("0x"===t.substring(0,2)&&(n=2);n<e;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;r+=String.fromCharCode(i)}return u.decode(r)},toAscii:function(t){var r="",n=0,e=t.length;for("0x"===t.substring(0,2)&&(n=2);n<e;n+=2){var i=parseInt(t.substr(n,2),16);r+=String.fromCharCode(i)}return r},fromUtf8:f,fromAscii:function(t){for(var r="",n=0;n<t.length;n++){var e=t.charCodeAt(n).toString(16);r+=e.length<2?"0"+e:e}return"0x"+r},transformToFullName:function(t){if(-1!==t.name.indexOf("("))return t.name;var r=t.inputs.map(function(t){return t.type}).join();return t.name+"("+r+")"},extractDisplayName:function(t){var r=t.indexOf("(");return-1!==r?t.substr(0,r):t},extractTypeName:function(t){var r=t.indexOf("(");return-1!==r?t.substr(r+1,t.length-1-(r+1)).replace(" ",""):""},toSha:function(t,r){var n=g(t).times(d(r));return b(t)?n:n.toString(10)},fromSha:function(t,r){var n=g(t).dividedBy(d(r));return b(t)?n:n.toString(10)},toBigNumber:g,toTwosComplement:function(t){var r=g(t).integerValue();return r.isLessThan(0)?new i("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(r).plus(1):r},toAddress:function(t){return v(t)?t:/^[0-9a-f]{40}$/.test(t)?"0x"+t:"0x"+c(p(t).substr(2),40)},isBigNumber:b,isStrictAddress:v,isAddress:function(t){return!!/^(0x)?[0-9a-f]{40}$/i.test(t)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(t)&&!/^(0x)?[0-9A-F]{40}$/.test(t))||y(t))},isChecksumAddress:y,toChecksumAddress:function(t){if(void 0===t)return"";t=t.toLowerCase().replace("0x","");for(var r=o(t),n="0x",e=0;e<t.length;e++)7<parseInt(r[e],16)?n+=t[e].toUpperCase():n+=t[e];return n},isFunction:function(t){return"function"==typeof t},isString:w,isObject:function(t){return null!==t&&!Array.isArray(t)&&"object"==typeof t},isBoolean:x,isArray:function(t){return Array.isArray(t)},isJson:function(t){try{return!!JSON.parse(t)}catch(t){return!1}},isBloom:function(t){return!(!/^(0x)?[0-9a-f]{512}$/i.test(t)||!/^(0x)?[0-9a-f]{512}$/.test(t)&&!/^(0x)?[0-9A-F]{512}$/.test(t))},isTopic:function(t){return!(!/^(0x)?[0-9a-f]{64}$/i.test(t)||!/^(0x)?[0-9a-f]{64}$/.test(t)&&!/^(0x)?[0-9A-F]{64}$/.test(t))},isHexString:m}},function(t,r,n){"use strict";var e=n(43),i=n(117);function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function u(t){return 1===t.length?"0"+t:t}function a(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}r.inherits=i,r.toArray=function(t,r){if(Array.isArray(t))return t.slice();if(!t)return[];var n,e,i=[];if("string"==typeof t)if(r){if("hex"===r)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),u=0;u<t.length;u+=2)i.push(parseInt(t[u]+t[u+1],16))}else for(var o=0,u=0;u<t.length;u++){var a=t.charCodeAt(u);a<128?i[o++]=a:a<2048?(i[o++]=a>>6|192,i[o++]=63&a|128):(e=u,55296!=(64512&(n=t).charCodeAt(e))||e<0||e+1>=n.length||56320!=(64512&n.charCodeAt(e+1))?i[o++]=a>>12|224:(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++u)),i[o++]=a>>18|240,i[o++]=a>>12&63|128),i[o++]=a>>6&63|128,i[o++]=63&a|128)}else for(u=0;u<t.length;u++)i[u]=0|t[u];return i},r.toHex=function(t){for(var r="",n=0;n<t.length;n++)r+=u(t[n].toString(16));return r},r.htonl=o,r.toHex32=function(t,r){for(var n="",e=0;e<t.length;e++){var i=t[e];"little"===r&&(i=o(i)),n+=a(i.toString(16))}return n},r.zero2=u,r.zero8=a,r.join32=function(t,r,n,i){var o=n-r;e(o%4==0);for(var u=new Array(o/4),a=0,s=r;a<u.length;a++,s+=4){var c;c="big"===i?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],u[a]=c>>>0}return u},r.split32=function(t,r){for(var n=new Array(4*t.length),e=0,i=0;e<t.length;e++,i+=4){var o=t[e];"big"===r?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},r.rotr32=function(t,r){return t>>>r|t<<32-r},r.rotl32=function(t,r){return t<<r|t>>>32-r},r.sum32=function(t,r){return t+r>>>0},r.sum32_3=function(t,r,n){return t+r+n>>>0},r.sum32_4=function(t,r,n,e){return t+r+n+e>>>0},r.sum32_5=function(t,r,n,e,i){return t+r+n+e+i>>>0},r.sum64=function(t,r,n,e){var i=t[r],o=e+t[r+1]>>>0,u=(o<e?1:0)+n+i;t[r]=u>>>0,t[r+1]=o},r.sum64_hi=function(t,r,n,e){return(r+e>>>0<r?1:0)+t+n>>>0},r.sum64_lo=function(t,r,n,e){return r+e>>>0},r.sum64_4_hi=function(t,r,n,e,i,o,u,a){var s=0,c=r;return s+=(c=c+e>>>0)<r?1:0,s+=(c=c+o>>>0)<o?1:0,t+n+i+u+(s+=(c=c+a>>>0)<a?1:0)>>>0},r.sum64_4_lo=function(t,r,n,e,i,o,u,a){return r+e+o+a>>>0},r.sum64_5_hi=function(t,r,n,e,i,o,u,a,s,c){var f=0,l=r;return f+=(l=l+e>>>0)<r?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+a>>>0)<a?1:0,t+n+i+u+s+(f+=(l=l+c>>>0)<c?1:0)>>>0},r.sum64_5_lo=function(t,r,n,e,i,o,u,a,s,c){return r+e+o+a+c>>>0},r.rotr64_hi=function(t,r,n){return(r<<32-n|t>>>n)>>>0},r.rotr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0},r.shr64_hi=function(t,r,n){return t>>>n},r.shr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0}},function(t,r){t.exports=function(t,r,n){var e=-1,i=t.length;r<0&&(r=i<-r?0:i+r),(n=i<n?i:n)<0&&(n+=i),i=n<r?0:n-r>>>0,r>>>=0;for(var o=Array(i);++e<i;)o[e]=t[e+r];return o}},function(t,r,n){var e=n(51),i=n(52);t.exports=function(t,r,n,o){var u=!n;n=n||{};for(var a=-1,s=r.length;++a<s;){var c=r[a],f=o?o(n[c],t[c],c,n,t):void 0;void 0===f&&(f=t[c]),u?i(n,c,f):e(n,c,f)}return n}},function(t,r,n){function e(t){this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter}var i=n(11),o=n(191);n(14),e.prototype.isType=function(t){throw"this method should be overrwritten for type "+t},e.prototype.staticPartLength=function(t){return(this.nestedTypes(t)||["[1]"]).map(function(t){return parseInt(t.slice(1,-1),10)||1}).reduce(function(t,r){return t*r},32)},e.prototype.isDynamicArray=function(t){var r=this.nestedTypes(t);return!!r&&!r[r.length-1].match(/[0-9]{1,}/g)},e.prototype.isStaticArray=function(t){var r=this.nestedTypes(t);return!!r&&!!r[r.length-1].match(/[0-9]{1,}/g)},e.prototype.staticArrayLength=function(t){var r=this.nestedTypes(t);return r?parseInt(r[r.length-1].match(/[0-9]{1,}/g)||1):1},e.prototype.nestedName=function(t){var r=this.nestedTypes(t);return r?t.substr(0,t.length-r[r.length-1].length):t},e.prototype.isDynamicType=function(){return!1},e.prototype.nestedTypes=function(t){return t.match(/(\[[0-9]*\])/g)},e.prototype.encode=function(t,r){var n,e,o,u=this;return this.isDynamicArray(r)?(n=t.length,e=u.nestedName(r),(o=[]).push(i.formatInputInt(n).encode()),t.forEach(function(t){o.push(u.encode(t,e))}),o):this.isStaticArray(r)?function(){for(var n=u.staticArrayLength(r),e=u.nestedName(r),i=[],o=0;o<n;o++)i.push(u.encode(t[o],e));return i}():this._inputFormatter(t,r).encode()},e.prototype.decode=function(t,r,n){var e,i,u,a,s=this;if(this.isDynamicArray(n))return function(){for(var e=parseInt("0x"+t.substr(2*r,64)),i=parseInt("0x"+t.substr(2*e,64)),o=e+32,u=s.nestedName(n),a=s.staticPartLength(u),c=32*Math.floor((a+31)/32),f=[],l=0;l<i*c;l+=c)f.push(s.decode(t,o+l,u));return f}();if(this.isStaticArray(n))return function(){for(var e=s.staticArrayLength(n),i=r,o=s.nestedName(n),u=s.staticPartLength(o),a=32*Math.floor((u+31)/32),c=[],f=0;f<e*a;f+=a)c.push(s.decode(t,i+f,o));return c}();if(this.isDynamicType(n))return e=parseInt("0x"+t.substr(2*r,64)),i=parseInt("0x"+t.substr(2*e,64)),u=Math.floor((i+31)/32),a=new o(t.substr(2*e,64*(1+u)),0),s._outputFormatter(a,n);var c=this.staticPartLength(n),f=new o(t.substr(2*r,2*c));return this._outputFormatter(f,n)},t.exports=e},function(t,r){t.exports=function(t,r){return t===r||t!=t&&r!=r}},function(t,r,n){var e=n(23);t.exports=function(t){if("string"==typeof t||e(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},function(t,r,n){var e=n(26),i=n(6);t.exports=function(t){if(!i(t))return!1;var r=e(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}},function(t,r){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&n.test(t))&&-1<t&&t%1==0&&t<r}},function(t,r,n){var e=n(26),i=n(9);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==e(t)}},function(t,r,n){var e=n(2),i=n(91),o=n(143),u=n(144);t.exports=function(t,r){return e(t)?t:i(t,r)?[t]:o(u(t))}},function(t,r,n){(function(t){!function(t,r){"use strict";function e(t,r){if(!t)throw new Error(r||"Assertion failed")}function i(t,r){function n(){}t.super_=r,n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,r,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==r&&"be"!==r||(n=r,r=10),this._init(t||0,r||10,n||"be"))}var u;"object"==typeof t?t.exports=o:r.BN=o,(o.BN=o).wordSize=26;try{u=n(199).Buffer}catch(t){}function a(t,r,n){for(var e=0,i=Math.min(t.length,n),o=r;o<i;o++){var u=t.charCodeAt(o)-48;e<<=4,e|=49<=u&&u<=54?u-49+10:17<=u&&u<=22?u-17+10:15&u}return e}function s(t,r,n,e){for(var i=0,o=Math.min(t.length,n),u=r;u<o;u++){var a=t.charCodeAt(u)-48;i*=e,i+=49<=a?a-49+10:17<=a?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,r){return 0<t.cmp(r)?t:r},o.min=function(t,r){return t.cmp(r)<0?t:r},o.prototype._init=function(t,r,n){if("number"==typeof t)return this._initNumber(t,r,n);if("object"==typeof t)return this._initArray(t,r,n);"hex"===r&&(r=16),e(r===(0|r)&&2<=r&&r<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===r?this._parseHex(t,i):this._parseBase(t,r,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),r,n)},o.prototype._initNumber=function(t,r,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(e(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),r,n)},o.prototype._initArray=function(t,r,n){if(e("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,u,a=0;if("be"===n)for(i=t.length-1,o=0;0<=i;i-=3)u=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=u<<a&67108863,this.words[o+1]=u>>>26-a&67108863,26<=(a+=24)&&(a-=26,o++);else if("le"===n)for(o=i=0;i<t.length;i+=3)u=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=u<<a&67108863,this.words[o+1]=u>>>26-a&67108863,26<=(a+=24)&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,r){this.length=Math.ceil((t.length-r)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var e,i,o=0;for(n=t.length-6,e=0;r<=n;n-=6)i=a(t,n,n+6),this.words[e]|=i<<o&67108863,this.words[e+1]|=i>>>26-o&4194303,26<=(o+=24)&&(o-=26,e++);n+6!==r&&(i=a(t,r,n+6),this.words[e]|=i<<o&67108863,this.words[e+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,r,n){this.words=[0];for(var e=0,i=this.length=1;i<=67108863;i*=r)e++;e--,i=i/r|0;for(var o=t.length-n,u=o%e,a=Math.min(o,o-u)+n,c=0,f=n;f<a;f+=e)c=s(t,f,f+e,r),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!=u){var l=1;for(c=s(t,f,t.length,r),f=0;f<u;f++)l*=r;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var r=0;r<this.length;r++)t.words[r]=this.words[r];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.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"],f=[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],l=[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 h(t,r,n){n.negative=r.negative^t.negative;var e=t.length+r.length|0;e=(n.length=e)-1|0;var i=0|t.words[0],o=0|r.words[0],u=i*o,a=67108863&u,s=u/67108864|0;n.words[0]=a;for(var c=1;c<e;c++){for(var f=s>>>26,l=67108863&s,h=Math.min(c,r.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;f+=(u=(i=0|t.words[d])*(o=0|r.words[p])+l)/67108864|0,l=67108863&u}n.words[c]=0|l,s=0|f}return 0!==s?n.words[c]=0|s:n.length--,n.strip()}o.prototype.toString=function(t,r){var n;if(r=0|r||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,u=0;u<this.length;u++){var a=this.words[u],s=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||u!==this.length-1?c[6-s.length]+s+n:s+n,26<=(i+=2)&&(i-=26,u--)}for(0!==o&&(n=o.toString(16)+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&2<=t&&t<=36){var h=f[t],p=l[t];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var v=d.modn(p).toString(t);n=(d=d.idivn(p)).isZero()?v+n:c[h-v.length]+v+n}for(this.isZero()&&(n="0"+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}e(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2<this.length&&e(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,r){return e(void 0!==u),this.toArrayLike(u,t,r)},o.prototype.toArray=function(t,r){return this.toArrayLike(Array,t,r)},o.prototype.toArrayLike=function(t,r,n){var i=this.byteLength(),o=n||Math.max(1,i);e(i<=o,"byte array longer than desired length"),e(0<o,"Requested array length <= 0"),this.strip();var u,a,s="le"===r,c=new t(o),f=this.clone();if(s){for(a=0;!f.isZero();a++)u=f.andln(255),f.iushrn(8),c[a]=u;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!f.isZero();a++)u=f.andln(255),f.iushrn(8),c[o-a-1]=u}return c},o.prototype._countBits=Math.clz32?function(t){return 32-Math.clz32(t)}:function(t){var r=t,n=0;return 4096<=r&&(n+=13,r>>>=13),64<=r&&(n+=7,r>>>=7),8<=r&&(n+=4,r>>>=4),2<=r&&(n+=2,r>>>=2),n+r},o.prototype._zeroBits=function(t){if(0===t)return 26;var r=t,n=0;return 0==(8191&r)&&(n+=13,r>>>=13),0==(127&r)&&(n+=7,r>>>=7),0==(15&r)&&(n+=4,r>>>=4),0==(3&r)&&(n+=2,r>>>=2),0==(1&r)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],r=this._countBits(t);return 26*(this.length-1)+r},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,r=0;r<this.length;r++){var n=this._zeroBits(this.words[r]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]|t.words[r];return this.strip()},o.prototype.ior=function(t){return e(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var r;r=this.length>t.length?t:this;for(var n=0;n<r.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=r.length,this.strip()},o.prototype.iand=function(t){return e(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var r,n;n=this.length>t.length?(r=this,t):(r=t,this);for(var e=0;e<n.length;e++)this.words[e]=r.words[e]^n.words[e];if(this!==r)for(;e<r.length;e++)this.words[e]=r.words[e];return this.length=r.length,this.strip()},o.prototype.ixor=function(t){return e(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){e("number"==typeof t&&0<=t);var r=0|Math.ceil(t/26),n=t%26;this._expand(r),0<n&&r--;for(var i=0;i<r;i++)this.words[i]=67108863&~this.words[i];return 0<n&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,r){e("number"==typeof t&&0<=t);var n=t/26|0,i=t%26;return this._expand(1+n),this.words[n]=r?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var r,n,e;if(0!==this.negative&&0===t.negative)return this.negative=0,r=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,r=this.isub(t),t.negative=1,r._normSign();e=this.length>t.length?(n=this,t):(n=t,this);for(var i=0,o=0;o<e.length;o++)r=(0|n.words[o])+(0|e.words[o])+i,this.words[o]=67108863&r,i=r>>>26;for(;0!==i&&o<n.length;o++)r=(0|n.words[o])+i,this.words[o]=67108863&r,i=r>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var r;return 0!==t.negative&&0===this.negative?(t.negative=0,r=this.sub(t),t.negative^=1,r):0===t.negative&&0!==this.negative?(this.negative=0,r=t.sub(this),this.negative=1,r):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var r=this.iadd(t);return t.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,e,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;e=0<i?(n=this,t):(n=t,this);for(var o=0,u=0;u<e.length;u++)o=(r=(0|n.words[u])-(0|e.words[u])+o)>>26,this.words[u]=67108863&r;for(;0!==o&&u<n.length;u++)o=(r=(0|n.words[u])+o)>>26,this.words[u]=67108863&r;if(0===o&&u<n.length&&n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this.length=Math.max(this.length,u),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,r,n){var e,i,o,u=t.words,a=r.words,s=n.words,c=0,f=0|u[0],l=8191&f,h=f>>>13,p=0|u[1],d=8191&p,v=p>>>13,m=0|u[2],g=8191&m,y=m>>>13,b=0|u[3],w=8191&b,x=b>>>13,_=0|u[4],M=8191&_,A=_>>>13,O=0|u[5],E=8191&O,S=O>>>13,N=0|u[6],j=8191&N,I=N>>>13,k=0|u[7],T=8191&k,B=k>>>13,P=0|u[8],F=8191&P,C=P>>>13,R=0|u[9],D=8191&R,L=R>>>13,U=0|a[0],W=8191&U,z=U>>>13,q=0|a[1],H=8191&q,G=q>>>13,$=0|a[2],V=8191&$,Z=$>>>13,K=0|a[3],J=8191&K,X=K>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,rt=0|a[5],nt=8191&rt,et=rt>>>13,it=0|a[6],ot=8191&it,ut=it>>>13,at=0|a[7],st=8191&at,ct=at>>>13,ft=0|a[8],lt=8191&ft,ht=ft>>>13,pt=0|a[9],dt=8191&pt,vt=pt>>>13;n.negative=t.negative^r.negative,n.length=19;var mt=(c+(e=Math.imul(l,W))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,W)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,e=Math.imul(d,W),i=(i=Math.imul(d,z))+Math.imul(v,W)|0,o=Math.imul(v,z);var gt=(c+(e=e+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,e=Math.imul(g,W),i=(i=Math.imul(g,z))+Math.imul(y,W)|0,o=Math.imul(y,z),e=e+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,G)|0;var yt=(c+(e=e+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,e=Math.imul(w,W),i=(i=Math.imul(w,z))+Math.imul(x,W)|0,o=Math.imul(x,z),e=e+Math.imul(g,H)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,e=e+Math.imul(d,V)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,Z)|0;var bt=(c+(e=e+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,J)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,e=Math.imul(M,W),i=(i=Math.imul(M,z))+Math.imul(A,W)|0,o=Math.imul(A,z),e=e+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,G)|0,e=e+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,Z)|0,e=e+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0;var wt=(c+(e=e+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,e=Math.imul(E,W),i=(i=Math.imul(E,z))+Math.imul(S,W)|0,o=Math.imul(S,z),e=e+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,e=e+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,Z)|0,e=e+Math.imul(g,J)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,X)|0,e=e+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0;var xt=(c+(e=e+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,et)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,et)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,e=Math.imul(j,W),i=(i=Math.imul(j,z))+Math.imul(I,W)|0,o=Math.imul(I,z),e=e+Math.imul(E,H)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,G)|0,e=e+Math.imul(M,V)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,Z)|0,e=e+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,X)|0,e=e+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,e=e+Math.imul(d,nt)|0,i=(i=i+Math.imul(d,et)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,et)|0;var _t=(c+(e=e+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,ut)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,ut)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,e=Math.imul(T,W),i=(i=Math.imul(T,z))+Math.imul(B,W)|0,o=Math.imul(B,z),e=e+Math.imul(j,H)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,e=e+Math.imul(E,V)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Z)|0,e=e+Math.imul(M,J)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,e=e+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,e=e+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,et)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,et)|0,e=e+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,ut)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,ut)|0;var Mt=(c+(e=e+Math.imul(l,st)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,st)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,e=Math.imul(F,W),i=(i=Math.imul(F,z))+Math.imul(C,W)|0,o=Math.imul(C,z),e=e+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(B,H)|0,o=o+Math.imul(B,G)|0,e=e+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,e=e+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,X)|0,e=e+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,e=e+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,et)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,et)|0,e=e+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,ut)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,ut)|0,e=e+Math.imul(d,st)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(v,st)|0,o=o+Math.imul(v,ct)|0;var At=(c+(e=e+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,e=Math.imul(D,W),i=(i=Math.imul(D,z))+Math.imul(L,W)|0,o=Math.imul(L,z),e=e+Math.imul(F,H)|0,i=(i=i+Math.imul(F,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,e=e+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,e=e+Math.imul(j,J)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,e=e+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,e=e+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,et)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,et)|0,e=e+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,ut)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,ut)|0,e=e+Math.imul(g,st)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(y,st)|0,o=o+Math.imul(y,ct)|0,e=e+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var Ot=(c+(e=e+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,vt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((o=o+Math.imul(h,vt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,e=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(L,H)|0,o=Math.imul(L,G),e=e+Math.imul(F,V)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,Z)|0,e=e+Math.imul(T,J)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,X)|0,e=e+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,e=e+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,et)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,et)|0,e=e+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,ut)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,ut)|0,e=e+Math.imul(w,st)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(x,st)|0,o=o+Math.imul(x,ct)|0,e=e+Math.imul(g,lt)|0,i=(i=i+Math.imul(g,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var Et=(c+(e=e+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,vt)|0)+Math.imul(v,dt)|0))<<13)|0;c=((o=o+Math.imul(v,vt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,e=Math.imul(D,V),i=(i=Math.imul(D,Z))+Math.imul(L,V)|0,o=Math.imul(L,Z),e=e+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,X)|0,e=e+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,e=e+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,et)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,et)|0,e=e+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,ut)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,ut)|0,e=e+Math.imul(M,st)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(A,st)|0,o=o+Math.imul(A,ct)|0,e=e+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ht)|0;var St=(c+(e=e+Math.imul(g,dt)|0)|0)+((8191&(i=(i=i+Math.imul(g,vt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((o=o+Math.imul(y,vt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,e=Math.imul(D,J),i=(i=Math.imul(D,X))+Math.imul(L,J)|0,o=Math.imul(L,X),e=e+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,e=e+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,et)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,et)|0,e=e+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,ut)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,ut)|0,e=e+Math.imul(E,st)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(S,st)|0,o=o+Math.imul(S,ct)|0,e=e+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Nt=(c+(e=e+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,vt)|0)+Math.imul(x,dt)|0))<<13)|0;c=((o=o+Math.imul(x,vt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,e=Math.imul(D,Q),i=(i=Math.imul(D,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),e=e+Math.imul(F,nt)|0,i=(i=i+Math.imul(F,et)|0)+Math.imul(C,nt)|0,o=o+Math.imul(C,et)|0,e=e+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,ut)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,ut)|0,e=e+Math.imul(j,st)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(I,st)|0,o=o+Math.imul(I,ct)|0,e=e+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var jt=(c+(e=e+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,vt)|0)+Math.imul(A,dt)|0))<<13)|0;c=((o=o+Math.imul(A,vt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,e=Math.imul(D,nt),i=(i=Math.imul(D,et))+Math.imul(L,nt)|0,o=Math.imul(L,et),e=e+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,ut)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,ut)|0,e=e+Math.imul(T,st)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(B,st)|0,o=o+Math.imul(B,ct)|0,e=e+Math.imul(j,lt)|0,i=(i=i+Math.imul(j,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var It=(c+(e=e+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,vt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((o=o+Math.imul(S,vt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,e=Math.imul(D,ot),i=(i=Math.imul(D,ut))+Math.imul(L,ot)|0,o=Math.imul(L,ut),e=e+Math.imul(F,st)|0,i=(i=i+Math.imul(F,ct)|0)+Math.imul(C,st)|0,o=o+Math.imul(C,ct)|0,e=e+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ht)|0;var kt=(c+(e=e+Math.imul(j,dt)|0)|0)+((8191&(i=(i=i+Math.imul(j,vt)|0)+Math.imul(I,dt)|0))<<13)|0;c=((o=o+Math.imul(I,vt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,e=Math.imul(D,st),i=(i=Math.imul(D,ct))+Math.imul(L,st)|0,o=Math.imul(L,ct),e=e+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var Tt=(c+(e=e+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,vt)|0)+Math.imul(B,dt)|0))<<13)|0;c=((o=o+Math.imul(B,vt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,e=Math.imul(D,lt),i=(i=Math.imul(D,ht))+Math.imul(L,lt)|0,o=Math.imul(L,ht);var Bt=(c+(e=e+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,vt)|0)+Math.imul(C,dt)|0))<<13)|0;c=((o=o+Math.imul(C,vt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var Pt=(c+(e=Math.imul(D,dt))|0)+((8191&(i=(i=Math.imul(D,vt))+Math.imul(L,dt)|0))<<13)|0;return c=((o=Math.imul(L,vt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,s[0]=mt,s[1]=gt,s[2]=yt,s[3]=bt,s[4]=wt,s[5]=xt,s[6]=_t,s[7]=Mt,s[8]=At,s[9]=Ot,s[10]=Et,s[11]=St,s[12]=Nt,s[13]=jt,s[14]=It,s[15]=kt,s[16]=Tt,s[17]=Bt,s[18]=Pt,0!==c&&(s[19]=c,n.length++),n};function d(t,r,n){return(new v).mulp(t,r,n)}function v(t,r){this.x=t,this.y=r}Math.imul||(p=h),o.prototype.mulTo=function(t,r){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,r):n<63?h(this,t,r):n<1024?function(t,r,n){n.negative=r.negative^t.negative,n.length=t.length+r.length;for(var e=0,i=0,o=0;o<n.length-1;o++){var u=i;i=0;for(var a=67108863&e,s=Math.min(o,r.length-1),c=Math.max(0,o-t.length+1);c<=s;c++){var f=o-c,l=(0|t.words[f])*(0|r.words[c]),h=67108863&l;a=67108863&(h=h+a|0),i+=(u=(u=u+(l/67108864|0)|0)+(h>>>26)|0)>>>26,u&=67108863}n.words[o]=a,e=u,u=i}return 0!==e?n.words[o]=e:n.length--,n.strip()}(this,t,r):d(this,t,r)},v.prototype.makeRBT=function(t){for(var r=new Array(t),n=o.prototype._countBits(t)-1,e=0;e<t;e++)r[e]=this.revBin(e,n,t);return r},v.prototype.revBin=function(t,r,n){if(0===t||t===n-1)return t;for(var e=0,i=0;i<r;i++)e|=(1&t)<<r-i-1,t>>=1;return e},v.prototype.permute=function(t,r,n,e,i,o){for(var u=0;u<o;u++)e[u]=r[t[u]],i[u]=n[t[u]]},v.prototype.transform=function(t,r,n,e,i,o){this.permute(o,t,r,n,e,i);for(var u=1;u<i;u<<=1)for(var a=u<<1,s=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var l=s,h=c,p=0;p<u;p++){var d=n[f+p],v=e[f+p],m=n[f+p+u],g=e[f+p+u],y=l*m-h*g;g=l*g+h*m,m=y,n[f+p]=d+m,e[f+p]=v+g,n[f+p+u]=d-m,e[f+p+u]=v-g,p!==a&&(y=s*l-c*h,h=s*h+c*l,l=y)}},v.prototype.guessLen13b=function(t,r){var n=1|Math.max(r,t),e=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+e},v.prototype.conjugate=function(t,r,n){if(!(n<=1))for(var e=0;e<n/2;e++){var i=t[e];t[e]=t[n-e-1],t[n-e-1]=i,i=r[e],r[e]=-r[n-e-1],r[n-e-1]=-i}},v.prototype.normalize13b=function(t,r){for(var n=0,e=0;e<r/2;e++){var i=8192*Math.round(t[2*e+1]/r)+Math.round(t[2*e]/r)+n;t[e]=67108863&i,n=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,r,n,i){for(var o=0,u=0;u<r;u++)o+=0|t[u],n[2*u]=8191&o,o>>>=13,n[2*u+1]=8191&o,o>>>=13;for(u=2*r;u<i;++u)n[u]=0;e(0===o),e(0==(-8192&o))},v.prototype.stub=function(t){for(var r=new Array(t),n=0;n<t;n++)r[n]=0;return r},v.prototype.mulp=function(t,r,n){var e=2*this.guessLen13b(t.length,r.length),i=this.makeRBT(e),o=this.stub(e),u=new Array(e),a=new Array(e),s=new Array(e),c=new Array(e),f=new Array(e),l=new Array(e),h=n.words;h.length=e,this.convert13b(t.words,t.length,u,e),this.convert13b(r.words,r.length,c,e),this.transform(u,o,a,s,e,i),this.transform(c,o,f,l,e,i);for(var p=0;p<e;p++){var d=a[p]*f[p]-s[p]*l[p];s[p]=a[p]*l[p]+s[p]*f[p],a[p]=d}return this.conjugate(a,s,e),this.transform(a,s,h,o,e,i),this.conjugate(h,o,e),this.normalize13b(h,e),n.negative=t.negative^r.negative,n.length=t.length+r.length,n.strip()},o.prototype.mul=function(t){var r=new o(null);return r.words=new Array(this.length+t.length),this.mulTo(t,r)},o.prototype.mulf=function(t){var r=new o(null);return r.words=new Array(this.length+t.length),d(this,t,r)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){e("number"==typeof t),e(t<67108864);for(var r=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&r);r>>=26,r+=i/67108864|0,r+=o>>>26,this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var r=function(t){for(var r=new Array(t.bitLength()),n=0;n<r.length;n++){var e=n/26|0,i=n%26;r[n]=(t.words[e]&1<<i)>>>i}return r}(t);if(0===r.length)return new o(1);for(var n=this,e=0;e<r.length&&0===r[e];e++,n=n.sqr());if(++e<r.length)for(var i=n.sqr();e<r.length;e++,i=i.sqr())0!==r[e]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){e("number"==typeof t&&0<=t);var r,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!=n){var u=0;for(r=0;r<this.length;r++){var a=this.words[r]&o,s=(0|this.words[r])-a<<n;this.words[r]=s|u,u=a>>>26-n}u&&(this.words[r]=u,this.length++)}if(0!=i){for(r=this.length-1;0<=r;r--)this.words[r+i]=this.words[r];for(r=0;r<i;r++)this.words[r]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return e(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,r,n){var i;e("number"==typeof t&&0<=t),i=r?(r-r%26)/26:0;var o=t%26,u=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,s=n;if(i-=u,i=Math.max(0,i),s){for(var c=0;c<u;c++)s.words[c]=this.words[c];s.length=u}if(0===u);else if(this.length>u)for(this.length-=u,c=0;c<this.length;c++)this.words[c]=this.words[c+u];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;0<=c&&(0!==f||i<=c);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&a}return s&&0!==f&&(s.words[s.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,r,n){return e(0===this.negative),this.iushrn(t,r,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){e("number"==typeof t&&0<=t);var r=t%26,n=(t-r)/26,i=1<<r;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){e("number"==typeof t&&0<=t);var r=t%26,n=(t-r)/26;if(e(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!=r&&n++,this.length=Math.min(n,this.length),0!=r){var i=67108863^67108863>>>r<<r;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return e("number"==typeof t),e(t<67108864),t<0?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var r=0;r<this.length&&67108864<=this.words[r];r++)this.words[r]-=67108864,r===this.length-1?this.words[r+1]=1:this.words[r+1]++;return this.length=Math.max(this.length,r+1),this},o.prototype.isubn=function(t){if(e("number"==typeof t),e(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var r=0;r<this.length&&this.words[r]<0;r++)this.words[r]+=67108864,this.words[r+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,r,n){var i,o,u=t.length+n;this._expand(u);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var s=(0|t.words[i])*r;a=((o-=67108863&s)>>26)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(e(-1===a),i=a=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,r){var n=(this.length,t.length),e=this.clone(),i=t,u=0|i.words[i.length-1];0!=(n=26-this._countBits(u))&&(i=i.ushln(n),e.iushln(n),u=0|i.words[i.length-1]);var a,s=e.length-i.length;if("mod"!==r){(a=new o(null)).length=1+s,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=e.clone()._ishlnsubmul(i,1,s);0===f.negative&&(e=f,a&&(a.words[s]=1));for(var l=s-1;0<=l;l--){var h=67108864*(0|e.words[i.length+l])+(0|e.words[i.length+l-1]);for(h=Math.min(h/u|0,67108863),e._ishlnsubmul(i,h,l);0!==e.negative;)h--,e.negative=0,e._ishlnsubmul(i,1,l),e.isZero()||(e.negative^=1);a&&(a.words[l]=h)}return a&&a.strip(),e.strip(),"div"!==r&&0!=n&&e.iushrn(n),{div:a||null,mod:e}},o.prototype.divmod=function(t,r,n){return e(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,r),"mod"!==r&&(i=a.div.neg()),"div"!==r&&(u=a.mod.neg(),n&&0!==u.negative&&u.iadd(t)),{div:i,mod:u}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),r),"mod"!==r&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),r),"div"!==r&&(u=a.mod.neg(),n&&0!==u.negative&&u.isub(t)),{div:a.div,mod:u}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===r?{div:this.divn(t.words[0]),mod:null}:"mod"===r?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,r);var i,u,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var r=this.divmod(t);if(r.mod.isZero())return r.div;var n=0!==r.div.negative?r.mod.isub(t):r.mod,e=t.ushrn(1),i=t.andln(1),o=n.cmp(e);return o<0||1===i&&0===o?r.div:0!==r.div.negative?r.div.isubn(1):r.div.iaddn(1)},o.prototype.modn=function(t){e(t<=67108863);for(var r=(1<<26)%t,n=0,i=this.length-1;0<=i;i--)n=(r*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){e(t<=67108863);for(var r=0,n=this.length-1;0<=n;n--){var i=(0|this.words[n])+67108864*r;this.words[n]=i/t|0,r=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){e(0===t.negative),e(!t.isZero());var r=this,n=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var i=new o(1),u=new o(0),a=new o(0),s=new o(1),c=0;r.isEven()&&n.isEven();)r.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=r.clone();!r.isZero();){for(var h=0,p=1;0==(r.words[0]&p)&&h<26;++h,p<<=1);if(0<h)for(r.iushrn(h);0<h--;)(i.isOdd()||u.isOdd())&&(i.iadd(f),u.isub(l)),i.iushrn(1),u.iushrn(1);for(var d=0,v=1;0==(n.words[0]&v)&&d<26;++d,v<<=1);if(0<d)for(n.iushrn(d);0<d--;)(a.isOdd()||s.isOdd())&&(a.iadd(f),s.isub(l)),a.iushrn(1),s.iushrn(1);0<=r.cmp(n)?(r.isub(n),i.isub(a),u.isub(s)):(n.isub(r),a.isub(i),s.isub(u))}return{a:a,b:s,gcd:n.iushln(c)}},o.prototype._invmp=function(t){e(0===t.negative),e(!t.isZero());var r=this,n=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var i,u=new o(1),a=new o(0),s=n.clone();0<r.cmpn(1)&&0<n.cmpn(1);){for(var c=0,f=1;0==(r.words[0]&f)&&c<26;++c,f<<=1);if(0<c)for(r.iushrn(c);0<c--;)u.isOdd()&&u.iadd(s),u.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(0<l)for(n.iushrn(l);0<l--;)a.isOdd()&&a.iadd(s),a.iushrn(1);0<=r.cmp(n)?(r.isub(n),u.isub(a)):(n.isub(r),a.isub(u))}return(i=0===r.cmpn(1)?u:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var r=this.clone(),n=t.clone();r.negative=0;for(var e=n.negative=0;r.isEven()&&n.isEven();e++)r.iushrn(1),n.iushrn(1);for(;;){for(;r.isEven();)r.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=r.cmp(n);if(i<0){var o=r;r=n,n=o}else if(0===i||0===n.cmpn(1))break;r.isub(n)}return n.iushln(e)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){e("number"==typeof t);var r=t%26,n=(t-r)/26,i=1<<r;if(this.length<=n)return this._expand(1+n),this.words[n]|=i,this;for(var o=i,u=n;0!==o&&u<this.length;u++){var a=0|this.words[u];o=(a+=o)>>>26,a&=67108863,this.words[u]=a}return 0!==o&&(this.words[u]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var r,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),1<this.length)r=1;else{n&&(t=-t),e(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:i<t?-1:1}return 0!==this.negative?0|-r:r},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var r=this.ucmp(t);return 0!==this.negative?0|-r:r},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var r=0,n=this.length-1;0<=n;n--){var e=0|this.words[n],i=0|t.words[n];if(e!=i){e<i?r=-1:i<e&&(r=1);break}}return r},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return 0<=this.cmpn(t)},o.prototype.gte=function(t){return 0<=this.cmp(t)},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new _(t)},o.prototype.toRed=function(t){return e(!this.red,"Already a number in reduction context"),e(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return e(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return e(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return e(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){retu