(window.webpackJsonp=window.webpackJsonp||[]).push([["npm.asn1.js"],{"0211":function(t,e,r){var i=e;i._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var i=t[r];e[i]=r})),e},i.der=r("8b71")},"20f6":function(t,e,r){var i=e;i.der=r("cfbd"),i.pem=r("8df7")},"343e":function(t,e,r){var i=e;i.der=r("3768"),i.pem=r("85b3")},3768:function(t,e,r){var i=r("3fb5"),n=r("b639").Buffer,o=r("7f7a"),s=o.base,h=o.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new a,this.tree._init(t.body)}function a(t){s.Node.call(this,"der",t)}function l(t){return t<10?"0"+t:t}function f(t,e,r,i){var n;if("seqof"===t?t="seq":"setof"===t&&(t="set"),h.tagByName.hasOwnProperty(t))n=h.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);n=t}return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=h.tagClassByName[r||"universal"]<<6)}t.exports=u,u.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},i(a,s.Node),a.prototype._encodeComposite=function(t,e,r,i){var o=f(t,e,r,this.reporter);if(i.length<128){var s=new n(2);return s[0]=o,s[1]=i.length,this._createEncoderBuffer([s,i])}for(var h=1,u=i.length;u>=256;u>>=8)h++;(s=new n(2+h))[0]=o,s[1]=128|h,u=1+h;for(var a=i.length;a>0;u--,a>>=8)s[u]=255&a;return this._createEncoderBuffer([s,i])},a.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new n(2*t.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(i=0;i=128;s>>=7)o++}var h=new n(o),u=h.length-1;for(i=t.length-1;i>=0;i--)for(s=t[i],h[u--]=127&s;(s>>=7)>0;)h[u--]=128|127&s;return this._createEncoderBuffer(h)},a.prototype._encodeTime=function(t,e){var r,i=new Date(t);return"gentime"===e?r=[l(i.getFullYear()),l(i.getUTCMonth()+1),l(i.getUTCDate()),l(i.getUTCHours()),l(i.getUTCMinutes()),l(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[l(i.getFullYear()%100),l(i.getUTCMonth()+1),l(i.getUTCDate()),l(i.getUTCHours()),l(i.getUTCMinutes()),l(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!n.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new n(r)}if(n.isBuffer(t)){var i=t.length;0===t.length&&i++;var o=new n(i);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var s=t;s>=256;s>>=8)i++;for(s=(o=new Array(i)).length-1;s>=0;s--)o[s]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new n(o))},a.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},a.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},a.prototype._skipDefault=function(t,e,r){var i,n=this._baseState;if(null===n.default)return!1;var o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?h-49+10:h>=17?h-17+10:h}return n}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,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){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):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("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 n=0;n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=h(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=h(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,h=Math.min(o,o-s)+r,a=0,l=r;l1&&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?""};var a=["","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 c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,u=s/67108864|0;r.words[0]=h;for(var a=1;a>>26,f=67108863&u,c=Math.min(a,e.length-1),d=Math.max(0,a-t.length+1);d<=c;d++){var p=a-d|0;l+=(s=(n=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[a]=0|f,u=0|l}return 0!==u?r.words[a]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?a[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=l[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:a[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!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]:this.length>2&&i(!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,e){return i(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,u="le"===e,a=new t(o),l=this.clone();if(u){for(h=0;!l.isZero();h++)s=l.andln(255),l.iushrn(8),a[h]=s;for(;h=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.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 e;e=this.length>t.length?t:this;for(var r=0;rt.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 e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.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){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,y=g>>>13,M=0|s[3],w=8191&M,b=M>>>13,_=0|s[4],S=8191&_,k=_>>>13,E=0|s[5],B=8191&E,j=E>>>13,A=0|s[6],x=8191&A,N=A>>>13,D=0|s[7],T=8191&D,O=D>>>13,U=0|s[8],q=8191&U,C=U>>>13,I=0|s[9],R=8191&I,Z=I>>>13,L=0|h[0],P=8191&L,K=L>>>13,z=0|h[1],F=8191&z,J=z>>>13,$=0|h[2],G=8191&$,H=$>>>13,V=0|h[3],Y=8191&V,Q=V>>>13,W=0|h[4],X=8191&W,tt=W>>>13,et=0|h[5],rt=8191&et,it=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,lt=0|h[8],ft=8191<,ct=lt>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(a+(i=Math.imul(f,P))|0)+((8191&(n=(n=Math.imul(f,K))+Math.imul(c,P)|0))<<13)|0;a=((o=Math.imul(c,K))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,P),n=(n=Math.imul(p,K))+Math.imul(m,P)|0,o=Math.imul(m,K);var vt=(a+(i=i+Math.imul(f,F)|0)|0)+((8191&(n=(n=n+Math.imul(f,J)|0)+Math.imul(c,F)|0))<<13)|0;a=((o=o+Math.imul(c,J)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(v,P),n=(n=Math.imul(v,K))+Math.imul(y,P)|0,o=Math.imul(y,K),i=i+Math.imul(p,F)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(a+(i=i+Math.imul(f,G)|0)|0)+((8191&(n=(n=n+Math.imul(f,H)|0)+Math.imul(c,G)|0))<<13)|0;a=((o=o+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(w,P),n=(n=Math.imul(w,K))+Math.imul(b,P)|0,o=Math.imul(b,K),i=i+Math.imul(v,F)|0,n=(n=n+Math.imul(v,J)|0)+Math.imul(y,F)|0,o=o+Math.imul(y,J)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,H)|0;var Mt=(a+(i=i+Math.imul(f,Y)|0)|0)+((8191&(n=(n=n+Math.imul(f,Q)|0)+Math.imul(c,Y)|0))<<13)|0;a=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(S,P),n=(n=Math.imul(S,K))+Math.imul(k,P)|0,o=Math.imul(k,K),i=i+Math.imul(w,F)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,i=i+Math.imul(v,G)|0,n=(n=n+Math.imul(v,H)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,H)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var wt=(a+(i=i+Math.imul(f,X)|0)|0)+((8191&(n=(n=n+Math.imul(f,tt)|0)+Math.imul(c,X)|0))<<13)|0;a=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(B,P),n=(n=Math.imul(B,K))+Math.imul(j,P)|0,o=Math.imul(j,K),i=i+Math.imul(S,F)|0,n=(n=n+Math.imul(S,J)|0)+Math.imul(k,F)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,H)|0,i=i+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Q)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,tt)|0;var bt=(a+(i=i+Math.imul(f,rt)|0)|0)+((8191&(n=(n=n+Math.imul(f,it)|0)+Math.imul(c,rt)|0))<<13)|0;a=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(x,P),n=(n=Math.imul(x,K))+Math.imul(N,P)|0,o=Math.imul(N,K),i=i+Math.imul(B,F)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(j,F)|0,o=o+Math.imul(j,J)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(v,X)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var _t=(a+(i=i+Math.imul(f,ot)|0)|0)+((8191&(n=(n=n+Math.imul(f,st)|0)+Math.imul(c,ot)|0))<<13)|0;a=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(T,P),n=(n=Math.imul(T,K))+Math.imul(O,P)|0,o=Math.imul(O,K),i=i+Math.imul(x,F)|0,n=(n=n+Math.imul(x,J)|0)+Math.imul(N,F)|0,o=o+Math.imul(N,J)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,H)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(v,rt)|0,n=(n=n+Math.imul(v,it)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(a+(i=i+Math.imul(f,ut)|0)|0)+((8191&(n=(n=n+Math.imul(f,at)|0)+Math.imul(c,ut)|0))<<13)|0;a=((o=o+Math.imul(c,at)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(q,P),n=(n=Math.imul(q,K))+Math.imul(C,P)|0,o=Math.imul(C,K),i=i+Math.imul(T,F)|0,n=(n=n+Math.imul(T,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,H)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,H)|0,i=i+Math.imul(B,Y)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,Q)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,at)|0;var kt=(a+(i=i+Math.imul(f,ft)|0)|0)+((8191&(n=(n=n+Math.imul(f,ct)|0)+Math.imul(c,ft)|0))<<13)|0;a=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(R,P),n=(n=Math.imul(R,K))+Math.imul(Z,P)|0,o=Math.imul(Z,K),i=i+Math.imul(q,F)|0,n=(n=n+Math.imul(q,J)|0)+Math.imul(C,F)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(T,G)|0,n=(n=n+Math.imul(T,H)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,H)|0,i=i+Math.imul(x,Y)|0,n=(n=n+Math.imul(x,Q)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Q)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(v,ut)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,at)|0,i=i+Math.imul(p,ft)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ct)|0;var Et=(a+(i=i+Math.imul(f,pt)|0)|0)+((8191&(n=(n=n+Math.imul(f,mt)|0)+Math.imul(c,pt)|0))<<13)|0;a=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(R,F),n=(n=Math.imul(R,J))+Math.imul(Z,F)|0,o=Math.imul(Z,J),i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,H)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,i=i+Math.imul(v,ft)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(y,ft)|0,o=o+Math.imul(y,ct)|0;var Bt=(a+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;a=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(R,G),n=(n=Math.imul(R,H))+Math.imul(Z,G)|0,o=Math.imul(Z,H),i=i+Math.imul(q,Y)|0,n=(n=n+Math.imul(q,Q)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Q)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,tt)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(x,rt)|0,n=(n=n+Math.imul(x,it)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,i=i+Math.imul(S,ut)|0,n=(n=n+Math.imul(S,at)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(w,ft)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ct)|0;var jt=(a+(i=i+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;a=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(R,Y),n=(n=Math.imul(R,Q))+Math.imul(Z,Y)|0,o=Math.imul(Z,Q),i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,tt)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(T,rt)|0,n=(n=n+Math.imul(T,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(S,ft)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,ct)|0;var At=(a+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(b,pt)|0))<<13)|0;a=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(R,X),n=(n=Math.imul(R,tt))+Math.imul(Z,X)|0,o=Math.imul(Z,tt),i=i+Math.imul(q,rt)|0,n=(n=n+Math.imul(q,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(T,ot)|0,n=(n=n+Math.imul(T,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(x,ut)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,at)|0,i=i+Math.imul(B,ft)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ct)|0;var xt=(a+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(k,pt)|0))<<13)|0;a=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(R,rt),n=(n=Math.imul(R,it))+Math.imul(Z,rt)|0,o=Math.imul(Z,it),i=i+Math.imul(q,ot)|0,n=(n=n+Math.imul(q,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,i=i+Math.imul(T,ut)|0,n=(n=n+Math.imul(T,at)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,at)|0,i=i+Math.imul(x,ft)|0,n=(n=n+Math.imul(x,ct)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,ct)|0;var Nt=(a+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(j,pt)|0))<<13)|0;a=((o=o+Math.imul(j,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(R,ot),n=(n=Math.imul(R,st))+Math.imul(Z,ot)|0,o=Math.imul(Z,st),i=i+Math.imul(q,ut)|0,n=(n=n+Math.imul(q,at)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(T,ft)|0,n=(n=n+Math.imul(T,ct)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ct)|0;var Dt=(a+(i=i+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(N,pt)|0))<<13)|0;a=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,i=Math.imul(R,ut),n=(n=Math.imul(R,at))+Math.imul(Z,ut)|0,o=Math.imul(Z,at),i=i+Math.imul(q,ft)|0,n=(n=n+Math.imul(q,ct)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ct)|0;var Tt=(a+(i=i+Math.imul(T,pt)|0)|0)+((8191&(n=(n=n+Math.imul(T,mt)|0)+Math.imul(O,pt)|0))<<13)|0;a=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(R,ft),n=(n=Math.imul(R,ct))+Math.imul(Z,ft)|0,o=Math.imul(Z,ct);var Ot=(a+(i=i+Math.imul(q,pt)|0)|0)+((8191&(n=(n=n+Math.imul(q,mt)|0)+Math.imul(C,pt)|0))<<13)|0;a=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Ut=(a+(i=Math.imul(R,pt))|0)+((8191&(n=(n=Math.imul(R,mt))+Math.imul(Z,pt)|0))<<13)|0;return a=((o=Math.imul(Z,mt))+(n>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=Mt,u[4]=wt,u[5]=bt,u[6]=_t,u[7]=St,u[8]=kt,u[9]=Et,u[10]=Bt,u[11]=jt,u[12]=At,u[13]=xt,u[14]=Nt,u[15]=Dt,u[16]=Tt,u[17]=Ot,u[18]=Ut,0!==a&&(u[19]=a,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?c(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=h,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,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 e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<s)for(this.length-=s,a=0;a=0&&(0!==l||a>=n);a--){var f=0|this.words[a];this.words[a]=l<<26-o|f>>>o,l=f&h}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},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){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(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 e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!==(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var h,u=i.length-n.length;if("mod"!==e){(h=new o(null)).length=u+1,h.words=new Array(h.length);for(var a=0;a=0;f--){var c=67108864*(0|i.words[n.length+f])+(0|i.words[n.length+f-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,f);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,f),i.isZero()||(i.negative^=1);h&&(h.words[f]=c)}return h&&h.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:h||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(n=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(n=h.div.neg()),{div:n,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{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,e);var n,s,h},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 e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),s=new o(0),h=new o(0),u=new o(1),a=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++a;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(l),s.isub(f)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(l),u.isub(f)),h.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(h),s.isub(u)):(r.isub(e),h.isub(n),u.isub(s))}return{a:h,b:u,gcd:r.iushln(a)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new o(1),h=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var a=0,l=1;0==(e.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(e.iushrn(a);a-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,c=1;0==(r.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(r.iushrn(f);f-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(n=0===e.cmpn(1)?s:h).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},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){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},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 this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},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 i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(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 i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(y,v),y.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new M;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new b}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var h=new o(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g=0;i--){for(var a=e.words[i],l=u-1;l>=0;l--){var f=a>>l&1;n!==r[0]&&(n=this.sqr(n)),0!==f||0!==s?(s<<=1,s|=f,(4===++h||0===i&&0===l)&&(n=this.mul(n,r[s]),h=0,s=0)):h=0}u=26}return n},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},n(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r("62e4")(t))},cfbd:function(t,e,r){var i=r("3fb5"),n=r("7f7a"),o=n.base,s=n.bignum,h=n.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new a,this.tree._init(t.body)}function a(t){o.Node.call(this,"der",t)}function l(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=h.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:h.tag[r]}}function f(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(var o=0;o