lesca-node-bunnycdn 0.0.10 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +13 -18
- package/lib/index.d.ts +2 -4
- package/lib/index.js +10777 -13016
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function getDefaultExportFromCjs$1(b){return b&&b.__esModule&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b}var browser$d={exports:{}},process=browser$d.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(b){if(cachedSetTimeout===setTimeout)return setTimeout(b,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(b,0);try{return cachedSetTimeout(b,0)}catch{try{return cachedSetTimeout.call(null,b,0)}catch{return cachedSetTimeout.call(this,b,0)}}}function runClearTimeout(b){if(cachedClearTimeout===clearTimeout)return clearTimeout(b);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(b);try{return cachedClearTimeout(b)}catch{try{return cachedClearTimeout.call(null,b)}catch{return cachedClearTimeout.call(this,b)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var b=runTimeout(cleanUpNextTick);draining=!0;for(var _=queue.length;_;){for(currentQueue=queue,queue=[];++queueIndex<_;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,_=queue.length}currentQueue=null,draining=!1,runClearTimeout(b)}}process.nextTick=function(b){var _=new Array(arguments.length-1);if(arguments.length>1)for(var S=1;S<arguments.length;S++)_[S-1]=arguments[S];queue.push(new Item(b,_)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(b,_){this.fun=b,this.array=_}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(b){return[]};process.binding=function(b){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(b){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports=browser$d.exports;const process$1=getDefaultExportFromCjs$1(browserExports);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(b){return b&&b.__esModule&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b}function getAugmentedNamespace(b){if(Object.prototype.hasOwnProperty.call(b,"__esModule"))return b;var _=b.default;if(typeof _=="function"){var S=function p(){var E=!1;try{E=this instanceof p}catch{}return E?Reflect.construct(_,arguments,this.constructor):_.apply(this,arguments)};S.prototype=_.prototype}else S={};return Object.defineProperty(S,"__esModule",{value:!0}),Object.keys(b).forEach(function(p){var E=Object.getOwnPropertyDescriptor(b,p);Object.defineProperty(S,p,E.get?E:{enumerable:!0,get:function(){return b[p]}})}),S}var cryptoBrowserify={},browser$c={exports:{}},safeBuffer$2={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(b){Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var _={},S={};S.byteLength=d,S.toByteArray=x,S.fromByteArray=B;for(var p=[],E=[],a=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,y=w.length;v<y;++v)p[v]=w[v],E[w.charCodeAt(v)]=v;E[45]=62,E[95]=63;function m(I){var L=I.length;if(L%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var D=I.indexOf("=");D===-1&&(D=L);var G=D===L?0:4-D%4;return[D,G]}function d(I){var L=m(I),D=L[0],G=L[1];return(D+G)*3/4-G}function g(I,L,D){return(L+D)*3/4-D}function x(I){var L,D=m(I),G=D[0],X=D[1],te=new a(g(I,G,X)),ie=0,ee=X>0?G-4:G,ue;for(ue=0;ue<ee;ue+=4)L=E[I.charCodeAt(ue)]<<18|E[I.charCodeAt(ue+1)]<<12|E[I.charCodeAt(ue+2)]<<6|E[I.charCodeAt(ue+3)],te[ie++]=L>>16&255,te[ie++]=L>>8&255,te[ie++]=L&255;return X===2&&(L=E[I.charCodeAt(ue)]<<2|E[I.charCodeAt(ue+1)]>>4,te[ie++]=L&255),X===1&&(L=E[I.charCodeAt(ue)]<<10|E[I.charCodeAt(ue+1)]<<4|E[I.charCodeAt(ue+2)]>>2,te[ie++]=L>>8&255,te[ie++]=L&255),te}function R(I){return p[I>>18&63]+p[I>>12&63]+p[I>>6&63]+p[I&63]}function q(I,L,D){for(var G,X=[],te=L;te<D;te+=3)G=(I[te]<<16&16711680)+(I[te+1]<<8&65280)+(I[te+2]&255),X.push(R(G));return X.join("")}function B(I){for(var L,D=I.length,G=D%3,X=[],te=16383,ie=0,ee=D-G;ie<ee;ie+=te)X.push(q(I,ie,ie+te>ee?ee:ie+te));return G===1?(L=I[D-1],X.push(p[L>>2]+p[L<<4&63]+"==")):G===2&&(L=(I[D-2]<<8)+I[D-1],X.push(p[L>>10]+p[L>>4&63]+p[L<<2&63]+"=")),X.join("")}var $={};$.read=function(I,L,D,G,X){var te,ie,ee=X*8-G-1,ue=(1<<ee)-1,c=ue>>1,e=-7,t=D?X-1:0,n=D?-1:1,f=I[L+t];for(t+=n,te=f&(1<<-e)-1,f>>=-e,e+=ee;e>0;te=te*256+I[L+t],t+=n,e-=8);for(ie=te&(1<<-e)-1,te>>=-e,e+=G;e>0;ie=ie*256+I[L+t],t+=n,e-=8);if(te===0)te=1-c;else{if(te===ue)return ie?NaN:(f?-1:1)*(1/0);ie=ie+Math.pow(2,G),te=te-c}return(f?-1:1)*ie*Math.pow(2,te-G)},$.write=function(I,L,D,G,X,te){var ie,ee,ue,c=te*8-X-1,e=(1<<c)-1,t=e>>1,n=X===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=G?0:te-1,s=G?1:-1,u=L<0||L===0&&1/L<0?1:0;for(L=Math.abs(L),isNaN(L)||L===1/0?(ee=isNaN(L)?1:0,ie=e):(ie=Math.floor(Math.log(L)/Math.LN2),L*(ue=Math.pow(2,-ie))<1&&(ie--,ue*=2),ie+t>=1?L+=n/ue:L+=n*Math.pow(2,1-t),L*ue>=2&&(ie++,ue/=2),ie+t>=e?(ee=0,ie=e):ie+t>=1?(ee=(L*ue-1)*Math.pow(2,X),ie=ie+t):(ee=L*Math.pow(2,t-1)*Math.pow(2,X),ie=0));X>=8;I[D+f]=ee&255,f+=s,ee/=256,X-=8);for(ie=ie<<X|ee,c+=X;c>0;I[D+f]=ie&255,f+=s,ie/=256,c-=8);I[D+f-s]|=u*128};(function(I){const L=S,D=$,G=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;I.Buffer=e,I.SlowBuffer=T,I.INSPECT_MAX_BYTES=50;const X=2147483647;I.kMaxLength=X;const{Uint8Array:te,ArrayBuffer:ie,SharedArrayBuffer:ee}=globalThis;e.TYPED_ARRAY_SUPPORT=ue(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ue(){try{const H=new te(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,te.prototype),Object.setPrototypeOf(H,P),H.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function c(H){if(H>X)throw new RangeError('The value "'+H+'" is invalid for option "size"');const P=new te(H);return Object.setPrototypeOf(P,e.prototype),P}function e(H,P,U){if(typeof H=="number"){if(typeof P=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(H)}return t(H,P,U)}e.poolSize=8192;function t(H,P,U){if(typeof H=="string")return u(H,P);if(ie.isView(H))return o(H);if(H==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(Te(H,ie)||H&&Te(H.buffer,ie)||typeof ee<"u"&&(Te(H,ee)||H&&Te(H.buffer,ee)))return r(H,P,U);if(typeof H=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const J=H.valueOf&&H.valueOf();if(J!=null&&J!==H)return e.from(J,P,U);const fe=h(H);if(fe)return fe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof H[Symbol.toPrimitive]=="function")return e.from(H[Symbol.toPrimitive]("string"),P,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}e.from=function(H,P,U){return t(H,P,U)},Object.setPrototypeOf(e.prototype,te.prototype),Object.setPrototypeOf(e,te);function n(H){if(typeof H!="number")throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function f(H,P,U){return n(H),H<=0?c(H):P!==void 0?typeof U=="string"?c(H).fill(P,U):c(H).fill(P):c(H)}e.alloc=function(H,P,U){return f(H,P,U)};function s(H){return n(H),c(H<0?0:M(H)|0)}e.allocUnsafe=function(H){return s(H)},e.allocUnsafeSlow=function(H){return s(H)};function u(H,P){if((typeof P!="string"||P==="")&&(P="utf8"),!e.isEncoding(P))throw new TypeError("Unknown encoding: "+P);const U=N(H,P)|0;let J=c(U);const fe=J.write(H,P);return fe!==U&&(J=J.slice(0,fe)),J}function l(H){const P=H.length<0?0:M(H.length)|0,U=c(P);for(let J=0;J<P;J+=1)U[J]=H[J]&255;return U}function o(H){if(Te(H,te)){const P=new te(H);return r(P.buffer,P.byteOffset,P.byteLength)}return l(H)}function r(H,P,U){if(P<0||H.byteLength<P)throw new RangeError('"offset" is outside of buffer bounds');if(H.byteLength<P+(U||0))throw new RangeError('"length" is outside of buffer bounds');let J;return P===void 0&&U===void 0?J=new te(H):U===void 0?J=new te(H,P):J=new te(H,P,U),Object.setPrototypeOf(J,e.prototype),J}function h(H){if(e.isBuffer(H)){const P=M(H.length)|0,U=c(P);return U.length===0||H.copy(U,0,0,P),U}if(H.length!==void 0)return typeof H.length!="number"||je(H.length)?c(0):l(H);if(H.type==="Buffer"&&Array.isArray(H.data))return l(H.data)}function M(H){if(H>=X)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+X.toString(16)+" bytes");return H|0}function T(H){return+H!=H&&(H=0),e.alloc(+H)}e.isBuffer=function(P){return P!=null&&P._isBuffer===!0&&P!==e.prototype},e.compare=function(P,U){if(Te(P,te)&&(P=e.from(P,P.offset,P.byteLength)),Te(U,te)&&(U=e.from(U,U.offset,U.byteLength)),!e.isBuffer(P)||!e.isBuffer(U))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(P===U)return 0;let J=P.length,fe=U.length;for(let be=0,se=Math.min(J,fe);be<se;++be)if(P[be]!==U[be]){J=P[be],fe=U[be];break}return J<fe?-1:fe<J?1:0},e.isEncoding=function(P){switch(String(P).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(P,U){if(!Array.isArray(P))throw new TypeError('"list" argument must be an Array of Buffers');if(P.length===0)return e.alloc(0);let J;if(U===void 0)for(U=0,J=0;J<P.length;++J)U+=P[J].length;const fe=e.allocUnsafe(U);let be=0;for(J=0;J<P.length;++J){let se=P[J];if(Te(se,te))be+se.length>fe.length?(e.isBuffer(se)||(se=e.from(se)),se.copy(fe,be)):te.prototype.set.call(fe,se,be);else if(e.isBuffer(se))se.copy(fe,be);else throw new TypeError('"list" argument must be an Array of Buffers');be+=se.length}return fe};function N(H,P){if(e.isBuffer(H))return H.length;if(ie.isView(H)||Te(H,ie))return H.byteLength;if(typeof H!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);const U=H.length,J=arguments.length>2&&arguments[2]===!0;if(!J&&U===0)return 0;let fe=!1;for(;;)switch(P){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return Oe(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U*2;case"hex":return U>>>1;case"base64":return Ce(H).length;default:if(fe)return J?-1:Oe(H).length;P=(""+P).toLowerCase(),fe=!0}}e.byteLength=N;function Q(H,P,U){let J=!1;if((P===void 0||P<0)&&(P=0),P>this.length||((U===void 0||U>this.length)&&(U=this.length),U<=0)||(U>>>=0,P>>>=0,U<=P))return"";for(H||(H="utf8");;)switch(H){case"hex":return Le(this,P,U);case"utf8":case"utf-8":return le(this,P,U);case"ascii":return me(this,P,U);case"latin1":case"binary":return he(this,P,U);case"base64":return Re(this,P,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,P,U);default:if(J)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),J=!0}}e.prototype._isBuffer=!0;function K(H,P,U){const J=H[P];H[P]=H[U],H[U]=J}e.prototype.swap16=function(){const P=this.length;if(P%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let U=0;U<P;U+=2)K(this,U,U+1);return this},e.prototype.swap32=function(){const P=this.length;if(P%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let U=0;U<P;U+=4)K(this,U,U+3),K(this,U+1,U+2);return this},e.prototype.swap64=function(){const P=this.length;if(P%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let U=0;U<P;U+=8)K(this,U,U+7),K(this,U+1,U+6),K(this,U+2,U+5),K(this,U+3,U+4);return this},e.prototype.toString=function(){const P=this.length;return P===0?"":arguments.length===0?le(this,0,P):Q.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(P){if(!e.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P?!0:e.compare(this,P)===0},e.prototype.inspect=function(){let P="";const U=I.INSPECT_MAX_BYTES;return P=this.toString("hex",0,U).replace(/(.{2})/g,"$1 ").trim(),this.length>U&&(P+=" ... "),"<Buffer "+P+">"},G&&(e.prototype[G]=e.prototype.inspect),e.prototype.compare=function(P,U,J,fe,be){if(Te(P,te)&&(P=e.from(P,P.offset,P.byteLength)),!e.isBuffer(P))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof P);if(U===void 0&&(U=0),J===void 0&&(J=P?P.length:0),fe===void 0&&(fe=0),be===void 0&&(be=this.length),U<0||J>P.length||fe<0||be>this.length)throw new RangeError("out of range index");if(fe>=be&&U>=J)return 0;if(fe>=be)return-1;if(U>=J)return 1;if(U>>>=0,J>>>=0,fe>>>=0,be>>>=0,this===P)return 0;let se=be-fe,_e=J-U;const Ne=Math.min(se,_e),Me=this.slice(fe,be),Ee=P.slice(U,J);for(let Fe=0;Fe<Ne;++Fe)if(Me[Fe]!==Ee[Fe]){se=Me[Fe],_e=Ee[Fe];break}return se<_e?-1:_e<se?1:0};function A(H,P,U,J,fe){if(H.length===0)return-1;if(typeof U=="string"?(J=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,je(U)&&(U=fe?0:H.length-1),U<0&&(U=H.length+U),U>=H.length){if(fe)return-1;U=H.length-1}else if(U<0)if(fe)U=0;else return-1;if(typeof P=="string"&&(P=e.from(P,J)),e.isBuffer(P))return P.length===0?-1:O(H,P,U,J,fe);if(typeof P=="number")return P=P&255,typeof te.prototype.indexOf=="function"?fe?te.prototype.indexOf.call(H,P,U):te.prototype.lastIndexOf.call(H,P,U):O(H,[P],U,J,fe);throw new TypeError("val must be string, number or Buffer")}function O(H,P,U,J,fe){let be=1,se=H.length,_e=P.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(H.length<2||P.length<2)return-1;be=2,se/=2,_e/=2,U/=2}function Ne(Ee,Fe){return be===1?Ee[Fe]:Ee.readUInt16BE(Fe*be)}let Me;if(fe){let Ee=-1;for(Me=U;Me<se;Me++)if(Ne(H,Me)===Ne(P,Ee===-1?0:Me-Ee)){if(Ee===-1&&(Ee=Me),Me-Ee+1===_e)return Ee*be}else Ee!==-1&&(Me-=Me-Ee),Ee=-1}else for(U+_e>se&&(U=se-_e),Me=U;Me>=0;Me--){let Ee=!0;for(let Fe=0;Fe<_e;Fe++)if(Ne(H,Me+Fe)!==Ne(P,Fe)){Ee=!1;break}if(Ee)return Me}return-1}e.prototype.includes=function(P,U,J){return this.indexOf(P,U,J)!==-1},e.prototype.indexOf=function(P,U,J){return A(this,P,U,J,!0)},e.prototype.lastIndexOf=function(P,U,J){return A(this,P,U,J,!1)};function W(H,P,U,J){U=Number(U)||0;const fe=H.length-U;J?(J=Number(J),J>fe&&(J=fe)):J=fe;const be=P.length;J>be/2&&(J=be/2);let se;for(se=0;se<J;++se){const _e=parseInt(P.substr(se*2,2),16);if(je(_e))return se;H[U+se]=_e}return se}function Y(H,P,U,J){return qe(Oe(P,H.length-U),H,U,J)}function Z(H,P,U,J){return qe(ce(P),H,U,J)}function j(H,P,U,J){return qe(Ce(P),H,U,J)}function ne(H,P,U,J){return qe(we(P,H.length-U),H,U,J)}e.prototype.write=function(P,U,J,fe){if(U===void 0)fe="utf8",J=this.length,U=0;else if(J===void 0&&typeof U=="string")fe=U,J=this.length,U=0;else if(isFinite(U))U=U>>>0,isFinite(J)?(J=J>>>0,fe===void 0&&(fe="utf8")):(fe=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const be=this.length-U;if((J===void 0||J>be)&&(J=be),P.length>0&&(J<0||U<0)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");fe||(fe="utf8");let se=!1;for(;;)switch(fe){case"hex":return W(this,P,U,J);case"utf8":case"utf-8":return Y(this,P,U,J);case"ascii":case"latin1":case"binary":return Z(this,P,U,J);case"base64":return j(this,P,U,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,P,U,J);default:if(se)throw new TypeError("Unknown encoding: "+fe);fe=(""+fe).toLowerCase(),se=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Re(H,P,U){return P===0&&U===H.length?L.fromByteArray(H):L.fromByteArray(H.slice(P,U))}function le(H,P,U){U=Math.min(H.length,U);const J=[];let fe=P;for(;fe<U;){const be=H[fe];let se=null,_e=be>239?4:be>223?3:be>191?2:1;if(fe+_e<=U){let Ne,Me,Ee,Fe;switch(_e){case 1:be<128&&(se=be);break;case 2:Ne=H[fe+1],(Ne&192)===128&&(Fe=(be&31)<<6|Ne&63,Fe>127&&(se=Fe));break;case 3:Ne=H[fe+1],Me=H[fe+2],(Ne&192)===128&&(Me&192)===128&&(Fe=(be&15)<<12|(Ne&63)<<6|Me&63,Fe>2047&&(Fe<55296||Fe>57343)&&(se=Fe));break;case 4:Ne=H[fe+1],Me=H[fe+2],Ee=H[fe+3],(Ne&192)===128&&(Me&192)===128&&(Ee&192)===128&&(Fe=(be&15)<<18|(Ne&63)<<12|(Me&63)<<6|Ee&63,Fe>65535&&Fe<1114112&&(se=Fe))}}se===null?(se=65533,_e=1):se>65535&&(se-=65536,J.push(se>>>10&1023|55296),se=56320|se&1023),J.push(se),fe+=_e}return Pe(J)}const de=4096;function Pe(H){const P=H.length;if(P<=de)return String.fromCharCode.apply(String,H);let U="",J=0;for(;J<P;)U+=String.fromCharCode.apply(String,H.slice(J,J+=de));return U}function me(H,P,U){let J="";U=Math.min(H.length,U);for(let fe=P;fe<U;++fe)J+=String.fromCharCode(H[fe]&127);return J}function he(H,P,U){let J="";U=Math.min(H.length,U);for(let fe=P;fe<U;++fe)J+=String.fromCharCode(H[fe]);return J}function Le(H,P,U){const J=H.length;(!P||P<0)&&(P=0),(!U||U<0||U>J)&&(U=J);let fe="";for(let be=P;be<U;++be)fe+=Be[H[be]];return fe}function ve(H,P,U){const J=H.slice(P,U);let fe="";for(let be=0;be<J.length-1;be+=2)fe+=String.fromCharCode(J[be]+J[be+1]*256);return fe}e.prototype.slice=function(P,U){const J=this.length;P=~~P,U=U===void 0?J:~~U,P<0?(P+=J,P<0&&(P=0)):P>J&&(P=J),U<0?(U+=J,U<0&&(U=0)):U>J&&(U=J),U<P&&(U=P);const fe=this.subarray(P,U);return Object.setPrototypeOf(fe,e.prototype),fe};function ge(H,P,U){if(H%1!==0||H<0)throw new RangeError("offset is not uint");if(H+P>U)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(P,U,J){P=P>>>0,U=U>>>0,J||ge(P,U,this.length);let fe=this[P],be=1,se=0;for(;++se<U&&(be*=256);)fe+=this[P+se]*be;return fe},e.prototype.readUintBE=e.prototype.readUIntBE=function(P,U,J){P=P>>>0,U=U>>>0,J||ge(P,U,this.length);let fe=this[P+--U],be=1;for(;U>0&&(be*=256);)fe+=this[P+--U]*be;return fe},e.prototype.readUint8=e.prototype.readUInt8=function(P,U){return P=P>>>0,U||ge(P,1,this.length),this[P]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(P,U){return P=P>>>0,U||ge(P,2,this.length),this[P]|this[P+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(P,U){return P=P>>>0,U||ge(P,2,this.length),this[P]<<8|this[P+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(P,U){return P=P>>>0,U||ge(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+this[P+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(P,U){return P=P>>>0,U||ge(P,4,this.length),this[P]*16777216+(this[P+1]<<16|this[P+2]<<8|this[P+3])},e.prototype.readBigUInt64LE=$e(function(P){P=P>>>0,ae(P,"offset");const U=this[P],J=this[P+7];(U===void 0||J===void 0)&&pe(P,this.length-8);const fe=U+this[++P]*2**8+this[++P]*2**16+this[++P]*2**24,be=this[++P]+this[++P]*2**8+this[++P]*2**16+J*2**24;return BigInt(fe)+(BigInt(be)<<BigInt(32))}),e.prototype.readBigUInt64BE=$e(function(P){P=P>>>0,ae(P,"offset");const U=this[P],J=this[P+7];(U===void 0||J===void 0)&&pe(P,this.length-8);const fe=U*2**24+this[++P]*2**16+this[++P]*2**8+this[++P],be=this[++P]*2**24+this[++P]*2**16+this[++P]*2**8+J;return(BigInt(fe)<<BigInt(32))+BigInt(be)}),e.prototype.readIntLE=function(P,U,J){P=P>>>0,U=U>>>0,J||ge(P,U,this.length);let fe=this[P],be=1,se=0;for(;++se<U&&(be*=256);)fe+=this[P+se]*be;return be*=128,fe>=be&&(fe-=Math.pow(2,8*U)),fe},e.prototype.readIntBE=function(P,U,J){P=P>>>0,U=U>>>0,J||ge(P,U,this.length);let fe=U,be=1,se=this[P+--fe];for(;fe>0&&(be*=256);)se+=this[P+--fe]*be;return be*=128,se>=be&&(se-=Math.pow(2,8*U)),se},e.prototype.readInt8=function(P,U){return P=P>>>0,U||ge(P,1,this.length),this[P]&128?(255-this[P]+1)*-1:this[P]},e.prototype.readInt16LE=function(P,U){P=P>>>0,U||ge(P,2,this.length);const J=this[P]|this[P+1]<<8;return J&32768?J|4294901760:J},e.prototype.readInt16BE=function(P,U){P=P>>>0,U||ge(P,2,this.length);const J=this[P+1]|this[P]<<8;return J&32768?J|4294901760:J},e.prototype.readInt32LE=function(P,U){return P=P>>>0,U||ge(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},e.prototype.readInt32BE=function(P,U){return P=P>>>0,U||ge(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},e.prototype.readBigInt64LE=$e(function(P){P=P>>>0,ae(P,"offset");const U=this[P],J=this[P+7];(U===void 0||J===void 0)&&pe(P,this.length-8);const fe=this[P+4]+this[P+5]*2**8+this[P+6]*2**16+(J<<24);return(BigInt(fe)<<BigInt(32))+BigInt(U+this[++P]*2**8+this[++P]*2**16+this[++P]*2**24)}),e.prototype.readBigInt64BE=$e(function(P){P=P>>>0,ae(P,"offset");const U=this[P],J=this[P+7];(U===void 0||J===void 0)&&pe(P,this.length-8);const fe=(U<<24)+this[++P]*2**16+this[++P]*2**8+this[++P];return(BigInt(fe)<<BigInt(32))+BigInt(this[++P]*2**24+this[++P]*2**16+this[++P]*2**8+J)}),e.prototype.readFloatLE=function(P,U){return P=P>>>0,U||ge(P,4,this.length),D.read(this,P,!0,23,4)},e.prototype.readFloatBE=function(P,U){return P=P>>>0,U||ge(P,4,this.length),D.read(this,P,!1,23,4)},e.prototype.readDoubleLE=function(P,U){return P=P>>>0,U||ge(P,8,this.length),D.read(this,P,!0,52,8)},e.prototype.readDoubleBE=function(P,U){return P=P>>>0,U||ge(P,8,this.length),D.read(this,P,!1,52,8)};function De(H,P,U,J,fe,be){if(!e.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>fe||P<be)throw new RangeError('"value" argument is out of bounds');if(U+J>H.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(P,U,J,fe){if(P=+P,U=U>>>0,J=J>>>0,!fe){const _e=Math.pow(2,8*J)-1;De(this,P,U,J,_e,0)}let be=1,se=0;for(this[U]=P&255;++se<J&&(be*=256);)this[U+se]=P/be&255;return U+J},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(P,U,J,fe){if(P=+P,U=U>>>0,J=J>>>0,!fe){const _e=Math.pow(2,8*J)-1;De(this,P,U,J,_e,0)}let be=J-1,se=1;for(this[U+be]=P&255;--be>=0&&(se*=256);)this[U+be]=P/se&255;return U+J},e.prototype.writeUint8=e.prototype.writeUInt8=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,1,255,0),this[U]=P&255,U+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,2,65535,0),this[U]=P&255,this[U+1]=P>>>8,U+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,2,65535,0),this[U]=P>>>8,this[U+1]=P&255,U+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,4,4294967295,0),this[U+3]=P>>>24,this[U+2]=P>>>16,this[U+1]=P>>>8,this[U]=P&255,U+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,4,4294967295,0),this[U]=P>>>24,this[U+1]=P>>>16,this[U+2]=P>>>8,this[U+3]=P&255,U+4};function ye(H,P,U,J,fe){V(P,J,fe,H,U,7);let be=Number(P&BigInt(4294967295));H[U++]=be,be=be>>8,H[U++]=be,be=be>>8,H[U++]=be,be=be>>8,H[U++]=be;let se=Number(P>>BigInt(32)&BigInt(4294967295));return H[U++]=se,se=se>>8,H[U++]=se,se=se>>8,H[U++]=se,se=se>>8,H[U++]=se,U}function xe(H,P,U,J,fe){V(P,J,fe,H,U,7);let be=Number(P&BigInt(4294967295));H[U+7]=be,be=be>>8,H[U+6]=be,be=be>>8,H[U+5]=be,be=be>>8,H[U+4]=be;let se=Number(P>>BigInt(32)&BigInt(4294967295));return H[U+3]=se,se=se>>8,H[U+2]=se,se=se>>8,H[U+1]=se,se=se>>8,H[U]=se,U+8}e.prototype.writeBigUInt64LE=$e(function(P,U=0){return ye(this,P,U,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=$e(function(P,U=0){return xe(this,P,U,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(P,U,J,fe){if(P=+P,U=U>>>0,!fe){const Ne=Math.pow(2,8*J-1);De(this,P,U,J,Ne-1,-Ne)}let be=0,se=1,_e=0;for(this[U]=P&255;++be<J&&(se*=256);)P<0&&_e===0&&this[U+be-1]!==0&&(_e=1),this[U+be]=(P/se>>0)-_e&255;return U+J},e.prototype.writeIntBE=function(P,U,J,fe){if(P=+P,U=U>>>0,!fe){const Ne=Math.pow(2,8*J-1);De(this,P,U,J,Ne-1,-Ne)}let be=J-1,se=1,_e=0;for(this[U+be]=P&255;--be>=0&&(se*=256);)P<0&&_e===0&&this[U+be+1]!==0&&(_e=1),this[U+be]=(P/se>>0)-_e&255;return U+J},e.prototype.writeInt8=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,1,127,-128),P<0&&(P=255+P+1),this[U]=P&255,U+1},e.prototype.writeInt16LE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,2,32767,-32768),this[U]=P&255,this[U+1]=P>>>8,U+2},e.prototype.writeInt16BE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,2,32767,-32768),this[U]=P>>>8,this[U+1]=P&255,U+2},e.prototype.writeInt32LE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,4,2147483647,-2147483648),this[U]=P&255,this[U+1]=P>>>8,this[U+2]=P>>>16,this[U+3]=P>>>24,U+4},e.prototype.writeInt32BE=function(P,U,J){return P=+P,U=U>>>0,J||De(this,P,U,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),this[U]=P>>>24,this[U+1]=P>>>16,this[U+2]=P>>>8,this[U+3]=P&255,U+4},e.prototype.writeBigInt64LE=$e(function(P,U=0){return ye(this,P,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=$e(function(P,U=0){return xe(this,P,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ue(H,P,U,J,fe,be){if(U+J>H.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function Se(H,P,U,J,fe){return P=+P,U=U>>>0,fe||Ue(H,P,U,4),D.write(H,P,U,J,23,4),U+4}e.prototype.writeFloatLE=function(P,U,J){return Se(this,P,U,!0,J)},e.prototype.writeFloatBE=function(P,U,J){return Se(this,P,U,!1,J)};function Ae(H,P,U,J,fe){return P=+P,U=U>>>0,fe||Ue(H,P,U,8),D.write(H,P,U,J,52,8),U+8}e.prototype.writeDoubleLE=function(P,U,J){return Ae(this,P,U,!0,J)},e.prototype.writeDoubleBE=function(P,U,J){return Ae(this,P,U,!1,J)},e.prototype.copy=function(P,U,J,fe){if(!e.isBuffer(P))throw new TypeError("argument should be a Buffer");if(J||(J=0),!fe&&fe!==0&&(fe=this.length),U>=P.length&&(U=P.length),U||(U=0),fe>0&&fe<J&&(fe=J),fe===J||P.length===0||this.length===0)return 0;if(U<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw new RangeError("Index out of range");if(fe<0)throw new RangeError("sourceEnd out of bounds");fe>this.length&&(fe=this.length),P.length-U<fe-J&&(fe=P.length-U+J);const be=fe-J;return this===P&&typeof te.prototype.copyWithin=="function"?this.copyWithin(U,J,fe):te.prototype.set.call(P,this.subarray(J,fe),U),be},e.prototype.fill=function(P,U,J,fe){if(typeof P=="string"){if(typeof U=="string"?(fe=U,U=0,J=this.length):typeof J=="string"&&(fe=J,J=this.length),fe!==void 0&&typeof fe!="string")throw new TypeError("encoding must be a string");if(typeof fe=="string"&&!e.isEncoding(fe))throw new TypeError("Unknown encoding: "+fe);if(P.length===1){const se=P.charCodeAt(0);(fe==="utf8"&&se<128||fe==="latin1")&&(P=se)}}else typeof P=="number"?P=P&255:typeof P=="boolean"&&(P=Number(P));if(U<0||this.length<U||this.length<J)throw new RangeError("Out of range index");if(J<=U)return this;U=U>>>0,J=J===void 0?this.length:J>>>0,P||(P=0);let be;if(typeof P=="number")for(be=U;be<J;++be)this[be]=P;else{const se=e.isBuffer(P)?P:e.from(P,fe),_e=se.length;if(_e===0)throw new TypeError('The value "'+P+'" is invalid for argument "value"');for(be=0;be<J-U;++be)this[be+U]=se[be%_e]}return this};const He={};function z(H,P,U){He[H]=class extends U{constructor(){super(),Object.defineProperty(this,"message",{value:P.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${H}]`,this.stack,delete this.name}get code(){return H}set code(fe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:fe,writable:!0})}toString(){return`${this.name} [${H}]: ${this.message}`}}}z("ERR_BUFFER_OUT_OF_BOUNDS",function(H){return H?`${H} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),z("ERR_INVALID_ARG_TYPE",function(H,P){return`The "${H}" argument must be of type number. Received type ${typeof P}`},TypeError),z("ERR_OUT_OF_RANGE",function(H,P,U){let J=`The value of "${H}" is out of range.`,fe=U;return Number.isInteger(U)&&Math.abs(U)>2**32?fe=C(String(U)):typeof U=="bigint"&&(fe=String(U),(U>BigInt(2)**BigInt(32)||U<-(BigInt(2)**BigInt(32)))&&(fe=C(fe)),fe+="n"),J+=` It must be ${P}. Received ${fe}`,J},RangeError);function C(H){let P="",U=H.length;const J=H[0]==="-"?1:0;for(;U>=J+4;U-=3)P=`_${H.slice(U-3,U)}${P}`;return`${H.slice(0,U)}${P}`}function F(H,P,U){ae(P,"offset"),(H[P]===void 0||H[P+U]===void 0)&&pe(P,H.length-(U+1))}function V(H,P,U,J,fe,be){if(H>U||H<P){const se=typeof P=="bigint"?"n":"";let _e;throw P===0||P===BigInt(0)?_e=`>= 0${se} and < 2${se} ** ${(be+1)*8}${se}`:_e=`>= -(2${se} ** ${(be+1)*8-1}${se}) and < 2 ** ${(be+1)*8-1}${se}`,new He.ERR_OUT_OF_RANGE("value",_e,H)}F(J,fe,be)}function ae(H,P){if(typeof H!="number")throw new He.ERR_INVALID_ARG_TYPE(P,"number",H)}function pe(H,P,U){throw Math.floor(H)!==H?(ae(H,U),new He.ERR_OUT_OF_RANGE("offset","an integer",H)):P<0?new He.ERR_BUFFER_OUT_OF_BOUNDS:new He.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${P}`,H)}const re=/[^+/0-9A-Za-z-_]/g;function oe(H){if(H=H.split("=")[0],H=H.trim().replace(re,""),H.length<2)return"";for(;H.length%4!==0;)H=H+"=";return H}function Oe(H,P){P=P||1/0;let U;const J=H.length;let fe=null;const be=[];for(let se=0;se<J;++se){if(U=H.charCodeAt(se),U>55295&&U<57344){if(!fe){if(U>56319){(P-=3)>-1&&be.push(239,191,189);continue}else if(se+1===J){(P-=3)>-1&&be.push(239,191,189);continue}fe=U;continue}if(U<56320){(P-=3)>-1&&be.push(239,191,189),fe=U;continue}U=(fe-55296<<10|U-56320)+65536}else fe&&(P-=3)>-1&&be.push(239,191,189);if(fe=null,U<128){if((P-=1)<0)break;be.push(U)}else if(U<2048){if((P-=2)<0)break;be.push(U>>6|192,U&63|128)}else if(U<65536){if((P-=3)<0)break;be.push(U>>12|224,U>>6&63|128,U&63|128)}else if(U<1114112){if((P-=4)<0)break;be.push(U>>18|240,U>>12&63|128,U>>6&63|128,U&63|128)}else throw new Error("Invalid code point")}return be}function ce(H){const P=[];for(let U=0;U<H.length;++U)P.push(H.charCodeAt(U)&255);return P}function we(H,P){let U,J,fe;const be=[];for(let se=0;se<H.length&&!((P-=2)<0);++se)U=H.charCodeAt(se),J=U>>8,fe=U%256,be.push(fe),be.push(J);return be}function Ce(H){return L.toByteArray(oe(H))}function qe(H,P,U,J){let fe;for(fe=0;fe<J&&!(fe+U>=P.length||fe>=H.length);++fe)P[fe+U]=H[fe];return fe}function Te(H,P){return H instanceof P||H!=null&&H.constructor!=null&&H.constructor.name!=null&&H.constructor.name===P.name}function je(H){return H!==H}const Be=(function(){const H="0123456789abcdef",P=new Array(256);for(let U=0;U<16;++U){const J=U*16;for(let fe=0;fe<16;++fe)P[J+fe]=H[U]+H[fe]}return P})();function $e(H){return typeof BigInt>"u"?ze:H}function ze(){throw new Error("BigInt not supported")}})(_);const k=_.Buffer;b.Blob=_.Blob,b.BlobOptions=_.BlobOptions,b.Buffer=_.Buffer,b.File=_.File,b.FileOptions=_.FileOptions,b.INSPECT_MAX_BYTES=_.INSPECT_MAX_BYTES,b.SlowBuffer=_.SlowBuffer,b.TranscodeEncoding=_.TranscodeEncoding,b.atob=_.atob,b.btoa=_.btoa,b.constants=_.constants,b.default=k,b.isAscii=_.isAscii,b.isUtf8=_.isUtf8,b.kMaxLength=_.kMaxLength,b.kStringMaxLength=_.kStringMaxLength,b.resolveObjectURL=_.resolveObjectURL,b.transcode=_.transcode})(dist)),dist}var hasRequiredSafeBuffer$2;function requireSafeBuffer$2(){return hasRequiredSafeBuffer$2||(hasRequiredSafeBuffer$2=1,(function(b,_){var S=requireDist(),p=S.Buffer;function E(w,v){for(var y in w)v[y]=w[y]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?b.exports=S:(E(S,_),_.Buffer=a);function a(w,v,y){return p(w,v,y)}a.prototype=Object.create(p.prototype),E(p,a),a.from=function(w,v,y){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,v,y)},a.alloc=function(w,v,y){if(typeof w!="number")throw new TypeError("Argument must be a number");var m=p(w);return v!==void 0?typeof y=="string"?m.fill(v,y):m.fill(v):m.fill(0),m},a.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},a.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return S.SlowBuffer(w)}})(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}var hasRequiredBrowser$c;function requireBrowser$c(){if(hasRequiredBrowser$c)return browser$c.exports;hasRequiredBrowser$c=1;var b=65536,_=4294967295;function S(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
-
Use Chrome, Firefox or Internet Explorer 11`)}var p=requireSafeBuffer$2().Buffer,E=commonjsGlobal.crypto||commonjsGlobal.msCrypto;E&&E.getRandomValues?browser$c.exports=a:browser$c.exports=S;function a(w,v){if(w>_)throw new RangeError("requested too many random bytes");var y=p.allocUnsafe(w);if(w>0)if(w>b)for(var m=0;m<w;m+=b)E.getRandomValues(y.slice(m,m+b));else E.getRandomValues(y);return typeof v=="function"?process$1.nextTick(function(){v(null,y)}):y}return browser$c.exports}var inherits_browser$8={exports:{}},hasRequiredInherits_browser$8;function requireInherits_browser$8(){return hasRequiredInherits_browser$8||(hasRequiredInherits_browser$8=1,typeof Object.create=="function"?inherits_browser$8.exports=function(_,S){_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}})}:inherits_browser$8.exports=function(_,S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}),inherits_browser$8.exports}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var b=typeof Reflect=="object"?Reflect:null,_=b&&typeof b.apply=="function"?b.apply:function(G,X,te){return Function.prototype.apply.call(G,X,te)},S;b&&typeof b.ownKeys=="function"?S=b.ownKeys:Object.getOwnPropertySymbols?S=function(G){return Object.getOwnPropertyNames(G).concat(Object.getOwnPropertySymbols(G))}:S=function(G){return Object.getOwnPropertyNames(G)};function p(D){console&&console.warn&&console.warn(D)}var E=Number.isNaN||function(G){return G!==G};function a(){a.init.call(this)}events.exports=a,events.exports.once=k,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var w=10;function v(D){if(typeof D!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof D)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return w},set:function(D){if(typeof D!="number"||D<0||E(D))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+D+".");w=D}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(G){if(typeof G!="number"||G<0||E(G))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+G+".");return this._maxListeners=G,this};function y(D){return D._maxListeners===void 0?a.defaultMaxListeners:D._maxListeners}a.prototype.getMaxListeners=function(){return y(this)},a.prototype.emit=function(G){for(var X=[],te=1;te<arguments.length;te++)X.push(arguments[te]);var ie=G==="error",ee=this._events;if(ee!==void 0)ie=ie&&ee.error===void 0;else if(!ie)return!1;if(ie){var ue;if(X.length>0&&(ue=X[0]),ue instanceof Error)throw ue;var c=new Error("Unhandled error."+(ue?" ("+ue.message+")":""));throw c.context=ue,c}var e=ee[G];if(e===void 0)return!1;if(typeof e=="function")_(e,this,X);else for(var t=e.length,n=q(e,t),te=0;te<t;++te)_(n[te],this,X);return!0};function m(D,G,X,te){var ie,ee,ue;if(v(X),ee=D._events,ee===void 0?(ee=D._events=Object.create(null),D._eventsCount=0):(ee.newListener!==void 0&&(D.emit("newListener",G,X.listener?X.listener:X),ee=D._events),ue=ee[G]),ue===void 0)ue=ee[G]=X,++D._eventsCount;else if(typeof ue=="function"?ue=ee[G]=te?[X,ue]:[ue,X]:te?ue.unshift(X):ue.push(X),ie=y(D),ie>0&&ue.length>ie&&!ue.warned){ue.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+ue.length+" "+String(G)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=D,c.type=G,c.count=ue.length,p(c)}return D}a.prototype.addListener=function(G,X){return m(this,G,X,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(G,X){return m(this,G,X,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(D,G,X){var te={fired:!1,wrapFn:void 0,target:D,type:G,listener:X},ie=d.bind(te);return ie.listener=X,te.wrapFn=ie,ie}a.prototype.once=function(G,X){return v(X),this.on(G,g(this,G,X)),this},a.prototype.prependOnceListener=function(G,X){return v(X),this.prependListener(G,g(this,G,X)),this},a.prototype.removeListener=function(G,X){var te,ie,ee,ue,c;if(v(X),ie=this._events,ie===void 0)return this;if(te=ie[G],te===void 0)return this;if(te===X||te.listener===X)--this._eventsCount===0?this._events=Object.create(null):(delete ie[G],ie.removeListener&&this.emit("removeListener",G,te.listener||X));else if(typeof te!="function"){for(ee=-1,ue=te.length-1;ue>=0;ue--)if(te[ue]===X||te[ue].listener===X){c=te[ue].listener,ee=ue;break}if(ee<0)return this;ee===0?te.shift():B(te,ee),te.length===1&&(ie[G]=te[0]),ie.removeListener!==void 0&&this.emit("removeListener",G,c||X)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(G){var X,te,ie;if(te=this._events,te===void 0)return this;if(te.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):te[G]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete te[G]),this;if(arguments.length===0){var ee=Object.keys(te),ue;for(ie=0;ie<ee.length;++ie)ue=ee[ie],ue!=="removeListener"&&this.removeAllListeners(ue);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(X=te[G],typeof X=="function")this.removeListener(G,X);else if(X!==void 0)for(ie=X.length-1;ie>=0;ie--)this.removeListener(G,X[ie]);return this};function x(D,G,X){var te=D._events;if(te===void 0)return[];var ie=te[G];return ie===void 0?[]:typeof ie=="function"?X?[ie.listener||ie]:[ie]:X?$(ie):q(ie,ie.length)}a.prototype.listeners=function(G){return x(this,G,!0)},a.prototype.rawListeners=function(G){return x(this,G,!1)},a.listenerCount=function(D,G){return typeof D.listenerCount=="function"?D.listenerCount(G):R.call(D,G)},a.prototype.listenerCount=R;function R(D){var G=this._events;if(G!==void 0){var X=G[D];if(typeof X=="function")return 1;if(X!==void 0)return X.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function q(D,G){for(var X=new Array(G),te=0;te<G;++te)X[te]=D[te];return X}function B(D,G){for(;G+1<D.length;G++)D[G]=D[G+1];D.pop()}function $(D){for(var G=new Array(D.length),X=0;X<G.length;++X)G[X]=D[X].listener||D[X];return G}function k(D,G){return new Promise(function(X,te){function ie(ue){D.removeListener(G,ee),te(ue)}function ee(){typeof D.removeListener=="function"&&D.removeListener("error",ie),X([].slice.call(arguments))}L(D,G,ee,{once:!0}),G!=="error"&&I(D,ie,{once:!0})})}function I(D,G,X){typeof D.on=="function"&&L(D,"error",G,X)}function L(D,G,X,te){if(typeof D.on=="function")te.once?D.once(G,X):D.on(G,X);else if(typeof D.addEventListener=="function")D.addEventListener(G,function ie(ee){te.once&&D.removeEventListener(G,ie),X(ee)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof D)}return events.exports}var inherits_browser$7={exports:{}},hasRequiredInherits_browser$7;function requireInherits_browser$7(){return hasRequiredInherits_browser$7||(hasRequiredInherits_browser$7=1,typeof Object.create=="function"?inherits_browser$7.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$7.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser$7.exports}var streamBrowser$2,hasRequiredStreamBrowser$2;function requireStreamBrowser$2(){return hasRequiredStreamBrowser$2||(hasRequiredStreamBrowser$2=1,streamBrowser$2=requireEvents().EventEmitter),streamBrowser$2}var util$1={},types={},shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var _={},S=Symbol("test"),p=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(p)!=="[object Symbol]")return!1;var E=42;_[S]=E;for(var a in _)return!1;if(typeof Object.keys=="function"&&Object.keys(_).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(_).length!==0)return!1;var w=Object.getOwnPropertySymbols(_);if(w.length!==1||w[0]!==S||!Object.prototype.propertyIsEnumerable.call(_,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(_,S);if(v.value!==E||v.enumerable!==!0)return!1}return!0}),shams$1}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var b=requireShams$1();return shams=function(){return b()&&!!Symbol.toStringTag},shams}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(_){return _!==_}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var b=require_isNaN();return sign$1=function(S){return b(S)||S===0?S:S<0?-1:1},sign$1}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var b=requireGOPD();if(b)try{b([],"length")}catch{b=null}return gopd=b,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var b=Object.defineProperty||!1;if(b)try{b({},"a",{value:1})}catch{b=!1}return esDefineProperty=b,esDefineProperty}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var b=typeof Symbol<"u"&&Symbol,_=requireShams$1();return hasSymbols=function(){return typeof b!="function"||typeof Symbol!="function"||typeof b("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var b=requireEsObjectAtoms();return Object_getPrototypeOf=b.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var b="Function.prototype.bind called on incompatible ",_=Object.prototype.toString,S=Math.max,p="[object Function]",E=function(y,m){for(var d=[],g=0;g<y.length;g+=1)d[g]=y[g];for(var x=0;x<m.length;x+=1)d[x+y.length]=m[x];return d},a=function(y,m){for(var d=[],g=m,x=0;g<y.length;g+=1,x+=1)d[x]=y[g];return d},w=function(v,y){for(var m="",d=0;d<v.length;d+=1)m+=v[d],d+1<v.length&&(m+=y);return m};return implementation=function(y){var m=this;if(typeof m!="function"||_.apply(m)!==p)throw new TypeError(b+m);for(var d=a(arguments,1),g,x=function(){if(this instanceof g){var k=m.apply(this,E(d,arguments));return Object(k)===k?k:this}return m.apply(y,E(d,arguments))},R=S(0,m.length-d.length),q=[],B=0;B<R;B++)q[B]="$"+B;if(g=Function("binder","return function ("+w(q,",")+"){ return binder.apply(this,arguments); }")(x),m.prototype){var $=function(){};$.prototype=m.prototype,g.prototype=new $,$.prototype=null}return g},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var b=requireImplementation();return functionBind=Function.prototype.bind||b,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var b=requireFunctionBind(),_=requireFunctionApply(),S=requireFunctionCall(),p=requireReflectApply();return actualApply=p||b.call(S,_),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var b=requireFunctionBind(),_=requireType(),S=requireFunctionCall(),p=requireActualApply();return callBindApplyHelpers=function(a){if(a.length<1||typeof a[0]!="function")throw new _("a function is required");return p(b,S,a)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var b=requireCallBindApplyHelpers(),_=requireGopd(),S;try{S=[].__proto__===Array.prototype}catch(w){if(!w||typeof w!="object"||!("code"in w)||w.code!=="ERR_PROTO_ACCESS")throw w}var p=!!S&&_&&_(Object.prototype,"__proto__"),E=Object,a=E.getPrototypeOf;return get=p&&typeof p.get=="function"?b([p.get]):typeof a=="function"?function(v){return a(v==null?v:E(v))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var b=requireReflect_getPrototypeOf(),_=requireObject_getPrototypeOf(),S=requireGet();return getProto=b?function(E){return b(E)}:_?function(E){if(!E||typeof E!="object"&&typeof E!="function")throw new TypeError("getProto: not an object");return _(E)}:S?function(E){return S(E)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var b=Function.prototype.call,_=Object.prototype.hasOwnProperty,S=requireFunctionBind();return hasown=S.call(b,_),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var b,_=requireEsObjectAtoms(),S=requireEsErrors(),p=require_eval(),E=requireRange(),a=requireRef(),w=requireSyntax(),v=requireType(),y=requireUri(),m=requireAbs(),d=requireFloor(),g=requireMax(),x=requireMin(),R=requirePow(),q=requireRound(),B=requireSign$1(),$=Function,k=function(W){try{return $('"use strict"; return ('+W+").constructor;")()}catch{}},I=requireGopd(),L=requireEsDefineProperty(),D=function(){throw new v},G=I?(function(){try{return arguments.callee,D}catch{try{return I(arguments,"callee").get}catch{return D}}})():D,X=requireHasSymbols()(),te=requireGetProto(),ie=requireObject_getPrototypeOf(),ee=requireReflect_getPrototypeOf(),ue=requireFunctionApply(),c=requireFunctionCall(),e={},t=typeof Uint8Array>"u"||!te?b:te(Uint8Array),n={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?b:ArrayBuffer,"%ArrayIteratorPrototype%":X&&te?te([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":e,"%AsyncGenerator%":e,"%AsyncGeneratorFunction%":e,"%AsyncIteratorPrototype%":e,"%Atomics%":typeof Atomics>"u"?b:Atomics,"%BigInt%":typeof BigInt>"u"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":p,"%Float16Array%":typeof Float16Array>"u"?b:Float16Array,"%Float32Array%":typeof Float32Array>"u"?b:Float32Array,"%Float64Array%":typeof Float64Array>"u"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?b:FinalizationRegistry,"%Function%":$,"%GeneratorFunction%":e,"%Int8Array%":typeof Int8Array>"u"?b:Int8Array,"%Int16Array%":typeof Int16Array>"u"?b:Int16Array,"%Int32Array%":typeof Int32Array>"u"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":X&&te?te(te([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map>"u"?b:Map,"%MapIteratorPrototype%":typeof Map>"u"||!X||!te?b:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_,"%Object.getOwnPropertyDescriptor%":I,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?b:Promise,"%Proxy%":typeof Proxy>"u"?b:Proxy,"%RangeError%":E,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?b:Set,"%SetIteratorPrototype%":typeof Set>"u"||!X||!te?b:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":X&&te?te(""[Symbol.iterator]()):b,"%Symbol%":X?Symbol:b,"%SyntaxError%":w,"%ThrowTypeError%":G,"%TypedArray%":t,"%TypeError%":v,"%Uint8Array%":typeof Uint8Array>"u"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?b:Uint32Array,"%URIError%":y,"%WeakMap%":typeof WeakMap>"u"?b:WeakMap,"%WeakRef%":typeof WeakRef>"u"?b:WeakRef,"%WeakSet%":typeof WeakSet>"u"?b:WeakSet,"%Function.prototype.call%":c,"%Function.prototype.apply%":ue,"%Object.defineProperty%":L,"%Object.getPrototypeOf%":ie,"%Math.abs%":m,"%Math.floor%":d,"%Math.max%":g,"%Math.min%":x,"%Math.pow%":R,"%Math.round%":q,"%Math.sign%":B,"%Reflect.getPrototypeOf%":ee};if(te)try{null.error}catch(W){var f=te(te(W));n["%Error.prototype%"]=f}var s=function W(Y){var Z;if(Y==="%AsyncFunction%")Z=k("async function () {}");else if(Y==="%GeneratorFunction%")Z=k("function* () {}");else if(Y==="%AsyncGeneratorFunction%")Z=k("async function* () {}");else if(Y==="%AsyncGenerator%"){var j=W("%AsyncGeneratorFunction%");j&&(Z=j.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ne=W("%AsyncGenerator%");ne&&te&&(Z=te(ne.prototype))}return n[Y]=Z,Z},u={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},l=requireFunctionBind(),o=requireHasown(),r=l.call(c,Array.prototype.concat),h=l.call(ue,Array.prototype.splice),M=l.call(c,String.prototype.replace),T=l.call(c,String.prototype.slice),N=l.call(c,RegExp.prototype.exec),Q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,A=function(Y){var Z=T(Y,0,1),j=T(Y,-1);if(Z==="%"&&j!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&Z!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var ne=[];return M(Y,Q,function(Re,le,de,Pe){ne[ne.length]=de?M(Pe,K,"$1"):le||Re}),ne},O=function(Y,Z){var j=Y,ne;if(o(u,j)&&(ne=u[j],j="%"+ne[0]+"%"),o(n,j)){var Re=n[j];if(Re===e&&(Re=s(j)),typeof Re>"u"&&!Z)throw new v("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ne,name:j,value:Re}}throw new w("intrinsic "+Y+" does not exist!")};return getIntrinsic=function(Y,Z){if(typeof Y!="string"||Y.length===0)throw new v("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Z!="boolean")throw new v('"allowMissing" argument must be a boolean');if(N(/^%?[^%]*%?$/,Y)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=A(Y),ne=j.length>0?j[0]:"",Re=O("%"+ne+"%",Z),le=Re.name,de=Re.value,Pe=!1,me=Re.alias;me&&(ne=me[0],h(j,r([0,1],me)));for(var he=1,Le=!0;he<j.length;he+=1){var ve=j[he],ge=T(ve,0,1),De=T(ve,-1);if((ge==='"'||ge==="'"||ge==="`"||De==='"'||De==="'"||De==="`")&&ge!==De)throw new w("property names with quotes must have matching quotes");if((ve==="constructor"||!Le)&&(Pe=!0),ne+="."+ve,le="%"+ne+"%",o(n,le))de=n[le];else if(de!=null){if(!(ve in de)){if(!Z)throw new v("base intrinsic for "+Y+" exists, but the property is not available.");return}if(I&&he+1>=j.length){var ye=I(de,ve);Le=!!ye,Le&&"get"in ye&&!("originalValue"in ye.get)?de=ye.get:de=de[ve]}else Le=o(de,ve),de=de[ve];Le&&!Pe&&(n[le]=de)}}return de},getIntrinsic}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var b=requireGetIntrinsic(),_=requireCallBindApplyHelpers(),S=_([b("%String.prototype.indexOf%")]);return callBound=function(E,a){var w=b(E,!!a);return typeof w=="function"&&S(E,".prototype.")>-1?_([w]):w},callBound}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var b=requireShams()(),_=requireCallBound(),S=_("Object.prototype.toString"),p=function(v){return b&&v&&typeof v=="object"&&Symbol.toStringTag in v?!1:S(v)==="[object Arguments]"},E=function(v){return p(v)?!0:v!==null&&typeof v=="object"&&"length"in v&&typeof v.length=="number"&&v.length>=0&&S(v)!=="[object Array]"&&"callee"in v&&S(v.callee)==="[object Function]"},a=(function(){return p(arguments)})();return p.isLegacyArguments=E,isArguments=a?p:E,isArguments}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var b=requireCallBound(),_=requireShams()(),S=requireHasown(),p=requireGopd(),E;if(_){var a=b("RegExp.prototype.exec"),w={},v=function(){throw w},y={toString:v,valueOf:v};typeof Symbol.toPrimitive=="symbol"&&(y[Symbol.toPrimitive]=v),E=function(x){if(!x||typeof x!="object")return!1;var R=p(x,"lastIndex"),q=R&&S(R,"value");if(!q)return!1;try{a(x,y)}catch(B){return B===w}}}else{var m=b("Object.prototype.toString"),d="[object RegExp]";E=function(x){return!x||typeof x!="object"&&typeof x!="function"?!1:m(x)===d}}return isRegex=E,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var b=requireCallBound(),_=requireIsRegex(),S=b("RegExp.prototype.exec"),p=requireType();return safeRegexTest=function(a){if(!_(a))throw new p("`regex` must be a RegExp");return function(v){return S(a,v)!==null}},safeRegexTest}var generatorFunction,hasRequiredGeneratorFunction;function requireGeneratorFunction(){if(hasRequiredGeneratorFunction)return generatorFunction;hasRequiredGeneratorFunction=1;const b=(function*(){}).constructor;return generatorFunction=()=>b,generatorFunction}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var b=requireCallBound(),_=requireSafeRegexTest(),S=_(/^\s*(?:function)?\*/),p=requireShams()(),E=requireGetProto(),a=b("Object.prototype.toString"),w=b("Function.prototype.toString"),v=requireGeneratorFunction();return isGeneratorFunction=function(m){if(typeof m!="function")return!1;if(S(w(m)))return!0;if(!p){var d=a(m);return d==="[object GeneratorFunction]"}if(!E)return!1;var g=v();return g&&E(m)===g.prototype},isGeneratorFunction}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var b=Function.prototype.toString,_=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,p;if(typeof _=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw p}}),p={},_(function(){throw 42},null,S)}catch(I){I!==p&&(_=null)}else _=null;var E=/^\s*class\b/,a=function(L){try{var D=b.call(L);return E.test(D)}catch{return!1}},w=function(L){try{return a(L)?!1:(b.call(L),!0)}catch{return!1}},v=Object.prototype.toString,y="[object Object]",m="[object Function]",d="[object GeneratorFunction]",g="[object HTMLAllCollection]",x="[object HTML document.all class]",R="[object HTMLCollection]",q=typeof Symbol=="function"&&!!Symbol.toStringTag,B=!(0 in[,]),$=function(){return!1};if(typeof document=="object"){var k=document.all;v.call(k)===v.call(document.all)&&($=function(L){if((B||!L)&&(typeof L>"u"||typeof L=="object"))try{var D=v.call(L);return(D===g||D===x||D===R||D===y)&&L("")==null}catch{}return!1})}return isCallable=_?function(L){if($(L))return!0;if(!L||typeof L!="function"&&typeof L!="object")return!1;try{_(L,null,S)}catch(D){if(D!==p)return!1}return!a(L)&&w(L)}:function(L){if($(L))return!0;if(!L||typeof L!="function"&&typeof L!="object")return!1;if(q)return w(L);if(a(L))return!1;var D=v.call(L);return D!==m&&D!==d&&!/^\[object HTML/.test(D)?!1:w(L)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var b=requireIsCallable(),_=Object.prototype.toString,S=Object.prototype.hasOwnProperty,p=function(y,m,d){for(var g=0,x=y.length;g<x;g++)S.call(y,g)&&(d==null?m(y[g],g,y):m.call(d,y[g],g,y))},E=function(y,m,d){for(var g=0,x=y.length;g<x;g++)d==null?m(y.charAt(g),g,y):m.call(d,y.charAt(g),g,y)},a=function(y,m,d){for(var g in y)S.call(y,g)&&(d==null?m(y[g],g,y):m.call(d,y[g],g,y))};function w(v){return _.call(v)==="[object Array]"}return forEach=function(y,m,d){if(!b(m))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=d),w(y)?p(y,m,g):typeof y=="string"?E(y,m,g):a(y,m,g)},forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var b=requirePossibleTypedArrayNames(),_=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var p=[],E=0;E<b.length;E++)typeof _[b[E]]=="function"&&(p[p.length]=b[E]);return p},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var b=requireEsDefineProperty(),_=requireSyntax(),S=requireType(),p=requireGopd();return defineDataProperty=function(a,w,v){if(!a||typeof a!="object"&&typeof a!="function")throw new S("`obj` must be an object or a function`");if(typeof w!="string"&&typeof w!="symbol")throw new S("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new S("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new S("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new S("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new S("`loose`, if provided, must be a boolean");var y=arguments.length>3?arguments[3]:null,m=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,x=!!p&&p(a,w);if(b)b(a,w,{configurable:d===null&&x?x.configurable:!d,enumerable:y===null&&x?x.enumerable:!y,value:v,writable:m===null&&x?x.writable:!m});else if(g||!y&&!m&&!d)a[w]=v;else throw new _("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var b=requireEsDefineProperty(),_=function(){return!!b};return _.hasArrayLengthDefineBug=function(){if(!b)return null;try{return b([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=_,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var b=requireGetIntrinsic(),_=requireDefineDataProperty(),S=requireHasPropertyDescriptors()(),p=requireGopd(),E=requireType(),a=b("%Math.floor%");return setFunctionLength=function(v,y){if(typeof v!="function")throw new E("`fn` is not a function");if(typeof y!="number"||y<0||y>4294967295||a(y)!==y)throw new E("`length` must be a positive 32-bit integer");var m=arguments.length>2&&!!arguments[2],d=!0,g=!0;if("length"in v&&p){var x=p(v,"length");x&&!x.configurable&&(d=!1),x&&!x.writable&&(g=!1)}return(d||g||!m)&&(S?_(v,"length",y,!0,!0):_(v,"length",y)),v},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var b=requireFunctionBind(),_=requireFunctionApply(),S=requireActualApply();return applyBind=function(){return S(b,_,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,(function(b){var _=requireSetFunctionLength(),S=requireEsDefineProperty(),p=requireCallBindApplyHelpers(),E=requireApplyBind();b.exports=function(w){var v=p(arguments),y=w.length-(arguments.length-1);return _(v,1+(y>0?y:0),!0)},S?S(b.exports,"apply",{value:E}):b.exports.apply=E})(callBind)),callBind.exports}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var b=requireForEach(),_=requireAvailableTypedArrays(),S=requireCallBind(),p=requireCallBound(),E=requireGopd(),a=requireGetProto(),w=p("Object.prototype.toString"),v=requireShams()(),y=typeof globalThis>"u"?commonjsGlobal:globalThis,m=_(),d=p("String.prototype.slice"),g=p("Array.prototype.indexOf",!0)||function($,k){for(var I=0;I<$.length;I+=1)if($[I]===k)return I;return-1},x={__proto__:null};v&&E&&a?b(m,function(B){var $=new y[B];if(Symbol.toStringTag in $&&a){var k=a($),I=E(k,Symbol.toStringTag);if(!I&&k){var L=a(k);I=E(L,Symbol.toStringTag)}if(I&&I.get){var D=S(I.get);x["$"+B]=D}}}):b(m,function(B){var $=new y[B],k=$.slice||$.set;if(k){var I=S(k);x["$"+B]=I}});var R=function($){var k=!1;return b(x,function(I,L){if(!k)try{"$"+I($)===L&&(k=d(L,1))}catch{}}),k},q=function($){var k=!1;return b(x,function(I,L){if(!k)try{I($),k=d(L,1)}catch{}}),k};return whichTypedArray=function($){if(!$||typeof $!="object")return!1;if(!v){var k=d(w($),8,-1);return g(m,k)>-1?k:k!=="Object"?!1:q($)}return E?R($):null},whichTypedArray}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var b=requireWhichTypedArray();return isTypedArray=function(S){return!!b(S)},isTypedArray}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,(function(b){var _=requireIsArguments(),S=requireIsGeneratorFunction(),p=requireWhichTypedArray(),E=requireIsTypedArray();function a(he){return he.call.bind(he)}var w=typeof BigInt<"u",v=typeof Symbol<"u",y=a(Object.prototype.toString),m=a(Number.prototype.valueOf),d=a(String.prototype.valueOf),g=a(Boolean.prototype.valueOf);if(w)var x=a(BigInt.prototype.valueOf);if(v)var R=a(Symbol.prototype.valueOf);function q(he,Le){if(typeof he!="object")return!1;try{return Le(he),!0}catch{return!1}}b.isArgumentsObject=_,b.isGeneratorFunction=S,b.isTypedArray=E;function B(he){return typeof Promise<"u"&&he instanceof Promise||he!==null&&typeof he=="object"&&typeof he.then=="function"&&typeof he.catch=="function"}b.isPromise=B;function $(he){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(he):E(he)||T(he)}b.isArrayBufferView=$;function k(he){return p(he)==="Uint8Array"}b.isUint8Array=k;function I(he){return p(he)==="Uint8ClampedArray"}b.isUint8ClampedArray=I;function L(he){return p(he)==="Uint16Array"}b.isUint16Array=L;function D(he){return p(he)==="Uint32Array"}b.isUint32Array=D;function G(he){return p(he)==="Int8Array"}b.isInt8Array=G;function X(he){return p(he)==="Int16Array"}b.isInt16Array=X;function te(he){return p(he)==="Int32Array"}b.isInt32Array=te;function ie(he){return p(he)==="Float32Array"}b.isFloat32Array=ie;function ee(he){return p(he)==="Float64Array"}b.isFloat64Array=ee;function ue(he){return p(he)==="BigInt64Array"}b.isBigInt64Array=ue;function c(he){return p(he)==="BigUint64Array"}b.isBigUint64Array=c;function e(he){return y(he)==="[object Map]"}e.working=typeof Map<"u"&&e(new Map);function t(he){return typeof Map>"u"?!1:e.working?e(he):he instanceof Map}b.isMap=t;function n(he){return y(he)==="[object Set]"}n.working=typeof Set<"u"&&n(new Set);function f(he){return typeof Set>"u"?!1:n.working?n(he):he instanceof Set}b.isSet=f;function s(he){return y(he)==="[object WeakMap]"}s.working=typeof WeakMap<"u"&&s(new WeakMap);function u(he){return typeof WeakMap>"u"?!1:s.working?s(he):he instanceof WeakMap}b.isWeakMap=u;function l(he){return y(he)==="[object WeakSet]"}l.working=typeof WeakSet<"u"&&l(new WeakSet);function o(he){return l(he)}b.isWeakSet=o;function r(he){return y(he)==="[object ArrayBuffer]"}r.working=typeof ArrayBuffer<"u"&&r(new ArrayBuffer);function h(he){return typeof ArrayBuffer>"u"?!1:r.working?r(he):he instanceof ArrayBuffer}b.isArrayBuffer=h;function M(he){return y(he)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function T(he){return typeof DataView>"u"?!1:M.working?M(he):he instanceof DataView}b.isDataView=T;var N=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Q(he){return y(he)==="[object SharedArrayBuffer]"}function K(he){return typeof N>"u"?!1:(typeof Q.working>"u"&&(Q.working=Q(new N)),Q.working?Q(he):he instanceof N)}b.isSharedArrayBuffer=K;function A(he){return y(he)==="[object AsyncFunction]"}b.isAsyncFunction=A;function O(he){return y(he)==="[object Map Iterator]"}b.isMapIterator=O;function W(he){return y(he)==="[object Set Iterator]"}b.isSetIterator=W;function Y(he){return y(he)==="[object Generator]"}b.isGeneratorObject=Y;function Z(he){return y(he)==="[object WebAssembly.Module]"}b.isWebAssemblyCompiledModule=Z;function j(he){return q(he,m)}b.isNumberObject=j;function ne(he){return q(he,d)}b.isStringObject=ne;function Re(he){return q(he,g)}b.isBooleanObject=Re;function le(he){return w&&q(he,x)}b.isBigIntObject=le;function de(he){return v&&q(he,R)}b.isSymbolObject=de;function Pe(he){return j(he)||ne(he)||Re(he)||le(he)||de(he)}b.isBoxedPrimitive=Pe;function me(he){return typeof Uint8Array<"u"&&(h(he)||K(he))}b.isAnyArrayBuffer=me,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(he){Object.defineProperty(b,he,{enumerable:!1,value:function(){throw new Error(he+" is not supported in userland")}})})})(types)),types}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(_){return _&&typeof _=="object"&&typeof _.copy=="function"&&typeof _.fill=="function"&&typeof _.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,(function(b){var _=Object.getOwnPropertyDescriptors||function(T){for(var N=Object.keys(T),Q={},K=0;K<N.length;K++)Q[N[K]]=Object.getOwnPropertyDescriptor(T,N[K]);return Q},S=/%[sdj%]/g;b.format=function(M){if(!G(M)){for(var T=[],N=0;N<arguments.length;N++)T.push(w(arguments[N]));return T.join(" ")}for(var N=1,Q=arguments,K=Q.length,A=String(M).replace(S,function(W){if(W==="%%")return"%";if(N>=K)return W;switch(W){case"%s":return String(Q[N++]);case"%d":return Number(Q[N++]);case"%j":try{return JSON.stringify(Q[N++])}catch{return"[Circular]"}default:return W}}),O=Q[N];N<K;O=Q[++N])I(O)||!ee(O)?A+=" "+O:A+=" "+w(O);return A},b.deprecate=function(M,T){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return M;if(typeof process$1>"u")return function(){return b.deprecate(M,T).apply(this,arguments)};var N=!1;function Q(){if(!N){if(process$1.throwDeprecation)throw new Error(T);process$1.traceDeprecation?console.trace(T):console.error(T),N=!0}return M.apply(this,arguments)}return Q};var p={},E=/^$/;if(process$1.env.NODE_DEBUG){var a=process$1.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+a+"$","i")}b.debuglog=function(M){if(M=M.toUpperCase(),!p[M])if(E.test(M)){var T=process$1.pid;p[M]=function(){var N=b.format.apply(b,arguments);console.error("%s %d: %s",M,T,N)}}else p[M]=function(){};return p[M]};function w(M,T){var N={seen:[],stylize:y};return arguments.length>=3&&(N.depth=arguments[2]),arguments.length>=4&&(N.colors=arguments[3]),k(T)?N.showHidden=T:T&&b._extend(N,T),te(N.showHidden)&&(N.showHidden=!1),te(N.depth)&&(N.depth=2),te(N.colors)&&(N.colors=!1),te(N.customInspect)&&(N.customInspect=!0),N.colors&&(N.stylize=v),d(N,M,N.depth)}b.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function v(M,T){var N=w.styles[T];return N?"\x1B["+w.colors[N][0]+"m"+M+"\x1B["+w.colors[N][1]+"m":M}function y(M,T){return M}function m(M){var T={};return M.forEach(function(N,Q){T[N]=!0}),T}function d(M,T,N){if(M.customInspect&&T&&e(T.inspect)&&T.inspect!==b.inspect&&!(T.constructor&&T.constructor.prototype===T)){var Q=T.inspect(N,M);return G(Q)||(Q=d(M,Q,N)),Q}var K=g(M,T);if(K)return K;var A=Object.keys(T),O=m(A);if(M.showHidden&&(A=Object.getOwnPropertyNames(T)),c(T)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return x(T);if(A.length===0){if(e(T)){var W=T.name?": "+T.name:"";return M.stylize("[Function"+W+"]","special")}if(ie(T))return M.stylize(RegExp.prototype.toString.call(T),"regexp");if(ue(T))return M.stylize(Date.prototype.toString.call(T),"date");if(c(T))return x(T)}var Y="",Z=!1,j=["{","}"];if($(T)&&(Z=!0,j=["[","]"]),e(T)){var ne=T.name?": "+T.name:"";Y=" [Function"+ne+"]"}if(ie(T)&&(Y=" "+RegExp.prototype.toString.call(T)),ue(T)&&(Y=" "+Date.prototype.toUTCString.call(T)),c(T)&&(Y=" "+x(T)),A.length===0&&(!Z||T.length==0))return j[0]+Y+j[1];if(N<0)return ie(T)?M.stylize(RegExp.prototype.toString.call(T),"regexp"):M.stylize("[Object]","special");M.seen.push(T);var Re;return Z?Re=R(M,T,N,O,A):Re=A.map(function(le){return q(M,T,N,O,le,Z)}),M.seen.pop(),B(Re,Y,j)}function g(M,T){if(te(T))return M.stylize("undefined","undefined");if(G(T)){var N="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(N,"string")}if(D(T))return M.stylize(""+T,"number");if(k(T))return M.stylize(""+T,"boolean");if(I(T))return M.stylize("null","null")}function x(M){return"["+Error.prototype.toString.call(M)+"]"}function R(M,T,N,Q,K){for(var A=[],O=0,W=T.length;O<W;++O)l(T,String(O))?A.push(q(M,T,N,Q,String(O),!0)):A.push("");return K.forEach(function(Y){Y.match(/^\d+$/)||A.push(q(M,T,N,Q,Y,!0))}),A}function q(M,T,N,Q,K,A){var O,W,Y;if(Y=Object.getOwnPropertyDescriptor(T,K)||{value:T[K]},Y.get?Y.set?W=M.stylize("[Getter/Setter]","special"):W=M.stylize("[Getter]","special"):Y.set&&(W=M.stylize("[Setter]","special")),l(Q,K)||(O="["+K+"]"),W||(M.seen.indexOf(Y.value)<0?(I(N)?W=d(M,Y.value,null):W=d(M,Y.value,N-1),W.indexOf(`
|
|
3
|
-
`)>-1&&(
|
|
4
|
-
`).map(function(
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function getDefaultExportFromCjs(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}var browser$c={exports:{}},process=browser$c.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(_){if(cachedSetTimeout===setTimeout)return setTimeout(_,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(_,0);try{return cachedSetTimeout(_,0)}catch{try{return cachedSetTimeout.call(null,_,0)}catch{return cachedSetTimeout.call(this,_,0)}}}function runClearTimeout(_){if(cachedClearTimeout===clearTimeout)return clearTimeout(_);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(_);try{return cachedClearTimeout(_)}catch{try{return cachedClearTimeout.call(null,_)}catch{return cachedClearTimeout.call(this,_)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var _=runTimeout(cleanUpNextTick);draining=!0;for(var S=queue.length;S;){for(currentQueue=queue,queue=[];++queueIndex<S;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,S=queue.length}currentQueue=null,draining=!1,runClearTimeout(_)}}process.nextTick=function(_){var S=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)S[I-1]=arguments[I];queue.push(new Item(_,S)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(_,S){this.fun=_,this.array=S}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(_){return[]};process.binding=function(_){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(_){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports=browser$c.exports;const process$1=getDefaultExportFromCjs(browserExports);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cryptoBrowserify={},browser$b={exports:{}},safeBuffer$2={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(_){Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var S={},I={};I.byteLength=d,I.toByteArray=M,I.fromByteArray=A;for(var p=[],R=[],f=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,v=w.length;m<v;++m)p[m]=w[m],R[w.charCodeAt(m)]=m;R[45]=62,R[95]=63;function y($){var H=$.length;if(H%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=$.indexOf("=");N===-1&&(N=H);var V=N===H?0:4-N%4;return[N,V]}function d($){var H=y($),N=H[0],V=H[1];return(N+V)*3/4-V}function g($,H,N){return(H+N)*3/4-N}function M($){var H,N=y($),V=N[0],Q=N[1],ne=new f(g($,V,Q)),ae=0,ee=Q>0?V-4:V,le;for(le=0;le<ee;le+=4)H=R[$.charCodeAt(le)]<<18|R[$.charCodeAt(le+1)]<<12|R[$.charCodeAt(le+2)]<<6|R[$.charCodeAt(le+3)],ne[ae++]=H>>16&255,ne[ae++]=H>>8&255,ne[ae++]=H&255;return Q===2&&(H=R[$.charCodeAt(le)]<<2|R[$.charCodeAt(le+1)]>>4,ne[ae++]=H&255),Q===1&&(H=R[$.charCodeAt(le)]<<10|R[$.charCodeAt(le+1)]<<4|R[$.charCodeAt(le+2)]>>2,ne[ae++]=H>>8&255,ne[ae++]=H&255),ne}function x($){return p[$>>18&63]+p[$>>12&63]+p[$>>6&63]+p[$&63]}function B($,H,N){for(var V,Q=[],ne=H;ne<N;ne+=3)V=($[ne]<<16&16711680)+($[ne+1]<<8&65280)+($[ne+2]&255),Q.push(x(V));return Q.join("")}function A($){for(var H,N=$.length,V=N%3,Q=[],ne=16383,ae=0,ee=N-V;ae<ee;ae+=ne)Q.push(B($,ae,ae+ne>ee?ee:ae+ne));return V===1?(H=$[N-1],Q.push(p[H>>2]+p[H<<4&63]+"==")):V===2&&(H=($[N-2]<<8)+$[N-1],Q.push(p[H>>10]+p[H>>4&63]+p[H<<2&63]+"=")),Q.join("")}var D={};D.read=function($,H,N,V,Q){var ne,ae,ee=Q*8-V-1,le=(1<<ee)-1,c=le>>1,e=-7,t=N?Q-1:0,n=N?-1:1,a=$[H+t];for(t+=n,ne=a&(1<<-e)-1,a>>=-e,e+=ee;e>0;ne=ne*256+$[H+t],t+=n,e-=8);for(ae=ne&(1<<-e)-1,ne>>=-e,e+=V;e>0;ae=ae*256+$[H+t],t+=n,e-=8);if(ne===0)ne=1-c;else{if(ne===le)return ae?NaN:(a?-1:1)*(1/0);ae=ae+Math.pow(2,V),ne=ne-c}return(a?-1:1)*ae*Math.pow(2,ne-V)},D.write=function($,H,N,V,Q,ne){var ae,ee,le,c=ne*8-Q-1,e=(1<<c)-1,t=e>>1,n=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=V?0:ne-1,s=V?1:-1,u=H<0||H===0&&1/H<0?1:0;for(H=Math.abs(H),isNaN(H)||H===1/0?(ee=isNaN(H)?1:0,ae=e):(ae=Math.floor(Math.log(H)/Math.LN2),H*(le=Math.pow(2,-ae))<1&&(ae--,le*=2),ae+t>=1?H+=n/le:H+=n*Math.pow(2,1-t),H*le>=2&&(ae++,le/=2),ae+t>=e?(ee=0,ae=e):ae+t>=1?(ee=(H*le-1)*Math.pow(2,Q),ae=ae+t):(ee=H*Math.pow(2,t-1)*Math.pow(2,Q),ae=0));Q>=8;$[N+a]=ee&255,a+=s,ee/=256,Q-=8);for(ae=ae<<Q|ee,c+=Q;c>0;$[N+a]=ae&255,a+=s,ae/=256,c-=8);$[N+a-s]|=u*128};(function($){const H=I,N=D,V=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$.Buffer=e,$.SlowBuffer=E,$.INSPECT_MAX_BYTES=50;const Q=2147483647;$.kMaxLength=Q;const{Uint8Array:ne,ArrayBuffer:ae,SharedArrayBuffer:ee}=globalThis;e.TYPED_ARRAY_SUPPORT=le(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function le(){try{const z=new ne(1),T={foo:function(){return 42}};return Object.setPrototypeOf(T,ne.prototype),Object.setPrototypeOf(z,T),z.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function c(z){if(z>Q)throw new RangeError('The value "'+z+'" is invalid for option "size"');const T=new ne(z);return Object.setPrototypeOf(T,e.prototype),T}function e(z,T,F){if(typeof z=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(z)}return t(z,T,F)}e.poolSize=8192;function t(z,T,F){if(typeof z=="string")return u(z,T);if(ae.isView(z))return o(z);if(z==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z);if(ke(z,ae)||z&&ke(z.buffer,ae)||typeof ee<"u"&&(ke(z,ee)||z&&ke(z.buffer,ee)))return r(z,T,F);if(typeof z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=z.valueOf&&z.valueOf();if(Z!=null&&Z!==z)return e.from(Z,T,F);const ie=h(z);if(ie)return ie;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof z[Symbol.toPrimitive]=="function")return e.from(z[Symbol.toPrimitive]("string"),T,F);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z)}e.from=function(z,T,F){return t(z,T,F)},Object.setPrototypeOf(e.prototype,ne.prototype),Object.setPrototypeOf(e,ne);function n(z){if(typeof z!="number")throw new TypeError('"size" argument must be of type number');if(z<0)throw new RangeError('The value "'+z+'" is invalid for option "size"')}function a(z,T,F){return n(z),z<=0?c(z):T!==void 0?typeof F=="string"?c(z).fill(T,F):c(z).fill(T):c(z)}e.alloc=function(z,T,F){return a(z,T,F)};function s(z){return n(z),c(z<0?0:b(z)|0)}e.allocUnsafe=function(z){return s(z)},e.allocUnsafeSlow=function(z){return s(z)};function u(z,T){if((typeof T!="string"||T==="")&&(T="utf8"),!e.isEncoding(T))throw new TypeError("Unknown encoding: "+T);const F=L(z,T)|0;let Z=c(F);const ie=Z.write(z,T);return ie!==F&&(Z=Z.slice(0,ie)),Z}function l(z){const T=z.length<0?0:b(z.length)|0,F=c(T);for(let Z=0;Z<T;Z+=1)F[Z]=z[Z]&255;return F}function o(z){if(ke(z,ne)){const T=new ne(z);return r(T.buffer,T.byteOffset,T.byteLength)}return l(z)}function r(z,T,F){if(T<0||z.byteLength<T)throw new RangeError('"offset" is outside of buffer bounds');if(z.byteLength<T+(F||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return T===void 0&&F===void 0?Z=new ne(z):F===void 0?Z=new ne(z,T):Z=new ne(z,T,F),Object.setPrototypeOf(Z,e.prototype),Z}function h(z){if(e.isBuffer(z)){const T=b(z.length)|0,F=c(T);return F.length===0||z.copy(F,0,0,T),F}if(z.length!==void 0)return typeof z.length!="number"||We(z.length)?c(0):l(z);if(z.type==="Buffer"&&Array.isArray(z.data))return l(z.data)}function b(z){if(z>=Q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return z|0}function E(z){return+z!=z&&(z=0),e.alloc(+z)}e.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==e.prototype},e.compare=function(T,F){if(ke(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),ke(F,ne)&&(F=e.from(F,F.offset,F.byteLength)),!e.isBuffer(T)||!e.isBuffer(F))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===F)return 0;let Z=T.length,ie=F.length;for(let ve=0,oe=Math.min(Z,ie);ve<oe;++ve)if(T[ve]!==F[ve]){Z=T[ve],ie=F[ve];break}return Z<ie?-1:ie<Z?1:0},e.isEncoding=function(T){switch(String(T).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(T,F){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return e.alloc(0);let Z;if(F===void 0)for(F=0,Z=0;Z<T.length;++Z)F+=T[Z].length;const ie=e.allocUnsafe(F);let ve=0;for(Z=0;Z<T.length;++Z){let oe=T[Z];if(ke(oe,ne))ve+oe.length>ie.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(ie,ve)):ne.prototype.set.call(ie,oe,ve);else if(e.isBuffer(oe))oe.copy(ie,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return ie};function L(z,T){if(e.isBuffer(z))return z.length;if(ae.isView(z)||ke(z,ae))return z.byteLength;if(typeof z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof z);const F=z.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&F===0)return 0;let ie=!1;for(;;)switch(T){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":return Ne(z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F*2;case"hex":return F>>>1;case"base64":return Oe(z).length;default:if(ie)return Z?-1:Ne(z).length;T=(""+T).toLowerCase(),ie=!0}}e.byteLength=L;function Y(z,T,F){let Z=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0,T>>>=0,F<=T))return"";for(z||(z="utf8");;)switch(z){case"hex":return De(this,T,F);case"utf8":case"utf-8":return ue(this,T,F);case"ascii":return me(this,T,F);case"latin1":case"binary":return se(this,T,F);case"base64":return Ie(this,T,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,T,F);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(z+"").toLowerCase(),Z=!0}}e.prototype._isBuffer=!0;function K(z,T,F){const Z=z[T];z[T]=z[F],z[F]=Z}e.prototype.swap16=function(){const T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let F=0;F<T;F+=2)K(this,F,F+1);return this},e.prototype.swap32=function(){const T=this.length;if(T%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let F=0;F<T;F+=4)K(this,F,F+3),K(this,F+1,F+2);return this},e.prototype.swap64=function(){const T=this.length;if(T%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let F=0;F<T;F+=8)K(this,F,F+7),K(this,F+1,F+6),K(this,F+2,F+5),K(this,F+3,F+4);return this},e.prototype.toString=function(){const T=this.length;return T===0?"":arguments.length===0?ue(this,0,T):Y.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(T){if(!e.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:e.compare(this,T)===0},e.prototype.inspect=function(){let T="";const F=$.INSPECT_MAX_BYTES;return T=this.toString("hex",0,F).replace(/(.{2})/g,"$1 ").trim(),this.length>F&&(T+=" ... "),"<Buffer "+T+">"},V&&(e.prototype[V]=e.prototype.inspect),e.prototype.compare=function(T,F,Z,ie,ve){if(ke(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),!e.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(F===void 0&&(F=0),Z===void 0&&(Z=T?T.length:0),ie===void 0&&(ie=0),ve===void 0&&(ve=this.length),F<0||Z>T.length||ie<0||ve>this.length)throw new RangeError("out of range index");if(ie>=ve&&F>=Z)return 0;if(ie>=ve)return-1;if(F>=Z)return 1;if(F>>>=0,Z>>>=0,ie>>>=0,ve>>>=0,this===T)return 0;let oe=ve-ie,Me=Z-F;const Le=Math.min(oe,Me),ge=this.slice(ie,ve),Be=T.slice(F,Z);for(let Fe=0;Fe<Le;++Fe)if(ge[Fe]!==Be[Fe]){oe=ge[Fe],Me=Be[Fe];break}return oe<Me?-1:Me<oe?1:0};function q(z,T,F,Z,ie){if(z.length===0)return-1;if(typeof F=="string"?(Z=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,We(F)&&(F=ie?0:z.length-1),F<0&&(F=z.length+F),F>=z.length){if(ie)return-1;F=z.length-1}else if(F<0)if(ie)F=0;else return-1;if(typeof T=="string"&&(T=e.from(T,Z)),e.isBuffer(T))return T.length===0?-1:P(z,T,F,Z,ie);if(typeof T=="number")return T=T&255,typeof ne.prototype.indexOf=="function"?ie?ne.prototype.indexOf.call(z,T,F):ne.prototype.lastIndexOf.call(z,T,F):P(z,[T],F,Z,ie);throw new TypeError("val must be string, number or Buffer")}function P(z,T,F,Z,ie){let ve=1,oe=z.length,Me=T.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(z.length<2||T.length<2)return-1;ve=2,oe/=2,Me/=2,F/=2}function Le(Be,Fe){return ve===1?Be[Fe]:Be.readUInt16BE(Fe*ve)}let ge;if(ie){let Be=-1;for(ge=F;ge<oe;ge++)if(Le(z,ge)===Le(T,Be===-1?0:ge-Be)){if(Be===-1&&(Be=ge),ge-Be+1===Me)return Be*ve}else Be!==-1&&(ge-=ge-Be),Be=-1}else for(F+Me>oe&&(F=oe-Me),ge=F;ge>=0;ge--){let Be=!0;for(let Fe=0;Fe<Me;Fe++)if(Le(z,ge+Fe)!==Le(T,Fe)){Be=!1;break}if(Be)return ge}return-1}e.prototype.includes=function(T,F,Z){return this.indexOf(T,F,Z)!==-1},e.prototype.indexOf=function(T,F,Z){return q(this,T,F,Z,!0)},e.prototype.lastIndexOf=function(T,F,Z){return q(this,T,F,Z,!1)};function W(z,T,F,Z){F=Number(F)||0;const ie=z.length-F;Z?(Z=Number(Z),Z>ie&&(Z=ie)):Z=ie;const ve=T.length;Z>ve/2&&(Z=ve/2);let oe;for(oe=0;oe<Z;++oe){const Me=parseInt(T.substr(oe*2,2),16);if(We(Me))return oe;z[F+oe]=Me}return oe}function J(z,T,F,Z){return qe(Ne(T,z.length-F),z,F,Z)}function X(z,T,F,Z){return qe(be(T),z,F,Z)}function U(z,T,F,Z){return qe(Oe(T),z,F,Z)}function re(z,T,F,Z){return qe(Se(T,z.length-F),z,F,Z)}e.prototype.write=function(T,F,Z,ie){if(F===void 0)ie="utf8",Z=this.length,F=0;else if(Z===void 0&&typeof F=="string")ie=F,Z=this.length,F=0;else if(isFinite(F))F=F>>>0,isFinite(Z)?(Z=Z>>>0,ie===void 0&&(ie="utf8")):(ie=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ve=this.length-F;if((Z===void 0||Z>ve)&&(Z=ve),T.length>0&&(Z<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");let oe=!1;for(;;)switch(ie){case"hex":return W(this,T,F,Z);case"utf8":case"utf-8":return J(this,T,F,Z);case"ascii":case"latin1":case"binary":return X(this,T,F,Z);case"base64":return U(this,T,F,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,T,F,Z);default:if(oe)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ie(z,T,F){return T===0&&F===z.length?H.fromByteArray(z):H.fromByteArray(z.slice(T,F))}function ue(z,T,F){F=Math.min(z.length,F);const Z=[];let ie=T;for(;ie<F;){const ve=z[ie];let oe=null,Me=ve>239?4:ve>223?3:ve>191?2:1;if(ie+Me<=F){let Le,ge,Be,Fe;switch(Me){case 1:ve<128&&(oe=ve);break;case 2:Le=z[ie+1],(Le&192)===128&&(Fe=(ve&31)<<6|Le&63,Fe>127&&(oe=Fe));break;case 3:Le=z[ie+1],ge=z[ie+2],(Le&192)===128&&(ge&192)===128&&(Fe=(ve&15)<<12|(Le&63)<<6|ge&63,Fe>2047&&(Fe<55296||Fe>57343)&&(oe=Fe));break;case 4:Le=z[ie+1],ge=z[ie+2],Be=z[ie+3],(Le&192)===128&&(ge&192)===128&&(Be&192)===128&&(Fe=(ve&15)<<18|(Le&63)<<12|(ge&63)<<6|Be&63,Fe>65535&&Fe<1114112&&(oe=Fe))}}oe===null?(oe=65533,Me=1):oe>65535&&(oe-=65536,Z.push(oe>>>10&1023|55296),oe=56320|oe&1023),Z.push(oe),ie+=Me}return $e(Z)}const he=4096;function $e(z){const T=z.length;if(T<=he)return String.fromCharCode.apply(String,z);let F="",Z=0;for(;Z<T;)F+=String.fromCharCode.apply(String,z.slice(Z,Z+=he));return F}function me(z,T,F){let Z="";F=Math.min(z.length,F);for(let ie=T;ie<F;++ie)Z+=String.fromCharCode(z[ie]&127);return Z}function se(z,T,F){let Z="";F=Math.min(z.length,F);for(let ie=T;ie<F;++ie)Z+=String.fromCharCode(z[ie]);return Z}function De(z,T,F){const Z=z.length;(!T||T<0)&&(T=0),(!F||F<0||F>Z)&&(F=Z);let ie="";for(let ve=T;ve<F;++ve)ie+=Re[z[ve]];return ie}function de(z,T,F){const Z=z.slice(T,F);let ie="";for(let ve=0;ve<Z.length-1;ve+=2)ie+=String.fromCharCode(Z[ve]+Z[ve+1]*256);return ie}e.prototype.slice=function(T,F){const Z=this.length;T=~~T,F=F===void 0?Z:~~F,T<0?(T+=Z,T<0&&(T=0)):T>Z&&(T=Z),F<0?(F+=Z,F<0&&(F=0)):F>Z&&(F=Z),F<T&&(F=T);const ie=this.subarray(T,F);return Object.setPrototypeOf(ie,e.prototype),ie};function ye(z,T,F){if(z%1!==0||z<0)throw new RangeError("offset is not uint");if(z+T>F)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T],ve=1,oe=0;for(;++oe<F&&(ve*=256);)ie+=this[T+oe]*ve;return ie},e.prototype.readUintBE=e.prototype.readUIntBE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T+--F],ve=1;for(;F>0&&(ve*=256);)ie+=this[T+--F]*ve;return ie},e.prototype.readUint8=e.prototype.readUInt8=function(T,F){return T=T>>>0,F||ye(T,1,this.length),this[T]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(T,F){return T=T>>>0,F||ye(T,2,this.length),this[T]|this[T+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(T,F){return T=T>>>0,F||ye(T,2,this.length),this[T]<<8|this[T+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},e.prototype.readBigUInt64LE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=F+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,ve=this[++T]+this[++T]*2**8+this[++T]*2**16+Z*2**24;return BigInt(ie)+(BigInt(ve)<<BigInt(32))}),e.prototype.readBigUInt64BE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=F*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],ve=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+Z;return(BigInt(ie)<<BigInt(32))+BigInt(ve)}),e.prototype.readIntLE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T],ve=1,oe=0;for(;++oe<F&&(ve*=256);)ie+=this[T+oe]*ve;return ve*=128,ie>=ve&&(ie-=Math.pow(2,8*F)),ie},e.prototype.readIntBE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=F,ve=1,oe=this[T+--ie];for(;ie>0&&(ve*=256);)oe+=this[T+--ie]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*F)),oe},e.prototype.readInt8=function(T,F){return T=T>>>0,F||ye(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},e.prototype.readInt16LE=function(T,F){T=T>>>0,F||ye(T,2,this.length);const Z=this[T]|this[T+1]<<8;return Z&32768?Z|4294901760:Z},e.prototype.readInt16BE=function(T,F){T=T>>>0,F||ye(T,2,this.length);const Z=this[T+1]|this[T]<<8;return Z&32768?Z|4294901760:Z},e.prototype.readInt32LE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},e.prototype.readInt32BE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},e.prototype.readBigInt64LE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(Z<<24);return(BigInt(ie)<<BigInt(32))+BigInt(F+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24)}),e.prototype.readBigInt64BE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=(F<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(ie)<<BigInt(32))+BigInt(this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+Z)}),e.prototype.readFloatLE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),N.read(this,T,!0,23,4)},e.prototype.readFloatBE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),N.read(this,T,!1,23,4)},e.prototype.readDoubleLE=function(T,F){return T=T>>>0,F||ye(T,8,this.length),N.read(this,T,!0,52,8)},e.prototype.readDoubleBE=function(T,F){return T=T>>>0,F||ye(T,8,this.length),N.read(this,T,!1,52,8)};function Ce(z,T,F,Z,ie,ve){if(!e.isBuffer(z))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>ie||T<ve)throw new RangeError('"value" argument is out of bounds');if(F+Z>z.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(T,F,Z,ie){if(T=+T,F=F>>>0,Z=Z>>>0,!ie){const Me=Math.pow(2,8*Z)-1;Ce(this,T,F,Z,Me,0)}let ve=1,oe=0;for(this[F]=T&255;++oe<Z&&(ve*=256);)this[F+oe]=T/ve&255;return F+Z},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(T,F,Z,ie){if(T=+T,F=F>>>0,Z=Z>>>0,!ie){const Me=Math.pow(2,8*Z)-1;Ce(this,T,F,Z,Me,0)}let ve=Z-1,oe=1;for(this[F+ve]=T&255;--ve>=0&&(oe*=256);)this[F+ve]=T/oe&255;return F+Z},e.prototype.writeUint8=e.prototype.writeUInt8=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,1,255,0),this[F]=T&255,F+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,65535,0),this[F]=T&255,this[F+1]=T>>>8,F+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,65535,0),this[F]=T>>>8,this[F+1]=T&255,F+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,4294967295,0),this[F+3]=T>>>24,this[F+2]=T>>>16,this[F+1]=T>>>8,this[F]=T&255,F+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,4294967295,0),this[F]=T>>>24,this[F+1]=T>>>16,this[F+2]=T>>>8,this[F+3]=T&255,F+4};function pe(z,T,F,Z,ie){G(T,Z,ie,z,F,7);let ve=Number(T&BigInt(4294967295));z[F++]=ve,ve=ve>>8,z[F++]=ve,ve=ve>>8,z[F++]=ve,ve=ve>>8,z[F++]=ve;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return z[F++]=oe,oe=oe>>8,z[F++]=oe,oe=oe>>8,z[F++]=oe,oe=oe>>8,z[F++]=oe,F}function _e(z,T,F,Z,ie){G(T,Z,ie,z,F,7);let ve=Number(T&BigInt(4294967295));z[F+7]=ve,ve=ve>>8,z[F+6]=ve,ve=ve>>8,z[F+5]=ve,ve=ve>>8,z[F+4]=ve;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return z[F+3]=oe,oe=oe>>8,z[F+2]=oe,oe=oe>>8,z[F+1]=oe,oe=oe>>8,z[F]=oe,F+8}e.prototype.writeBigUInt64LE=Te(function(T,F=0){return pe(this,T,F,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=Te(function(T,F=0){return _e(this,T,F,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(T,F,Z,ie){if(T=+T,F=F>>>0,!ie){const Le=Math.pow(2,8*Z-1);Ce(this,T,F,Z,Le-1,-Le)}let ve=0,oe=1,Me=0;for(this[F]=T&255;++ve<Z&&(oe*=256);)T<0&&Me===0&&this[F+ve-1]!==0&&(Me=1),this[F+ve]=(T/oe>>0)-Me&255;return F+Z},e.prototype.writeIntBE=function(T,F,Z,ie){if(T=+T,F=F>>>0,!ie){const Le=Math.pow(2,8*Z-1);Ce(this,T,F,Z,Le-1,-Le)}let ve=Z-1,oe=1,Me=0;for(this[F+ve]=T&255;--ve>=0&&(oe*=256);)T<0&&Me===0&&this[F+ve+1]!==0&&(Me=1),this[F+ve]=(T/oe>>0)-Me&255;return F+Z},e.prototype.writeInt8=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,1,127,-128),T<0&&(T=255+T+1),this[F]=T&255,F+1},e.prototype.writeInt16LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,32767,-32768),this[F]=T&255,this[F+1]=T>>>8,F+2},e.prototype.writeInt16BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,32767,-32768),this[F]=T>>>8,this[F+1]=T&255,F+2},e.prototype.writeInt32LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,2147483647,-2147483648),this[F]=T&255,this[F+1]=T>>>8,this[F+2]=T>>>16,this[F+3]=T>>>24,F+4},e.prototype.writeInt32BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[F]=T>>>24,this[F+1]=T>>>16,this[F+2]=T>>>8,this[F+3]=T&255,F+4},e.prototype.writeBigInt64LE=Te(function(T,F=0){return pe(this,T,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=Te(function(T,F=0){return _e(this,T,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ue(z,T,F,Z,ie,ve){if(F+Z>z.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function xe(z,T,F,Z,ie){return T=+T,F=F>>>0,ie||Ue(z,T,F,4),N.write(z,T,F,Z,23,4),F+4}e.prototype.writeFloatLE=function(T,F,Z){return xe(this,T,F,!0,Z)},e.prototype.writeFloatBE=function(T,F,Z){return xe(this,T,F,!1,Z)};function Ae(z,T,F,Z,ie){return T=+T,F=F>>>0,ie||Ue(z,T,F,8),N.write(z,T,F,Z,52,8),F+8}e.prototype.writeDoubleLE=function(T,F,Z){return Ae(this,T,F,!0,Z)},e.prototype.writeDoubleBE=function(T,F,Z){return Ae(this,T,F,!1,Z)},e.prototype.copy=function(T,F,Z,ie){if(!e.isBuffer(T))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ie&&ie!==0&&(ie=this.length),F>=T.length&&(F=T.length),F||(F=0),ie>0&&ie<Z&&(ie=Z),ie===Z||T.length===0||this.length===0)return 0;if(F<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),T.length-F<ie-Z&&(ie=T.length-F+Z);const ve=ie-Z;return this===T&&typeof ne.prototype.copyWithin=="function"?this.copyWithin(F,Z,ie):ne.prototype.set.call(T,this.subarray(Z,ie),F),ve},e.prototype.fill=function(T,F,Z,ie){if(typeof T=="string"){if(typeof F=="string"?(ie=F,F=0,Z=this.length):typeof Z=="string"&&(ie=Z,Z=this.length),ie!==void 0&&typeof ie!="string")throw new TypeError("encoding must be a string");if(typeof ie=="string"&&!e.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);if(T.length===1){const oe=T.charCodeAt(0);(ie==="utf8"&&oe<128||ie==="latin1")&&(T=oe)}}else typeof T=="number"?T=T&255:typeof T=="boolean"&&(T=Number(T));if(F<0||this.length<F||this.length<Z)throw new RangeError("Out of range index");if(Z<=F)return this;F=F>>>0,Z=Z===void 0?this.length:Z>>>0,T||(T=0);let ve;if(typeof T=="number")for(ve=F;ve<Z;++ve)this[ve]=T;else{const oe=e.isBuffer(T)?T:e.from(T,ie),Me=oe.length;if(Me===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(ve=0;ve<Z-F;++ve)this[ve+F]=oe[ve%Me]}return this};const je={};function j(z,T,F){je[z]=class extends F{constructor(){super(),Object.defineProperty(this,"message",{value:T.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${z}]`,this.stack,delete this.name}get code(){return z}set code(ie){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ie,writable:!0})}toString(){return`${this.name} [${z}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(z){return z?`${z} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(z,T){return`The "${z}" argument must be of type number. Received type ${typeof T}`},TypeError),j("ERR_OUT_OF_RANGE",function(z,T,F){let Z=`The value of "${z}" is out of range.`,ie=F;return Number.isInteger(F)&&Math.abs(F)>2**32?ie=k(String(F)):typeof F=="bigint"&&(ie=String(F),(F>BigInt(2)**BigInt(32)||F<-(BigInt(2)**BigInt(32)))&&(ie=k(ie)),ie+="n"),Z+=` It must be ${T}. Received ${ie}`,Z},RangeError);function k(z){let T="",F=z.length;const Z=z[0]==="-"?1:0;for(;F>=Z+4;F-=3)T=`_${z.slice(F-3,F)}${T}`;return`${z.slice(0,F)}${T}`}function O(z,T,F){te(T,"offset"),(z[T]===void 0||z[T+F]===void 0)&&ce(T,z.length-(F+1))}function G(z,T,F,Z,ie,ve){if(z>F||z<T){const oe=typeof T=="bigint"?"n":"";let Me;throw T===0||T===BigInt(0)?Me=`>= 0${oe} and < 2${oe} ** ${(ve+1)*8}${oe}`:Me=`>= -(2${oe} ** ${(ve+1)*8-1}${oe}) and < 2 ** ${(ve+1)*8-1}${oe}`,new je.ERR_OUT_OF_RANGE("value",Me,z)}O(Z,ie,ve)}function te(z,T){if(typeof z!="number")throw new je.ERR_INVALID_ARG_TYPE(T,"number",z)}function ce(z,T,F){throw Math.floor(z)!==z?(te(z,F),new je.ERR_OUT_OF_RANGE("offset","an integer",z)):T<0?new je.ERR_BUFFER_OUT_OF_BOUNDS:new je.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${T}`,z)}const fe=/[^+/0-9A-Za-z-_]/g;function we(z){if(z=z.split("=")[0],z=z.trim().replace(fe,""),z.length<2)return"";for(;z.length%4!==0;)z=z+"=";return z}function Ne(z,T){T=T||1/0;let F;const Z=z.length;let ie=null;const ve=[];for(let oe=0;oe<Z;++oe){if(F=z.charCodeAt(oe),F>55295&&F<57344){if(!ie){if(F>56319){(T-=3)>-1&&ve.push(239,191,189);continue}else if(oe+1===Z){(T-=3)>-1&&ve.push(239,191,189);continue}ie=F;continue}if(F<56320){(T-=3)>-1&&ve.push(239,191,189),ie=F;continue}F=(ie-55296<<10|F-56320)+65536}else ie&&(T-=3)>-1&&ve.push(239,191,189);if(ie=null,F<128){if((T-=1)<0)break;ve.push(F)}else if(F<2048){if((T-=2)<0)break;ve.push(F>>6|192,F&63|128)}else if(F<65536){if((T-=3)<0)break;ve.push(F>>12|224,F>>6&63|128,F&63|128)}else if(F<1114112){if((T-=4)<0)break;ve.push(F>>18|240,F>>12&63|128,F>>6&63|128,F&63|128)}else throw new Error("Invalid code point")}return ve}function be(z){const T=[];for(let F=0;F<z.length;++F)T.push(z.charCodeAt(F)&255);return T}function Se(z,T){let F,Z,ie;const ve=[];for(let oe=0;oe<z.length&&!((T-=2)<0);++oe)F=z.charCodeAt(oe),Z=F>>8,ie=F%256,ve.push(ie),ve.push(Z);return ve}function Oe(z){return H.toByteArray(we(z))}function qe(z,T,F,Z){let ie;for(ie=0;ie<Z&&!(ie+F>=T.length||ie>=z.length);++ie)T[ie+F]=z[ie];return ie}function ke(z,T){return z instanceof T||z!=null&&z.constructor!=null&&z.constructor.name!=null&&z.constructor.name===T.name}function We(z){return z!==z}const Re=(function(){const z="0123456789abcdef",T=new Array(256);for(let F=0;F<16;++F){const Z=F*16;for(let ie=0;ie<16;++ie)T[Z+ie]=z[F]+z[ie]}return T})();function Te(z){return typeof BigInt>"u"?Ke:z}function Ke(){throw new Error("BigInt not supported")}})(S);const C=S.Buffer;_.Blob=S.Blob,_.BlobOptions=S.BlobOptions,_.Buffer=S.Buffer,_.File=S.File,_.FileOptions=S.FileOptions,_.INSPECT_MAX_BYTES=S.INSPECT_MAX_BYTES,_.SlowBuffer=S.SlowBuffer,_.TranscodeEncoding=S.TranscodeEncoding,_.atob=S.atob,_.btoa=S.btoa,_.constants=S.constants,_.default=C,_.isAscii=S.isAscii,_.isUtf8=S.isUtf8,_.kMaxLength=S.kMaxLength,_.kStringMaxLength=S.kStringMaxLength,_.resolveObjectURL=S.resolveObjectURL,_.transcode=S.transcode})(dist)),dist}var hasRequiredSafeBuffer$2;function requireSafeBuffer$2(){return hasRequiredSafeBuffer$2||(hasRequiredSafeBuffer$2=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}f.prototype=Object.create(p.prototype),R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}var hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var _=65536,S=4294967295;function I(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var p=requireSafeBuffer$2().Buffer,R=commonjsGlobal.crypto||commonjsGlobal.msCrypto;R&&R.getRandomValues?browser$b.exports=f:browser$b.exports=I;function f(w,m){if(w>S)throw new RangeError("requested too many random bytes");var v=p.allocUnsafe(w);if(w>0)if(w>_)for(var y=0;y<w;y+=_)R.getRandomValues(v.slice(y,y+_));else R.getRandomValues(v);return typeof m=="function"?process$1.nextTick(function(){m(null,v)}):v}return browser$b.exports}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(S,I){I&&(S.super_=I,S.prototype=Object.create(I.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(S,I){if(I){S.super_=I;var p=function(){};p.prototype=I.prototype,S.prototype=new p,S.prototype.constructor=S}}),inherits_browser.exports}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var _=typeof Reflect=="object"?Reflect:null,S=_&&typeof _.apply=="function"?_.apply:function(V,Q,ne){return Function.prototype.apply.call(V,Q,ne)},I;_&&typeof _.ownKeys=="function"?I=_.ownKeys:Object.getOwnPropertySymbols?I=function(V){return Object.getOwnPropertyNames(V).concat(Object.getOwnPropertySymbols(V))}:I=function(V){return Object.getOwnPropertyNames(V)};function p(N){console&&console.warn&&console.warn(N)}var R=Number.isNaN||function(V){return V!==V};function f(){f.init.call(this)}events.exports=f,events.exports.once=C,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var w=10;function m(N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N)}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return w},set:function(N){if(typeof N!="number"||N<0||R(N))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+N+".");w=N}}),f.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(V){if(typeof V!="number"||V<0||R(V))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+V+".");return this._maxListeners=V,this};function v(N){return N._maxListeners===void 0?f.defaultMaxListeners:N._maxListeners}f.prototype.getMaxListeners=function(){return v(this)},f.prototype.emit=function(V){for(var Q=[],ne=1;ne<arguments.length;ne++)Q.push(arguments[ne]);var ae=V==="error",ee=this._events;if(ee!==void 0)ae=ae&&ee.error===void 0;else if(!ae)return!1;if(ae){var le;if(Q.length>0&&(le=Q[0]),le instanceof Error)throw le;var c=new Error("Unhandled error."+(le?" ("+le.message+")":""));throw c.context=le,c}var e=ee[V];if(e===void 0)return!1;if(typeof e=="function")S(e,this,Q);else for(var t=e.length,n=B(e,t),ne=0;ne<t;++ne)S(n[ne],this,Q);return!0};function y(N,V,Q,ne){var ae,ee,le;if(m(Q),ee=N._events,ee===void 0?(ee=N._events=Object.create(null),N._eventsCount=0):(ee.newListener!==void 0&&(N.emit("newListener",V,Q.listener?Q.listener:Q),ee=N._events),le=ee[V]),le===void 0)le=ee[V]=Q,++N._eventsCount;else if(typeof le=="function"?le=ee[V]=ne?[Q,le]:[le,Q]:ne?le.unshift(Q):le.push(Q),ae=v(N),ae>0&&le.length>ae&&!le.warned){le.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+le.length+" "+String(V)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=N,c.type=V,c.count=le.length,p(c)}return N}f.prototype.addListener=function(V,Q){return y(this,V,Q,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(V,Q){return y(this,V,Q,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(N,V,Q){var ne={fired:!1,wrapFn:void 0,target:N,type:V,listener:Q},ae=d.bind(ne);return ae.listener=Q,ne.wrapFn=ae,ae}f.prototype.once=function(V,Q){return m(Q),this.on(V,g(this,V,Q)),this},f.prototype.prependOnceListener=function(V,Q){return m(Q),this.prependListener(V,g(this,V,Q)),this},f.prototype.removeListener=function(V,Q){var ne,ae,ee,le,c;if(m(Q),ae=this._events,ae===void 0)return this;if(ne=ae[V],ne===void 0)return this;if(ne===Q||ne.listener===Q)--this._eventsCount===0?this._events=Object.create(null):(delete ae[V],ae.removeListener&&this.emit("removeListener",V,ne.listener||Q));else if(typeof ne!="function"){for(ee=-1,le=ne.length-1;le>=0;le--)if(ne[le]===Q||ne[le].listener===Q){c=ne[le].listener,ee=le;break}if(ee<0)return this;ee===0?ne.shift():A(ne,ee),ne.length===1&&(ae[V]=ne[0]),ae.removeListener!==void 0&&this.emit("removeListener",V,c||Q)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(V){var Q,ne,ae;if(ne=this._events,ne===void 0)return this;if(ne.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ne[V]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ne[V]),this;if(arguments.length===0){var ee=Object.keys(ne),le;for(ae=0;ae<ee.length;++ae)le=ee[ae],le!=="removeListener"&&this.removeAllListeners(le);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Q=ne[V],typeof Q=="function")this.removeListener(V,Q);else if(Q!==void 0)for(ae=Q.length-1;ae>=0;ae--)this.removeListener(V,Q[ae]);return this};function M(N,V,Q){var ne=N._events;if(ne===void 0)return[];var ae=ne[V];return ae===void 0?[]:typeof ae=="function"?Q?[ae.listener||ae]:[ae]:Q?D(ae):B(ae,ae.length)}f.prototype.listeners=function(V){return M(this,V,!0)},f.prototype.rawListeners=function(V){return M(this,V,!1)},f.listenerCount=function(N,V){return typeof N.listenerCount=="function"?N.listenerCount(V):x.call(N,V)},f.prototype.listenerCount=x;function x(N){var V=this._events;if(V!==void 0){var Q=V[N];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function B(N,V){for(var Q=new Array(V),ne=0;ne<V;++ne)Q[ne]=N[ne];return Q}function A(N,V){for(;V+1<N.length;V++)N[V]=N[V+1];N.pop()}function D(N){for(var V=new Array(N.length),Q=0;Q<V.length;++Q)V[Q]=N[Q].listener||N[Q];return V}function C(N,V){return new Promise(function(Q,ne){function ae(le){N.removeListener(V,ee),ne(le)}function ee(){typeof N.removeListener=="function"&&N.removeListener("error",ae),Q([].slice.call(arguments))}H(N,V,ee,{once:!0}),V!=="error"&&$(N,ae,{once:!0})})}function $(N,V,Q){typeof N.on=="function"&&H(N,"error",V,Q)}function H(N,V,Q,ne){if(typeof N.on=="function")ne.once?N.once(V,Q):N.on(V,Q);else if(typeof N.addEventListener=="function")N.addEventListener(V,function ae(ee){ne.once&&N.removeEventListener(V,ae),Q(ee)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof N)}return events.exports}var streamBrowser$2,hasRequiredStreamBrowser$2;function requireStreamBrowser$2(){return hasRequiredStreamBrowser$2||(hasRequiredStreamBrowser$2=1,streamBrowser$2=requireEvents().EventEmitter),streamBrowser$2}var util$1={},types={},shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var S={},I=Symbol("test"),p=Object(I);if(typeof I=="string"||Object.prototype.toString.call(I)!=="[object Symbol]"||Object.prototype.toString.call(p)!=="[object Symbol]")return!1;var R=42;S[I]=R;for(var f in S)return!1;if(typeof Object.keys=="function"&&Object.keys(S).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(S).length!==0)return!1;var w=Object.getOwnPropertySymbols(S);if(w.length!==1||w[0]!==I||!Object.prototype.propertyIsEnumerable.call(S,I))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(S,I);if(m.value!==R||m.enumerable!==!0)return!1}return!0}),shams$1}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var _=requireShams$1();return shams=function(){return _()&&!!Symbol.toStringTag},shams}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(S){return S!==S}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var _=require_isNaN();return sign$1=function(I){return _(I)||I===0?I:I<0?-1:1},sign$1}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var _=requireGOPD();if(_)try{_([],"length")}catch{_=null}return gopd=_,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var _=Object.defineProperty||!1;if(_)try{_({},"a",{value:1})}catch{_=!1}return esDefineProperty=_,esDefineProperty}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var _=typeof Symbol<"u"&&Symbol,S=requireShams$1();return hasSymbols=function(){return typeof _!="function"||typeof Symbol!="function"||typeof _("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:S()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var _=requireEsObjectAtoms();return Object_getPrototypeOf=_.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var _="Function.prototype.bind called on incompatible ",S=Object.prototype.toString,I=Math.max,p="[object Function]",R=function(v,y){for(var d=[],g=0;g<v.length;g+=1)d[g]=v[g];for(var M=0;M<y.length;M+=1)d[M+v.length]=y[M];return d},f=function(v,y){for(var d=[],g=y,M=0;g<v.length;g+=1,M+=1)d[M]=v[g];return d},w=function(m,v){for(var y="",d=0;d<m.length;d+=1)y+=m[d],d+1<m.length&&(y+=v);return y};return implementation=function(v){var y=this;if(typeof y!="function"||S.apply(y)!==p)throw new TypeError(_+y);for(var d=f(arguments,1),g,M=function(){if(this instanceof g){var C=y.apply(this,R(d,arguments));return Object(C)===C?C:this}return y.apply(v,R(d,arguments))},x=I(0,y.length-d.length),B=[],A=0;A<x;A++)B[A]="$"+A;if(g=Function("binder","return function ("+w(B,",")+"){ return binder.apply(this,arguments); }")(M),y.prototype){var D=function(){};D.prototype=y.prototype,g.prototype=new D,D.prototype=null}return g},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var _=requireImplementation();return functionBind=Function.prototype.bind||_,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var _=requireFunctionBind(),S=requireFunctionApply(),I=requireFunctionCall(),p=requireReflectApply();return actualApply=p||_.call(I,S),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var _=requireFunctionBind(),S=requireType(),I=requireFunctionCall(),p=requireActualApply();return callBindApplyHelpers=function(f){if(f.length<1||typeof f[0]!="function")throw new S("a function is required");return p(_,I,f)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var _=requireCallBindApplyHelpers(),S=requireGopd(),I;try{I=[].__proto__===Array.prototype}catch(w){if(!w||typeof w!="object"||!("code"in w)||w.code!=="ERR_PROTO_ACCESS")throw w}var p=!!I&&S&&S(Object.prototype,"__proto__"),R=Object,f=R.getPrototypeOf;return get=p&&typeof p.get=="function"?_([p.get]):typeof f=="function"?function(m){return f(m==null?m:R(m))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var _=requireReflect_getPrototypeOf(),S=requireObject_getPrototypeOf(),I=requireGet();return getProto=_?function(R){return _(R)}:S?function(R){if(!R||typeof R!="object"&&typeof R!="function")throw new TypeError("getProto: not an object");return S(R)}:I?function(R){return I(R)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var _=Function.prototype.call,S=Object.prototype.hasOwnProperty,I=requireFunctionBind();return hasown=I.call(_,S),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var _,S=requireEsObjectAtoms(),I=requireEsErrors(),p=require_eval(),R=requireRange(),f=requireRef(),w=requireSyntax(),m=requireType(),v=requireUri(),y=requireAbs(),d=requireFloor(),g=requireMax(),M=requireMin(),x=requirePow(),B=requireRound(),A=requireSign$1(),D=Function,C=function(W){try{return D('"use strict"; return ('+W+").constructor;")()}catch{}},$=requireGopd(),H=requireEsDefineProperty(),N=function(){throw new m},V=$?(function(){try{return arguments.callee,N}catch{try{return $(arguments,"callee").get}catch{return N}}})():N,Q=requireHasSymbols()(),ne=requireGetProto(),ae=requireObject_getPrototypeOf(),ee=requireReflect_getPrototypeOf(),le=requireFunctionApply(),c=requireFunctionCall(),e={},t=typeof Uint8Array>"u"||!ne?_:ne(Uint8Array),n={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_:ArrayBuffer,"%ArrayIteratorPrototype%":Q&&ne?ne([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":e,"%AsyncGenerator%":e,"%AsyncGeneratorFunction%":e,"%AsyncIteratorPrototype%":e,"%Atomics%":typeof Atomics>"u"?_:Atomics,"%BigInt%":typeof BigInt>"u"?_:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?_:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":I,"%eval%":eval,"%EvalError%":p,"%Float16Array%":typeof Float16Array>"u"?_:Float16Array,"%Float32Array%":typeof Float32Array>"u"?_:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_:FinalizationRegistry,"%Function%":D,"%GeneratorFunction%":e,"%Int8Array%":typeof Int8Array>"u"?_:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Q&&ne?ne(ne([][Symbol.iterator]())):_,"%JSON%":typeof JSON=="object"?JSON:_,"%Map%":typeof Map>"u"?_:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Q||!ne?_:ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":S,"%Object.getOwnPropertyDescriptor%":$,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_:Promise,"%Proxy%":typeof Proxy>"u"?_:Proxy,"%RangeError%":R,"%ReferenceError%":f,"%Reflect%":typeof Reflect>"u"?_:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Q||!ne?_:ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Q&&ne?ne(""[Symbol.iterator]()):_,"%Symbol%":Q?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":V,"%TypedArray%":t,"%TypeError%":m,"%Uint8Array%":typeof Uint8Array>"u"?_:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_:Uint32Array,"%URIError%":v,"%WeakMap%":typeof WeakMap>"u"?_:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_:WeakSet,"%Function.prototype.call%":c,"%Function.prototype.apply%":le,"%Object.defineProperty%":H,"%Object.getPrototypeOf%":ae,"%Math.abs%":y,"%Math.floor%":d,"%Math.max%":g,"%Math.min%":M,"%Math.pow%":x,"%Math.round%":B,"%Math.sign%":A,"%Reflect.getPrototypeOf%":ee};if(ne)try{null.error}catch(W){var a=ne(ne(W));n["%Error.prototype%"]=a}var s=function W(J){var X;if(J==="%AsyncFunction%")X=C("async function () {}");else if(J==="%GeneratorFunction%")X=C("function* () {}");else if(J==="%AsyncGeneratorFunction%")X=C("async function* () {}");else if(J==="%AsyncGenerator%"){var U=W("%AsyncGeneratorFunction%");U&&(X=U.prototype)}else if(J==="%AsyncIteratorPrototype%"){var re=W("%AsyncGenerator%");re&&ne&&(X=ne(re.prototype))}return n[J]=X,X},u={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},l=requireFunctionBind(),o=requireHasown(),r=l.call(c,Array.prototype.concat),h=l.call(le,Array.prototype.splice),b=l.call(c,String.prototype.replace),E=l.call(c,String.prototype.slice),L=l.call(c,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,q=function(J){var X=E(J,0,1),U=E(J,-1);if(X==="%"&&U!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(U==="%"&&X!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var re=[];return b(J,Y,function(Ie,ue,he,$e){re[re.length]=he?b($e,K,"$1"):ue||Ie}),re},P=function(J,X){var U=J,re;if(o(u,U)&&(re=u[U],U="%"+re[0]+"%"),o(n,U)){var Ie=n[U];if(Ie===e&&(Ie=s(U)),typeof Ie>"u"&&!X)throw new m("intrinsic "+J+" exists, but is not available. Please file an issue!");return{alias:re,name:U,value:Ie}}throw new w("intrinsic "+J+" does not exist!")};return getIntrinsic=function(J,X){if(typeof J!="string"||J.length===0)throw new m("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!="boolean")throw new m('"allowMissing" argument must be a boolean');if(L(/^%?[^%]*%?$/,J)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var U=q(J),re=U.length>0?U[0]:"",Ie=P("%"+re+"%",X),ue=Ie.name,he=Ie.value,$e=!1,me=Ie.alias;me&&(re=me[0],h(U,r([0,1],me)));for(var se=1,De=!0;se<U.length;se+=1){var de=U[se],ye=E(de,0,1),Ce=E(de,-1);if((ye==='"'||ye==="'"||ye==="`"||Ce==='"'||Ce==="'"||Ce==="`")&&ye!==Ce)throw new w("property names with quotes must have matching quotes");if((de==="constructor"||!De)&&($e=!0),re+="."+de,ue="%"+re+"%",o(n,ue))he=n[ue];else if(he!=null){if(!(de in he)){if(!X)throw new m("base intrinsic for "+J+" exists, but the property is not available.");return}if($&&se+1>=U.length){var pe=$(he,de);De=!!pe,De&&"get"in pe&&!("originalValue"in pe.get)?he=pe.get:he=he[de]}else De=o(he,de),he=he[de];De&&!$e&&(n[ue]=he)}}return he},getIntrinsic}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var _=requireGetIntrinsic(),S=requireCallBindApplyHelpers(),I=S([_("%String.prototype.indexOf%")]);return callBound=function(R,f){var w=_(R,!!f);return typeof w=="function"&&I(R,".prototype.")>-1?S([w]):w},callBound}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var _=requireShams()(),S=requireCallBound(),I=S("Object.prototype.toString"),p=function(m){return _&&m&&typeof m=="object"&&Symbol.toStringTag in m?!1:I(m)==="[object Arguments]"},R=function(m){return p(m)?!0:m!==null&&typeof m=="object"&&"length"in m&&typeof m.length=="number"&&m.length>=0&&I(m)!=="[object Array]"&&"callee"in m&&I(m.callee)==="[object Function]"},f=(function(){return p(arguments)})();return p.isLegacyArguments=R,isArguments=f?p:R,isArguments}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var _=requireCallBound(),S=requireShams()(),I=requireHasown(),p=requireGopd(),R;if(S){var f=_("RegExp.prototype.exec"),w={},m=function(){throw w},v={toString:m,valueOf:m};typeof Symbol.toPrimitive=="symbol"&&(v[Symbol.toPrimitive]=m),R=function(M){if(!M||typeof M!="object")return!1;var x=p(M,"lastIndex"),B=x&&I(x,"value");if(!B)return!1;try{f(M,v)}catch(A){return A===w}}}else{var y=_("Object.prototype.toString"),d="[object RegExp]";R=function(M){return!M||typeof M!="object"&&typeof M!="function"?!1:y(M)===d}}return isRegex=R,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var _=requireCallBound(),S=requireIsRegex(),I=_("RegExp.prototype.exec"),p=requireType();return safeRegexTest=function(f){if(!S(f))throw new p("`regex` must be a RegExp");return function(m){return I(f,m)!==null}},safeRegexTest}var generatorFunction,hasRequiredGeneratorFunction;function requireGeneratorFunction(){if(hasRequiredGeneratorFunction)return generatorFunction;hasRequiredGeneratorFunction=1;const _=(function*(){}).constructor;return generatorFunction=()=>_,generatorFunction}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var _=requireCallBound(),S=requireSafeRegexTest(),I=S(/^\s*(?:function)?\*/),p=requireShams()(),R=requireGetProto(),f=_("Object.prototype.toString"),w=_("Function.prototype.toString"),m=requireGeneratorFunction();return isGeneratorFunction=function(y){if(typeof y!="function")return!1;if(I(w(y)))return!0;if(!p){var d=f(y);return d==="[object GeneratorFunction]"}if(!R)return!1;var g=m();return g&&R(y)===g.prototype},isGeneratorFunction}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var _=Function.prototype.toString,S=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,I,p;if(typeof S=="function"&&typeof Object.defineProperty=="function")try{I=Object.defineProperty({},"length",{get:function(){throw p}}),p={},S(function(){throw 42},null,I)}catch($){$!==p&&(S=null)}else S=null;var R=/^\s*class\b/,f=function(H){try{var N=_.call(H);return R.test(N)}catch{return!1}},w=function(H){try{return f(H)?!1:(_.call(H),!0)}catch{return!1}},m=Object.prototype.toString,v="[object Object]",y="[object Function]",d="[object GeneratorFunction]",g="[object HTMLAllCollection]",M="[object HTML document.all class]",x="[object HTMLCollection]",B=typeof Symbol=="function"&&!!Symbol.toStringTag,A=!(0 in[,]),D=function(){return!1};if(typeof document=="object"){var C=document.all;m.call(C)===m.call(document.all)&&(D=function(H){if((A||!H)&&(typeof H>"u"||typeof H=="object"))try{var N=m.call(H);return(N===g||N===M||N===x||N===v)&&H("")==null}catch{}return!1})}return isCallable=S?function(H){if(D(H))return!0;if(!H||typeof H!="function"&&typeof H!="object")return!1;try{S(H,null,I)}catch(N){if(N!==p)return!1}return!f(H)&&w(H)}:function(H){if(D(H))return!0;if(!H||typeof H!="function"&&typeof H!="object")return!1;if(B)return w(H);if(f(H))return!1;var N=m.call(H);return N!==y&&N!==d&&!/^\[object HTML/.test(N)?!1:w(H)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var _=requireIsCallable(),S=Object.prototype.toString,I=Object.prototype.hasOwnProperty,p=function(v,y,d){for(var g=0,M=v.length;g<M;g++)I.call(v,g)&&(d==null?y(v[g],g,v):y.call(d,v[g],g,v))},R=function(v,y,d){for(var g=0,M=v.length;g<M;g++)d==null?y(v.charAt(g),g,v):y.call(d,v.charAt(g),g,v)},f=function(v,y,d){for(var g in v)I.call(v,g)&&(d==null?y(v[g],g,v):y.call(d,v[g],g,v))};function w(m){return S.call(m)==="[object Array]"}return forEach=function(v,y,d){if(!_(y))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=d),w(v)?p(v,y,g):typeof v=="string"?R(v,y,g):f(v,y,g)},forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var _=requirePossibleTypedArrayNames(),S=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var p=[],R=0;R<_.length;R++)typeof S[_[R]]=="function"&&(p[p.length]=_[R]);return p},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var _=requireEsDefineProperty(),S=requireSyntax(),I=requireType(),p=requireGopd();return defineDataProperty=function(f,w,m){if(!f||typeof f!="object"&&typeof f!="function")throw new I("`obj` must be an object or a function`");if(typeof w!="string"&&typeof w!="symbol")throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new I("`loose`, if provided, must be a boolean");var v=arguments.length>3?arguments[3]:null,y=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,M=!!p&&p(f,w);if(_)_(f,w,{configurable:d===null&&M?M.configurable:!d,enumerable:v===null&&M?M.enumerable:!v,value:m,writable:y===null&&M?M.writable:!y});else if(g||!v&&!y&&!d)f[w]=m;else throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var _=requireEsDefineProperty(),S=function(){return!!_};return S.hasArrayLengthDefineBug=function(){if(!_)return null;try{return _([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=S,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var _=requireGetIntrinsic(),S=requireDefineDataProperty(),I=requireHasPropertyDescriptors()(),p=requireGopd(),R=requireType(),f=_("%Math.floor%");return setFunctionLength=function(m,v){if(typeof m!="function")throw new R("`fn` is not a function");if(typeof v!="number"||v<0||v>4294967295||f(v)!==v)throw new R("`length` must be a positive 32-bit integer");var y=arguments.length>2&&!!arguments[2],d=!0,g=!0;if("length"in m&&p){var M=p(m,"length");M&&!M.configurable&&(d=!1),M&&!M.writable&&(g=!1)}return(d||g||!y)&&(I?S(m,"length",v,!0,!0):S(m,"length",v)),m},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var _=requireFunctionBind(),S=requireFunctionApply(),I=requireActualApply();return applyBind=function(){return I(_,S,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,(function(_){var S=requireSetFunctionLength(),I=requireEsDefineProperty(),p=requireCallBindApplyHelpers(),R=requireApplyBind();_.exports=function(w){var m=p(arguments),v=w.length-(arguments.length-1);return S(m,1+(v>0?v:0),!0)},I?I(_.exports,"apply",{value:R}):_.exports.apply=R})(callBind)),callBind.exports}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var _=requireForEach(),S=requireAvailableTypedArrays(),I=requireCallBind(),p=requireCallBound(),R=requireGopd(),f=requireGetProto(),w=p("Object.prototype.toString"),m=requireShams()(),v=typeof globalThis>"u"?commonjsGlobal:globalThis,y=S(),d=p("String.prototype.slice"),g=p("Array.prototype.indexOf",!0)||function(D,C){for(var $=0;$<D.length;$+=1)if(D[$]===C)return $;return-1},M={__proto__:null};m&&R&&f?_(y,function(A){var D=new v[A];if(Symbol.toStringTag in D&&f){var C=f(D),$=R(C,Symbol.toStringTag);if(!$&&C){var H=f(C);$=R(H,Symbol.toStringTag)}if($&&$.get){var N=I($.get);M["$"+A]=N}}}):_(y,function(A){var D=new v[A],C=D.slice||D.set;if(C){var $=I(C);M["$"+A]=$}});var x=function(D){var C=!1;return _(M,function($,H){if(!C)try{"$"+$(D)===H&&(C=d(H,1))}catch{}}),C},B=function(D){var C=!1;return _(M,function($,H){if(!C)try{$(D),C=d(H,1)}catch{}}),C};return whichTypedArray=function(D){if(!D||typeof D!="object")return!1;if(!m){var C=d(w(D),8,-1);return g(y,C)>-1?C:C!=="Object"?!1:B(D)}return R?x(D):null},whichTypedArray}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var _=requireWhichTypedArray();return isTypedArray=function(I){return!!_(I)},isTypedArray}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,(function(_){var S=requireIsArguments(),I=requireIsGeneratorFunction(),p=requireWhichTypedArray(),R=requireIsTypedArray();function f(se){return se.call.bind(se)}var w=typeof BigInt<"u",m=typeof Symbol<"u",v=f(Object.prototype.toString),y=f(Number.prototype.valueOf),d=f(String.prototype.valueOf),g=f(Boolean.prototype.valueOf);if(w)var M=f(BigInt.prototype.valueOf);if(m)var x=f(Symbol.prototype.valueOf);function B(se,De){if(typeof se!="object")return!1;try{return De(se),!0}catch{return!1}}_.isArgumentsObject=S,_.isGeneratorFunction=I,_.isTypedArray=R;function A(se){return typeof Promise<"u"&&se instanceof Promise||se!==null&&typeof se=="object"&&typeof se.then=="function"&&typeof se.catch=="function"}_.isPromise=A;function D(se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(se):R(se)||E(se)}_.isArrayBufferView=D;function C(se){return p(se)==="Uint8Array"}_.isUint8Array=C;function $(se){return p(se)==="Uint8ClampedArray"}_.isUint8ClampedArray=$;function H(se){return p(se)==="Uint16Array"}_.isUint16Array=H;function N(se){return p(se)==="Uint32Array"}_.isUint32Array=N;function V(se){return p(se)==="Int8Array"}_.isInt8Array=V;function Q(se){return p(se)==="Int16Array"}_.isInt16Array=Q;function ne(se){return p(se)==="Int32Array"}_.isInt32Array=ne;function ae(se){return p(se)==="Float32Array"}_.isFloat32Array=ae;function ee(se){return p(se)==="Float64Array"}_.isFloat64Array=ee;function le(se){return p(se)==="BigInt64Array"}_.isBigInt64Array=le;function c(se){return p(se)==="BigUint64Array"}_.isBigUint64Array=c;function e(se){return v(se)==="[object Map]"}e.working=typeof Map<"u"&&e(new Map);function t(se){return typeof Map>"u"?!1:e.working?e(se):se instanceof Map}_.isMap=t;function n(se){return v(se)==="[object Set]"}n.working=typeof Set<"u"&&n(new Set);function a(se){return typeof Set>"u"?!1:n.working?n(se):se instanceof Set}_.isSet=a;function s(se){return v(se)==="[object WeakMap]"}s.working=typeof WeakMap<"u"&&s(new WeakMap);function u(se){return typeof WeakMap>"u"?!1:s.working?s(se):se instanceof WeakMap}_.isWeakMap=u;function l(se){return v(se)==="[object WeakSet]"}l.working=typeof WeakSet<"u"&&l(new WeakSet);function o(se){return l(se)}_.isWeakSet=o;function r(se){return v(se)==="[object ArrayBuffer]"}r.working=typeof ArrayBuffer<"u"&&r(new ArrayBuffer);function h(se){return typeof ArrayBuffer>"u"?!1:r.working?r(se):se instanceof ArrayBuffer}_.isArrayBuffer=h;function b(se){return v(se)==="[object DataView]"}b.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&b(new DataView(new ArrayBuffer(1),0,1));function E(se){return typeof DataView>"u"?!1:b.working?b(se):se instanceof DataView}_.isDataView=E;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Y(se){return v(se)==="[object SharedArrayBuffer]"}function K(se){return typeof L>"u"?!1:(typeof Y.working>"u"&&(Y.working=Y(new L)),Y.working?Y(se):se instanceof L)}_.isSharedArrayBuffer=K;function q(se){return v(se)==="[object AsyncFunction]"}_.isAsyncFunction=q;function P(se){return v(se)==="[object Map Iterator]"}_.isMapIterator=P;function W(se){return v(se)==="[object Set Iterator]"}_.isSetIterator=W;function J(se){return v(se)==="[object Generator]"}_.isGeneratorObject=J;function X(se){return v(se)==="[object WebAssembly.Module]"}_.isWebAssemblyCompiledModule=X;function U(se){return B(se,y)}_.isNumberObject=U;function re(se){return B(se,d)}_.isStringObject=re;function Ie(se){return B(se,g)}_.isBooleanObject=Ie;function ue(se){return w&&B(se,M)}_.isBigIntObject=ue;function he(se){return m&&B(se,x)}_.isSymbolObject=he;function $e(se){return U(se)||re(se)||Ie(se)||ue(se)||he(se)}_.isBoxedPrimitive=$e;function me(se){return typeof Uint8Array<"u"&&(h(se)||K(se))}_.isAnyArrayBuffer=me,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(se){Object.defineProperty(_,se,{enumerable:!1,value:function(){throw new Error(se+" is not supported in userland")}})})})(types)),types}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(S){return S&&typeof S=="object"&&typeof S.copy=="function"&&typeof S.fill=="function"&&typeof S.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,(function(_){var S=Object.getOwnPropertyDescriptors||function(E){for(var L=Object.keys(E),Y={},K=0;K<L.length;K++)Y[L[K]]=Object.getOwnPropertyDescriptor(E,L[K]);return Y},I=/%[sdj%]/g;_.format=function(b){if(!V(b)){for(var E=[],L=0;L<arguments.length;L++)E.push(w(arguments[L]));return E.join(" ")}for(var L=1,Y=arguments,K=Y.length,q=String(b).replace(I,function(W){if(W==="%%")return"%";if(L>=K)return W;switch(W){case"%s":return String(Y[L++]);case"%d":return Number(Y[L++]);case"%j":try{return JSON.stringify(Y[L++])}catch{return"[Circular]"}default:return W}}),P=Y[L];L<K;P=Y[++L])$(P)||!ee(P)?q+=" "+P:q+=" "+w(P);return q},_.deprecate=function(b,E){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return b;if(typeof process$1>"u")return function(){return _.deprecate(b,E).apply(this,arguments)};var L=!1;function Y(){if(!L){if(process$1.throwDeprecation)throw new Error(E);process$1.traceDeprecation?console.trace(E):console.error(E),L=!0}return b.apply(this,arguments)}return Y};var p={},R=/^$/;if(process$1.env.NODE_DEBUG){var f=process$1.env.NODE_DEBUG;f=f.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),R=new RegExp("^"+f+"$","i")}_.debuglog=function(b){if(b=b.toUpperCase(),!p[b])if(R.test(b)){var E=process$1.pid;p[b]=function(){var L=_.format.apply(_,arguments);console.error("%s %d: %s",b,E,L)}}else p[b]=function(){};return p[b]};function w(b,E){var L={seen:[],stylize:v};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),C(E)?L.showHidden=E:E&&_._extend(L,E),ne(L.showHidden)&&(L.showHidden=!1),ne(L.depth)&&(L.depth=2),ne(L.colors)&&(L.colors=!1),ne(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=m),d(L,b,L.depth)}_.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(b,E){var L=w.styles[E];return L?"\x1B["+w.colors[L][0]+"m"+b+"\x1B["+w.colors[L][1]+"m":b}function v(b,E){return b}function y(b){var E={};return b.forEach(function(L,Y){E[L]=!0}),E}function d(b,E,L){if(b.customInspect&&E&&e(E.inspect)&&E.inspect!==_.inspect&&!(E.constructor&&E.constructor.prototype===E)){var Y=E.inspect(L,b);return V(Y)||(Y=d(b,Y,L)),Y}var K=g(b,E);if(K)return K;var q=Object.keys(E),P=y(q);if(b.showHidden&&(q=Object.getOwnPropertyNames(E)),c(E)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return M(E);if(q.length===0){if(e(E)){var W=E.name?": "+E.name:"";return b.stylize("[Function"+W+"]","special")}if(ae(E))return b.stylize(RegExp.prototype.toString.call(E),"regexp");if(le(E))return b.stylize(Date.prototype.toString.call(E),"date");if(c(E))return M(E)}var J="",X=!1,U=["{","}"];if(D(E)&&(X=!0,U=["[","]"]),e(E)){var re=E.name?": "+E.name:"";J=" [Function"+re+"]"}if(ae(E)&&(J=" "+RegExp.prototype.toString.call(E)),le(E)&&(J=" "+Date.prototype.toUTCString.call(E)),c(E)&&(J=" "+M(E)),q.length===0&&(!X||E.length==0))return U[0]+J+U[1];if(L<0)return ae(E)?b.stylize(RegExp.prototype.toString.call(E),"regexp"):b.stylize("[Object]","special");b.seen.push(E);var Ie;return X?Ie=x(b,E,L,P,q):Ie=q.map(function(ue){return B(b,E,L,P,ue,X)}),b.seen.pop(),A(Ie,J,U)}function g(b,E){if(ne(E))return b.stylize("undefined","undefined");if(V(E)){var L="'"+JSON.stringify(E).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return b.stylize(L,"string")}if(N(E))return b.stylize(""+E,"number");if(C(E))return b.stylize(""+E,"boolean");if($(E))return b.stylize("null","null")}function M(b){return"["+Error.prototype.toString.call(b)+"]"}function x(b,E,L,Y,K){for(var q=[],P=0,W=E.length;P<W;++P)l(E,String(P))?q.push(B(b,E,L,Y,String(P),!0)):q.push("");return K.forEach(function(J){J.match(/^\d+$/)||q.push(B(b,E,L,Y,J,!0))}),q}function B(b,E,L,Y,K,q){var P,W,J;if(J=Object.getOwnPropertyDescriptor(E,K)||{value:E[K]},J.get?J.set?W=b.stylize("[Getter/Setter]","special"):W=b.stylize("[Getter]","special"):J.set&&(W=b.stylize("[Setter]","special")),l(Y,K)||(P="["+K+"]"),W||(b.seen.indexOf(J.value)<0?($(L)?W=d(b,J.value,null):W=d(b,J.value,L-1),W.indexOf(`
|
|
3
|
+
`)>-1&&(q?W=W.split(`
|
|
4
|
+
`).map(function(X){return" "+X}).join(`
|
|
5
5
|
`).slice(2):W=`
|
|
6
6
|
`+W.split(`
|
|
7
|
-
`).map(function(
|
|
8
|
-
`))):W=
|
|
9
|
-
`)>=0,K+
|
|
10
|
-
`)+" "+
|
|
11
|
-
`)+" "+N[1]:N[0]+T+" "+M.join(", ")+" "+N[1]}b.types=requireTypes();function $(M){return Array.isArray(M)}b.isArray=$;function k(M){return typeof M=="boolean"}b.isBoolean=k;function I(M){return M===null}b.isNull=I;function L(M){return M==null}b.isNullOrUndefined=L;function D(M){return typeof M=="number"}b.isNumber=D;function G(M){return typeof M=="string"}b.isString=G;function X(M){return typeof M=="symbol"}b.isSymbol=X;function te(M){return M===void 0}b.isUndefined=te;function ie(M){return ee(M)&&n(M)==="[object RegExp]"}b.isRegExp=ie,b.types.isRegExp=ie;function ee(M){return typeof M=="object"&&M!==null}b.isObject=ee;function ue(M){return ee(M)&&n(M)==="[object Date]"}b.isDate=ue,b.types.isDate=ue;function c(M){return ee(M)&&(n(M)==="[object Error]"||M instanceof Error)}b.isError=c,b.types.isNativeError=c;function e(M){return typeof M=="function"}b.isFunction=e;function t(M){return M===null||typeof M=="boolean"||typeof M=="number"||typeof M=="string"||typeof M=="symbol"||typeof M>"u"}b.isPrimitive=t,b.isBuffer=requireIsBufferBrowser();function n(M){return Object.prototype.toString.call(M)}function f(M){return M<10?"0"+M.toString(10):M.toString(10)}var s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u(){var M=new Date,T=[f(M.getHours()),f(M.getMinutes()),f(M.getSeconds())].join(":");return[M.getDate(),s[M.getMonth()],T].join(" ")}b.log=function(){console.log("%s - %s",u(),b.format.apply(b,arguments))},b.inherits=requireInherits_browser$8(),b._extend=function(M,T){if(!T||!ee(T))return M;for(var N=Object.keys(T),Q=N.length;Q--;)M[N[Q]]=T[N[Q]];return M};function l(M,T){return Object.prototype.hasOwnProperty.call(M,T)}var o=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;b.promisify=function(T){if(typeof T!="function")throw new TypeError('The "original" argument must be of type Function');if(o&&T[o]){var N=T[o];if(typeof N!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(N,o,{value:N,enumerable:!1,writable:!1,configurable:!0}),N}function N(){for(var Q,K,A=new Promise(function(Y,Z){Q=Y,K=Z}),O=[],W=0;W<arguments.length;W++)O.push(arguments[W]);O.push(function(Y,Z){Y?K(Y):Q(Z)});try{T.apply(this,O)}catch(Y){K(Y)}return A}return Object.setPrototypeOf(N,Object.getPrototypeOf(T)),o&&Object.defineProperty(N,o,{value:N,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(N,_(T))},b.promisify.custom=o;function r(M,T){if(!M){var N=new Error("Promise was rejected with a falsy value");N.reason=M,M=N}return T(M)}function h(M){if(typeof M!="function")throw new TypeError('The "original" argument must be of type Function');function T(){for(var N=[],Q=0;Q<arguments.length;Q++)N.push(arguments[Q]);var K=N.pop();if(typeof K!="function")throw new TypeError("The last argument must be of type Function");var A=this,O=function(){return K.apply(A,arguments)};M.apply(this,N).then(function(W){process$1.nextTick(O.bind(null,null,W))},function(W){process$1.nextTick(r.bind(null,W,O))})}return Object.setPrototypeOf(T,Object.getPrototypeOf(M)),Object.defineProperties(T,_(M)),T}b.callbackify=h})(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function b(q,B){var $=Object.keys(q);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(q);B&&(k=k.filter(function(I){return Object.getOwnPropertyDescriptor(q,I).enumerable})),$.push.apply($,k)}return $}function _(q){for(var B=1;B<arguments.length;B++){var $=arguments[B]!=null?arguments[B]:{};B%2?b(Object($),!0).forEach(function(k){S(q,k,$[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(q,Object.getOwnPropertyDescriptors($)):b(Object($)).forEach(function(k){Object.defineProperty(q,k,Object.getOwnPropertyDescriptor($,k))})}return q}function S(q,B,$){return B=w(B),B in q?Object.defineProperty(q,B,{value:$,enumerable:!0,configurable:!0,writable:!0}):q[B]=$,q}function p(q,B){if(!(q instanceof B))throw new TypeError("Cannot call a class as a function")}function E(q,B){for(var $=0;$<B.length;$++){var k=B[$];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(q,w(k.key),k)}}function a(q,B,$){return B&&E(q.prototype,B),Object.defineProperty(q,"prototype",{writable:!1}),q}function w(q){var B=v(q,"string");return typeof B=="symbol"?B:String(B)}function v(q,B){if(typeof q!="object"||q===null)return q;var $=q[Symbol.toPrimitive];if($!==void 0){var k=$.call(q,B);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)}var y=requireDist(),m=y.Buffer,d=requireUtil$1(),g=d.inspect,x=g&&g.custom||"inspect";function R(q,B,$){m.prototype.copy.call(q,B,$)}return buffer_list=(function(){function q(){p(this,q),this.head=null,this.tail=null,this.length=0}return a(q,[{key:"push",value:function($){var k={data:$,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function($){var k={data:$,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var $=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,$}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function($){if(this.length===0)return"";for(var k=this.head,I=""+k.data;k=k.next;)I+=$+k.data;return I}},{key:"concat",value:function($){if(this.length===0)return m.alloc(0);for(var k=m.allocUnsafe($>>>0),I=this.head,L=0;I;)R(I.data,k,L),L+=I.data.length,I=I.next;return k}},{key:"consume",value:function($,k){var I;return $<this.head.data.length?(I=this.head.data.slice(0,$),this.head.data=this.head.data.slice($)):$===this.head.data.length?I=this.shift():I=k?this._getString($):this._getBuffer($),I}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function($){var k=this.head,I=1,L=k.data;for($-=L.length;k=k.next;){var D=k.data,G=$>D.length?D.length:$;if(G===D.length?L+=D:L+=D.slice(0,$),$-=G,$===0){G===D.length?(++I,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=D.slice(G));break}++I}return this.length-=I,L}},{key:"_getBuffer",value:function($){var k=m.allocUnsafe($),I=this.head,L=1;for(I.data.copy(k),$-=I.data.length;I=I.next;){var D=I.data,G=$>D.length?D.length:$;if(D.copy(k,k.length-$,0,G),$-=G,$===0){G===D.length?(++L,I.next?this.head=I.next:this.head=this.tail=null):(this.head=I,I.data=D.slice(G));break}++L}return this.length-=L,k}},{key:x,value:function($,k){return g(this,_(_({},k),{},{depth:0,customInspect:!1}))}}]),q})(),buffer_list}var destroy_1$2,hasRequiredDestroy$2;function requireDestroy$2(){if(hasRequiredDestroy$2)return destroy_1$2;hasRequiredDestroy$2=1;function b(w,v){var y=this,m=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return m||d?(v?v(w):w&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(E,this,w)):process$1.nextTick(E,this,w)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(w||null,function(g){!v&&g?y._writableState?y._writableState.errorEmitted?process$1.nextTick(S,y):(y._writableState.errorEmitted=!0,process$1.nextTick(_,y,g)):process$1.nextTick(_,y,g):v?(process$1.nextTick(S,y),v(g)):process$1.nextTick(S,y)}),this)}function _(w,v){E(w,v),S(w)}function S(w){w._writableState&&!w._writableState.emitClose||w._readableState&&!w._readableState.emitClose||w.emit("close")}function p(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function E(w,v){w.emit("error",v)}function a(w,v){var y=w._readableState,m=w._writableState;y&&y.autoDestroy||m&&m.autoDestroy?w.destroy(v):w.emit("error",v)}return destroy_1$2={destroy:b,undestroy:p,errorOrDestroy:a},destroy_1$2}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function b(v,y){v.prototype=Object.create(y.prototype),v.prototype.constructor=v,v.__proto__=y}var _={};function S(v,y,m){m||(m=Error);function d(x,R,q){return typeof y=="string"?y:y(x,R,q)}var g=(function(x){b(R,x);function R(q,B,$){return x.call(this,d(q,B,$))||this}return R})(m);g.prototype.name=m.name,g.prototype.code=v,_[v]=g}function p(v,y){if(Array.isArray(v)){var m=v.length;return v=v.map(function(d){return String(d)}),m>2?"one of ".concat(y," ").concat(v.slice(0,m-1).join(", "),", or ")+v[m-1]:m===2?"one of ".concat(y," ").concat(v[0]," or ").concat(v[1]):"of ".concat(y," ").concat(v[0])}else return"of ".concat(y," ").concat(String(v))}function E(v,y,m){return v.substr(0,y.length)===y}function a(v,y,m){return(m===void 0||m>v.length)&&(m=v.length),v.substring(m-y.length,m)===y}function w(v,y,m){return typeof m!="number"&&(m=0),m+y.length>v.length?!1:v.indexOf(y,m)!==-1}return S("ERR_INVALID_OPT_VALUE",function(v,y){return'The value "'+y+'" is invalid for option "'+v+'"'},TypeError),S("ERR_INVALID_ARG_TYPE",function(v,y,m){var d;typeof y=="string"&&E(y,"not ")?(d="must not be",y=y.replace(/^not /,"")):d="must be";var g;if(a(v," argument"))g="The ".concat(v," ").concat(d," ").concat(p(y,"type"));else{var x=w(v,".")?"property":"argument";g='The "'.concat(v,'" ').concat(x," ").concat(d," ").concat(p(y,"type"))}return g+=". Received type ".concat(typeof m),g},TypeError),S("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),S("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),S("ERR_STREAM_PREMATURE_CLOSE","Premature close"),S("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),S("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),S("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),S("ERR_STREAM_WRITE_AFTER_END","write after end"),S("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),S("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),S("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=_,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var b=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function _(p,E,a){return p.highWaterMark!=null?p.highWaterMark:E?p[a]:null}function S(p,E,a,w){var v=_(E,w,a);if(v!=null){if(!(isFinite(v)&&Math.floor(v)===v)||v<0){var y=w?a:"highWaterMark";throw new b(y,v)}return Math.floor(v)}return p.objectMode?16:16*1024}return state={getHighWaterMark:S},state}var browser$b,hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b;hasRequiredBrowser$b=1,browser$b=b;function b(S,p){if(_("noDeprecation"))return S;var E=!1;function a(){if(!E){if(_("throwDeprecation"))throw new Error(p);_("traceDeprecation")?console.trace(p):console.warn(p),E=!0}return S.apply(this,arguments)}return a}function _(S){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var p=commonjsGlobal.localStorage[S];return p==null?!1:String(p).toLowerCase()==="true"}return browser$b}var _stream_writable$2,hasRequired_stream_writable$2;function require_stream_writable$2(){if(hasRequired_stream_writable$2)return _stream_writable$2;hasRequired_stream_writable$2=1,_stream_writable$2=ie;function b(K){var A=this;this.next=null,this.entry=null,this.finish=function(){Q(A,K)}}var _;ie.WritableState=X;var S={deprecate:requireBrowser$b()},p=requireStreamBrowser$2(),E=requireDist().Buffer,a=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function w(K){return E.from(K)}function v(K){return E.isBuffer(K)||K instanceof a}var y=requireDestroy$2(),m=requireState(),d=m.getHighWaterMark,g=requireErrorsBrowser().codes,x=g.ERR_INVALID_ARG_TYPE,R=g.ERR_METHOD_NOT_IMPLEMENTED,q=g.ERR_MULTIPLE_CALLBACK,B=g.ERR_STREAM_CANNOT_PIPE,$=g.ERR_STREAM_DESTROYED,k=g.ERR_STREAM_NULL_VALUES,I=g.ERR_STREAM_WRITE_AFTER_END,L=g.ERR_UNKNOWN_ENCODING,D=y.errorOrDestroy;requireInherits_browser$8()(ie,p);function G(){}function X(K,A,O){_=_||require_stream_duplex$2(),K=K||{},typeof O!="boolean"&&(O=A instanceof _),this.objectMode=!!K.objectMode,O&&(this.objectMode=this.objectMode||!!K.writableObjectMode),this.highWaterMark=d(this,K,"writableHighWaterMark",O),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W=K.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=K.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){s(A,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=K.emitClose!==!1,this.autoDestroy=!!K.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new b(this)}X.prototype.getBuffer=function(){for(var A=this.bufferedRequest,O=[];A;)O.push(A),A=A.next;return O},(function(){try{Object.defineProperty(X.prototype,"buffer",{get:S.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var te;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(te=Function.prototype[Symbol.hasInstance],Object.defineProperty(ie,Symbol.hasInstance,{value:function(A){return te.call(this,A)?!0:this!==ie?!1:A&&A._writableState instanceof X}})):te=function(A){return A instanceof this};function ie(K){_=_||require_stream_duplex$2();var A=this instanceof _;if(!A&&!te.call(ie,this))return new ie(K);this._writableState=new X(K,this,A),this.writable=!0,K&&(typeof K.write=="function"&&(this._write=K.write),typeof K.writev=="function"&&(this._writev=K.writev),typeof K.destroy=="function"&&(this._destroy=K.destroy),typeof K.final=="function"&&(this._final=K.final)),p.call(this)}ie.prototype.pipe=function(){D(this,new B)};function ee(K,A){var O=new I;D(K,O),process$1.nextTick(A,O)}function ue(K,A,O,W){var Y;return O===null?Y=new k:typeof O!="string"&&!A.objectMode&&(Y=new x("chunk",["string","Buffer"],O)),Y?(D(K,Y),process$1.nextTick(W,Y),!1):!0}ie.prototype.write=function(K,A,O){var W=this._writableState,Y=!1,Z=!W.objectMode&&v(K);return Z&&!E.isBuffer(K)&&(K=w(K)),typeof A=="function"&&(O=A,A=null),Z?A="buffer":A||(A=W.defaultEncoding),typeof O!="function"&&(O=G),W.ending?ee(this,O):(Z||ue(this,W,K,O))&&(W.pendingcb++,Y=e(this,W,Z,K,A,O)),Y},ie.prototype.cork=function(){this._writableState.corked++},ie.prototype.uncork=function(){var K=this._writableState;K.corked&&(K.corked--,!K.writing&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&o(this,K))},ie.prototype.setDefaultEncoding=function(A){if(typeof A=="string"&&(A=A.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((A+"").toLowerCase())>-1))throw new L(A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(ie.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c(K,A,O){return!K.objectMode&&K.decodeStrings!==!1&&typeof A=="string"&&(A=E.from(A,O)),A}Object.defineProperty(ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function e(K,A,O,W,Y,Z){if(!O){var j=c(A,W,Y);W!==j&&(O=!0,Y="buffer",W=j)}var ne=A.objectMode?1:W.length;A.length+=ne;var Re=A.length<A.highWaterMark;if(Re||(A.needDrain=!0),A.writing||A.corked){var le=A.lastBufferedRequest;A.lastBufferedRequest={chunk:W,encoding:Y,isBuf:O,callback:Z,next:null},le?le.next=A.lastBufferedRequest:A.bufferedRequest=A.lastBufferedRequest,A.bufferedRequestCount+=1}else t(K,A,!1,ne,W,Y,Z);return Re}function t(K,A,O,W,Y,Z,j){A.writelen=W,A.writecb=j,A.writing=!0,A.sync=!0,A.destroyed?A.onwrite(new $("write")):O?K._writev(Y,A.onwrite):K._write(Y,Z,A.onwrite),A.sync=!1}function n(K,A,O,W,Y){--A.pendingcb,O?(process$1.nextTick(Y,W),process$1.nextTick(T,K,A),K._writableState.errorEmitted=!0,D(K,W)):(Y(W),K._writableState.errorEmitted=!0,D(K,W),T(K,A))}function f(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}function s(K,A){var O=K._writableState,W=O.sync,Y=O.writecb;if(typeof Y!="function")throw new q;if(f(O),A)n(K,O,W,A,Y);else{var Z=r(O)||K.destroyed;!Z&&!O.corked&&!O.bufferProcessing&&O.bufferedRequest&&o(K,O),W?process$1.nextTick(u,K,O,Z,Y):u(K,O,Z,Y)}}function u(K,A,O,W){O||l(K,A),A.pendingcb--,W(),T(K,A)}function l(K,A){A.length===0&&A.needDrain&&(A.needDrain=!1,K.emit("drain"))}function o(K,A){A.bufferProcessing=!0;var O=A.bufferedRequest;if(K._writev&&O&&O.next){var W=A.bufferedRequestCount,Y=new Array(W),Z=A.corkedRequestsFree;Z.entry=O;for(var j=0,ne=!0;O;)Y[j]=O,O.isBuf||(ne=!1),O=O.next,j+=1;Y.allBuffers=ne,t(K,A,!0,A.length,Y,"",Z.finish),A.pendingcb++,A.lastBufferedRequest=null,Z.next?(A.corkedRequestsFree=Z.next,Z.next=null):A.corkedRequestsFree=new b(A),A.bufferedRequestCount=0}else{for(;O;){var Re=O.chunk,le=O.encoding,de=O.callback,Pe=A.objectMode?1:Re.length;if(t(K,A,!1,Pe,Re,le,de),O=O.next,A.bufferedRequestCount--,A.writing)break}O===null&&(A.lastBufferedRequest=null)}A.bufferedRequest=O,A.bufferProcessing=!1}ie.prototype._write=function(K,A,O){O(new R("_write()"))},ie.prototype._writev=null,ie.prototype.end=function(K,A,O){var W=this._writableState;return typeof K=="function"?(O=K,K=null,A=null):typeof A=="function"&&(O=A,A=null),K!=null&&this.write(K,A),W.corked&&(W.corked=1,this.uncork()),W.ending||N(this,W,O),this},Object.defineProperty(ie.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function r(K){return K.ending&&K.length===0&&K.bufferedRequest===null&&!K.finished&&!K.writing}function h(K,A){K._final(function(O){A.pendingcb--,O&&D(K,O),A.prefinished=!0,K.emit("prefinish"),T(K,A)})}function M(K,A){!A.prefinished&&!A.finalCalled&&(typeof K._final=="function"&&!A.destroyed?(A.pendingcb++,A.finalCalled=!0,process$1.nextTick(h,K,A)):(A.prefinished=!0,K.emit("prefinish")))}function T(K,A){var O=r(A);if(O&&(M(K,A),A.pendingcb===0&&(A.finished=!0,K.emit("finish"),A.autoDestroy))){var W=K._readableState;(!W||W.autoDestroy&&W.endEmitted)&&K.destroy()}return O}function N(K,A,O){A.ending=!0,T(K,A),O&&(A.finished?process$1.nextTick(O):K.once("finish",O)),A.ended=!0,K.writable=!1}function Q(K,A,O){var W=K.entry;for(K.entry=null;W;){var Y=W.callback;A.pendingcb--,Y(O),W=W.next}A.corkedRequestsFree.next=K}return Object.defineProperty(ie.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),ie.prototype.destroy=y.destroy,ie.prototype._undestroy=y.undestroy,ie.prototype._destroy=function(K,A){A(K)},_stream_writable$2}var _stream_duplex$2,hasRequired_stream_duplex$2;function require_stream_duplex$2(){if(hasRequired_stream_duplex$2)return _stream_duplex$2;hasRequired_stream_duplex$2=1;var b=Object.keys||function(m){var d=[];for(var g in m)d.push(g);return d};_stream_duplex$2=w;var _=require_stream_readable$2(),S=require_stream_writable$2();requireInherits_browser$8()(w,_);for(var p=b(S.prototype),E=0;E<p.length;E++){var a=p[E];w.prototype[a]||(w.prototype[a]=S.prototype[a])}function w(m){if(!(this instanceof w))return new w(m);_.call(this,m),S.call(this,m),this.allowHalfOpen=!0,m&&(m.readable===!1&&(this.readable=!1),m.writable===!1&&(this.writable=!1),m.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v)))}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v(){this._writableState.ended||process$1.nextTick(y,this)}function y(m){m.end()}return Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),_stream_duplex$2}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var b=requireSafeBuffer$2().Buffer,_=b.isEncoding||function(k){switch(k=""+k,k&&k.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(k){if(!k)return"utf8";for(var I;;)switch(k){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return k;default:if(I)return;k=(""+k).toLowerCase(),I=!0}}function p(k){var I=S(k);if(typeof I!="string"&&(b.isEncoding===_||!_(k)))throw new Error("Unknown encoding: "+k);return I||k}string_decoder.StringDecoder=E;function E(k){this.encoding=p(k);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=x,I=4;break;case"utf8":this.fillLast=y,I=4;break;case"base64":this.text=R,this.end=q,I=3;break;default:this.write=B,this.end=$;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=b.allocUnsafe(I)}E.prototype.write=function(k){if(k.length===0)return"";var I,L;if(this.lastNeed){if(I=this.fillLast(k),I===void 0)return"";L=this.lastNeed,this.lastNeed=0}else L=0;return L<k.length?I?I+this.text(k,L):this.text(k,L):I||""},E.prototype.end=d,E.prototype.text=m,E.prototype.fillLast=function(k){if(this.lastNeed<=k.length)return k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,k.length),this.lastNeed-=k.length};function a(k){return k<=127?0:k>>5===6?2:k>>4===14?3:k>>3===30?4:k>>6===2?-1:-2}function w(k,I,L){var D=I.length-1;if(D<L)return 0;var G=a(I[D]);return G>=0?(G>0&&(k.lastNeed=G-1),G):--D<L||G===-2?0:(G=a(I[D]),G>=0?(G>0&&(k.lastNeed=G-2),G):--D<L||G===-2?0:(G=a(I[D]),G>=0?(G>0&&(G===2?G=0:k.lastNeed=G-3),G):0))}function v(k,I,L){if((I[0]&192)!==128)return k.lastNeed=0,"�";if(k.lastNeed>1&&I.length>1){if((I[1]&192)!==128)return k.lastNeed=1,"�";if(k.lastNeed>2&&I.length>2&&(I[2]&192)!==128)return k.lastNeed=2,"�"}}function y(k){var I=this.lastTotal-this.lastNeed,L=v(this,k);if(L!==void 0)return L;if(this.lastNeed<=k.length)return k.copy(this.lastChar,I,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,I,0,k.length),this.lastNeed-=k.length}function m(k,I){var L=w(this,k,I);if(!this.lastNeed)return k.toString("utf8",I);this.lastTotal=L;var D=k.length-(L-this.lastNeed);return k.copy(this.lastChar,0,D),k.toString("utf8",I,D)}function d(k){var I=k&&k.length?this.write(k):"";return this.lastNeed?I+"�":I}function g(k,I){if((k.length-I)%2===0){var L=k.toString("utf16le",I);if(L){var D=L.charCodeAt(L.length-1);if(D>=55296&&D<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1],L.slice(0,-1)}return L}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=k[k.length-1],k.toString("utf16le",I,k.length-1)}function x(k){var I=k&&k.length?this.write(k):"";if(this.lastNeed){var L=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,L)}return I}function R(k,I){var L=(k.length-I)%3;return L===0?k.toString("base64",I):(this.lastNeed=3-L,this.lastTotal=3,L===1?this.lastChar[0]=k[k.length-1]:(this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1]),k.toString("base64",I,k.length-L))}function q(k){var I=k&&k.length?this.write(k):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function B(k){return k.toString(this.encoding)}function $(k){return k&&k.length?this.write(k):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var b=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function _(a){var w=!1;return function(){if(!w){w=!0;for(var v=arguments.length,y=new Array(v),m=0;m<v;m++)y[m]=arguments[m];a.apply(this,y)}}}function S(){}function p(a){return a.setHeader&&typeof a.abort=="function"}function E(a,w,v){if(typeof w=="function")return E(a,null,w);w||(w={}),v=_(v||S);var y=w.readable||w.readable!==!1&&a.readable,m=w.writable||w.writable!==!1&&a.writable,d=function(){a.writable||x()},g=a._writableState&&a._writableState.finished,x=function(){m=!1,g=!0,y||v.call(a)},R=a._readableState&&a._readableState.endEmitted,q=function(){y=!1,R=!0,m||v.call(a)},B=function(L){v.call(a,L)},$=function(){var L;if(y&&!R)return(!a._readableState||!a._readableState.ended)&&(L=new b),v.call(a,L);if(m&&!g)return(!a._writableState||!a._writableState.ended)&&(L=new b),v.call(a,L)},k=function(){a.req.on("finish",x)};return p(a)?(a.on("complete",x),a.on("abort",$),a.req?k():a.on("request",k)):m&&!a._writableState&&(a.on("end",d),a.on("close",d)),a.on("end",q),a.on("finish",x),w.error!==!1&&a.on("error",B),a.on("close",$),function(){a.removeListener("complete",x),a.removeListener("abort",$),a.removeListener("request",k),a.req&&a.req.removeListener("finish",x),a.removeListener("end",d),a.removeListener("close",d),a.removeListener("finish",x),a.removeListener("end",q),a.removeListener("error",B),a.removeListener("close",$)}}return endOfStream=E,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var b;function _(L,D,G){return D=S(D),D in L?Object.defineProperty(L,D,{value:G,enumerable:!0,configurable:!0,writable:!0}):L[D]=G,L}function S(L){var D=p(L,"string");return typeof D=="symbol"?D:String(D)}function p(L,D){if(typeof L!="object"||L===null)return L;var G=L[Symbol.toPrimitive];if(G!==void 0){var X=G.call(L,D);if(typeof X!="object")return X;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(L)}var E=requireEndOfStream(),a=Symbol("lastResolve"),w=Symbol("lastReject"),v=Symbol("error"),y=Symbol("ended"),m=Symbol("lastPromise"),d=Symbol("handlePromise"),g=Symbol("stream");function x(L,D){return{value:L,done:D}}function R(L){var D=L[a];if(D!==null){var G=L[g].read();G!==null&&(L[m]=null,L[a]=null,L[w]=null,D(x(G,!1)))}}function q(L){process$1.nextTick(R,L)}function B(L,D){return function(G,X){L.then(function(){if(D[y]){G(x(void 0,!0));return}D[d](G,X)},X)}}var $=Object.getPrototypeOf(function(){}),k=Object.setPrototypeOf((b={get stream(){return this[g]},next:function(){var D=this,G=this[v];if(G!==null)return Promise.reject(G);if(this[y])return Promise.resolve(x(void 0,!0));if(this[g].destroyed)return new Promise(function(ee,ue){process$1.nextTick(function(){D[v]?ue(D[v]):ee(x(void 0,!0))})});var X=this[m],te;if(X)te=new Promise(B(X,this));else{var ie=this[g].read();if(ie!==null)return Promise.resolve(x(ie,!1));te=new Promise(this[d])}return this[m]=te,te}},_(b,Symbol.asyncIterator,function(){return this}),_(b,"return",function(){var D=this;return new Promise(function(G,X){D[g].destroy(null,function(te){if(te){X(te);return}G(x(void 0,!0))})})}),b),$),I=function(D){var G,X=Object.create(k,(G={},_(G,g,{value:D,writable:!0}),_(G,a,{value:null,writable:!0}),_(G,w,{value:null,writable:!0}),_(G,v,{value:null,writable:!0}),_(G,y,{value:D._readableState.endEmitted,writable:!0}),_(G,d,{value:function(ie,ee){var ue=X[g].read();ue?(X[m]=null,X[a]=null,X[w]=null,ie(x(ue,!1))):(X[a]=ie,X[w]=ee)},writable:!0}),G));return X[m]=null,E(D,function(te){if(te&&te.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ie=X[w];ie!==null&&(X[m]=null,X[a]=null,X[w]=null,ie(te)),X[v]=te;return}var ee=X[a];ee!==null&&(X[m]=null,X[a]=null,X[w]=null,ee(x(void 0,!0))),X[y]=!0}),D.on("readable",q.bind(null,X)),X};return async_iterator=I,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$2,hasRequired_stream_readable$2;function require_stream_readable$2(){if(hasRequired_stream_readable$2)return _stream_readable$2;hasRequired_stream_readable$2=1,_stream_readable$2=ee;var b;ee.ReadableState=ie,requireEvents().EventEmitter;var _=function(j,ne){return j.listeners(ne).length},S=requireStreamBrowser$2(),p=requireDist().Buffer,E=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(Z){return p.from(Z)}function w(Z){return p.isBuffer(Z)||Z instanceof E}var v=requireUtil$1(),y;v&&v.debuglog?y=v.debuglog("stream"):y=function(){};var m=requireBuffer_list(),d=requireDestroy$2(),g=requireState(),x=g.getHighWaterMark,R=requireErrorsBrowser().codes,q=R.ERR_INVALID_ARG_TYPE,B=R.ERR_STREAM_PUSH_AFTER_EOF,$=R.ERR_METHOD_NOT_IMPLEMENTED,k=R.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,I,L,D;requireInherits_browser$8()(ee,S);var G=d.errorOrDestroy,X=["error","close","destroy","pause","resume"];function te(Z,j,ne){if(typeof Z.prependListener=="function")return Z.prependListener(j,ne);!Z._events||!Z._events[j]?Z.on(j,ne):Array.isArray(Z._events[j])?Z._events[j].unshift(ne):Z._events[j]=[ne,Z._events[j]]}function ie(Z,j,ne){b=b||require_stream_duplex$2(),Z=Z||{},typeof ne!="boolean"&&(ne=j instanceof b),this.objectMode=!!Z.objectMode,ne&&(this.objectMode=this.objectMode||!!Z.readableObjectMode),this.highWaterMark=x(this,Z,"readableHighWaterMark",ne),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Z.emitClose!==!1,this.autoDestroy=!!Z.autoDestroy,this.destroyed=!1,this.defaultEncoding=Z.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Z.encoding&&(I||(I=requireString_decoder().StringDecoder),this.decoder=new I(Z.encoding),this.encoding=Z.encoding)}function ee(Z){if(b=b||require_stream_duplex$2(),!(this instanceof ee))return new ee(Z);var j=this instanceof b;this._readableState=new ie(Z,this,j),this.readable=!0,Z&&(typeof Z.read=="function"&&(this._read=Z.read),typeof Z.destroy=="function"&&(this._destroy=Z.destroy)),S.call(this)}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(j){this._readableState&&(this._readableState.destroyed=j)}}),ee.prototype.destroy=d.destroy,ee.prototype._undestroy=d.undestroy,ee.prototype._destroy=function(Z,j){j(Z)},ee.prototype.push=function(Z,j){var ne=this._readableState,Re;return ne.objectMode?Re=!0:typeof Z=="string"&&(j=j||ne.defaultEncoding,j!==ne.encoding&&(Z=p.from(Z,j),j=""),Re=!0),ue(this,Z,j,!1,Re)},ee.prototype.unshift=function(Z){return ue(this,Z,null,!0,!1)};function ue(Z,j,ne,Re,le){y("readableAddChunk",j);var de=Z._readableState;if(j===null)de.reading=!1,s(Z,de);else{var Pe;if(le||(Pe=e(de,j)),Pe)G(Z,Pe);else if(de.objectMode||j&&j.length>0)if(typeof j!="string"&&!de.objectMode&&Object.getPrototypeOf(j)!==p.prototype&&(j=a(j)),Re)de.endEmitted?G(Z,new k):c(Z,de,j,!0);else if(de.ended)G(Z,new B);else{if(de.destroyed)return!1;de.reading=!1,de.decoder&&!ne?(j=de.decoder.write(j),de.objectMode||j.length!==0?c(Z,de,j,!1):o(Z,de)):c(Z,de,j,!1)}else Re||(de.reading=!1,o(Z,de))}return!de.ended&&(de.length<de.highWaterMark||de.length===0)}function c(Z,j,ne,Re){j.flowing&&j.length===0&&!j.sync?(j.awaitDrain=0,Z.emit("data",ne)):(j.length+=j.objectMode?1:ne.length,Re?j.buffer.unshift(ne):j.buffer.push(ne),j.needReadable&&u(Z)),o(Z,j)}function e(Z,j){var ne;return!w(j)&&typeof j!="string"&&j!==void 0&&!Z.objectMode&&(ne=new q("chunk",["string","Buffer","Uint8Array"],j)),ne}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(Z){I||(I=requireString_decoder().StringDecoder);var j=new I(Z);this._readableState.decoder=j,this._readableState.encoding=this._readableState.decoder.encoding;for(var ne=this._readableState.buffer.head,Re="";ne!==null;)Re+=j.write(ne.data),ne=ne.next;return this._readableState.buffer.clear(),Re!==""&&this._readableState.buffer.push(Re),this._readableState.length=Re.length,this};var t=1073741824;function n(Z){return Z>=t?Z=t:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function f(Z,j){return Z<=0||j.length===0&&j.ended?0:j.objectMode?1:Z!==Z?j.flowing&&j.length?j.buffer.head.data.length:j.length:(Z>j.highWaterMark&&(j.highWaterMark=n(Z)),Z<=j.length?Z:j.ended?j.length:(j.needReadable=!0,0))}ee.prototype.read=function(Z){y("read",Z),Z=parseInt(Z,10);var j=this._readableState,ne=Z;if(Z!==0&&(j.emittedReadable=!1),Z===0&&j.needReadable&&((j.highWaterMark!==0?j.length>=j.highWaterMark:j.length>0)||j.ended))return y("read: emitReadable",j.length,j.ended),j.length===0&&j.ended?O(this):u(this),null;if(Z=f(Z,j),Z===0&&j.ended)return j.length===0&&O(this),null;var Re=j.needReadable;y("need readable",Re),(j.length===0||j.length-Z<j.highWaterMark)&&(Re=!0,y("length less than watermark",Re)),j.ended||j.reading?(Re=!1,y("reading or ended",Re)):Re&&(y("do read"),j.reading=!0,j.sync=!0,j.length===0&&(j.needReadable=!0),this._read(j.highWaterMark),j.sync=!1,j.reading||(Z=f(ne,j)));var le;return Z>0?le=A(Z,j):le=null,le===null?(j.needReadable=j.length<=j.highWaterMark,Z=0):(j.length-=Z,j.awaitDrain=0),j.length===0&&(j.ended||(j.needReadable=!0),ne!==Z&&j.ended&&O(this)),le!==null&&this.emit("data",le),le};function s(Z,j){if(y("onEofChunk"),!j.ended){if(j.decoder){var ne=j.decoder.end();ne&&ne.length&&(j.buffer.push(ne),j.length+=j.objectMode?1:ne.length)}j.ended=!0,j.sync?u(Z):(j.needReadable=!1,j.emittedReadable||(j.emittedReadable=!0,l(Z)))}}function u(Z){var j=Z._readableState;y("emitReadable",j.needReadable,j.emittedReadable),j.needReadable=!1,j.emittedReadable||(y("emitReadable",j.flowing),j.emittedReadable=!0,process$1.nextTick(l,Z))}function l(Z){var j=Z._readableState;y("emitReadable_",j.destroyed,j.length,j.ended),!j.destroyed&&(j.length||j.ended)&&(Z.emit("readable"),j.emittedReadable=!1),j.needReadable=!j.flowing&&!j.ended&&j.length<=j.highWaterMark,K(Z)}function o(Z,j){j.readingMore||(j.readingMore=!0,process$1.nextTick(r,Z,j))}function r(Z,j){for(;!j.reading&&!j.ended&&(j.length<j.highWaterMark||j.flowing&&j.length===0);){var ne=j.length;if(y("maybeReadMore read 0"),Z.read(0),ne===j.length)break}j.readingMore=!1}ee.prototype._read=function(Z){G(this,new $("_read()"))},ee.prototype.pipe=function(Z,j){var ne=this,Re=this._readableState;switch(Re.pipesCount){case 0:Re.pipes=Z;break;case 1:Re.pipes=[Re.pipes,Z];break;default:Re.pipes.push(Z);break}Re.pipesCount+=1,y("pipe count=%d opts=%j",Re.pipesCount,j);var le=(!j||j.end!==!1)&&Z!==process$1.stdout&&Z!==process$1.stderr,de=le?me:Ue;Re.endEmitted?process$1.nextTick(de):ne.once("end",de),Z.on("unpipe",Pe);function Pe(Se,Ae){y("onunpipe"),Se===ne&&Ae&&Ae.hasUnpiped===!1&&(Ae.hasUnpiped=!0,ve())}function me(){y("onend"),Z.end()}var he=h(ne);Z.on("drain",he);var Le=!1;function ve(){y("cleanup"),Z.removeListener("close",ye),Z.removeListener("finish",xe),Z.removeListener("drain",he),Z.removeListener("error",De),Z.removeListener("unpipe",Pe),ne.removeListener("end",me),ne.removeListener("end",Ue),ne.removeListener("data",ge),Le=!0,Re.awaitDrain&&(!Z._writableState||Z._writableState.needDrain)&&he()}ne.on("data",ge);function ge(Se){y("ondata");var Ae=Z.write(Se);y("dest.write",Ae),Ae===!1&&((Re.pipesCount===1&&Re.pipes===Z||Re.pipesCount>1&&Y(Re.pipes,Z)!==-1)&&!Le&&(y("false write response, pause",Re.awaitDrain),Re.awaitDrain++),ne.pause())}function De(Se){y("onerror",Se),Ue(),Z.removeListener("error",De),_(Z,"error")===0&&G(Z,Se)}te(Z,"error",De);function ye(){Z.removeListener("finish",xe),Ue()}Z.once("close",ye);function xe(){y("onfinish"),Z.removeListener("close",ye),Ue()}Z.once("finish",xe);function Ue(){y("unpipe"),ne.unpipe(Z)}return Z.emit("pipe",ne),Re.flowing||(y("pipe resume"),ne.resume()),Z};function h(Z){return function(){var ne=Z._readableState;y("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&_(Z,"data")&&(ne.flowing=!0,K(Z))}}ee.prototype.unpipe=function(Z){var j=this._readableState,ne={hasUnpiped:!1};if(j.pipesCount===0)return this;if(j.pipesCount===1)return Z&&Z!==j.pipes?this:(Z||(Z=j.pipes),j.pipes=null,j.pipesCount=0,j.flowing=!1,Z&&Z.emit("unpipe",this,ne),this);if(!Z){var Re=j.pipes,le=j.pipesCount;j.pipes=null,j.pipesCount=0,j.flowing=!1;for(var de=0;de<le;de++)Re[de].emit("unpipe",this,{hasUnpiped:!1});return this}var Pe=Y(j.pipes,Z);return Pe===-1?this:(j.pipes.splice(Pe,1),j.pipesCount-=1,j.pipesCount===1&&(j.pipes=j.pipes[0]),Z.emit("unpipe",this,ne),this)},ee.prototype.on=function(Z,j){var ne=S.prototype.on.call(this,Z,j),Re=this._readableState;return Z==="data"?(Re.readableListening=this.listenerCount("readable")>0,Re.flowing!==!1&&this.resume()):Z==="readable"&&!Re.endEmitted&&!Re.readableListening&&(Re.readableListening=Re.needReadable=!0,Re.flowing=!1,Re.emittedReadable=!1,y("on readable",Re.length,Re.reading),Re.length?u(this):Re.reading||process$1.nextTick(T,this)),ne},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(Z,j){var ne=S.prototype.removeListener.call(this,Z,j);return Z==="readable"&&process$1.nextTick(M,this),ne},ee.prototype.removeAllListeners=function(Z){var j=S.prototype.removeAllListeners.apply(this,arguments);return(Z==="readable"||Z===void 0)&&process$1.nextTick(M,this),j};function M(Z){var j=Z._readableState;j.readableListening=Z.listenerCount("readable")>0,j.resumeScheduled&&!j.paused?j.flowing=!0:Z.listenerCount("data")>0&&Z.resume()}function T(Z){y("readable nexttick read 0"),Z.read(0)}ee.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(y("resume"),Z.flowing=!Z.readableListening,N(this,Z)),Z.paused=!1,this};function N(Z,j){j.resumeScheduled||(j.resumeScheduled=!0,process$1.nextTick(Q,Z,j))}function Q(Z,j){y("resume",j.reading),j.reading||Z.read(0),j.resumeScheduled=!1,Z.emit("resume"),K(Z),j.flowing&&!j.reading&&Z.read(0)}ee.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function K(Z){var j=Z._readableState;for(y("flow",j.flowing);j.flowing&&Z.read()!==null;);}ee.prototype.wrap=function(Z){var j=this,ne=this._readableState,Re=!1;Z.on("end",function(){if(y("wrapped end"),ne.decoder&&!ne.ended){var Pe=ne.decoder.end();Pe&&Pe.length&&j.push(Pe)}j.push(null)}),Z.on("data",function(Pe){if(y("wrapped data"),ne.decoder&&(Pe=ne.decoder.write(Pe)),!(ne.objectMode&&Pe==null)&&!(!ne.objectMode&&(!Pe||!Pe.length))){var me=j.push(Pe);me||(Re=!0,Z.pause())}});for(var le in Z)this[le]===void 0&&typeof Z[le]=="function"&&(this[le]=(function(me){return function(){return Z[me].apply(Z,arguments)}})(le));for(var de=0;de<X.length;de++)Z.on(X[de],this.emit.bind(this,X[de]));return this._read=function(Pe){y("wrapped _read",Pe),Re&&(Re=!1,Z.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return L===void 0&&(L=requireAsync_iterator()),L(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(j){this._readableState&&(this._readableState.flowing=j)}}),ee._fromList=A,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function A(Z,j){if(j.length===0)return null;var ne;return j.objectMode?ne=j.buffer.shift():!Z||Z>=j.length?(j.decoder?ne=j.buffer.join(""):j.buffer.length===1?ne=j.buffer.first():ne=j.buffer.concat(j.length),j.buffer.clear()):ne=j.buffer.consume(Z,j.decoder),ne}function O(Z){var j=Z._readableState;y("endReadable",j.endEmitted),j.endEmitted||(j.ended=!0,process$1.nextTick(W,j,Z))}function W(Z,j){if(y("endReadableNT",Z.endEmitted,Z.length),!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,j.readable=!1,j.emit("end"),Z.autoDestroy)){var ne=j._writableState;(!ne||ne.autoDestroy&&ne.finished)&&j.destroy()}}typeof Symbol=="function"&&(ee.from=function(Z,j){return D===void 0&&(D=requireFromBrowser()),D(ee,Z,j)});function Y(Z,j){for(var ne=0,Re=Z.length;ne<Re;ne++)if(Z[ne]===j)return ne;return-1}return _stream_readable$2}var _stream_transform$2,hasRequired_stream_transform$2;function require_stream_transform$2(){if(hasRequired_stream_transform$2)return _stream_transform$2;hasRequired_stream_transform$2=1,_stream_transform$2=v;var b=requireErrorsBrowser().codes,_=b.ERR_METHOD_NOT_IMPLEMENTED,S=b.ERR_MULTIPLE_CALLBACK,p=b.ERR_TRANSFORM_ALREADY_TRANSFORMING,E=b.ERR_TRANSFORM_WITH_LENGTH_0,a=require_stream_duplex$2();requireInherits_browser$8()(v,a);function w(d,g){var x=this._transformState;x.transforming=!1;var R=x.writecb;if(R===null)return this.emit("error",new S);x.writechunk=null,x.writecb=null,g!=null&&this.push(g),R(d);var q=this._readableState;q.reading=!1,(q.needReadable||q.length<q.highWaterMark)&&this._read(q.highWaterMark)}function v(d){if(!(this instanceof v))return new v(d);a.call(this,d),this._transformState={afterTransform:w.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",y)}function y(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,x){m(d,g,x)}):m(this,null,null)}v.prototype.push=function(d,g){return this._transformState.needTransform=!1,a.prototype.push.call(this,d,g)},v.prototype._transform=function(d,g,x){x(new _("_transform()"))},v.prototype._write=function(d,g,x){var R=this._transformState;if(R.writecb=x,R.writechunk=d,R.writeencoding=g,!R.transforming){var q=this._readableState;(R.needTransform||q.needReadable||q.length<q.highWaterMark)&&this._read(q.highWaterMark)}},v.prototype._read=function(d){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},v.prototype._destroy=function(d,g){a.prototype._destroy.call(this,d,function(x){g(x)})};function m(d,g,x){if(g)return d.emit("error",g);if(x!=null&&d.push(x),d._writableState.length)throw new E;if(d._transformState.transforming)throw new p;return d.push(null)}return _stream_transform$2}var _stream_passthrough$2,hasRequired_stream_passthrough$2;function require_stream_passthrough$2(){if(hasRequired_stream_passthrough$2)return _stream_passthrough$2;hasRequired_stream_passthrough$2=1,_stream_passthrough$2=_;var b=require_stream_transform$2();requireInherits_browser$8()(_,b);function _(S){if(!(this instanceof _))return new _(S);b.call(this,S)}return _.prototype._transform=function(S,p,E){E(null,S)},_stream_passthrough$2}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var b;function _(x){var R=!1;return function(){R||(R=!0,x.apply(void 0,arguments))}}var S=requireErrorsBrowser().codes,p=S.ERR_MISSING_ARGS,E=S.ERR_STREAM_DESTROYED;function a(x){if(x)throw x}function w(x){return x.setHeader&&typeof x.abort=="function"}function v(x,R,q,B){B=_(B);var $=!1;x.on("close",function(){$=!0}),b===void 0&&(b=requireEndOfStream()),b(x,{readable:R,writable:q},function(I){if(I)return B(I);$=!0,B()});var k=!1;return function(I){if(!$&&!k){if(k=!0,w(x))return x.abort();if(typeof x.destroy=="function")return x.destroy();B(I||new E("pipe"))}}}function y(x){x()}function m(x,R){return x.pipe(R)}function d(x){return!x.length||typeof x[x.length-1]!="function"?a:x.pop()}function g(){for(var x=arguments.length,R=new Array(x),q=0;q<x;q++)R[q]=arguments[q];var B=d(R);if(Array.isArray(R[0])&&(R=R[0]),R.length<2)throw new p("streams");var $,k=R.map(function(I,L){var D=L<R.length-1,G=L>0;return v(I,D,G,function(X){$||($=X),X&&k.forEach(y),!D&&(k.forEach(y),B($))})});return R.reduce(m)}return pipeline_1=g,pipeline_1}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=S;var b=requireEvents().EventEmitter,_=requireInherits_browser$7();_(S,b),S.Readable=require_stream_readable$2(),S.Writable=require_stream_writable$2(),S.Duplex=require_stream_duplex$2(),S.Transform=require_stream_transform$2(),S.PassThrough=require_stream_passthrough$2(),S.finished=requireEndOfStream(),S.pipeline=requirePipeline(),S.Stream=S;function S(){b.call(this)}return S.prototype.pipe=function(p,E){var a=this;function w(R){p.writable&&p.write(R)===!1&&a.pause&&a.pause()}a.on("data",w);function v(){a.readable&&a.resume&&a.resume()}p.on("drain",v),!p._isStdio&&(!E||E.end!==!1)&&(a.on("end",m),a.on("close",d));var y=!1;function m(){y||(y=!0,p.end())}function d(){y||(y=!0,typeof p.destroy=="function"&&p.destroy())}function g(R){if(x(),b.listenerCount(this,"error")===0)throw R}a.on("error",g),p.on("error",g);function x(){a.removeListener("data",w),p.removeListener("drain",v),a.removeListener("end",m),a.removeListener("close",d),a.removeListener("error",g),p.removeListener("error",g),a.removeListener("end",x),a.removeListener("close",x),p.removeListener("close",x)}return a.on("end",x),a.on("close",x),p.on("close",x),p.emit("pipe",a),p},streamBrowserify}var inherits_browser$6={exports:{}},hasRequiredInherits_browser$6;function requireInherits_browser$6(){return hasRequiredInherits_browser$6||(hasRequiredInherits_browser$6=1,typeof Object.create=="function"?inherits_browser$6.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$6.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser$6.exports}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var b=requireSafeBuffer$2().Buffer,_=requireStreamBrowserify().Transform,S=requireInherits_browser$6();function p(v){_.call(this),this._block=b.allocUnsafe(v),this._blockSize=v,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}S(p,_),p.prototype._transform=function(v,y,m){var d=null;try{this.update(v,y)}catch(g){d=g}m(d)},p.prototype._flush=function(v){var y=null;try{this.push(this.digest())}catch(m){y=m}v(y)};var E=typeof Uint8Array<"u",a=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(b.prototype instanceof Uint8Array||b.TYPED_ARRAY_SUPPORT);function w(v,y){if(v instanceof b)return v;if(typeof v=="string")return b.from(v,y);if(a&&ArrayBuffer.isView(v)){if(v.byteLength===0)return b.alloc(0);var m=b.from(v.buffer,v.byteOffset,v.byteLength);if(m.byteLength===v.byteLength)return m}if(E&&v instanceof Uint8Array||b.isBuffer(v)&&v.constructor&&typeof v.constructor.isBuffer=="function"&&v.constructor.isBuffer(v))return b.from(v);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return p.prototype.update=function(v,y){if(this._finalized)throw new Error("Digest already called");v=w(v,y);for(var m=this._block,d=0;this._blockOffset+v.length-d>=this._blockSize;){for(var g=this._blockOffset;g<this._blockSize;)m[g++]=v[d++];this._update(),this._blockOffset=0}for(;d<v.length;)m[this._blockOffset++]=v[d++];for(var x=0,R=v.length*8;R>0;++x)this._length[x]+=R,R=this._length[x]/4294967296|0,R>0&&(this._length[x]-=4294967296*R);return this},p.prototype._update=function(){throw new Error("_update is not implemented")},p.prototype.digest=function(v){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var y=this._digest();v!==void 0&&(y=y.toString(v)),this._block.fill(0),this._blockOffset=0;for(var m=0;m<4;++m)this._length[m]=0;return y},p.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=p,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var b=requireInherits_browser$8(),_=requireHashBase$1(),S=requireSafeBuffer$2().Buffer,p=new Array(16);function E(){_.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}b(E,_),E.prototype._update=function(){for(var d=p,g=0;g<16;++g)d[g]=this._block.readInt32LE(g*4);var x=this._a,R=this._b,q=this._c,B=this._d;x=w(x,R,q,B,d[0],3614090360,7),B=w(B,x,R,q,d[1],3905402710,12),q=w(q,B,x,R,d[2],606105819,17),R=w(R,q,B,x,d[3],3250441966,22),x=w(x,R,q,B,d[4],4118548399,7),B=w(B,x,R,q,d[5],1200080426,12),q=w(q,B,x,R,d[6],2821735955,17),R=w(R,q,B,x,d[7],4249261313,22),x=w(x,R,q,B,d[8],1770035416,7),B=w(B,x,R,q,d[9],2336552879,12),q=w(q,B,x,R,d[10],4294925233,17),R=w(R,q,B,x,d[11],2304563134,22),x=w(x,R,q,B,d[12],1804603682,7),B=w(B,x,R,q,d[13],4254626195,12),q=w(q,B,x,R,d[14],2792965006,17),R=w(R,q,B,x,d[15],1236535329,22),x=v(x,R,q,B,d[1],4129170786,5),B=v(B,x,R,q,d[6],3225465664,9),q=v(q,B,x,R,d[11],643717713,14),R=v(R,q,B,x,d[0],3921069994,20),x=v(x,R,q,B,d[5],3593408605,5),B=v(B,x,R,q,d[10],38016083,9),q=v(q,B,x,R,d[15],3634488961,14),R=v(R,q,B,x,d[4],3889429448,20),x=v(x,R,q,B,d[9],568446438,5),B=v(B,x,R,q,d[14],3275163606,9),q=v(q,B,x,R,d[3],4107603335,14),R=v(R,q,B,x,d[8],1163531501,20),x=v(x,R,q,B,d[13],2850285829,5),B=v(B,x,R,q,d[2],4243563512,9),q=v(q,B,x,R,d[7],1735328473,14),R=v(R,q,B,x,d[12],2368359562,20),x=y(x,R,q,B,d[5],4294588738,4),B=y(B,x,R,q,d[8],2272392833,11),q=y(q,B,x,R,d[11],1839030562,16),R=y(R,q,B,x,d[14],4259657740,23),x=y(x,R,q,B,d[1],2763975236,4),B=y(B,x,R,q,d[4],1272893353,11),q=y(q,B,x,R,d[7],4139469664,16),R=y(R,q,B,x,d[10],3200236656,23),x=y(x,R,q,B,d[13],681279174,4),B=y(B,x,R,q,d[0],3936430074,11),q=y(q,B,x,R,d[3],3572445317,16),R=y(R,q,B,x,d[6],76029189,23),x=y(x,R,q,B,d[9],3654602809,4),B=y(B,x,R,q,d[12],3873151461,11),q=y(q,B,x,R,d[15],530742520,16),R=y(R,q,B,x,d[2],3299628645,23),x=m(x,R,q,B,d[0],4096336452,6),B=m(B,x,R,q,d[7],1126891415,10),q=m(q,B,x,R,d[14],2878612391,15),R=m(R,q,B,x,d[5],4237533241,21),x=m(x,R,q,B,d[12],1700485571,6),B=m(B,x,R,q,d[3],2399980690,10),q=m(q,B,x,R,d[10],4293915773,15),R=m(R,q,B,x,d[1],2240044497,21),x=m(x,R,q,B,d[8],1873313359,6),B=m(B,x,R,q,d[15],4264355552,10),q=m(q,B,x,R,d[6],2734768916,15),R=m(R,q,B,x,d[13],1309151649,21),x=m(x,R,q,B,d[4],4149444226,6),B=m(B,x,R,q,d[11],3174756917,10),q=m(q,B,x,R,d[2],718787259,15),R=m(R,q,B,x,d[9],3951481745,21),this._a=this._a+x|0,this._b=this._b+R|0,this._c=this._c+q|0,this._d=this._d+B|0},E.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var d=S.allocUnsafe(16);return d.writeInt32LE(this._a,0),d.writeInt32LE(this._b,4),d.writeInt32LE(this._c,8),d.writeInt32LE(this._d,12),d};function a(d,g){return d<<g|d>>>32-g}function w(d,g,x,R,q,B,$){return a(d+(g&x|~g&R)+q+B|0,$)+g|0}function v(d,g,x,R,q,B,$){return a(d+(g&R|x&~R)+q+B|0,$)+g|0}function y(d,g,x,R,q,B,$){return a(d+(g^x^R)+q+B|0,$)+g|0}function m(d,g,x,R,q,B,$){return a(d+(x^(g|~R))+q+B|0,$)+g|0}return md5_js=E,md5_js}var inherits_browser$5={exports:{}},hasRequiredInherits_browser$5;function requireInherits_browser$5(){return hasRequiredInherits_browser$5||(hasRequiredInherits_browser$5=1,typeof Object.create=="function"?inherits_browser$5.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$5.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser$5.exports}var isarray$2,hasRequiredIsarray$2;function requireIsarray$2(){if(hasRequiredIsarray$2)return isarray$2;hasRequiredIsarray$2=1;var b={}.toString;return isarray$2=Array.isArray||function(_){return b.call(_)=="[object Array]"},isarray$2}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var b=requireType(),_=requireCallBound(),S=_("TypedArray.prototype.buffer",!0),p=requireIsTypedArray();return typedArrayBuffer=S||function(a){if(!p(a))throw new b("Not a Typed Array");return a.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$2;function requireToBuffer$2(){if(hasRequiredToBuffer$2)return toBuffer;hasRequiredToBuffer$2=1;var b=requireSafeBuffer$2().Buffer,_=requireIsarray$2(),S=requireTypedArrayBuffer(),p=ArrayBuffer.isView||function(y){try{return S(y),!0}catch{return!1}},E=typeof Uint8Array<"u",a=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",w=a&&(b.prototype instanceof Uint8Array||b.TYPED_ARRAY_SUPPORT);return toBuffer=function(y,m){if(b.isBuffer(y))return y.constructor&&!("isBuffer"in y)?b.from(y):y;if(typeof y=="string")return b.from(y,m);if(a&&p(y)){if(y.byteLength===0)return b.alloc(0);if(w){var d=b.from(y.buffer,y.byteOffset,y.byteLength);if(d.byteLength===y.byteLength)return d}var g=y instanceof Uint8Array?y:new Uint8Array(y.buffer,y.byteOffset,y.byteLength),x=b.from(g);if(x.length===y.byteLength)return x}if(E&&y instanceof Uint8Array)return b.from(y);var R=_(y);if(R)for(var q=0;q<y.length;q+=1){var B=y[q];if(typeof B!="number"||B<0||B>255||~~B!==B)throw new RangeError("Array items must be numbers in the range 0-255.")}if(R||b.isBuffer(y)&&y.constructor&&typeof y.constructor.isBuffer=="function"&&y.constructor.isBuffer(y))return b.from(y);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var toBuffer_1$1,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer_1$1;hasRequiredToBuffer$1=1;var b=requireSafeBuffer$2().Buffer,_=requireToBuffer$2(),S=typeof Uint8Array<"u",p=S&&typeof ArrayBuffer<"u",E=p&&ArrayBuffer.isView;return toBuffer_1$1=function(a,w){if(typeof a=="string"||b.isBuffer(a)||S&&a instanceof Uint8Array||E&&E(a))return _(a,w);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')},toBuffer_1$1}var readableBrowser$2={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;hasRequiredProcessNextickArgs=1,typeof process$1>"u"||!process$1.version||process$1.version.indexOf("v0.")===0||process$1.version.indexOf("v1.")===0&&process$1.version.indexOf("v1.8.")!==0?processNextickArgs.exports={nextTick:b}:processNextickArgs.exports=process$1;function b(_,S,p,E){if(typeof _!="function")throw new TypeError('"callback" argument must be a function');var a=arguments.length,w,v;switch(a){case 0:case 1:return process$1.nextTick(_);case 2:return process$1.nextTick(function(){_.call(null,S)});case 3:return process$1.nextTick(function(){_.call(null,S,p)});case 4:return process$1.nextTick(function(){_.call(null,S,p,E)});default:for(w=new Array(a-1),v=0;v<w.length;)w[v++]=arguments[v];return process$1.nextTick(function(){_.apply(null,w)})}}return processNextickArgs.exports}var isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var b={}.toString;return isarray$1=Array.isArray||function(_){return b.call(_)=="[object Array]"},isarray$1}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var safeBuffer$1={exports:{}},hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,(function(b,_){var S=requireDist(),p=S.Buffer;function E(w,v){for(var y in w)v[y]=w[y]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?b.exports=S:(E(S,_),_.Buffer=a);function a(w,v,y){return p(w,v,y)}E(p,a),a.from=function(w,v,y){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,v,y)},a.alloc=function(w,v,y){if(typeof w!="number")throw new TypeError("Argument must be a number");var m=p(w);return v!==void 0?typeof y=="string"?m.fill(v,y):m.fill(v):m.fill(0),m},a.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},a.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return S.SlowBuffer(w)}})(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function b(B){return Array.isArray?Array.isArray(B):q(B)==="[object Array]"}util.isArray=b;function _(B){return typeof B=="boolean"}util.isBoolean=_;function S(B){return B===null}util.isNull=S;function p(B){return B==null}util.isNullOrUndefined=p;function E(B){return typeof B=="number"}util.isNumber=E;function a(B){return typeof B=="string"}util.isString=a;function w(B){return typeof B=="symbol"}util.isSymbol=w;function v(B){return B===void 0}util.isUndefined=v;function y(B){return q(B)==="[object RegExp]"}util.isRegExp=y;function m(B){return typeof B=="object"&&B!==null}util.isObject=m;function d(B){return q(B)==="[object Date]"}util.isDate=d;function g(B){return q(B)==="[object Error]"||B instanceof Error}util.isError=g;function x(B){return typeof B=="function"}util.isFunction=x;function R(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}util.isPrimitive=R,util.isBuffer=requireDist().Buffer.isBuffer;function q(B){return Object.prototype.toString.call(B)}return util}var BufferList$1={exports:{}},hasRequiredBufferList$1;function requireBufferList$1(){return hasRequiredBufferList$1||(hasRequiredBufferList$1=1,(function(b){function _(a,w){if(!(a instanceof w))throw new TypeError("Cannot call a class as a function")}var S=requireSafeBuffer$1().Buffer,p=requireUtil$1();function E(a,w,v){a.copy(w,v)}b.exports=(function(){function a(){_(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length},a.prototype.unshift=function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length},a.prototype.shift=function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(v){if(this.length===0)return"";for(var y=this.head,m=""+y.data;y=y.next;)m+=v+y.data;return m},a.prototype.concat=function(v){if(this.length===0)return S.alloc(0);for(var y=S.allocUnsafe(v>>>0),m=this.head,d=0;m;)E(m.data,y,d),d+=m.data.length,m=m.next;return y},a})(),p&&p.inspect&&p.inspect.custom&&(b.exports.prototype[p.inspect.custom]=function(){var a=p.inspect({length:this.length});return this.constructor.name+" "+a})})(BufferList$1)),BufferList$1.exports}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;var b=requireProcessNextickArgs();function _(E,a){var w=this,v=this._readableState&&this._readableState.destroyed,y=this._writableState&&this._writableState.destroyed;return v||y?(a?a(E):E&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,b.nextTick(p,this,E)):b.nextTick(p,this,E)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(E||null,function(m){!a&&m?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,b.nextTick(p,w,m)):b.nextTick(p,w,m):a&&a(m)}),this)}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(E,a){E.emit("error",a)}return destroy_1$1={destroy:_,undestroy:S},destroy_1$1}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1;var b=requireProcessNextickArgs();_stream_writable$1=B;function _(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var S=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:b.nextTick,p;B.WritableState=R;var E=Object.create(requireUtil());E.inherits=requireInherits_browser$5();var a={deprecate:requireBrowser$b()},w=requireStreamBrowser$1(),v=requireSafeBuffer$1().Buffer,y=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(u){return v.from(u)}function d(u){return v.isBuffer(u)||u instanceof y}var g=requireDestroy$1();E.inherits(B,w);function x(){}function R(u,l){p=p||require_stream_duplex$1(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,M=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=M,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var T=u.decodeStrings===!1;this.decodeStrings=!T,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(N){te(l,N)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}R.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(R.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var q;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(q=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(u){return q.call(this,u)?!0:this!==B?!1:u&&u._writableState instanceof R}})):q=function(u){return u instanceof this};function B(u){if(p=p||require_stream_duplex$1(),!q.call(B,this)&&!(this instanceof p))return new B(u);this._writableState=new R(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}B.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function $(u,l){var o=new Error("write after end");u.emit("error",o),b.nextTick(l,o)}function k(u,l,o,r){var h=!0,M=!1;return o===null?M=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(M=new TypeError("Invalid non-string/buffer chunk")),M&&(u.emit("error",M),b.nextTick(r,M),h=!1),h}B.prototype.write=function(u,l,o){var r=this._writableState,h=!1,M=!r.objectMode&&d(u);return M&&!v.isBuffer(u)&&(u=m(u)),typeof l=="function"&&(o=l,l=null),M?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=x),r.ended?$(this,o):(M||k(this,r,u,o))&&(r.pendingcb++,h=L(this,r,M,u,l,o)),h},B.prototype.cork=function(){var u=this._writableState;u.corked++},B.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&ue(this,u))},B.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function I(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=v.from(l,o)),l}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(u,l,o,r,h,M){if(!o){var T=I(l,r,h);r!==T&&(o=!0,h="buffer",r=T)}var N=l.objectMode?1:r.length;l.length+=N;var Q=l.length<l.highWaterMark;if(Q||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:M,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else D(u,l,!1,N,r,h,M);return Q}function D(u,l,o,r,h,M,T){l.writelen=r,l.writecb=T,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,M,l.onwrite),l.sync=!1}function G(u,l,o,r,h){--l.pendingcb,o?(b.nextTick(h,r),b.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function X(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function te(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(X(o),l)G(u,o,r,l,h);else{var M=c(o);!M&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&ue(u,o),r?S(ie,u,o,M,h):ie(u,o,M,h)}}function ie(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function ue(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),M=l.corkedRequestsFree;M.entry=o;for(var T=0,N=!0;o;)h[T]=o,o.isBuf||(N=!1),o=o.next,T+=1;h.allBuffers=N,D(u,l,!0,l.length,h,"",M.finish),l.pendingcb++,l.lastBufferedRequest=null,M.next?(l.corkedRequestsFree=M.next,M.next=null):l.corkedRequestsFree=new _(l),l.bufferedRequestCount=0}else{for(;o;){var Q=o.chunk,K=o.encoding,A=o.callback,O=l.objectMode?1:Q.length;if(D(u,l,!1,O,Q,K,A),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}B.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},B.prototype._writev=null,B.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||f(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,b.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function f(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?b.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(B.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),B.prototype.destroy=g.destroy,B.prototype._undestroy=g.undestroy,B.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var b=requireProcessNextickArgs(),_=Object.keys||function(g){var x=[];for(var R in g)x.push(R);return x};_stream_duplex$1=y;var S=Object.create(requireUtil());S.inherits=requireInherits_browser$5();var p=require_stream_readable$1(),E=require_stream_writable$1();S.inherits(y,p);for(var a=_(E.prototype),w=0;w<a.length;w++){var v=a[w];y.prototype[v]||(y.prototype[v]=E.prototype[v])}function y(g){if(!(this instanceof y))return new y(g);p.call(this,g),E.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",m)}Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m(){this.allowHalfOpen||this._writableState.ended||b.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(y.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),y.prototype._destroy=function(g,x){this.push(null),this.end(),b.nextTick(x,g)},_stream_duplex$1}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1;var b=requireProcessNextickArgs();_stream_readable$1=I;var _=requireIsarray$1(),S;I.ReadableState=k,requireEvents().EventEmitter;var p=function(A,O){return A.listeners(O).length},E=requireStreamBrowser$1(),a=requireSafeBuffer$1().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function v(A){return a.from(A)}function y(A){return a.isBuffer(A)||A instanceof w}var m=Object.create(requireUtil());m.inherits=requireInherits_browser$5();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var x=requireBufferList$1(),R=requireDestroy$1(),q;m.inherits(I,E);var B=["error","close","destroy","pause","resume"];function $(A,O,W){if(typeof A.prependListener=="function")return A.prependListener(O,W);!A._events||!A._events[O]?A.on(O,W):_(A._events[O])?A._events[O].unshift(W):A._events[O]=[W,A._events[O]]}function k(A,O){S=S||require_stream_duplex$1(),A=A||{};var W=O instanceof S;this.objectMode=!!A.objectMode,W&&(this.objectMode=this.objectMode||!!A.readableObjectMode);var Y=A.highWaterMark,Z=A.readableHighWaterMark,j=this.objectMode?16:16*1024;Y||Y===0?this.highWaterMark=Y:W&&(Z||Z===0)?this.highWaterMark=Z:this.highWaterMark=j,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(q||(q=requireString_decoder().StringDecoder),this.decoder=new q(A.encoding),this.encoding=A.encoding)}function I(A){if(S=S||require_stream_duplex$1(),!(this instanceof I))return new I(A);this._readableState=new k(A,this),this.readable=!0,A&&(typeof A.read=="function"&&(this._read=A.read),typeof A.destroy=="function"&&(this._destroy=A.destroy)),E.call(this)}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(A){this._readableState&&(this._readableState.destroyed=A)}}),I.prototype.destroy=R.destroy,I.prototype._undestroy=R.undestroy,I.prototype._destroy=function(A,O){this.push(null),O(A)},I.prototype.push=function(A,O){var W=this._readableState,Y;return W.objectMode?Y=!0:typeof A=="string"&&(O=O||W.defaultEncoding,O!==W.encoding&&(A=a.from(A,O),O=""),Y=!0),L(this,A,O,!1,Y)},I.prototype.unshift=function(A){return L(this,A,null,!0,!1)};function L(A,O,W,Y,Z){var j=A._readableState;if(O===null)j.reading=!1,ue(A,j);else{var ne;Z||(ne=G(j,O)),ne?A.emit("error",ne):j.objectMode||O&&O.length>0?(typeof O!="string"&&!j.objectMode&&Object.getPrototypeOf(O)!==a.prototype&&(O=v(O)),Y?j.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):D(A,j,O,!0):j.ended?A.emit("error",new Error("stream.push() after EOF")):(j.reading=!1,j.decoder&&!W?(O=j.decoder.write(O),j.objectMode||O.length!==0?D(A,j,O,!1):t(A,j)):D(A,j,O,!1))):Y||(j.reading=!1)}return X(j)}function D(A,O,W,Y){O.flowing&&O.length===0&&!O.sync?(A.emit("data",W),A.read(0)):(O.length+=O.objectMode?1:W.length,Y?O.buffer.unshift(W):O.buffer.push(W),O.needReadable&&c(A)),t(A,O)}function G(A,O){var W;return!y(O)&&typeof O!="string"&&O!==void 0&&!A.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function X(A){return!A.ended&&(A.needReadable||A.length<A.highWaterMark||A.length===0)}I.prototype.isPaused=function(){return this._readableState.flowing===!1},I.prototype.setEncoding=function(A){return q||(q=requireString_decoder().StringDecoder),this._readableState.decoder=new q(A),this._readableState.encoding=A,this};var te=8388608;function ie(A){return A>=te?A=te:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}function ee(A,O){return A<=0||O.length===0&&O.ended?0:O.objectMode?1:A!==A?O.flowing&&O.length?O.buffer.head.data.length:O.length:(A>O.highWaterMark&&(O.highWaterMark=ie(A)),A<=O.length?A:O.ended?O.length:(O.needReadable=!0,0))}I.prototype.read=function(A){g("read",A),A=parseInt(A,10);var O=this._readableState,W=A;if(A!==0&&(O.emittedReadable=!1),A===0&&O.needReadable&&(O.length>=O.highWaterMark||O.ended))return g("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?N(this):c(this),null;if(A=ee(A,O),A===0&&O.ended)return O.length===0&&N(this),null;var Y=O.needReadable;g("need readable",Y),(O.length===0||O.length-A<O.highWaterMark)&&(Y=!0,g("length less than watermark",Y)),O.ended||O.reading?(Y=!1,g("reading or ended",Y)):Y&&(g("do read"),O.reading=!0,O.sync=!0,O.length===0&&(O.needReadable=!0),this._read(O.highWaterMark),O.sync=!1,O.reading||(A=ee(W,O)));var Z;return A>0?Z=r(A,O):Z=null,Z===null?(O.needReadable=!0,A=0):O.length-=A,O.length===0&&(O.ended||(O.needReadable=!0),W!==A&&O.ended&&N(this)),Z!==null&&this.emit("data",Z),Z};function ue(A,O){if(!O.ended){if(O.decoder){var W=O.decoder.end();W&&W.length&&(O.buffer.push(W),O.length+=O.objectMode?1:W.length)}O.ended=!0,c(A)}}function c(A){var O=A._readableState;O.needReadable=!1,O.emittedReadable||(g("emitReadable",O.flowing),O.emittedReadable=!0,O.sync?b.nextTick(e,A):e(A))}function e(A){g("emit readable"),A.emit("readable"),o(A)}function t(A,O){O.readingMore||(O.readingMore=!0,b.nextTick(n,A,O))}function n(A,O){for(var W=O.length;!O.reading&&!O.flowing&&!O.ended&&O.length<O.highWaterMark&&(g("maybeReadMore read 0"),A.read(0),W!==O.length);)W=O.length;O.readingMore=!1}I.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},I.prototype.pipe=function(A,O){var W=this,Y=this._readableState;switch(Y.pipesCount){case 0:Y.pipes=A;break;case 1:Y.pipes=[Y.pipes,A];break;default:Y.pipes.push(A);break}Y.pipesCount+=1,g("pipe count=%d opts=%j",Y.pipesCount,O);var Z=(!O||O.end!==!1)&&A!==process$1.stdout&&A!==process$1.stderr,j=Z?Re:De;Y.endEmitted?b.nextTick(j):W.once("end",j),A.on("unpipe",ne);function ne(ye,xe){g("onunpipe"),ye===W&&xe&&xe.hasUnpiped===!1&&(xe.hasUnpiped=!0,Pe())}function Re(){g("onend"),A.end()}var le=f(W);A.on("drain",le);var de=!1;function Pe(){g("cleanup"),A.removeListener("close",ve),A.removeListener("finish",ge),A.removeListener("drain",le),A.removeListener("error",Le),A.removeListener("unpipe",ne),W.removeListener("end",Re),W.removeListener("end",De),W.removeListener("data",he),de=!0,Y.awaitDrain&&(!A._writableState||A._writableState.needDrain)&&le()}var me=!1;W.on("data",he);function he(ye){g("ondata"),me=!1;var xe=A.write(ye);xe===!1&&!me&&((Y.pipesCount===1&&Y.pipes===A||Y.pipesCount>1&&K(Y.pipes,A)!==-1)&&!de&&(g("false write response, pause",Y.awaitDrain),Y.awaitDrain++,me=!0),W.pause())}function Le(ye){g("onerror",ye),De(),A.removeListener("error",Le),p(A,"error")===0&&A.emit("error",ye)}$(A,"error",Le);function ve(){A.removeListener("finish",ge),De()}A.once("close",ve);function ge(){g("onfinish"),A.removeListener("close",ve),De()}A.once("finish",ge);function De(){g("unpipe"),W.unpipe(A)}return A.emit("pipe",W),Y.flowing||(g("pipe resume"),W.resume()),A};function f(A){return function(){var O=A._readableState;g("pipeOnDrain",O.awaitDrain),O.awaitDrain&&O.awaitDrain--,O.awaitDrain===0&&p(A,"data")&&(O.flowing=!0,o(A))}}I.prototype.unpipe=function(A){var O=this._readableState,W={hasUnpiped:!1};if(O.pipesCount===0)return this;if(O.pipesCount===1)return A&&A!==O.pipes?this:(A||(A=O.pipes),O.pipes=null,O.pipesCount=0,O.flowing=!1,A&&A.emit("unpipe",this,W),this);if(!A){var Y=O.pipes,Z=O.pipesCount;O.pipes=null,O.pipesCount=0,O.flowing=!1;for(var j=0;j<Z;j++)Y[j].emit("unpipe",this,{hasUnpiped:!1});return this}var ne=K(O.pipes,A);return ne===-1?this:(O.pipes.splice(ne,1),O.pipesCount-=1,O.pipesCount===1&&(O.pipes=O.pipes[0]),A.emit("unpipe",this,W),this)},I.prototype.on=function(A,O){var W=E.prototype.on.call(this,A,O);if(A==="data")this._readableState.flowing!==!1&&this.resume();else if(A==="readable"){var Y=this._readableState;!Y.endEmitted&&!Y.readableListening&&(Y.readableListening=Y.needReadable=!0,Y.emittedReadable=!1,Y.reading?Y.length&&c(this):b.nextTick(s,this))}return W},I.prototype.addListener=I.prototype.on;function s(A){g("readable nexttick read 0"),A.read(0)}I.prototype.resume=function(){var A=this._readableState;return A.flowing||(g("resume"),A.flowing=!0,u(this,A)),this};function u(A,O){O.resumeScheduled||(O.resumeScheduled=!0,b.nextTick(l,A,O))}function l(A,O){O.reading||(g("resume read 0"),A.read(0)),O.resumeScheduled=!1,O.awaitDrain=0,A.emit("resume"),o(A),O.flowing&&!O.reading&&A.read(0)}I.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(A){var O=A._readableState;for(g("flow",O.flowing);O.flowing&&A.read()!==null;);}I.prototype.wrap=function(A){var O=this,W=this._readableState,Y=!1;A.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var ne=W.decoder.end();ne&&ne.length&&O.push(ne)}O.push(null)}),A.on("data",function(ne){if(g("wrapped data"),W.decoder&&(ne=W.decoder.write(ne)),!(W.objectMode&&ne==null)&&!(!W.objectMode&&(!ne||!ne.length))){var Re=O.push(ne);Re||(Y=!0,A.pause())}});for(var Z in A)this[Z]===void 0&&typeof A[Z]=="function"&&(this[Z]=(function(ne){return function(){return A[ne].apply(A,arguments)}})(Z));for(var j=0;j<B.length;j++)A.on(B[j],this.emit.bind(this,B[j]));return this._read=function(ne){g("wrapped _read",ne),Y&&(Y=!1,A.resume())},this},Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),I._fromList=r;function r(A,O){if(O.length===0)return null;var W;return O.objectMode?W=O.buffer.shift():!A||A>=O.length?(O.decoder?W=O.buffer.join(""):O.buffer.length===1?W=O.buffer.head.data:W=O.buffer.concat(O.length),O.buffer.clear()):W=h(A,O.buffer,O.decoder),W}function h(A,O,W){var Y;return A<O.head.data.length?(Y=O.head.data.slice(0,A),O.head.data=O.head.data.slice(A)):A===O.head.data.length?Y=O.shift():Y=W?M(A,O):T(A,O),Y}function M(A,O){var W=O.head,Y=1,Z=W.data;for(A-=Z.length;W=W.next;){var j=W.data,ne=A>j.length?j.length:A;if(ne===j.length?Z+=j:Z+=j.slice(0,A),A-=ne,A===0){ne===j.length?(++Y,W.next?O.head=W.next:O.head=O.tail=null):(O.head=W,W.data=j.slice(ne));break}++Y}return O.length-=Y,Z}function T(A,O){var W=a.allocUnsafe(A),Y=O.head,Z=1;for(Y.data.copy(W),A-=Y.data.length;Y=Y.next;){var j=Y.data,ne=A>j.length?j.length:A;if(j.copy(W,W.length-A,0,ne),A-=ne,A===0){ne===j.length?(++Z,Y.next?O.head=Y.next:O.head=O.tail=null):(O.head=Y,Y.data=j.slice(ne));break}++Z}return O.length-=Z,W}function N(A){var O=A._readableState;if(O.length>0)throw new Error('"endReadable()" called on non-empty stream');O.endEmitted||(O.ended=!0,b.nextTick(Q,O,A))}function Q(A,O){!A.endEmitted&&A.length===0&&(A.endEmitted=!0,O.readable=!1,O.emit("end"))}function K(A,O){for(var W=0,Y=A.length;W<Y;W++)if(A[W]===O)return W;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=p;var b=require_stream_duplex$1(),_=Object.create(requireUtil());_.inherits=requireInherits_browser$5(),_.inherits(p,b);function S(w,v){var y=this._transformState;y.transforming=!1;var m=y.writecb;if(!m)return this.emit("error",new Error("write callback called multiple times"));y.writechunk=null,y.writecb=null,v!=null&&this.push(v),m(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);b.call(this,w),this._transformState={afterTransform:S.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",E)}function E(){var w=this;typeof this._flush=="function"?this._flush(function(v,y){a(w,v,y)}):a(this,null,null)}p.prototype.push=function(w,v){return this._transformState.needTransform=!1,b.prototype.push.call(this,w,v)},p.prototype._transform=function(w,v,y){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,v,y){var m=this._transformState;if(m.writecb=y,m.writechunk=w,m.writeencoding=v,!m.transforming){var d=this._readableState;(m.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var v=this._transformState;v.writechunk!==null&&v.writecb&&!v.transforming?(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform)):v.needTransform=!0},p.prototype._destroy=function(w,v){var y=this;b.prototype._destroy.call(this,w,function(m){v(m),y.emit("close")})};function a(w,v,y){if(v)return w.emit("error",v);if(y!=null&&w.push(y),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=S;var b=require_stream_transform$1(),_=Object.create(requireUtil());_.inherits=requireInherits_browser$5(),_.inherits(S,b);function S(p){if(!(this instanceof S))return new S(p);b.call(this,p)}return S.prototype._transform=function(p,E,a){a(null,p)},_stream_passthrough$1}var hasRequiredReadableBrowser$2;function requireReadableBrowser$2(){return hasRequiredReadableBrowser$2||(hasRequiredReadableBrowser$2=1,(function(b,_){_=b.exports=require_stream_readable$1(),_.Stream=_,_.Readable=_,_.Writable=require_stream_writable$1(),_.Duplex=require_stream_duplex$1(),_.Transform=require_stream_transform$1(),_.PassThrough=require_stream_passthrough$1()})(readableBrowser$2,readableBrowser$2.exports)),readableBrowser$2.exports}var hashBase,hasRequiredHashBase;function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var b=requireSafeBuffer$2().Buffer,_=requireToBuffer$1(),S=requireReadableBrowser$2().Transform,p=requireInherits_browser$5();function E(a){S.call(this),this._block=b.allocUnsafe(a),this._blockSize=a,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return p(E,S),E.prototype._transform=function(a,w,v){var y=null;try{this.update(a,w)}catch(m){y=m}v(y)},E.prototype._flush=function(a){var w=null;try{this.push(this.digest())}catch(v){w=v}a(w)},E.prototype.update=function(a,w){if(this._finalized)throw new Error("Digest already called");for(var v=_(a,w),y=this._block,m=0;this._blockOffset+v.length-m>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)y[d]=v[m],d+=1,m+=1;this._update(),this._blockOffset=0}for(;m<v.length;)y[this._blockOffset]=v[m],this._blockOffset+=1,m+=1;for(var g=0,x=v.length*8;x>0;++g)this._length[g]+=x,x=this._length[g]/4294967296|0,x>0&&(this._length[g]-=4294967296*x);return this},E.prototype._update=function(){throw new Error("_update is not implemented")},E.prototype.digest=function(a){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var w=this._digest();a!==void 0&&(w=w.toString(a)),this._block.fill(0),this._blockOffset=0;for(var v=0;v<4;++v)this._length[v]=0;return w},E.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=E,hashBase}var ripemd160,hasRequiredRipemd160;function requireRipemd160(){if(hasRequiredRipemd160)return ripemd160;hasRequiredRipemd160=1;var b=requireDist().Buffer,_=requireInherits_browser$5(),S=requireHashBase(),p=new Array(16),E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],a=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],w=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],y=[0,1518500249,1859775393,2400959708,2840853838],m=[1352829926,1548603684,1836072691,2053994217,0];function d(k,I){return k<<I|k>>>32-I}function g(k,I,L,D,G,X,te,ie){return d(k+(I^L^D)+X+te|0,ie)+G|0}function x(k,I,L,D,G,X,te,ie){return d(k+(I&L|~I&D)+X+te|0,ie)+G|0}function R(k,I,L,D,G,X,te,ie){return d(k+((I|~L)^D)+X+te|0,ie)+G|0}function q(k,I,L,D,G,X,te,ie){return d(k+(I&D|L&~D)+X+te|0,ie)+G|0}function B(k,I,L,D,G,X,te,ie){return d(k+(I^(L|~D))+X+te|0,ie)+G|0}function $(){S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}return _($,S),$.prototype._update=function(){for(var k=p,I=0;I<16;++I)k[I]=this._block.readInt32LE(I*4);for(var L=this._a|0,D=this._b|0,G=this._c|0,X=this._d|0,te=this._e|0,ie=this._a|0,ee=this._b|0,ue=this._c|0,c=this._d|0,e=this._e|0,t=0;t<80;t+=1){var n,f;t<16?(n=g(L,D,G,X,te,k[E[t]],y[0],w[t]),f=B(ie,ee,ue,c,e,k[a[t]],m[0],v[t])):t<32?(n=x(L,D,G,X,te,k[E[t]],y[1],w[t]),f=q(ie,ee,ue,c,e,k[a[t]],m[1],v[t])):t<48?(n=R(L,D,G,X,te,k[E[t]],y[2],w[t]),f=R(ie,ee,ue,c,e,k[a[t]],m[2],v[t])):t<64?(n=q(L,D,G,X,te,k[E[t]],y[3],w[t]),f=x(ie,ee,ue,c,e,k[a[t]],m[3],v[t])):(n=B(L,D,G,X,te,k[E[t]],y[4],w[t]),f=g(ie,ee,ue,c,e,k[a[t]],m[4],v[t])),L=te,te=X,X=d(G,10),G=D,D=n,ie=e,e=c,c=d(ue,10),ue=ee,ee=f}var s=this._b+G+c|0;this._b=this._c+X+e|0,this._c=this._d+te+ie|0,this._d=this._e+L+ee|0,this._e=this._a+D+ue|0,this._a=s},$.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var k=b.alloc?b.alloc(20):new b(20);return k.writeInt32LE(this._a,0),k.writeInt32LE(this._b,4),k.writeInt32LE(this._c,8),k.writeInt32LE(this._d,12),k.writeInt32LE(this._e,16),k},ripemd160=$,ripemd160}var sha_js={exports:{}},inherits_browser$4={exports:{}},hasRequiredInherits_browser$4;function requireInherits_browser$4(){return hasRequiredInherits_browser$4||(hasRequiredInherits_browser$4=1,typeof Object.create=="function"?inherits_browser$4.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$4.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser$4.exports}var hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var b=requireSafeBuffer$2().Buffer,_=requireToBuffer$2();function S(p,E){this._block=b.alloc(p),this._finalSize=E,this._blockSize=p,this._len=0}return S.prototype.update=function(p,E){p=_(p,E||"utf8");for(var a=this._block,w=this._blockSize,v=p.length,y=this._len,m=0;m<v;){for(var d=y%w,g=Math.min(v-m,w-d),x=0;x<g;x++)a[d+x]=p[m+x];y+=g,m+=g,y%w===0&&this._update(a)}return this._len+=v,this},S.prototype.digest=function(p){var E=this._len%this._blockSize;this._block[E]=128,this._block.fill(0,E+1),E>=this._finalSize&&(this._update(this._block),this._block.fill(0));var a=this._len*8;if(a<=4294967295)this._block.writeUInt32BE(a,this._blockSize-4);else{var w=(a&4294967295)>>>0,v=(a-w)/4294967296;this._block.writeUInt32BE(v,this._blockSize-8),this._block.writeUInt32BE(w,this._blockSize-4)}this._update(this._block);var y=this._hash();return p?y.toString(p):y},S.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=S,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var b=requireInherits_browser$4(),_=requireHash$1(),S=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],E=new Array(80);function a(){this.init(),this._w=E,_.call(this,64,56)}b(a,_),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(m){return m<<5|m>>>27}function v(m){return m<<30|m>>>2}function y(m,d,g,x){return m===0?d&g|~d&x:m===2?d&g|d&x|g&x:d^g^x}return a.prototype._update=function(m){for(var d=this._w,g=this._a|0,x=this._b|0,R=this._c|0,q=this._d|0,B=this._e|0,$=0;$<16;++$)d[$]=m.readInt32BE($*4);for(;$<80;++$)d[$]=d[$-3]^d[$-8]^d[$-14]^d[$-16];for(var k=0;k<80;++k){var I=~~(k/20),L=w(g)+y(I,x,R,q)+B+d[k]+p[I]|0;B=q,q=R,R=v(x),x=g,g=L}this._a=g+this._a|0,this._b=x+this._b|0,this._c=R+this._c|0,this._d=q+this._d|0,this._e=B+this._e|0},a.prototype._hash=function(){var m=S.allocUnsafe(20);return m.writeInt32BE(this._a|0,0),m.writeInt32BE(this._b|0,4),m.writeInt32BE(this._c|0,8),m.writeInt32BE(this._d|0,12),m.writeInt32BE(this._e|0,16),m},sha$1=a,sha$1}var sha1,hasRequiredSha1;function requireSha1(){if(hasRequiredSha1)return sha1;hasRequiredSha1=1;var b=requireInherits_browser$4(),_=requireHash$1(),S=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],E=new Array(80);function a(){this.init(),this._w=E,_.call(this,64,56)}b(a,_),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(d){return d<<1|d>>>31}function v(d){return d<<5|d>>>27}function y(d){return d<<30|d>>>2}function m(d,g,x,R){return d===0?g&x|~g&R:d===2?g&x|g&R|x&R:g^x^R}return a.prototype._update=function(d){for(var g=this._w,x=this._a|0,R=this._b|0,q=this._c|0,B=this._d|0,$=this._e|0,k=0;k<16;++k)g[k]=d.readInt32BE(k*4);for(;k<80;++k)g[k]=w(g[k-3]^g[k-8]^g[k-14]^g[k-16]);for(var I=0;I<80;++I){var L=~~(I/20),D=v(x)+m(L,R,q,B)+$+g[I]+p[L]|0;$=B,B=q,q=y(R),R=x,x=D}this._a=x+this._a|0,this._b=R+this._b|0,this._c=q+this._c|0,this._d=B+this._d|0,this._e=$+this._e|0},a.prototype._hash=function(){var d=S.allocUnsafe(20);return d.writeInt32BE(this._a|0,0),d.writeInt32BE(this._b|0,4),d.writeInt32BE(this._c|0,8),d.writeInt32BE(this._d|0,12),d.writeInt32BE(this._e|0,16),d},sha1=a,sha1}var sha256$1,hasRequiredSha256;function requireSha256(){if(hasRequiredSha256)return sha256$1;hasRequiredSha256=1;var b=requireInherits_browser$4(),_=requireHash$1(),S=requireSafeBuffer$2().Buffer,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],E=new Array(64);function a(){this.init(),this._w=E,_.call(this,64,56)}b(a,_),a.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function w(x,R,q){return q^x&(R^q)}function v(x,R,q){return x&R|q&(x|R)}function y(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function m(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function d(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}function g(x){return(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10}return a.prototype._update=function(x){for(var R=this._w,q=this._a|0,B=this._b|0,$=this._c|0,k=this._d|0,I=this._e|0,L=this._f|0,D=this._g|0,G=this._h|0,X=0;X<16;++X)R[X]=x.readInt32BE(X*4);for(;X<64;++X)R[X]=g(R[X-2])+R[X-7]+d(R[X-15])+R[X-16]|0;for(var te=0;te<64;++te){var ie=G+m(I)+w(I,L,D)+p[te]+R[te]|0,ee=y(q)+v(q,B,$)|0;G=D,D=L,L=I,I=k+ie|0,k=$,$=B,B=q,q=ie+ee|0}this._a=q+this._a|0,this._b=B+this._b|0,this._c=$+this._c|0,this._d=k+this._d|0,this._e=I+this._e|0,this._f=L+this._f|0,this._g=D+this._g|0,this._h=G+this._h|0},a.prototype._hash=function(){var x=S.allocUnsafe(32);return x.writeInt32BE(this._a,0),x.writeInt32BE(this._b,4),x.writeInt32BE(this._c,8),x.writeInt32BE(this._d,12),x.writeInt32BE(this._e,16),x.writeInt32BE(this._f,20),x.writeInt32BE(this._g,24),x.writeInt32BE(this._h,28),x},sha256$1=a,sha256$1}var sha224$1,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$1;hasRequiredSha224=1;var b=requireInherits_browser$4(),_=requireSha256(),S=requireHash$1(),p=requireSafeBuffer$2().Buffer,E=new Array(64);function a(){this.init(),this._w=E,S.call(this,64,56)}return b(a,_),a.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},a.prototype._hash=function(){var w=p.allocUnsafe(28);return w.writeInt32BE(this._a,0),w.writeInt32BE(this._b,4),w.writeInt32BE(this._c,8),w.writeInt32BE(this._d,12),w.writeInt32BE(this._e,16),w.writeInt32BE(this._f,20),w.writeInt32BE(this._g,24),w},sha224$1=a,sha224$1}var sha512$1,hasRequiredSha512;function requireSha512(){if(hasRequiredSha512)return sha512$1;hasRequiredSha512=1;var b=requireInherits_browser$4(),_=requireHash$1(),S=requireSafeBuffer$2().Buffer,p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],E=new Array(160);function a(){this.init(),this._w=E,_.call(this,128,112)}b(a,_),a.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function w(B,$,k){return k^B&($^k)}function v(B,$,k){return B&$|k&(B|$)}function y(B,$){return(B>>>28|$<<4)^($>>>2|B<<30)^($>>>7|B<<25)}function m(B,$){return(B>>>14|$<<18)^(B>>>18|$<<14)^($>>>9|B<<23)}function d(B,$){return(B>>>1|$<<31)^(B>>>8|$<<24)^B>>>7}function g(B,$){return(B>>>1|$<<31)^(B>>>8|$<<24)^(B>>>7|$<<25)}function x(B,$){return(B>>>19|$<<13)^($>>>29|B<<3)^B>>>6}function R(B,$){return(B>>>19|$<<13)^($>>>29|B<<3)^(B>>>6|$<<26)}function q(B,$){return B>>>0<$>>>0?1:0}return a.prototype._update=function(B){for(var $=this._w,k=this._ah|0,I=this._bh|0,L=this._ch|0,D=this._dh|0,G=this._eh|0,X=this._fh|0,te=this._gh|0,ie=this._hh|0,ee=this._al|0,ue=this._bl|0,c=this._cl|0,e=this._dl|0,t=this._el|0,n=this._fl|0,f=this._gl|0,s=this._hl|0,u=0;u<32;u+=2)$[u]=B.readInt32BE(u*4),$[u+1]=B.readInt32BE(u*4+4);for(;u<160;u+=2){var l=$[u-30],o=$[u-30+1],r=d(l,o),h=g(o,l);l=$[u-4],o=$[u-4+1];var M=x(l,o),T=R(o,l),N=$[u-14],Q=$[u-14+1],K=$[u-32],A=$[u-32+1],O=h+Q|0,W=r+N+q(O,h)|0;O=O+T|0,W=W+M+q(O,T)|0,O=O+A|0,W=W+K+q(O,A)|0,$[u]=W,$[u+1]=O}for(var Y=0;Y<160;Y+=2){W=$[Y],O=$[Y+1];var Z=v(k,I,L),j=v(ee,ue,c),ne=y(k,ee),Re=y(ee,k),le=m(G,t),de=m(t,G),Pe=p[Y],me=p[Y+1],he=w(G,X,te),Le=w(t,n,f),ve=s+de|0,ge=ie+le+q(ve,s)|0;ve=ve+Le|0,ge=ge+he+q(ve,Le)|0,ve=ve+me|0,ge=ge+Pe+q(ve,me)|0,ve=ve+O|0,ge=ge+W+q(ve,O)|0;var De=Re+j|0,ye=ne+Z+q(De,Re)|0;ie=te,s=f,te=X,f=n,X=G,n=t,t=e+ve|0,G=D+ge+q(t,e)|0,D=L,e=c,L=I,c=ue,I=k,ue=ee,ee=ve+De|0,k=ge+ye+q(ee,ve)|0}this._al=this._al+ee|0,this._bl=this._bl+ue|0,this._cl=this._cl+c|0,this._dl=this._dl+e|0,this._el=this._el+t|0,this._fl=this._fl+n|0,this._gl=this._gl+f|0,this._hl=this._hl+s|0,this._ah=this._ah+k+q(this._al,ee)|0,this._bh=this._bh+I+q(this._bl,ue)|0,this._ch=this._ch+L+q(this._cl,c)|0,this._dh=this._dh+D+q(this._dl,e)|0,this._eh=this._eh+G+q(this._el,t)|0,this._fh=this._fh+X+q(this._fl,n)|0,this._gh=this._gh+te+q(this._gl,f)|0,this._hh=this._hh+ie+q(this._hl,s)|0},a.prototype._hash=function(){var B=S.allocUnsafe(64);function $(k,I,L){B.writeInt32BE(k,L),B.writeInt32BE(I,L+4)}return $(this._ah,this._al,0),$(this._bh,this._bl,8),$(this._ch,this._cl,16),$(this._dh,this._dl,24),$(this._eh,this._el,32),$(this._fh,this._fl,40),$(this._gh,this._gl,48),$(this._hh,this._hl,56),B},sha512$1=a,sha512$1}var sha384$1,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$1;hasRequiredSha384=1;var b=requireInherits_browser$4(),_=requireSha512(),S=requireHash$1(),p=requireSafeBuffer$2().Buffer,E=new Array(160);function a(){this.init(),this._w=E,S.call(this,128,112)}return b(a,_),a.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},a.prototype._hash=function(){var w=p.allocUnsafe(48);function v(y,m,d){w.writeInt32BE(y,d),w.writeInt32BE(m,d+4)}return v(this._ah,this._al,0),v(this._bh,this._bl,8),v(this._ch,this._cl,16),v(this._dh,this._dl,24),v(this._eh,this._el,32),v(this._fh,this._fl,40),w},sha384$1=a,sha384$1}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,(function(b){b.exports=function(S){var p=S.toLowerCase(),E=b.exports[p];if(!E)throw new Error(p+" is not supported (we accept pull requests)");return new E},b.exports.sha=requireSha$1(),b.exports.sha1=requireSha1(),b.exports.sha224=requireSha224(),b.exports.sha256=requireSha256(),b.exports.sha384=requireSha384(),b.exports.sha512=requireSha512()})(sha_js)),sha_js.exports}var inherits_browser$3={exports:{}},hasRequiredInherits_browser$3;function requireInherits_browser$3(){return hasRequiredInherits_browser$3||(hasRequiredInherits_browser$3=1,typeof Object.create=="function"?inherits_browser$3.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$3.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser$3.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var b=requireSafeBuffer$2().Buffer,_=requireStreamBrowserify().Transform,S=requireString_decoder().StringDecoder,p=requireInherits_browser$3(),E=requireToBuffer$2();function a(w){_.call(this),this.hashMode=typeof w=="string",this.hashMode?this[w]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return p(a,_),a.prototype.update=function(w,v,y){var m=E(w,v),d=this._update(m);return this.hashMode?this:(y&&(d=this._toString(d,y)),d)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(w,v,y){var m;try{this.hashMode?this._update(w):this.push(this._update(w))}catch(d){m=d}finally{y(m)}},a.prototype._flush=function(w){var v;try{this.push(this.__final())}catch(y){v=y}w(v)},a.prototype._finalOrDigest=function(w){var v=this.__final()||b.alloc(0);return w&&(v=this._toString(v,w,!0)),v},a.prototype._toString=function(w,v,y){if(this._decoder||(this._decoder=new S(v),this._encoding=v),this._encoding!==v)throw new Error("can’t switch encodings");var m=this._decoder.write(w);return y&&(m+=this._decoder.end()),m},cipherBase=a,cipherBase}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1;var b=requireInherits_browser$8(),_=requireMd5_js(),S=requireRipemd160(),p=requireSha_js(),E=requireCipherBase();function a(w){E.call(this,"digest"),this._hash=w}return b(a,E),a.prototype._update=function(w){this._hash.update(w)},a.prototype._final=function(){return this._hash.digest()},browser$a=function(v){return v=v.toLowerCase(),v==="md5"?new _:v==="rmd160"||v==="ripemd160"?new S:new a(p(v))},browser$a}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var b=requireInherits_browser$8(),_=requireSafeBuffer$2().Buffer,S=requireCipherBase(),p=_.alloc(128),E=64;function a(w,v){S.call(this,"digest"),typeof v=="string"&&(v=_.from(v)),this._alg=w,this._key=v,v.length>E?v=w(v):v.length<E&&(v=_.concat([v,p],E));for(var y=this._ipad=_.allocUnsafe(E),m=this._opad=_.allocUnsafe(E),d=0;d<E;d++)y[d]=v[d]^54,m[d]=v[d]^92;this._hash=[y]}return b(a,S),a.prototype._update=function(w){this._hash.push(w)},a.prototype._final=function(){var w=this._alg(_.concat(this._hash));return this._alg(_.concat([this._opad,w]))},legacy=a,legacy}var md5,hasRequiredMd5;function requireMd5(){if(hasRequiredMd5)return md5;hasRequiredMd5=1;var b=requireMd5_js();return md5=function(_){return new b().update(_).digest()},md5}var browser$9,hasRequiredBrowser$9;function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var b=requireInherits_browser$8(),_=requireLegacy(),S=requireCipherBase(),p=requireSafeBuffer$2().Buffer,E=requireMd5(),a=requireRipemd160(),w=requireSha_js(),v=p.alloc(128);function y(m,d){S.call(this,"digest"),typeof d=="string"&&(d=p.from(d));var g=m==="sha512"||m==="sha384"?128:64;if(this._alg=m,this._key=d,d.length>g){var x=m==="rmd160"?new a:w(m);d=x.update(d).digest()}else d.length<g&&(d=p.concat([d,v],g));for(var R=this._ipad=p.allocUnsafe(g),q=this._opad=p.allocUnsafe(g),B=0;B<g;B++)R[B]=d[B]^54,q[B]=d[B]^92;this._hash=m==="rmd160"?new a:w(m),this._hash.update(R)}return b(y,S),y.prototype._update=function(m){this._hash.update(m)},y.prototype._final=function(){var m=this._hash.digest(),d=this._alg==="rmd160"?new a:w(this._alg);return d.update(this._opad).update(m).digest()},browser$9=function(d,g){return d=d.toLowerCase(),d==="rmd160"||d==="ripemd160"?new y("rmd160",g):d==="md5"?new _(E,g):new y(d,g)},browser$9}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256={sign:"ecdsa",hash:"sha256",id:""},sha224={sign:"ecdsa",hash:"sha224",id:""},sha384={sign:"ecdsa",hash:"sha384",id:""},sha512={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},require$$6={sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256,sha224,sha384,sha512,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos||(hasRequiredAlgos=1,algos=require$$6),algos}var browser$8={},precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var b=isFinite,_=Math.pow(2,30)-1;return precondition=function(S,p){if(typeof S!="number")throw new TypeError("Iterations not a number");if(S<0||!b(S))throw new TypeError("Bad iterations");if(typeof p!="number")throw new TypeError("Key length not a number");if(p<0||p>_||p!==p)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var b;if(commonjsGlobal.process&&commonjsGlobal.process.browser)b="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var _=parseInt(process$1.version.split(".")[0].slice(1),10);b=_>=6?"utf-8":"binary"}else b="utf-8";return defaultEncoding_1=b,defaultEncoding_1}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var b=requireSafeBuffer$2().Buffer,_=requireToBuffer$2(),S=typeof Uint8Array<"u",p=S&&typeof ArrayBuffer<"u",E=p&&ArrayBuffer.isView;return toBuffer_1=function(a,w,v){if(typeof a=="string"||b.isBuffer(a)||S&&a instanceof Uint8Array||E&&E(a))return _(a,w);throw new TypeError(v+" must be a string, a Buffer, a Uint8Array, or a DataView")},toBuffer_1}var syncBrowser,hasRequiredSyncBrowser;function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var b=requireMd5(),_=requireRipemd160(),S=requireSha_js(),p=requireSafeBuffer$2().Buffer,E=requirePrecondition(),a=requireDefaultEncoding(),w=requireToBuffer(),v=p.alloc(128),y={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},m={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function d(q){return new _().update(q).digest()}function g(q){function B($){return S(q).update($).digest()}return q==="rmd160"||q==="ripemd160"?d:q==="md5"?b:B}function x(q,B,$){var k=g(q),I=q==="sha512"||q==="sha384"?128:64;B.length>I?B=k(B):B.length<I&&(B=p.concat([B,v],I));for(var L=p.allocUnsafe(I+y[q]),D=p.allocUnsafe(I+y[q]),G=0;G<I;G++)L[G]=B[G]^54,D[G]=B[G]^92;var X=p.allocUnsafe(I+$+4);L.copy(X,0,0,I),this.ipad1=X,this.ipad2=L,this.opad=D,this.alg=q,this.blocksize=I,this.hash=k,this.size=y[q]}x.prototype.run=function(q,B){q.copy(B,this.blocksize);var $=this.hash(B);return $.copy(this.opad,this.blocksize),this.hash(this.opad)};function R(q,B,$,k,I){E($,k),q=w(q,a,"Password"),B=w(B,a,"Salt");var L=(I||"sha1").toLowerCase(),D=m[L]||L,G=y[D];if(typeof G!="number"||!G)throw new TypeError("Digest algorithm not supported: "+I);var X=new x(D,q,B.length),te=p.allocUnsafe(k),ie=p.allocUnsafe(B.length+4);B.copy(ie,0,0,B.length);for(var ee=0,ue=G,c=Math.ceil(k/ue),e=1;e<=c;e++){ie.writeUInt32BE(e,B.length);for(var t=X.run(ie,X.ipad1),n=t,f=1;f<$;f++){n=X.run(n,X.ipad2);for(var s=0;s<ue;s++)t[s]^=n[s]}t.copy(te,ee),ee+=ue}return te}return syncBrowser=R,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var b=requireSafeBuffer$2().Buffer,_=requirePrecondition(),S=requireDefaultEncoding(),p=requireSyncBrowser(),E=requireToBuffer(),a,w=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,v={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},y=[],m;function d(){return m||(commonjsGlobal.process&&commonjsGlobal.process.nextTick?m=commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?m=commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?m=commonjsGlobal.setImmediate:m=commonjsGlobal.setTimeout,m)}function g(q,B,$,k,I){return w.importKey("raw",q,{name:"PBKDF2"},!1,["deriveBits"]).then(function(L){return w.deriveBits({name:"PBKDF2",salt:B,iterations:$,hash:{name:I}},L,k<<3)}).then(function(L){return b.from(L)})}function x(q){if(commonjsGlobal.process&&!commonjsGlobal.process.browser||!w||!w.importKey||!w.deriveBits)return Promise.resolve(!1);if(y[q]!==void 0)return y[q];a=a||b.alloc(8);var B=g(a,a,10,128,q).then(function(){return!0},function(){return!1});return y[q]=B,B}function R(q,B){q.then(function($){d()(function(){B(null,$)})},function($){d()(function(){B($)})})}return async=function(q,B,$,k,I,L){if(typeof I=="function"&&(L=I,I=void 0),_($,k),q=E(q,S,"Password"),B=E(B,S,"Salt"),typeof L!="function")throw new Error("No callback provided to pbkdf2");I=I||"sha1";var D=v[I.toLowerCase()];if(!D||typeof commonjsGlobal.Promise!="function"){d()(function(){var G;try{G=p(q,B,$,k,I)}catch(X){L(X);return}L(null,G)});return}R(x(D).then(function(G){return G?g(q,B,$,k,D):p(q,B,$,k,I)}),L)},async}var hasRequiredBrowser$8;function requireBrowser$8(){return hasRequiredBrowser$8||(hasRequiredBrowser$8=1,browser$8.pbkdf2=requireAsync(),browser$8.pbkdf2Sync=requireSyncBrowser()),browser$8}var browser$7={},des$1={},utils$4={},hasRequiredUtils$4;function requireUtils$4(){if(hasRequiredUtils$4)return utils$4;hasRequiredUtils$4=1,utils$4.readUInt32BE=function(E,a){var w=E[0+a]<<24|E[1+a]<<16|E[2+a]<<8|E[3+a];return w>>>0},utils$4.writeUInt32BE=function(E,a,w){E[0+w]=a>>>24,E[1+w]=a>>>16&255,E[2+w]=a>>>8&255,E[3+w]=a&255},utils$4.ip=function(E,a,w,v){for(var y=0,m=0,d=6;d>=0;d-=2){for(var g=0;g<=24;g+=8)y<<=1,y|=a>>>g+d&1;for(var g=0;g<=24;g+=8)y<<=1,y|=E>>>g+d&1}for(var d=6;d>=0;d-=2){for(var g=1;g<=25;g+=8)m<<=1,m|=a>>>g+d&1;for(var g=1;g<=25;g+=8)m<<=1,m|=E>>>g+d&1}w[v+0]=y>>>0,w[v+1]=m>>>0},utils$4.rip=function(E,a,w,v){for(var y=0,m=0,d=0;d<4;d++)for(var g=24;g>=0;g-=8)y<<=1,y|=a>>>g+d&1,y<<=1,y|=E>>>g+d&1;for(var d=4;d<8;d++)for(var g=24;g>=0;g-=8)m<<=1,m|=a>>>g+d&1,m<<=1,m|=E>>>g+d&1;w[v+0]=y>>>0,w[v+1]=m>>>0},utils$4.pc1=function(E,a,w,v){for(var y=0,m=0,d=7;d>=5;d--){for(var g=0;g<=24;g+=8)y<<=1,y|=a>>g+d&1;for(var g=0;g<=24;g+=8)y<<=1,y|=E>>g+d&1}for(var g=0;g<=24;g+=8)y<<=1,y|=a>>g+d&1;for(var d=1;d<=3;d++){for(var g=0;g<=24;g+=8)m<<=1,m|=a>>g+d&1;for(var g=0;g<=24;g+=8)m<<=1,m|=E>>g+d&1}for(var g=0;g<=24;g+=8)m<<=1,m|=E>>g+d&1;w[v+0]=y>>>0,w[v+1]=m>>>0},utils$4.r28shl=function(E,a){return E<<a&268435455|E>>>28-a};var b=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];utils$4.pc2=function(E,a,w,v){for(var y=0,m=0,d=b.length>>>1,g=0;g<d;g++)y<<=1,y|=E>>>b[g]&1;for(var g=d;g<b.length;g++)m<<=1,m|=a>>>b[g]&1;w[v+0]=y>>>0,w[v+1]=m>>>0},utils$4.expand=function(E,a,w){var v=0,y=0;v=(E&1)<<5|E>>>27;for(var m=23;m>=15;m-=4)v<<=6,v|=E>>>m&63;for(var m=11;m>=3;m-=4)y|=E>>>m&63,y<<=6;y|=(E&31)<<1|E>>>31,a[w+0]=v>>>0,a[w+1]=y>>>0};var _=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];utils$4.substitute=function(E,a){for(var w=0,v=0;v<4;v++){var y=E>>>18-v*6&63,m=_[v*64+y];w<<=4,w|=m}for(var v=0;v<4;v++){var y=a>>>18-v*6&63,m=_[256+v*64+y];w<<=4,w|=m}return w>>>0};var S=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return utils$4.permute=function(E){for(var a=0,w=0;w<S.length;w++)a<<=1,a|=E>>>S[w]&1;return a>>>0},utils$4.padSplit=function(E,a,w){for(var v=E.toString(2);v.length<a;)v="0"+v;for(var y=[],m=0;m<a;m+=w)y.push(v.slice(m,m+w));return y.join(" ")},utils$4}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=b;function b(_,S){if(!_)throw new Error(S||"Assertion failed")}return b.equal=function(S,p,E){if(S!=p)throw new Error(E||"Assertion failed: "+S+" != "+p)},minimalisticAssert}var cipher,hasRequiredCipher;function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var b=requireMinimalisticAssert();function _(S){this.options=S,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=S.padding!==!1}return cipher=_,_.prototype._init=function(){},_.prototype.update=function(p){return p.length===0?[]:this.type==="decrypt"?this._updateDecrypt(p):this._updateEncrypt(p)},_.prototype._buffer=function(p,E){for(var a=Math.min(this.buffer.length-this.bufferOff,p.length-E),w=0;w<a;w++)this.buffer[this.bufferOff+w]=p[E+w];return this.bufferOff+=a,a},_.prototype._flushBuffer=function(p,E){return this._update(this.buffer,0,p,E),this.bufferOff=0,this.blockSize},_.prototype._updateEncrypt=function(p){var E=0,a=0,w=(this.bufferOff+p.length)/this.blockSize|0,v=new Array(w*this.blockSize);this.bufferOff!==0&&(E+=this._buffer(p,E),this.bufferOff===this.buffer.length&&(a+=this._flushBuffer(v,a)));for(var y=p.length-(p.length-E)%this.blockSize;E<y;E+=this.blockSize)this._update(p,E,v,a),a+=this.blockSize;for(;E<p.length;E++,this.bufferOff++)this.buffer[this.bufferOff]=p[E];return v},_.prototype._updateDecrypt=function(p){for(var E=0,a=0,w=Math.ceil((this.bufferOff+p.length)/this.blockSize)-1,v=new Array(w*this.blockSize);w>0;w--)E+=this._buffer(p,E),a+=this._flushBuffer(v,a);return E+=this._buffer(p,E),v},_.prototype.final=function(p){var E;p&&(E=this.update(p));var a;return this.type==="encrypt"?a=this._finalEncrypt():a=this._finalDecrypt(),E?E.concat(a):a},_.prototype._pad=function(p,E){if(E===0)return!1;for(;E<p.length;)p[E++]=0;return!0},_.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var p=new Array(this.blockSize);return this._update(this.buffer,0,p,0),p},_.prototype._unpad=function(p){return p},_.prototype._finalDecrypt=function(){b.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var p=new Array(this.blockSize);return this._flushBuffer(p,0),this._unpad(p)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var b=requireMinimalisticAssert(),_=requireInherits_browser$8(),S=requireUtils$4(),p=requireCipher();function E(){this.tmp=new Array(2),this.keys=null}function a(v){p.call(this,v);var y=new E;this._desState=y,this.deriveKeys(y,v.key)}_(a,p),des=a,a.create=function(y){return new a(y)};var w=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return a.prototype.deriveKeys=function(y,m){y.keys=new Array(32),b.equal(m.length,this.blockSize,"Invalid key length");var d=S.readUInt32BE(m,0),g=S.readUInt32BE(m,4);S.pc1(d,g,y.tmp,0),d=y.tmp[0],g=y.tmp[1];for(var x=0;x<y.keys.length;x+=2){var R=w[x>>>1];d=S.r28shl(d,R),g=S.r28shl(g,R),S.pc2(d,g,y.keys,x)}},a.prototype._update=function(y,m,d,g){var x=this._desState,R=S.readUInt32BE(y,m),q=S.readUInt32BE(y,m+4);S.ip(R,q,x.tmp,0),R=x.tmp[0],q=x.tmp[1],this.type==="encrypt"?this._encrypt(x,R,q,x.tmp,0):this._decrypt(x,R,q,x.tmp,0),R=x.tmp[0],q=x.tmp[1],S.writeUInt32BE(d,R,g),S.writeUInt32BE(d,q,g+4)},a.prototype._pad=function(y,m){if(this.padding===!1)return!1;for(var d=y.length-m,g=m;g<y.length;g++)y[g]=d;return!0},a.prototype._unpad=function(y){if(this.padding===!1)return y;for(var m=y[y.length-1],d=y.length-m;d<y.length;d++)b.equal(y[d],m);return y.slice(0,y.length-m)},a.prototype._encrypt=function(y,m,d,g,x){for(var R=m,q=d,B=0;B<y.keys.length;B+=2){var $=y.keys[B],k=y.keys[B+1];S.expand(q,y.tmp,0),$^=y.tmp[0],k^=y.tmp[1];var I=S.substitute($,k),L=S.permute(I),D=q;q=(R^L)>>>0,R=D}S.rip(q,R,g,x)},a.prototype._decrypt=function(y,m,d,g,x){for(var R=d,q=m,B=y.keys.length-2;B>=0;B-=2){var $=y.keys[B],k=y.keys[B+1];S.expand(R,y.tmp,0),$^=y.tmp[0],k^=y.tmp[1];var I=S.substitute($,k),L=S.permute(I),D=R;R=(q^L)>>>0,q=D}S.rip(R,q,g,x)},des}var cbc$1={},hasRequiredCbc$1;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var b=requireMinimalisticAssert(),_=requireInherits_browser$8(),S={};function p(a){b.equal(a.length,8,"Invalid IV length"),this.iv=new Array(8);for(var w=0;w<this.iv.length;w++)this.iv[w]=a[w]}function E(a){function w(d){a.call(this,d),this._cbcInit()}_(w,a);for(var v=Object.keys(S),y=0;y<v.length;y++){var m=v[y];w.prototype[m]=S[m]}return w.create=function(g){return new w(g)},w}return cbc$1.instantiate=E,S._cbcInit=function(){var w=new p(this.options.iv);this._cbcState=w},S._update=function(w,v,y,m){var d=this._cbcState,g=this.constructor.super_.prototype,x=d.iv;if(this.type==="encrypt"){for(var R=0;R<this.blockSize;R++)x[R]^=w[v+R];g._update.call(this,x,0,y,m);for(var R=0;R<this.blockSize;R++)x[R]=y[m+R]}else{g._update.call(this,w,v,y,m);for(var R=0;R<this.blockSize;R++)y[m+R]^=x[R];for(var R=0;R<this.blockSize;R++)x[R]=w[v+R]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var b=requireMinimalisticAssert(),_=requireInherits_browser$8(),S=requireCipher(),p=requireDes$1();function E(w,v){b.equal(v.length,24,"Invalid key length");var y=v.slice(0,8),m=v.slice(8,16),d=v.slice(16,24);w==="encrypt"?this.ciphers=[p.create({type:"encrypt",key:y}),p.create({type:"decrypt",key:m}),p.create({type:"encrypt",key:d})]:this.ciphers=[p.create({type:"decrypt",key:d}),p.create({type:"encrypt",key:m}),p.create({type:"decrypt",key:y})]}function a(w){S.call(this,w);var v=new E(this.type,this.options.key);this._edeState=v}return _(a,S),ede=a,a.create=function(v){return new a(v)},a.prototype._update=function(v,y,m,d){var g=this._edeState;g.ciphers[0]._update(v,y,m,d),g.ciphers[1]._update(m,d,m,d),g.ciphers[2]._update(m,d,m,d)},a.prototype._pad=p.prototype._pad,a.prototype._unpad=p.prototype._unpad,ede}var hasRequiredDes;function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$4(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}var browserifyDes,hasRequiredBrowserifyDes;function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var b=requireCipherBase(),_=requireDes(),S=requireInherits_browser$8(),p=requireSafeBuffer$2().Buffer,E={"des-ede3-cbc":_.CBC.instantiate(_.EDE),"des-ede3":_.EDE,"des-ede-cbc":_.CBC.instantiate(_.EDE),"des-ede":_.EDE,"des-cbc":_.CBC.instantiate(_.DES),"des-ecb":_.DES};E.des=E["des-cbc"],E.des3=E["des-ede3-cbc"],browserifyDes=a,S(a,b);function a(w){b.call(this);var v=w.mode.toLowerCase(),y=E[v],m;w.decrypt?m="decrypt":m="encrypt";var d=w.key;p.isBuffer(d)||(d=p.from(d)),(v==="des-ede"||v==="des-ede-cbc")&&(d=p.concat([d,d.slice(0,8)]));var g=w.iv;p.isBuffer(g)||(g=p.from(g)),this._des=y.create({key:d,iv:g,type:m})}return a.prototype._update=function(w){return p.from(this._des.update(w))},a.prototype._final=function(){return p.from(this._des.final())},browserifyDes}var browser$6={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(b,_){return b._cipher.encryptBlock(_)},ecb.decrypt=function(b,_){return b._cipher.decryptBlock(_)}),ecb}var cbc={},buffer$1={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup[45]=62;revLookup[95]=63;function getLens(b){var _=b.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=b.indexOf("=");S===-1&&(S=_);var p=S===_?0:4-S%4;return[S,p]}function byteLength(b){var _=getLens(b),S=_[0],p=_[1];return(S+p)*3/4-p}function _byteLength(b,_,S){return(_+S)*3/4-S}function toByteArray(b){var _,S=getLens(b),p=S[0],E=S[1],a=new Arr(_byteLength(b,p,E)),w=0,v=E>0?p-4:p,y;for(y=0;y<v;y+=4)_=revLookup[b.charCodeAt(y)]<<18|revLookup[b.charCodeAt(y+1)]<<12|revLookup[b.charCodeAt(y+2)]<<6|revLookup[b.charCodeAt(y+3)],a[w++]=_>>16&255,a[w++]=_>>8&255,a[w++]=_&255;return E===2&&(_=revLookup[b.charCodeAt(y)]<<2|revLookup[b.charCodeAt(y+1)]>>4,a[w++]=_&255),E===1&&(_=revLookup[b.charCodeAt(y)]<<10|revLookup[b.charCodeAt(y+1)]<<4|revLookup[b.charCodeAt(y+2)]>>2,a[w++]=_>>8&255,a[w++]=_&255),a}function tripletToBase64(b){return lookup[b>>18&63]+lookup[b>>12&63]+lookup[b>>6&63]+lookup[b&63]}function encodeChunk(b,_,S){for(var p,E=[],a=_;a<S;a+=3)p=(b[a]<<16&16711680)+(b[a+1]<<8&65280)+(b[a+2]&255),E.push(tripletToBase64(p));return E.join("")}function fromByteArray(b){for(var _,S=b.length,p=S%3,E=[],a=16383,w=0,v=S-p;w<v;w+=a)E.push(encodeChunk(b,w,w+a>v?v:w+a));return p===1?(_=b[S-1],E.push(lookup[_>>2]+lookup[_<<4&63]+"==")):p===2&&(_=(b[S-2]<<8)+b[S-1],E.push(lookup[_>>10]+lookup[_>>4&63]+lookup[_<<2&63]+"=")),E.join("")}var ieee754={};ieee754.read=function(b,_,S,p,E){var a,w,v=E*8-p-1,y=(1<<v)-1,m=y>>1,d=-7,g=S?E-1:0,x=S?-1:1,R=b[_+g];for(g+=x,a=R&(1<<-d)-1,R>>=-d,d+=v;d>0;a=a*256+b[_+g],g+=x,d-=8);for(w=a&(1<<-d)-1,a>>=-d,d+=p;d>0;w=w*256+b[_+g],g+=x,d-=8);if(a===0)a=1-m;else{if(a===y)return w?NaN:(R?-1:1)*(1/0);w=w+Math.pow(2,p),a=a-m}return(R?-1:1)*w*Math.pow(2,a-p)};ieee754.write=function(b,_,S,p,E,a){var w,v,y,m=a*8-E-1,d=(1<<m)-1,g=d>>1,x=E===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=p?0:a-1,q=p?1:-1,B=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(v=isNaN(_)?1:0,w=d):(w=Math.floor(Math.log(_)/Math.LN2),_*(y=Math.pow(2,-w))<1&&(w--,y*=2),w+g>=1?_+=x/y:_+=x*Math.pow(2,1-g),_*y>=2&&(w++,y/=2),w+g>=d?(v=0,w=d):w+g>=1?(v=(_*y-1)*Math.pow(2,E),w=w+g):(v=_*Math.pow(2,g-1)*Math.pow(2,E),w=0));E>=8;b[S+R]=v&255,R+=q,v/=256,E-=8);for(w=w<<E|v,m+=E;m>0;b[S+R]=w&255,R+=q,w/=256,m-=8);b[S+R-q]|=B*128};(function(b){const _=base64Js,S=ieee754,p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;b.Buffer=d,b.SlowBuffer=G,b.INSPECT_MAX_BYTES=50;const E=2147483647;b.kMaxLength=E;const{Uint8Array:a,ArrayBuffer:w,SharedArrayBuffer:v}=globalThis;d.TYPED_ARRAY_SUPPORT=y(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function y(){try{const z=new a(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,a.prototype),Object.setPrototypeOf(z,C),z.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function m(z){if(z>E)throw new RangeError('The value "'+z+'" is invalid for option "size"');const C=new a(z);return Object.setPrototypeOf(C,d.prototype),C}function d(z,C,F){if(typeof z=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return q(z)}return g(z,C,F)}d.poolSize=8192;function g(z,C,F){if(typeof z=="string")return B(z,C);if(w.isView(z))return k(z);if(z==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z);if(xe(z,w)||z&&xe(z.buffer,w)||typeof v<"u"&&(xe(z,v)||z&&xe(z.buffer,v)))return I(z,C,F);if(typeof z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const V=z.valueOf&&z.valueOf();if(V!=null&&V!==z)return d.from(V,C,F);const ae=L(z);if(ae)return ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof z[Symbol.toPrimitive]=="function")return d.from(z[Symbol.toPrimitive]("string"),C,F);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z)}d.from=function(z,C,F){return g(z,C,F)},Object.setPrototypeOf(d.prototype,a.prototype),Object.setPrototypeOf(d,a);function x(z){if(typeof z!="number")throw new TypeError('"size" argument must be of type number');if(z<0)throw new RangeError('The value "'+z+'" is invalid for option "size"')}function R(z,C,F){return x(z),z<=0?m(z):C!==void 0?typeof F=="string"?m(z).fill(C,F):m(z).fill(C):m(z)}d.alloc=function(z,C,F){return R(z,C,F)};function q(z){return x(z),m(z<0?0:D(z)|0)}d.allocUnsafe=function(z){return q(z)},d.allocUnsafeSlow=function(z){return q(z)};function B(z,C){if((typeof C!="string"||C==="")&&(C="utf8"),!d.isEncoding(C))throw new TypeError("Unknown encoding: "+C);const F=X(z,C)|0;let V=m(F);const ae=V.write(z,C);return ae!==F&&(V=V.slice(0,ae)),V}function $(z){const C=z.length<0?0:D(z.length)|0,F=m(C);for(let V=0;V<C;V+=1)F[V]=z[V]&255;return F}function k(z){if(xe(z,a)){const C=new a(z);return I(C.buffer,C.byteOffset,C.byteLength)}return $(z)}function I(z,C,F){if(C<0||z.byteLength<C)throw new RangeError('"offset" is outside of buffer bounds');if(z.byteLength<C+(F||0))throw new RangeError('"length" is outside of buffer bounds');let V;return C===void 0&&F===void 0?V=new a(z):F===void 0?V=new a(z,C):V=new a(z,C,F),Object.setPrototypeOf(V,d.prototype),V}function L(z){if(d.isBuffer(z)){const C=D(z.length)|0,F=m(C);return F.length===0||z.copy(F,0,0,C),F}if(z.length!==void 0)return typeof z.length!="number"||Ue(z.length)?m(0):$(z);if(z.type==="Buffer"&&Array.isArray(z.data))return $(z.data)}function D(z){if(z>=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return z|0}function G(z){return+z!=z&&(z=0),d.alloc(+z)}d.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==d.prototype},d.compare=function(C,F){if(xe(C,a)&&(C=d.from(C,C.offset,C.byteLength)),xe(F,a)&&(F=d.from(F,F.offset,F.byteLength)),!d.isBuffer(C)||!d.isBuffer(F))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===F)return 0;let V=C.length,ae=F.length;for(let pe=0,re=Math.min(V,ae);pe<re;++pe)if(C[pe]!==F[pe]){V=C[pe],ae=F[pe];break}return V<ae?-1:ae<V?1:0},d.isEncoding=function(C){switch(String(C).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}},d.concat=function(C,F){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return d.alloc(0);let V;if(F===void 0)for(F=0,V=0;V<C.length;++V)F+=C[V].length;const ae=d.allocUnsafe(F);let pe=0;for(V=0;V<C.length;++V){let re=C[V];if(xe(re,a))pe+re.length>ae.length?(d.isBuffer(re)||(re=d.from(re)),re.copy(ae,pe)):a.prototype.set.call(ae,re,pe);else if(d.isBuffer(re))re.copy(ae,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=re.length}return ae};function X(z,C){if(d.isBuffer(z))return z.length;if(w.isView(z)||xe(z,w))return z.byteLength;if(typeof z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof z);const F=z.length,V=arguments.length>2&&arguments[2]===!0;if(!V&&F===0)return 0;let ae=!1;for(;;)switch(C){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":return Le(z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F*2;case"hex":return F>>>1;case"base64":return De(z).length;default:if(ae)return V?-1:Le(z).length;C=(""+C).toLowerCase(),ae=!0}}d.byteLength=X;function te(z,C,F){let V=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0,C>>>=0,F<=C))return"";for(z||(z="utf8");;)switch(z){case"hex":return M(this,C,F);case"utf8":case"utf-8":return u(this,C,F);case"ascii":return r(this,C,F);case"latin1":case"binary":return h(this,C,F);case"base64":return s(this,C,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,C,F);default:if(V)throw new TypeError("Unknown encoding: "+z);z=(z+"").toLowerCase(),V=!0}}d.prototype._isBuffer=!0;function ie(z,C,F){const V=z[C];z[C]=z[F],z[F]=V}d.prototype.swap16=function(){const C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let F=0;F<C;F+=2)ie(this,F,F+1);return this},d.prototype.swap32=function(){const C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let F=0;F<C;F+=4)ie(this,F,F+3),ie(this,F+1,F+2);return this},d.prototype.swap64=function(){const C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let F=0;F<C;F+=8)ie(this,F,F+7),ie(this,F+1,F+6),ie(this,F+2,F+5),ie(this,F+3,F+4);return this},d.prototype.toString=function(){const C=this.length;return C===0?"":arguments.length===0?u(this,0,C):te.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(C){if(!d.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:d.compare(this,C)===0},d.prototype.inspect=function(){let C="";const F=b.INSPECT_MAX_BYTES;return C=this.toString("hex",0,F).replace(/(.{2})/g,"$1 ").trim(),this.length>F&&(C+=" ... "),"<Buffer "+C+">"},p&&(d.prototype[p]=d.prototype.inspect),d.prototype.compare=function(C,F,V,ae,pe){if(xe(C,a)&&(C=d.from(C,C.offset,C.byteLength)),!d.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(F===void 0&&(F=0),V===void 0&&(V=C?C.length:0),ae===void 0&&(ae=0),pe===void 0&&(pe=this.length),F<0||V>C.length||ae<0||pe>this.length)throw new RangeError("out of range index");if(ae>=pe&&F>=V)return 0;if(ae>=pe)return-1;if(F>=V)return 1;if(F>>>=0,V>>>=0,ae>>>=0,pe>>>=0,this===C)return 0;let re=pe-ae,oe=V-F;const Oe=Math.min(re,oe),ce=this.slice(ae,pe),we=C.slice(F,V);for(let Ce=0;Ce<Oe;++Ce)if(ce[Ce]!==we[Ce]){re=ce[Ce],oe=we[Ce];break}return re<oe?-1:oe<re?1:0};function ee(z,C,F,V,ae){if(z.length===0)return-1;if(typeof F=="string"?(V=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,Ue(F)&&(F=ae?0:z.length-1),F<0&&(F=z.length+F),F>=z.length){if(ae)return-1;F=z.length-1}else if(F<0)if(ae)F=0;else return-1;if(typeof C=="string"&&(C=d.from(C,V)),d.isBuffer(C))return C.length===0?-1:ue(z,C,F,V,ae);if(typeof C=="number")return C=C&255,typeof a.prototype.indexOf=="function"?ae?a.prototype.indexOf.call(z,C,F):a.prototype.lastIndexOf.call(z,C,F):ue(z,[C],F,V,ae);throw new TypeError("val must be string, number or Buffer")}function ue(z,C,F,V,ae){let pe=1,re=z.length,oe=C.length;if(V!==void 0&&(V=String(V).toLowerCase(),V==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(z.length<2||C.length<2)return-1;pe=2,re/=2,oe/=2,F/=2}function Oe(we,Ce){return pe===1?we[Ce]:we.readUInt16BE(Ce*pe)}let ce;if(ae){let we=-1;for(ce=F;ce<re;ce++)if(Oe(z,ce)===Oe(C,we===-1?0:ce-we)){if(we===-1&&(we=ce),ce-we+1===oe)return we*pe}else we!==-1&&(ce-=ce-we),we=-1}else for(F+oe>re&&(F=re-oe),ce=F;ce>=0;ce--){let we=!0;for(let Ce=0;Ce<oe;Ce++)if(Oe(z,ce+Ce)!==Oe(C,Ce)){we=!1;break}if(we)return ce}return-1}d.prototype.includes=function(C,F,V){return this.indexOf(C,F,V)!==-1},d.prototype.indexOf=function(C,F,V){return ee(this,C,F,V,!0)},d.prototype.lastIndexOf=function(C,F,V){return ee(this,C,F,V,!1)};function c(z,C,F,V){F=Number(F)||0;const ae=z.length-F;V?(V=Number(V),V>ae&&(V=ae)):V=ae;const pe=C.length;V>pe/2&&(V=pe/2);let re;for(re=0;re<V;++re){const oe=parseInt(C.substr(re*2,2),16);if(Ue(oe))return re;z[F+re]=oe}return re}function e(z,C,F,V){return ye(Le(C,z.length-F),z,F,V)}function t(z,C,F,V){return ye(ve(C),z,F,V)}function n(z,C,F,V){return ye(De(C),z,F,V)}function f(z,C,F,V){return ye(ge(C,z.length-F),z,F,V)}d.prototype.write=function(C,F,V,ae){if(F===void 0)ae="utf8",V=this.length,F=0;else if(V===void 0&&typeof F=="string")ae=F,V=this.length,F=0;else if(isFinite(F))F=F>>>0,isFinite(V)?(V=V>>>0,ae===void 0&&(ae="utf8")):(ae=V,V=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const pe=this.length-F;if((V===void 0||V>pe)&&(V=pe),C.length>0&&(V<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");ae||(ae="utf8");let re=!1;for(;;)switch(ae){case"hex":return c(this,C,F,V);case"utf8":case"utf-8":return e(this,C,F,V);case"ascii":case"latin1":case"binary":return t(this,C,F,V);case"base64":return n(this,C,F,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,C,F,V);default:if(re)throw new TypeError("Unknown encoding: "+ae);ae=(""+ae).toLowerCase(),re=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function s(z,C,F){return C===0&&F===z.length?_.fromByteArray(z):_.fromByteArray(z.slice(C,F))}function u(z,C,F){F=Math.min(z.length,F);const V=[];let ae=C;for(;ae<F;){const pe=z[ae];let re=null,oe=pe>239?4:pe>223?3:pe>191?2:1;if(ae+oe<=F){let Oe,ce,we,Ce;switch(oe){case 1:pe<128&&(re=pe);break;case 2:Oe=z[ae+1],(Oe&192)===128&&(Ce=(pe&31)<<6|Oe&63,Ce>127&&(re=Ce));break;case 3:Oe=z[ae+1],ce=z[ae+2],(Oe&192)===128&&(ce&192)===128&&(Ce=(pe&15)<<12|(Oe&63)<<6|ce&63,Ce>2047&&(Ce<55296||Ce>57343)&&(re=Ce));break;case 4:Oe=z[ae+1],ce=z[ae+2],we=z[ae+3],(Oe&192)===128&&(ce&192)===128&&(we&192)===128&&(Ce=(pe&15)<<18|(Oe&63)<<12|(ce&63)<<6|we&63,Ce>65535&&Ce<1114112&&(re=Ce))}}re===null?(re=65533,oe=1):re>65535&&(re-=65536,V.push(re>>>10&1023|55296),re=56320|re&1023),V.push(re),ae+=oe}return o(V)}const l=4096;function o(z){const C=z.length;if(C<=l)return String.fromCharCode.apply(String,z);let F="",V=0;for(;V<C;)F+=String.fromCharCode.apply(String,z.slice(V,V+=l));return F}function r(z,C,F){let V="";F=Math.min(z.length,F);for(let ae=C;ae<F;++ae)V+=String.fromCharCode(z[ae]&127);return V}function h(z,C,F){let V="";F=Math.min(z.length,F);for(let ae=C;ae<F;++ae)V+=String.fromCharCode(z[ae]);return V}function M(z,C,F){const V=z.length;(!C||C<0)&&(C=0),(!F||F<0||F>V)&&(F=V);let ae="";for(let pe=C;pe<F;++pe)ae+=Se[z[pe]];return ae}function T(z,C,F){const V=z.slice(C,F);let ae="";for(let pe=0;pe<V.length-1;pe+=2)ae+=String.fromCharCode(V[pe]+V[pe+1]*256);return ae}d.prototype.slice=function(C,F){const V=this.length;C=~~C,F=F===void 0?V:~~F,C<0?(C+=V,C<0&&(C=0)):C>V&&(C=V),F<0?(F+=V,F<0&&(F=0)):F>V&&(F=V),F<C&&(F=C);const ae=this.subarray(C,F);return Object.setPrototypeOf(ae,d.prototype),ae};function N(z,C,F){if(z%1!==0||z<0)throw new RangeError("offset is not uint");if(z+C>F)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(C,F,V){C=C>>>0,F=F>>>0,V||N(C,F,this.length);let ae=this[C],pe=1,re=0;for(;++re<F&&(pe*=256);)ae+=this[C+re]*pe;return ae},d.prototype.readUintBE=d.prototype.readUIntBE=function(C,F,V){C=C>>>0,F=F>>>0,V||N(C,F,this.length);let ae=this[C+--F],pe=1;for(;F>0&&(pe*=256);)ae+=this[C+--F]*pe;return ae},d.prototype.readUint8=d.prototype.readUInt8=function(C,F){return C=C>>>0,F||N(C,1,this.length),this[C]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(C,F){return C=C>>>0,F||N(C,2,this.length),this[C]|this[C+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(C,F){return C=C>>>0,F||N(C,2,this.length),this[C]<<8|this[C+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(C,F){return C=C>>>0,F||N(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(C,F){return C=C>>>0,F||N(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},d.prototype.readBigUInt64LE=Ae(function(C){C=C>>>0,de(C,"offset");const F=this[C],V=this[C+7];(F===void 0||V===void 0)&&Pe(C,this.length-8);const ae=F+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24,pe=this[++C]+this[++C]*2**8+this[++C]*2**16+V*2**24;return BigInt(ae)+(BigInt(pe)<<BigInt(32))}),d.prototype.readBigUInt64BE=Ae(function(C){C=C>>>0,de(C,"offset");const F=this[C],V=this[C+7];(F===void 0||V===void 0)&&Pe(C,this.length-8);const ae=F*2**24+this[++C]*2**16+this[++C]*2**8+this[++C],pe=this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+V;return(BigInt(ae)<<BigInt(32))+BigInt(pe)}),d.prototype.readIntLE=function(C,F,V){C=C>>>0,F=F>>>0,V||N(C,F,this.length);let ae=this[C],pe=1,re=0;for(;++re<F&&(pe*=256);)ae+=this[C+re]*pe;return pe*=128,ae>=pe&&(ae-=Math.pow(2,8*F)),ae},d.prototype.readIntBE=function(C,F,V){C=C>>>0,F=F>>>0,V||N(C,F,this.length);let ae=F,pe=1,re=this[C+--ae];for(;ae>0&&(pe*=256);)re+=this[C+--ae]*pe;return pe*=128,re>=pe&&(re-=Math.pow(2,8*F)),re},d.prototype.readInt8=function(C,F){return C=C>>>0,F||N(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},d.prototype.readInt16LE=function(C,F){C=C>>>0,F||N(C,2,this.length);const V=this[C]|this[C+1]<<8;return V&32768?V|4294901760:V},d.prototype.readInt16BE=function(C,F){C=C>>>0,F||N(C,2,this.length);const V=this[C+1]|this[C]<<8;return V&32768?V|4294901760:V},d.prototype.readInt32LE=function(C,F){return C=C>>>0,F||N(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},d.prototype.readInt32BE=function(C,F){return C=C>>>0,F||N(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},d.prototype.readBigInt64LE=Ae(function(C){C=C>>>0,de(C,"offset");const F=this[C],V=this[C+7];(F===void 0||V===void 0)&&Pe(C,this.length-8);const ae=this[C+4]+this[C+5]*2**8+this[C+6]*2**16+(V<<24);return(BigInt(ae)<<BigInt(32))+BigInt(F+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24)}),d.prototype.readBigInt64BE=Ae(function(C){C=C>>>0,de(C,"offset");const F=this[C],V=this[C+7];(F===void 0||V===void 0)&&Pe(C,this.length-8);const ae=(F<<24)+this[++C]*2**16+this[++C]*2**8+this[++C];return(BigInt(ae)<<BigInt(32))+BigInt(this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+V)}),d.prototype.readFloatLE=function(C,F){return C=C>>>0,F||N(C,4,this.length),S.read(this,C,!0,23,4)},d.prototype.readFloatBE=function(C,F){return C=C>>>0,F||N(C,4,this.length),S.read(this,C,!1,23,4)},d.prototype.readDoubleLE=function(C,F){return C=C>>>0,F||N(C,8,this.length),S.read(this,C,!0,52,8)},d.prototype.readDoubleBE=function(C,F){return C=C>>>0,F||N(C,8,this.length),S.read(this,C,!1,52,8)};function Q(z,C,F,V,ae,pe){if(!d.isBuffer(z))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>ae||C<pe)throw new RangeError('"value" argument is out of bounds');if(F+V>z.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(C,F,V,ae){if(C=+C,F=F>>>0,V=V>>>0,!ae){const oe=Math.pow(2,8*V)-1;Q(this,C,F,V,oe,0)}let pe=1,re=0;for(this[F]=C&255;++re<V&&(pe*=256);)this[F+re]=C/pe&255;return F+V},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(C,F,V,ae){if(C=+C,F=F>>>0,V=V>>>0,!ae){const oe=Math.pow(2,8*V)-1;Q(this,C,F,V,oe,0)}let pe=V-1,re=1;for(this[F+pe]=C&255;--pe>=0&&(re*=256);)this[F+pe]=C/re&255;return F+V},d.prototype.writeUint8=d.prototype.writeUInt8=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,1,255,0),this[F]=C&255,F+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,2,65535,0),this[F]=C&255,this[F+1]=C>>>8,F+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,2,65535,0),this[F]=C>>>8,this[F+1]=C&255,F+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,4,4294967295,0),this[F+3]=C>>>24,this[F+2]=C>>>16,this[F+1]=C>>>8,this[F]=C&255,F+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,4,4294967295,0),this[F]=C>>>24,this[F+1]=C>>>16,this[F+2]=C>>>8,this[F+3]=C&255,F+4};function K(z,C,F,V,ae){le(C,V,ae,z,F,7);let pe=Number(C&BigInt(4294967295));z[F++]=pe,pe=pe>>8,z[F++]=pe,pe=pe>>8,z[F++]=pe,pe=pe>>8,z[F++]=pe;let re=Number(C>>BigInt(32)&BigInt(4294967295));return z[F++]=re,re=re>>8,z[F++]=re,re=re>>8,z[F++]=re,re=re>>8,z[F++]=re,F}function A(z,C,F,V,ae){le(C,V,ae,z,F,7);let pe=Number(C&BigInt(4294967295));z[F+7]=pe,pe=pe>>8,z[F+6]=pe,pe=pe>>8,z[F+5]=pe,pe=pe>>8,z[F+4]=pe;let re=Number(C>>BigInt(32)&BigInt(4294967295));return z[F+3]=re,re=re>>8,z[F+2]=re,re=re>>8,z[F+1]=re,re=re>>8,z[F]=re,F+8}d.prototype.writeBigUInt64LE=Ae(function(C,F=0){return K(this,C,F,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=Ae(function(C,F=0){return A(this,C,F,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(C,F,V,ae){if(C=+C,F=F>>>0,!ae){const Oe=Math.pow(2,8*V-1);Q(this,C,F,V,Oe-1,-Oe)}let pe=0,re=1,oe=0;for(this[F]=C&255;++pe<V&&(re*=256);)C<0&&oe===0&&this[F+pe-1]!==0&&(oe=1),this[F+pe]=(C/re>>0)-oe&255;return F+V},d.prototype.writeIntBE=function(C,F,V,ae){if(C=+C,F=F>>>0,!ae){const Oe=Math.pow(2,8*V-1);Q(this,C,F,V,Oe-1,-Oe)}let pe=V-1,re=1,oe=0;for(this[F+pe]=C&255;--pe>=0&&(re*=256);)C<0&&oe===0&&this[F+pe+1]!==0&&(oe=1),this[F+pe]=(C/re>>0)-oe&255;return F+V},d.prototype.writeInt8=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,1,127,-128),C<0&&(C=255+C+1),this[F]=C&255,F+1},d.prototype.writeInt16LE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,2,32767,-32768),this[F]=C&255,this[F+1]=C>>>8,F+2},d.prototype.writeInt16BE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,2,32767,-32768),this[F]=C>>>8,this[F+1]=C&255,F+2},d.prototype.writeInt32LE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,4,2147483647,-2147483648),this[F]=C&255,this[F+1]=C>>>8,this[F+2]=C>>>16,this[F+3]=C>>>24,F+4},d.prototype.writeInt32BE=function(C,F,V){return C=+C,F=F>>>0,V||Q(this,C,F,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[F]=C>>>24,this[F+1]=C>>>16,this[F+2]=C>>>8,this[F+3]=C&255,F+4},d.prototype.writeBigInt64LE=Ae(function(C,F=0){return K(this,C,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=Ae(function(C,F=0){return A(this,C,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function O(z,C,F,V,ae,pe){if(F+V>z.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function W(z,C,F,V,ae){return C=+C,F=F>>>0,ae||O(z,C,F,4),S.write(z,C,F,V,23,4),F+4}d.prototype.writeFloatLE=function(C,F,V){return W(this,C,F,!0,V)},d.prototype.writeFloatBE=function(C,F,V){return W(this,C,F,!1,V)};function Y(z,C,F,V,ae){return C=+C,F=F>>>0,ae||O(z,C,F,8),S.write(z,C,F,V,52,8),F+8}d.prototype.writeDoubleLE=function(C,F,V){return Y(this,C,F,!0,V)},d.prototype.writeDoubleBE=function(C,F,V){return Y(this,C,F,!1,V)},d.prototype.copy=function(C,F,V,ae){if(!d.isBuffer(C))throw new TypeError("argument should be a Buffer");if(V||(V=0),!ae&&ae!==0&&(ae=this.length),F>=C.length&&(F=C.length),F||(F=0),ae>0&&ae<V&&(ae=V),ae===V||C.length===0||this.length===0)return 0;if(F<0)throw new RangeError("targetStart out of bounds");if(V<0||V>=this.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("sourceEnd out of bounds");ae>this.length&&(ae=this.length),C.length-F<ae-V&&(ae=C.length-F+V);const pe=ae-V;return this===C&&typeof a.prototype.copyWithin=="function"?this.copyWithin(F,V,ae):a.prototype.set.call(C,this.subarray(V,ae),F),pe},d.prototype.fill=function(C,F,V,ae){if(typeof C=="string"){if(typeof F=="string"?(ae=F,F=0,V=this.length):typeof V=="string"&&(ae=V,V=this.length),ae!==void 0&&typeof ae!="string")throw new TypeError("encoding must be a string");if(typeof ae=="string"&&!d.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);if(C.length===1){const re=C.charCodeAt(0);(ae==="utf8"&&re<128||ae==="latin1")&&(C=re)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(F<0||this.length<F||this.length<V)throw new RangeError("Out of range index");if(V<=F)return this;F=F>>>0,V=V===void 0?this.length:V>>>0,C||(C=0);let pe;if(typeof C=="number")for(pe=F;pe<V;++pe)this[pe]=C;else{const re=d.isBuffer(C)?C:d.from(C,ae),oe=re.length;if(oe===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(pe=0;pe<V-F;++pe)this[pe+F]=re[pe%oe]}return this};const Z={};function j(z,C,F){Z[z]=class extends F{constructor(){super(),Object.defineProperty(this,"message",{value:C.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${z}]`,this.stack,delete this.name}get code(){return z}set code(ae){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ae,writable:!0})}toString(){return`${this.name} [${z}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(z){return z?`${z} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(z,C){return`The "${z}" argument must be of type number. Received type ${typeof C}`},TypeError),j("ERR_OUT_OF_RANGE",function(z,C,F){let V=`The value of "${z}" is out of range.`,ae=F;return Number.isInteger(F)&&Math.abs(F)>2**32?ae=ne(String(F)):typeof F=="bigint"&&(ae=String(F),(F>BigInt(2)**BigInt(32)||F<-(BigInt(2)**BigInt(32)))&&(ae=ne(ae)),ae+="n"),V+=` It must be ${C}. Received ${ae}`,V},RangeError);function ne(z){let C="",F=z.length;const V=z[0]==="-"?1:0;for(;F>=V+4;F-=3)C=`_${z.slice(F-3,F)}${C}`;return`${z.slice(0,F)}${C}`}function Re(z,C,F){de(C,"offset"),(z[C]===void 0||z[C+F]===void 0)&&Pe(C,z.length-(F+1))}function le(z,C,F,V,ae,pe){if(z>F||z<C){const re=typeof C=="bigint"?"n":"";let oe;throw C===0||C===BigInt(0)?oe=`>= 0${re} and < 2${re} ** ${(pe+1)*8}${re}`:oe=`>= -(2${re} ** ${(pe+1)*8-1}${re}) and < 2 ** ${(pe+1)*8-1}${re}`,new Z.ERR_OUT_OF_RANGE("value",oe,z)}Re(V,ae,pe)}function de(z,C){if(typeof z!="number")throw new Z.ERR_INVALID_ARG_TYPE(C,"number",z)}function Pe(z,C,F){throw Math.floor(z)!==z?(de(z,F),new Z.ERR_OUT_OF_RANGE("offset","an integer",z)):C<0?new Z.ERR_BUFFER_OUT_OF_BOUNDS:new Z.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${C}`,z)}const me=/[^+/0-9A-Za-z-_]/g;function he(z){if(z=z.split("=")[0],z=z.trim().replace(me,""),z.length<2)return"";for(;z.length%4!==0;)z=z+"=";return z}function Le(z,C){C=C||1/0;let F;const V=z.length;let ae=null;const pe=[];for(let re=0;re<V;++re){if(F=z.charCodeAt(re),F>55295&&F<57344){if(!ae){if(F>56319){(C-=3)>-1&&pe.push(239,191,189);continue}else if(re+1===V){(C-=3)>-1&&pe.push(239,191,189);continue}ae=F;continue}if(F<56320){(C-=3)>-1&&pe.push(239,191,189),ae=F;continue}F=(ae-55296<<10|F-56320)+65536}else ae&&(C-=3)>-1&&pe.push(239,191,189);if(ae=null,F<128){if((C-=1)<0)break;pe.push(F)}else if(F<2048){if((C-=2)<0)break;pe.push(F>>6|192,F&63|128)}else if(F<65536){if((C-=3)<0)break;pe.push(F>>12|224,F>>6&63|128,F&63|128)}else if(F<1114112){if((C-=4)<0)break;pe.push(F>>18|240,F>>12&63|128,F>>6&63|128,F&63|128)}else throw new Error("Invalid code point")}return pe}function ve(z){const C=[];for(let F=0;F<z.length;++F)C.push(z.charCodeAt(F)&255);return C}function ge(z,C){let F,V,ae;const pe=[];for(let re=0;re<z.length&&!((C-=2)<0);++re)F=z.charCodeAt(re),V=F>>8,ae=F%256,pe.push(ae),pe.push(V);return pe}function De(z){return _.toByteArray(he(z))}function ye(z,C,F,V){let ae;for(ae=0;ae<V&&!(ae+F>=C.length||ae>=z.length);++ae)C[ae+F]=z[ae];return ae}function xe(z,C){return z instanceof C||z!=null&&z.constructor!=null&&z.constructor.name!=null&&z.constructor.name===C.name}function Ue(z){return z!==z}const Se=(function(){const z="0123456789abcdef",C=new Array(256);for(let F=0;F<16;++F){const V=F*16;for(let ae=0;ae<16;++ae)C[V+ae]=z[F]+z[ae]}return C})();function Ae(z){return typeof BigInt>"u"?He:z}function He(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer=buffer$1.Buffer;var bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(_,S){for(var p=Math.min(_.length,S.length),E=new Buffer(p),a=0;a<p;++a)E[a]=_[a]^S[a];return E}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var b=requireBufferXor();return cbc.encrypt=function(_,S){var p=b(S,_._prev);return _._prev=_._cipher.encryptBlock(p),_._prev},cbc.decrypt=function(_,S){var p=_._prev;_._prev=S;var E=_._cipher.decryptBlock(S);return b(E,p)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var b=requireSafeBuffer$2().Buffer,_=requireBufferXor();function S(p,E,a){var w=E.length,v=_(E,p._cache);return p._cache=p._cache.slice(w),p._prev=b.concat([p._prev,a?E:v]),v}return cfb.encrypt=function(p,E,a){for(var w=b.allocUnsafe(0),v;E.length;)if(p._cache.length===0&&(p._cache=p._cipher.encryptBlock(p._prev),p._prev=b.allocUnsafe(0)),p._cache.length<=E.length)v=p._cache.length,w=b.concat([w,S(p,E.slice(0,v),a)]),E=E.slice(v);else{w=b.concat([w,S(p,E,a)]);break}return w},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var b=requireSafeBuffer$2().Buffer;function _(S,p,E){var a=S._cipher.encryptBlock(S._prev),w=a[0]^p;return S._prev=b.concat([S._prev.slice(1),b.from([E?p:w])]),w}return cfb8.encrypt=function(S,p,E){for(var a=p.length,w=b.allocUnsafe(a),v=-1;++v<a;)w[v]=_(S,p[v],E);return w},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var b=requireSafeBuffer$2().Buffer;function _(p,E,a){for(var w,v=-1,y=8,m=0,d,g;++v<y;)w=p._cipher.encryptBlock(p._prev),d=E&1<<7-v?128:0,g=w[0]^d,m+=(g&128)>>v%8,p._prev=S(p._prev,a?d:g);return m}function S(p,E){var a=p.length,w=-1,v=b.allocUnsafe(p.length);for(p=b.concat([p,b.from([E])]);++w<a;)v[w]=p[w]<<1|p[w+1]>>7;return v}return cfb1.encrypt=function(p,E,a){for(var w=E.length,v=b.allocUnsafe(w),y=-1;++y<w;)v[y]=_(p,E[y],a);return v},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var b=requireBufferXor();function _(S){return S._prev=S._cipher.encryptBlock(S._prev),S._prev}return ofb.encrypt=function(S,p){for(;S._cache.length<p.length;)S._cache=Buffer.concat([S._cache,_(S)]);var E=S._cache.slice(0,p.length);return S._cache=S._cache.slice(p.length),b(p,E)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function b(_){for(var S=_.length,p;S--;)if(p=_.readUInt8(S),p===255)_.writeUInt8(0,S);else{p++,_.writeUInt8(p,S);break}}return incr32_1=b,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var b=requireBufferXor(),_=requireSafeBuffer$2().Buffer,S=requireIncr32();function p(a){var w=a._cipher.encryptBlockRaw(a._prev);return S(a._prev),w}var E=16;return ctr.encrypt=function(a,w){var v=Math.ceil(w.length/E),y=a._cache.length;a._cache=_.concat([a._cache,_.allocUnsafe(v*E)]);for(var m=0;m<v;m++){var d=p(a),g=y+m*E;a._cache.writeUInt32BE(d[0],g+0),a._cache.writeUInt32BE(d[1],g+4),a._cache.writeUInt32BE(d[2],g+8),a._cache.writeUInt32BE(d[3],g+12)}var x=a._cache.slice(0,w.length);return a._cache=a._cache.slice(w.length),b(w,x)},ctr}const aes128={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},require$$2={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128,aes192,aes256,"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};var modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var b={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},_=require$$2;for(var S in _)_[S].module=b[_[S].mode];return modes_1=_,modes_1}var aes={},hasRequiredAes;function requireAes(){if(hasRequiredAes)return aes;hasRequiredAes=1;var b=requireSafeBuffer$2().Buffer;function _(v){b.isBuffer(v)||(v=b.from(v));for(var y=v.length/4|0,m=new Array(y),d=0;d<y;d++)m[d]=v.readUInt32BE(d*4);return m}function S(v){for(var y=0;y<v.length;v++)v[y]=0}function p(v,y,m,d,g){for(var x=m[0],R=m[1],q=m[2],B=m[3],$=v[0]^y[0],k=v[1]^y[1],I=v[2]^y[2],L=v[3]^y[3],D,G,X,te,ie=4,ee=1;ee<g;ee++)D=x[$>>>24]^R[k>>>16&255]^q[I>>>8&255]^B[L&255]^y[ie++],G=x[k>>>24]^R[I>>>16&255]^q[L>>>8&255]^B[$&255]^y[ie++],X=x[I>>>24]^R[L>>>16&255]^q[$>>>8&255]^B[k&255]^y[ie++],te=x[L>>>24]^R[$>>>16&255]^q[k>>>8&255]^B[I&255]^y[ie++],$=D,k=G,I=X,L=te;return D=(d[$>>>24]<<24|d[k>>>16&255]<<16|d[I>>>8&255]<<8|d[L&255])^y[ie++],G=(d[k>>>24]<<24|d[I>>>16&255]<<16|d[L>>>8&255]<<8|d[$&255])^y[ie++],X=(d[I>>>24]<<24|d[L>>>16&255]<<16|d[$>>>8&255]<<8|d[k&255])^y[ie++],te=(d[L>>>24]<<24|d[$>>>16&255]<<16|d[k>>>8&255]<<8|d[I&255])^y[ie++],D=D>>>0,G=G>>>0,X=X>>>0,te=te>>>0,[D,G,X,te]}var E=[0,1,2,4,8,16,32,64,128,27,54],a=(function(){for(var v=new Array(256),y=0;y<256;y++)y<128?v[y]=y<<1:v[y]=y<<1^283;for(var m=[],d=[],g=[[],[],[],[]],x=[[],[],[],[]],R=0,q=0,B=0;B<256;++B){var $=q^q<<1^q<<2^q<<3^q<<4;$=$>>>8^$&255^99,m[R]=$,d[$]=R;var k=v[R],I=v[k],L=v[I],D=v[$]*257^$*16843008;g[0][R]=D<<24|D>>>8,g[1][R]=D<<16|D>>>16,g[2][R]=D<<8|D>>>24,g[3][R]=D,D=L*16843009^I*65537^k*257^R*16843008,x[0][$]=D<<24|D>>>8,x[1][$]=D<<16|D>>>16,x[2][$]=D<<8|D>>>24,x[3][$]=D,R===0?R=q=1:(R=k^v[v[v[L^k]]],q^=v[v[q]])}return{SBOX:m,INV_SBOX:d,SUB_MIX:g,INV_SUB_MIX:x}})();function w(v){this._key=_(v),this._reset()}return w.blockSize=16,w.keySize=256/8,w.prototype.blockSize=w.blockSize,w.prototype.keySize=w.keySize,w.prototype._reset=function(){for(var v=this._key,y=v.length,m=y+6,d=(m+1)*4,g=[],x=0;x<y;x++)g[x]=v[x];for(x=y;x<d;x++){var R=g[x-1];x%y===0?(R=R<<8|R>>>24,R=a.SBOX[R>>>24]<<24|a.SBOX[R>>>16&255]<<16|a.SBOX[R>>>8&255]<<8|a.SBOX[R&255],R^=E[x/y|0]<<24):y>6&&x%y===4&&(R=a.SBOX[R>>>24]<<24|a.SBOX[R>>>16&255]<<16|a.SBOX[R>>>8&255]<<8|a.SBOX[R&255]),g[x]=g[x-y]^R}for(var q=[],B=0;B<d;B++){var $=d-B,k=g[$-(B%4?0:4)];B<4||$<=4?q[B]=k:q[B]=a.INV_SUB_MIX[0][a.SBOX[k>>>24]]^a.INV_SUB_MIX[1][a.SBOX[k>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[k>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[k&255]]}this._nRounds=m,this._keySchedule=g,this._invKeySchedule=q},w.prototype.encryptBlockRaw=function(v){return v=_(v),p(v,this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},w.prototype.encryptBlock=function(v){var y=this.encryptBlockRaw(v),m=b.allocUnsafe(16);return m.writeUInt32BE(y[0],0),m.writeUInt32BE(y[1],4),m.writeUInt32BE(y[2],8),m.writeUInt32BE(y[3],12),m},w.prototype.decryptBlock=function(v){v=_(v);var y=v[1];v[1]=v[3],v[3]=y;var m=p(v,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),d=b.allocUnsafe(16);return d.writeUInt32BE(m[0],0),d.writeUInt32BE(m[3],4),d.writeUInt32BE(m[2],8),d.writeUInt32BE(m[1],12),d},w.prototype.scrub=function(){S(this._keySchedule),S(this._invKeySchedule),S(this._key)},aes.AES=w,aes}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var b=requireSafeBuffer$2().Buffer,_=b.alloc(16,0);function S(a){return[a.readUInt32BE(0),a.readUInt32BE(4),a.readUInt32BE(8),a.readUInt32BE(12)]}function p(a){var w=b.allocUnsafe(16);return w.writeUInt32BE(a[0]>>>0,0),w.writeUInt32BE(a[1]>>>0,4),w.writeUInt32BE(a[2]>>>0,8),w.writeUInt32BE(a[3]>>>0,12),w}function E(a){this.h=a,this.state=b.alloc(16,0),this.cache=b.allocUnsafe(0)}return E.prototype.ghash=function(a){for(var w=-1;++w<a.length;)this.state[w]^=a[w];this._multiply()},E.prototype._multiply=function(){for(var a=S(this.h),w=[0,0,0,0],v,y,m,d=-1;++d<128;){for(y=(this.state[~~(d/8)]&1<<7-d%8)!==0,y&&(w[0]^=a[0],w[1]^=a[1],w[2]^=a[2],w[3]^=a[3]),m=(a[3]&1)!==0,v=3;v>0;v--)a[v]=a[v]>>>1|(a[v-1]&1)<<31;a[0]=a[0]>>>1,m&&(a[0]=a[0]^225<<24)}this.state=p(w)},E.prototype.update=function(a){this.cache=b.concat([this.cache,a]);for(var w;this.cache.length>=16;)w=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(w)},E.prototype.final=function(a,w){return this.cache.length&&this.ghash(b.concat([this.cache,_],16)),this.ghash(p([0,a,0,w])),this.state},ghash=E,ghash}var authCipher,hasRequiredAuthCipher;function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var b=requireAes(),_=requireSafeBuffer$2().Buffer,S=requireCipherBase(),p=requireInherits_browser$8(),E=requireGhash(),a=requireBufferXor(),w=requireIncr32();function v(d,g){var x=0;d.length!==g.length&&x++;for(var R=Math.min(d.length,g.length),q=0;q<R;++q)x+=d[q]^g[q];return x}function y(d,g,x){if(g.length===12)return d._finID=_.concat([g,_.from([0,0,0,1])]),_.concat([g,_.from([0,0,0,2])]);var R=new E(x),q=g.length,B=q%16;R.update(g),B&&(B=16-B,R.update(_.alloc(B,0))),R.update(_.alloc(8,0));var $=q*8,k=_.alloc(8);k.writeUIntBE($,0,8),R.update(k),d._finID=R.state;var I=_.from(d._finID);return w(I),I}function m(d,g,x,R){S.call(this);var q=_.alloc(4,0);this._cipher=new b.AES(g);var B=this._cipher.encryptBlock(q);this._ghash=new E(B),x=y(this,x,B),this._prev=_.from(x),this._cache=_.allocUnsafe(0),this._secCache=_.allocUnsafe(0),this._decrypt=R,this._alen=0,this._len=0,this._mode=d,this._authTag=null,this._called=!1}return p(m,S),m.prototype._update=function(d){if(!this._called&&this._alen){var g=16-this._alen%16;g<16&&(g=_.alloc(g,0),this._ghash.update(g))}this._called=!0;var x=this._mode.encrypt(this,d);return this._decrypt?this._ghash.update(d):this._ghash.update(x),this._len+=d.length,x},m.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var d=a(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&v(d,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=d,this._cipher.scrub()},m.prototype.getAuthTag=function(){if(this._decrypt||!_.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},m.prototype.setAuthTag=function(g){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=g},m.prototype.setAAD=function(g){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(g),this._alen+=g.length},authCipher=m,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var b=requireAes(),_=requireSafeBuffer$2().Buffer,S=requireCipherBase(),p=requireInherits_browser$8();function E(a,w,v,y){S.call(this),this._cipher=new b.AES(w),this._prev=_.from(v),this._cache=_.allocUnsafe(0),this._secCache=_.allocUnsafe(0),this._decrypt=y,this._mode=a}return p(E,S),E.prototype._update=function(a){return this._mode.encrypt(this,a,this._decrypt)},E.prototype._final=function(){this._cipher.scrub()},streamCipher=E,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var b=requireSafeBuffer$2().Buffer,_=requireMd5_js();function S(p,E,a,w){if(b.isBuffer(p)||(p=b.from(p,"binary")),E&&(b.isBuffer(E)||(E=b.from(E,"binary")),E.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var v=a/8,y=b.alloc(v),m=b.alloc(w||0),d=b.alloc(0);v>0||w>0;){var g=new _;g.update(d),g.update(p),E&&g.update(E),d=g.digest();var x=0;if(v>0){var R=y.length-v;x=Math.min(v,d.length),d.copy(y,R,0,x),v-=x}if(x<d.length&&w>0){var q=m.length-w,B=Math.min(w,d.length-x);d.copy(m,q,x,x+B),w-=B}}return d.fill(0),{key:y,iv:m}}return evp_bytestokey=S,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var b=requireModes$1(),_=requireAuthCipher(),S=requireSafeBuffer$2().Buffer,p=requireStreamCipher(),E=requireCipherBase(),a=requireAes(),w=requireEvp_bytestokey(),v=requireInherits_browser$8();function y(R,q,B){E.call(this),this._cache=new d,this._cipher=new a.AES(q),this._prev=S.from(B),this._mode=R,this._autopadding=!0}v(y,E),y.prototype._update=function(R){this._cache.add(R);for(var q,B,$=[];q=this._cache.get();)B=this._mode.encrypt(this,q),$.push(B);return S.concat($)};var m=S.alloc(16,16);y.prototype._final=function(){var R=this._cache.flush();if(this._autopadding)return R=this._mode.encrypt(this,R),this._cipher.scrub(),R;if(!R.equals(m))throw this._cipher.scrub(),new Error("data not multiple of block length")},y.prototype.setAutoPadding=function(R){return this._autopadding=!!R,this};function d(){this.cache=S.allocUnsafe(0)}d.prototype.add=function(R){this.cache=S.concat([this.cache,R])},d.prototype.get=function(){if(this.cache.length>15){var R=this.cache.slice(0,16);return this.cache=this.cache.slice(16),R}return null},d.prototype.flush=function(){for(var R=16-this.cache.length,q=S.allocUnsafe(R),B=-1;++B<R;)q.writeUInt8(R,B);return S.concat([this.cache,q])};function g(R,q,B){var $=b[R.toLowerCase()];if(!$)throw new TypeError("invalid suite type");if(typeof q=="string"&&(q=S.from(q)),q.length!==$.key/8)throw new TypeError("invalid key length "+q.length);if(typeof B=="string"&&(B=S.from(B)),$.mode!=="GCM"&&B.length!==$.iv)throw new TypeError("invalid iv length "+B.length);return $.type==="stream"?new p($.module,q,B):$.type==="auth"?new _($.module,q,B):new y($.module,q,B)}function x(R,q){var B=b[R.toLowerCase()];if(!B)throw new TypeError("invalid suite type");var $=w(q,!1,B.key,B.iv);return g(R,$.key,$.iv)}return encrypter.createCipheriv=g,encrypter.createCipher=x,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var b=requireAuthCipher(),_=requireSafeBuffer$2().Buffer,S=requireModes$1(),p=requireStreamCipher(),E=requireCipherBase(),a=requireAes(),w=requireEvp_bytestokey(),v=requireInherits_browser$8();function y(R,q,B){E.call(this),this._cache=new m,this._last=void 0,this._cipher=new a.AES(q),this._prev=_.from(B),this._mode=R,this._autopadding=!0}v(y,E),y.prototype._update=function(R){this._cache.add(R);for(var q,B,$=[];q=this._cache.get(this._autopadding);)B=this._mode.decrypt(this,q),$.push(B);return _.concat($)},y.prototype._final=function(){var R=this._cache.flush();if(this._autopadding)return d(this._mode.decrypt(this,R));if(R)throw new Error("data not multiple of block length")},y.prototype.setAutoPadding=function(R){return this._autopadding=!!R,this};function m(){this.cache=_.allocUnsafe(0)}m.prototype.add=function(R){this.cache=_.concat([this.cache,R])},m.prototype.get=function(R){var q;if(R){if(this.cache.length>16)return q=this.cache.slice(0,16),this.cache=this.cache.slice(16),q}else if(this.cache.length>=16)return q=this.cache.slice(0,16),this.cache=this.cache.slice(16),q;return null},m.prototype.flush=function(){if(this.cache.length)return this.cache};function d(R){var q=R[15];if(q<1||q>16)throw new Error("unable to decrypt data");for(var B=-1;++B<q;)if(R[B+(16-q)]!==q)throw new Error("unable to decrypt data");if(q!==16)return R.slice(0,16-q)}function g(R,q,B){var $=S[R.toLowerCase()];if(!$)throw new TypeError("invalid suite type");if(typeof B=="string"&&(B=_.from(B)),$.mode!=="GCM"&&B.length!==$.iv)throw new TypeError("invalid iv length "+B.length);if(typeof q=="string"&&(q=_.from(q)),q.length!==$.key/8)throw new TypeError("invalid key length "+q.length);return $.type==="stream"?new p($.module,q,B,!0):$.type==="auth"?new b($.module,q,B,!0):new y($.module,q,B)}function x(R,q){var B=S[R.toLowerCase()];if(!B)throw new TypeError("invalid suite type");var $=w(q,!1,B.key,B.iv);return g(R,$.key,$.iv)}return decrypter.createDecipher=x,decrypter.createDecipheriv=g,decrypter}var hasRequiredBrowser$7;function requireBrowser$7(){if(hasRequiredBrowser$7)return browser$6;hasRequiredBrowser$7=1;var b=requireEncrypter(),_=requireDecrypter(),S=require$$2;function p(){return Object.keys(S)}return browser$6.createCipher=browser$6.Cipher=b.createCipher,browser$6.createCipheriv=browser$6.Cipheriv=b.createCipheriv,browser$6.createDecipher=browser$6.Decipher=_.createDecipher,browser$6.createDecipheriv=browser$6.Decipheriv=_.createDecipheriv,browser$6.listCiphers=browser$6.getCiphers=p,browser$6}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,(function(b){b["des-ecb"]={key:8,iv:0},b["des-cbc"]=b.des={key:8,iv:8},b["des-ede3-cbc"]=b.des3={key:24,iv:8},b["des-ede3"]={key:24,iv:0},b["des-ede-cbc"]={key:16,iv:8},b["des-ede"]={key:16,iv:0}})(modes)),modes}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$7;hasRequiredBrowser$6=1;var b=requireBrowserifyDes(),_=requireBrowser$7(),S=requireModes$1(),p=requireModes(),E=requireEvp_bytestokey();function a(d,g){d=d.toLowerCase();var x,R;if(S[d])x=S[d].key,R=S[d].iv;else if(p[d])x=p[d].key*8,R=p[d].iv;else throw new TypeError("invalid suite type");var q=E(g,!1,x,R);return v(d,q.key,q.iv)}function w(d,g){d=d.toLowerCase();var x,R;if(S[d])x=S[d].key,R=S[d].iv;else if(p[d])x=p[d].key*8,R=p[d].iv;else throw new TypeError("invalid suite type");var q=E(g,!1,x,R);return y(d,q.key,q.iv)}function v(d,g,x){if(d=d.toLowerCase(),S[d])return _.createCipheriv(d,g,x);if(p[d])return new b({key:g,iv:x,mode:d});throw new TypeError("invalid suite type")}function y(d,g,x){if(d=d.toLowerCase(),S[d])return _.createDecipheriv(d,g,x);if(p[d])return new b({key:g,iv:x,mode:d,decrypt:!0});throw new TypeError("invalid suite type")}function m(){return Object.keys(p).concat(_.getCiphers())}return browser$7.createCipher=browser$7.Cipher=a,browser$7.createCipheriv=browser$7.Cipheriv=v,browser$7.createDecipher=browser$7.Decipher=w,browser$7.createDecipheriv=browser$7.Decipheriv=y,browser$7.listCiphers=browser$7.getCiphers=m,browser$7}var browser$5={},bn$d={exports:{}},bn$c=bn$d.exports,hasRequiredBn$6;function requireBn$6(){return hasRequiredBn$6||(hasRequiredBn$6=1,(function(b){(function(_,S){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function E(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function a(c,e,t){if(a.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof _=="object"?_.exports=a:S.BN=a,a.BN=a,a.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}a.isBN=function(e){return e instanceof a?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var f=0;e[0]==="-"&&(f++,this.negative=1),f<e.length&&(t===16?this._parseHex(e,f,n):(this._parseBase(e,t,f),n==="le"&&this._initArray(this.toArray(),t,n)))},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 f=0;f<this.length;f++)this.words[f]=0;var s,u,l=0;if(n==="be")for(f=e.length-1,s=0;f>=0;f-=3)u=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(f=0,s=0;f<e.length;f+=3)u=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function v(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function y(c,e,t){var n=v(c,t);return t-1>=e&&(n|=v(c,t-1)<<4),n}a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var s=0,u=0,l;if(n==="be")for(f=e.length-1;f>=t;f-=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function m(c,e,t,n){for(var f=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;f*=n,l>=49?f+=l-49+10:l>=17?f+=l-17+10:f+=l}return f}a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var f=0,s=1;s<=67108863;s*=t)f++;f--,s=s/t|0;for(var u=e.length-n,l=u%f,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=f)r=m(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var M=1;for(r=m(e,h,e.length,t),h=0;h<l;h++)M*=t;this.imuln(M),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],x=[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];a.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var f=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<f|s)&16777215).toString(16);s=l>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=x[e];n="";var M=this.clone();for(M.negative=0;!M.isZero();){var T=M.modn(h).toString(e);M=M.idivn(h),M.isZero()?n=T+n:n=d[r-T.length]+T+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var f=this.byteLength(),s=n||Math.max(1,f);p(f<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-f;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function R(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(c.words[n]&1<<f)>>>f}return e}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var f=0;f<n.length;f++)this.words[f]=t.words[f]^n.words[f];if(this!==t)for(;f<t.length;f++)this.words[f]=t.words[f];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var f=0;f<t;f++)this.words[f]=~this.words[f]&67108863;return n>0&&(this.words[f]=~this.words[f]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,f=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<f:this.words[n]=this.words[n]&~(1<<f),this.strip()},a.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,f;this.length>e.length?(n=this,f=e):(n=e,f=this);for(var s=0,u=0;u<f.length;u++)t=(n.words[u]|0)+(f.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},a.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,s;n>0?(f=this,s=e):(f=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(f.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<f.length;l++)t=(f.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<f.length&&f!==this)for(;l<f.length;l++)this.words[l]=f.words[l];return this.length=Math.max(this.length,l),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function q(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var f=c.words[0]|0,s=e.words[0]|0,u=f*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,M=o&67108863,T=Math.min(r,e.length-1),N=Math.max(0,r-c.length+1);N<=T;N++){var Q=r-N|0;f=c.words[Q]|0,s=e.words[N]|0,u=f*s+M,h+=u/67108864|0,M=u&67108863}t.words[r]=M|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var B=function(e,t,n){var f=e.words,s=t.words,u=n.words,l=0,o,r,h,M=f[0]|0,T=M&8191,N=M>>>13,Q=f[1]|0,K=Q&8191,A=Q>>>13,O=f[2]|0,W=O&8191,Y=O>>>13,Z=f[3]|0,j=Z&8191,ne=Z>>>13,Re=f[4]|0,le=Re&8191,de=Re>>>13,Pe=f[5]|0,me=Pe&8191,he=Pe>>>13,Le=f[6]|0,ve=Le&8191,ge=Le>>>13,De=f[7]|0,ye=De&8191,xe=De>>>13,Ue=f[8]|0,Se=Ue&8191,Ae=Ue>>>13,He=f[9]|0,z=He&8191,C=He>>>13,F=s[0]|0,V=F&8191,ae=F>>>13,pe=s[1]|0,re=pe&8191,oe=pe>>>13,Oe=s[2]|0,ce=Oe&8191,we=Oe>>>13,Ce=s[3]|0,qe=Ce&8191,Te=Ce>>>13,je=s[4]|0,Be=je&8191,$e=je>>>13,ze=s[5]|0,H=ze&8191,P=ze>>>13,U=s[6]|0,J=U&8191,fe=U>>>13,be=s[7]|0,se=be&8191,_e=be>>>13,Ne=s[8]|0,Me=Ne&8191,Ee=Ne>>>13,Fe=s[9]|0,Ie=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(T,V),r=Math.imul(T,ae),r=r+Math.imul(N,V)|0,h=Math.imul(N,ae);var We=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(K,V),r=Math.imul(K,ae),r=r+Math.imul(A,V)|0,h=Math.imul(A,ae),o=o+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,r=r+Math.imul(N,re)|0,h=h+Math.imul(N,oe)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(W,V),r=Math.imul(W,ae),r=r+Math.imul(Y,V)|0,h=Math.imul(Y,ae),o=o+Math.imul(K,re)|0,r=r+Math.imul(K,oe)|0,r=r+Math.imul(A,re)|0,h=h+Math.imul(A,oe)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(T,we)|0,r=r+Math.imul(N,ce)|0,h=h+Math.imul(N,we)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(j,V),r=Math.imul(j,ae),r=r+Math.imul(ne,V)|0,h=Math.imul(ne,ae),o=o+Math.imul(W,re)|0,r=r+Math.imul(W,oe)|0,r=r+Math.imul(Y,re)|0,h=h+Math.imul(Y,oe)|0,o=o+Math.imul(K,ce)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(A,ce)|0,h=h+Math.imul(A,we)|0,o=o+Math.imul(T,qe)|0,r=r+Math.imul(T,Te)|0,r=r+Math.imul(N,qe)|0,h=h+Math.imul(N,Te)|0;var Ke=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(le,V),r=Math.imul(le,ae),r=r+Math.imul(de,V)|0,h=Math.imul(de,ae),o=o+Math.imul(j,re)|0,r=r+Math.imul(j,oe)|0,r=r+Math.imul(ne,re)|0,h=h+Math.imul(ne,oe)|0,o=o+Math.imul(W,ce)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(Y,ce)|0,h=h+Math.imul(Y,we)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(A,qe)|0,h=h+Math.imul(A,Te)|0,o=o+Math.imul(T,Be)|0,r=r+Math.imul(T,$e)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,$e)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(me,V),r=Math.imul(me,ae),r=r+Math.imul(he,V)|0,h=Math.imul(he,ae),o=o+Math.imul(le,re)|0,r=r+Math.imul(le,oe)|0,r=r+Math.imul(de,re)|0,h=h+Math.imul(de,oe)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(j,we)|0,r=r+Math.imul(ne,ce)|0,h=h+Math.imul(ne,we)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(Y,qe)|0,h=h+Math.imul(Y,Te)|0,o=o+Math.imul(K,Be)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(A,Be)|0,h=h+Math.imul(A,$e)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(T,P)|0,r=r+Math.imul(N,H)|0,h=h+Math.imul(N,P)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ve,V),r=Math.imul(ve,ae),r=r+Math.imul(ge,V)|0,h=Math.imul(ge,ae),o=o+Math.imul(me,re)|0,r=r+Math.imul(me,oe)|0,r=r+Math.imul(he,re)|0,h=h+Math.imul(he,oe)|0,o=o+Math.imul(le,ce)|0,r=r+Math.imul(le,we)|0,r=r+Math.imul(de,ce)|0,h=h+Math.imul(de,we)|0,o=o+Math.imul(j,qe)|0,r=r+Math.imul(j,Te)|0,r=r+Math.imul(ne,qe)|0,h=h+Math.imul(ne,Te)|0,o=o+Math.imul(W,Be)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(Y,Be)|0,h=h+Math.imul(Y,$e)|0,o=o+Math.imul(K,H)|0,r=r+Math.imul(K,P)|0,r=r+Math.imul(A,H)|0,h=h+Math.imul(A,P)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(T,fe)|0,r=r+Math.imul(N,J)|0,h=h+Math.imul(N,fe)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(ye,V),r=Math.imul(ye,ae),r=r+Math.imul(xe,V)|0,h=Math.imul(xe,ae),o=o+Math.imul(ve,re)|0,r=r+Math.imul(ve,oe)|0,r=r+Math.imul(ge,re)|0,h=h+Math.imul(ge,oe)|0,o=o+Math.imul(me,ce)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(he,ce)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(le,qe)|0,r=r+Math.imul(le,Te)|0,r=r+Math.imul(de,qe)|0,h=h+Math.imul(de,Te)|0,o=o+Math.imul(j,Be)|0,r=r+Math.imul(j,$e)|0,r=r+Math.imul(ne,Be)|0,h=h+Math.imul(ne,$e)|0,o=o+Math.imul(W,H)|0,r=r+Math.imul(W,P)|0,r=r+Math.imul(Y,H)|0,h=h+Math.imul(Y,P)|0,o=o+Math.imul(K,J)|0,r=r+Math.imul(K,fe)|0,r=r+Math.imul(A,J)|0,h=h+Math.imul(A,fe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(T,_e)|0,r=r+Math.imul(N,se)|0,h=h+Math.imul(N,_e)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(Se,V),r=Math.imul(Se,ae),r=r+Math.imul(Ae,V)|0,h=Math.imul(Ae,ae),o=o+Math.imul(ye,re)|0,r=r+Math.imul(ye,oe)|0,r=r+Math.imul(xe,re)|0,h=h+Math.imul(xe,oe)|0,o=o+Math.imul(ve,ce)|0,r=r+Math.imul(ve,we)|0,r=r+Math.imul(ge,ce)|0,h=h+Math.imul(ge,we)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(le,Be)|0,r=r+Math.imul(le,$e)|0,r=r+Math.imul(de,Be)|0,h=h+Math.imul(de,$e)|0,o=o+Math.imul(j,H)|0,r=r+Math.imul(j,P)|0,r=r+Math.imul(ne,H)|0,h=h+Math.imul(ne,P)|0,o=o+Math.imul(W,J)|0,r=r+Math.imul(W,fe)|0,r=r+Math.imul(Y,J)|0,h=h+Math.imul(Y,fe)|0,o=o+Math.imul(K,se)|0,r=r+Math.imul(K,_e)|0,r=r+Math.imul(A,se)|0,h=h+Math.imul(A,_e)|0,o=o+Math.imul(T,Me)|0,r=r+Math.imul(T,Ee)|0,r=r+Math.imul(N,Me)|0,h=h+Math.imul(N,Ee)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(z,V),r=Math.imul(z,ae),r=r+Math.imul(C,V)|0,h=Math.imul(C,ae),o=o+Math.imul(Se,re)|0,r=r+Math.imul(Se,oe)|0,r=r+Math.imul(Ae,re)|0,h=h+Math.imul(Ae,oe)|0,o=o+Math.imul(ye,ce)|0,r=r+Math.imul(ye,we)|0,r=r+Math.imul(xe,ce)|0,h=h+Math.imul(xe,we)|0,o=o+Math.imul(ve,qe)|0,r=r+Math.imul(ve,Te)|0,r=r+Math.imul(ge,qe)|0,h=h+Math.imul(ge,Te)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(he,Be)|0,h=h+Math.imul(he,$e)|0,o=o+Math.imul(le,H)|0,r=r+Math.imul(le,P)|0,r=r+Math.imul(de,H)|0,h=h+Math.imul(de,P)|0,o=o+Math.imul(j,J)|0,r=r+Math.imul(j,fe)|0,r=r+Math.imul(ne,J)|0,h=h+Math.imul(ne,fe)|0,o=o+Math.imul(W,se)|0,r=r+Math.imul(W,_e)|0,r=r+Math.imul(Y,se)|0,h=h+Math.imul(Y,_e)|0,o=o+Math.imul(K,Me)|0,r=r+Math.imul(K,Ee)|0,r=r+Math.imul(A,Me)|0,h=h+Math.imul(A,Ee)|0,o=o+Math.imul(T,Ie)|0,r=r+Math.imul(T,ke)|0,r=r+Math.imul(N,Ie)|0,h=h+Math.imul(N,ke)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(z,re),r=Math.imul(z,oe),r=r+Math.imul(C,re)|0,h=Math.imul(C,oe),o=o+Math.imul(Se,ce)|0,r=r+Math.imul(Se,we)|0,r=r+Math.imul(Ae,ce)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(ye,qe)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(xe,qe)|0,h=h+Math.imul(xe,Te)|0,o=o+Math.imul(ve,Be)|0,r=r+Math.imul(ve,$e)|0,r=r+Math.imul(ge,Be)|0,h=h+Math.imul(ge,$e)|0,o=o+Math.imul(me,H)|0,r=r+Math.imul(me,P)|0,r=r+Math.imul(he,H)|0,h=h+Math.imul(he,P)|0,o=o+Math.imul(le,J)|0,r=r+Math.imul(le,fe)|0,r=r+Math.imul(de,J)|0,h=h+Math.imul(de,fe)|0,o=o+Math.imul(j,se)|0,r=r+Math.imul(j,_e)|0,r=r+Math.imul(ne,se)|0,h=h+Math.imul(ne,_e)|0,o=o+Math.imul(W,Me)|0,r=r+Math.imul(W,Ee)|0,r=r+Math.imul(Y,Me)|0,h=h+Math.imul(Y,Ee)|0,o=o+Math.imul(K,Ie)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(A,Ie)|0,h=h+Math.imul(A,ke)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(z,ce),r=Math.imul(z,we),r=r+Math.imul(C,ce)|0,h=Math.imul(C,we),o=o+Math.imul(Se,qe)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,$e)|0,r=r+Math.imul(xe,Be)|0,h=h+Math.imul(xe,$e)|0,o=o+Math.imul(ve,H)|0,r=r+Math.imul(ve,P)|0,r=r+Math.imul(ge,H)|0,h=h+Math.imul(ge,P)|0,o=o+Math.imul(me,J)|0,r=r+Math.imul(me,fe)|0,r=r+Math.imul(he,J)|0,h=h+Math.imul(he,fe)|0,o=o+Math.imul(le,se)|0,r=r+Math.imul(le,_e)|0,r=r+Math.imul(de,se)|0,h=h+Math.imul(de,_e)|0,o=o+Math.imul(j,Me)|0,r=r+Math.imul(j,Ee)|0,r=r+Math.imul(ne,Me)|0,h=h+Math.imul(ne,Ee)|0,o=o+Math.imul(W,Ie)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(Y,Ie)|0,h=h+Math.imul(Y,ke)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(z,qe),r=Math.imul(z,Te),r=r+Math.imul(C,qe)|0,h=Math.imul(C,Te),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,$e)|0,r=r+Math.imul(Ae,Be)|0,h=h+Math.imul(Ae,$e)|0,o=o+Math.imul(ye,H)|0,r=r+Math.imul(ye,P)|0,r=r+Math.imul(xe,H)|0,h=h+Math.imul(xe,P)|0,o=o+Math.imul(ve,J)|0,r=r+Math.imul(ve,fe)|0,r=r+Math.imul(ge,J)|0,h=h+Math.imul(ge,fe)|0,o=o+Math.imul(me,se)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(he,se)|0,h=h+Math.imul(he,_e)|0,o=o+Math.imul(le,Me)|0,r=r+Math.imul(le,Ee)|0,r=r+Math.imul(de,Me)|0,h=h+Math.imul(de,Ee)|0,o=o+Math.imul(j,Ie)|0,r=r+Math.imul(j,ke)|0,r=r+Math.imul(ne,Ie)|0,h=h+Math.imul(ne,ke)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(z,Be),r=Math.imul(z,$e),r=r+Math.imul(C,Be)|0,h=Math.imul(C,$e),o=o+Math.imul(Se,H)|0,r=r+Math.imul(Se,P)|0,r=r+Math.imul(Ae,H)|0,h=h+Math.imul(Ae,P)|0,o=o+Math.imul(ye,J)|0,r=r+Math.imul(ye,fe)|0,r=r+Math.imul(xe,J)|0,h=h+Math.imul(xe,fe)|0,o=o+Math.imul(ve,se)|0,r=r+Math.imul(ve,_e)|0,r=r+Math.imul(ge,se)|0,h=h+Math.imul(ge,_e)|0,o=o+Math.imul(me,Me)|0,r=r+Math.imul(me,Ee)|0,r=r+Math.imul(he,Me)|0,h=h+Math.imul(he,Ee)|0,o=o+Math.imul(le,Ie)|0,r=r+Math.imul(le,ke)|0,r=r+Math.imul(de,Ie)|0,h=h+Math.imul(de,ke)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(z,H),r=Math.imul(z,P),r=r+Math.imul(C,H)|0,h=Math.imul(C,P),o=o+Math.imul(Se,J)|0,r=r+Math.imul(Se,fe)|0,r=r+Math.imul(Ae,J)|0,h=h+Math.imul(Ae,fe)|0,o=o+Math.imul(ye,se)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(xe,se)|0,h=h+Math.imul(xe,_e)|0,o=o+Math.imul(ve,Me)|0,r=r+Math.imul(ve,Ee)|0,r=r+Math.imul(ge,Me)|0,h=h+Math.imul(ge,Ee)|0,o=o+Math.imul(me,Ie)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(he,Ie)|0,h=h+Math.imul(he,ke)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(z,J),r=Math.imul(z,fe),r=r+Math.imul(C,J)|0,h=Math.imul(C,fe),o=o+Math.imul(Se,se)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ae,se)|0,h=h+Math.imul(Ae,_e)|0,o=o+Math.imul(ye,Me)|0,r=r+Math.imul(ye,Ee)|0,r=r+Math.imul(xe,Me)|0,h=h+Math.imul(xe,Ee)|0,o=o+Math.imul(ve,Ie)|0,r=r+Math.imul(ve,ke)|0,r=r+Math.imul(ge,Ie)|0,h=h+Math.imul(ge,ke)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(z,se),r=Math.imul(z,_e),r=r+Math.imul(C,se)|0,h=Math.imul(C,_e),o=o+Math.imul(Se,Me)|0,r=r+Math.imul(Se,Ee)|0,r=r+Math.imul(Ae,Me)|0,h=h+Math.imul(Ae,Ee)|0,o=o+Math.imul(ye,Ie)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(xe,Ie)|0,h=h+Math.imul(xe,ke)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(z,Me),r=Math.imul(z,Ee),r=r+Math.imul(C,Me)|0,h=Math.imul(C,Ee),o=o+Math.imul(Se,Ie)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ae,Ie)|0,h=h+Math.imul(Ae,ke)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(z,Ie),r=Math.imul(z,ke),r=r+Math.imul(C,Ie)|0,h=Math.imul(C,ke);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=We,u[1]=Ge,u[2]=Ve,u[3]=Ke,u[4]=Ze,u[5]=Ye,u[6]=Xe,u[7]=Je,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(B=q);function $(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,M=c.words[h]|0,T=e.words[r]|0,N=M*T,Q=N&67108863;u=u+(N/67108864|0)|0,Q=Q+l|0,l=Q&67108863,u=u+(Q>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function k(c,e,t){var n=new I;return n.mulp(c,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=B(this,e,t):f<63?n=q(this,e,t):f<1024?n=$(this,e,t):n=k(this,e,t),n};function I(c,e){this.x=c,this.y=e}I.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,f=0;f<e;f++)t[f]=this.revBin(f,n,e);return t},I.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var f=0,s=0;s<t;s++)f|=(e&1)<<t-s-1,e>>=1;return f},I.prototype.permute=function(e,t,n,f,s,u){for(var l=0;l<u;l++)f[l]=t[e[l]],s[l]=n[e[l]]},I.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),M=0;M<s;M+=o)for(var T=r,N=h,Q=0;Q<l;Q++){var K=n[M+Q],A=f[M+Q],O=n[M+Q+l],W=f[M+Q+l],Y=T*O-N*W;W=T*W+N*O,O=Y,n[M+Q]=K+O,f[M+Q]=A+W,n[M+Q+l]=K-O,f[M+Q+l]=A-W,Q!==o&&(Y=r*T-h*N,N=r*N+h*T,T=Y)}},I.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,f=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+f},I.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var f=0;f<n/2;f++){var s=e[f];e[f]=e[n-f-1],e[n-f-1]=s,s=t[f],t[f]=-t[n-f-1],t[n-f-1]=-s}},I.prototype.normalize13b=function(e,t){for(var n=0,f=0;f<t/2;f++){var s=Math.round(e[2*f+1]/t)*8192+Math.round(e[2*f]/t)+n;e[f]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},I.prototype.convert13b=function(e,t,n,f){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<f;++u)n[u]=0;p(s===0),p((s&-8192)===0)},I.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},I.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),l=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),M=new Array(f),T=new Array(f),N=n.words;N.length=f,this.convert13b(e.words,e.length,l,f),this.convert13b(t.words,t.length,h,f),this.transform(l,u,o,r,f,s),this.transform(h,u,M,T,f,s);for(var Q=0;Q<f;Q++){var K=o[Q]*M[Q]-r[Q]*T[Q];r[Q]=o[Q]*T[Q]+r[Q]*M[Q],o[Q]=K}return this.conjugate(o,r,f),this.transform(o,r,N,u,f,s),this.conjugate(N,u,f),this.normalize13b(N,f),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),k(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var f=(this.words[n]|0)*e,s=(f&67108863)+(t&67108863);t>>=26,t+=f/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=R(e);if(t.length===0)return new a(1);for(var n=this,f=0;f<t.length&&t[f]===0;f++,n=n.sqr());if(++f<t.length)for(var s=n.sqr();f<t.length;f++,s=s.sqr())t[f]!==0&&(n=n.mul(s));return n},a.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&f,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var f;t?f=(t-t%26)/26:f=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(f-=u,f=Math.max(0,f),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=f);r--){var M=this.words[r]|0;this.words[r]=h<<26-s|M>>>s,h=M&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&f)},a.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var f=67108863^67108863>>>t<<t;this.words[this.length-1]&=f}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var f=e.length+n,s;this._expand(f);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,f=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),f.iushln(n),u=s.words[s.length-1]|0);var o=f.length-s.length,r;if(t!=="mod"){r=new a(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var M=f.clone()._ishlnsubmul(s,1,o);M.negative===0&&(f=M,r&&(r.words[o]=1));for(var T=o-1;T>=0;T--){var N=(f.words[s.length+T]|0)*67108864+(f.words[s.length+T-1]|0);for(N=Math.min(N/u|0,67108863),f._ishlnsubmul(s,N,T);f.negative!==0;)N--,f.negative=0,f._ishlnsubmul(s,1,T),f.isZero()||(f.negative^=1);r&&(r.words[T]=N)}return r&&r.strip(),f.strip(),t!=="div"&&n!==0&&f.iushrn(n),{div:r||null,mod:f}},a.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var f,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(f=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:f,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(f=u.div.neg()),{div:f,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,f=e.ushrn(1),s=e.andln(1),u=n.cmp(f);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,f=this.length-1;f>=0;f--)n=(t*n+(this.words[f]|0))%e;return n},a.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var f=(this.words[n]|0)+t*67108864;this.words[n]=f/e|0,t=f%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=new a(0),l=new a(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var M=0,T=1;(t.words[0]&T)===0&&M<26;++M,T<<=1);if(M>0)for(t.iushrn(M);M-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var N=0,Q=1;(n.words[0]&Q)===0&&N<26;++N,Q<<=1);if(N>0)for(n.iushrn(N);N-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(l)):(n.isub(t),u.isub(f),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},a.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)f.isOdd()&&f.iadd(u),f.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(s)):(n.isub(t),s.isub(f))}var M;return t.cmpn(1)===0?M=f:M=s,M.cmpn(0)<0&&M.iadd(e),M},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var f=0;t.isEven()&&n.isEven();f++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(f)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=f,this;for(var s=f,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var f=this.words[0]|0;n=f===e?0:f<e?-1:1}return this.negative!==0?-n|0:n},a.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var f=this.words[n]|0,s=e.words[n]|0;if(f!==s){f<s?t=-1:f>s&&(t=1);break}}return t},a.prototype.gtn=function(e){return this.cmpn(e)===1},a.prototype.gt=function(e){return this.cmp(e)===1},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return this.cmpn(e)===0},a.prototype.eq=function(e){return this.cmp(e)===0},a.red=function(e){return new ee(e)},a.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var L={k256:null,p224:null,p192:null,p25519:null};function D(c,e){this.name=c,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},D.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var f=n<this.n?-1:t.ucmp(this.p);return f===0?(t.words[0]=0,t.length=1):f>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},D.prototype.split=function(e,t){e.iushrn(this.n,0,t)},D.prototype.imulK=function(e){return e.imul(this.k)};function G(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}E(G,D),G.prototype.split=function(e,t){for(var n=4194303,f=Math.min(e.length,9),s=0;s<f;s++)t.words[s]=e.words[s];if(t.length=f,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},G.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var f=e.words[n]|0;t+=f*977,e.words[n]=t&67108863,t=f*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function X(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}E(X,D);function te(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}E(te,D);function ie(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}E(ie,D),ie.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var f=(e.words[n]|0)*19+t,s=f&67108863;f>>>=26,e.words[n]=s,t=f}return t!==0&&(e.words[e.length++]=t),e},a._prime=function(e){if(L[e])return L[e];var t;if(e==="k256")t=new G;else if(e==="p224")t=new X;else if(e==="p192")t=new te;else if(e==="p25519")t=new ie;else throw new Error("Unknown prime "+e);return L[e]=t,t};function ee(c){if(typeof c=="string"){var e=a._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var f=this.m.subn(1),s=0;!f.isZero()&&f.andln(1)===0;)s++,f.iushrn(1);p(!f.isZero());var u=new a(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,f),M=this.pow(e,f.addn(1).iushrn(1)),T=this.pow(e,f),N=s;T.cmp(u)!==0;){for(var Q=T,K=0;Q.cmp(u)!==0;K++)Q=Q.redSqr();p(K<N);var A=this.pow(h,new a(1).iushln(N-K-1));M=M.redMul(A),h=A.redSqr(),T=T.redMul(h),N=K}return M},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,f=new Array(1<<n);f[0]=new a(1).toRed(this),f[1]=e;for(var s=2;s<f.length;s++)f[s]=this.mul(f[s-1],e);var u=f[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],M=r-1;M>=0;M--){var T=h>>M&1;if(u!==f[0]&&(u=this.sqr(u)),T===0&&l===0){o=0;continue}l<<=1,l|=T,o++,!(o!==n&&(s!==0||M!==0))&&(u=this.mul(u,f[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new ue(e)};function ue(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}E(ue,ee),ue.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},ue.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},ue.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(b,bn$c)})(bn$d)),bn$d.exports}var bn$b={exports:{}},bn$a=bn$b.exports,hasRequiredBn$5;function requireBn$5(){return hasRequiredBn$5||(hasRequiredBn$5=1,(function(b){(function(_,S){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function E(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function a(c,e,t){if(a.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof _=="object"?_.exports=a:S.BN=a,a.BN=a,a.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}a.isBN=function(e){return e instanceof a?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var f=0;e[0]==="-"&&(f++,this.negative=1),f<e.length&&(t===16?this._parseHex(e,f,n):(this._parseBase(e,t,f),n==="le"&&this._initArray(this.toArray(),t,n)))},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 f=0;f<this.length;f++)this.words[f]=0;var s,u,l=0;if(n==="be")for(f=e.length-1,s=0;f>=0;f-=3)u=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(f=0,s=0;f<e.length;f+=3)u=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function v(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function y(c,e,t){var n=v(c,t);return t-1>=e&&(n|=v(c,t-1)<<4),n}a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var s=0,u=0,l;if(n==="be")for(f=e.length-1;f>=t;f-=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function m(c,e,t,n){for(var f=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;f*=n,l>=49?f+=l-49+10:l>=17?f+=l-17+10:f+=l}return f}a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var f=0,s=1;s<=67108863;s*=t)f++;f--,s=s/t|0;for(var u=e.length-n,l=u%f,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=f)r=m(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var M=1;for(r=m(e,h,e.length,t),h=0;h<l;h++)M*=t;this.imuln(M),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],x=[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];a.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var f=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<f|s)&16777215).toString(16);s=l>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=x[e];n="";var M=this.clone();for(M.negative=0;!M.isZero();){var T=M.modn(h).toString(e);M=M.idivn(h),M.isZero()?n=T+n:n=d[r-T.length]+T+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var f=this.byteLength(),s=n||Math.max(1,f);p(f<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-f;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function R(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(c.words[n]&1<<f)>>>f}return e}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var f=0;f<n.length;f++)this.words[f]=t.words[f]^n.words[f];if(this!==t)for(;f<t.length;f++)this.words[f]=t.words[f];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var f=0;f<t;f++)this.words[f]=~this.words[f]&67108863;return n>0&&(this.words[f]=~this.words[f]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,f=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<f:this.words[n]=this.words[n]&~(1<<f),this.strip()},a.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,f;this.length>e.length?(n=this,f=e):(n=e,f=this);for(var s=0,u=0;u<f.length;u++)t=(n.words[u]|0)+(f.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},a.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,s;n>0?(f=this,s=e):(f=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(f.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<f.length;l++)t=(f.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<f.length&&f!==this)for(;l<f.length;l++)this.words[l]=f.words[l];return this.length=Math.max(this.length,l),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function q(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var f=c.words[0]|0,s=e.words[0]|0,u=f*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,M=o&67108863,T=Math.min(r,e.length-1),N=Math.max(0,r-c.length+1);N<=T;N++){var Q=r-N|0;f=c.words[Q]|0,s=e.words[N]|0,u=f*s+M,h+=u/67108864|0,M=u&67108863}t.words[r]=M|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var B=function(e,t,n){var f=e.words,s=t.words,u=n.words,l=0,o,r,h,M=f[0]|0,T=M&8191,N=M>>>13,Q=f[1]|0,K=Q&8191,A=Q>>>13,O=f[2]|0,W=O&8191,Y=O>>>13,Z=f[3]|0,j=Z&8191,ne=Z>>>13,Re=f[4]|0,le=Re&8191,de=Re>>>13,Pe=f[5]|0,me=Pe&8191,he=Pe>>>13,Le=f[6]|0,ve=Le&8191,ge=Le>>>13,De=f[7]|0,ye=De&8191,xe=De>>>13,Ue=f[8]|0,Se=Ue&8191,Ae=Ue>>>13,He=f[9]|0,z=He&8191,C=He>>>13,F=s[0]|0,V=F&8191,ae=F>>>13,pe=s[1]|0,re=pe&8191,oe=pe>>>13,Oe=s[2]|0,ce=Oe&8191,we=Oe>>>13,Ce=s[3]|0,qe=Ce&8191,Te=Ce>>>13,je=s[4]|0,Be=je&8191,$e=je>>>13,ze=s[5]|0,H=ze&8191,P=ze>>>13,U=s[6]|0,J=U&8191,fe=U>>>13,be=s[7]|0,se=be&8191,_e=be>>>13,Ne=s[8]|0,Me=Ne&8191,Ee=Ne>>>13,Fe=s[9]|0,Ie=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(T,V),r=Math.imul(T,ae),r=r+Math.imul(N,V)|0,h=Math.imul(N,ae);var We=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(K,V),r=Math.imul(K,ae),r=r+Math.imul(A,V)|0,h=Math.imul(A,ae),o=o+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,r=r+Math.imul(N,re)|0,h=h+Math.imul(N,oe)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(W,V),r=Math.imul(W,ae),r=r+Math.imul(Y,V)|0,h=Math.imul(Y,ae),o=o+Math.imul(K,re)|0,r=r+Math.imul(K,oe)|0,r=r+Math.imul(A,re)|0,h=h+Math.imul(A,oe)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(T,we)|0,r=r+Math.imul(N,ce)|0,h=h+Math.imul(N,we)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(j,V),r=Math.imul(j,ae),r=r+Math.imul(ne,V)|0,h=Math.imul(ne,ae),o=o+Math.imul(W,re)|0,r=r+Math.imul(W,oe)|0,r=r+Math.imul(Y,re)|0,h=h+Math.imul(Y,oe)|0,o=o+Math.imul(K,ce)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(A,ce)|0,h=h+Math.imul(A,we)|0,o=o+Math.imul(T,qe)|0,r=r+Math.imul(T,Te)|0,r=r+Math.imul(N,qe)|0,h=h+Math.imul(N,Te)|0;var Ke=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(le,V),r=Math.imul(le,ae),r=r+Math.imul(de,V)|0,h=Math.imul(de,ae),o=o+Math.imul(j,re)|0,r=r+Math.imul(j,oe)|0,r=r+Math.imul(ne,re)|0,h=h+Math.imul(ne,oe)|0,o=o+Math.imul(W,ce)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(Y,ce)|0,h=h+Math.imul(Y,we)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(A,qe)|0,h=h+Math.imul(A,Te)|0,o=o+Math.imul(T,Be)|0,r=r+Math.imul(T,$e)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,$e)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(me,V),r=Math.imul(me,ae),r=r+Math.imul(he,V)|0,h=Math.imul(he,ae),o=o+Math.imul(le,re)|0,r=r+Math.imul(le,oe)|0,r=r+Math.imul(de,re)|0,h=h+Math.imul(de,oe)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(j,we)|0,r=r+Math.imul(ne,ce)|0,h=h+Math.imul(ne,we)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(Y,qe)|0,h=h+Math.imul(Y,Te)|0,o=o+Math.imul(K,Be)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(A,Be)|0,h=h+Math.imul(A,$e)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(T,P)|0,r=r+Math.imul(N,H)|0,h=h+Math.imul(N,P)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ve,V),r=Math.imul(ve,ae),r=r+Math.imul(ge,V)|0,h=Math.imul(ge,ae),o=o+Math.imul(me,re)|0,r=r+Math.imul(me,oe)|0,r=r+Math.imul(he,re)|0,h=h+Math.imul(he,oe)|0,o=o+Math.imul(le,ce)|0,r=r+Math.imul(le,we)|0,r=r+Math.imul(de,ce)|0,h=h+Math.imul(de,we)|0,o=o+Math.imul(j,qe)|0,r=r+Math.imul(j,Te)|0,r=r+Math.imul(ne,qe)|0,h=h+Math.imul(ne,Te)|0,o=o+Math.imul(W,Be)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(Y,Be)|0,h=h+Math.imul(Y,$e)|0,o=o+Math.imul(K,H)|0,r=r+Math.imul(K,P)|0,r=r+Math.imul(A,H)|0,h=h+Math.imul(A,P)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(T,fe)|0,r=r+Math.imul(N,J)|0,h=h+Math.imul(N,fe)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(ye,V),r=Math.imul(ye,ae),r=r+Math.imul(xe,V)|0,h=Math.imul(xe,ae),o=o+Math.imul(ve,re)|0,r=r+Math.imul(ve,oe)|0,r=r+Math.imul(ge,re)|0,h=h+Math.imul(ge,oe)|0,o=o+Math.imul(me,ce)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(he,ce)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(le,qe)|0,r=r+Math.imul(le,Te)|0,r=r+Math.imul(de,qe)|0,h=h+Math.imul(de,Te)|0,o=o+Math.imul(j,Be)|0,r=r+Math.imul(j,$e)|0,r=r+Math.imul(ne,Be)|0,h=h+Math.imul(ne,$e)|0,o=o+Math.imul(W,H)|0,r=r+Math.imul(W,P)|0,r=r+Math.imul(Y,H)|0,h=h+Math.imul(Y,P)|0,o=o+Math.imul(K,J)|0,r=r+Math.imul(K,fe)|0,r=r+Math.imul(A,J)|0,h=h+Math.imul(A,fe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(T,_e)|0,r=r+Math.imul(N,se)|0,h=h+Math.imul(N,_e)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(Se,V),r=Math.imul(Se,ae),r=r+Math.imul(Ae,V)|0,h=Math.imul(Ae,ae),o=o+Math.imul(ye,re)|0,r=r+Math.imul(ye,oe)|0,r=r+Math.imul(xe,re)|0,h=h+Math.imul(xe,oe)|0,o=o+Math.imul(ve,ce)|0,r=r+Math.imul(ve,we)|0,r=r+Math.imul(ge,ce)|0,h=h+Math.imul(ge,we)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(le,Be)|0,r=r+Math.imul(le,$e)|0,r=r+Math.imul(de,Be)|0,h=h+Math.imul(de,$e)|0,o=o+Math.imul(j,H)|0,r=r+Math.imul(j,P)|0,r=r+Math.imul(ne,H)|0,h=h+Math.imul(ne,P)|0,o=o+Math.imul(W,J)|0,r=r+Math.imul(W,fe)|0,r=r+Math.imul(Y,J)|0,h=h+Math.imul(Y,fe)|0,o=o+Math.imul(K,se)|0,r=r+Math.imul(K,_e)|0,r=r+Math.imul(A,se)|0,h=h+Math.imul(A,_e)|0,o=o+Math.imul(T,Me)|0,r=r+Math.imul(T,Ee)|0,r=r+Math.imul(N,Me)|0,h=h+Math.imul(N,Ee)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(z,V),r=Math.imul(z,ae),r=r+Math.imul(C,V)|0,h=Math.imul(C,ae),o=o+Math.imul(Se,re)|0,r=r+Math.imul(Se,oe)|0,r=r+Math.imul(Ae,re)|0,h=h+Math.imul(Ae,oe)|0,o=o+Math.imul(ye,ce)|0,r=r+Math.imul(ye,we)|0,r=r+Math.imul(xe,ce)|0,h=h+Math.imul(xe,we)|0,o=o+Math.imul(ve,qe)|0,r=r+Math.imul(ve,Te)|0,r=r+Math.imul(ge,qe)|0,h=h+Math.imul(ge,Te)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(he,Be)|0,h=h+Math.imul(he,$e)|0,o=o+Math.imul(le,H)|0,r=r+Math.imul(le,P)|0,r=r+Math.imul(de,H)|0,h=h+Math.imul(de,P)|0,o=o+Math.imul(j,J)|0,r=r+Math.imul(j,fe)|0,r=r+Math.imul(ne,J)|0,h=h+Math.imul(ne,fe)|0,o=o+Math.imul(W,se)|0,r=r+Math.imul(W,_e)|0,r=r+Math.imul(Y,se)|0,h=h+Math.imul(Y,_e)|0,o=o+Math.imul(K,Me)|0,r=r+Math.imul(K,Ee)|0,r=r+Math.imul(A,Me)|0,h=h+Math.imul(A,Ee)|0,o=o+Math.imul(T,Ie)|0,r=r+Math.imul(T,ke)|0,r=r+Math.imul(N,Ie)|0,h=h+Math.imul(N,ke)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(z,re),r=Math.imul(z,oe),r=r+Math.imul(C,re)|0,h=Math.imul(C,oe),o=o+Math.imul(Se,ce)|0,r=r+Math.imul(Se,we)|0,r=r+Math.imul(Ae,ce)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(ye,qe)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(xe,qe)|0,h=h+Math.imul(xe,Te)|0,o=o+Math.imul(ve,Be)|0,r=r+Math.imul(ve,$e)|0,r=r+Math.imul(ge,Be)|0,h=h+Math.imul(ge,$e)|0,o=o+Math.imul(me,H)|0,r=r+Math.imul(me,P)|0,r=r+Math.imul(he,H)|0,h=h+Math.imul(he,P)|0,o=o+Math.imul(le,J)|0,r=r+Math.imul(le,fe)|0,r=r+Math.imul(de,J)|0,h=h+Math.imul(de,fe)|0,o=o+Math.imul(j,se)|0,r=r+Math.imul(j,_e)|0,r=r+Math.imul(ne,se)|0,h=h+Math.imul(ne,_e)|0,o=o+Math.imul(W,Me)|0,r=r+Math.imul(W,Ee)|0,r=r+Math.imul(Y,Me)|0,h=h+Math.imul(Y,Ee)|0,o=o+Math.imul(K,Ie)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(A,Ie)|0,h=h+Math.imul(A,ke)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(z,ce),r=Math.imul(z,we),r=r+Math.imul(C,ce)|0,h=Math.imul(C,we),o=o+Math.imul(Se,qe)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,$e)|0,r=r+Math.imul(xe,Be)|0,h=h+Math.imul(xe,$e)|0,o=o+Math.imul(ve,H)|0,r=r+Math.imul(ve,P)|0,r=r+Math.imul(ge,H)|0,h=h+Math.imul(ge,P)|0,o=o+Math.imul(me,J)|0,r=r+Math.imul(me,fe)|0,r=r+Math.imul(he,J)|0,h=h+Math.imul(he,fe)|0,o=o+Math.imul(le,se)|0,r=r+Math.imul(le,_e)|0,r=r+Math.imul(de,se)|0,h=h+Math.imul(de,_e)|0,o=o+Math.imul(j,Me)|0,r=r+Math.imul(j,Ee)|0,r=r+Math.imul(ne,Me)|0,h=h+Math.imul(ne,Ee)|0,o=o+Math.imul(W,Ie)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(Y,Ie)|0,h=h+Math.imul(Y,ke)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(z,qe),r=Math.imul(z,Te),r=r+Math.imul(C,qe)|0,h=Math.imul(C,Te),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,$e)|0,r=r+Math.imul(Ae,Be)|0,h=h+Math.imul(Ae,$e)|0,o=o+Math.imul(ye,H)|0,r=r+Math.imul(ye,P)|0,r=r+Math.imul(xe,H)|0,h=h+Math.imul(xe,P)|0,o=o+Math.imul(ve,J)|0,r=r+Math.imul(ve,fe)|0,r=r+Math.imul(ge,J)|0,h=h+Math.imul(ge,fe)|0,o=o+Math.imul(me,se)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(he,se)|0,h=h+Math.imul(he,_e)|0,o=o+Math.imul(le,Me)|0,r=r+Math.imul(le,Ee)|0,r=r+Math.imul(de,Me)|0,h=h+Math.imul(de,Ee)|0,o=o+Math.imul(j,Ie)|0,r=r+Math.imul(j,ke)|0,r=r+Math.imul(ne,Ie)|0,h=h+Math.imul(ne,ke)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(z,Be),r=Math.imul(z,$e),r=r+Math.imul(C,Be)|0,h=Math.imul(C,$e),o=o+Math.imul(Se,H)|0,r=r+Math.imul(Se,P)|0,r=r+Math.imul(Ae,H)|0,h=h+Math.imul(Ae,P)|0,o=o+Math.imul(ye,J)|0,r=r+Math.imul(ye,fe)|0,r=r+Math.imul(xe,J)|0,h=h+Math.imul(xe,fe)|0,o=o+Math.imul(ve,se)|0,r=r+Math.imul(ve,_e)|0,r=r+Math.imul(ge,se)|0,h=h+Math.imul(ge,_e)|0,o=o+Math.imul(me,Me)|0,r=r+Math.imul(me,Ee)|0,r=r+Math.imul(he,Me)|0,h=h+Math.imul(he,Ee)|0,o=o+Math.imul(le,Ie)|0,r=r+Math.imul(le,ke)|0,r=r+Math.imul(de,Ie)|0,h=h+Math.imul(de,ke)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(z,H),r=Math.imul(z,P),r=r+Math.imul(C,H)|0,h=Math.imul(C,P),o=o+Math.imul(Se,J)|0,r=r+Math.imul(Se,fe)|0,r=r+Math.imul(Ae,J)|0,h=h+Math.imul(Ae,fe)|0,o=o+Math.imul(ye,se)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(xe,se)|0,h=h+Math.imul(xe,_e)|0,o=o+Math.imul(ve,Me)|0,r=r+Math.imul(ve,Ee)|0,r=r+Math.imul(ge,Me)|0,h=h+Math.imul(ge,Ee)|0,o=o+Math.imul(me,Ie)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(he,Ie)|0,h=h+Math.imul(he,ke)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(z,J),r=Math.imul(z,fe),r=r+Math.imul(C,J)|0,h=Math.imul(C,fe),o=o+Math.imul(Se,se)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ae,se)|0,h=h+Math.imul(Ae,_e)|0,o=o+Math.imul(ye,Me)|0,r=r+Math.imul(ye,Ee)|0,r=r+Math.imul(xe,Me)|0,h=h+Math.imul(xe,Ee)|0,o=o+Math.imul(ve,Ie)|0,r=r+Math.imul(ve,ke)|0,r=r+Math.imul(ge,Ie)|0,h=h+Math.imul(ge,ke)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(z,se),r=Math.imul(z,_e),r=r+Math.imul(C,se)|0,h=Math.imul(C,_e),o=o+Math.imul(Se,Me)|0,r=r+Math.imul(Se,Ee)|0,r=r+Math.imul(Ae,Me)|0,h=h+Math.imul(Ae,Ee)|0,o=o+Math.imul(ye,Ie)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(xe,Ie)|0,h=h+Math.imul(xe,ke)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(z,Me),r=Math.imul(z,Ee),r=r+Math.imul(C,Me)|0,h=Math.imul(C,Ee),o=o+Math.imul(Se,Ie)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ae,Ie)|0,h=h+Math.imul(Ae,ke)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(z,Ie),r=Math.imul(z,ke),r=r+Math.imul(C,Ie)|0,h=Math.imul(C,ke);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=We,u[1]=Ge,u[2]=Ve,u[3]=Ke,u[4]=Ze,u[5]=Ye,u[6]=Xe,u[7]=Je,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(B=q);function $(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,M=c.words[h]|0,T=e.words[r]|0,N=M*T,Q=N&67108863;u=u+(N/67108864|0)|0,Q=Q+l|0,l=Q&67108863,u=u+(Q>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function k(c,e,t){var n=new I;return n.mulp(c,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=B(this,e,t):f<63?n=q(this,e,t):f<1024?n=$(this,e,t):n=k(this,e,t),n};function I(c,e){this.x=c,this.y=e}I.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,f=0;f<e;f++)t[f]=this.revBin(f,n,e);return t},I.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var f=0,s=0;s<t;s++)f|=(e&1)<<t-s-1,e>>=1;return f},I.prototype.permute=function(e,t,n,f,s,u){for(var l=0;l<u;l++)f[l]=t[e[l]],s[l]=n[e[l]]},I.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),M=0;M<s;M+=o)for(var T=r,N=h,Q=0;Q<l;Q++){var K=n[M+Q],A=f[M+Q],O=n[M+Q+l],W=f[M+Q+l],Y=T*O-N*W;W=T*W+N*O,O=Y,n[M+Q]=K+O,f[M+Q]=A+W,n[M+Q+l]=K-O,f[M+Q+l]=A-W,Q!==o&&(Y=r*T-h*N,N=r*N+h*T,T=Y)}},I.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,f=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+f},I.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var f=0;f<n/2;f++){var s=e[f];e[f]=e[n-f-1],e[n-f-1]=s,s=t[f],t[f]=-t[n-f-1],t[n-f-1]=-s}},I.prototype.normalize13b=function(e,t){for(var n=0,f=0;f<t/2;f++){var s=Math.round(e[2*f+1]/t)*8192+Math.round(e[2*f]/t)+n;e[f]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},I.prototype.convert13b=function(e,t,n,f){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<f;++u)n[u]=0;p(s===0),p((s&-8192)===0)},I.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},I.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),l=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),M=new Array(f),T=new Array(f),N=n.words;N.length=f,this.convert13b(e.words,e.length,l,f),this.convert13b(t.words,t.length,h,f),this.transform(l,u,o,r,f,s),this.transform(h,u,M,T,f,s);for(var Q=0;Q<f;Q++){var K=o[Q]*M[Q]-r[Q]*T[Q];r[Q]=o[Q]*T[Q]+r[Q]*M[Q],o[Q]=K}return this.conjugate(o,r,f),this.transform(o,r,N,u,f,s),this.conjugate(N,u,f),this.normalize13b(N,f),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),k(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var f=(this.words[n]|0)*e,s=(f&67108863)+(t&67108863);t>>=26,t+=f/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=R(e);if(t.length===0)return new a(1);for(var n=this,f=0;f<t.length&&t[f]===0;f++,n=n.sqr());if(++f<t.length)for(var s=n.sqr();f<t.length;f++,s=s.sqr())t[f]!==0&&(n=n.mul(s));return n},a.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&f,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var f;t?f=(t-t%26)/26:f=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(f-=u,f=Math.max(0,f),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=f);r--){var M=this.words[r]|0;this.words[r]=h<<26-s|M>>>s,h=M&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&f)},a.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var f=67108863^67108863>>>t<<t;this.words[this.length-1]&=f}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var f=e.length+n,s;this._expand(f);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,f=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),f.iushln(n),u=s.words[s.length-1]|0);var o=f.length-s.length,r;if(t!=="mod"){r=new a(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var M=f.clone()._ishlnsubmul(s,1,o);M.negative===0&&(f=M,r&&(r.words[o]=1));for(var T=o-1;T>=0;T--){var N=(f.words[s.length+T]|0)*67108864+(f.words[s.length+T-1]|0);for(N=Math.min(N/u|0,67108863),f._ishlnsubmul(s,N,T);f.negative!==0;)N--,f.negative=0,f._ishlnsubmul(s,1,T),f.isZero()||(f.negative^=1);r&&(r.words[T]=N)}return r&&r.strip(),f.strip(),t!=="div"&&n!==0&&f.iushrn(n),{div:r||null,mod:f}},a.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var f,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(f=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:f,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(f=u.div.neg()),{div:f,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,f=e.ushrn(1),s=e.andln(1),u=n.cmp(f);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,f=this.length-1;f>=0;f--)n=(t*n+(this.words[f]|0))%e;return n},a.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var f=(this.words[n]|0)+t*67108864;this.words[n]=f/e|0,t=f%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=new a(0),l=new a(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var M=0,T=1;(t.words[0]&T)===0&&M<26;++M,T<<=1);if(M>0)for(t.iushrn(M);M-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var N=0,Q=1;(n.words[0]&Q)===0&&N<26;++N,Q<<=1);if(N>0)for(n.iushrn(N);N-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(l)):(n.isub(t),u.isub(f),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},a.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)f.isOdd()&&f.iadd(u),f.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(s)):(n.isub(t),s.isub(f))}var M;return t.cmpn(1)===0?M=f:M=s,M.cmpn(0)<0&&M.iadd(e),M},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var f=0;t.isEven()&&n.isEven();f++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(f)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=f,this;for(var s=f,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var f=this.words[0]|0;n=f===e?0:f<e?-1:1}return this.negative!==0?-n|0:n},a.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var f=this.words[n]|0,s=e.words[n]|0;if(f!==s){f<s?t=-1:f>s&&(t=1);break}}return t},a.prototype.gtn=function(e){return this.cmpn(e)===1},a.prototype.gt=function(e){return this.cmp(e)===1},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return this.cmpn(e)===0},a.prototype.eq=function(e){return this.cmp(e)===0},a.red=function(e){return new ee(e)},a.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var L={k256:null,p224:null,p192:null,p25519:null};function D(c,e){this.name=c,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},D.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var f=n<this.n?-1:t.ucmp(this.p);return f===0?(t.words[0]=0,t.length=1):f>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},D.prototype.split=function(e,t){e.iushrn(this.n,0,t)},D.prototype.imulK=function(e){return e.imul(this.k)};function G(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}E(G,D),G.prototype.split=function(e,t){for(var n=4194303,f=Math.min(e.length,9),s=0;s<f;s++)t.words[s]=e.words[s];if(t.length=f,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},G.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var f=e.words[n]|0;t+=f*977,e.words[n]=t&67108863,t=f*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function X(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}E(X,D);function te(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}E(te,D);function ie(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}E(ie,D),ie.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var f=(e.words[n]|0)*19+t,s=f&67108863;f>>>=26,e.words[n]=s,t=f}return t!==0&&(e.words[e.length++]=t),e},a._prime=function(e){if(L[e])return L[e];var t;if(e==="k256")t=new G;else if(e==="p224")t=new X;else if(e==="p192")t=new te;else if(e==="p25519")t=new ie;else throw new Error("Unknown prime "+e);return L[e]=t,t};function ee(c){if(typeof c=="string"){var e=a._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var f=this.m.subn(1),s=0;!f.isZero()&&f.andln(1)===0;)s++,f.iushrn(1);p(!f.isZero());var u=new a(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,f),M=this.pow(e,f.addn(1).iushrn(1)),T=this.pow(e,f),N=s;T.cmp(u)!==0;){for(var Q=T,K=0;Q.cmp(u)!==0;K++)Q=Q.redSqr();p(K<N);var A=this.pow(h,new a(1).iushln(N-K-1));M=M.redMul(A),h=A.redSqr(),T=T.redMul(h),N=K}return M},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,f=new Array(1<<n);f[0]=new a(1).toRed(this),f[1]=e;for(var s=2;s<f.length;s++)f[s]=this.mul(f[s-1],e);var u=f[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],M=r-1;M>=0;M--){var T=h>>M&1;if(u!==f[0]&&(u=this.sqr(u)),T===0&&l===0){o=0;continue}l<<=1,l|=T,o++,!(o!==n&&(s!==0||M!==0))&&(u=this.mul(u,f[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new ue(e)};function ue(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}E(ue,ee),ue.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},ue.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},ue.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(b,bn$a)})(bn$b)),bn$b.exports}var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var b;brorand.exports=function(E){return b||(b=new _(null)),b.generate(E)};function _(p){this.rand=p}if(brorand.exports.Rand=_,_.prototype.generate=function(E){return this._rand(E)},_.prototype._rand=function(E){if(this.rand.getBytes)return this.rand.getBytes(E);for(var a=new Uint8Array(E),w=0;w<a.length;w++)a[w]=this.rand.getByte();return a},typeof self=="object")self.crypto&&self.crypto.getRandomValues?_.prototype._rand=function(E){var a=new Uint8Array(E);return self.crypto.getRandomValues(a),a}:self.msCrypto&&self.msCrypto.getRandomValues?_.prototype._rand=function(E){var a=new Uint8Array(E);return self.msCrypto.getRandomValues(a),a}:typeof window=="object"&&(_.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var S=requireCryptoBrowserify();if(typeof S.randomBytes!="function")throw new Error("Not supported");_.prototype._rand=function(E){return S.randomBytes(E)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var b=requireBn$5(),_=requireBrorand();function S(p){this.rand=p||new _.Rand}return mr=S,S.create=function(E){return new S(E)},S.prototype._randbelow=function(E){var a=E.bitLength(),w=Math.ceil(a/8);do var v=new b(this.rand.generate(w));while(v.cmp(E)>=0);return v},S.prototype._randrange=function(E,a){var w=a.sub(E);return E.add(this._randbelow(w))},S.prototype.test=function(E,a,w){var v=E.bitLength(),y=b.mont(E),m=new b(1).toRed(y);a||(a=Math.max(1,v/48|0));for(var d=E.subn(1),g=0;!d.testn(g);g++);for(var x=E.shrn(g),R=d.toRed(y),q=!0;a>0;a--){var B=this._randrange(new b(2),d);w&&w(B);var $=B.toRed(y).redPow(x);if(!($.cmp(m)===0||$.cmp(R)===0)){for(var k=1;k<g;k++){if($=$.redSqr(),$.cmp(m)===0)return!1;if($.cmp(R)===0)break}if(k===g)return!1}}return q},S.prototype.getDivisor=function(E,a){var w=E.bitLength(),v=b.mont(E),y=new b(1).toRed(v);a||(a=Math.max(1,w/48|0));for(var m=E.subn(1),d=0;!m.testn(d);d++);for(var g=E.shrn(d),x=m.toRed(v);a>0;a--){var R=this._randrange(new b(2),m),q=E.gcd(R);if(q.cmpn(1)!==0)return q;var B=R.toRed(v).redPow(g);if(!(B.cmp(y)===0||B.cmp(x)===0)){for(var $=1;$<d;$++){if(B=B.redSqr(),B.cmp(y)===0)return B.fromRed().subn(1).gcd(E);if(B.cmp(x)===0)break}if($===d)return B=B.redSqr(),B.fromRed().subn(1).gcd(E)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var b=requireBrowser$c();generatePrime=$,$.simpleSieve=q,$.fermatTest=B;var _=requireBn$6(),S=new _(24),p=requireMr(),E=new p,a=new _(1),w=new _(2),v=new _(5);new _(16),new _(8);var y=new _(10),m=new _(3);new _(7);var d=new _(11),g=new _(4);new _(12);var x=null;function R(){if(x!==null)return x;var k=1048576,I=[];I[0]=2;for(var L=1,D=3;D<k;D+=2){for(var G=Math.ceil(Math.sqrt(D)),X=0;X<L&&I[X]<=G&&D%I[X]!==0;X++);L!==X&&I[X]<=G||(I[L++]=D)}return x=I,I}function q(k){for(var I=R(),L=0;L<I.length;L++)if(k.modn(I[L])===0)return k.cmpn(I[L])===0;return!0}function B(k){var I=_.mont(k);return w.toRed(I).redPow(k.subn(1)).fromRed().cmpn(1)===0}function $(k,I){if(k<16)return I===2||I===5?new _([140,123]):new _([140,39]);I=new _(I);for(var L,D;;){for(L=new _(b(Math.ceil(k/8)));L.bitLength()>k;)L.ishrn(1);if(L.isEven()&&L.iadd(a),L.testn(1)||L.iadd(w),I.cmp(w)){if(!I.cmp(v))for(;L.mod(y).cmp(m);)L.iadd(g)}else for(;L.mod(S).cmp(d);)L.iadd(g);if(D=L.shrn(1),q(D)&&q(L)&&B(D)&&B(L)&&E.test(D)&&E.test(L))return L}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},require$$1$3={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18};var dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var b=requireBn$6(),_=requireMr(),S=new _,p=new b(24),E=new b(11),a=new b(10),w=new b(3),v=new b(7),y=requireGeneratePrime(),m=requireBrowser$c();dh=q;function d($,k){return k=k||"utf8",Buffer.isBuffer($)||($=new Buffer($,k)),this._pub=new b($),this}function g($,k){return k=k||"utf8",Buffer.isBuffer($)||($=new Buffer($,k)),this._priv=new b($),this}var x={};function R($,k){var I=k.toString("hex"),L=[I,$.toString(16)].join("_");if(L in x)return x[L];var D=0;if($.isEven()||!y.simpleSieve||!y.fermatTest($)||!S.test($))return D+=1,I==="02"||I==="05"?D+=8:D+=4,x[L]=D,D;S.test($.shrn(1))||(D+=2);var G;switch(I){case"02":$.mod(p).cmp(E)&&(D+=8);break;case"05":G=$.mod(a),G.cmp(w)&&G.cmp(v)&&(D+=8);break;default:D+=4}return x[L]=D,D}function q($,k,I){this.setGenerator(k),this.__prime=new b($),this._prime=b.mont(this.__prime),this._primeLen=$.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,I?(this.setPublicKey=d,this.setPrivateKey=g):this._primeCode=8}Object.defineProperty(q.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=R(this.__prime,this.__gen)),this._primeCode}}),q.prototype.generateKeys=function(){return this._priv||(this._priv=new b(m(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},q.prototype.computeSecret=function($){$=new b($),$=$.toRed(this._prime);var k=$.redPow(this._priv).fromRed(),I=new Buffer(k.toArray()),L=this.getPrime();if(I.length<L.length){var D=new Buffer(L.length-I.length);D.fill(0),I=Buffer.concat([D,I])}return I},q.prototype.getPublicKey=function(k){return B(this._pub,k)},q.prototype.getPrivateKey=function(k){return B(this._priv,k)},q.prototype.getPrime=function($){return B(this.__prime,$)},q.prototype.getGenerator=function($){return B(this._gen,$)},q.prototype.setGenerator=function($,k){return k=k||"utf8",Buffer.isBuffer($)||($=new Buffer($,k)),this.__gen=$,this._gen=new b($),this};function B($,k){var I=new Buffer($.toArray());return k?I.toString(k):I}return dh}var hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$5;hasRequiredBrowser$5=1;var b=requireGeneratePrime(),_=require$$1$3,S=requireDh();function p(w){var v=new Buffer(_[w].prime,"hex"),y=new Buffer(_[w].gen,"hex");return new S(v,y)}var E={binary:!0,hex:!0,base64:!0};function a(w,v,y,m){return Buffer.isBuffer(v)||E[v]===void 0?a(w,"binary",v,y):(v=v||"binary",m=m||"binary",y=y||new Buffer([2]),Buffer.isBuffer(y)||(y=new Buffer(y,m)),typeof w=="number"?new S(b(w,y),y,!0):(Buffer.isBuffer(w)||(w=new Buffer(w,v)),new S(w,y,!0)))}return browser$5.DiffieHellmanGroup=browser$5.createDiffieHellmanGroup=browser$5.getDiffieHellman=p,browser$5.createDiffieHellman=browser$5.DiffieHellman=a,browser$5}var readableBrowser$1={exports:{}},isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var b={}.toString;return isarray=Array.isArray||function(_){return b.call(_)=="[object Array]"},isarray}var streamBrowser,hasRequiredStreamBrowser;function requireStreamBrowser(){return hasRequiredStreamBrowser||(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter),streamBrowser}var safeBuffer={exports:{}},hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,(function(b,_){var S=requireDist(),p=S.Buffer;function E(w,v){for(var y in w)v[y]=w[y]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?b.exports=S:(E(S,_),_.Buffer=a);function a(w,v,y){return p(w,v,y)}E(p,a),a.from=function(w,v,y){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,v,y)},a.alloc=function(w,v,y){if(typeof w!="number")throw new TypeError("Argument must be a number");var m=p(w);return v!==void 0?typeof y=="string"?m.fill(v,y):m.fill(v):m.fill(0),m},a.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},a.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return S.SlowBuffer(w)}})(safeBuffer,safeBuffer.exports)),safeBuffer.exports}var inherits_browser$2={exports:{}},hasRequiredInherits_browser$2;function requireInherits_browser$2(){return hasRequiredInherits_browser$2||(hasRequiredInherits_browser$2=1,typeof Object.create=="function"?inherits_browser$2.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$2.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser$2.exports}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,(function(b){function _(a,w){if(!(a instanceof w))throw new TypeError("Cannot call a class as a function")}var S=requireSafeBuffer().Buffer,p=requireUtil$1();function E(a,w,v){a.copy(w,v)}b.exports=(function(){function a(){_(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length},a.prototype.unshift=function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length},a.prototype.shift=function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(v){if(this.length===0)return"";for(var y=this.head,m=""+y.data;y=y.next;)m+=v+y.data;return m},a.prototype.concat=function(v){if(this.length===0)return S.alloc(0);for(var y=S.allocUnsafe(v>>>0),m=this.head,d=0;m;)E(m.data,y,d),d+=m.data.length,m=m.next;return y},a})(),p&&p.inspect&&p.inspect.custom&&(b.exports.prototype[p.inspect.custom]=function(){var a=p.inspect({length:this.length});return this.constructor.name+" "+a})})(BufferList)),BufferList.exports}var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var b=requireProcessNextickArgs();function _(E,a){var w=this,v=this._readableState&&this._readableState.destroyed,y=this._writableState&&this._writableState.destroyed;return v||y?(a?a(E):E&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,b.nextTick(p,this,E)):b.nextTick(p,this,E)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(E||null,function(m){!a&&m?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,b.nextTick(p,w,m)):b.nextTick(p,w,m):a&&a(m)}),this)}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(E,a){E.emit("error",a)}return destroy_1={destroy:_,undestroy:S},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var b=requireProcessNextickArgs();_stream_writable=B;function _(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var S=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:b.nextTick,p;B.WritableState=R;var E=Object.create(requireUtil());E.inherits=requireInherits_browser$2();var a={deprecate:requireBrowser$b()},w=requireStreamBrowser(),v=requireSafeBuffer().Buffer,y=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(u){return v.from(u)}function d(u){return v.isBuffer(u)||u instanceof y}var g=requireDestroy();E.inherits(B,w);function x(){}function R(u,l){p=p||require_stream_duplex(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,M=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=M,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var T=u.decodeStrings===!1;this.decodeStrings=!T,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(N){te(l,N)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}R.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(R.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var q;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(q=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(u){return q.call(this,u)?!0:this!==B?!1:u&&u._writableState instanceof R}})):q=function(u){return u instanceof this};function B(u){if(p=p||require_stream_duplex(),!q.call(B,this)&&!(this instanceof p))return new B(u);this._writableState=new R(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}B.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function $(u,l){var o=new Error("write after end");u.emit("error",o),b.nextTick(l,o)}function k(u,l,o,r){var h=!0,M=!1;return o===null?M=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(M=new TypeError("Invalid non-string/buffer chunk")),M&&(u.emit("error",M),b.nextTick(r,M),h=!1),h}B.prototype.write=function(u,l,o){var r=this._writableState,h=!1,M=!r.objectMode&&d(u);return M&&!v.isBuffer(u)&&(u=m(u)),typeof l=="function"&&(o=l,l=null),M?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=x),r.ended?$(this,o):(M||k(this,r,u,o))&&(r.pendingcb++,h=L(this,r,M,u,l,o)),h},B.prototype.cork=function(){var u=this._writableState;u.corked++},B.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&ue(this,u))},B.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function I(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=v.from(l,o)),l}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(u,l,o,r,h,M){if(!o){var T=I(l,r,h);r!==T&&(o=!0,h="buffer",r=T)}var N=l.objectMode?1:r.length;l.length+=N;var Q=l.length<l.highWaterMark;if(Q||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:M,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else D(u,l,!1,N,r,h,M);return Q}function D(u,l,o,r,h,M,T){l.writelen=r,l.writecb=T,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,M,l.onwrite),l.sync=!1}function G(u,l,o,r,h){--l.pendingcb,o?(b.nextTick(h,r),b.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function X(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function te(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(X(o),l)G(u,o,r,l,h);else{var M=c(o);!M&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&ue(u,o),r?S(ie,u,o,M,h):ie(u,o,M,h)}}function ie(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function ue(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),M=l.corkedRequestsFree;M.entry=o;for(var T=0,N=!0;o;)h[T]=o,o.isBuf||(N=!1),o=o.next,T+=1;h.allBuffers=N,D(u,l,!0,l.length,h,"",M.finish),l.pendingcb++,l.lastBufferedRequest=null,M.next?(l.corkedRequestsFree=M.next,M.next=null):l.corkedRequestsFree=new _(l),l.bufferedRequestCount=0}else{for(;o;){var Q=o.chunk,K=o.encoding,A=o.callback,O=l.objectMode?1:Q.length;if(D(u,l,!1,O,Q,K,A),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}B.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},B.prototype._writev=null,B.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||f(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,b.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function f(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?b.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(B.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),B.prototype.destroy=g.destroy,B.prototype._undestroy=g.undestroy,B.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable}var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var b=requireProcessNextickArgs(),_=Object.keys||function(g){var x=[];for(var R in g)x.push(R);return x};_stream_duplex=y;var S=Object.create(requireUtil());S.inherits=requireInherits_browser$2();var p=require_stream_readable(),E=require_stream_writable();S.inherits(y,p);for(var a=_(E.prototype),w=0;w<a.length;w++){var v=a[w];y.prototype[v]||(y.prototype[v]=E.prototype[v])}function y(g){if(!(this instanceof y))return new y(g);p.call(this,g),E.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",m)}Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m(){this.allowHalfOpen||this._writableState.ended||b.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(y.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),y.prototype._destroy=function(g,x){this.push(null),this.end(),b.nextTick(x,g)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var b=requireProcessNextickArgs();_stream_readable=I;var _=requireIsarray(),S;I.ReadableState=k,requireEvents().EventEmitter;var p=function(A,O){return A.listeners(O).length},E=requireStreamBrowser(),a=requireSafeBuffer().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function v(A){return a.from(A)}function y(A){return a.isBuffer(A)||A instanceof w}var m=Object.create(requireUtil());m.inherits=requireInherits_browser$2();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var x=requireBufferList(),R=requireDestroy(),q;m.inherits(I,E);var B=["error","close","destroy","pause","resume"];function $(A,O,W){if(typeof A.prependListener=="function")return A.prependListener(O,W);!A._events||!A._events[O]?A.on(O,W):_(A._events[O])?A._events[O].unshift(W):A._events[O]=[W,A._events[O]]}function k(A,O){S=S||require_stream_duplex(),A=A||{};var W=O instanceof S;this.objectMode=!!A.objectMode,W&&(this.objectMode=this.objectMode||!!A.readableObjectMode);var Y=A.highWaterMark,Z=A.readableHighWaterMark,j=this.objectMode?16:16*1024;Y||Y===0?this.highWaterMark=Y:W&&(Z||Z===0)?this.highWaterMark=Z:this.highWaterMark=j,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(q||(q=requireString_decoder().StringDecoder),this.decoder=new q(A.encoding),this.encoding=A.encoding)}function I(A){if(S=S||require_stream_duplex(),!(this instanceof I))return new I(A);this._readableState=new k(A,this),this.readable=!0,A&&(typeof A.read=="function"&&(this._read=A.read),typeof A.destroy=="function"&&(this._destroy=A.destroy)),E.call(this)}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(A){this._readableState&&(this._readableState.destroyed=A)}}),I.prototype.destroy=R.destroy,I.prototype._undestroy=R.undestroy,I.prototype._destroy=function(A,O){this.push(null),O(A)},I.prototype.push=function(A,O){var W=this._readableState,Y;return W.objectMode?Y=!0:typeof A=="string"&&(O=O||W.defaultEncoding,O!==W.encoding&&(A=a.from(A,O),O=""),Y=!0),L(this,A,O,!1,Y)},I.prototype.unshift=function(A){return L(this,A,null,!0,!1)};function L(A,O,W,Y,Z){var j=A._readableState;if(O===null)j.reading=!1,ue(A,j);else{var ne;Z||(ne=G(j,O)),ne?A.emit("error",ne):j.objectMode||O&&O.length>0?(typeof O!="string"&&!j.objectMode&&Object.getPrototypeOf(O)!==a.prototype&&(O=v(O)),Y?j.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):D(A,j,O,!0):j.ended?A.emit("error",new Error("stream.push() after EOF")):(j.reading=!1,j.decoder&&!W?(O=j.decoder.write(O),j.objectMode||O.length!==0?D(A,j,O,!1):t(A,j)):D(A,j,O,!1))):Y||(j.reading=!1)}return X(j)}function D(A,O,W,Y){O.flowing&&O.length===0&&!O.sync?(A.emit("data",W),A.read(0)):(O.length+=O.objectMode?1:W.length,Y?O.buffer.unshift(W):O.buffer.push(W),O.needReadable&&c(A)),t(A,O)}function G(A,O){var W;return!y(O)&&typeof O!="string"&&O!==void 0&&!A.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function X(A){return!A.ended&&(A.needReadable||A.length<A.highWaterMark||A.length===0)}I.prototype.isPaused=function(){return this._readableState.flowing===!1},I.prototype.setEncoding=function(A){return q||(q=requireString_decoder().StringDecoder),this._readableState.decoder=new q(A),this._readableState.encoding=A,this};var te=8388608;function ie(A){return A>=te?A=te:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}function ee(A,O){return A<=0||O.length===0&&O.ended?0:O.objectMode?1:A!==A?O.flowing&&O.length?O.buffer.head.data.length:O.length:(A>O.highWaterMark&&(O.highWaterMark=ie(A)),A<=O.length?A:O.ended?O.length:(O.needReadable=!0,0))}I.prototype.read=function(A){g("read",A),A=parseInt(A,10);var O=this._readableState,W=A;if(A!==0&&(O.emittedReadable=!1),A===0&&O.needReadable&&(O.length>=O.highWaterMark||O.ended))return g("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?N(this):c(this),null;if(A=ee(A,O),A===0&&O.ended)return O.length===0&&N(this),null;var Y=O.needReadable;g("need readable",Y),(O.length===0||O.length-A<O.highWaterMark)&&(Y=!0,g("length less than watermark",Y)),O.ended||O.reading?(Y=!1,g("reading or ended",Y)):Y&&(g("do read"),O.reading=!0,O.sync=!0,O.length===0&&(O.needReadable=!0),this._read(O.highWaterMark),O.sync=!1,O.reading||(A=ee(W,O)));var Z;return A>0?Z=r(A,O):Z=null,Z===null?(O.needReadable=!0,A=0):O.length-=A,O.length===0&&(O.ended||(O.needReadable=!0),W!==A&&O.ended&&N(this)),Z!==null&&this.emit("data",Z),Z};function ue(A,O){if(!O.ended){if(O.decoder){var W=O.decoder.end();W&&W.length&&(O.buffer.push(W),O.length+=O.objectMode?1:W.length)}O.ended=!0,c(A)}}function c(A){var O=A._readableState;O.needReadable=!1,O.emittedReadable||(g("emitReadable",O.flowing),O.emittedReadable=!0,O.sync?b.nextTick(e,A):e(A))}function e(A){g("emit readable"),A.emit("readable"),o(A)}function t(A,O){O.readingMore||(O.readingMore=!0,b.nextTick(n,A,O))}function n(A,O){for(var W=O.length;!O.reading&&!O.flowing&&!O.ended&&O.length<O.highWaterMark&&(g("maybeReadMore read 0"),A.read(0),W!==O.length);)W=O.length;O.readingMore=!1}I.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},I.prototype.pipe=function(A,O){var W=this,Y=this._readableState;switch(Y.pipesCount){case 0:Y.pipes=A;break;case 1:Y.pipes=[Y.pipes,A];break;default:Y.pipes.push(A);break}Y.pipesCount+=1,g("pipe count=%d opts=%j",Y.pipesCount,O);var Z=(!O||O.end!==!1)&&A!==process$1.stdout&&A!==process$1.stderr,j=Z?Re:De;Y.endEmitted?b.nextTick(j):W.once("end",j),A.on("unpipe",ne);function ne(ye,xe){g("onunpipe"),ye===W&&xe&&xe.hasUnpiped===!1&&(xe.hasUnpiped=!0,Pe())}function Re(){g("onend"),A.end()}var le=f(W);A.on("drain",le);var de=!1;function Pe(){g("cleanup"),A.removeListener("close",ve),A.removeListener("finish",ge),A.removeListener("drain",le),A.removeListener("error",Le),A.removeListener("unpipe",ne),W.removeListener("end",Re),W.removeListener("end",De),W.removeListener("data",he),de=!0,Y.awaitDrain&&(!A._writableState||A._writableState.needDrain)&&le()}var me=!1;W.on("data",he);function he(ye){g("ondata"),me=!1;var xe=A.write(ye);xe===!1&&!me&&((Y.pipesCount===1&&Y.pipes===A||Y.pipesCount>1&&K(Y.pipes,A)!==-1)&&!de&&(g("false write response, pause",Y.awaitDrain),Y.awaitDrain++,me=!0),W.pause())}function Le(ye){g("onerror",ye),De(),A.removeListener("error",Le),p(A,"error")===0&&A.emit("error",ye)}$(A,"error",Le);function ve(){A.removeListener("finish",ge),De()}A.once("close",ve);function ge(){g("onfinish"),A.removeListener("close",ve),De()}A.once("finish",ge);function De(){g("unpipe"),W.unpipe(A)}return A.emit("pipe",W),Y.flowing||(g("pipe resume"),W.resume()),A};function f(A){return function(){var O=A._readableState;g("pipeOnDrain",O.awaitDrain),O.awaitDrain&&O.awaitDrain--,O.awaitDrain===0&&p(A,"data")&&(O.flowing=!0,o(A))}}I.prototype.unpipe=function(A){var O=this._readableState,W={hasUnpiped:!1};if(O.pipesCount===0)return this;if(O.pipesCount===1)return A&&A!==O.pipes?this:(A||(A=O.pipes),O.pipes=null,O.pipesCount=0,O.flowing=!1,A&&A.emit("unpipe",this,W),this);if(!A){var Y=O.pipes,Z=O.pipesCount;O.pipes=null,O.pipesCount=0,O.flowing=!1;for(var j=0;j<Z;j++)Y[j].emit("unpipe",this,{hasUnpiped:!1});return this}var ne=K(O.pipes,A);return ne===-1?this:(O.pipes.splice(ne,1),O.pipesCount-=1,O.pipesCount===1&&(O.pipes=O.pipes[0]),A.emit("unpipe",this,W),this)},I.prototype.on=function(A,O){var W=E.prototype.on.call(this,A,O);if(A==="data")this._readableState.flowing!==!1&&this.resume();else if(A==="readable"){var Y=this._readableState;!Y.endEmitted&&!Y.readableListening&&(Y.readableListening=Y.needReadable=!0,Y.emittedReadable=!1,Y.reading?Y.length&&c(this):b.nextTick(s,this))}return W},I.prototype.addListener=I.prototype.on;function s(A){g("readable nexttick read 0"),A.read(0)}I.prototype.resume=function(){var A=this._readableState;return A.flowing||(g("resume"),A.flowing=!0,u(this,A)),this};function u(A,O){O.resumeScheduled||(O.resumeScheduled=!0,b.nextTick(l,A,O))}function l(A,O){O.reading||(g("resume read 0"),A.read(0)),O.resumeScheduled=!1,O.awaitDrain=0,A.emit("resume"),o(A),O.flowing&&!O.reading&&A.read(0)}I.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(A){var O=A._readableState;for(g("flow",O.flowing);O.flowing&&A.read()!==null;);}I.prototype.wrap=function(A){var O=this,W=this._readableState,Y=!1;A.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var ne=W.decoder.end();ne&&ne.length&&O.push(ne)}O.push(null)}),A.on("data",function(ne){if(g("wrapped data"),W.decoder&&(ne=W.decoder.write(ne)),!(W.objectMode&&ne==null)&&!(!W.objectMode&&(!ne||!ne.length))){var Re=O.push(ne);Re||(Y=!0,A.pause())}});for(var Z in A)this[Z]===void 0&&typeof A[Z]=="function"&&(this[Z]=(function(ne){return function(){return A[ne].apply(A,arguments)}})(Z));for(var j=0;j<B.length;j++)A.on(B[j],this.emit.bind(this,B[j]));return this._read=function(ne){g("wrapped _read",ne),Y&&(Y=!1,A.resume())},this},Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),I._fromList=r;function r(A,O){if(O.length===0)return null;var W;return O.objectMode?W=O.buffer.shift():!A||A>=O.length?(O.decoder?W=O.buffer.join(""):O.buffer.length===1?W=O.buffer.head.data:W=O.buffer.concat(O.length),O.buffer.clear()):W=h(A,O.buffer,O.decoder),W}function h(A,O,W){var Y;return A<O.head.data.length?(Y=O.head.data.slice(0,A),O.head.data=O.head.data.slice(A)):A===O.head.data.length?Y=O.shift():Y=W?M(A,O):T(A,O),Y}function M(A,O){var W=O.head,Y=1,Z=W.data;for(A-=Z.length;W=W.next;){var j=W.data,ne=A>j.length?j.length:A;if(ne===j.length?Z+=j:Z+=j.slice(0,A),A-=ne,A===0){ne===j.length?(++Y,W.next?O.head=W.next:O.head=O.tail=null):(O.head=W,W.data=j.slice(ne));break}++Y}return O.length-=Y,Z}function T(A,O){var W=a.allocUnsafe(A),Y=O.head,Z=1;for(Y.data.copy(W),A-=Y.data.length;Y=Y.next;){var j=Y.data,ne=A>j.length?j.length:A;if(j.copy(W,W.length-A,0,ne),A-=ne,A===0){ne===j.length?(++Z,Y.next?O.head=Y.next:O.head=O.tail=null):(O.head=Y,Y.data=j.slice(ne));break}++Z}return O.length-=Z,W}function N(A){var O=A._readableState;if(O.length>0)throw new Error('"endReadable()" called on non-empty stream');O.endEmitted||(O.ended=!0,b.nextTick(Q,O,A))}function Q(A,O){!A.endEmitted&&A.length===0&&(A.endEmitted=!0,O.readable=!1,O.emit("end"))}function K(A,O){for(var W=0,Y=A.length;W<Y;W++)if(A[W]===O)return W;return-1}return _stream_readable}var _stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=p;var b=require_stream_duplex(),_=Object.create(requireUtil());_.inherits=requireInherits_browser$2(),_.inherits(p,b);function S(w,v){var y=this._transformState;y.transforming=!1;var m=y.writecb;if(!m)return this.emit("error",new Error("write callback called multiple times"));y.writechunk=null,y.writecb=null,v!=null&&this.push(v),m(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);b.call(this,w),this._transformState={afterTransform:S.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",E)}function E(){var w=this;typeof this._flush=="function"?this._flush(function(v,y){a(w,v,y)}):a(this,null,null)}p.prototype.push=function(w,v){return this._transformState.needTransform=!1,b.prototype.push.call(this,w,v)},p.prototype._transform=function(w,v,y){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,v,y){var m=this._transformState;if(m.writecb=y,m.writechunk=w,m.writeencoding=v,!m.transforming){var d=this._readableState;(m.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var v=this._transformState;v.writechunk!==null&&v.writecb&&!v.transforming?(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform)):v.needTransform=!0},p.prototype._destroy=function(w,v){var y=this;b.prototype._destroy.call(this,w,function(m){v(m),y.emit("close")})};function a(w,v,y){if(v)return w.emit("error",v);if(y!=null&&w.push(y),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform}var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=S;var b=require_stream_transform(),_=Object.create(requireUtil());_.inherits=requireInherits_browser$2(),_.inherits(S,b);function S(p){if(!(this instanceof S))return new S(p);b.call(this,p)}return S.prototype._transform=function(p,E,a){a(null,p)},_stream_passthrough}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,(function(b,_){_=b.exports=require_stream_readable(),_.Stream=_,_.Readable=_,_.Writable=require_stream_writable(),_.Duplex=require_stream_duplex(),_.Transform=require_stream_transform(),_.PassThrough=require_stream_passthrough()})(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var sign={exports:{}},bn$9={exports:{}},bn$8=bn$9.exports,hasRequiredBn$4;function requireBn$4(){return hasRequiredBn$4||(hasRequiredBn$4=1,(function(b){(function(_,S){function p(t,n){if(!t)throw new Error(n||"Assertion failed")}function E(t,n){t.super_=n;var f=function(){};f.prototype=n.prototype,t.prototype=new f,t.prototype.constructor=t}function a(t,n,f){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,t!==null&&((n==="le"||n==="be")&&(f=n,n=10),this._init(t||0,n||10,f||"be"))}typeof _=="object"?_.exports=a:S.BN=a,a.BN=a,a.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}a.isBN=function(n){return n instanceof a?!0:n!==null&&typeof n=="object"&&n.constructor.wordSize===a.wordSize&&Array.isArray(n.words)},a.max=function(n,f){return n.cmp(f)>0?n:f},a.min=function(n,f){return n.cmp(f)<0?n:f},a.prototype._init=function(n,f,s){if(typeof n=="number")return this._initNumber(n,f,s);if(typeof n=="object")return this._initArray(n,f,s);f==="hex"&&(f=16),p(f===(f|0)&&f>=2&&f<=36),n=n.toString().replace(/\s+/g,"");var u=0;n[0]==="-"&&(u++,this.negative=1),u<n.length&&(f===16?this._parseHex(n,u,s):(this._parseBase(n,f,u),s==="le"&&this._initArray(this.toArray(),f,s)))},a.prototype._initNumber=function(n,f,s){n<0&&(this.negative=1,n=-n),n<67108864?(this.words=[n&67108863],this.length=1):n<4503599627370496?(this.words=[n&67108863,n/67108864&67108863],this.length=2):(p(n<9007199254740992),this.words=[n&67108863,n/67108864&67108863,1],this.length=3),s==="le"&&this._initArray(this.toArray(),f,s)},a.prototype._initArray=function(n,f,s){if(p(typeof n.length=="number"),n.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(n.length/3),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l,o,r=0;if(s==="be")for(u=n.length-1,l=0;u>=0;u-=3)o=n[u]|n[u-1]<<8|n[u-2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);else if(s==="le")for(u=0,l=0;u<n.length;u+=3)o=n[u]|n[u+1]<<8|n[u+2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);return this._strip()};function v(t,n){var f=t.charCodeAt(n);if(f>=48&&f<=57)return f-48;if(f>=65&&f<=70)return f-55;if(f>=97&&f<=102)return f-87;p(!1,"Invalid character in "+t)}function y(t,n,f){var s=v(t,f);return f-1>=n&&(s|=v(t,f-1)<<4),s}a.prototype._parseHex=function(n,f,s){this.length=Math.ceil((n.length-f)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,o=0,r;if(s==="be")for(u=n.length-1;u>=f;u-=2)r=y(n,f,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8;else{var h=n.length-f;for(u=h%2===0?f+1:f;u<n.length;u+=2)r=y(n,f,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8}this._strip()};function m(t,n,f,s){for(var u=0,l=0,o=Math.min(t.length,f),r=n;r<o;r++){var h=t.charCodeAt(r)-48;u*=s,h>=49?l=h-49+10:h>=17?l=h-17+10:l=h,p(h>=0&&l<s,"Invalid character"),u+=l}return u}a.prototype._parseBase=function(n,f,s){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=f)u++;u--,l=l/f|0;for(var o=n.length-s,r=o%u,h=Math.min(o,o-r)+s,M=0,T=s;T<h;T+=u)M=m(n,T,T+u,f),this.imuln(l),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M);if(r!==0){var N=1;for(M=m(n,T,n.length,f),T=0;T<r;T++)N*=f;this.imuln(N),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M)}this._strip()},a.prototype.copy=function(n){n.words=new Array(this.length);for(var f=0;f<this.length;f++)n.words[f]=this.words[f];n.length=this.length,n.negative=this.negative,n.red=this.red};function d(t,n){t.words=n.words,t.length=n.length,t.negative=n.negative,t.red=n.red}if(a.prototype._move=function(n){d(n,this)},a.prototype.clone=function(){var n=new a(null);return this.copy(n),n},a.prototype._expand=function(n){for(;this.length<n;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{a.prototype.inspect=g}else a.prototype.inspect=g;function g(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var x=["","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"],R=[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],q=[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];a.prototype.toString=function(n,f){n=n||10,f=f|0||1;var s;if(n===16||n==="hex"){s="";for(var u=0,l=0,o=0;o<this.length;o++){var r=this.words[o],h=((r<<u|l)&16777215).toString(16);l=r>>>24-u&16777215,u+=2,u>=26&&(u-=26,o--),l!==0||o!==this.length-1?s=x[6-h.length]+h+s:s=h+s}for(l!==0&&(s=l.toString(16)+s);s.length%f!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}if(n===(n|0)&&n>=2&&n<=36){var M=R[n],T=q[n];s="";var N=this.clone();for(N.negative=0;!N.isZero();){var Q=N.modrn(T).toString(n);N=N.idivn(T),N.isZero()?s=Q+s:s=x[M-Q.length]+Q+s}for(this.isZero()&&(s="0"+s);s.length%f!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var n=this.words[0];return this.length===2?n+=this.words[1]*67108864:this.length===3&&this.words[2]===1?n+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-n:n},a.prototype.toJSON=function(){return this.toString(16,2)},w&&(a.prototype.toBuffer=function(n,f){return this.toArrayLike(w,n,f)}),a.prototype.toArray=function(n,f){return this.toArrayLike(Array,n,f)};var B=function(n,f){return n.allocUnsafe?n.allocUnsafe(f):new n(f)};a.prototype.toArrayLike=function(n,f,s){this._strip();var u=this.byteLength(),l=s||Math.max(1,u);p(u<=l,"byte array longer than desired length"),p(l>0,"Requested array length <= 0");var o=B(n,l),r=f==="le"?"LE":"BE";return this["_toArrayLike"+r](o,u),o},a.prototype._toArrayLikeLE=function(n,f){for(var s=0,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s++]=r&255,s<n.length&&(n[s++]=r>>8&255),s<n.length&&(n[s++]=r>>16&255),o===6?(s<n.length&&(n[s++]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s<n.length)for(n[s++]=u;s<n.length;)n[s++]=0},a.prototype._toArrayLikeBE=function(n,f){for(var s=n.length-1,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s--]=r&255,s>=0&&(n[s--]=r>>8&255),s>=0&&(n[s--]=r>>16&255),o===6?(s>=0&&(n[s--]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s>=0)for(n[s--]=u;s>=0;)n[s--]=0},Math.clz32?a.prototype._countBits=function(n){return 32-Math.clz32(n)}:a.prototype._countBits=function(n){var f=n,s=0;return f>=4096&&(s+=13,f>>>=13),f>=64&&(s+=7,f>>>=7),f>=8&&(s+=4,f>>>=4),f>=2&&(s+=2,f>>>=2),s+f},a.prototype._zeroBits=function(n){if(n===0)return 26;var f=n,s=0;return(f&8191)===0&&(s+=13,f>>>=13),(f&127)===0&&(s+=7,f>>>=7),(f&15)===0&&(s+=4,f>>>=4),(f&3)===0&&(s+=2,f>>>=2),(f&1)===0&&s++,s},a.prototype.bitLength=function(){var n=this.words[this.length-1],f=this._countBits(n);return(this.length-1)*26+f};function $(t){for(var n=new Array(t.bitLength()),f=0;f<n.length;f++){var s=f/26|0,u=f%26;n[f]=t.words[s]>>>u&1}return n}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,f=0;f<this.length;f++){var s=this._zeroBits(this.words[f]);if(n+=s,s!==26)break}return n},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(n){return this.negative!==0?this.abs().inotn(n).iaddn(1):this.clone()},a.prototype.fromTwos=function(n){return this.testn(n-1)?this.notn(n).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(n){for(;this.length<n.length;)this.words[this.length++]=0;for(var f=0;f<n.length;f++)this.words[f]=this.words[f]|n.words[f];return this._strip()},a.prototype.ior=function(n){return p((this.negative|n.negative)===0),this.iuor(n)},a.prototype.or=function(n){return this.length>n.length?this.clone().ior(n):n.clone().ior(this)},a.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},a.prototype.iuand=function(n){var f;this.length>n.length?f=n:f=this;for(var s=0;s<f.length;s++)this.words[s]=this.words[s]&n.words[s];return this.length=f.length,this._strip()},a.prototype.iand=function(n){return p((this.negative|n.negative)===0),this.iuand(n)},a.prototype.and=function(n){return this.length>n.length?this.clone().iand(n):n.clone().iand(this)},a.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},a.prototype.iuxor=function(n){var f,s;this.length>n.length?(f=this,s=n):(f=n,s=this);for(var u=0;u<s.length;u++)this.words[u]=f.words[u]^s.words[u];if(this!==f)for(;u<f.length;u++)this.words[u]=f.words[u];return this.length=f.length,this._strip()},a.prototype.ixor=function(n){return p((this.negative|n.negative)===0),this.iuxor(n)},a.prototype.xor=function(n){return this.length>n.length?this.clone().ixor(n):n.clone().ixor(this)},a.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},a.prototype.inotn=function(n){p(typeof n=="number"&&n>=0);var f=Math.ceil(n/26)|0,s=n%26;this._expand(f),s>0&&f--;for(var u=0;u<f;u++)this.words[u]=~this.words[u]&67108863;return s>0&&(this.words[u]=~this.words[u]&67108863>>26-s),this._strip()},a.prototype.notn=function(n){return this.clone().inotn(n)},a.prototype.setn=function(n,f){p(typeof n=="number"&&n>=0);var s=n/26|0,u=n%26;return this._expand(s+1),f?this.words[s]=this.words[s]|1<<u:this.words[s]=this.words[s]&~(1<<u),this._strip()},a.prototype.iadd=function(n){var f;if(this.negative!==0&&n.negative===0)return this.negative=0,f=this.isub(n),this.negative^=1,this._normSign();if(this.negative===0&&n.negative!==0)return n.negative=0,f=this.isub(n),n.negative=1,f._normSign();var s,u;this.length>n.length?(s=this,u=n):(s=n,u=this);for(var l=0,o=0;o<u.length;o++)f=(s.words[o]|0)+(u.words[o]|0)+l,this.words[o]=f&67108863,l=f>>>26;for(;l!==0&&o<s.length;o++)f=(s.words[o]|0)+l,this.words[o]=f&67108863,l=f>>>26;if(this.length=s.length,l!==0)this.words[this.length]=l,this.length++;else if(s!==this)for(;o<s.length;o++)this.words[o]=s.words[o];return this},a.prototype.add=function(n){var f;return n.negative!==0&&this.negative===0?(n.negative=0,f=this.sub(n),n.negative^=1,f):n.negative===0&&this.negative!==0?(this.negative=0,f=n.sub(this),this.negative=1,f):this.length>n.length?this.clone().iadd(n):n.clone().iadd(this)},a.prototype.isub=function(n){if(n.negative!==0){n.negative=0;var f=this.iadd(n);return n.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var s=this.cmp(n);if(s===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,l;s>0?(u=this,l=n):(u=n,l=this);for(var o=0,r=0;r<l.length;r++)f=(u.words[r]|0)-(l.words[r]|0)+o,o=f>>26,this.words[r]=f&67108863;for(;o!==0&&r<u.length;r++)f=(u.words[r]|0)+o,o=f>>26,this.words[r]=f&67108863;if(o===0&&r<u.length&&u!==this)for(;r<u.length;r++)this.words[r]=u.words[r];return this.length=Math.max(this.length,r),u!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(n){return this.clone().isub(n)};function k(t,n,f){f.negative=n.negative^t.negative;var s=t.length+n.length|0;f.length=s,s=s-1|0;var u=t.words[0]|0,l=n.words[0]|0,o=u*l,r=o&67108863,h=o/67108864|0;f.words[0]=r;for(var M=1;M<s;M++){for(var T=h>>>26,N=h&67108863,Q=Math.min(M,n.length-1),K=Math.max(0,M-t.length+1);K<=Q;K++){var A=M-K|0;u=t.words[A]|0,l=n.words[K]|0,o=u*l+N,T+=o/67108864|0,N=o&67108863}f.words[M]=N|0,h=T|0}return h!==0?f.words[M]=h|0:f.length--,f._strip()}var I=function(n,f,s){var u=n.words,l=f.words,o=s.words,r=0,h,M,T,N=u[0]|0,Q=N&8191,K=N>>>13,A=u[1]|0,O=A&8191,W=A>>>13,Y=u[2]|0,Z=Y&8191,j=Y>>>13,ne=u[3]|0,Re=ne&8191,le=ne>>>13,de=u[4]|0,Pe=de&8191,me=de>>>13,he=u[5]|0,Le=he&8191,ve=he>>>13,ge=u[6]|0,De=ge&8191,ye=ge>>>13,xe=u[7]|0,Ue=xe&8191,Se=xe>>>13,Ae=u[8]|0,He=Ae&8191,z=Ae>>>13,C=u[9]|0,F=C&8191,V=C>>>13,ae=l[0]|0,pe=ae&8191,re=ae>>>13,oe=l[1]|0,Oe=oe&8191,ce=oe>>>13,we=l[2]|0,Ce=we&8191,qe=we>>>13,Te=l[3]|0,je=Te&8191,Be=Te>>>13,$e=l[4]|0,ze=$e&8191,H=$e>>>13,P=l[5]|0,U=P&8191,J=P>>>13,fe=l[6]|0,be=fe&8191,se=fe>>>13,_e=l[7]|0,Ne=_e&8191,Me=_e>>>13,Ee=l[8]|0,Fe=Ee&8191,Ie=Ee>>>13,ke=l[9]|0,We=ke&8191,Ge=ke>>>13;s.negative=n.negative^f.negative,s.length=19,h=Math.imul(Q,pe),M=Math.imul(Q,re),M=M+Math.imul(K,pe)|0,T=Math.imul(K,re);var Ve=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,h=Math.imul(O,pe),M=Math.imul(O,re),M=M+Math.imul(W,pe)|0,T=Math.imul(W,re),h=h+Math.imul(Q,Oe)|0,M=M+Math.imul(Q,ce)|0,M=M+Math.imul(K,Oe)|0,T=T+Math.imul(K,ce)|0;var Ke=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,h=Math.imul(Z,pe),M=Math.imul(Z,re),M=M+Math.imul(j,pe)|0,T=Math.imul(j,re),h=h+Math.imul(O,Oe)|0,M=M+Math.imul(O,ce)|0,M=M+Math.imul(W,Oe)|0,T=T+Math.imul(W,ce)|0,h=h+Math.imul(Q,Ce)|0,M=M+Math.imul(Q,qe)|0,M=M+Math.imul(K,Ce)|0,T=T+Math.imul(K,qe)|0;var Ze=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,h=Math.imul(Re,pe),M=Math.imul(Re,re),M=M+Math.imul(le,pe)|0,T=Math.imul(le,re),h=h+Math.imul(Z,Oe)|0,M=M+Math.imul(Z,ce)|0,M=M+Math.imul(j,Oe)|0,T=T+Math.imul(j,ce)|0,h=h+Math.imul(O,Ce)|0,M=M+Math.imul(O,qe)|0,M=M+Math.imul(W,Ce)|0,T=T+Math.imul(W,qe)|0,h=h+Math.imul(Q,je)|0,M=M+Math.imul(Q,Be)|0,M=M+Math.imul(K,je)|0,T=T+Math.imul(K,Be)|0;var Ye=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,h=Math.imul(Pe,pe),M=Math.imul(Pe,re),M=M+Math.imul(me,pe)|0,T=Math.imul(me,re),h=h+Math.imul(Re,Oe)|0,M=M+Math.imul(Re,ce)|0,M=M+Math.imul(le,Oe)|0,T=T+Math.imul(le,ce)|0,h=h+Math.imul(Z,Ce)|0,M=M+Math.imul(Z,qe)|0,M=M+Math.imul(j,Ce)|0,T=T+Math.imul(j,qe)|0,h=h+Math.imul(O,je)|0,M=M+Math.imul(O,Be)|0,M=M+Math.imul(W,je)|0,T=T+Math.imul(W,Be)|0,h=h+Math.imul(Q,ze)|0,M=M+Math.imul(Q,H)|0,M=M+Math.imul(K,ze)|0,T=T+Math.imul(K,H)|0;var Xe=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,h=Math.imul(Le,pe),M=Math.imul(Le,re),M=M+Math.imul(ve,pe)|0,T=Math.imul(ve,re),h=h+Math.imul(Pe,Oe)|0,M=M+Math.imul(Pe,ce)|0,M=M+Math.imul(me,Oe)|0,T=T+Math.imul(me,ce)|0,h=h+Math.imul(Re,Ce)|0,M=M+Math.imul(Re,qe)|0,M=M+Math.imul(le,Ce)|0,T=T+Math.imul(le,qe)|0,h=h+Math.imul(Z,je)|0,M=M+Math.imul(Z,Be)|0,M=M+Math.imul(j,je)|0,T=T+Math.imul(j,Be)|0,h=h+Math.imul(O,ze)|0,M=M+Math.imul(O,H)|0,M=M+Math.imul(W,ze)|0,T=T+Math.imul(W,H)|0,h=h+Math.imul(Q,U)|0,M=M+Math.imul(Q,J)|0,M=M+Math.imul(K,U)|0,T=T+Math.imul(K,J)|0;var Je=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(Je>>>26)|0,Je&=67108863,h=Math.imul(De,pe),M=Math.imul(De,re),M=M+Math.imul(ye,pe)|0,T=Math.imul(ye,re),h=h+Math.imul(Le,Oe)|0,M=M+Math.imul(Le,ce)|0,M=M+Math.imul(ve,Oe)|0,T=T+Math.imul(ve,ce)|0,h=h+Math.imul(Pe,Ce)|0,M=M+Math.imul(Pe,qe)|0,M=M+Math.imul(me,Ce)|0,T=T+Math.imul(me,qe)|0,h=h+Math.imul(Re,je)|0,M=M+Math.imul(Re,Be)|0,M=M+Math.imul(le,je)|0,T=T+Math.imul(le,Be)|0,h=h+Math.imul(Z,ze)|0,M=M+Math.imul(Z,H)|0,M=M+Math.imul(j,ze)|0,T=T+Math.imul(j,H)|0,h=h+Math.imul(O,U)|0,M=M+Math.imul(O,J)|0,M=M+Math.imul(W,U)|0,T=T+Math.imul(W,J)|0,h=h+Math.imul(Q,be)|0,M=M+Math.imul(Q,se)|0,M=M+Math.imul(K,be)|0,T=T+Math.imul(K,se)|0;var Qe=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,h=Math.imul(Ue,pe),M=Math.imul(Ue,re),M=M+Math.imul(Se,pe)|0,T=Math.imul(Se,re),h=h+Math.imul(De,Oe)|0,M=M+Math.imul(De,ce)|0,M=M+Math.imul(ye,Oe)|0,T=T+Math.imul(ye,ce)|0,h=h+Math.imul(Le,Ce)|0,M=M+Math.imul(Le,qe)|0,M=M+Math.imul(ve,Ce)|0,T=T+Math.imul(ve,qe)|0,h=h+Math.imul(Pe,je)|0,M=M+Math.imul(Pe,Be)|0,M=M+Math.imul(me,je)|0,T=T+Math.imul(me,Be)|0,h=h+Math.imul(Re,ze)|0,M=M+Math.imul(Re,H)|0,M=M+Math.imul(le,ze)|0,T=T+Math.imul(le,H)|0,h=h+Math.imul(Z,U)|0,M=M+Math.imul(Z,J)|0,M=M+Math.imul(j,U)|0,T=T+Math.imul(j,J)|0,h=h+Math.imul(O,be)|0,M=M+Math.imul(O,se)|0,M=M+Math.imul(W,be)|0,T=T+Math.imul(W,se)|0,h=h+Math.imul(Q,Ne)|0,M=M+Math.imul(Q,Me)|0,M=M+Math.imul(K,Ne)|0,T=T+Math.imul(K,Me)|0;var er=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(er>>>26)|0,er&=67108863,h=Math.imul(He,pe),M=Math.imul(He,re),M=M+Math.imul(z,pe)|0,T=Math.imul(z,re),h=h+Math.imul(Ue,Oe)|0,M=M+Math.imul(Ue,ce)|0,M=M+Math.imul(Se,Oe)|0,T=T+Math.imul(Se,ce)|0,h=h+Math.imul(De,Ce)|0,M=M+Math.imul(De,qe)|0,M=M+Math.imul(ye,Ce)|0,T=T+Math.imul(ye,qe)|0,h=h+Math.imul(Le,je)|0,M=M+Math.imul(Le,Be)|0,M=M+Math.imul(ve,je)|0,T=T+Math.imul(ve,Be)|0,h=h+Math.imul(Pe,ze)|0,M=M+Math.imul(Pe,H)|0,M=M+Math.imul(me,ze)|0,T=T+Math.imul(me,H)|0,h=h+Math.imul(Re,U)|0,M=M+Math.imul(Re,J)|0,M=M+Math.imul(le,U)|0,T=T+Math.imul(le,J)|0,h=h+Math.imul(Z,be)|0,M=M+Math.imul(Z,se)|0,M=M+Math.imul(j,be)|0,T=T+Math.imul(j,se)|0,h=h+Math.imul(O,Ne)|0,M=M+Math.imul(O,Me)|0,M=M+Math.imul(W,Ne)|0,T=T+Math.imul(W,Me)|0,h=h+Math.imul(Q,Fe)|0,M=M+Math.imul(Q,Ie)|0,M=M+Math.imul(K,Fe)|0,T=T+Math.imul(K,Ie)|0;var rr=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(rr>>>26)|0,rr&=67108863,h=Math.imul(F,pe),M=Math.imul(F,re),M=M+Math.imul(V,pe)|0,T=Math.imul(V,re),h=h+Math.imul(He,Oe)|0,M=M+Math.imul(He,ce)|0,M=M+Math.imul(z,Oe)|0,T=T+Math.imul(z,ce)|0,h=h+Math.imul(Ue,Ce)|0,M=M+Math.imul(Ue,qe)|0,M=M+Math.imul(Se,Ce)|0,T=T+Math.imul(Se,qe)|0,h=h+Math.imul(De,je)|0,M=M+Math.imul(De,Be)|0,M=M+Math.imul(ye,je)|0,T=T+Math.imul(ye,Be)|0,h=h+Math.imul(Le,ze)|0,M=M+Math.imul(Le,H)|0,M=M+Math.imul(ve,ze)|0,T=T+Math.imul(ve,H)|0,h=h+Math.imul(Pe,U)|0,M=M+Math.imul(Pe,J)|0,M=M+Math.imul(me,U)|0,T=T+Math.imul(me,J)|0,h=h+Math.imul(Re,be)|0,M=M+Math.imul(Re,se)|0,M=M+Math.imul(le,be)|0,T=T+Math.imul(le,se)|0,h=h+Math.imul(Z,Ne)|0,M=M+Math.imul(Z,Me)|0,M=M+Math.imul(j,Ne)|0,T=T+Math.imul(j,Me)|0,h=h+Math.imul(O,Fe)|0,M=M+Math.imul(O,Ie)|0,M=M+Math.imul(W,Fe)|0,T=T+Math.imul(W,Ie)|0,h=h+Math.imul(Q,We)|0,M=M+Math.imul(Q,Ge)|0,M=M+Math.imul(K,We)|0,T=T+Math.imul(K,Ge)|0;var tr=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(tr>>>26)|0,tr&=67108863,h=Math.imul(F,Oe),M=Math.imul(F,ce),M=M+Math.imul(V,Oe)|0,T=Math.imul(V,ce),h=h+Math.imul(He,Ce)|0,M=M+Math.imul(He,qe)|0,M=M+Math.imul(z,Ce)|0,T=T+Math.imul(z,qe)|0,h=h+Math.imul(Ue,je)|0,M=M+Math.imul(Ue,Be)|0,M=M+Math.imul(Se,je)|0,T=T+Math.imul(Se,Be)|0,h=h+Math.imul(De,ze)|0,M=M+Math.imul(De,H)|0,M=M+Math.imul(ye,ze)|0,T=T+Math.imul(ye,H)|0,h=h+Math.imul(Le,U)|0,M=M+Math.imul(Le,J)|0,M=M+Math.imul(ve,U)|0,T=T+Math.imul(ve,J)|0,h=h+Math.imul(Pe,be)|0,M=M+Math.imul(Pe,se)|0,M=M+Math.imul(me,be)|0,T=T+Math.imul(me,se)|0,h=h+Math.imul(Re,Ne)|0,M=M+Math.imul(Re,Me)|0,M=M+Math.imul(le,Ne)|0,T=T+Math.imul(le,Me)|0,h=h+Math.imul(Z,Fe)|0,M=M+Math.imul(Z,Ie)|0,M=M+Math.imul(j,Fe)|0,T=T+Math.imul(j,Ie)|0,h=h+Math.imul(O,We)|0,M=M+Math.imul(O,Ge)|0,M=M+Math.imul(W,We)|0,T=T+Math.imul(W,Ge)|0;var ir=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(ir>>>26)|0,ir&=67108863,h=Math.imul(F,Ce),M=Math.imul(F,qe),M=M+Math.imul(V,Ce)|0,T=Math.imul(V,qe),h=h+Math.imul(He,je)|0,M=M+Math.imul(He,Be)|0,M=M+Math.imul(z,je)|0,T=T+Math.imul(z,Be)|0,h=h+Math.imul(Ue,ze)|0,M=M+Math.imul(Ue,H)|0,M=M+Math.imul(Se,ze)|0,T=T+Math.imul(Se,H)|0,h=h+Math.imul(De,U)|0,M=M+Math.imul(De,J)|0,M=M+Math.imul(ye,U)|0,T=T+Math.imul(ye,J)|0,h=h+Math.imul(Le,be)|0,M=M+Math.imul(Le,se)|0,M=M+Math.imul(ve,be)|0,T=T+Math.imul(ve,se)|0,h=h+Math.imul(Pe,Ne)|0,M=M+Math.imul(Pe,Me)|0,M=M+Math.imul(me,Ne)|0,T=T+Math.imul(me,Me)|0,h=h+Math.imul(Re,Fe)|0,M=M+Math.imul(Re,Ie)|0,M=M+Math.imul(le,Fe)|0,T=T+Math.imul(le,Ie)|0,h=h+Math.imul(Z,We)|0,M=M+Math.imul(Z,Ge)|0,M=M+Math.imul(j,We)|0,T=T+Math.imul(j,Ge)|0;var nr=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(nr>>>26)|0,nr&=67108863,h=Math.imul(F,je),M=Math.imul(F,Be),M=M+Math.imul(V,je)|0,T=Math.imul(V,Be),h=h+Math.imul(He,ze)|0,M=M+Math.imul(He,H)|0,M=M+Math.imul(z,ze)|0,T=T+Math.imul(z,H)|0,h=h+Math.imul(Ue,U)|0,M=M+Math.imul(Ue,J)|0,M=M+Math.imul(Se,U)|0,T=T+Math.imul(Se,J)|0,h=h+Math.imul(De,be)|0,M=M+Math.imul(De,se)|0,M=M+Math.imul(ye,be)|0,T=T+Math.imul(ye,se)|0,h=h+Math.imul(Le,Ne)|0,M=M+Math.imul(Le,Me)|0,M=M+Math.imul(ve,Ne)|0,T=T+Math.imul(ve,Me)|0,h=h+Math.imul(Pe,Fe)|0,M=M+Math.imul(Pe,Ie)|0,M=M+Math.imul(me,Fe)|0,T=T+Math.imul(me,Ie)|0,h=h+Math.imul(Re,We)|0,M=M+Math.imul(Re,Ge)|0,M=M+Math.imul(le,We)|0,T=T+Math.imul(le,Ge)|0;var ar=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(ar>>>26)|0,ar&=67108863,h=Math.imul(F,ze),M=Math.imul(F,H),M=M+Math.imul(V,ze)|0,T=Math.imul(V,H),h=h+Math.imul(He,U)|0,M=M+Math.imul(He,J)|0,M=M+Math.imul(z,U)|0,T=T+Math.imul(z,J)|0,h=h+Math.imul(Ue,be)|0,M=M+Math.imul(Ue,se)|0,M=M+Math.imul(Se,be)|0,T=T+Math.imul(Se,se)|0,h=h+Math.imul(De,Ne)|0,M=M+Math.imul(De,Me)|0,M=M+Math.imul(ye,Ne)|0,T=T+Math.imul(ye,Me)|0,h=h+Math.imul(Le,Fe)|0,M=M+Math.imul(Le,Ie)|0,M=M+Math.imul(ve,Fe)|0,T=T+Math.imul(ve,Ie)|0,h=h+Math.imul(Pe,We)|0,M=M+Math.imul(Pe,Ge)|0,M=M+Math.imul(me,We)|0,T=T+Math.imul(me,Ge)|0;var fr=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(fr>>>26)|0,fr&=67108863,h=Math.imul(F,U),M=Math.imul(F,J),M=M+Math.imul(V,U)|0,T=Math.imul(V,J),h=h+Math.imul(He,be)|0,M=M+Math.imul(He,se)|0,M=M+Math.imul(z,be)|0,T=T+Math.imul(z,se)|0,h=h+Math.imul(Ue,Ne)|0,M=M+Math.imul(Ue,Me)|0,M=M+Math.imul(Se,Ne)|0,T=T+Math.imul(Se,Me)|0,h=h+Math.imul(De,Fe)|0,M=M+Math.imul(De,Ie)|0,M=M+Math.imul(ye,Fe)|0,T=T+Math.imul(ye,Ie)|0,h=h+Math.imul(Le,We)|0,M=M+Math.imul(Le,Ge)|0,M=M+Math.imul(ve,We)|0,T=T+Math.imul(ve,Ge)|0;var or=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(or>>>26)|0,or&=67108863,h=Math.imul(F,be),M=Math.imul(F,se),M=M+Math.imul(V,be)|0,T=Math.imul(V,se),h=h+Math.imul(He,Ne)|0,M=M+Math.imul(He,Me)|0,M=M+Math.imul(z,Ne)|0,T=T+Math.imul(z,Me)|0,h=h+Math.imul(Ue,Fe)|0,M=M+Math.imul(Ue,Ie)|0,M=M+Math.imul(Se,Fe)|0,T=T+Math.imul(Se,Ie)|0,h=h+Math.imul(De,We)|0,M=M+Math.imul(De,Ge)|0,M=M+Math.imul(ye,We)|0,T=T+Math.imul(ye,Ge)|0;var sr=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(sr>>>26)|0,sr&=67108863,h=Math.imul(F,Ne),M=Math.imul(F,Me),M=M+Math.imul(V,Ne)|0,T=Math.imul(V,Me),h=h+Math.imul(He,Fe)|0,M=M+Math.imul(He,Ie)|0,M=M+Math.imul(z,Fe)|0,T=T+Math.imul(z,Ie)|0,h=h+Math.imul(Ue,We)|0,M=M+Math.imul(Ue,Ge)|0,M=M+Math.imul(Se,We)|0,T=T+Math.imul(Se,Ge)|0;var hr=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(hr>>>26)|0,hr&=67108863,h=Math.imul(F,Fe),M=Math.imul(F,Ie),M=M+Math.imul(V,Fe)|0,T=Math.imul(V,Ie),h=h+Math.imul(He,We)|0,M=M+Math.imul(He,Ge)|0,M=M+Math.imul(z,We)|0,T=T+Math.imul(z,Ge)|0;var ur=(r+h|0)+((M&8191)<<13)|0;r=(T+(M>>>13)|0)+(ur>>>26)|0,ur&=67108863,h=Math.imul(F,We),M=Math.imul(F,Ge),M=M+Math.imul(V,We)|0,T=Math.imul(V,Ge);var lr=(r+h|0)+((M&8191)<<13)|0;return r=(T+(M>>>13)|0)+(lr>>>26)|0,lr&=67108863,o[0]=Ve,o[1]=Ke,o[2]=Ze,o[3]=Ye,o[4]=Xe,o[5]=Je,o[6]=Qe,o[7]=er,o[8]=rr,o[9]=tr,o[10]=ir,o[11]=nr,o[12]=ar,o[13]=fr,o[14]=or,o[15]=sr,o[16]=hr,o[17]=ur,o[18]=lr,r!==0&&(o[19]=r,s.length++),s};Math.imul||(I=k);function L(t,n,f){f.negative=n.negative^t.negative,f.length=t.length+n.length;for(var s=0,u=0,l=0;l<f.length-1;l++){var o=u;u=0;for(var r=s&67108863,h=Math.min(l,n.length-1),M=Math.max(0,l-t.length+1);M<=h;M++){var T=l-M,N=t.words[T]|0,Q=n.words[M]|0,K=N*Q,A=K&67108863;o=o+(K/67108864|0)|0,A=A+r|0,r=A&67108863,o=o+(A>>>26)|0,u+=o>>>26,o&=67108863}f.words[l]=r,s=o,o=u}return s!==0?f.words[l]=s:f.length--,f._strip()}function D(t,n,f){return L(t,n,f)}a.prototype.mulTo=function(n,f){var s,u=this.length+n.length;return this.length===10&&n.length===10?s=I(this,n,f):u<63?s=k(this,n,f):u<1024?s=L(this,n,f):s=D(this,n,f),s},a.prototype.mul=function(n){var f=new a(null);return f.words=new Array(this.length+n.length),this.mulTo(n,f)},a.prototype.mulf=function(n){var f=new a(null);return f.words=new Array(this.length+n.length),D(this,n,f)},a.prototype.imul=function(n){return this.clone().mulTo(n,this)},a.prototype.imuln=function(n){var f=n<0;f&&(n=-n),p(typeof n=="number"),p(n<67108864);for(var s=0,u=0;u<this.length;u++){var l=(this.words[u]|0)*n,o=(l&67108863)+(s&67108863);s>>=26,s+=l/67108864|0,s+=o>>>26,this.words[u]=o&67108863}return s!==0&&(this.words[u]=s,this.length++),this.length=n===0?1:this.length,f?this.ineg():this},a.prototype.muln=function(n){return this.clone().imuln(n)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(n){var f=$(n);if(f.length===0)return new a(1);for(var s=this,u=0;u<f.length&&f[u]===0;u++,s=s.sqr());if(++u<f.length)for(var l=s.sqr();u<f.length;u++,l=l.sqr())f[u]!==0&&(s=s.mul(l));return s},a.prototype.iushln=function(n){p(typeof n=="number"&&n>=0);var f=n%26,s=(n-f)/26,u=67108863>>>26-f<<26-f,l;if(f!==0){var o=0;for(l=0;l<this.length;l++){var r=this.words[l]&u,h=(this.words[l]|0)-r<<f;this.words[l]=h|o,o=r>>>26-f}o&&(this.words[l]=o,this.length++)}if(s!==0){for(l=this.length-1;l>=0;l--)this.words[l+s]=this.words[l];for(l=0;l<s;l++)this.words[l]=0;this.length+=s}return this._strip()},a.prototype.ishln=function(n){return p(this.negative===0),this.iushln(n)},a.prototype.iushrn=function(n,f,s){p(typeof n=="number"&&n>=0);var u;f?u=(f-f%26)/26:u=0;var l=n%26,o=Math.min((n-l)/26,this.length),r=67108863^67108863>>>l<<l,h=s;if(u-=o,u=Math.max(0,u),h){for(var M=0;M<o;M++)h.words[M]=this.words[M];h.length=o}if(o!==0)if(this.length>o)for(this.length-=o,M=0;M<this.length;M++)this.words[M]=this.words[M+o];else this.words[0]=0,this.length=1;var T=0;for(M=this.length-1;M>=0&&(T!==0||M>=u);M--){var N=this.words[M]|0;this.words[M]=T<<26-l|N>>>l,T=N&r}return h&&T!==0&&(h.words[h.length++]=T),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(n,f,s){return p(this.negative===0),this.iushrn(n,f,s)},a.prototype.shln=function(n){return this.clone().ishln(n)},a.prototype.ushln=function(n){return this.clone().iushln(n)},a.prototype.shrn=function(n){return this.clone().ishrn(n)},a.prototype.ushrn=function(n){return this.clone().iushrn(n)},a.prototype.testn=function(n){p(typeof n=="number"&&n>=0);var f=n%26,s=(n-f)/26,u=1<<f;if(this.length<=s)return!1;var l=this.words[s];return!!(l&u)},a.prototype.imaskn=function(n){p(typeof n=="number"&&n>=0);var f=n%26,s=(n-f)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=s)return this;if(f!==0&&s++,this.length=Math.min(s,this.length),f!==0){var u=67108863^67108863>>>f<<f;this.words[this.length-1]&=u}return this._strip()},a.prototype.maskn=function(n){return this.clone().imaskn(n)},a.prototype.iaddn=function(n){return p(typeof n=="number"),p(n<67108864),n<0?this.isubn(-n):this.negative!==0?this.length===1&&(this.words[0]|0)<=n?(this.words[0]=n-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(n),this.negative=1,this):this._iaddn(n)},a.prototype._iaddn=function(n){this.words[0]+=n;for(var f=0;f<this.length&&this.words[f]>=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},a.prototype.isubn=function(n){if(p(typeof n=="number"),p(n<67108864),n<0)return this.iaddn(-n);if(this.negative!==0)return this.negative=0,this.iaddn(n),this.negative=1,this;if(this.words[0]-=n,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f<this.length&&this.words[f]<0;f++)this.words[f]+=67108864,this.words[f+1]-=1;return this._strip()},a.prototype.addn=function(n){return this.clone().iaddn(n)},a.prototype.subn=function(n){return this.clone().isubn(n)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(n,f,s){var u=n.length+s,l;this._expand(u);var o,r=0;for(l=0;l<n.length;l++){o=(this.words[l+s]|0)+r;var h=(n.words[l]|0)*f;o-=h&67108863,r=(o>>26)-(h/67108864|0),this.words[l+s]=o&67108863}for(;l<this.length-s;l++)o=(this.words[l+s]|0)+r,r=o>>26,this.words[l+s]=o&67108863;if(r===0)return this._strip();for(p(r===-1),r=0,l=0;l<this.length;l++)o=-(this.words[l]|0)+r,r=o>>26,this.words[l]=o&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(n,f){var s=this.length-n.length,u=this.clone(),l=n,o=l.words[l.length-1]|0,r=this._countBits(o);s=26-r,s!==0&&(l=l.ushln(s),u.iushln(s),o=l.words[l.length-1]|0);var h=u.length-l.length,M;if(f!=="mod"){M=new a(null),M.length=h+1,M.words=new Array(M.length);for(var T=0;T<M.length;T++)M.words[T]=0}var N=u.clone()._ishlnsubmul(l,1,h);N.negative===0&&(u=N,M&&(M.words[h]=1));for(var Q=h-1;Q>=0;Q--){var K=(u.words[l.length+Q]|0)*67108864+(u.words[l.length+Q-1]|0);for(K=Math.min(K/o|0,67108863),u._ishlnsubmul(l,K,Q);u.negative!==0;)K--,u.negative=0,u._ishlnsubmul(l,1,Q),u.isZero()||(u.negative^=1);M&&(M.words[Q]=K)}return M&&M._strip(),u._strip(),f!=="div"&&s!==0&&u.iushrn(s),{div:M||null,mod:u}},a.prototype.divmod=function(n,f,s){if(p(!n.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var u,l,o;return this.negative!==0&&n.negative===0?(o=this.neg().divmod(n,f),f!=="mod"&&(u=o.div.neg()),f!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.iadd(n)),{div:u,mod:l}):this.negative===0&&n.negative!==0?(o=this.divmod(n.neg(),f),f!=="mod"&&(u=o.div.neg()),{div:u,mod:o.mod}):(this.negative&n.negative)!==0?(o=this.neg().divmod(n.neg(),f),f!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.isub(n)),{div:o.div,mod:l}):n.length>this.length||this.cmp(n)<0?{div:new a(0),mod:this}:n.length===1?f==="div"?{div:this.divn(n.words[0]),mod:null}:f==="mod"?{div:null,mod:new a(this.modrn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new a(this.modrn(n.words[0]))}:this._wordDiv(n,f)},a.prototype.div=function(n){return this.divmod(n,"div",!1).div},a.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},a.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},a.prototype.divRound=function(n){var f=this.divmod(n);if(f.mod.isZero())return f.div;var s=f.div.negative!==0?f.mod.isub(n):f.mod,u=n.ushrn(1),l=n.andln(1),o=s.cmp(u);return o<0||l===1&&o===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},a.prototype.modrn=function(n){var f=n<0;f&&(n=-n),p(n<=67108863);for(var s=(1<<26)%n,u=0,l=this.length-1;l>=0;l--)u=(s*u+(this.words[l]|0))%n;return f?-u:u},a.prototype.modn=function(n){return this.modrn(n)},a.prototype.idivn=function(n){var f=n<0;f&&(n=-n),p(n<=67108863);for(var s=0,u=this.length-1;u>=0;u--){var l=(this.words[u]|0)+s*67108864;this.words[u]=l/n|0,s=l%n}return this._strip(),f?this.ineg():this},a.prototype.divn=function(n){return this.clone().idivn(n)},a.prototype.egcd=function(n){p(n.negative===0),p(!n.isZero());var f=this,s=n.clone();f.negative!==0?f=f.umod(n):f=f.clone();for(var u=new a(1),l=new a(0),o=new a(0),r=new a(1),h=0;f.isEven()&&s.isEven();)f.iushrn(1),s.iushrn(1),++h;for(var M=s.clone(),T=f.clone();!f.isZero();){for(var N=0,Q=1;(f.words[0]&Q)===0&&N<26;++N,Q<<=1);if(N>0)for(f.iushrn(N);N-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(M),l.isub(T)),u.iushrn(1),l.iushrn(1);for(var K=0,A=1;(s.words[0]&A)===0&&K<26;++K,A<<=1);if(K>0)for(s.iushrn(K);K-- >0;)(o.isOdd()||r.isOdd())&&(o.iadd(M),r.isub(T)),o.iushrn(1),r.iushrn(1);f.cmp(s)>=0?(f.isub(s),u.isub(o),l.isub(r)):(s.isub(f),o.isub(u),r.isub(l))}return{a:o,b:r,gcd:s.iushln(h)}},a.prototype._invmp=function(n){p(n.negative===0),p(!n.isZero());var f=this,s=n.clone();f.negative!==0?f=f.umod(n):f=f.clone();for(var u=new a(1),l=new a(0),o=s.clone();f.cmpn(1)>0&&s.cmpn(1)>0;){for(var r=0,h=1;(f.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(f.iushrn(r);r-- >0;)u.isOdd()&&u.iadd(o),u.iushrn(1);for(var M=0,T=1;(s.words[0]&T)===0&&M<26;++M,T<<=1);if(M>0)for(s.iushrn(M);M-- >0;)l.isOdd()&&l.iadd(o),l.iushrn(1);f.cmp(s)>=0?(f.isub(s),u.isub(l)):(s.isub(f),l.isub(u))}var N;return f.cmpn(1)===0?N=u:N=l,N.cmpn(0)<0&&N.iadd(n),N},a.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var f=this.clone(),s=n.clone();f.negative=0,s.negative=0;for(var u=0;f.isEven()&&s.isEven();u++)f.iushrn(1),s.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;s.isEven();)s.iushrn(1);var l=f.cmp(s);if(l<0){var o=f;f=s,s=o}else if(l===0||s.cmpn(1)===0)break;f.isub(s)}while(!0);return s.iushln(u)},a.prototype.invm=function(n){return this.egcd(n).a.umod(n)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(n){return this.words[0]&n},a.prototype.bincn=function(n){p(typeof n=="number");var f=n%26,s=(n-f)/26,u=1<<f;if(this.length<=s)return this._expand(s+1),this.words[s]|=u,this;for(var l=u,o=s;l!==0&&o<this.length;o++){var r=this.words[o]|0;r+=l,l=r>>>26,r&=67108863,this.words[o]=r}return l!==0&&(this.words[o]=l,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(n){var f=n<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this._strip();var s;if(this.length>1)s=1;else{f&&(n=-n),p(n<=67108863,"Number is too big");var u=this.words[0]|0;s=u===n?0:u<n?-1:1}return this.negative!==0?-s|0:s},a.prototype.cmp=function(n){if(this.negative!==0&&n.negative===0)return-1;if(this.negative===0&&n.negative!==0)return 1;var f=this.ucmp(n);return this.negative!==0?-f|0:f},a.prototype.ucmp=function(n){if(this.length>n.length)return 1;if(this.length<n.length)return-1;for(var f=0,s=this.length-1;s>=0;s--){var u=this.words[s]|0,l=n.words[s]|0;if(u!==l){u<l?f=-1:u>l&&(f=1);break}}return f},a.prototype.gtn=function(n){return this.cmpn(n)===1},a.prototype.gt=function(n){return this.cmp(n)===1},a.prototype.gten=function(n){return this.cmpn(n)>=0},a.prototype.gte=function(n){return this.cmp(n)>=0},a.prototype.ltn=function(n){return this.cmpn(n)===-1},a.prototype.lt=function(n){return this.cmp(n)===-1},a.prototype.lten=function(n){return this.cmpn(n)<=0},a.prototype.lte=function(n){return this.cmp(n)<=0},a.prototype.eqn=function(n){return this.cmpn(n)===0},a.prototype.eq=function(n){return this.cmp(n)===0},a.red=function(n){return new c(n)},a.prototype.toRed=function(n){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),n.convertTo(this)._forceRed(n)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(n){return this.red=n,this},a.prototype.forceRed=function(n){return p(!this.red,"Already a number in reduction context"),this._forceRed(n)},a.prototype.redAdd=function(n){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},a.prototype.redIAdd=function(n){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},a.prototype.redSub=function(n){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},a.prototype.redISub=function(n){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},a.prototype.redShl=function(n){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},a.prototype.redMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},a.prototype.redIMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(n){return p(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var G={k256:null,p224:null,p192:null,p25519:null};function X(t,n){this.name=t,this.p=new a(n,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}X.prototype._tmp=function(){var n=new a(null);return n.words=new Array(Math.ceil(this.n/13)),n},X.prototype.ireduce=function(n){var f=n,s;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),s=f.bitLength();while(s>this.n);var u=s<this.n?-1:f.ucmp(this.p);return u===0?(f.words[0]=0,f.length=1):u>0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},X.prototype.split=function(n,f){n.iushrn(this.n,0,f)},X.prototype.imulK=function(n){return n.imul(this.k)};function te(){X.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}E(te,X),te.prototype.split=function(n,f){for(var s=4194303,u=Math.min(n.length,9),l=0;l<u;l++)f.words[l]=n.words[l];if(f.length=u,n.length<=9){n.words[0]=0,n.length=1;return}var o=n.words[9];for(f.words[f.length++]=o&s,l=10;l<n.length;l++){var r=n.words[l]|0;n.words[l-10]=(r&s)<<4|o>>>22,o=r}o>>>=22,n.words[l-10]=o,o===0&&n.length>10?n.length-=10:n.length-=9},te.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var f=0,s=0;s<n.length;s++){var u=n.words[s]|0;f+=u*977,n.words[s]=f&67108863,f=u*64+(f/67108864|0)}return n.words[n.length-1]===0&&(n.length--,n.words[n.length-1]===0&&n.length--),n};function ie(){X.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}E(ie,X);function ee(){X.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}E(ee,X);function ue(){X.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}E(ue,X),ue.prototype.imulK=function(n){for(var f=0,s=0;s<n.length;s++){var u=(n.words[s]|0)*19+f,l=u&67108863;u>>>=26,n.words[s]=l,f=u}return f!==0&&(n.words[n.length++]=f),n},a._prime=function(n){if(G[n])return G[n];var f;if(n==="k256")f=new te;else if(n==="p224")f=new ie;else if(n==="p192")f=new ee;else if(n==="p25519")f=new ue;else throw new Error("Unknown prime "+n);return G[n]=f,f};function c(t){if(typeof t=="string"){var n=a._prime(t);this.m=n.p,this.prime=n}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}c.prototype._verify1=function(n){p(n.negative===0,"red works only with positives"),p(n.red,"red works only with red numbers")},c.prototype._verify2=function(n,f){p((n.negative|f.negative)===0,"red works only with positives"),p(n.red&&n.red===f.red,"red works only with red numbers")},c.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):(d(n,n.umod(this.m)._forceRed(this)),n)},c.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},c.prototype.add=function(n,f){this._verify2(n,f);var s=n.add(f);return s.cmp(this.m)>=0&&s.isub(this.m),s._forceRed(this)},c.prototype.iadd=function(n,f){this._verify2(n,f);var s=n.iadd(f);return s.cmp(this.m)>=0&&s.isub(this.m),s},c.prototype.sub=function(n,f){this._verify2(n,f);var s=n.sub(f);return s.cmpn(0)<0&&s.iadd(this.m),s._forceRed(this)},c.prototype.isub=function(n,f){this._verify2(n,f);var s=n.isub(f);return s.cmpn(0)<0&&s.iadd(this.m),s},c.prototype.shl=function(n,f){return this._verify1(n),this.imod(n.ushln(f))},c.prototype.imul=function(n,f){return this._verify2(n,f),this.imod(n.imul(f))},c.prototype.mul=function(n,f){return this._verify2(n,f),this.imod(n.mul(f))},c.prototype.isqr=function(n){return this.imul(n,n.clone())},c.prototype.sqr=function(n){return this.mul(n,n)},c.prototype.sqrt=function(n){if(n.isZero())return n.clone();var f=this.m.andln(3);if(p(f%2===1),f===3){var s=this.m.add(new a(1)).iushrn(2);return this.pow(n,s)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);p(!u.isZero());var o=new a(1).toRed(this),r=o.redNeg(),h=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new a(2*M*M).toRed(this);this.pow(M,h).cmp(r)!==0;)M.redIAdd(r);for(var T=this.pow(M,u),N=this.pow(n,u.addn(1).iushrn(1)),Q=this.pow(n,u),K=l;Q.cmp(o)!==0;){for(var A=Q,O=0;A.cmp(o)!==0;O++)A=A.redSqr();p(O<K);var W=this.pow(T,new a(1).iushln(K-O-1));N=N.redMul(W),T=W.redSqr(),Q=Q.redMul(T),K=O}return N},c.prototype.invm=function(n){var f=n._invmp(this.m);return f.negative!==0?(f.negative=0,this.imod(f).redNeg()):this.imod(f)},c.prototype.pow=function(n,f){if(f.isZero())return new a(1).toRed(this);if(f.cmpn(1)===0)return n.clone();var s=4,u=new Array(1<<s);u[0]=new a(1).toRed(this),u[1]=n;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],n);var o=u[0],r=0,h=0,M=f.bitLength()%26;for(M===0&&(M=26),l=f.length-1;l>=0;l--){for(var T=f.words[l],N=M-1;N>=0;N--){var Q=T>>N&1;if(o!==u[0]&&(o=this.sqr(o)),Q===0&&r===0){h=0;continue}r<<=1,r|=Q,h++,!(h!==s&&(l!==0||N!==0))&&(o=this.mul(o,u[r]),h=0,r=0)}M=26}return o},c.prototype.convertTo=function(n){var f=n.umod(this.m);return f===n?f.clone():f},c.prototype.convertFrom=function(n){var f=n.clone();return f.red=null,f},a.mont=function(n){return new e(n)};function e(t){c.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}E(e,c),e.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},e.prototype.convertFrom=function(n){var f=this.imod(n.mul(this.rinv));return f.red=null,f},e.prototype.imul=function(n,f){if(n.isZero()||f.isZero())return n.words[0]=0,n.length=1,n;var s=n.imul(f),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.mul=function(n,f){if(n.isZero()||f.isZero())return new a(0)._forceRed(this);var s=n.mul(f),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.invm=function(n){var f=this.imod(n._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(b,bn$8)})(bn$9)),bn$9.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var b=requireBn$4(),_=requireBrowser$c(),S=requireSafeBuffer$2().Buffer;function p(w){var v=w.modulus.byteLength(),y;do y=new b(_(v));while(y.cmp(w.modulus)>=0||!y.umod(w.prime1)||!y.umod(w.prime2));return y}function E(w){var v=p(w),y=v.toRed(b.mont(w.modulus)).redPow(new b(w.publicExponent)).fromRed();return{blinder:y,unblinder:v.invm(w.modulus)}}function a(w,v){var y=E(v),m=v.modulus.byteLength(),d=new b(w).mul(y.blinder).umod(v.modulus),g=d.toRed(b.mont(v.prime1)),x=d.toRed(b.mont(v.prime2)),R=v.coefficient,q=v.prime1,B=v.prime2,$=g.redPow(v.exponent1).fromRed(),k=x.redPow(v.exponent2).fromRed(),I=$.isub(k).imul(R).umod(q).imul(B);return k.iadd(I).imul(y.unblinder).umod(v.modulus).toArrayLike(S,"be",m)}return a.getr=p,browserifyRsa=a,browserifyRsa}var elliptic={};const version="6.6.1",require$$0$2={version};var utils$3={},bn$7={exports:{}},bn$6=bn$7.exports,hasRequiredBn$3;function requireBn$3(){return hasRequiredBn$3||(hasRequiredBn$3=1,(function(b){(function(_,S){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function E(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function a(c,e,t){if(a.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof _=="object"?_.exports=a:S.BN=a,a.BN=a,a.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}a.isBN=function(e){return e instanceof a?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var f=0;e[0]==="-"&&(f++,this.negative=1),f<e.length&&(t===16?this._parseHex(e,f,n):(this._parseBase(e,t,f),n==="le"&&this._initArray(this.toArray(),t,n)))},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 f=0;f<this.length;f++)this.words[f]=0;var s,u,l=0;if(n==="be")for(f=e.length-1,s=0;f>=0;f-=3)u=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(f=0,s=0;f<e.length;f+=3)u=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function v(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function y(c,e,t){var n=v(c,t);return t-1>=e&&(n|=v(c,t-1)<<4),n}a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var s=0,u=0,l;if(n==="be")for(f=e.length-1;f>=t;f-=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function m(c,e,t,n){for(var f=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;f*=n,l>=49?f+=l-49+10:l>=17?f+=l-17+10:f+=l}return f}a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var f=0,s=1;s<=67108863;s*=t)f++;f--,s=s/t|0;for(var u=e.length-n,l=u%f,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=f)r=m(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var M=1;for(r=m(e,h,e.length,t),h=0;h<l;h++)M*=t;this.imuln(M),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],x=[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];a.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var f=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<f|s)&16777215).toString(16);s=l>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=x[e];n="";var M=this.clone();for(M.negative=0;!M.isZero();){var T=M.modn(h).toString(e);M=M.idivn(h),M.isZero()?n=T+n:n=d[r-T.length]+T+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var f=this.byteLength(),s=n||Math.max(1,f);p(f<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-f;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function R(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(c.words[n]&1<<f)>>>f}return e}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var f=0;f<n.length;f++)this.words[f]=t.words[f]^n.words[f];if(this!==t)for(;f<t.length;f++)this.words[f]=t.words[f];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var f=0;f<t;f++)this.words[f]=~this.words[f]&67108863;return n>0&&(this.words[f]=~this.words[f]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,f=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<f:this.words[n]=this.words[n]&~(1<<f),this.strip()},a.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,f;this.length>e.length?(n=this,f=e):(n=e,f=this);for(var s=0,u=0;u<f.length;u++)t=(n.words[u]|0)+(f.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},a.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,s;n>0?(f=this,s=e):(f=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(f.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<f.length;l++)t=(f.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<f.length&&f!==this)for(;l<f.length;l++)this.words[l]=f.words[l];return this.length=Math.max(this.length,l),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function q(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var f=c.words[0]|0,s=e.words[0]|0,u=f*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,M=o&67108863,T=Math.min(r,e.length-1),N=Math.max(0,r-c.length+1);N<=T;N++){var Q=r-N|0;f=c.words[Q]|0,s=e.words[N]|0,u=f*s+M,h+=u/67108864|0,M=u&67108863}t.words[r]=M|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var B=function(e,t,n){var f=e.words,s=t.words,u=n.words,l=0,o,r,h,M=f[0]|0,T=M&8191,N=M>>>13,Q=f[1]|0,K=Q&8191,A=Q>>>13,O=f[2]|0,W=O&8191,Y=O>>>13,Z=f[3]|0,j=Z&8191,ne=Z>>>13,Re=f[4]|0,le=Re&8191,de=Re>>>13,Pe=f[5]|0,me=Pe&8191,he=Pe>>>13,Le=f[6]|0,ve=Le&8191,ge=Le>>>13,De=f[7]|0,ye=De&8191,xe=De>>>13,Ue=f[8]|0,Se=Ue&8191,Ae=Ue>>>13,He=f[9]|0,z=He&8191,C=He>>>13,F=s[0]|0,V=F&8191,ae=F>>>13,pe=s[1]|0,re=pe&8191,oe=pe>>>13,Oe=s[2]|0,ce=Oe&8191,we=Oe>>>13,Ce=s[3]|0,qe=Ce&8191,Te=Ce>>>13,je=s[4]|0,Be=je&8191,$e=je>>>13,ze=s[5]|0,H=ze&8191,P=ze>>>13,U=s[6]|0,J=U&8191,fe=U>>>13,be=s[7]|0,se=be&8191,_e=be>>>13,Ne=s[8]|0,Me=Ne&8191,Ee=Ne>>>13,Fe=s[9]|0,Ie=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(T,V),r=Math.imul(T,ae),r=r+Math.imul(N,V)|0,h=Math.imul(N,ae);var We=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(K,V),r=Math.imul(K,ae),r=r+Math.imul(A,V)|0,h=Math.imul(A,ae),o=o+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,r=r+Math.imul(N,re)|0,h=h+Math.imul(N,oe)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(W,V),r=Math.imul(W,ae),r=r+Math.imul(Y,V)|0,h=Math.imul(Y,ae),o=o+Math.imul(K,re)|0,r=r+Math.imul(K,oe)|0,r=r+Math.imul(A,re)|0,h=h+Math.imul(A,oe)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(T,we)|0,r=r+Math.imul(N,ce)|0,h=h+Math.imul(N,we)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(j,V),r=Math.imul(j,ae),r=r+Math.imul(ne,V)|0,h=Math.imul(ne,ae),o=o+Math.imul(W,re)|0,r=r+Math.imul(W,oe)|0,r=r+Math.imul(Y,re)|0,h=h+Math.imul(Y,oe)|0,o=o+Math.imul(K,ce)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(A,ce)|0,h=h+Math.imul(A,we)|0,o=o+Math.imul(T,qe)|0,r=r+Math.imul(T,Te)|0,r=r+Math.imul(N,qe)|0,h=h+Math.imul(N,Te)|0;var Ke=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(le,V),r=Math.imul(le,ae),r=r+Math.imul(de,V)|0,h=Math.imul(de,ae),o=o+Math.imul(j,re)|0,r=r+Math.imul(j,oe)|0,r=r+Math.imul(ne,re)|0,h=h+Math.imul(ne,oe)|0,o=o+Math.imul(W,ce)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(Y,ce)|0,h=h+Math.imul(Y,we)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(A,qe)|0,h=h+Math.imul(A,Te)|0,o=o+Math.imul(T,Be)|0,r=r+Math.imul(T,$e)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,$e)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(me,V),r=Math.imul(me,ae),r=r+Math.imul(he,V)|0,h=Math.imul(he,ae),o=o+Math.imul(le,re)|0,r=r+Math.imul(le,oe)|0,r=r+Math.imul(de,re)|0,h=h+Math.imul(de,oe)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(j,we)|0,r=r+Math.imul(ne,ce)|0,h=h+Math.imul(ne,we)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(Y,qe)|0,h=h+Math.imul(Y,Te)|0,o=o+Math.imul(K,Be)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(A,Be)|0,h=h+Math.imul(A,$e)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(T,P)|0,r=r+Math.imul(N,H)|0,h=h+Math.imul(N,P)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ve,V),r=Math.imul(ve,ae),r=r+Math.imul(ge,V)|0,h=Math.imul(ge,ae),o=o+Math.imul(me,re)|0,r=r+Math.imul(me,oe)|0,r=r+Math.imul(he,re)|0,h=h+Math.imul(he,oe)|0,o=o+Math.imul(le,ce)|0,r=r+Math.imul(le,we)|0,r=r+Math.imul(de,ce)|0,h=h+Math.imul(de,we)|0,o=o+Math.imul(j,qe)|0,r=r+Math.imul(j,Te)|0,r=r+Math.imul(ne,qe)|0,h=h+Math.imul(ne,Te)|0,o=o+Math.imul(W,Be)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(Y,Be)|0,h=h+Math.imul(Y,$e)|0,o=o+Math.imul(K,H)|0,r=r+Math.imul(K,P)|0,r=r+Math.imul(A,H)|0,h=h+Math.imul(A,P)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(T,fe)|0,r=r+Math.imul(N,J)|0,h=h+Math.imul(N,fe)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(ye,V),r=Math.imul(ye,ae),r=r+Math.imul(xe,V)|0,h=Math.imul(xe,ae),o=o+Math.imul(ve,re)|0,r=r+Math.imul(ve,oe)|0,r=r+Math.imul(ge,re)|0,h=h+Math.imul(ge,oe)|0,o=o+Math.imul(me,ce)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(he,ce)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(le,qe)|0,r=r+Math.imul(le,Te)|0,r=r+Math.imul(de,qe)|0,h=h+Math.imul(de,Te)|0,o=o+Math.imul(j,Be)|0,r=r+Math.imul(j,$e)|0,r=r+Math.imul(ne,Be)|0,h=h+Math.imul(ne,$e)|0,o=o+Math.imul(W,H)|0,r=r+Math.imul(W,P)|0,r=r+Math.imul(Y,H)|0,h=h+Math.imul(Y,P)|0,o=o+Math.imul(K,J)|0,r=r+Math.imul(K,fe)|0,r=r+Math.imul(A,J)|0,h=h+Math.imul(A,fe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(T,_e)|0,r=r+Math.imul(N,se)|0,h=h+Math.imul(N,_e)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(Se,V),r=Math.imul(Se,ae),r=r+Math.imul(Ae,V)|0,h=Math.imul(Ae,ae),o=o+Math.imul(ye,re)|0,r=r+Math.imul(ye,oe)|0,r=r+Math.imul(xe,re)|0,h=h+Math.imul(xe,oe)|0,o=o+Math.imul(ve,ce)|0,r=r+Math.imul(ve,we)|0,r=r+Math.imul(ge,ce)|0,h=h+Math.imul(ge,we)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(le,Be)|0,r=r+Math.imul(le,$e)|0,r=r+Math.imul(de,Be)|0,h=h+Math.imul(de,$e)|0,o=o+Math.imul(j,H)|0,r=r+Math.imul(j,P)|0,r=r+Math.imul(ne,H)|0,h=h+Math.imul(ne,P)|0,o=o+Math.imul(W,J)|0,r=r+Math.imul(W,fe)|0,r=r+Math.imul(Y,J)|0,h=h+Math.imul(Y,fe)|0,o=o+Math.imul(K,se)|0,r=r+Math.imul(K,_e)|0,r=r+Math.imul(A,se)|0,h=h+Math.imul(A,_e)|0,o=o+Math.imul(T,Me)|0,r=r+Math.imul(T,Ee)|0,r=r+Math.imul(N,Me)|0,h=h+Math.imul(N,Ee)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(z,V),r=Math.imul(z,ae),r=r+Math.imul(C,V)|0,h=Math.imul(C,ae),o=o+Math.imul(Se,re)|0,r=r+Math.imul(Se,oe)|0,r=r+Math.imul(Ae,re)|0,h=h+Math.imul(Ae,oe)|0,o=o+Math.imul(ye,ce)|0,r=r+Math.imul(ye,we)|0,r=r+Math.imul(xe,ce)|0,h=h+Math.imul(xe,we)|0,o=o+Math.imul(ve,qe)|0,r=r+Math.imul(ve,Te)|0,r=r+Math.imul(ge,qe)|0,h=h+Math.imul(ge,Te)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(he,Be)|0,h=h+Math.imul(he,$e)|0,o=o+Math.imul(le,H)|0,r=r+Math.imul(le,P)|0,r=r+Math.imul(de,H)|0,h=h+Math.imul(de,P)|0,o=o+Math.imul(j,J)|0,r=r+Math.imul(j,fe)|0,r=r+Math.imul(ne,J)|0,h=h+Math.imul(ne,fe)|0,o=o+Math.imul(W,se)|0,r=r+Math.imul(W,_e)|0,r=r+Math.imul(Y,se)|0,h=h+Math.imul(Y,_e)|0,o=o+Math.imul(K,Me)|0,r=r+Math.imul(K,Ee)|0,r=r+Math.imul(A,Me)|0,h=h+Math.imul(A,Ee)|0,o=o+Math.imul(T,Ie)|0,r=r+Math.imul(T,ke)|0,r=r+Math.imul(N,Ie)|0,h=h+Math.imul(N,ke)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(z,re),r=Math.imul(z,oe),r=r+Math.imul(C,re)|0,h=Math.imul(C,oe),o=o+Math.imul(Se,ce)|0,r=r+Math.imul(Se,we)|0,r=r+Math.imul(Ae,ce)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(ye,qe)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(xe,qe)|0,h=h+Math.imul(xe,Te)|0,o=o+Math.imul(ve,Be)|0,r=r+Math.imul(ve,$e)|0,r=r+Math.imul(ge,Be)|0,h=h+Math.imul(ge,$e)|0,o=o+Math.imul(me,H)|0,r=r+Math.imul(me,P)|0,r=r+Math.imul(he,H)|0,h=h+Math.imul(he,P)|0,o=o+Math.imul(le,J)|0,r=r+Math.imul(le,fe)|0,r=r+Math.imul(de,J)|0,h=h+Math.imul(de,fe)|0,o=o+Math.imul(j,se)|0,r=r+Math.imul(j,_e)|0,r=r+Math.imul(ne,se)|0,h=h+Math.imul(ne,_e)|0,o=o+Math.imul(W,Me)|0,r=r+Math.imul(W,Ee)|0,r=r+Math.imul(Y,Me)|0,h=h+Math.imul(Y,Ee)|0,o=o+Math.imul(K,Ie)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(A,Ie)|0,h=h+Math.imul(A,ke)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(z,ce),r=Math.imul(z,we),r=r+Math.imul(C,ce)|0,h=Math.imul(C,we),o=o+Math.imul(Se,qe)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,$e)|0,r=r+Math.imul(xe,Be)|0,h=h+Math.imul(xe,$e)|0,o=o+Math.imul(ve,H)|0,r=r+Math.imul(ve,P)|0,r=r+Math.imul(ge,H)|0,h=h+Math.imul(ge,P)|0,o=o+Math.imul(me,J)|0,r=r+Math.imul(me,fe)|0,r=r+Math.imul(he,J)|0,h=h+Math.imul(he,fe)|0,o=o+Math.imul(le,se)|0,r=r+Math.imul(le,_e)|0,r=r+Math.imul(de,se)|0,h=h+Math.imul(de,_e)|0,o=o+Math.imul(j,Me)|0,r=r+Math.imul(j,Ee)|0,r=r+Math.imul(ne,Me)|0,h=h+Math.imul(ne,Ee)|0,o=o+Math.imul(W,Ie)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(Y,Ie)|0,h=h+Math.imul(Y,ke)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(z,qe),r=Math.imul(z,Te),r=r+Math.imul(C,qe)|0,h=Math.imul(C,Te),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,$e)|0,r=r+Math.imul(Ae,Be)|0,h=h+Math.imul(Ae,$e)|0,o=o+Math.imul(ye,H)|0,r=r+Math.imul(ye,P)|0,r=r+Math.imul(xe,H)|0,h=h+Math.imul(xe,P)|0,o=o+Math.imul(ve,J)|0,r=r+Math.imul(ve,fe)|0,r=r+Math.imul(ge,J)|0,h=h+Math.imul(ge,fe)|0,o=o+Math.imul(me,se)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(he,se)|0,h=h+Math.imul(he,_e)|0,o=o+Math.imul(le,Me)|0,r=r+Math.imul(le,Ee)|0,r=r+Math.imul(de,Me)|0,h=h+Math.imul(de,Ee)|0,o=o+Math.imul(j,Ie)|0,r=r+Math.imul(j,ke)|0,r=r+Math.imul(ne,Ie)|0,h=h+Math.imul(ne,ke)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(z,Be),r=Math.imul(z,$e),r=r+Math.imul(C,Be)|0,h=Math.imul(C,$e),o=o+Math.imul(Se,H)|0,r=r+Math.imul(Se,P)|0,r=r+Math.imul(Ae,H)|0,h=h+Math.imul(Ae,P)|0,o=o+Math.imul(ye,J)|0,r=r+Math.imul(ye,fe)|0,r=r+Math.imul(xe,J)|0,h=h+Math.imul(xe,fe)|0,o=o+Math.imul(ve,se)|0,r=r+Math.imul(ve,_e)|0,r=r+Math.imul(ge,se)|0,h=h+Math.imul(ge,_e)|0,o=o+Math.imul(me,Me)|0,r=r+Math.imul(me,Ee)|0,r=r+Math.imul(he,Me)|0,h=h+Math.imul(he,Ee)|0,o=o+Math.imul(le,Ie)|0,r=r+Math.imul(le,ke)|0,r=r+Math.imul(de,Ie)|0,h=h+Math.imul(de,ke)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(z,H),r=Math.imul(z,P),r=r+Math.imul(C,H)|0,h=Math.imul(C,P),o=o+Math.imul(Se,J)|0,r=r+Math.imul(Se,fe)|0,r=r+Math.imul(Ae,J)|0,h=h+Math.imul(Ae,fe)|0,o=o+Math.imul(ye,se)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(xe,se)|0,h=h+Math.imul(xe,_e)|0,o=o+Math.imul(ve,Me)|0,r=r+Math.imul(ve,Ee)|0,r=r+Math.imul(ge,Me)|0,h=h+Math.imul(ge,Ee)|0,o=o+Math.imul(me,Ie)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(he,Ie)|0,h=h+Math.imul(he,ke)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(z,J),r=Math.imul(z,fe),r=r+Math.imul(C,J)|0,h=Math.imul(C,fe),o=o+Math.imul(Se,se)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ae,se)|0,h=h+Math.imul(Ae,_e)|0,o=o+Math.imul(ye,Me)|0,r=r+Math.imul(ye,Ee)|0,r=r+Math.imul(xe,Me)|0,h=h+Math.imul(xe,Ee)|0,o=o+Math.imul(ve,Ie)|0,r=r+Math.imul(ve,ke)|0,r=r+Math.imul(ge,Ie)|0,h=h+Math.imul(ge,ke)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(z,se),r=Math.imul(z,_e),r=r+Math.imul(C,se)|0,h=Math.imul(C,_e),o=o+Math.imul(Se,Me)|0,r=r+Math.imul(Se,Ee)|0,r=r+Math.imul(Ae,Me)|0,h=h+Math.imul(Ae,Ee)|0,o=o+Math.imul(ye,Ie)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(xe,Ie)|0,h=h+Math.imul(xe,ke)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(z,Me),r=Math.imul(z,Ee),r=r+Math.imul(C,Me)|0,h=Math.imul(C,Ee),o=o+Math.imul(Se,Ie)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ae,Ie)|0,h=h+Math.imul(Ae,ke)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(z,Ie),r=Math.imul(z,ke),r=r+Math.imul(C,Ie)|0,h=Math.imul(C,ke);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=We,u[1]=Ge,u[2]=Ve,u[3]=Ke,u[4]=Ze,u[5]=Ye,u[6]=Xe,u[7]=Je,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(B=q);function $(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,M=c.words[h]|0,T=e.words[r]|0,N=M*T,Q=N&67108863;u=u+(N/67108864|0)|0,Q=Q+l|0,l=Q&67108863,u=u+(Q>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function k(c,e,t){var n=new I;return n.mulp(c,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=B(this,e,t):f<63?n=q(this,e,t):f<1024?n=$(this,e,t):n=k(this,e,t),n};function I(c,e){this.x=c,this.y=e}I.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,f=0;f<e;f++)t[f]=this.revBin(f,n,e);return t},I.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var f=0,s=0;s<t;s++)f|=(e&1)<<t-s-1,e>>=1;return f},I.prototype.permute=function(e,t,n,f,s,u){for(var l=0;l<u;l++)f[l]=t[e[l]],s[l]=n[e[l]]},I.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),M=0;M<s;M+=o)for(var T=r,N=h,Q=0;Q<l;Q++){var K=n[M+Q],A=f[M+Q],O=n[M+Q+l],W=f[M+Q+l],Y=T*O-N*W;W=T*W+N*O,O=Y,n[M+Q]=K+O,f[M+Q]=A+W,n[M+Q+l]=K-O,f[M+Q+l]=A-W,Q!==o&&(Y=r*T-h*N,N=r*N+h*T,T=Y)}},I.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,f=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+f},I.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var f=0;f<n/2;f++){var s=e[f];e[f]=e[n-f-1],e[n-f-1]=s,s=t[f],t[f]=-t[n-f-1],t[n-f-1]=-s}},I.prototype.normalize13b=function(e,t){for(var n=0,f=0;f<t/2;f++){var s=Math.round(e[2*f+1]/t)*8192+Math.round(e[2*f]/t)+n;e[f]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},I.prototype.convert13b=function(e,t,n,f){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<f;++u)n[u]=0;p(s===0),p((s&-8192)===0)},I.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},I.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),l=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),M=new Array(f),T=new Array(f),N=n.words;N.length=f,this.convert13b(e.words,e.length,l,f),this.convert13b(t.words,t.length,h,f),this.transform(l,u,o,r,f,s),this.transform(h,u,M,T,f,s);for(var Q=0;Q<f;Q++){var K=o[Q]*M[Q]-r[Q]*T[Q];r[Q]=o[Q]*T[Q]+r[Q]*M[Q],o[Q]=K}return this.conjugate(o,r,f),this.transform(o,r,N,u,f,s),this.conjugate(N,u,f),this.normalize13b(N,f),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),k(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var f=(this.words[n]|0)*e,s=(f&67108863)+(t&67108863);t>>=26,t+=f/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=R(e);if(t.length===0)return new a(1);for(var n=this,f=0;f<t.length&&t[f]===0;f++,n=n.sqr());if(++f<t.length)for(var s=n.sqr();f<t.length;f++,s=s.sqr())t[f]!==0&&(n=n.mul(s));return n},a.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&f,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var f;t?f=(t-t%26)/26:f=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(f-=u,f=Math.max(0,f),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=f);r--){var M=this.words[r]|0;this.words[r]=h<<26-s|M>>>s,h=M&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&f)},a.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var f=67108863^67108863>>>t<<t;this.words[this.length-1]&=f}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var f=e.length+n,s;this._expand(f);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,f=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),f.iushln(n),u=s.words[s.length-1]|0);var o=f.length-s.length,r;if(t!=="mod"){r=new a(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var M=f.clone()._ishlnsubmul(s,1,o);M.negative===0&&(f=M,r&&(r.words[o]=1));for(var T=o-1;T>=0;T--){var N=(f.words[s.length+T]|0)*67108864+(f.words[s.length+T-1]|0);for(N=Math.min(N/u|0,67108863),f._ishlnsubmul(s,N,T);f.negative!==0;)N--,f.negative=0,f._ishlnsubmul(s,1,T),f.isZero()||(f.negative^=1);r&&(r.words[T]=N)}return r&&r.strip(),f.strip(),t!=="div"&&n!==0&&f.iushrn(n),{div:r||null,mod:f}},a.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var f,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(f=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:f,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(f=u.div.neg()),{div:f,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,f=e.ushrn(1),s=e.andln(1),u=n.cmp(f);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,f=this.length-1;f>=0;f--)n=(t*n+(this.words[f]|0))%e;return n},a.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var f=(this.words[n]|0)+t*67108864;this.words[n]=f/e|0,t=f%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=new a(0),l=new a(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var M=0,T=1;(t.words[0]&T)===0&&M<26;++M,T<<=1);if(M>0)for(t.iushrn(M);M-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var N=0,Q=1;(n.words[0]&Q)===0&&N<26;++N,Q<<=1);if(N>0)for(n.iushrn(N);N-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(l)):(n.isub(t),u.isub(f),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},a.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)f.isOdd()&&f.iadd(u),f.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(s)):(n.isub(t),s.isub(f))}var M;return t.cmpn(1)===0?M=f:M=s,M.cmpn(0)<0&&M.iadd(e),M},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var f=0;t.isEven()&&n.isEven();f++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(f)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=f,this;for(var s=f,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var f=this.words[0]|0;n=f===e?0:f<e?-1:1}return this.negative!==0?-n|0:n},a.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var f=this.words[n]|0,s=e.words[n]|0;if(f!==s){f<s?t=-1:f>s&&(t=1);break}}return t},a.prototype.gtn=function(e){return this.cmpn(e)===1},a.prototype.gt=function(e){return this.cmp(e)===1},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return this.cmpn(e)===0},a.prototype.eq=function(e){return this.cmp(e)===0},a.red=function(e){return new ee(e)},a.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var L={k256:null,p224:null,p192:null,p25519:null};function D(c,e){this.name=c,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},D.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var f=n<this.n?-1:t.ucmp(this.p);return f===0?(t.words[0]=0,t.length=1):f>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},D.prototype.split=function(e,t){e.iushrn(this.n,0,t)},D.prototype.imulK=function(e){return e.imul(this.k)};function G(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}E(G,D),G.prototype.split=function(e,t){for(var n=4194303,f=Math.min(e.length,9),s=0;s<f;s++)t.words[s]=e.words[s];if(t.length=f,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},G.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var f=e.words[n]|0;t+=f*977,e.words[n]=t&67108863,t=f*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function X(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}E(X,D);function te(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}E(te,D);function ie(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}E(ie,D),ie.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var f=(e.words[n]|0)*19+t,s=f&67108863;f>>>=26,e.words[n]=s,t=f}return t!==0&&(e.words[e.length++]=t),e},a._prime=function(e){if(L[e])return L[e];var t;if(e==="k256")t=new G;else if(e==="p224")t=new X;else if(e==="p192")t=new te;else if(e==="p25519")t=new ie;else throw new Error("Unknown prime "+e);return L[e]=t,t};function ee(c){if(typeof c=="string"){var e=a._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var f=this.m.subn(1),s=0;!f.isZero()&&f.andln(1)===0;)s++,f.iushrn(1);p(!f.isZero());var u=new a(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,f),M=this.pow(e,f.addn(1).iushrn(1)),T=this.pow(e,f),N=s;T.cmp(u)!==0;){for(var Q=T,K=0;Q.cmp(u)!==0;K++)Q=Q.redSqr();p(K<N);var A=this.pow(h,new a(1).iushln(N-K-1));M=M.redMul(A),h=A.redSqr(),T=T.redMul(h),N=K}return M},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,f=new Array(1<<n);f[0]=new a(1).toRed(this),f[1]=e;for(var s=2;s<f.length;s++)f[s]=this.mul(f[s-1],e);var u=f[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],M=r-1;M>=0;M--){var T=h>>M&1;if(u!==f[0]&&(u=this.sqr(u)),T===0&&l===0){o=0;continue}l<<=1,l|=T,o++,!(o!==n&&(s!==0||M!==0))&&(u=this.mul(u,f[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new ue(e)};function ue(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}E(ue,ee),ue.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},ue.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},ue.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(b,bn$6)})(bn$7)),bn$7.exports}var utils$2={},hasRequiredUtils$3;function requireUtils$3(){return hasRequiredUtils$3||(hasRequiredUtils$3=1,(function(b){var _=b;function S(a,w){if(Array.isArray(a))return a.slice();if(!a)return[];var v=[];if(typeof a!="string"){for(var y=0;y<a.length;y++)v[y]=a[y]|0;return v}if(w==="hex"){a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a);for(var y=0;y<a.length;y+=2)v.push(parseInt(a[y]+a[y+1],16))}else for(var y=0;y<a.length;y++){var m=a.charCodeAt(y),d=m>>8,g=m&255;d?v.push(d,g):v.push(g)}return v}_.toArray=S;function p(a){return a.length===1?"0"+a:a}_.zero2=p;function E(a){for(var w="",v=0;v<a.length;v++)w+=p(a[v].toString(16));return w}_.toHex=E,_.encode=function(w,v){return v==="hex"?E(w):w}})(utils$2)),utils$2}var hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,(function(b){var _=b,S=requireBn$3(),p=requireMinimalisticAssert(),E=requireUtils$3();_.assert=p,_.toArray=E.toArray,_.zero2=E.zero2,_.toHex=E.toHex,_.encode=E.encode;function a(d,g,x){var R=new Array(Math.max(d.bitLength(),x)+1),q;for(q=0;q<R.length;q+=1)R[q]=0;var B=1<<g+1,$=d.clone();for(q=0;q<R.length;q++){var k,I=$.andln(B-1);$.isOdd()?(I>(B>>1)-1?k=(B>>1)-I:k=I,$.isubn(k)):k=0,R[q]=k,$.iushrn(1)}return R}_.getNAF=a;function w(d,g){var x=[[],[]];d=d.clone(),g=g.clone();for(var R=0,q=0,B;d.cmpn(-R)>0||g.cmpn(-q)>0;){var $=d.andln(3)+R&3,k=g.andln(3)+q&3;$===3&&($=-1),k===3&&(k=-1);var I;($&1)===0?I=0:(B=d.andln(7)+R&7,(B===3||B===5)&&k===2?I=-$:I=$),x[0].push(I);var L;(k&1)===0?L=0:(B=g.andln(7)+q&7,(B===3||B===5)&&$===2?L=-k:L=k),x[1].push(L),2*R===I+1&&(R=1-R),2*q===L+1&&(q=1-q),d.iushrn(1),g.iushrn(1)}return x}_.getJSF=w;function v(d,g,x){var R="_"+g;d.prototype[g]=function(){return this[R]!==void 0?this[R]:this[R]=x.call(this)}}_.cachedProperty=v;function y(d){return typeof d=="string"?_.toArray(d,"hex"):d}_.parseBytes=y;function m(d){return new S(d,"hex","le")}_.intFromLE=m})(utils$3)),utils$3}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var b=requireBn$3(),_=requireUtils$2(),S=_.getNAF,p=_.getJSF,E=_.assert;function a(v,y){this.type=v,this.p=new b(y.p,16),this.red=y.prime?b.red(y.prime):b.mont(this.p),this.zero=new b(0).toRed(this.red),this.one=new b(1).toRed(this.red),this.two=new b(2).toRed(this.red),this.n=y.n&&new b(y.n,16),this.g=y.g&&this.pointFromJSON(y.g,y.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var m=this.n&&this.p.div(this.n);!m||m.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}base$1=a,a.prototype.point=function(){throw new Error("Not implemented")},a.prototype.validate=function(){throw new Error("Not implemented")},a.prototype._fixedNafMul=function(y,m){E(y.precomputed);var d=y._getDoubles(),g=S(m,1,this._bitLength),x=(1<<d.step+1)-(d.step%2===0?2:1);x/=3;var R=[],q,B;for(q=0;q<g.length;q+=d.step){B=0;for(var $=q+d.step-1;$>=q;$--)B=(B<<1)+g[$];R.push(B)}for(var k=this.jpoint(null,null,null),I=this.jpoint(null,null,null),L=x;L>0;L--){for(q=0;q<R.length;q++)B=R[q],B===L?I=I.mixedAdd(d.points[q]):B===-L&&(I=I.mixedAdd(d.points[q].neg()));k=k.add(I)}return k.toP()},a.prototype._wnafMul=function(y,m){var d=4,g=y._getNAFPoints(d);d=g.wnd;for(var x=g.points,R=S(m,d,this._bitLength),q=this.jpoint(null,null,null),B=R.length-1;B>=0;B--){for(var $=0;B>=0&&R[B]===0;B--)$++;if(B>=0&&$++,q=q.dblp($),B<0)break;var k=R[B];E(k!==0),y.type==="affine"?k>0?q=q.mixedAdd(x[k-1>>1]):q=q.mixedAdd(x[-k-1>>1].neg()):k>0?q=q.add(x[k-1>>1]):q=q.add(x[-k-1>>1].neg())}return y.type==="affine"?q.toP():q},a.prototype._wnafMulAdd=function(y,m,d,g,x){var R=this._wnafT1,q=this._wnafT2,B=this._wnafT3,$=0,k,I,L;for(k=0;k<g;k++){L=m[k];var D=L._getNAFPoints(y);R[k]=D.wnd,q[k]=D.points}for(k=g-1;k>=1;k-=2){var G=k-1,X=k;if(R[G]!==1||R[X]!==1){B[G]=S(d[G],R[G],this._bitLength),B[X]=S(d[X],R[X],this._bitLength),$=Math.max(B[G].length,$),$=Math.max(B[X].length,$);continue}var te=[m[G],null,null,m[X]];m[G].y.cmp(m[X].y)===0?(te[1]=m[G].add(m[X]),te[2]=m[G].toJ().mixedAdd(m[X].neg())):m[G].y.cmp(m[X].y.redNeg())===0?(te[1]=m[G].toJ().mixedAdd(m[X]),te[2]=m[G].add(m[X].neg())):(te[1]=m[G].toJ().mixedAdd(m[X]),te[2]=m[G].toJ().mixedAdd(m[X].neg()));var ie=[-3,-1,-5,-7,0,7,5,1,3],ee=p(d[G],d[X]);for($=Math.max(ee[0].length,$),B[G]=new Array($),B[X]=new Array($),I=0;I<$;I++){var ue=ee[0][I]|0,c=ee[1][I]|0;B[G][I]=ie[(ue+1)*3+(c+1)],B[X][I]=0,q[G]=te}}var e=this.jpoint(null,null,null),t=this._wnafT4;for(k=$;k>=0;k--){for(var n=0;k>=0;){var f=!0;for(I=0;I<g;I++)t[I]=B[I][k]|0,t[I]!==0&&(f=!1);if(!f)break;n++,k--}if(k>=0&&n++,e=e.dblp(n),k<0)break;for(I=0;I<g;I++){var s=t[I];s!==0&&(s>0?L=q[I][s-1>>1]:s<0&&(L=q[I][-s-1>>1].neg()),L.type==="affine"?e=e.mixedAdd(L):e=e.add(L))}}for(k=0;k<g;k++)q[k]=null;return x?e:e.toP()};function w(v,y){this.curve=v,this.type=y,this.precomputed=null}return a.BasePoint=w,w.prototype.eq=function(){throw new Error("Not implemented")},w.prototype.validate=function(){return this.curve.validate(this)},a.prototype.decodePoint=function(y,m){y=_.toArray(y,m);var d=this.p.byteLength();if((y[0]===4||y[0]===6||y[0]===7)&&y.length-1===2*d){y[0]===6?E(y[y.length-1]%2===0):y[0]===7&&E(y[y.length-1]%2===1);var g=this.point(y.slice(1,1+d),y.slice(1+d,1+2*d));return g}else if((y[0]===2||y[0]===3)&&y.length-1===d)return this.pointFromX(y.slice(1,1+d),y[0]===3);throw new Error("Unknown point format")},w.prototype.encodeCompressed=function(y){return this.encode(y,!0)},w.prototype._encode=function(y){var m=this.curve.p.byteLength(),d=this.getX().toArray("be",m);return y?[this.getY().isEven()?2:3].concat(d):[4].concat(d,this.getY().toArray("be",m))},w.prototype.encode=function(y,m){return _.encode(this._encode(m),y)},w.prototype.precompute=function(y){if(this.precomputed)return this;var m={doubles:null,naf:null,beta:null};return m.naf=this._getNAFPoints(8),m.doubles=this._getDoubles(4,y),m.beta=this._getBeta(),this.precomputed=m,this},w.prototype._hasDoubles=function(y){if(!this.precomputed)return!1;var m=this.precomputed.doubles;return m?m.points.length>=Math.ceil((y.bitLength()+1)/m.step):!1},w.prototype._getDoubles=function(y,m){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var d=[this],g=this,x=0;x<m;x+=y){for(var R=0;R<y;R++)g=g.dbl();d.push(g)}return{step:y,points:d}},w.prototype._getNAFPoints=function(y){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var m=[this],d=(1<<y)-1,g=d===1?null:this.dbl(),x=1;x<d;x++)m[x]=m[x-1].add(g);return{wnd:y,points:m}},w.prototype._getBeta=function(){return null},w.prototype.dblp=function(y){for(var m=this,d=0;d<y;d++)m=m.dbl();return m},base$1}var inherits_browser$1={exports:{}},hasRequiredInherits_browser$1;function requireInherits_browser$1(){return hasRequiredInherits_browser$1||(hasRequiredInherits_browser$1=1,typeof Object.create=="function"?inherits_browser$1.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$1.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser$1.exports}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var b=requireUtils$2(),_=requireBn$3(),S=requireInherits_browser$1(),p=requireBase$1(),E=b.assert;function a(y){p.call(this,"short",y),this.a=new _(y.a,16).toRed(this.red),this.b=new _(y.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(y),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}S(a,p),short=a,a.prototype._getEndomorphism=function(m){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var d,g;if(m.beta)d=new _(m.beta,16).toRed(this.red);else{var x=this._getEndoRoots(this.p);d=x[0].cmp(x[1])<0?x[0]:x[1],d=d.toRed(this.red)}if(m.lambda)g=new _(m.lambda,16);else{var R=this._getEndoRoots(this.n);this.g.mul(R[0]).x.cmp(this.g.x.redMul(d))===0?g=R[0]:(g=R[1],E(this.g.mul(g).x.cmp(this.g.x.redMul(d))===0))}var q;return m.basis?q=m.basis.map(function(B){return{a:new _(B.a,16),b:new _(B.b,16)}}):q=this._getEndoBasis(g),{beta:d,lambda:g,basis:q}}},a.prototype._getEndoRoots=function(m){var d=m===this.p?this.red:_.mont(m),g=new _(2).toRed(d).redInvm(),x=g.redNeg(),R=new _(3).toRed(d).redNeg().redSqrt().redMul(g),q=x.redAdd(R).fromRed(),B=x.redSub(R).fromRed();return[q,B]},a.prototype._getEndoBasis=function(m){for(var d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),g=m,x=this.n.clone(),R=new _(1),q=new _(0),B=new _(0),$=new _(1),k,I,L,D,G,X,te,ie=0,ee,ue;g.cmpn(0)!==0;){var c=x.div(g);ee=x.sub(c.mul(g)),ue=B.sub(c.mul(R));var e=$.sub(c.mul(q));if(!L&&ee.cmp(d)<0)k=te.neg(),I=R,L=ee.neg(),D=ue;else if(L&&++ie===2)break;te=ee,x=g,g=ee,B=R,R=ue,$=q,q=e}G=ee.neg(),X=ue;var t=L.sqr().add(D.sqr()),n=G.sqr().add(X.sqr());return n.cmp(t)>=0&&(G=k,X=I),L.negative&&(L=L.neg(),D=D.neg()),G.negative&&(G=G.neg(),X=X.neg()),[{a:L,b:D},{a:G,b:X}]},a.prototype._endoSplit=function(m){var d=this.endo.basis,g=d[0],x=d[1],R=x.b.mul(m).divRound(this.n),q=g.b.neg().mul(m).divRound(this.n),B=R.mul(g.a),$=q.mul(x.a),k=R.mul(g.b),I=q.mul(x.b),L=m.sub(B).sub($),D=k.add(I).neg();return{k1:L,k2:D}},a.prototype.pointFromX=function(m,d){m=new _(m,16),m.red||(m=m.toRed(this.red));var g=m.redSqr().redMul(m).redIAdd(m.redMul(this.a)).redIAdd(this.b),x=g.redSqrt();if(x.redSqr().redSub(g).cmp(this.zero)!==0)throw new Error("invalid point");var R=x.fromRed().isOdd();return(d&&!R||!d&&R)&&(x=x.redNeg()),this.point(m,x)},a.prototype.validate=function(m){if(m.inf)return!0;var d=m.x,g=m.y,x=this.a.redMul(d),R=d.redSqr().redMul(d).redIAdd(x).redIAdd(this.b);return g.redSqr().redISub(R).cmpn(0)===0},a.prototype._endoWnafMulAdd=function(m,d,g){for(var x=this._endoWnafT1,R=this._endoWnafT2,q=0;q<m.length;q++){var B=this._endoSplit(d[q]),$=m[q],k=$._getBeta();B.k1.negative&&(B.k1.ineg(),$=$.neg(!0)),B.k2.negative&&(B.k2.ineg(),k=k.neg(!0)),x[q*2]=$,x[q*2+1]=k,R[q*2]=B.k1,R[q*2+1]=B.k2}for(var I=this._wnafMulAdd(1,x,R,q*2,g),L=0;L<q*2;L++)x[L]=null,R[L]=null;return I};function w(y,m,d,g){p.BasePoint.call(this,y,"affine"),m===null&&d===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new _(m,16),this.y=new _(d,16),g&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}S(w,p.BasePoint),a.prototype.point=function(m,d,g){return new w(this,m,d,g)},a.prototype.pointFromJSON=function(m,d){return w.fromJSON(this,m,d)},w.prototype._getBeta=function(){if(this.curve.endo){var m=this.precomputed;if(m&&m.beta)return m.beta;var d=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(m){var g=this.curve,x=function(R){return g.point(R.x.redMul(g.endo.beta),R.y)};m.beta=d,d.precomputed={beta:null,naf:m.naf&&{wnd:m.naf.wnd,points:m.naf.points.map(x)},doubles:m.doubles&&{step:m.doubles.step,points:m.doubles.points.map(x)}}}return d}},w.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},w.fromJSON=function(m,d,g){typeof d=="string"&&(d=JSON.parse(d));var x=m.point(d[0],d[1],g);if(!d[2])return x;function R(B){return m.point(B[0],B[1],g)}var q=d[2];return x.precomputed={beta:null,doubles:q.doubles&&{step:q.doubles.step,points:[x].concat(q.doubles.points.map(R))},naf:q.naf&&{wnd:q.naf.wnd,points:[x].concat(q.naf.points.map(R))}},x},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.inf},w.prototype.add=function(m){if(this.inf)return m;if(m.inf)return this;if(this.eq(m))return this.dbl();if(this.neg().eq(m))return this.curve.point(null,null);if(this.x.cmp(m.x)===0)return this.curve.point(null,null);var d=this.y.redSub(m.y);d.cmpn(0)!==0&&(d=d.redMul(this.x.redSub(m.x).redInvm()));var g=d.redSqr().redISub(this.x).redISub(m.x),x=d.redMul(this.x.redSub(g)).redISub(this.y);return this.curve.point(g,x)},w.prototype.dbl=function(){if(this.inf)return this;var m=this.y.redAdd(this.y);if(m.cmpn(0)===0)return this.curve.point(null,null);var d=this.curve.a,g=this.x.redSqr(),x=m.redInvm(),R=g.redAdd(g).redIAdd(g).redIAdd(d).redMul(x),q=R.redSqr().redISub(this.x.redAdd(this.x)),B=R.redMul(this.x.redSub(q)).redISub(this.y);return this.curve.point(q,B)},w.prototype.getX=function(){return this.x.fromRed()},w.prototype.getY=function(){return this.y.fromRed()},w.prototype.mul=function(m){return m=new _(m,16),this.isInfinity()?this:this._hasDoubles(m)?this.curve._fixedNafMul(this,m):this.curve.endo?this.curve._endoWnafMulAdd([this],[m]):this.curve._wnafMul(this,m)},w.prototype.mulAdd=function(m,d,g){var x=[this,d],R=[m,g];return this.curve.endo?this.curve._endoWnafMulAdd(x,R):this.curve._wnafMulAdd(1,x,R,2)},w.prototype.jmulAdd=function(m,d,g){var x=[this,d],R=[m,g];return this.curve.endo?this.curve._endoWnafMulAdd(x,R,!0):this.curve._wnafMulAdd(1,x,R,2,!0)},w.prototype.eq=function(m){return this===m||this.inf===m.inf&&(this.inf||this.x.cmp(m.x)===0&&this.y.cmp(m.y)===0)},w.prototype.neg=function(m){if(this.inf)return this;var d=this.curve.point(this.x,this.y.redNeg());if(m&&this.precomputed){var g=this.precomputed,x=function(R){return R.neg()};d.precomputed={naf:g.naf&&{wnd:g.naf.wnd,points:g.naf.points.map(x)},doubles:g.doubles&&{step:g.doubles.step,points:g.doubles.points.map(x)}}}return d},w.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var m=this.curve.jpoint(this.x,this.y,this.curve.one);return m};function v(y,m,d,g){p.BasePoint.call(this,y,"jacobian"),m===null&&d===null&&g===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _(0)):(this.x=new _(m,16),this.y=new _(d,16),this.z=new _(g,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return S(v,p.BasePoint),a.prototype.jpoint=function(m,d,g){return new v(this,m,d,g)},v.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var m=this.z.redInvm(),d=m.redSqr(),g=this.x.redMul(d),x=this.y.redMul(d).redMul(m);return this.curve.point(g,x)},v.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},v.prototype.add=function(m){if(this.isInfinity())return m;if(m.isInfinity())return this;var d=m.z.redSqr(),g=this.z.redSqr(),x=this.x.redMul(d),R=m.x.redMul(g),q=this.y.redMul(d.redMul(m.z)),B=m.y.redMul(g.redMul(this.z)),$=x.redSub(R),k=q.redSub(B);if($.cmpn(0)===0)return k.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var I=$.redSqr(),L=I.redMul($),D=x.redMul(I),G=k.redSqr().redIAdd(L).redISub(D).redISub(D),X=k.redMul(D.redISub(G)).redISub(q.redMul(L)),te=this.z.redMul(m.z).redMul($);return this.curve.jpoint(G,X,te)},v.prototype.mixedAdd=function(m){if(this.isInfinity())return m.toJ();if(m.isInfinity())return this;var d=this.z.redSqr(),g=this.x,x=m.x.redMul(d),R=this.y,q=m.y.redMul(d).redMul(this.z),B=g.redSub(x),$=R.redSub(q);if(B.cmpn(0)===0)return $.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var k=B.redSqr(),I=k.redMul(B),L=g.redMul(k),D=$.redSqr().redIAdd(I).redISub(L).redISub(L),G=$.redMul(L.redISub(D)).redISub(R.redMul(I)),X=this.z.redMul(B);return this.curve.jpoint(D,G,X)},v.prototype.dblp=function(m){if(m===0)return this;if(this.isInfinity())return this;if(!m)return this.dbl();var d;if(this.curve.zeroA||this.curve.threeA){var g=this;for(d=0;d<m;d++)g=g.dbl();return g}var x=this.curve.a,R=this.curve.tinv,q=this.x,B=this.y,$=this.z,k=$.redSqr().redSqr(),I=B.redAdd(B);for(d=0;d<m;d++){var L=q.redSqr(),D=I.redSqr(),G=D.redSqr(),X=L.redAdd(L).redIAdd(L).redIAdd(x.redMul(k)),te=q.redMul(D),ie=X.redSqr().redISub(te.redAdd(te)),ee=te.redISub(ie),ue=X.redMul(ee);ue=ue.redIAdd(ue).redISub(G);var c=I.redMul($);d+1<m&&(k=k.redMul(G)),q=ie,$=c,I=ue}return this.curve.jpoint(q,I.redMul(R),$)},v.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},v.prototype._zeroDbl=function(){var m,d,g;if(this.zOne){var x=this.x.redSqr(),R=this.y.redSqr(),q=R.redSqr(),B=this.x.redAdd(R).redSqr().redISub(x).redISub(q);B=B.redIAdd(B);var $=x.redAdd(x).redIAdd(x),k=$.redSqr().redISub(B).redISub(B),I=q.redIAdd(q);I=I.redIAdd(I),I=I.redIAdd(I),m=k,d=$.redMul(B.redISub(k)).redISub(I),g=this.y.redAdd(this.y)}else{var L=this.x.redSqr(),D=this.y.redSqr(),G=D.redSqr(),X=this.x.redAdd(D).redSqr().redISub(L).redISub(G);X=X.redIAdd(X);var te=L.redAdd(L).redIAdd(L),ie=te.redSqr(),ee=G.redIAdd(G);ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),m=ie.redISub(X).redISub(X),d=te.redMul(X.redISub(m)).redISub(ee),g=this.y.redMul(this.z),g=g.redIAdd(g)}return this.curve.jpoint(m,d,g)},v.prototype._threeDbl=function(){var m,d,g;if(this.zOne){var x=this.x.redSqr(),R=this.y.redSqr(),q=R.redSqr(),B=this.x.redAdd(R).redSqr().redISub(x).redISub(q);B=B.redIAdd(B);var $=x.redAdd(x).redIAdd(x).redIAdd(this.curve.a),k=$.redSqr().redISub(B).redISub(B);m=k;var I=q.redIAdd(q);I=I.redIAdd(I),I=I.redIAdd(I),d=$.redMul(B.redISub(k)).redISub(I),g=this.y.redAdd(this.y)}else{var L=this.z.redSqr(),D=this.y.redSqr(),G=this.x.redMul(D),X=this.x.redSub(L).redMul(this.x.redAdd(L));X=X.redAdd(X).redIAdd(X);var te=G.redIAdd(G);te=te.redIAdd(te);var ie=te.redAdd(te);m=X.redSqr().redISub(ie),g=this.y.redAdd(this.z).redSqr().redISub(D).redISub(L);var ee=D.redSqr();ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),d=X.redMul(te.redISub(m)).redISub(ee)}return this.curve.jpoint(m,d,g)},v.prototype._dbl=function(){var m=this.curve.a,d=this.x,g=this.y,x=this.z,R=x.redSqr().redSqr(),q=d.redSqr(),B=g.redSqr(),$=q.redAdd(q).redIAdd(q).redIAdd(m.redMul(R)),k=d.redAdd(d);k=k.redIAdd(k);var I=k.redMul(B),L=$.redSqr().redISub(I.redAdd(I)),D=I.redISub(L),G=B.redSqr();G=G.redIAdd(G),G=G.redIAdd(G),G=G.redIAdd(G);var X=$.redMul(D).redISub(G),te=g.redAdd(g).redMul(x);return this.curve.jpoint(L,X,te)},v.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var m=this.x.redSqr(),d=this.y.redSqr(),g=this.z.redSqr(),x=d.redSqr(),R=m.redAdd(m).redIAdd(m),q=R.redSqr(),B=this.x.redAdd(d).redSqr().redISub(m).redISub(x);B=B.redIAdd(B),B=B.redAdd(B).redIAdd(B),B=B.redISub(q);var $=B.redSqr(),k=x.redIAdd(x);k=k.redIAdd(k),k=k.redIAdd(k),k=k.redIAdd(k);var I=R.redIAdd(B).redSqr().redISub(q).redISub($).redISub(k),L=d.redMul(I);L=L.redIAdd(L),L=L.redIAdd(L);var D=this.x.redMul($).redISub(L);D=D.redIAdd(D),D=D.redIAdd(D);var G=this.y.redMul(I.redMul(k.redISub(I)).redISub(B.redMul($)));G=G.redIAdd(G),G=G.redIAdd(G),G=G.redIAdd(G);var X=this.z.redAdd(B).redSqr().redISub(g).redISub($);return this.curve.jpoint(D,G,X)},v.prototype.mul=function(m,d){return m=new _(m,d),this.curve._wnafMul(this,m)},v.prototype.eq=function(m){if(m.type==="affine")return this.eq(m.toJ());if(this===m)return!0;var d=this.z.redSqr(),g=m.z.redSqr();if(this.x.redMul(g).redISub(m.x.redMul(d)).cmpn(0)!==0)return!1;var x=d.redMul(this.z),R=g.redMul(m.z);return this.y.redMul(R).redISub(m.y.redMul(x)).cmpn(0)===0},v.prototype.eqXToP=function(m){var d=this.z.redSqr(),g=m.toRed(this.curve.red).redMul(d);if(this.x.cmp(g)===0)return!0;for(var x=m.clone(),R=this.curve.redN.redMul(d);;){if(x.iadd(this.curve.n),x.cmp(this.curve.p)>=0)return!1;if(g.redIAdd(R),this.x.cmp(g)===0)return!0}},v.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},v.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var b=requireBn$3(),_=requireInherits_browser$1(),S=requireBase$1(),p=requireUtils$2();function E(w){S.call(this,"mont",w),this.a=new b(w.a,16).toRed(this.red),this.b=new b(w.b,16).toRed(this.red),this.i4=new b(4).toRed(this.red).redInvm(),this.two=new b(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}_(E,S),mont=E,E.prototype.validate=function(v){var y=v.normalize().x,m=y.redSqr(),d=m.redMul(y).redAdd(m.redMul(this.a)).redAdd(y),g=d.redSqrt();return g.redSqr().cmp(d)===0};function a(w,v,y){S.BasePoint.call(this,w,"projective"),v===null&&y===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new b(v,16),this.z=new b(y,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return _(a,S.BasePoint),E.prototype.decodePoint=function(v,y){return this.point(p.toArray(v,y),1)},E.prototype.point=function(v,y){return new a(this,v,y)},E.prototype.pointFromJSON=function(v){return a.fromJSON(this,v)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(v,y){return new a(v,y[0],y[1]||v.one)},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return this.z.cmpn(0)===0},a.prototype.dbl=function(){var v=this.x.redAdd(this.z),y=v.redSqr(),m=this.x.redSub(this.z),d=m.redSqr(),g=y.redSub(d),x=y.redMul(d),R=g.redMul(d.redAdd(this.curve.a24.redMul(g)));return this.curve.point(x,R)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(v,y){var m=this.x.redAdd(this.z),d=this.x.redSub(this.z),g=v.x.redAdd(v.z),x=v.x.redSub(v.z),R=x.redMul(m),q=g.redMul(d),B=y.z.redMul(R.redAdd(q).redSqr()),$=y.x.redMul(R.redISub(q).redSqr());return this.curve.point(B,$)},a.prototype.mul=function(v){for(var y=v.clone(),m=this,d=this.curve.point(null,null),g=this,x=[];y.cmpn(0)!==0;y.iushrn(1))x.push(y.andln(1));for(var R=x.length-1;R>=0;R--)x[R]===0?(m=m.diffAdd(d,g),d=d.dbl()):(d=m.diffAdd(d,g),m=m.dbl());return d},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(v){return this.getX().cmp(v.getX())===0},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}var edwards,hasRequiredEdwards;function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var b=requireUtils$2(),_=requireBn$3(),S=requireInherits_browser$1(),p=requireBase$1(),E=b.assert;function a(v){this.twisted=(v.a|0)!==1,this.mOneA=this.twisted&&(v.a|0)===-1,this.extended=this.mOneA,p.call(this,"edwards",v),this.a=new _(v.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new _(v.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new _(v.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),E(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(v.c|0)===1}S(a,p),edwards=a,a.prototype._mulA=function(y){return this.mOneA?y.redNeg():this.a.redMul(y)},a.prototype._mulC=function(y){return this.oneC?y:this.c.redMul(y)},a.prototype.jpoint=function(y,m,d,g){return this.point(y,m,d,g)},a.prototype.pointFromX=function(y,m){y=new _(y,16),y.red||(y=y.toRed(this.red));var d=y.redSqr(),g=this.c2.redSub(this.a.redMul(d)),x=this.one.redSub(this.c2.redMul(this.d).redMul(d)),R=g.redMul(x.redInvm()),q=R.redSqrt();if(q.redSqr().redSub(R).cmp(this.zero)!==0)throw new Error("invalid point");var B=q.fromRed().isOdd();return(m&&!B||!m&&B)&&(q=q.redNeg()),this.point(y,q)},a.prototype.pointFromY=function(y,m){y=new _(y,16),y.red||(y=y.toRed(this.red));var d=y.redSqr(),g=d.redSub(this.c2),x=d.redMul(this.d).redMul(this.c2).redSub(this.a),R=g.redMul(x.redInvm());if(R.cmp(this.zero)===0){if(m)throw new Error("invalid point");return this.point(this.zero,y)}var q=R.redSqrt();if(q.redSqr().redSub(R).cmp(this.zero)!==0)throw new Error("invalid point");return q.fromRed().isOdd()!==m&&(q=q.redNeg()),this.point(q,y)},a.prototype.validate=function(y){if(y.isInfinity())return!0;y.normalize();var m=y.x.redSqr(),d=y.y.redSqr(),g=m.redMul(this.a).redAdd(d),x=this.c2.redMul(this.one.redAdd(this.d.redMul(m).redMul(d)));return g.cmp(x)===0};function w(v,y,m,d,g){p.BasePoint.call(this,v,"projective"),y===null&&m===null&&d===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new _(y,16),this.y=new _(m,16),this.z=d?new _(d,16):this.curve.one,this.t=g&&new _(g,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return S(w,p.BasePoint),a.prototype.pointFromJSON=function(y){return w.fromJSON(this,y)},a.prototype.point=function(y,m,d,g){return new w(this,y,m,d,g)},w.fromJSON=function(y,m){return new w(y,m[0],m[1],m[2])},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},w.prototype._extDbl=function(){var y=this.x.redSqr(),m=this.y.redSqr(),d=this.z.redSqr();d=d.redIAdd(d);var g=this.curve._mulA(y),x=this.x.redAdd(this.y).redSqr().redISub(y).redISub(m),R=g.redAdd(m),q=R.redSub(d),B=g.redSub(m),$=x.redMul(q),k=R.redMul(B),I=x.redMul(B),L=q.redMul(R);return this.curve.point($,k,L,I)},w.prototype._projDbl=function(){var y=this.x.redAdd(this.y).redSqr(),m=this.x.redSqr(),d=this.y.redSqr(),g,x,R,q,B,$;if(this.curve.twisted){q=this.curve._mulA(m);var k=q.redAdd(d);this.zOne?(g=y.redSub(m).redSub(d).redMul(k.redSub(this.curve.two)),x=k.redMul(q.redSub(d)),R=k.redSqr().redSub(k).redSub(k)):(B=this.z.redSqr(),$=k.redSub(B).redISub(B),g=y.redSub(m).redISub(d).redMul($),x=k.redMul(q.redSub(d)),R=k.redMul($))}else q=m.redAdd(d),B=this.curve._mulC(this.z).redSqr(),$=q.redSub(B).redSub(B),g=this.curve._mulC(y.redISub(q)).redMul($),x=this.curve._mulC(q).redMul(m.redISub(d)),R=q.redMul($);return this.curve.point(g,x,R)},w.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},w.prototype._extAdd=function(y){var m=this.y.redSub(this.x).redMul(y.y.redSub(y.x)),d=this.y.redAdd(this.x).redMul(y.y.redAdd(y.x)),g=this.t.redMul(this.curve.dd).redMul(y.t),x=this.z.redMul(y.z.redAdd(y.z)),R=d.redSub(m),q=x.redSub(g),B=x.redAdd(g),$=d.redAdd(m),k=R.redMul(q),I=B.redMul($),L=R.redMul($),D=q.redMul(B);return this.curve.point(k,I,D,L)},w.prototype._projAdd=function(y){var m=this.z.redMul(y.z),d=m.redSqr(),g=this.x.redMul(y.x),x=this.y.redMul(y.y),R=this.curve.d.redMul(g).redMul(x),q=d.redSub(R),B=d.redAdd(R),$=this.x.redAdd(this.y).redMul(y.x.redAdd(y.y)).redISub(g).redISub(x),k=m.redMul(q).redMul($),I,L;return this.curve.twisted?(I=m.redMul(B).redMul(x.redSub(this.curve._mulA(g))),L=q.redMul(B)):(I=m.redMul(B).redMul(x.redSub(g)),L=this.curve._mulC(q).redMul(B)),this.curve.point(k,I,L)},w.prototype.add=function(y){return this.isInfinity()?y:y.isInfinity()?this:this.curve.extended?this._extAdd(y):this._projAdd(y)},w.prototype.mul=function(y){return this._hasDoubles(y)?this.curve._fixedNafMul(this,y):this.curve._wnafMul(this,y)},w.prototype.mulAdd=function(y,m,d){return this.curve._wnafMulAdd(1,[this,m],[y,d],2,!1)},w.prototype.jmulAdd=function(y,m,d){return this.curve._wnafMulAdd(1,[this,m],[y,d],2,!0)},w.prototype.normalize=function(){if(this.zOne)return this;var y=this.z.redInvm();return this.x=this.x.redMul(y),this.y=this.y.redMul(y),this.t&&(this.t=this.t.redMul(y)),this.z=this.curve.one,this.zOne=!0,this},w.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},w.prototype.getX=function(){return this.normalize(),this.x.fromRed()},w.prototype.getY=function(){return this.normalize(),this.y.fromRed()},w.prototype.eq=function(y){return this===y||this.getX().cmp(y.getX())===0&&this.getY().cmp(y.getY())===0},w.prototype.eqXToP=function(y){var m=y.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(m)===0)return!0;for(var d=y.clone(),g=this.curve.redN.redMul(this.z);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(m.redIAdd(g),this.x.cmp(m)===0)return!0}},w.prototype.toP=w.prototype.normalize,w.prototype.mixedAdd=w.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,(function(b){var _=b;_.base=requireBase$1(),_.short=requireShort(),_.mont=requireMont(),_.edwards=requireEdwards()})(curve)),curve}var curves={},hash={},utils$1={},hasRequiredUtils$1;function requireUtils$1(){if(hasRequiredUtils$1)return utils$1;hasRequiredUtils$1=1;var b=requireMinimalisticAssert(),_=requireInherits_browser$8();utils$1.inherits=_;function S(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function p(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),s=0;s<e.length;s+=2)n.push(parseInt(e[s]+e[s+1],16))}else for(var f=0,s=0;s<e.length;s++){var u=e.charCodeAt(s);u<128?n[f++]=u:u<2048?(n[f++]=u>>6|192,n[f++]=u&63|128):S(e,s)?(u=65536+((u&1023)<<10)+(e.charCodeAt(++s)&1023),n[f++]=u>>18|240,n[f++]=u>>12&63|128,n[f++]=u>>6&63|128,n[f++]=u&63|128):(n[f++]=u>>12|224,n[f++]=u>>6&63|128,n[f++]=u&63|128)}else for(s=0;s<e.length;s++)n[s]=e[s]|0;return n}utils$1.toArray=p;function E(e){for(var t="",n=0;n<e.length;n++)t+=v(e[n].toString(16));return t}utils$1.toHex=E;function a(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}utils$1.htonl=a;function w(e,t){for(var n="",f=0;f<e.length;f++){var s=e[f];t==="little"&&(s=a(s)),n+=y(s.toString(16))}return n}utils$1.toHex32=w;function v(e){return e.length===1?"0"+e:e}utils$1.zero2=v;function y(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}utils$1.zero8=y;function m(e,t,n,f){var s=n-t;b(s%4===0);for(var u=new Array(s/4),l=0,o=t;l<u.length;l++,o+=4){var r;f==="big"?r=e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3]:r=e[o+3]<<24|e[o+2]<<16|e[o+1]<<8|e[o],u[l]=r>>>0}return u}utils$1.join32=m;function d(e,t){for(var n=new Array(e.length*4),f=0,s=0;f<e.length;f++,s+=4){var u=e[f];t==="big"?(n[s]=u>>>24,n[s+1]=u>>>16&255,n[s+2]=u>>>8&255,n[s+3]=u&255):(n[s+3]=u>>>24,n[s+2]=u>>>16&255,n[s+1]=u>>>8&255,n[s]=u&255)}return n}utils$1.split32=d;function g(e,t){return e>>>t|e<<32-t}utils$1.rotr32=g;function x(e,t){return e<<t|e>>>32-t}utils$1.rotl32=x;function R(e,t){return e+t>>>0}utils$1.sum32=R;function q(e,t,n){return e+t+n>>>0}utils$1.sum32_3=q;function B(e,t,n,f){return e+t+n+f>>>0}utils$1.sum32_4=B;function $(e,t,n,f,s){return e+t+n+f+s>>>0}utils$1.sum32_5=$;function k(e,t,n,f){var s=e[t],u=e[t+1],l=f+u>>>0,o=(l<f?1:0)+n+s;e[t]=o>>>0,e[t+1]=l}utils$1.sum64=k;function I(e,t,n,f){var s=t+f>>>0,u=(s<t?1:0)+e+n;return u>>>0}utils$1.sum64_hi=I;function L(e,t,n,f){var s=t+f;return s>>>0}utils$1.sum64_lo=L;function D(e,t,n,f,s,u,l,o){var r=0,h=t;h=h+f>>>0,r+=h<t?1:0,h=h+u>>>0,r+=h<u?1:0,h=h+o>>>0,r+=h<o?1:0;var M=e+n+s+l+r;return M>>>0}utils$1.sum64_4_hi=D;function G(e,t,n,f,s,u,l,o){var r=t+f+u+o;return r>>>0}utils$1.sum64_4_lo=G;function X(e,t,n,f,s,u,l,o,r,h){var M=0,T=t;T=T+f>>>0,M+=T<t?1:0,T=T+u>>>0,M+=T<u?1:0,T=T+o>>>0,M+=T<o?1:0,T=T+h>>>0,M+=T<h?1:0;var N=e+n+s+l+r+M;return N>>>0}utils$1.sum64_5_hi=X;function te(e,t,n,f,s,u,l,o,r,h){var M=t+f+u+o+h;return M>>>0}utils$1.sum64_5_lo=te;function ie(e,t,n){var f=t<<32-n|e>>>n;return f>>>0}utils$1.rotr64_hi=ie;function ee(e,t,n){var f=e<<32-n|t>>>n;return f>>>0}utils$1.rotr64_lo=ee;function ue(e,t,n){return e>>>n}utils$1.shr64_hi=ue;function c(e,t,n){var f=e<<32-n|t>>>n;return f>>>0}return utils$1.shr64_lo=c,utils$1}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var b=requireUtils$1(),_=requireMinimalisticAssert();function S(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return common$1.BlockHash=S,S.prototype.update=function(E,a){if(E=b.toArray(E,a),this.pending?this.pending=this.pending.concat(E):this.pending=E,this.pendingTotal+=E.length,this.pending.length>=this._delta8){E=this.pending;var w=E.length%this._delta8;this.pending=E.slice(E.length-w,E.length),this.pending.length===0&&(this.pending=null),E=b.join32(E,0,E.length-w,this.endian);for(var v=0;v<E.length;v+=this._delta32)this._update(E,v,v+this._delta32)}return this},S.prototype.digest=function(E){return this.update(this._pad()),_(this.pending===null),this._digest(E)},S.prototype._pad=function(){var E=this.pendingTotal,a=this._delta8,w=a-(E+this.padLength)%a,v=new Array(w+this.padLength);v[0]=128;for(var y=1;y<w;y++)v[y]=0;if(E<<=3,this.endian==="big"){for(var m=8;m<this.padLength;m++)v[y++]=0;v[y++]=0,v[y++]=0,v[y++]=0,v[y++]=0,v[y++]=E>>>24&255,v[y++]=E>>>16&255,v[y++]=E>>>8&255,v[y++]=E&255}else for(v[y++]=E&255,v[y++]=E>>>8&255,v[y++]=E>>>16&255,v[y++]=E>>>24&255,v[y++]=0,v[y++]=0,v[y++]=0,v[y++]=0,m=8;m<this.padLength;m++)v[y++]=0;return v},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var b=requireUtils$1(),_=b.rotr32;function S(d,g,x,R){if(d===0)return p(g,x,R);if(d===1||d===3)return a(g,x,R);if(d===2)return E(g,x,R)}common.ft_1=S;function p(d,g,x){return d&g^~d&x}common.ch32=p;function E(d,g,x){return d&g^d&x^g&x}common.maj32=E;function a(d,g,x){return d^g^x}common.p32=a;function w(d){return _(d,2)^_(d,13)^_(d,22)}common.s0_256=w;function v(d){return _(d,6)^_(d,11)^_(d,25)}common.s1_256=v;function y(d){return _(d,7)^_(d,18)^d>>>3}common.g0_256=y;function m(d){return _(d,17)^_(d,19)^d>>>10}return common.g1_256=m,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var b=requireUtils$1(),_=requireCommon$1(),S=requireCommon(),p=b.rotl32,E=b.sum32,a=b.sum32_5,w=S.ft_1,v=_.BlockHash,y=[1518500249,1859775393,2400959708,3395469782];function m(){if(!(this instanceof m))return new m;v.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return b.inherits(m,v),_1=m,m.blockSize=512,m.outSize=160,m.hmacStrength=80,m.padLength=64,m.prototype._update=function(g,x){for(var R=this.W,q=0;q<16;q++)R[q]=g[x+q];for(;q<R.length;q++)R[q]=p(R[q-3]^R[q-8]^R[q-14]^R[q-16],1);var B=this.h[0],$=this.h[1],k=this.h[2],I=this.h[3],L=this.h[4];for(q=0;q<R.length;q++){var D=~~(q/20),G=a(p(B,5),w(D,$,k,I),L,R[q],y[D]);L=I,I=k,k=p($,30),$=B,B=G}this.h[0]=E(this.h[0],B),this.h[1]=E(this.h[1],$),this.h[2]=E(this.h[2],k),this.h[3]=E(this.h[3],I),this.h[4]=E(this.h[4],L)},m.prototype._digest=function(g){return g==="hex"?b.toHex32(this.h,"big"):b.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var b=requireUtils$1(),_=requireCommon$1(),S=requireCommon(),p=requireMinimalisticAssert(),E=b.sum32,a=b.sum32_4,w=b.sum32_5,v=S.ch32,y=S.maj32,m=S.s0_256,d=S.s1_256,g=S.g0_256,x=S.g1_256,R=_.BlockHash,q=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function B(){if(!(this instanceof B))return new B;R.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=q,this.W=new Array(64)}return b.inherits(B,R),_256=B,B.blockSize=512,B.outSize=256,B.hmacStrength=192,B.padLength=64,B.prototype._update=function(k,I){for(var L=this.W,D=0;D<16;D++)L[D]=k[I+D];for(;D<L.length;D++)L[D]=a(x(L[D-2]),L[D-7],g(L[D-15]),L[D-16]);var G=this.h[0],X=this.h[1],te=this.h[2],ie=this.h[3],ee=this.h[4],ue=this.h[5],c=this.h[6],e=this.h[7];for(p(this.k.length===L.length),D=0;D<L.length;D++){var t=w(e,d(ee),v(ee,ue,c),this.k[D],L[D]),n=E(m(G),y(G,X,te));e=c,c=ue,ue=ee,ee=E(ie,t),ie=te,te=X,X=G,G=E(t,n)}this.h[0]=E(this.h[0],G),this.h[1]=E(this.h[1],X),this.h[2]=E(this.h[2],te),this.h[3]=E(this.h[3],ie),this.h[4]=E(this.h[4],ee),this.h[5]=E(this.h[5],ue),this.h[6]=E(this.h[6],c),this.h[7]=E(this.h[7],e)},B.prototype._digest=function(k){return k==="hex"?b.toHex32(this.h,"big"):b.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var b=requireUtils$1(),_=require_256();function S(){if(!(this instanceof S))return new S;_.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return b.inherits(S,_),_224=S,S.blockSize=512,S.outSize=224,S.hmacStrength=192,S.padLength=64,S.prototype._digest=function(E){return E==="hex"?b.toHex32(this.h.slice(0,7),"big"):b.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var b=requireUtils$1(),_=requireCommon$1(),S=requireMinimalisticAssert(),p=b.rotr64_hi,E=b.rotr64_lo,a=b.shr64_hi,w=b.shr64_lo,v=b.sum64,y=b.sum64_hi,m=b.sum64_lo,d=b.sum64_4_hi,g=b.sum64_4_lo,x=b.sum64_5_hi,R=b.sum64_5_lo,q=_.BlockHash,B=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function $(){if(!(this instanceof $))return new $;q.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=B,this.W=new Array(160)}b.inherits($,q),_512=$,$.blockSize=1024,$.outSize=512,$.hmacStrength=192,$.padLength=128,$.prototype._prepareBlock=function(n,f){for(var s=this.W,u=0;u<32;u++)s[u]=n[f+u];for(;u<s.length;u+=2){var l=c(s[u-4],s[u-3]),o=e(s[u-4],s[u-3]),r=s[u-14],h=s[u-13],M=ee(s[u-30],s[u-29]),T=ue(s[u-30],s[u-29]),N=s[u-32],Q=s[u-31];s[u]=d(l,o,r,h,M,T,N,Q),s[u+1]=g(l,o,r,h,M,T,N,Q)}},$.prototype._update=function(n,f){this._prepareBlock(n,f);var s=this.W,u=this.h[0],l=this.h[1],o=this.h[2],r=this.h[3],h=this.h[4],M=this.h[5],T=this.h[6],N=this.h[7],Q=this.h[8],K=this.h[9],A=this.h[10],O=this.h[11],W=this.h[12],Y=this.h[13],Z=this.h[14],j=this.h[15];S(this.k.length===s.length);for(var ne=0;ne<s.length;ne+=2){var Re=Z,le=j,de=te(Q,K),Pe=ie(Q,K),me=k(Q,K,A,O,W),he=I(Q,K,A,O,W,Y),Le=this.k[ne],ve=this.k[ne+1],ge=s[ne],De=s[ne+1],ye=x(Re,le,de,Pe,me,he,Le,ve,ge,De),xe=R(Re,le,de,Pe,me,he,Le,ve,ge,De);Re=G(u,l),le=X(u,l),de=L(u,l,o,r,h),Pe=D(u,l,o,r,h,M);var Ue=y(Re,le,de,Pe),Se=m(Re,le,de,Pe);Z=W,j=Y,W=A,Y=O,A=Q,O=K,Q=y(T,N,ye,xe),K=m(N,N,ye,xe),T=h,N=M,h=o,M=r,o=u,r=l,u=y(ye,xe,Ue,Se),l=m(ye,xe,Ue,Se)}v(this.h,0,u,l),v(this.h,2,o,r),v(this.h,4,h,M),v(this.h,6,T,N),v(this.h,8,Q,K),v(this.h,10,A,O),v(this.h,12,W,Y),v(this.h,14,Z,j)},$.prototype._digest=function(n){return n==="hex"?b.toHex32(this.h,"big"):b.split32(this.h,"big")};function k(t,n,f,s,u){var l=t&f^~t&u;return l<0&&(l+=4294967296),l}function I(t,n,f,s,u,l){var o=n&s^~n&l;return o<0&&(o+=4294967296),o}function L(t,n,f,s,u){var l=t&f^t&u^f&u;return l<0&&(l+=4294967296),l}function D(t,n,f,s,u,l){var o=n&s^n&l^s&l;return o<0&&(o+=4294967296),o}function G(t,n){var f=p(t,n,28),s=p(n,t,2),u=p(n,t,7),l=f^s^u;return l<0&&(l+=4294967296),l}function X(t,n){var f=E(t,n,28),s=E(n,t,2),u=E(n,t,7),l=f^s^u;return l<0&&(l+=4294967296),l}function te(t,n){var f=p(t,n,14),s=p(t,n,18),u=p(n,t,9),l=f^s^u;return l<0&&(l+=4294967296),l}function ie(t,n){var f=E(t,n,14),s=E(t,n,18),u=E(n,t,9),l=f^s^u;return l<0&&(l+=4294967296),l}function ee(t,n){var f=p(t,n,1),s=p(t,n,8),u=a(t,n,7),l=f^s^u;return l<0&&(l+=4294967296),l}function ue(t,n){var f=E(t,n,1),s=E(t,n,8),u=w(t,n,7),l=f^s^u;return l<0&&(l+=4294967296),l}function c(t,n){var f=p(t,n,19),s=p(n,t,29),u=a(t,n,6),l=f^s^u;return l<0&&(l+=4294967296),l}function e(t,n){var f=E(t,n,19),s=E(n,t,29),u=w(t,n,6),l=f^s^u;return l<0&&(l+=4294967296),l}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var b=requireUtils$1(),_=require_512();function S(){if(!(this instanceof S))return new S;_.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return b.inherits(S,_),_384=S,S.blockSize=1024,S.outSize=384,S.hmacStrength=192,S.padLength=128,S.prototype._digest=function(E){return E==="hex"?b.toHex32(this.h.slice(0,12),"big"):b.split32(this.h.slice(0,12),"big")},_384}var hasRequiredSha;function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var b=requireUtils$1(),_=requireCommon$1(),S=b.rotl32,p=b.sum32,E=b.sum32_3,a=b.sum32_4,w=_.BlockHash;function v(){if(!(this instanceof v))return new v;w.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}b.inherits(v,w),ripemd.ripemd160=v,v.blockSize=512,v.outSize=160,v.hmacStrength=192,v.padLength=64,v.prototype._update=function($,k){for(var I=this.h[0],L=this.h[1],D=this.h[2],G=this.h[3],X=this.h[4],te=I,ie=L,ee=D,ue=G,c=X,e=0;e<80;e++){var t=p(S(a(I,y(e,L,D,G),$[g[e]+k],m(e)),R[e]),X);I=X,X=G,G=S(D,10),D=L,L=t,t=p(S(a(te,y(79-e,ie,ee,ue),$[x[e]+k],d(e)),q[e]),c),te=c,c=ue,ue=S(ee,10),ee=ie,ie=t}t=E(this.h[1],D,ue),this.h[1]=E(this.h[2],G,c),this.h[2]=E(this.h[3],X,te),this.h[3]=E(this.h[4],I,ie),this.h[4]=E(this.h[0],L,ee),this.h[0]=t},v.prototype._digest=function($){return $==="hex"?b.toHex32(this.h,"little"):b.split32(this.h,"little")};function y(B,$,k,I){return B<=15?$^k^I:B<=31?$&k|~$&I:B<=47?($|~k)^I:B<=63?$&I|k&~I:$^(k|~I)}function m(B){return B<=15?0:B<=31?1518500249:B<=47?1859775393:B<=63?2400959708:2840853838}function d(B){return B<=15?1352829926:B<=31?1548603684:B<=47?1836072691:B<=63?2053994217:0}var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],x=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],R=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],q=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return ripemd}var hmac,hasRequiredHmac;function requireHmac(){if(hasRequiredHmac)return hmac;hasRequiredHmac=1;var b=requireUtils$1(),_=requireMinimalisticAssert();function S(p,E,a){if(!(this instanceof S))return new S(p,E,a);this.Hash=p,this.blockSize=p.blockSize/8,this.outSize=p.outSize/8,this.inner=null,this.outer=null,this._init(b.toArray(E,a))}return hmac=S,S.prototype._init=function(E){E.length>this.blockSize&&(E=new this.Hash().update(E).digest()),_(E.length<=this.blockSize);for(var a=E.length;a<this.blockSize;a++)E.push(0);for(a=0;a<E.length;a++)E[a]^=54;for(this.inner=new this.Hash().update(E),a=0;a<E.length;a++)E[a]^=106;this.outer=new this.Hash().update(E)},S.prototype.update=function(E,a){return this.inner.update(E,a),this},S.prototype.digest=function(E){return this.outer.update(this.inner.digest()),this.outer.digest(E)},hmac}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,(function(b){var _=b;_.utils=requireUtils$1(),_.common=requireCommon$1(),_.sha=requireSha(),_.ripemd=requireRipemd(),_.hmac=requireHmac(),_.sha1=_.sha.sha1,_.sha256=_.sha.sha256,_.sha224=_.sha.sha224,_.sha384=_.sha.sha384,_.sha512=_.sha.sha512,_.ripemd160=_.ripemd.ripemd160})(hash)),hash}var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),secp256k1}var hasRequiredCurves;function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,(function(b){var _=b,S=requireHash(),p=requireCurve(),E=requireUtils$2(),a=E.assert;function w(m){m.type==="short"?this.curve=new p.short(m):m.type==="edwards"?this.curve=new p.edwards(m):this.curve=new p.mont(m),this.g=this.curve.g,this.n=this.curve.n,this.hash=m.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}_.PresetCurve=w;function v(m,d){Object.defineProperty(_,m,{configurable:!0,enumerable:!0,get:function(){var g=new w(d);return Object.defineProperty(_,m,{configurable:!0,enumerable:!0,value:g}),g}})}v("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:S.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),v("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:S.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),v("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:S.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),v("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:S.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),v("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:S.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),v("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:S.sha256,gRed:!1,g:["9"]}),v("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:S.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var y;try{y=requireSecp256k1()}catch{y=void 0}v("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:S.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",y]})})(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var b=requireHash(),_=requireUtils$3(),S=requireMinimalisticAssert();function p(E){if(!(this instanceof p))return new p(E);this.hash=E.hash,this.predResist=!!E.predResist,this.outLen=this.hash.outSize,this.minEntropy=E.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var a=_.toArray(E.entropy,E.entropyEnc||"hex"),w=_.toArray(E.nonce,E.nonceEnc||"hex"),v=_.toArray(E.pers,E.persEnc||"hex");S(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(a,w,v)}return hmacDrbg=p,p.prototype._init=function(a,w,v){var y=a.concat(w).concat(v);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var m=0;m<this.V.length;m++)this.K[m]=0,this.V[m]=1;this._update(y),this._reseed=1,this.reseedInterval=281474976710656},p.prototype._hmac=function(){return new b.hmac(this.hash,this.K)},p.prototype._update=function(a){var w=this._hmac().update(this.V).update([0]);a&&(w=w.update(a)),this.K=w.digest(),this.V=this._hmac().update(this.V).digest(),a&&(this.K=this._hmac().update(this.V).update([1]).update(a).digest(),this.V=this._hmac().update(this.V).digest())},p.prototype.reseed=function(a,w,v,y){typeof w!="string"&&(y=v,v=w,w=null),a=_.toArray(a,w),v=_.toArray(v,y),S(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(a.concat(v||[])),this._reseed=1},p.prototype.generate=function(a,w,v,y){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof w!="string"&&(y=v,v=w,w=null),v&&(v=_.toArray(v,y||"hex"),this._update(v));for(var m=[];m.length<a;)this.V=this._hmac().update(this.V).digest(),m=m.concat(this.V);var d=m.slice(0,a);return this._update(v),this._reseed++,_.encode(d,w)},hmacDrbg}var key$1,hasRequiredKey$1;function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var b=requireBn$3(),_=requireUtils$2(),S=_.assert;function p(E,a){this.ec=E,this.priv=null,this.pub=null,a.priv&&this._importPrivate(a.priv,a.privEnc),a.pub&&this._importPublic(a.pub,a.pubEnc)}return key$1=p,p.fromPublic=function(a,w,v){return w instanceof p?w:new p(a,{pub:w,pubEnc:v})},p.fromPrivate=function(a,w,v){return w instanceof p?w:new p(a,{priv:w,privEnc:v})},p.prototype.validate=function(){var a=this.getPublic();return a.isInfinity()?{result:!1,reason:"Invalid public key"}:a.validate()?a.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},p.prototype.getPublic=function(a,w){return typeof a=="string"&&(w=a,a=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),w?this.pub.encode(w,a):this.pub},p.prototype.getPrivate=function(a){return a==="hex"?this.priv.toString(16,2):this.priv},p.prototype._importPrivate=function(a,w){this.priv=new b(a,w||16),this.priv=this.priv.umod(this.ec.curve.n)},p.prototype._importPublic=function(a,w){if(a.x||a.y){this.ec.curve.type==="mont"?S(a.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&S(a.x&&a.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(a.x,a.y);return}this.pub=this.ec.curve.decodePoint(a,w)},p.prototype.derive=function(a){return a.validate()||S(a.validate(),"public point not validated"),a.mul(this.priv).getX()},p.prototype.sign=function(a,w,v){return this.ec.sign(a,this,w,v)},p.prototype.verify=function(a,w,v){return this.ec.verify(a,w,this,void 0,v)},p.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}var signature$1,hasRequiredSignature$1;function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var b=requireBn$3(),_=requireUtils$2(),S=_.assert;function p(y,m){if(y instanceof p)return y;this._importDER(y,m)||(S(y.r&&y.s,"Signature without r or s"),this.r=new b(y.r,16),this.s=new b(y.s,16),y.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=y.recoveryParam)}signature$1=p;function E(){this.place=0}function a(y,m){var d=y[m.place++];if(!(d&128))return d;var g=d&15;if(g===0||g>4||y[m.place]===0)return!1;for(var x=0,R=0,q=m.place;R<g;R++,q++)x<<=8,x|=y[q],x>>>=0;return x<=127?!1:(m.place=q,x)}function w(y){for(var m=0,d=y.length-1;!y[m]&&!(y[m+1]&128)&&m<d;)m++;return m===0?y:y.slice(m)}p.prototype._importDER=function(m,d){m=_.toArray(m,d);var g=new E;if(m[g.place++]!==48)return!1;var x=a(m,g);if(x===!1||x+g.place!==m.length||m[g.place++]!==2)return!1;var R=a(m,g);if(R===!1||(m[g.place]&128)!==0)return!1;var q=m.slice(g.place,R+g.place);if(g.place+=R,m[g.place++]!==2)return!1;var B=a(m,g);if(B===!1||m.length!==B+g.place||(m[g.place]&128)!==0)return!1;var $=m.slice(g.place,B+g.place);if(q[0]===0)if(q[1]&128)q=q.slice(1);else return!1;if($[0]===0)if($[1]&128)$=$.slice(1);else return!1;return this.r=new b(q),this.s=new b($),this.recoveryParam=null,!0};function v(y,m){if(m<128){y.push(m);return}var d=1+(Math.log(m)/Math.LN2>>>3);for(y.push(d|128);--d;)y.push(m>>>(d<<3)&255);y.push(m)}return p.prototype.toDER=function(m){var d=this.r.toArray(),g=this.s.toArray();for(d[0]&128&&(d=[0].concat(d)),g[0]&128&&(g=[0].concat(g)),d=w(d),g=w(g);!g[0]&&!(g[1]&128);)g=g.slice(1);var x=[2];v(x,d.length),x=x.concat(d),x.push(2),v(x,g.length);var R=x.concat(g),q=[48];return v(q,R.length),q=q.concat(R),_.encode(q,m)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var b=requireBn$3(),_=requireHmacDrbg(),S=requireUtils$2(),p=requireCurves(),E=requireBrorand(),a=S.assert,w=requireKey$1(),v=requireSignature$1();function y(m){if(!(this instanceof y))return new y(m);typeof m=="string"&&(a(Object.prototype.hasOwnProperty.call(p,m),"Unknown curve "+m),m=p[m]),m instanceof p.PresetCurve&&(m={curve:m}),this.curve=m.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=m.curve.g,this.g.precompute(m.curve.n.bitLength()+1),this.hash=m.hash||m.curve.hash}return ec=y,y.prototype.keyPair=function(d){return new w(this,d)},y.prototype.keyFromPrivate=function(d,g){return w.fromPrivate(this,d,g)},y.prototype.keyFromPublic=function(d,g){return w.fromPublic(this,d,g)},y.prototype.genKeyPair=function(d){d||(d={});for(var g=new _({hash:this.hash,pers:d.pers,persEnc:d.persEnc||"utf8",entropy:d.entropy||E(this.hash.hmacStrength),entropyEnc:d.entropy&&d.entropyEnc||"utf8",nonce:this.n.toArray()}),x=this.n.byteLength(),R=this.n.sub(new b(2));;){var q=new b(g.generate(x));if(!(q.cmp(R)>0))return q.iaddn(1),this.keyFromPrivate(q)}},y.prototype._truncateToN=function(d,g,x){var R;if(b.isBN(d)||typeof d=="number")d=new b(d,16),R=d.byteLength();else if(typeof d=="object")R=d.length,d=new b(d,16);else{var q=d.toString();R=q.length+1>>>1,d=new b(q,16)}typeof x!="number"&&(x=R*8);var B=x-this.n.bitLength();return B>0&&(d=d.ushrn(B)),!g&&d.cmp(this.n)>=0?d.sub(this.n):d},y.prototype.sign=function(d,g,x,R){if(typeof x=="object"&&(R=x,x=null),R||(R={}),typeof d!="string"&&typeof d!="number"&&!b.isBN(d)){a(typeof d=="object"&&d&&typeof d.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),a(d.length>>>0===d.length);for(var q=0;q<d.length;q++)a((d[q]&255)===d[q])}g=this.keyFromPrivate(g,x),d=this._truncateToN(d,!1,R.msgBitLength),a(!d.isNeg(),"Can not sign a negative message");var B=this.n.byteLength(),$=g.getPrivate().toArray("be",B),k=d.toArray("be",B);a(new b(k).eq(d),"Can not sign message");for(var I=new _({hash:this.hash,entropy:$,nonce:k,pers:R.pers,persEnc:R.persEnc||"utf8"}),L=this.n.sub(new b(1)),D=0;;D++){var G=R.k?R.k(D):new b(I.generate(this.n.byteLength()));if(G=this._truncateToN(G,!0),!(G.cmpn(1)<=0||G.cmp(L)>=0)){var X=this.g.mul(G);if(!X.isInfinity()){var te=X.getX(),ie=te.umod(this.n);if(ie.cmpn(0)!==0){var ee=G.invm(this.n).mul(ie.mul(g.getPrivate()).iadd(d));if(ee=ee.umod(this.n),ee.cmpn(0)!==0){var ue=(X.getY().isOdd()?1:0)|(te.cmp(ie)!==0?2:0);return R.canonical&&ee.cmp(this.nh)>0&&(ee=this.n.sub(ee),ue^=1),new v({r:ie,s:ee,recoveryParam:ue})}}}}}},y.prototype.verify=function(d,g,x,R,q){q||(q={}),d=this._truncateToN(d,!1,q.msgBitLength),x=this.keyFromPublic(x,R),g=new v(g,"hex");var B=g.r,$=g.s;if(B.cmpn(1)<0||B.cmp(this.n)>=0||$.cmpn(1)<0||$.cmp(this.n)>=0)return!1;var k=$.invm(this.n),I=k.mul(d).umod(this.n),L=k.mul(B).umod(this.n),D;return this.curve._maxwellTrick?(D=this.g.jmulAdd(I,x.getPublic(),L),D.isInfinity()?!1:D.eqXToP(B)):(D=this.g.mulAdd(I,x.getPublic(),L),D.isInfinity()?!1:D.getX().umod(this.n).cmp(B)===0)},y.prototype.recoverPubKey=function(m,d,g,x){a((3&g)===g,"The recovery param is more than two bits"),d=new v(d,x);var R=this.n,q=new b(m),B=d.r,$=d.s,k=g&1,I=g>>1;if(B.cmp(this.curve.p.umod(this.curve.n))>=0&&I)throw new Error("Unable to find sencond key candinate");I?B=this.curve.pointFromX(B.add(this.curve.n),k):B=this.curve.pointFromX(B,k);var L=d.r.invm(R),D=R.sub(q).mul(L).umod(R),G=$.mul(L).umod(R);return this.g.mulAdd(D,B,G)},y.prototype.getKeyRecoveryParam=function(m,d,g,x){if(d=new v(d,x),d.recoveryParam!==null)return d.recoveryParam;for(var R=0;R<4;R++){var q;try{q=this.recoverPubKey(m,d,R)}catch{continue}if(q.eq(g))return R}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var b=requireUtils$2(),_=b.assert,S=b.parseBytes,p=b.cachedProperty;function E(a,w){this.eddsa=a,this._secret=S(w.secret),a.isPoint(w.pub)?this._pub=w.pub:this._pubBytes=S(w.pub)}return E.fromPublic=function(w,v){return v instanceof E?v:new E(w,{pub:v})},E.fromSecret=function(w,v){return v instanceof E?v:new E(w,{secret:v})},E.prototype.secret=function(){return this._secret},p(E,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),p(E,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),p(E,"privBytes",function(){var w=this.eddsa,v=this.hash(),y=w.encodingLength-1,m=v.slice(0,w.encodingLength);return m[0]&=248,m[y]&=127,m[y]|=64,m}),p(E,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),p(E,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),p(E,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),E.prototype.sign=function(w){return _(this._secret,"KeyPair can only verify"),this.eddsa.sign(w,this)},E.prototype.verify=function(w,v){return this.eddsa.verify(w,v,this)},E.prototype.getSecret=function(w){return _(this._secret,"KeyPair is public only"),b.encode(this.secret(),w)},E.prototype.getPublic=function(w){return b.encode(this.pubBytes(),w)},key=E,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var b=requireBn$3(),_=requireUtils$2(),S=_.assert,p=_.cachedProperty,E=_.parseBytes;function a(w,v){this.eddsa=w,typeof v!="object"&&(v=E(v)),Array.isArray(v)&&(S(v.length===w.encodingLength*2,"Signature has invalid size"),v={R:v.slice(0,w.encodingLength),S:v.slice(w.encodingLength)}),S(v.R&&v.S,"Signature without R or S"),w.isPoint(v.R)&&(this._R=v.R),v.S instanceof b&&(this._S=v.S),this._Rencoded=Array.isArray(v.R)?v.R:v.Rencoded,this._Sencoded=Array.isArray(v.S)?v.S:v.Sencoded}return p(a,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),p(a,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),p(a,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),p(a,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return _.encode(this.toBytes(),"hex").toUpperCase()},signature=a,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var b=requireHash(),_=requireCurves(),S=requireUtils$2(),p=S.assert,E=S.parseBytes,a=requireKey(),w=requireSignature();function v(y){if(p(y==="ed25519","only tested with ed25519 so far"),!(this instanceof v))return new v(y);y=_[y].curve,this.curve=y,this.g=y.g,this.g.precompute(y.n.bitLength()+1),this.pointClass=y.point().constructor,this.encodingLength=Math.ceil(y.n.bitLength()/8),this.hash=b.sha512}return eddsa=v,v.prototype.sign=function(m,d){m=E(m);var g=this.keyFromSecret(d),x=this.hashInt(g.messagePrefix(),m),R=this.g.mul(x),q=this.encodePoint(R),B=this.hashInt(q,g.pubBytes(),m).mul(g.priv()),$=x.add(B).umod(this.curve.n);return this.makeSignature({R,S:$,Rencoded:q})},v.prototype.verify=function(m,d,g){if(m=E(m),d=this.makeSignature(d),d.S().gte(d.eddsa.curve.n)||d.S().isNeg())return!1;var x=this.keyFromPublic(g),R=this.hashInt(d.Rencoded(),x.pubBytes(),m),q=this.g.mul(d.S()),B=d.R().add(x.pub().mul(R));return B.eq(q)},v.prototype.hashInt=function(){for(var m=this.hash(),d=0;d<arguments.length;d++)m.update(arguments[d]);return S.intFromLE(m.digest()).umod(this.curve.n)},v.prototype.keyFromPublic=function(m){return a.fromPublic(this,m)},v.prototype.keyFromSecret=function(m){return a.fromSecret(this,m)},v.prototype.makeSignature=function(m){return m instanceof w?m:new w(this,m)},v.prototype.encodePoint=function(m){var d=m.getY().toArray("le",this.encodingLength);return d[this.encodingLength-1]|=m.getX().isOdd()?128:0,d},v.prototype.decodePoint=function(m){m=S.parseBytes(m);var d=m.length-1,g=m.slice(0,d).concat(m[d]&-129),x=(m[d]&128)!==0,R=S.intFromLE(g);return this.curve.pointFromY(R,x)},v.prototype.encodeInt=function(m){return m.toArray("le",this.encodingLength)},v.prototype.decodeInt=function(m){return S.intFromLE(m)},v.prototype.isPoint=function(m){return m instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,(function(b){var _=b;_.version=require$$0$2.version,_.utils=requireUtils$2(),_.rand=requireBrorand(),_.curve=requireCurve(),_.curves=requireCurves(),_.ec=requireEc(),_.eddsa=requireEddsa()})(elliptic)),elliptic}var asn1$1={},asn1={},bn$5={exports:{}},bn$4=bn$5.exports,hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,(function(b){(function(_,S){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function E(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function a(c,e,t){if(a.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof _=="object"?_.exports=a:S.BN=a,a.BN=a,a.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}a.isBN=function(e){return e instanceof a?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var f=0;e[0]==="-"&&(f++,this.negative=1),f<e.length&&(t===16?this._parseHex(e,f,n):(this._parseBase(e,t,f),n==="le"&&this._initArray(this.toArray(),t,n)))},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 f=0;f<this.length;f++)this.words[f]=0;var s,u,l=0;if(n==="be")for(f=e.length-1,s=0;f>=0;f-=3)u=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(f=0,s=0;f<e.length;f+=3)u=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function v(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function y(c,e,t){var n=v(c,t);return t-1>=e&&(n|=v(c,t-1)<<4),n}a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var s=0,u=0,l;if(n==="be")for(f=e.length-1;f>=t;f-=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function m(c,e,t,n){for(var f=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;f*=n,l>=49?f+=l-49+10:l>=17?f+=l-17+10:f+=l}return f}a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var f=0,s=1;s<=67108863;s*=t)f++;f--,s=s/t|0;for(var u=e.length-n,l=u%f,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=f)r=m(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var M=1;for(r=m(e,h,e.length,t),h=0;h<l;h++)M*=t;this.imuln(M),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],x=[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];a.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var f=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<f|s)&16777215).toString(16);s=l>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=x[e];n="";var M=this.clone();for(M.negative=0;!M.isZero();){var T=M.modn(h).toString(e);M=M.idivn(h),M.isZero()?n=T+n:n=d[r-T.length]+T+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var f=this.byteLength(),s=n||Math.max(1,f);p(f<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-f;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function R(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(c.words[n]&1<<f)>>>f}return e}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var f=0;f<n.length;f++)this.words[f]=t.words[f]^n.words[f];if(this!==t)for(;f<t.length;f++)this.words[f]=t.words[f];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var f=0;f<t;f++)this.words[f]=~this.words[f]&67108863;return n>0&&(this.words[f]=~this.words[f]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,f=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<f:this.words[n]=this.words[n]&~(1<<f),this.strip()},a.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,f;this.length>e.length?(n=this,f=e):(n=e,f=this);for(var s=0,u=0;u<f.length;u++)t=(n.words[u]|0)+(f.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},a.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,s;n>0?(f=this,s=e):(f=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(f.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<f.length;l++)t=(f.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<f.length&&f!==this)for(;l<f.length;l++)this.words[l]=f.words[l];return this.length=Math.max(this.length,l),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function q(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var f=c.words[0]|0,s=e.words[0]|0,u=f*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,M=o&67108863,T=Math.min(r,e.length-1),N=Math.max(0,r-c.length+1);N<=T;N++){var Q=r-N|0;f=c.words[Q]|0,s=e.words[N]|0,u=f*s+M,h+=u/67108864|0,M=u&67108863}t.words[r]=M|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var B=function(e,t,n){var f=e.words,s=t.words,u=n.words,l=0,o,r,h,M=f[0]|0,T=M&8191,N=M>>>13,Q=f[1]|0,K=Q&8191,A=Q>>>13,O=f[2]|0,W=O&8191,Y=O>>>13,Z=f[3]|0,j=Z&8191,ne=Z>>>13,Re=f[4]|0,le=Re&8191,de=Re>>>13,Pe=f[5]|0,me=Pe&8191,he=Pe>>>13,Le=f[6]|0,ve=Le&8191,ge=Le>>>13,De=f[7]|0,ye=De&8191,xe=De>>>13,Ue=f[8]|0,Se=Ue&8191,Ae=Ue>>>13,He=f[9]|0,z=He&8191,C=He>>>13,F=s[0]|0,V=F&8191,ae=F>>>13,pe=s[1]|0,re=pe&8191,oe=pe>>>13,Oe=s[2]|0,ce=Oe&8191,we=Oe>>>13,Ce=s[3]|0,qe=Ce&8191,Te=Ce>>>13,je=s[4]|0,Be=je&8191,$e=je>>>13,ze=s[5]|0,H=ze&8191,P=ze>>>13,U=s[6]|0,J=U&8191,fe=U>>>13,be=s[7]|0,se=be&8191,_e=be>>>13,Ne=s[8]|0,Me=Ne&8191,Ee=Ne>>>13,Fe=s[9]|0,Ie=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(T,V),r=Math.imul(T,ae),r=r+Math.imul(N,V)|0,h=Math.imul(N,ae);var We=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(K,V),r=Math.imul(K,ae),r=r+Math.imul(A,V)|0,h=Math.imul(A,ae),o=o+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,r=r+Math.imul(N,re)|0,h=h+Math.imul(N,oe)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(W,V),r=Math.imul(W,ae),r=r+Math.imul(Y,V)|0,h=Math.imul(Y,ae),o=o+Math.imul(K,re)|0,r=r+Math.imul(K,oe)|0,r=r+Math.imul(A,re)|0,h=h+Math.imul(A,oe)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(T,we)|0,r=r+Math.imul(N,ce)|0,h=h+Math.imul(N,we)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(j,V),r=Math.imul(j,ae),r=r+Math.imul(ne,V)|0,h=Math.imul(ne,ae),o=o+Math.imul(W,re)|0,r=r+Math.imul(W,oe)|0,r=r+Math.imul(Y,re)|0,h=h+Math.imul(Y,oe)|0,o=o+Math.imul(K,ce)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(A,ce)|0,h=h+Math.imul(A,we)|0,o=o+Math.imul(T,qe)|0,r=r+Math.imul(T,Te)|0,r=r+Math.imul(N,qe)|0,h=h+Math.imul(N,Te)|0;var Ke=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(le,V),r=Math.imul(le,ae),r=r+Math.imul(de,V)|0,h=Math.imul(de,ae),o=o+Math.imul(j,re)|0,r=r+Math.imul(j,oe)|0,r=r+Math.imul(ne,re)|0,h=h+Math.imul(ne,oe)|0,o=o+Math.imul(W,ce)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(Y,ce)|0,h=h+Math.imul(Y,we)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(A,qe)|0,h=h+Math.imul(A,Te)|0,o=o+Math.imul(T,Be)|0,r=r+Math.imul(T,$e)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,$e)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(me,V),r=Math.imul(me,ae),r=r+Math.imul(he,V)|0,h=Math.imul(he,ae),o=o+Math.imul(le,re)|0,r=r+Math.imul(le,oe)|0,r=r+Math.imul(de,re)|0,h=h+Math.imul(de,oe)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(j,we)|0,r=r+Math.imul(ne,ce)|0,h=h+Math.imul(ne,we)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(Y,qe)|0,h=h+Math.imul(Y,Te)|0,o=o+Math.imul(K,Be)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(A,Be)|0,h=h+Math.imul(A,$e)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(T,P)|0,r=r+Math.imul(N,H)|0,h=h+Math.imul(N,P)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ve,V),r=Math.imul(ve,ae),r=r+Math.imul(ge,V)|0,h=Math.imul(ge,ae),o=o+Math.imul(me,re)|0,r=r+Math.imul(me,oe)|0,r=r+Math.imul(he,re)|0,h=h+Math.imul(he,oe)|0,o=o+Math.imul(le,ce)|0,r=r+Math.imul(le,we)|0,r=r+Math.imul(de,ce)|0,h=h+Math.imul(de,we)|0,o=o+Math.imul(j,qe)|0,r=r+Math.imul(j,Te)|0,r=r+Math.imul(ne,qe)|0,h=h+Math.imul(ne,Te)|0,o=o+Math.imul(W,Be)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(Y,Be)|0,h=h+Math.imul(Y,$e)|0,o=o+Math.imul(K,H)|0,r=r+Math.imul(K,P)|0,r=r+Math.imul(A,H)|0,h=h+Math.imul(A,P)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(T,fe)|0,r=r+Math.imul(N,J)|0,h=h+Math.imul(N,fe)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(ye,V),r=Math.imul(ye,ae),r=r+Math.imul(xe,V)|0,h=Math.imul(xe,ae),o=o+Math.imul(ve,re)|0,r=r+Math.imul(ve,oe)|0,r=r+Math.imul(ge,re)|0,h=h+Math.imul(ge,oe)|0,o=o+Math.imul(me,ce)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(he,ce)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(le,qe)|0,r=r+Math.imul(le,Te)|0,r=r+Math.imul(de,qe)|0,h=h+Math.imul(de,Te)|0,o=o+Math.imul(j,Be)|0,r=r+Math.imul(j,$e)|0,r=r+Math.imul(ne,Be)|0,h=h+Math.imul(ne,$e)|0,o=o+Math.imul(W,H)|0,r=r+Math.imul(W,P)|0,r=r+Math.imul(Y,H)|0,h=h+Math.imul(Y,P)|0,o=o+Math.imul(K,J)|0,r=r+Math.imul(K,fe)|0,r=r+Math.imul(A,J)|0,h=h+Math.imul(A,fe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(T,_e)|0,r=r+Math.imul(N,se)|0,h=h+Math.imul(N,_e)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(Se,V),r=Math.imul(Se,ae),r=r+Math.imul(Ae,V)|0,h=Math.imul(Ae,ae),o=o+Math.imul(ye,re)|0,r=r+Math.imul(ye,oe)|0,r=r+Math.imul(xe,re)|0,h=h+Math.imul(xe,oe)|0,o=o+Math.imul(ve,ce)|0,r=r+Math.imul(ve,we)|0,r=r+Math.imul(ge,ce)|0,h=h+Math.imul(ge,we)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(le,Be)|0,r=r+Math.imul(le,$e)|0,r=r+Math.imul(de,Be)|0,h=h+Math.imul(de,$e)|0,o=o+Math.imul(j,H)|0,r=r+Math.imul(j,P)|0,r=r+Math.imul(ne,H)|0,h=h+Math.imul(ne,P)|0,o=o+Math.imul(W,J)|0,r=r+Math.imul(W,fe)|0,r=r+Math.imul(Y,J)|0,h=h+Math.imul(Y,fe)|0,o=o+Math.imul(K,se)|0,r=r+Math.imul(K,_e)|0,r=r+Math.imul(A,se)|0,h=h+Math.imul(A,_e)|0,o=o+Math.imul(T,Me)|0,r=r+Math.imul(T,Ee)|0,r=r+Math.imul(N,Me)|0,h=h+Math.imul(N,Ee)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(z,V),r=Math.imul(z,ae),r=r+Math.imul(C,V)|0,h=Math.imul(C,ae),o=o+Math.imul(Se,re)|0,r=r+Math.imul(Se,oe)|0,r=r+Math.imul(Ae,re)|0,h=h+Math.imul(Ae,oe)|0,o=o+Math.imul(ye,ce)|0,r=r+Math.imul(ye,we)|0,r=r+Math.imul(xe,ce)|0,h=h+Math.imul(xe,we)|0,o=o+Math.imul(ve,qe)|0,r=r+Math.imul(ve,Te)|0,r=r+Math.imul(ge,qe)|0,h=h+Math.imul(ge,Te)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(he,Be)|0,h=h+Math.imul(he,$e)|0,o=o+Math.imul(le,H)|0,r=r+Math.imul(le,P)|0,r=r+Math.imul(de,H)|0,h=h+Math.imul(de,P)|0,o=o+Math.imul(j,J)|0,r=r+Math.imul(j,fe)|0,r=r+Math.imul(ne,J)|0,h=h+Math.imul(ne,fe)|0,o=o+Math.imul(W,se)|0,r=r+Math.imul(W,_e)|0,r=r+Math.imul(Y,se)|0,h=h+Math.imul(Y,_e)|0,o=o+Math.imul(K,Me)|0,r=r+Math.imul(K,Ee)|0,r=r+Math.imul(A,Me)|0,h=h+Math.imul(A,Ee)|0,o=o+Math.imul(T,Ie)|0,r=r+Math.imul(T,ke)|0,r=r+Math.imul(N,Ie)|0,h=h+Math.imul(N,ke)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(z,re),r=Math.imul(z,oe),r=r+Math.imul(C,re)|0,h=Math.imul(C,oe),o=o+Math.imul(Se,ce)|0,r=r+Math.imul(Se,we)|0,r=r+Math.imul(Ae,ce)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(ye,qe)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(xe,qe)|0,h=h+Math.imul(xe,Te)|0,o=o+Math.imul(ve,Be)|0,r=r+Math.imul(ve,$e)|0,r=r+Math.imul(ge,Be)|0,h=h+Math.imul(ge,$e)|0,o=o+Math.imul(me,H)|0,r=r+Math.imul(me,P)|0,r=r+Math.imul(he,H)|0,h=h+Math.imul(he,P)|0,o=o+Math.imul(le,J)|0,r=r+Math.imul(le,fe)|0,r=r+Math.imul(de,J)|0,h=h+Math.imul(de,fe)|0,o=o+Math.imul(j,se)|0,r=r+Math.imul(j,_e)|0,r=r+Math.imul(ne,se)|0,h=h+Math.imul(ne,_e)|0,o=o+Math.imul(W,Me)|0,r=r+Math.imul(W,Ee)|0,r=r+Math.imul(Y,Me)|0,h=h+Math.imul(Y,Ee)|0,o=o+Math.imul(K,Ie)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(A,Ie)|0,h=h+Math.imul(A,ke)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(z,ce),r=Math.imul(z,we),r=r+Math.imul(C,ce)|0,h=Math.imul(C,we),o=o+Math.imul(Se,qe)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,$e)|0,r=r+Math.imul(xe,Be)|0,h=h+Math.imul(xe,$e)|0,o=o+Math.imul(ve,H)|0,r=r+Math.imul(ve,P)|0,r=r+Math.imul(ge,H)|0,h=h+Math.imul(ge,P)|0,o=o+Math.imul(me,J)|0,r=r+Math.imul(me,fe)|0,r=r+Math.imul(he,J)|0,h=h+Math.imul(he,fe)|0,o=o+Math.imul(le,se)|0,r=r+Math.imul(le,_e)|0,r=r+Math.imul(de,se)|0,h=h+Math.imul(de,_e)|0,o=o+Math.imul(j,Me)|0,r=r+Math.imul(j,Ee)|0,r=r+Math.imul(ne,Me)|0,h=h+Math.imul(ne,Ee)|0,o=o+Math.imul(W,Ie)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(Y,Ie)|0,h=h+Math.imul(Y,ke)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(z,qe),r=Math.imul(z,Te),r=r+Math.imul(C,qe)|0,h=Math.imul(C,Te),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,$e)|0,r=r+Math.imul(Ae,Be)|0,h=h+Math.imul(Ae,$e)|0,o=o+Math.imul(ye,H)|0,r=r+Math.imul(ye,P)|0,r=r+Math.imul(xe,H)|0,h=h+Math.imul(xe,P)|0,o=o+Math.imul(ve,J)|0,r=r+Math.imul(ve,fe)|0,r=r+Math.imul(ge,J)|0,h=h+Math.imul(ge,fe)|0,o=o+Math.imul(me,se)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(he,se)|0,h=h+Math.imul(he,_e)|0,o=o+Math.imul(le,Me)|0,r=r+Math.imul(le,Ee)|0,r=r+Math.imul(de,Me)|0,h=h+Math.imul(de,Ee)|0,o=o+Math.imul(j,Ie)|0,r=r+Math.imul(j,ke)|0,r=r+Math.imul(ne,Ie)|0,h=h+Math.imul(ne,ke)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(z,Be),r=Math.imul(z,$e),r=r+Math.imul(C,Be)|0,h=Math.imul(C,$e),o=o+Math.imul(Se,H)|0,r=r+Math.imul(Se,P)|0,r=r+Math.imul(Ae,H)|0,h=h+Math.imul(Ae,P)|0,o=o+Math.imul(ye,J)|0,r=r+Math.imul(ye,fe)|0,r=r+Math.imul(xe,J)|0,h=h+Math.imul(xe,fe)|0,o=o+Math.imul(ve,se)|0,r=r+Math.imul(ve,_e)|0,r=r+Math.imul(ge,se)|0,h=h+Math.imul(ge,_e)|0,o=o+Math.imul(me,Me)|0,r=r+Math.imul(me,Ee)|0,r=r+Math.imul(he,Me)|0,h=h+Math.imul(he,Ee)|0,o=o+Math.imul(le,Ie)|0,r=r+Math.imul(le,ke)|0,r=r+Math.imul(de,Ie)|0,h=h+Math.imul(de,ke)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(z,H),r=Math.imul(z,P),r=r+Math.imul(C,H)|0,h=Math.imul(C,P),o=o+Math.imul(Se,J)|0,r=r+Math.imul(Se,fe)|0,r=r+Math.imul(Ae,J)|0,h=h+Math.imul(Ae,fe)|0,o=o+Math.imul(ye,se)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(xe,se)|0,h=h+Math.imul(xe,_e)|0,o=o+Math.imul(ve,Me)|0,r=r+Math.imul(ve,Ee)|0,r=r+Math.imul(ge,Me)|0,h=h+Math.imul(ge,Ee)|0,o=o+Math.imul(me,Ie)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(he,Ie)|0,h=h+Math.imul(he,ke)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(z,J),r=Math.imul(z,fe),r=r+Math.imul(C,J)|0,h=Math.imul(C,fe),o=o+Math.imul(Se,se)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ae,se)|0,h=h+Math.imul(Ae,_e)|0,o=o+Math.imul(ye,Me)|0,r=r+Math.imul(ye,Ee)|0,r=r+Math.imul(xe,Me)|0,h=h+Math.imul(xe,Ee)|0,o=o+Math.imul(ve,Ie)|0,r=r+Math.imul(ve,ke)|0,r=r+Math.imul(ge,Ie)|0,h=h+Math.imul(ge,ke)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(z,se),r=Math.imul(z,_e),r=r+Math.imul(C,se)|0,h=Math.imul(C,_e),o=o+Math.imul(Se,Me)|0,r=r+Math.imul(Se,Ee)|0,r=r+Math.imul(Ae,Me)|0,h=h+Math.imul(Ae,Ee)|0,o=o+Math.imul(ye,Ie)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(xe,Ie)|0,h=h+Math.imul(xe,ke)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(z,Me),r=Math.imul(z,Ee),r=r+Math.imul(C,Me)|0,h=Math.imul(C,Ee),o=o+Math.imul(Se,Ie)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ae,Ie)|0,h=h+Math.imul(Ae,ke)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(z,Ie),r=Math.imul(z,ke),r=r+Math.imul(C,Ie)|0,h=Math.imul(C,ke);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=We,u[1]=Ge,u[2]=Ve,u[3]=Ke,u[4]=Ze,u[5]=Ye,u[6]=Xe,u[7]=Je,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(B=q);function $(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,M=c.words[h]|0,T=e.words[r]|0,N=M*T,Q=N&67108863;u=u+(N/67108864|0)|0,Q=Q+l|0,l=Q&67108863,u=u+(Q>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function k(c,e,t){var n=new I;return n.mulp(c,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=B(this,e,t):f<63?n=q(this,e,t):f<1024?n=$(this,e,t):n=k(this,e,t),n};function I(c,e){this.x=c,this.y=e}I.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,f=0;f<e;f++)t[f]=this.revBin(f,n,e);return t},I.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var f=0,s=0;s<t;s++)f|=(e&1)<<t-s-1,e>>=1;return f},I.prototype.permute=function(e,t,n,f,s,u){for(var l=0;l<u;l++)f[l]=t[e[l]],s[l]=n[e[l]]},I.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),M=0;M<s;M+=o)for(var T=r,N=h,Q=0;Q<l;Q++){var K=n[M+Q],A=f[M+Q],O=n[M+Q+l],W=f[M+Q+l],Y=T*O-N*W;W=T*W+N*O,O=Y,n[M+Q]=K+O,f[M+Q]=A+W,n[M+Q+l]=K-O,f[M+Q+l]=A-W,Q!==o&&(Y=r*T-h*N,N=r*N+h*T,T=Y)}},I.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,f=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+f},I.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var f=0;f<n/2;f++){var s=e[f];e[f]=e[n-f-1],e[n-f-1]=s,s=t[f],t[f]=-t[n-f-1],t[n-f-1]=-s}},I.prototype.normalize13b=function(e,t){for(var n=0,f=0;f<t/2;f++){var s=Math.round(e[2*f+1]/t)*8192+Math.round(e[2*f]/t)+n;e[f]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},I.prototype.convert13b=function(e,t,n,f){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<f;++u)n[u]=0;p(s===0),p((s&-8192)===0)},I.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},I.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),l=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),M=new Array(f),T=new Array(f),N=n.words;N.length=f,this.convert13b(e.words,e.length,l,f),this.convert13b(t.words,t.length,h,f),this.transform(l,u,o,r,f,s),this.transform(h,u,M,T,f,s);for(var Q=0;Q<f;Q++){var K=o[Q]*M[Q]-r[Q]*T[Q];r[Q]=o[Q]*T[Q]+r[Q]*M[Q],o[Q]=K}return this.conjugate(o,r,f),this.transform(o,r,N,u,f,s),this.conjugate(N,u,f),this.normalize13b(N,f),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),k(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var f=(this.words[n]|0)*e,s=(f&67108863)+(t&67108863);t>>=26,t+=f/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=R(e);if(t.length===0)return new a(1);for(var n=this,f=0;f<t.length&&t[f]===0;f++,n=n.sqr());if(++f<t.length)for(var s=n.sqr();f<t.length;f++,s=s.sqr())t[f]!==0&&(n=n.mul(s));return n},a.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&f,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var f;t?f=(t-t%26)/26:f=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(f-=u,f=Math.max(0,f),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=f);r--){var M=this.words[r]|0;this.words[r]=h<<26-s|M>>>s,h=M&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&f)},a.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var f=67108863^67108863>>>t<<t;this.words[this.length-1]&=f}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var f=e.length+n,s;this._expand(f);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,f=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),f.iushln(n),u=s.words[s.length-1]|0);var o=f.length-s.length,r;if(t!=="mod"){r=new a(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var M=f.clone()._ishlnsubmul(s,1,o);M.negative===0&&(f=M,r&&(r.words[o]=1));for(var T=o-1;T>=0;T--){var N=(f.words[s.length+T]|0)*67108864+(f.words[s.length+T-1]|0);for(N=Math.min(N/u|0,67108863),f._ishlnsubmul(s,N,T);f.negative!==0;)N--,f.negative=0,f._ishlnsubmul(s,1,T),f.isZero()||(f.negative^=1);r&&(r.words[T]=N)}return r&&r.strip(),f.strip(),t!=="div"&&n!==0&&f.iushrn(n),{div:r||null,mod:f}},a.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var f,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(f=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:f,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(f=u.div.neg()),{div:f,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,f=e.ushrn(1),s=e.andln(1),u=n.cmp(f);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,f=this.length-1;f>=0;f--)n=(t*n+(this.words[f]|0))%e;return n},a.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var f=(this.words[n]|0)+t*67108864;this.words[n]=f/e|0,t=f%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=new a(0),l=new a(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var M=0,T=1;(t.words[0]&T)===0&&M<26;++M,T<<=1);if(M>0)for(t.iushrn(M);M-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var N=0,Q=1;(n.words[0]&Q)===0&&N<26;++N,Q<<=1);if(N>0)for(n.iushrn(N);N-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(l)):(n.isub(t),u.isub(f),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},a.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)f.isOdd()&&f.iadd(u),f.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(s)):(n.isub(t),s.isub(f))}var M;return t.cmpn(1)===0?M=f:M=s,M.cmpn(0)<0&&M.iadd(e),M},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var f=0;t.isEven()&&n.isEven();f++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(f)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=f,this;for(var s=f,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var f=this.words[0]|0;n=f===e?0:f<e?-1:1}return this.negative!==0?-n|0:n},a.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var f=this.words[n]|0,s=e.words[n]|0;if(f!==s){f<s?t=-1:f>s&&(t=1);break}}return t},a.prototype.gtn=function(e){return this.cmpn(e)===1},a.prototype.gt=function(e){return this.cmp(e)===1},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return this.cmpn(e)===0},a.prototype.eq=function(e){return this.cmp(e)===0},a.red=function(e){return new ee(e)},a.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var L={k256:null,p224:null,p192:null,p25519:null};function D(c,e){this.name=c,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},D.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var f=n<this.n?-1:t.ucmp(this.p);return f===0?(t.words[0]=0,t.length=1):f>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},D.prototype.split=function(e,t){e.iushrn(this.n,0,t)},D.prototype.imulK=function(e){return e.imul(this.k)};function G(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}E(G,D),G.prototype.split=function(e,t){for(var n=4194303,f=Math.min(e.length,9),s=0;s<f;s++)t.words[s]=e.words[s];if(t.length=f,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},G.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var f=e.words[n]|0;t+=f*977,e.words[n]=t&67108863,t=f*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function X(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}E(X,D);function te(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}E(te,D);function ie(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}E(ie,D),ie.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var f=(e.words[n]|0)*19+t,s=f&67108863;f>>>=26,e.words[n]=s,t=f}return t!==0&&(e.words[e.length++]=t),e},a._prime=function(e){if(L[e])return L[e];var t;if(e==="k256")t=new G;else if(e==="p224")t=new X;else if(e==="p192")t=new te;else if(e==="p25519")t=new ie;else throw new Error("Unknown prime "+e);return L[e]=t,t};function ee(c){if(typeof c=="string"){var e=a._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var f=this.m.subn(1),s=0;!f.isZero()&&f.andln(1)===0;)s++,f.iushrn(1);p(!f.isZero());var u=new a(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,f),M=this.pow(e,f.addn(1).iushrn(1)),T=this.pow(e,f),N=s;T.cmp(u)!==0;){for(var Q=T,K=0;Q.cmp(u)!==0;K++)Q=Q.redSqr();p(K<N);var A=this.pow(h,new a(1).iushln(N-K-1));M=M.redMul(A),h=A.redSqr(),T=T.redMul(h),N=K}return M},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,f=new Array(1<<n);f[0]=new a(1).toRed(this),f[1]=e;for(var s=2;s<f.length;s++)f[s]=this.mul(f[s-1],e);var u=f[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],M=r-1;M>=0;M--){var T=h>>M&1;if(u!==f[0]&&(u=this.sqr(u)),T===0&&l===0){o=0;continue}l<<=1,l|=T,o++,!(o!==n&&(s!==0||M!==0))&&(u=this.mul(u,f[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new ue(e)};function ue(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}E(ue,ee),ue.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},ue.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},ue.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(b,bn$4)})(bn$5)),bn$5.exports}var api$1={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,(function(exports$1){var indexOf=function(b,_){if(b.indexOf)return b.indexOf(_);for(var S=0;S<b.length;S++)if(b[S]===_)return S;return-1},Object_keys=function(b){if(Object.keys)return Object.keys(b);var _=[];for(var S in b)_.push(S);return _},forEach=function(b,_){if(b.forEach)return b.forEach(_);for(var S=0;S<b.length;S++)_(b[S],S,b)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(b,_,S){Object.defineProperty(b,_,{writable:!0,enumerable:!1,configurable:!0,value:S})}}catch{return function(_,S,p){_[S]=p}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports$1.Script=function(_){if(!(this instanceof Script))return new Script(_);this.code=_};Script.prototype.runInContext=function(b){if(!(b instanceof Context))throw new TypeError("needs a 'context' argument.");var _=document.createElement("iframe");_.style||(_.style={}),_.style.display="none",document.body.appendChild(_);var S=_.contentWindow,p=S.eval,E=S.execScript;!p&&E&&(E.call(S,"null"),p=S.eval),forEach(Object_keys(b),function(v){S[v]=b[v]}),forEach(globals,function(v){b[v]&&(S[v]=b[v])});var a=Object_keys(S),w=p.call(S,this.code);return forEach(Object_keys(S),function(v){(v in b||indexOf(a,v)===-1)&&(b[v]=S[v])}),forEach(globals,function(v){v in b||defineProp(b,v,S[v])}),document.body.removeChild(_),w},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(b){var _=Script.createContext(b),S=this.runInContext(_);return b&&forEach(Object_keys(_),function(p){b[p]=_[p]}),S},forEach(Object_keys(Script.prototype),function(b){exports$1[b]=Script[b]=function(_){var S=Script(_);return S[b].apply(S,[].slice.call(arguments,1))}}),exports$1.isContext=function(b){return b instanceof Context},exports$1.createScript=function(b){return exports$1.Script(b)},exports$1.createContext=Script.createContext=function(b){var _=new Context;return typeof b=="object"&&forEach(Object_keys(b),function(S){_[S]=b[S]}),_}})(vmBrowserify)),vmBrowserify}var hasRequiredApi;function requireApi(){return hasRequiredApi||(hasRequiredApi=1,(function(b){var _=requireAsn1$1(),S=requireInherits_browser$8(),p=b;p.define=function(w,v){return new E(w,v)};function E(a,w){this.name=a,this.body=w,this.decoders={},this.encoders={}}E.prototype._createNamed=function(w){var v;try{v=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) {
|
|
7
|
+
`).map(function(X){return" "+X}).join(`
|
|
8
|
+
`))):W=b.stylize("[Circular]","special")),ne(P)){if(q&&K.match(/^\d+$/))return W;P=JSON.stringify(""+K),P.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(P=P.slice(1,-1),P=b.stylize(P,"name")):(P=P.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),P=b.stylize(P,"string"))}return P+": "+W}function A(b,E,L){var Y=b.reduce(function(K,q){return q.indexOf(`
|
|
9
|
+
`)>=0,K+q.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Y>60?L[0]+(E===""?"":E+`
|
|
10
|
+
`)+" "+b.join(`,
|
|
11
|
+
`)+" "+L[1]:L[0]+E+" "+b.join(", ")+" "+L[1]}_.types=requireTypes();function D(b){return Array.isArray(b)}_.isArray=D;function C(b){return typeof b=="boolean"}_.isBoolean=C;function $(b){return b===null}_.isNull=$;function H(b){return b==null}_.isNullOrUndefined=H;function N(b){return typeof b=="number"}_.isNumber=N;function V(b){return typeof b=="string"}_.isString=V;function Q(b){return typeof b=="symbol"}_.isSymbol=Q;function ne(b){return b===void 0}_.isUndefined=ne;function ae(b){return ee(b)&&n(b)==="[object RegExp]"}_.isRegExp=ae,_.types.isRegExp=ae;function ee(b){return typeof b=="object"&&b!==null}_.isObject=ee;function le(b){return ee(b)&&n(b)==="[object Date]"}_.isDate=le,_.types.isDate=le;function c(b){return ee(b)&&(n(b)==="[object Error]"||b instanceof Error)}_.isError=c,_.types.isNativeError=c;function e(b){return typeof b=="function"}_.isFunction=e;function t(b){return b===null||typeof b=="boolean"||typeof b=="number"||typeof b=="string"||typeof b=="symbol"||typeof b>"u"}_.isPrimitive=t,_.isBuffer=requireIsBufferBrowser();function n(b){return Object.prototype.toString.call(b)}function a(b){return b<10?"0"+b.toString(10):b.toString(10)}var s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u(){var b=new Date,E=[a(b.getHours()),a(b.getMinutes()),a(b.getSeconds())].join(":");return[b.getDate(),s[b.getMonth()],E].join(" ")}_.log=function(){console.log("%s - %s",u(),_.format.apply(_,arguments))},_.inherits=requireInherits_browser(),_._extend=function(b,E){if(!E||!ee(E))return b;for(var L=Object.keys(E),Y=L.length;Y--;)b[L[Y]]=E[L[Y]];return b};function l(b,E){return Object.prototype.hasOwnProperty.call(b,E)}var o=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;_.promisify=function(E){if(typeof E!="function")throw new TypeError('The "original" argument must be of type Function');if(o&&E[o]){var L=E[o];if(typeof L!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,o,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var Y,K,q=new Promise(function(J,X){Y=J,K=X}),P=[],W=0;W<arguments.length;W++)P.push(arguments[W]);P.push(function(J,X){J?K(J):Y(X)});try{E.apply(this,P)}catch(J){K(J)}return q}return Object.setPrototypeOf(L,Object.getPrototypeOf(E)),o&&Object.defineProperty(L,o,{value:L,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(L,S(E))},_.promisify.custom=o;function r(b,E){if(!b){var L=new Error("Promise was rejected with a falsy value");L.reason=b,b=L}return E(b)}function h(b){if(typeof b!="function")throw new TypeError('The "original" argument must be of type Function');function E(){for(var L=[],Y=0;Y<arguments.length;Y++)L.push(arguments[Y]);var K=L.pop();if(typeof K!="function")throw new TypeError("The last argument must be of type Function");var q=this,P=function(){return K.apply(q,arguments)};b.apply(this,L).then(function(W){process$1.nextTick(P.bind(null,null,W))},function(W){process$1.nextTick(r.bind(null,W,P))})}return Object.setPrototypeOf(E,Object.getPrototypeOf(b)),Object.defineProperties(E,S(b)),E}_.callbackify=h})(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function _(B,A){var D=Object.keys(B);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(B);A&&(C=C.filter(function($){return Object.getOwnPropertyDescriptor(B,$).enumerable})),D.push.apply(D,C)}return D}function S(B){for(var A=1;A<arguments.length;A++){var D=arguments[A]!=null?arguments[A]:{};A%2?_(Object(D),!0).forEach(function(C){I(B,C,D[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(D)):_(Object(D)).forEach(function(C){Object.defineProperty(B,C,Object.getOwnPropertyDescriptor(D,C))})}return B}function I(B,A,D){return A=w(A),A in B?Object.defineProperty(B,A,{value:D,enumerable:!0,configurable:!0,writable:!0}):B[A]=D,B}function p(B,A){if(!(B instanceof A))throw new TypeError("Cannot call a class as a function")}function R(B,A){for(var D=0;D<A.length;D++){var C=A[D];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(B,w(C.key),C)}}function f(B,A,D){return A&&R(B.prototype,A),Object.defineProperty(B,"prototype",{writable:!1}),B}function w(B){var A=m(B,"string");return typeof A=="symbol"?A:String(A)}function m(B,A){if(typeof B!="object"||B===null)return B;var D=B[Symbol.toPrimitive];if(D!==void 0){var C=D.call(B,A);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)}var v=requireDist(),y=v.Buffer,d=requireUtil$1(),g=d.inspect,M=g&&g.custom||"inspect";function x(B,A,D){y.prototype.copy.call(B,A,D)}return buffer_list=(function(){function B(){p(this,B),this.head=null,this.tail=null,this.length=0}return f(B,[{key:"push",value:function(D){var C={data:D,next:null};this.length>0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(D){var C={data:D,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var D=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,D}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(D){if(this.length===0)return"";for(var C=this.head,$=""+C.data;C=C.next;)$+=D+C.data;return $}},{key:"concat",value:function(D){if(this.length===0)return y.alloc(0);for(var C=y.allocUnsafe(D>>>0),$=this.head,H=0;$;)x($.data,C,H),H+=$.data.length,$=$.next;return C}},{key:"consume",value:function(D,C){var $;return D<this.head.data.length?($=this.head.data.slice(0,D),this.head.data=this.head.data.slice(D)):D===this.head.data.length?$=this.shift():$=C?this._getString(D):this._getBuffer(D),$}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(D){var C=this.head,$=1,H=C.data;for(D-=H.length;C=C.next;){var N=C.data,V=D>N.length?N.length:D;if(V===N.length?H+=N:H+=N.slice(0,D),D-=V,D===0){V===N.length?(++$,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=N.slice(V));break}++$}return this.length-=$,H}},{key:"_getBuffer",value:function(D){var C=y.allocUnsafe(D),$=this.head,H=1;for($.data.copy(C),D-=$.data.length;$=$.next;){var N=$.data,V=D>N.length?N.length:D;if(N.copy(C,C.length-D,0,V),D-=V,D===0){V===N.length?(++H,$.next?this.head=$.next:this.head=this.tail=null):(this.head=$,$.data=N.slice(V));break}++H}return this.length-=H,C}},{key:M,value:function(D,C){return g(this,S(S({},C),{},{depth:0,customInspect:!1}))}}]),B})(),buffer_list}var destroy_1$2,hasRequiredDestroy$2;function requireDestroy$2(){if(hasRequiredDestroy$2)return destroy_1$2;hasRequiredDestroy$2=1;function _(w,m){var v=this,y=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return y||d?(m?m(w):w&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(R,this,w)):process$1.nextTick(R,this,w)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(w||null,function(g){!m&&g?v._writableState?v._writableState.errorEmitted?process$1.nextTick(I,v):(v._writableState.errorEmitted=!0,process$1.nextTick(S,v,g)):process$1.nextTick(S,v,g):m?(process$1.nextTick(I,v),m(g)):process$1.nextTick(I,v)}),this)}function S(w,m){R(w,m),I(w)}function I(w){w._writableState&&!w._writableState.emitClose||w._readableState&&!w._readableState.emitClose||w.emit("close")}function p(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function R(w,m){w.emit("error",m)}function f(w,m){var v=w._readableState,y=w._writableState;v&&v.autoDestroy||y&&y.autoDestroy?w.destroy(m):w.emit("error",m)}return destroy_1$2={destroy:_,undestroy:p,errorOrDestroy:f},destroy_1$2}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function _(m,v){m.prototype=Object.create(v.prototype),m.prototype.constructor=m,m.__proto__=v}var S={};function I(m,v,y){y||(y=Error);function d(M,x,B){return typeof v=="string"?v:v(M,x,B)}var g=(function(M){_(x,M);function x(B,A,D){return M.call(this,d(B,A,D))||this}return x})(y);g.prototype.name=y.name,g.prototype.code=m,S[m]=g}function p(m,v){if(Array.isArray(m)){var y=m.length;return m=m.map(function(d){return String(d)}),y>2?"one of ".concat(v," ").concat(m.slice(0,y-1).join(", "),", or ")+m[y-1]:y===2?"one of ".concat(v," ").concat(m[0]," or ").concat(m[1]):"of ".concat(v," ").concat(m[0])}else return"of ".concat(v," ").concat(String(m))}function R(m,v,y){return m.substr(0,v.length)===v}function f(m,v,y){return(y===void 0||y>m.length)&&(y=m.length),m.substring(y-v.length,y)===v}function w(m,v,y){return typeof y!="number"&&(y=0),y+v.length>m.length?!1:m.indexOf(v,y)!==-1}return I("ERR_INVALID_OPT_VALUE",function(m,v){return'The value "'+v+'" is invalid for option "'+m+'"'},TypeError),I("ERR_INVALID_ARG_TYPE",function(m,v,y){var d;typeof v=="string"&&R(v,"not ")?(d="must not be",v=v.replace(/^not /,"")):d="must be";var g;if(f(m," argument"))g="The ".concat(m," ").concat(d," ").concat(p(v,"type"));else{var M=w(m,".")?"property":"argument";g='The "'.concat(m,'" ').concat(M," ").concat(d," ").concat(p(v,"type"))}return g+=". Received type ".concat(typeof y),g},TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" after a stream was destroyed"}),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",function(m){return"Unknown encoding: "+m},TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=S,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var _=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function S(p,R,f){return p.highWaterMark!=null?p.highWaterMark:R?p[f]:null}function I(p,R,f,w){var m=S(R,w,f);if(m!=null){if(!(isFinite(m)&&Math.floor(m)===m)||m<0){var v=w?f:"highWaterMark";throw new _(v,m)}return Math.floor(m)}return p.objectMode?16:16*1024}return state={getHighWaterMark:I},state}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1,browser$a=_;function _(I,p){if(S("noDeprecation"))return I;var R=!1;function f(){if(!R){if(S("throwDeprecation"))throw new Error(p);S("traceDeprecation")?console.trace(p):console.warn(p),R=!0}return I.apply(this,arguments)}return f}function S(I){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var p=commonjsGlobal.localStorage[I];return p==null?!1:String(p).toLowerCase()==="true"}return browser$a}var _stream_writable$2,hasRequired_stream_writable$2;function require_stream_writable$2(){if(hasRequired_stream_writable$2)return _stream_writable$2;hasRequired_stream_writable$2=1,_stream_writable$2=ae;function _(K){var q=this;this.next=null,this.entry=null,this.finish=function(){Y(q,K)}}var S;ae.WritableState=Q;var I={deprecate:requireBrowser$a()},p=requireStreamBrowser$2(),R=requireDist().Buffer,f=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function w(K){return R.from(K)}function m(K){return R.isBuffer(K)||K instanceof f}var v=requireDestroy$2(),y=requireState(),d=y.getHighWaterMark,g=requireErrorsBrowser().codes,M=g.ERR_INVALID_ARG_TYPE,x=g.ERR_METHOD_NOT_IMPLEMENTED,B=g.ERR_MULTIPLE_CALLBACK,A=g.ERR_STREAM_CANNOT_PIPE,D=g.ERR_STREAM_DESTROYED,C=g.ERR_STREAM_NULL_VALUES,$=g.ERR_STREAM_WRITE_AFTER_END,H=g.ERR_UNKNOWN_ENCODING,N=v.errorOrDestroy;requireInherits_browser()(ae,p);function V(){}function Q(K,q,P){S=S||require_stream_duplex$2(),K=K||{},typeof P!="boolean"&&(P=q instanceof S),this.objectMode=!!K.objectMode,P&&(this.objectMode=this.objectMode||!!K.writableObjectMode),this.highWaterMark=d(this,K,"writableHighWaterMark",P),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W=K.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=K.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){s(q,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=K.emitClose!==!1,this.autoDestroy=!!K.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}Q.prototype.getBuffer=function(){for(var q=this.bufferedRequest,P=[];q;)P.push(q),q=q.next;return P},(function(){try{Object.defineProperty(Q.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(ae,Symbol.hasInstance,{value:function(q){return ne.call(this,q)?!0:this!==ae?!1:q&&q._writableState instanceof Q}})):ne=function(q){return q instanceof this};function ae(K){S=S||require_stream_duplex$2();var q=this instanceof S;if(!q&&!ne.call(ae,this))return new ae(K);this._writableState=new Q(K,this,q),this.writable=!0,K&&(typeof K.write=="function"&&(this._write=K.write),typeof K.writev=="function"&&(this._writev=K.writev),typeof K.destroy=="function"&&(this._destroy=K.destroy),typeof K.final=="function"&&(this._final=K.final)),p.call(this)}ae.prototype.pipe=function(){N(this,new A)};function ee(K,q){var P=new $;N(K,P),process$1.nextTick(q,P)}function le(K,q,P,W){var J;return P===null?J=new C:typeof P!="string"&&!q.objectMode&&(J=new M("chunk",["string","Buffer"],P)),J?(N(K,J),process$1.nextTick(W,J),!1):!0}ae.prototype.write=function(K,q,P){var W=this._writableState,J=!1,X=!W.objectMode&&m(K);return X&&!R.isBuffer(K)&&(K=w(K)),typeof q=="function"&&(P=q,q=null),X?q="buffer":q||(q=W.defaultEncoding),typeof P!="function"&&(P=V),W.ending?ee(this,P):(X||le(this,W,K,P))&&(W.pendingcb++,J=e(this,W,X,K,q,P)),J},ae.prototype.cork=function(){this._writableState.corked++},ae.prototype.uncork=function(){var K=this._writableState;K.corked&&(K.corked--,!K.writing&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&o(this,K))},ae.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new H(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(ae.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c(K,q,P){return!K.objectMode&&K.decodeStrings!==!1&&typeof q=="string"&&(q=R.from(q,P)),q}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function e(K,q,P,W,J,X){if(!P){var U=c(q,W,J);W!==U&&(P=!0,J="buffer",W=U)}var re=q.objectMode?1:W.length;q.length+=re;var Ie=q.length<q.highWaterMark;if(Ie||(q.needDrain=!0),q.writing||q.corked){var ue=q.lastBufferedRequest;q.lastBufferedRequest={chunk:W,encoding:J,isBuf:P,callback:X,next:null},ue?ue.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else t(K,q,!1,re,W,J,X);return Ie}function t(K,q,P,W,J,X,U){q.writelen=W,q.writecb=U,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new D("write")):P?K._writev(J,q.onwrite):K._write(J,X,q.onwrite),q.sync=!1}function n(K,q,P,W,J){--q.pendingcb,P?(process$1.nextTick(J,W),process$1.nextTick(E,K,q),K._writableState.errorEmitted=!0,N(K,W)):(J(W),K._writableState.errorEmitted=!0,N(K,W),E(K,q))}function a(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}function s(K,q){var P=K._writableState,W=P.sync,J=P.writecb;if(typeof J!="function")throw new B;if(a(P),q)n(K,P,W,q,J);else{var X=r(P)||K.destroyed;!X&&!P.corked&&!P.bufferProcessing&&P.bufferedRequest&&o(K,P),W?process$1.nextTick(u,K,P,X,J):u(K,P,X,J)}}function u(K,q,P,W){P||l(K,q),q.pendingcb--,W(),E(K,q)}function l(K,q){q.length===0&&q.needDrain&&(q.needDrain=!1,K.emit("drain"))}function o(K,q){q.bufferProcessing=!0;var P=q.bufferedRequest;if(K._writev&&P&&P.next){var W=q.bufferedRequestCount,J=new Array(W),X=q.corkedRequestsFree;X.entry=P;for(var U=0,re=!0;P;)J[U]=P,P.isBuf||(re=!1),P=P.next,U+=1;J.allBuffers=re,t(K,q,!0,q.length,J,"",X.finish),q.pendingcb++,q.lastBufferedRequest=null,X.next?(q.corkedRequestsFree=X.next,X.next=null):q.corkedRequestsFree=new _(q),q.bufferedRequestCount=0}else{for(;P;){var Ie=P.chunk,ue=P.encoding,he=P.callback,$e=q.objectMode?1:Ie.length;if(t(K,q,!1,$e,Ie,ue,he),P=P.next,q.bufferedRequestCount--,q.writing)break}P===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=P,q.bufferProcessing=!1}ae.prototype._write=function(K,q,P){P(new x("_write()"))},ae.prototype._writev=null,ae.prototype.end=function(K,q,P){var W=this._writableState;return typeof K=="function"?(P=K,K=null,q=null):typeof q=="function"&&(P=q,q=null),K!=null&&this.write(K,q),W.corked&&(W.corked=1,this.uncork()),W.ending||L(this,W,P),this},Object.defineProperty(ae.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function r(K){return K.ending&&K.length===0&&K.bufferedRequest===null&&!K.finished&&!K.writing}function h(K,q){K._final(function(P){q.pendingcb--,P&&N(K,P),q.prefinished=!0,K.emit("prefinish"),E(K,q)})}function b(K,q){!q.prefinished&&!q.finalCalled&&(typeof K._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,process$1.nextTick(h,K,q)):(q.prefinished=!0,K.emit("prefinish")))}function E(K,q){var P=r(q);if(P&&(b(K,q),q.pendingcb===0&&(q.finished=!0,K.emit("finish"),q.autoDestroy))){var W=K._readableState;(!W||W.autoDestroy&&W.endEmitted)&&K.destroy()}return P}function L(K,q,P){q.ending=!0,E(K,q),P&&(q.finished?process$1.nextTick(P):K.once("finish",P)),q.ended=!0,K.writable=!1}function Y(K,q,P){var W=K.entry;for(K.entry=null;W;){var J=W.callback;q.pendingcb--,J(P),W=W.next}q.corkedRequestsFree.next=K}return Object.defineProperty(ae.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),ae.prototype.destroy=v.destroy,ae.prototype._undestroy=v.undestroy,ae.prototype._destroy=function(K,q){q(K)},_stream_writable$2}var _stream_duplex$2,hasRequired_stream_duplex$2;function require_stream_duplex$2(){if(hasRequired_stream_duplex$2)return _stream_duplex$2;hasRequired_stream_duplex$2=1;var _=Object.keys||function(y){var d=[];for(var g in y)d.push(g);return d};_stream_duplex$2=w;var S=require_stream_readable$2(),I=require_stream_writable$2();requireInherits_browser()(w,S);for(var p=_(I.prototype),R=0;R<p.length;R++){var f=p[R];w.prototype[f]||(w.prototype[f]=I.prototype[f])}function w(y){if(!(this instanceof w))return new w(y);S.call(this,y),I.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",m)))}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function m(){this._writableState.ended||process$1.nextTick(v,this)}function v(y){y.end()}return Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),_stream_duplex$2}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var _=requireSafeBuffer$2().Buffer,S=_.isEncoding||function(C){switch(C=""+C,C&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function I(C){if(!C)return"utf8";for(var $;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if($)return;C=(""+C).toLowerCase(),$=!0}}function p(C){var $=I(C);if(typeof $!="string"&&(_.isEncoding===S||!S(C)))throw new Error("Unknown encoding: "+C);return $||C}string_decoder.StringDecoder=R;function R(C){this.encoding=p(C);var $;switch(this.encoding){case"utf16le":this.text=g,this.end=M,$=4;break;case"utf8":this.fillLast=v,$=4;break;case"base64":this.text=x,this.end=B,$=3;break;default:this.write=A,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe($)}R.prototype.write=function(C){if(C.length===0)return"";var $,H;if(this.lastNeed){if($=this.fillLast(C),$===void 0)return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H<C.length?$?$+this.text(C,H):this.text(C,H):$||""},R.prototype.end=d,R.prototype.text=y,R.prototype.fillLast=function(C){if(this.lastNeed<=C.length)return C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,C.length),this.lastNeed-=C.length};function f(C){return C<=127?0:C>>5===6?2:C>>4===14?3:C>>3===30?4:C>>6===2?-1:-2}function w(C,$,H){var N=$.length-1;if(N<H)return 0;var V=f($[N]);return V>=0?(V>0&&(C.lastNeed=V-1),V):--N<H||V===-2?0:(V=f($[N]),V>=0?(V>0&&(C.lastNeed=V-2),V):--N<H||V===-2?0:(V=f($[N]),V>=0?(V>0&&(V===2?V=0:C.lastNeed=V-3),V):0))}function m(C,$,H){if(($[0]&192)!==128)return C.lastNeed=0,"�";if(C.lastNeed>1&&$.length>1){if(($[1]&192)!==128)return C.lastNeed=1,"�";if(C.lastNeed>2&&$.length>2&&($[2]&192)!==128)return C.lastNeed=2,"�"}}function v(C){var $=this.lastTotal-this.lastNeed,H=m(this,C);if(H!==void 0)return H;if(this.lastNeed<=C.length)return C.copy(this.lastChar,$,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,$,0,C.length),this.lastNeed-=C.length}function y(C,$){var H=w(this,C,$);if(!this.lastNeed)return C.toString("utf8",$);this.lastTotal=H;var N=C.length-(H-this.lastNeed);return C.copy(this.lastChar,0,N),C.toString("utf8",$,N)}function d(C){var $=C&&C.length?this.write(C):"";return this.lastNeed?$+"�":$}function g(C,$){if((C.length-$)%2===0){var H=C.toString("utf16le",$);if(H){var N=H.charCodeAt(H.length-1);if(N>=55296&&N<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",$,C.length-1)}function M(C){var $=C&&C.length?this.write(C):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return $+this.lastChar.toString("utf16le",0,H)}return $}function x(C,$){var H=(C.length-$)%3;return H===0?C.toString("base64",$):(this.lastNeed=3-H,this.lastTotal=3,H===1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",$,C.length-H))}function B(C){var $=C&&C.length?this.write(C):"";return this.lastNeed?$+this.lastChar.toString("base64",0,3-this.lastNeed):$}function A(C){return C.toString(this.encoding)}function D(C){return C&&C.length?this.write(C):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var _=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function S(f){var w=!1;return function(){if(!w){w=!0;for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];f.apply(this,v)}}}function I(){}function p(f){return f.setHeader&&typeof f.abort=="function"}function R(f,w,m){if(typeof w=="function")return R(f,null,w);w||(w={}),m=S(m||I);var v=w.readable||w.readable!==!1&&f.readable,y=w.writable||w.writable!==!1&&f.writable,d=function(){f.writable||M()},g=f._writableState&&f._writableState.finished,M=function(){y=!1,g=!0,v||m.call(f)},x=f._readableState&&f._readableState.endEmitted,B=function(){v=!1,x=!0,y||m.call(f)},A=function(H){m.call(f,H)},D=function(){var H;if(v&&!x)return(!f._readableState||!f._readableState.ended)&&(H=new _),m.call(f,H);if(y&&!g)return(!f._writableState||!f._writableState.ended)&&(H=new _),m.call(f,H)},C=function(){f.req.on("finish",M)};return p(f)?(f.on("complete",M),f.on("abort",D),f.req?C():f.on("request",C)):y&&!f._writableState&&(f.on("end",d),f.on("close",d)),f.on("end",B),f.on("finish",M),w.error!==!1&&f.on("error",A),f.on("close",D),function(){f.removeListener("complete",M),f.removeListener("abort",D),f.removeListener("request",C),f.req&&f.req.removeListener("finish",M),f.removeListener("end",d),f.removeListener("close",d),f.removeListener("finish",M),f.removeListener("end",B),f.removeListener("error",A),f.removeListener("close",D)}}return endOfStream=R,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var _;function S(H,N,V){return N=I(N),N in H?Object.defineProperty(H,N,{value:V,enumerable:!0,configurable:!0,writable:!0}):H[N]=V,H}function I(H){var N=p(H,"string");return typeof N=="symbol"?N:String(N)}function p(H,N){if(typeof H!="object"||H===null)return H;var V=H[Symbol.toPrimitive];if(V!==void 0){var Q=V.call(H,N);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(H)}var R=requireEndOfStream(),f=Symbol("lastResolve"),w=Symbol("lastReject"),m=Symbol("error"),v=Symbol("ended"),y=Symbol("lastPromise"),d=Symbol("handlePromise"),g=Symbol("stream");function M(H,N){return{value:H,done:N}}function x(H){var N=H[f];if(N!==null){var V=H[g].read();V!==null&&(H[y]=null,H[f]=null,H[w]=null,N(M(V,!1)))}}function B(H){process$1.nextTick(x,H)}function A(H,N){return function(V,Q){H.then(function(){if(N[v]){V(M(void 0,!0));return}N[d](V,Q)},Q)}}var D=Object.getPrototypeOf(function(){}),C=Object.setPrototypeOf((_={get stream(){return this[g]},next:function(){var N=this,V=this[m];if(V!==null)return Promise.reject(V);if(this[v])return Promise.resolve(M(void 0,!0));if(this[g].destroyed)return new Promise(function(ee,le){process$1.nextTick(function(){N[m]?le(N[m]):ee(M(void 0,!0))})});var Q=this[y],ne;if(Q)ne=new Promise(A(Q,this));else{var ae=this[g].read();if(ae!==null)return Promise.resolve(M(ae,!1));ne=new Promise(this[d])}return this[y]=ne,ne}},S(_,Symbol.asyncIterator,function(){return this}),S(_,"return",function(){var N=this;return new Promise(function(V,Q){N[g].destroy(null,function(ne){if(ne){Q(ne);return}V(M(void 0,!0))})})}),_),D),$=function(N){var V,Q=Object.create(C,(V={},S(V,g,{value:N,writable:!0}),S(V,f,{value:null,writable:!0}),S(V,w,{value:null,writable:!0}),S(V,m,{value:null,writable:!0}),S(V,v,{value:N._readableState.endEmitted,writable:!0}),S(V,d,{value:function(ae,ee){var le=Q[g].read();le?(Q[y]=null,Q[f]=null,Q[w]=null,ae(M(le,!1))):(Q[f]=ae,Q[w]=ee)},writable:!0}),V));return Q[y]=null,R(N,function(ne){if(ne&&ne.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ae=Q[w];ae!==null&&(Q[y]=null,Q[f]=null,Q[w]=null,ae(ne)),Q[m]=ne;return}var ee=Q[f];ee!==null&&(Q[y]=null,Q[f]=null,Q[w]=null,ee(M(void 0,!0))),Q[v]=!0}),N.on("readable",B.bind(null,Q)),Q};return async_iterator=$,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$2,hasRequired_stream_readable$2;function require_stream_readable$2(){if(hasRequired_stream_readable$2)return _stream_readable$2;hasRequired_stream_readable$2=1,_stream_readable$2=ee;var _;ee.ReadableState=ae,requireEvents().EventEmitter;var S=function(U,re){return U.listeners(re).length},I=requireStreamBrowser$2(),p=requireDist().Buffer,R=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(X){return p.from(X)}function w(X){return p.isBuffer(X)||X instanceof R}var m=requireUtil$1(),v;m&&m.debuglog?v=m.debuglog("stream"):v=function(){};var y=requireBuffer_list(),d=requireDestroy$2(),g=requireState(),M=g.getHighWaterMark,x=requireErrorsBrowser().codes,B=x.ERR_INVALID_ARG_TYPE,A=x.ERR_STREAM_PUSH_AFTER_EOF,D=x.ERR_METHOD_NOT_IMPLEMENTED,C=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,$,H,N;requireInherits_browser()(ee,I);var V=d.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ne(X,U,re){if(typeof X.prependListener=="function")return X.prependListener(U,re);!X._events||!X._events[U]?X.on(U,re):Array.isArray(X._events[U])?X._events[U].unshift(re):X._events[U]=[re,X._events[U]]}function ae(X,U,re){_=_||require_stream_duplex$2(),X=X||{},typeof re!="boolean"&&(re=U instanceof _),this.objectMode=!!X.objectMode,re&&(this.objectMode=this.objectMode||!!X.readableObjectMode),this.highWaterMark=M(this,X,"readableHighWaterMark",re),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=X.emitClose!==!1,this.autoDestroy=!!X.autoDestroy,this.destroyed=!1,this.defaultEncoding=X.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,X.encoding&&($||($=requireString_decoder().StringDecoder),this.decoder=new $(X.encoding),this.encoding=X.encoding)}function ee(X){if(_=_||require_stream_duplex$2(),!(this instanceof ee))return new ee(X);var U=this instanceof _;this._readableState=new ae(X,this,U),this.readable=!0,X&&(typeof X.read=="function"&&(this._read=X.read),typeof X.destroy=="function"&&(this._destroy=X.destroy)),I.call(this)}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(U){this._readableState&&(this._readableState.destroyed=U)}}),ee.prototype.destroy=d.destroy,ee.prototype._undestroy=d.undestroy,ee.prototype._destroy=function(X,U){U(X)},ee.prototype.push=function(X,U){var re=this._readableState,Ie;return re.objectMode?Ie=!0:typeof X=="string"&&(U=U||re.defaultEncoding,U!==re.encoding&&(X=p.from(X,U),U=""),Ie=!0),le(this,X,U,!1,Ie)},ee.prototype.unshift=function(X){return le(this,X,null,!0,!1)};function le(X,U,re,Ie,ue){v("readableAddChunk",U);var he=X._readableState;if(U===null)he.reading=!1,s(X,he);else{var $e;if(ue||($e=e(he,U)),$e)V(X,$e);else if(he.objectMode||U&&U.length>0)if(typeof U!="string"&&!he.objectMode&&Object.getPrototypeOf(U)!==p.prototype&&(U=f(U)),Ie)he.endEmitted?V(X,new C):c(X,he,U,!0);else if(he.ended)V(X,new A);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!re?(U=he.decoder.write(U),he.objectMode||U.length!==0?c(X,he,U,!1):o(X,he)):c(X,he,U,!1)}else Ie||(he.reading=!1,o(X,he))}return!he.ended&&(he.length<he.highWaterMark||he.length===0)}function c(X,U,re,Ie){U.flowing&&U.length===0&&!U.sync?(U.awaitDrain=0,X.emit("data",re)):(U.length+=U.objectMode?1:re.length,Ie?U.buffer.unshift(re):U.buffer.push(re),U.needReadable&&u(X)),o(X,U)}function e(X,U){var re;return!w(U)&&typeof U!="string"&&U!==void 0&&!X.objectMode&&(re=new B("chunk",["string","Buffer","Uint8Array"],U)),re}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(X){$||($=requireString_decoder().StringDecoder);var U=new $(X);this._readableState.decoder=U,this._readableState.encoding=this._readableState.decoder.encoding;for(var re=this._readableState.buffer.head,Ie="";re!==null;)Ie+=U.write(re.data),re=re.next;return this._readableState.buffer.clear(),Ie!==""&&this._readableState.buffer.push(Ie),this._readableState.length=Ie.length,this};var t=1073741824;function n(X){return X>=t?X=t:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X}function a(X,U){return X<=0||U.length===0&&U.ended?0:U.objectMode?1:X!==X?U.flowing&&U.length?U.buffer.head.data.length:U.length:(X>U.highWaterMark&&(U.highWaterMark=n(X)),X<=U.length?X:U.ended?U.length:(U.needReadable=!0,0))}ee.prototype.read=function(X){v("read",X),X=parseInt(X,10);var U=this._readableState,re=X;if(X!==0&&(U.emittedReadable=!1),X===0&&U.needReadable&&((U.highWaterMark!==0?U.length>=U.highWaterMark:U.length>0)||U.ended))return v("read: emitReadable",U.length,U.ended),U.length===0&&U.ended?P(this):u(this),null;if(X=a(X,U),X===0&&U.ended)return U.length===0&&P(this),null;var Ie=U.needReadable;v("need readable",Ie),(U.length===0||U.length-X<U.highWaterMark)&&(Ie=!0,v("length less than watermark",Ie)),U.ended||U.reading?(Ie=!1,v("reading or ended",Ie)):Ie&&(v("do read"),U.reading=!0,U.sync=!0,U.length===0&&(U.needReadable=!0),this._read(U.highWaterMark),U.sync=!1,U.reading||(X=a(re,U)));var ue;return X>0?ue=q(X,U):ue=null,ue===null?(U.needReadable=U.length<=U.highWaterMark,X=0):(U.length-=X,U.awaitDrain=0),U.length===0&&(U.ended||(U.needReadable=!0),re!==X&&U.ended&&P(this)),ue!==null&&this.emit("data",ue),ue};function s(X,U){if(v("onEofChunk"),!U.ended){if(U.decoder){var re=U.decoder.end();re&&re.length&&(U.buffer.push(re),U.length+=U.objectMode?1:re.length)}U.ended=!0,U.sync?u(X):(U.needReadable=!1,U.emittedReadable||(U.emittedReadable=!0,l(X)))}}function u(X){var U=X._readableState;v("emitReadable",U.needReadable,U.emittedReadable),U.needReadable=!1,U.emittedReadable||(v("emitReadable",U.flowing),U.emittedReadable=!0,process$1.nextTick(l,X))}function l(X){var U=X._readableState;v("emitReadable_",U.destroyed,U.length,U.ended),!U.destroyed&&(U.length||U.ended)&&(X.emit("readable"),U.emittedReadable=!1),U.needReadable=!U.flowing&&!U.ended&&U.length<=U.highWaterMark,K(X)}function o(X,U){U.readingMore||(U.readingMore=!0,process$1.nextTick(r,X,U))}function r(X,U){for(;!U.reading&&!U.ended&&(U.length<U.highWaterMark||U.flowing&&U.length===0);){var re=U.length;if(v("maybeReadMore read 0"),X.read(0),re===U.length)break}U.readingMore=!1}ee.prototype._read=function(X){V(this,new D("_read()"))},ee.prototype.pipe=function(X,U){var re=this,Ie=this._readableState;switch(Ie.pipesCount){case 0:Ie.pipes=X;break;case 1:Ie.pipes=[Ie.pipes,X];break;default:Ie.pipes.push(X);break}Ie.pipesCount+=1,v("pipe count=%d opts=%j",Ie.pipesCount,U);var ue=(!U||U.end!==!1)&&X!==process$1.stdout&&X!==process$1.stderr,he=ue?me:Ue;Ie.endEmitted?process$1.nextTick(he):re.once("end",he),X.on("unpipe",$e);function $e(xe,Ae){v("onunpipe"),xe===re&&Ae&&Ae.hasUnpiped===!1&&(Ae.hasUnpiped=!0,de())}function me(){v("onend"),X.end()}var se=h(re);X.on("drain",se);var De=!1;function de(){v("cleanup"),X.removeListener("close",pe),X.removeListener("finish",_e),X.removeListener("drain",se),X.removeListener("error",Ce),X.removeListener("unpipe",$e),re.removeListener("end",me),re.removeListener("end",Ue),re.removeListener("data",ye),De=!0,Ie.awaitDrain&&(!X._writableState||X._writableState.needDrain)&&se()}re.on("data",ye);function ye(xe){v("ondata");var Ae=X.write(xe);v("dest.write",Ae),Ae===!1&&((Ie.pipesCount===1&&Ie.pipes===X||Ie.pipesCount>1&&J(Ie.pipes,X)!==-1)&&!De&&(v("false write response, pause",Ie.awaitDrain),Ie.awaitDrain++),re.pause())}function Ce(xe){v("onerror",xe),Ue(),X.removeListener("error",Ce),S(X,"error")===0&&V(X,xe)}ne(X,"error",Ce);function pe(){X.removeListener("finish",_e),Ue()}X.once("close",pe);function _e(){v("onfinish"),X.removeListener("close",pe),Ue()}X.once("finish",_e);function Ue(){v("unpipe"),re.unpipe(X)}return X.emit("pipe",re),Ie.flowing||(v("pipe resume"),re.resume()),X};function h(X){return function(){var re=X._readableState;v("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&S(X,"data")&&(re.flowing=!0,K(X))}}ee.prototype.unpipe=function(X){var U=this._readableState,re={hasUnpiped:!1};if(U.pipesCount===0)return this;if(U.pipesCount===1)return X&&X!==U.pipes?this:(X||(X=U.pipes),U.pipes=null,U.pipesCount=0,U.flowing=!1,X&&X.emit("unpipe",this,re),this);if(!X){var Ie=U.pipes,ue=U.pipesCount;U.pipes=null,U.pipesCount=0,U.flowing=!1;for(var he=0;he<ue;he++)Ie[he].emit("unpipe",this,{hasUnpiped:!1});return this}var $e=J(U.pipes,X);return $e===-1?this:(U.pipes.splice($e,1),U.pipesCount-=1,U.pipesCount===1&&(U.pipes=U.pipes[0]),X.emit("unpipe",this,re),this)},ee.prototype.on=function(X,U){var re=I.prototype.on.call(this,X,U),Ie=this._readableState;return X==="data"?(Ie.readableListening=this.listenerCount("readable")>0,Ie.flowing!==!1&&this.resume()):X==="readable"&&!Ie.endEmitted&&!Ie.readableListening&&(Ie.readableListening=Ie.needReadable=!0,Ie.flowing=!1,Ie.emittedReadable=!1,v("on readable",Ie.length,Ie.reading),Ie.length?u(this):Ie.reading||process$1.nextTick(E,this)),re},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(X,U){var re=I.prototype.removeListener.call(this,X,U);return X==="readable"&&process$1.nextTick(b,this),re},ee.prototype.removeAllListeners=function(X){var U=I.prototype.removeAllListeners.apply(this,arguments);return(X==="readable"||X===void 0)&&process$1.nextTick(b,this),U};function b(X){var U=X._readableState;U.readableListening=X.listenerCount("readable")>0,U.resumeScheduled&&!U.paused?U.flowing=!0:X.listenerCount("data")>0&&X.resume()}function E(X){v("readable nexttick read 0"),X.read(0)}ee.prototype.resume=function(){var X=this._readableState;return X.flowing||(v("resume"),X.flowing=!X.readableListening,L(this,X)),X.paused=!1,this};function L(X,U){U.resumeScheduled||(U.resumeScheduled=!0,process$1.nextTick(Y,X,U))}function Y(X,U){v("resume",U.reading),U.reading||X.read(0),U.resumeScheduled=!1,X.emit("resume"),K(X),U.flowing&&!U.reading&&X.read(0)}ee.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function K(X){var U=X._readableState;for(v("flow",U.flowing);U.flowing&&X.read()!==null;);}ee.prototype.wrap=function(X){var U=this,re=this._readableState,Ie=!1;X.on("end",function(){if(v("wrapped end"),re.decoder&&!re.ended){var $e=re.decoder.end();$e&&$e.length&&U.push($e)}U.push(null)}),X.on("data",function($e){if(v("wrapped data"),re.decoder&&($e=re.decoder.write($e)),!(re.objectMode&&$e==null)&&!(!re.objectMode&&(!$e||!$e.length))){var me=U.push($e);me||(Ie=!0,X.pause())}});for(var ue in X)this[ue]===void 0&&typeof X[ue]=="function"&&(this[ue]=(function(me){return function(){return X[me].apply(X,arguments)}})(ue));for(var he=0;he<Q.length;he++)X.on(Q[he],this.emit.bind(this,Q[he]));return this._read=function($e){v("wrapped _read",$e),Ie&&(Ie=!1,X.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return H===void 0&&(H=requireAsync_iterator()),H(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(U){this._readableState&&(this._readableState.flowing=U)}}),ee._fromList=q,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q(X,U){if(U.length===0)return null;var re;return U.objectMode?re=U.buffer.shift():!X||X>=U.length?(U.decoder?re=U.buffer.join(""):U.buffer.length===1?re=U.buffer.first():re=U.buffer.concat(U.length),U.buffer.clear()):re=U.buffer.consume(X,U.decoder),re}function P(X){var U=X._readableState;v("endReadable",U.endEmitted),U.endEmitted||(U.ended=!0,process$1.nextTick(W,U,X))}function W(X,U){if(v("endReadableNT",X.endEmitted,X.length),!X.endEmitted&&X.length===0&&(X.endEmitted=!0,U.readable=!1,U.emit("end"),X.autoDestroy)){var re=U._writableState;(!re||re.autoDestroy&&re.finished)&&U.destroy()}}typeof Symbol=="function"&&(ee.from=function(X,U){return N===void 0&&(N=requireFromBrowser()),N(ee,X,U)});function J(X,U){for(var re=0,Ie=X.length;re<Ie;re++)if(X[re]===U)return re;return-1}return _stream_readable$2}var _stream_transform$2,hasRequired_stream_transform$2;function require_stream_transform$2(){if(hasRequired_stream_transform$2)return _stream_transform$2;hasRequired_stream_transform$2=1,_stream_transform$2=m;var _=requireErrorsBrowser().codes,S=_.ERR_METHOD_NOT_IMPLEMENTED,I=_.ERR_MULTIPLE_CALLBACK,p=_.ERR_TRANSFORM_ALREADY_TRANSFORMING,R=_.ERR_TRANSFORM_WITH_LENGTH_0,f=require_stream_duplex$2();requireInherits_browser()(m,f);function w(d,g){var M=this._transformState;M.transforming=!1;var x=M.writecb;if(x===null)return this.emit("error",new I);M.writechunk=null,M.writecb=null,g!=null&&this.push(g),x(d);var B=this._readableState;B.reading=!1,(B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}function m(d){if(!(this instanceof m))return new m(d);f.call(this,d),this._transformState={afterTransform:w.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",v)}function v(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,M){y(d,g,M)}):y(this,null,null)}m.prototype.push=function(d,g){return this._transformState.needTransform=!1,f.prototype.push.call(this,d,g)},m.prototype._transform=function(d,g,M){M(new S("_transform()"))},m.prototype._write=function(d,g,M){var x=this._transformState;if(x.writecb=M,x.writechunk=d,x.writeencoding=g,!x.transforming){var B=this._readableState;(x.needTransform||B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}},m.prototype._read=function(d){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},m.prototype._destroy=function(d,g){f.prototype._destroy.call(this,d,function(M){g(M)})};function y(d,g,M){if(g)return d.emit("error",g);if(M!=null&&d.push(M),d._writableState.length)throw new R;if(d._transformState.transforming)throw new p;return d.push(null)}return _stream_transform$2}var _stream_passthrough$2,hasRequired_stream_passthrough$2;function require_stream_passthrough$2(){if(hasRequired_stream_passthrough$2)return _stream_passthrough$2;hasRequired_stream_passthrough$2=1,_stream_passthrough$2=S;var _=require_stream_transform$2();requireInherits_browser()(S,_);function S(I){if(!(this instanceof S))return new S(I);_.call(this,I)}return S.prototype._transform=function(I,p,R){R(null,I)},_stream_passthrough$2}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var _;function S(M){var x=!1;return function(){x||(x=!0,M.apply(void 0,arguments))}}var I=requireErrorsBrowser().codes,p=I.ERR_MISSING_ARGS,R=I.ERR_STREAM_DESTROYED;function f(M){if(M)throw M}function w(M){return M.setHeader&&typeof M.abort=="function"}function m(M,x,B,A){A=S(A);var D=!1;M.on("close",function(){D=!0}),_===void 0&&(_=requireEndOfStream()),_(M,{readable:x,writable:B},function($){if($)return A($);D=!0,A()});var C=!1;return function($){if(!D&&!C){if(C=!0,w(M))return M.abort();if(typeof M.destroy=="function")return M.destroy();A($||new R("pipe"))}}}function v(M){M()}function y(M,x){return M.pipe(x)}function d(M){return!M.length||typeof M[M.length-1]!="function"?f:M.pop()}function g(){for(var M=arguments.length,x=new Array(M),B=0;B<M;B++)x[B]=arguments[B];var A=d(x);if(Array.isArray(x[0])&&(x=x[0]),x.length<2)throw new p("streams");var D,C=x.map(function($,H){var N=H<x.length-1,V=H>0;return m($,N,V,function(Q){D||(D=Q),Q&&C.forEach(v),!N&&(C.forEach(v),A(D))})});return x.reduce(y)}return pipeline_1=g,pipeline_1}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=I;var _=requireEvents().EventEmitter,S=requireInherits_browser();S(I,_),I.Readable=require_stream_readable$2(),I.Writable=require_stream_writable$2(),I.Duplex=require_stream_duplex$2(),I.Transform=require_stream_transform$2(),I.PassThrough=require_stream_passthrough$2(),I.finished=requireEndOfStream(),I.pipeline=requirePipeline(),I.Stream=I;function I(){_.call(this)}return I.prototype.pipe=function(p,R){var f=this;function w(x){p.writable&&p.write(x)===!1&&f.pause&&f.pause()}f.on("data",w);function m(){f.readable&&f.resume&&f.resume()}p.on("drain",m),!p._isStdio&&(!R||R.end!==!1)&&(f.on("end",y),f.on("close",d));var v=!1;function y(){v||(v=!0,p.end())}function d(){v||(v=!0,typeof p.destroy=="function"&&p.destroy())}function g(x){if(M(),_.listenerCount(this,"error")===0)throw x}f.on("error",g),p.on("error",g);function M(){f.removeListener("data",w),p.removeListener("drain",m),f.removeListener("end",y),f.removeListener("close",d),f.removeListener("error",g),p.removeListener("error",g),f.removeListener("end",M),f.removeListener("close",M),p.removeListener("close",M)}return f.on("end",M),f.on("close",M),p.on("close",M),p.emit("pipe",f),p},streamBrowserify}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var _=requireSafeBuffer$2().Buffer,S=requireStreamBrowserify().Transform,I=requireInherits_browser();function p(m){S.call(this),this._block=_.allocUnsafe(m),this._blockSize=m,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}I(p,S),p.prototype._transform=function(m,v,y){var d=null;try{this.update(m,v)}catch(g){d=g}y(d)},p.prototype._flush=function(m){var v=null;try{this.push(this.digest())}catch(y){v=y}m(v)};var R=typeof Uint8Array<"u",f=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(_.prototype instanceof Uint8Array||_.TYPED_ARRAY_SUPPORT);function w(m,v){if(m instanceof _)return m;if(typeof m=="string")return _.from(m,v);if(f&&ArrayBuffer.isView(m)){if(m.byteLength===0)return _.alloc(0);var y=_.from(m.buffer,m.byteOffset,m.byteLength);if(y.byteLength===m.byteLength)return y}if(R&&m instanceof Uint8Array||_.isBuffer(m)&&m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m))return _.from(m);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return p.prototype.update=function(m,v){if(this._finalized)throw new Error("Digest already called");m=w(m,v);for(var y=this._block,d=0;this._blockOffset+m.length-d>=this._blockSize;){for(var g=this._blockOffset;g<this._blockSize;)y[g++]=m[d++];this._update(),this._blockOffset=0}for(;d<m.length;)y[this._blockOffset++]=m[d++];for(var M=0,x=m.length*8;x>0;++M)this._length[M]+=x,x=this._length[M]/4294967296|0,x>0&&(this._length[M]-=4294967296*x);return this},p.prototype._update=function(){throw new Error("_update is not implemented")},p.prototype.digest=function(m){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var v=this._digest();m!==void 0&&(v=v.toString(m)),this._block.fill(0),this._blockOffset=0;for(var y=0;y<4;++y)this._length[y]=0;return v},p.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=p,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var _=requireInherits_browser(),S=requireHashBase$1(),I=requireSafeBuffer$2().Buffer,p=new Array(16);function R(){S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}_(R,S),R.prototype._update=function(){for(var d=p,g=0;g<16;++g)d[g]=this._block.readInt32LE(g*4);var M=this._a,x=this._b,B=this._c,A=this._d;M=w(M,x,B,A,d[0],3614090360,7),A=w(A,M,x,B,d[1],3905402710,12),B=w(B,A,M,x,d[2],606105819,17),x=w(x,B,A,M,d[3],3250441966,22),M=w(M,x,B,A,d[4],4118548399,7),A=w(A,M,x,B,d[5],1200080426,12),B=w(B,A,M,x,d[6],2821735955,17),x=w(x,B,A,M,d[7],4249261313,22),M=w(M,x,B,A,d[8],1770035416,7),A=w(A,M,x,B,d[9],2336552879,12),B=w(B,A,M,x,d[10],4294925233,17),x=w(x,B,A,M,d[11],2304563134,22),M=w(M,x,B,A,d[12],1804603682,7),A=w(A,M,x,B,d[13],4254626195,12),B=w(B,A,M,x,d[14],2792965006,17),x=w(x,B,A,M,d[15],1236535329,22),M=m(M,x,B,A,d[1],4129170786,5),A=m(A,M,x,B,d[6],3225465664,9),B=m(B,A,M,x,d[11],643717713,14),x=m(x,B,A,M,d[0],3921069994,20),M=m(M,x,B,A,d[5],3593408605,5),A=m(A,M,x,B,d[10],38016083,9),B=m(B,A,M,x,d[15],3634488961,14),x=m(x,B,A,M,d[4],3889429448,20),M=m(M,x,B,A,d[9],568446438,5),A=m(A,M,x,B,d[14],3275163606,9),B=m(B,A,M,x,d[3],4107603335,14),x=m(x,B,A,M,d[8],1163531501,20),M=m(M,x,B,A,d[13],2850285829,5),A=m(A,M,x,B,d[2],4243563512,9),B=m(B,A,M,x,d[7],1735328473,14),x=m(x,B,A,M,d[12],2368359562,20),M=v(M,x,B,A,d[5],4294588738,4),A=v(A,M,x,B,d[8],2272392833,11),B=v(B,A,M,x,d[11],1839030562,16),x=v(x,B,A,M,d[14],4259657740,23),M=v(M,x,B,A,d[1],2763975236,4),A=v(A,M,x,B,d[4],1272893353,11),B=v(B,A,M,x,d[7],4139469664,16),x=v(x,B,A,M,d[10],3200236656,23),M=v(M,x,B,A,d[13],681279174,4),A=v(A,M,x,B,d[0],3936430074,11),B=v(B,A,M,x,d[3],3572445317,16),x=v(x,B,A,M,d[6],76029189,23),M=v(M,x,B,A,d[9],3654602809,4),A=v(A,M,x,B,d[12],3873151461,11),B=v(B,A,M,x,d[15],530742520,16),x=v(x,B,A,M,d[2],3299628645,23),M=y(M,x,B,A,d[0],4096336452,6),A=y(A,M,x,B,d[7],1126891415,10),B=y(B,A,M,x,d[14],2878612391,15),x=y(x,B,A,M,d[5],4237533241,21),M=y(M,x,B,A,d[12],1700485571,6),A=y(A,M,x,B,d[3],2399980690,10),B=y(B,A,M,x,d[10],4293915773,15),x=y(x,B,A,M,d[1],2240044497,21),M=y(M,x,B,A,d[8],1873313359,6),A=y(A,M,x,B,d[15],4264355552,10),B=y(B,A,M,x,d[6],2734768916,15),x=y(x,B,A,M,d[13],1309151649,21),M=y(M,x,B,A,d[4],4149444226,6),A=y(A,M,x,B,d[11],3174756917,10),B=y(B,A,M,x,d[2],718787259,15),x=y(x,B,A,M,d[9],3951481745,21),this._a=this._a+M|0,this._b=this._b+x|0,this._c=this._c+B|0,this._d=this._d+A|0},R.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var d=I.allocUnsafe(16);return d.writeInt32LE(this._a,0),d.writeInt32LE(this._b,4),d.writeInt32LE(this._c,8),d.writeInt32LE(this._d,12),d};function f(d,g){return d<<g|d>>>32-g}function w(d,g,M,x,B,A,D){return f(d+(g&M|~g&x)+B+A|0,D)+g|0}function m(d,g,M,x,B,A,D){return f(d+(g&x|M&~x)+B+A|0,D)+g|0}function v(d,g,M,x,B,A,D){return f(d+(g^M^x)+B+A|0,D)+g|0}function y(d,g,M,x,B,A,D){return f(d+(M^(g|~x))+B+A|0,D)+g|0}return md5_js=R,md5_js}var isarray$2,hasRequiredIsarray$2;function requireIsarray$2(){if(hasRequiredIsarray$2)return isarray$2;hasRequiredIsarray$2=1;var _={}.toString;return isarray$2=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray$2}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var _=requireType(),S=requireCallBound(),I=S("TypedArray.prototype.buffer",!0),p=requireIsTypedArray();return typedArrayBuffer=I||function(f){if(!p(f))throw new _("Not a Typed Array");return f.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$2;function requireToBuffer$2(){if(hasRequiredToBuffer$2)return toBuffer;hasRequiredToBuffer$2=1;var _=requireSafeBuffer$2().Buffer,S=requireIsarray$2(),I=requireTypedArrayBuffer(),p=ArrayBuffer.isView||function(v){try{return I(v),!0}catch{return!1}},R=typeof Uint8Array<"u",f=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",w=f&&(_.prototype instanceof Uint8Array||_.TYPED_ARRAY_SUPPORT);return toBuffer=function(v,y){if(_.isBuffer(v))return v.constructor&&!("isBuffer"in v)?_.from(v):v;if(typeof v=="string")return _.from(v,y);if(f&&p(v)){if(v.byteLength===0)return _.alloc(0);if(w){var d=_.from(v.buffer,v.byteOffset,v.byteLength);if(d.byteLength===v.byteLength)return d}var g=v instanceof Uint8Array?v:new Uint8Array(v.buffer,v.byteOffset,v.byteLength),M=_.from(g);if(M.length===v.byteLength)return M}if(R&&v instanceof Uint8Array)return _.from(v);var x=S(v);if(x)for(var B=0;B<v.length;B+=1){var A=v[B];if(typeof A!="number"||A<0||A>255||~~A!==A)throw new RangeError("Array items must be numbers in the range 0-255.")}if(x||_.isBuffer(v)&&v.constructor&&typeof v.constructor.isBuffer=="function"&&v.constructor.isBuffer(v))return _.from(v);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var toBuffer_1$1,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer_1$1;hasRequiredToBuffer$1=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2(),I=typeof Uint8Array<"u",p=I&&typeof ArrayBuffer<"u",R=p&&ArrayBuffer.isView;return toBuffer_1$1=function(f,w){if(typeof f=="string"||_.isBuffer(f)||I&&f instanceof Uint8Array||R&&R(f))return S(f,w);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')},toBuffer_1$1}var readableBrowser$1={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;hasRequiredProcessNextickArgs=1,typeof process$1>"u"||!process$1.version||process$1.version.indexOf("v0.")===0||process$1.version.indexOf("v1.")===0&&process$1.version.indexOf("v1.8.")!==0?processNextickArgs.exports={nextTick:_}:processNextickArgs.exports=process$1;function _(S,I,p,R){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var f=arguments.length,w,m;switch(f){case 0:case 1:return process$1.nextTick(S);case 2:return process$1.nextTick(function(){S.call(null,I)});case 3:return process$1.nextTick(function(){S.call(null,I,p)});case 4:return process$1.nextTick(function(){S.call(null,I,p,R)});default:for(w=new Array(f-1),m=0;m<w.length;)w[m++]=arguments[m];return process$1.nextTick(function(){S.apply(null,w)})}}return processNextickArgs.exports}var isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var _={}.toString;return isarray$1=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray$1}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var safeBuffer$1={exports:{}},hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function _(A){return Array.isArray?Array.isArray(A):B(A)==="[object Array]"}util.isArray=_;function S(A){return typeof A=="boolean"}util.isBoolean=S;function I(A){return A===null}util.isNull=I;function p(A){return A==null}util.isNullOrUndefined=p;function R(A){return typeof A=="number"}util.isNumber=R;function f(A){return typeof A=="string"}util.isString=f;function w(A){return typeof A=="symbol"}util.isSymbol=w;function m(A){return A===void 0}util.isUndefined=m;function v(A){return B(A)==="[object RegExp]"}util.isRegExp=v;function y(A){return typeof A=="object"&&A!==null}util.isObject=y;function d(A){return B(A)==="[object Date]"}util.isDate=d;function g(A){return B(A)==="[object Error]"||A instanceof Error}util.isError=g;function M(A){return typeof A=="function"}util.isFunction=M;function x(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A>"u"}util.isPrimitive=x,util.isBuffer=requireDist().Buffer.isBuffer;function B(A){return Object.prototype.toString.call(A)}return util}var BufferList$1={exports:{}},hasRequiredBufferList$1;function requireBufferList$1(){return hasRequiredBufferList$1||(hasRequiredBufferList$1=1,(function(_){function S(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}var I=requireSafeBuffer$1().Buffer,p=requireUtil$1();function R(f,w,m){f.copy(w,m)}_.exports=(function(){function f(){S(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(m){var v={data:m,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},f.prototype.unshift=function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},f.prototype.shift=function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(m){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=m+v.data;return y},f.prototype.concat=function(m){if(this.length===0)return I.alloc(0);for(var v=I.allocUnsafe(m>>>0),y=this.head,d=0;y;)R(y.data,v,d),d+=y.data.length,y=y.next;return v},f})(),p&&p.inspect&&p.inspect.custom&&(_.exports.prototype[p.inspect.custom]=function(){var f=p.inspect({length:this.length});return this.constructor.name+" "+f})})(BufferList$1)),BufferList$1.exports}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;var _=requireProcessNextickArgs();function S(R,f){var w=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(f?f(R):R&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(p,this,R)):_.nextTick(p,this,R)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(R||null,function(y){!f&&y?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,_.nextTick(p,w,y)):_.nextTick(p,w,y):f&&f(y)}),this)}function I(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(R,f){R.emit("error",f)}return destroy_1$1={destroy:S,undestroy:I},destroy_1$1}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1;var _=requireProcessNextickArgs();_stream_writable$1=A;function S(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var I=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:_.nextTick,p;A.WritableState=x;var R=Object.create(requireUtil());R.inherits=requireInherits_browser();var f={deprecate:requireBrowser$a()},w=requireStreamBrowser$1(),m=requireSafeBuffer$1().Buffer,v=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y(u){return m.from(u)}function d(u){return m.isBuffer(u)||u instanceof v}var g=requireDestroy$1();R.inherits(A,w);function M(){}function x(u,l){p=p||require_stream_duplex$1(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,b=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=b,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var E=u.decodeStrings===!1;this.decodeStrings=!E,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){ne(l,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}x.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(x.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(u){return B.call(this,u)?!0:this!==A?!1:u&&u._writableState instanceof x}})):B=function(u){return u instanceof this};function A(u){if(p=p||require_stream_duplex$1(),!B.call(A,this)&&!(this instanceof p))return new A(u);this._writableState=new x(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function D(u,l){var o=new Error("write after end");u.emit("error",o),_.nextTick(l,o)}function C(u,l,o,r){var h=!0,b=!1;return o===null?b=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(b=new TypeError("Invalid non-string/buffer chunk")),b&&(u.emit("error",b),_.nextTick(r,b),h=!1),h}A.prototype.write=function(u,l,o){var r=this._writableState,h=!1,b=!r.objectMode&&d(u);return b&&!m.isBuffer(u)&&(u=y(u)),typeof l=="function"&&(o=l,l=null),b?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=M),r.ended?D(this,o):(b||C(this,r,u,o))&&(r.pendingcb++,h=H(this,r,b,u,l,o)),h},A.prototype.cork=function(){var u=this._writableState;u.corked++},A.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&le(this,u))},A.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function $(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=m.from(l,o)),l}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(u,l,o,r,h,b){if(!o){var E=$(l,r,h);r!==E&&(o=!0,h="buffer",r=E)}var L=l.objectMode?1:r.length;l.length+=L;var Y=l.length<l.highWaterMark;if(Y||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:b,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else N(u,l,!1,L,r,h,b);return Y}function N(u,l,o,r,h,b,E){l.writelen=r,l.writecb=E,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,b,l.onwrite),l.sync=!1}function V(u,l,o,r,h){--l.pendingcb,o?(_.nextTick(h,r),_.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),l)V(u,o,r,l,h);else{var b=c(o);!b&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&le(u,o),r?I(ae,u,o,b,h):ae(u,o,b,h)}}function ae(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function le(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),b=l.corkedRequestsFree;b.entry=o;for(var E=0,L=!0;o;)h[E]=o,o.isBuf||(L=!1),o=o.next,E+=1;h.allBuffers=L,N(u,l,!0,l.length,h,"",b.finish),l.pendingcb++,l.lastBufferedRequest=null,b.next?(l.corkedRequestsFree=b.next,b.next=null):l.corkedRequestsFree=new S(l),l.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,K=o.encoding,q=o.callback,P=l.objectMode?1:Y.length;if(N(u,l,!1,P,Y,K,q),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}A.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||a(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,_.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function a(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?_.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var _=requireProcessNextickArgs(),S=Object.keys||function(g){var M=[];for(var x in g)M.push(x);return M};_stream_duplex$1=v;var I=Object.create(requireUtil());I.inherits=requireInherits_browser();var p=require_stream_readable$1(),R=require_stream_writable$1();I.inherits(v,p);for(var f=S(R.prototype),w=0;w<f.length;w++){var m=f[w];v.prototype[m]||(v.prototype[m]=R.prototype[m])}function v(g){if(!(this instanceof v))return new v(g);p.call(this,g),R.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||_.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),v.prototype._destroy=function(g,M){this.push(null),this.end(),_.nextTick(M,g)},_stream_duplex$1}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1;var _=requireProcessNextickArgs();_stream_readable$1=$;var S=requireIsarray$1(),I;$.ReadableState=C,requireEvents().EventEmitter;var p=function(q,P){return q.listeners(P).length},R=requireStreamBrowser$1(),f=requireSafeBuffer$1().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(q){return f.from(q)}function v(q){return f.isBuffer(q)||q instanceof w}var y=Object.create(requireUtil());y.inherits=requireInherits_browser();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var M=requireBufferList$1(),x=requireDestroy$1(),B;y.inherits($,R);var A=["error","close","destroy","pause","resume"];function D(q,P,W){if(typeof q.prependListener=="function")return q.prependListener(P,W);!q._events||!q._events[P]?q.on(P,W):S(q._events[P])?q._events[P].unshift(W):q._events[P]=[W,q._events[P]]}function C(q,P){I=I||require_stream_duplex$1(),q=q||{};var W=P instanceof I;this.objectMode=!!q.objectMode,W&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var J=q.highWaterMark,X=q.readableHighWaterMark,U=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:W&&(X||X===0)?this.highWaterMark=X:this.highWaterMark=U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(B||(B=requireString_decoder().StringDecoder),this.decoder=new B(q.encoding),this.encoding=q.encoding)}function $(q){if(I=I||require_stream_duplex$1(),!(this instanceof $))return new $(q);this._readableState=new C(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),R.call(this)}Object.defineProperty($.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),$.prototype.destroy=x.destroy,$.prototype._undestroy=x.undestroy,$.prototype._destroy=function(q,P){this.push(null),P(q)},$.prototype.push=function(q,P){var W=this._readableState,J;return W.objectMode?J=!0:typeof q=="string"&&(P=P||W.defaultEncoding,P!==W.encoding&&(q=f.from(q,P),P=""),J=!0),H(this,q,P,!1,J)},$.prototype.unshift=function(q){return H(this,q,null,!0,!1)};function H(q,P,W,J,X){var U=q._readableState;if(P===null)U.reading=!1,le(q,U);else{var re;X||(re=V(U,P)),re?q.emit("error",re):U.objectMode||P&&P.length>0?(typeof P!="string"&&!U.objectMode&&Object.getPrototypeOf(P)!==f.prototype&&(P=m(P)),J?U.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):N(q,U,P,!0):U.ended?q.emit("error",new Error("stream.push() after EOF")):(U.reading=!1,U.decoder&&!W?(P=U.decoder.write(P),U.objectMode||P.length!==0?N(q,U,P,!1):t(q,U)):N(q,U,P,!1))):J||(U.reading=!1)}return Q(U)}function N(q,P,W,J){P.flowing&&P.length===0&&!P.sync?(q.emit("data",W),q.read(0)):(P.length+=P.objectMode?1:W.length,J?P.buffer.unshift(W):P.buffer.push(W),P.needReadable&&c(q)),t(q,P)}function V(q,P){var W;return!v(P)&&typeof P!="string"&&P!==void 0&&!q.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function Q(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(q){return B||(B=requireString_decoder().StringDecoder),this._readableState.decoder=new B(q),this._readableState.encoding=q,this};var ne=8388608;function ae(q){return q>=ne?q=ne:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function ee(q,P){return q<=0||P.length===0&&P.ended?0:P.objectMode?1:q!==q?P.flowing&&P.length?P.buffer.head.data.length:P.length:(q>P.highWaterMark&&(P.highWaterMark=ae(q)),q<=P.length?q:P.ended?P.length:(P.needReadable=!0,0))}$.prototype.read=function(q){g("read",q),q=parseInt(q,10);var P=this._readableState,W=q;if(q!==0&&(P.emittedReadable=!1),q===0&&P.needReadable&&(P.length>=P.highWaterMark||P.ended))return g("read: emitReadable",P.length,P.ended),P.length===0&&P.ended?L(this):c(this),null;if(q=ee(q,P),q===0&&P.ended)return P.length===0&&L(this),null;var J=P.needReadable;g("need readable",J),(P.length===0||P.length-q<P.highWaterMark)&&(J=!0,g("length less than watermark",J)),P.ended||P.reading?(J=!1,g("reading or ended",J)):J&&(g("do read"),P.reading=!0,P.sync=!0,P.length===0&&(P.needReadable=!0),this._read(P.highWaterMark),P.sync=!1,P.reading||(q=ee(W,P)));var X;return q>0?X=r(q,P):X=null,X===null?(P.needReadable=!0,q=0):P.length-=q,P.length===0&&(P.ended||(P.needReadable=!0),W!==q&&P.ended&&L(this)),X!==null&&this.emit("data",X),X};function le(q,P){if(!P.ended){if(P.decoder){var W=P.decoder.end();W&&W.length&&(P.buffer.push(W),P.length+=P.objectMode?1:W.length)}P.ended=!0,c(q)}}function c(q){var P=q._readableState;P.needReadable=!1,P.emittedReadable||(g("emitReadable",P.flowing),P.emittedReadable=!0,P.sync?_.nextTick(e,q):e(q))}function e(q){g("emit readable"),q.emit("readable"),o(q)}function t(q,P){P.readingMore||(P.readingMore=!0,_.nextTick(n,q,P))}function n(q,P){for(var W=P.length;!P.reading&&!P.flowing&&!P.ended&&P.length<P.highWaterMark&&(g("maybeReadMore read 0"),q.read(0),W!==P.length);)W=P.length;P.readingMore=!1}$.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},$.prototype.pipe=function(q,P){var W=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=q;break;case 1:J.pipes=[J.pipes,q];break;default:J.pipes.push(q);break}J.pipesCount+=1,g("pipe count=%d opts=%j",J.pipesCount,P);var X=(!P||P.end!==!1)&&q!==process$1.stdout&&q!==process$1.stderr,U=X?Ie:Ce;J.endEmitted?_.nextTick(U):W.once("end",U),q.on("unpipe",re);function re(pe,_e){g("onunpipe"),pe===W&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,$e())}function Ie(){g("onend"),q.end()}var ue=a(W);q.on("drain",ue);var he=!1;function $e(){g("cleanup"),q.removeListener("close",de),q.removeListener("finish",ye),q.removeListener("drain",ue),q.removeListener("error",De),q.removeListener("unpipe",re),W.removeListener("end",Ie),W.removeListener("end",Ce),W.removeListener("data",se),he=!0,J.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ue()}var me=!1;W.on("data",se);function se(pe){g("ondata"),me=!1;var _e=q.write(pe);_e===!1&&!me&&((J.pipesCount===1&&J.pipes===q||J.pipesCount>1&&K(J.pipes,q)!==-1)&&!he&&(g("false write response, pause",J.awaitDrain),J.awaitDrain++,me=!0),W.pause())}function De(pe){g("onerror",pe),Ce(),q.removeListener("error",De),p(q,"error")===0&&q.emit("error",pe)}D(q,"error",De);function de(){q.removeListener("finish",ye),Ce()}q.once("close",de);function ye(){g("onfinish"),q.removeListener("close",de),Ce()}q.once("finish",ye);function Ce(){g("unpipe"),W.unpipe(q)}return q.emit("pipe",W),J.flowing||(g("pipe resume"),W.resume()),q};function a(q){return function(){var P=q._readableState;g("pipeOnDrain",P.awaitDrain),P.awaitDrain&&P.awaitDrain--,P.awaitDrain===0&&p(q,"data")&&(P.flowing=!0,o(q))}}$.prototype.unpipe=function(q){var P=this._readableState,W={hasUnpiped:!1};if(P.pipesCount===0)return this;if(P.pipesCount===1)return q&&q!==P.pipes?this:(q||(q=P.pipes),P.pipes=null,P.pipesCount=0,P.flowing=!1,q&&q.emit("unpipe",this,W),this);if(!q){var J=P.pipes,X=P.pipesCount;P.pipes=null,P.pipesCount=0,P.flowing=!1;for(var U=0;U<X;U++)J[U].emit("unpipe",this,{hasUnpiped:!1});return this}var re=K(P.pipes,q);return re===-1?this:(P.pipes.splice(re,1),P.pipesCount-=1,P.pipesCount===1&&(P.pipes=P.pipes[0]),q.emit("unpipe",this,W),this)},$.prototype.on=function(q,P){var W=R.prototype.on.call(this,q,P);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var J=this._readableState;!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.emittedReadable=!1,J.reading?J.length&&c(this):_.nextTick(s,this))}return W},$.prototype.addListener=$.prototype.on;function s(q){g("readable nexttick read 0"),q.read(0)}$.prototype.resume=function(){var q=this._readableState;return q.flowing||(g("resume"),q.flowing=!0,u(this,q)),this};function u(q,P){P.resumeScheduled||(P.resumeScheduled=!0,_.nextTick(l,q,P))}function l(q,P){P.reading||(g("resume read 0"),q.read(0)),P.resumeScheduled=!1,P.awaitDrain=0,q.emit("resume"),o(q),P.flowing&&!P.reading&&q.read(0)}$.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(q){var P=q._readableState;for(g("flow",P.flowing);P.flowing&&q.read()!==null;);}$.prototype.wrap=function(q){var P=this,W=this._readableState,J=!1;q.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var re=W.decoder.end();re&&re.length&&P.push(re)}P.push(null)}),q.on("data",function(re){if(g("wrapped data"),W.decoder&&(re=W.decoder.write(re)),!(W.objectMode&&re==null)&&!(!W.objectMode&&(!re||!re.length))){var Ie=P.push(re);Ie||(J=!0,q.pause())}});for(var X in q)this[X]===void 0&&typeof q[X]=="function"&&(this[X]=(function(re){return function(){return q[re].apply(q,arguments)}})(X));for(var U=0;U<A.length;U++)q.on(A[U],this.emit.bind(this,A[U]));return this._read=function(re){g("wrapped _read",re),J&&(J=!1,q.resume())},this},Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),$._fromList=r;function r(q,P){if(P.length===0)return null;var W;return P.objectMode?W=P.buffer.shift():!q||q>=P.length?(P.decoder?W=P.buffer.join(""):P.buffer.length===1?W=P.buffer.head.data:W=P.buffer.concat(P.length),P.buffer.clear()):W=h(q,P.buffer,P.decoder),W}function h(q,P,W){var J;return q<P.head.data.length?(J=P.head.data.slice(0,q),P.head.data=P.head.data.slice(q)):q===P.head.data.length?J=P.shift():J=W?b(q,P):E(q,P),J}function b(q,P){var W=P.head,J=1,X=W.data;for(q-=X.length;W=W.next;){var U=W.data,re=q>U.length?U.length:q;if(re===U.length?X+=U:X+=U.slice(0,q),q-=re,q===0){re===U.length?(++J,W.next?P.head=W.next:P.head=P.tail=null):(P.head=W,W.data=U.slice(re));break}++J}return P.length-=J,X}function E(q,P){var W=f.allocUnsafe(q),J=P.head,X=1;for(J.data.copy(W),q-=J.data.length;J=J.next;){var U=J.data,re=q>U.length?U.length:q;if(U.copy(W,W.length-q,0,re),q-=re,q===0){re===U.length?(++X,J.next?P.head=J.next:P.head=P.tail=null):(P.head=J,J.data=U.slice(re));break}++X}return P.length-=X,W}function L(q){var P=q._readableState;if(P.length>0)throw new Error('"endReadable()" called on non-empty stream');P.endEmitted||(P.ended=!0,_.nextTick(Y,P,q))}function Y(q,P){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,P.readable=!1,P.emit("end"))}function K(q,P){for(var W=0,J=q.length;W<J;W++)if(q[W]===P)return W;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=p;var _=require_stream_duplex$1(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(p,_);function I(w,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);_.call(this,w),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",R)}function R(){var w=this;typeof this._flush=="function"?this._flush(function(m,v){f(w,m,v)}):f(this,null,null)}p.prototype.push=function(w,m){return this._transformState.needTransform=!1,_.prototype.push.call(this,w,m)},p.prototype._transform=function(w,m,v){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=w,y.writeencoding=m,!y.transforming){var d=this._readableState;(y.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},p.prototype._destroy=function(w,m){var v=this;_.prototype._destroy.call(this,w,function(y){m(y),v.emit("close")})};function f(w,m,v){if(m)return w.emit("error",m);if(v!=null&&w.push(v),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=I;var _=require_stream_transform$1(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(I,_);function I(p){if(!(this instanceof I))return new I(p);_.call(this,p)}return I.prototype._transform=function(p,R,f){f(null,p)},_stream_passthrough$1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,(function(_,S){S=_.exports=require_stream_readable$1(),S.Stream=S,S.Readable=S,S.Writable=require_stream_writable$1(),S.Duplex=require_stream_duplex$1(),S.Transform=require_stream_transform$1(),S.PassThrough=require_stream_passthrough$1()})(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase,hasRequiredHashBase;function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$1(),I=requireReadableBrowser$1().Transform,p=requireInherits_browser();function R(f){I.call(this),this._block=_.allocUnsafe(f),this._blockSize=f,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return p(R,I),R.prototype._transform=function(f,w,m){var v=null;try{this.update(f,w)}catch(y){v=y}m(v)},R.prototype._flush=function(f){var w=null;try{this.push(this.digest())}catch(m){w=m}f(w)},R.prototype.update=function(f,w){if(this._finalized)throw new Error("Digest already called");for(var m=S(f,w),v=this._block,y=0;this._blockOffset+m.length-y>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)v[d]=m[y],d+=1,y+=1;this._update(),this._blockOffset=0}for(;y<m.length;)v[this._blockOffset]=m[y],this._blockOffset+=1,y+=1;for(var g=0,M=m.length*8;M>0;++g)this._length[g]+=M,M=this._length[g]/4294967296|0,M>0&&(this._length[g]-=4294967296*M);return this},R.prototype._update=function(){throw new Error("_update is not implemented")},R.prototype.digest=function(f){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var w=this._digest();f!==void 0&&(w=w.toString(f)),this._block.fill(0),this._blockOffset=0;for(var m=0;m<4;++m)this._length[m]=0;return w},R.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=R,hashBase}var ripemd160,hasRequiredRipemd160;function requireRipemd160(){if(hasRequiredRipemd160)return ripemd160;hasRequiredRipemd160=1;var _=requireDist().Buffer,S=requireInherits_browser(),I=requireHashBase(),p=new Array(16),R=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],w=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];function d(C,$){return C<<$|C>>>32-$}function g(C,$,H,N,V,Q,ne,ae){return d(C+($^H^N)+Q+ne|0,ae)+V|0}function M(C,$,H,N,V,Q,ne,ae){return d(C+($&H|~$&N)+Q+ne|0,ae)+V|0}function x(C,$,H,N,V,Q,ne,ae){return d(C+(($|~H)^N)+Q+ne|0,ae)+V|0}function B(C,$,H,N,V,Q,ne,ae){return d(C+($&N|H&~N)+Q+ne|0,ae)+V|0}function A(C,$,H,N,V,Q,ne,ae){return d(C+($^(H|~N))+Q+ne|0,ae)+V|0}function D(){I.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}return S(D,I),D.prototype._update=function(){for(var C=p,$=0;$<16;++$)C[$]=this._block.readInt32LE($*4);for(var H=this._a|0,N=this._b|0,V=this._c|0,Q=this._d|0,ne=this._e|0,ae=this._a|0,ee=this._b|0,le=this._c|0,c=this._d|0,e=this._e|0,t=0;t<80;t+=1){var n,a;t<16?(n=g(H,N,V,Q,ne,C[R[t]],v[0],w[t]),a=A(ae,ee,le,c,e,C[f[t]],y[0],m[t])):t<32?(n=M(H,N,V,Q,ne,C[R[t]],v[1],w[t]),a=B(ae,ee,le,c,e,C[f[t]],y[1],m[t])):t<48?(n=x(H,N,V,Q,ne,C[R[t]],v[2],w[t]),a=x(ae,ee,le,c,e,C[f[t]],y[2],m[t])):t<64?(n=B(H,N,V,Q,ne,C[R[t]],v[3],w[t]),a=M(ae,ee,le,c,e,C[f[t]],y[3],m[t])):(n=A(H,N,V,Q,ne,C[R[t]],v[4],w[t]),a=g(ae,ee,le,c,e,C[f[t]],y[4],m[t])),H=ne,ne=Q,Q=d(V,10),V=N,N=n,ae=e,e=c,c=d(le,10),le=ee,ee=a}var s=this._b+V+c|0;this._b=this._c+Q+e|0,this._c=this._d+ne+ae|0,this._d=this._e+H+ee|0,this._e=this._a+N+le|0,this._a=s},D.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var C=_.alloc?_.alloc(20):new _(20);return C.writeInt32LE(this._a,0),C.writeInt32LE(this._b,4),C.writeInt32LE(this._c,8),C.writeInt32LE(this._d,12),C.writeInt32LE(this._e,16),C},ripemd160=D,ripemd160}var sha_js={exports:{}},hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2();function I(p,R){this._block=_.alloc(p),this._finalSize=R,this._blockSize=p,this._len=0}return I.prototype.update=function(p,R){p=S(p,R||"utf8");for(var f=this._block,w=this._blockSize,m=p.length,v=this._len,y=0;y<m;){for(var d=v%w,g=Math.min(m-y,w-d),M=0;M<g;M++)f[d+M]=p[y+M];v+=g,y+=g,v%w===0&&this._update(f)}return this._len+=m,this},I.prototype.digest=function(p){var R=this._len%this._blockSize;this._block[R]=128,this._block.fill(0,R+1),R>=this._finalSize&&(this._update(this._block),this._block.fill(0));var f=this._len*8;if(f<=4294967295)this._block.writeUInt32BE(f,this._blockSize-4);else{var w=(f&4294967295)>>>0,m=(f-w)/4294967296;this._block.writeUInt32BE(m,this._blockSize-8),this._block.writeUInt32BE(w,this._blockSize-4)}this._update(this._block);var v=this._hash();return p?v.toString(p):v},I.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=I,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],R=new Array(80);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(y){return y<<5|y>>>27}function m(y){return y<<30|y>>>2}function v(y,d,g,M){return y===0?d&g|~d&M:y===2?d&g|d&M|g&M:d^g^M}return f.prototype._update=function(y){for(var d=this._w,g=this._a|0,M=this._b|0,x=this._c|0,B=this._d|0,A=this._e|0,D=0;D<16;++D)d[D]=y.readInt32BE(D*4);for(;D<80;++D)d[D]=d[D-3]^d[D-8]^d[D-14]^d[D-16];for(var C=0;C<80;++C){var $=~~(C/20),H=w(g)+v($,M,x,B)+A+d[C]+p[$]|0;A=B,B=x,x=m(M),M=g,g=H}this._a=g+this._a|0,this._b=M+this._b|0,this._c=x+this._c|0,this._d=B+this._d|0,this._e=A+this._e|0},f.prototype._hash=function(){var y=I.allocUnsafe(20);return y.writeInt32BE(this._a|0,0),y.writeInt32BE(this._b|0,4),y.writeInt32BE(this._c|0,8),y.writeInt32BE(this._d|0,12),y.writeInt32BE(this._e|0,16),y},sha$1=f,sha$1}var sha1,hasRequiredSha1;function requireSha1(){if(hasRequiredSha1)return sha1;hasRequiredSha1=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],R=new Array(80);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(d){return d<<1|d>>>31}function m(d){return d<<5|d>>>27}function v(d){return d<<30|d>>>2}function y(d,g,M,x){return d===0?g&M|~g&x:d===2?g&M|g&x|M&x:g^M^x}return f.prototype._update=function(d){for(var g=this._w,M=this._a|0,x=this._b|0,B=this._c|0,A=this._d|0,D=this._e|0,C=0;C<16;++C)g[C]=d.readInt32BE(C*4);for(;C<80;++C)g[C]=w(g[C-3]^g[C-8]^g[C-14]^g[C-16]);for(var $=0;$<80;++$){var H=~~($/20),N=m(M)+y(H,x,B,A)+D+g[$]+p[H]|0;D=A,A=B,B=v(x),x=M,M=N}this._a=M+this._a|0,this._b=x+this._b|0,this._c=B+this._c|0,this._d=A+this._d|0,this._e=D+this._e|0},f.prototype._hash=function(){var d=I.allocUnsafe(20);return d.writeInt32BE(this._a|0,0),d.writeInt32BE(this._b|0,4),d.writeInt32BE(this._c|0,8),d.writeInt32BE(this._d|0,12),d.writeInt32BE(this._e|0,16),d},sha1=f,sha1}var sha256$1,hasRequiredSha256;function requireSha256(){if(hasRequiredSha256)return sha256$1;hasRequiredSha256=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],R=new Array(64);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function w(M,x,B){return B^M&(x^B)}function m(M,x,B){return M&x|B&(M|x)}function v(M){return(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10)}function y(M){return(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7)}function d(M){return(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3}function g(M){return(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10}return f.prototype._update=function(M){for(var x=this._w,B=this._a|0,A=this._b|0,D=this._c|0,C=this._d|0,$=this._e|0,H=this._f|0,N=this._g|0,V=this._h|0,Q=0;Q<16;++Q)x[Q]=M.readInt32BE(Q*4);for(;Q<64;++Q)x[Q]=g(x[Q-2])+x[Q-7]+d(x[Q-15])+x[Q-16]|0;for(var ne=0;ne<64;++ne){var ae=V+y($)+w($,H,N)+p[ne]+x[ne]|0,ee=v(B)+m(B,A,D)|0;V=N,N=H,H=$,$=C+ae|0,C=D,D=A,A=B,B=ae+ee|0}this._a=B+this._a|0,this._b=A+this._b|0,this._c=D+this._c|0,this._d=C+this._d|0,this._e=$+this._e|0,this._f=H+this._f|0,this._g=N+this._g|0,this._h=V+this._h|0},f.prototype._hash=function(){var M=I.allocUnsafe(32);return M.writeInt32BE(this._a,0),M.writeInt32BE(this._b,4),M.writeInt32BE(this._c,8),M.writeInt32BE(this._d,12),M.writeInt32BE(this._e,16),M.writeInt32BE(this._f,20),M.writeInt32BE(this._g,24),M.writeInt32BE(this._h,28),M},sha256$1=f,sha256$1}var sha224$1,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$1;hasRequiredSha224=1;var _=requireInherits_browser(),S=requireSha256(),I=requireHash$1(),p=requireSafeBuffer$2().Buffer,R=new Array(64);function f(){this.init(),this._w=R,I.call(this,64,56)}return _(f,S),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var w=p.allocUnsafe(28);return w.writeInt32BE(this._a,0),w.writeInt32BE(this._b,4),w.writeInt32BE(this._c,8),w.writeInt32BE(this._d,12),w.writeInt32BE(this._e,16),w.writeInt32BE(this._f,20),w.writeInt32BE(this._g,24),w},sha224$1=f,sha224$1}var sha512$1,hasRequiredSha512;function requireSha512(){if(hasRequiredSha512)return sha512$1;hasRequiredSha512=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],R=new Array(160);function f(){this.init(),this._w=R,S.call(this,128,112)}_(f,S),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function w(A,D,C){return C^A&(D^C)}function m(A,D,C){return A&D|C&(A|D)}function v(A,D){return(A>>>28|D<<4)^(D>>>2|A<<30)^(D>>>7|A<<25)}function y(A,D){return(A>>>14|D<<18)^(A>>>18|D<<14)^(D>>>9|A<<23)}function d(A,D){return(A>>>1|D<<31)^(A>>>8|D<<24)^A>>>7}function g(A,D){return(A>>>1|D<<31)^(A>>>8|D<<24)^(A>>>7|D<<25)}function M(A,D){return(A>>>19|D<<13)^(D>>>29|A<<3)^A>>>6}function x(A,D){return(A>>>19|D<<13)^(D>>>29|A<<3)^(A>>>6|D<<26)}function B(A,D){return A>>>0<D>>>0?1:0}return f.prototype._update=function(A){for(var D=this._w,C=this._ah|0,$=this._bh|0,H=this._ch|0,N=this._dh|0,V=this._eh|0,Q=this._fh|0,ne=this._gh|0,ae=this._hh|0,ee=this._al|0,le=this._bl|0,c=this._cl|0,e=this._dl|0,t=this._el|0,n=this._fl|0,a=this._gl|0,s=this._hl|0,u=0;u<32;u+=2)D[u]=A.readInt32BE(u*4),D[u+1]=A.readInt32BE(u*4+4);for(;u<160;u+=2){var l=D[u-30],o=D[u-30+1],r=d(l,o),h=g(o,l);l=D[u-4],o=D[u-4+1];var b=M(l,o),E=x(o,l),L=D[u-14],Y=D[u-14+1],K=D[u-32],q=D[u-32+1],P=h+Y|0,W=r+L+B(P,h)|0;P=P+E|0,W=W+b+B(P,E)|0,P=P+q|0,W=W+K+B(P,q)|0,D[u]=W,D[u+1]=P}for(var J=0;J<160;J+=2){W=D[J],P=D[J+1];var X=m(C,$,H),U=m(ee,le,c),re=v(C,ee),Ie=v(ee,C),ue=y(V,t),he=y(t,V),$e=p[J],me=p[J+1],se=w(V,Q,ne),De=w(t,n,a),de=s+he|0,ye=ae+ue+B(de,s)|0;de=de+De|0,ye=ye+se+B(de,De)|0,de=de+me|0,ye=ye+$e+B(de,me)|0,de=de+P|0,ye=ye+W+B(de,P)|0;var Ce=Ie+U|0,pe=re+X+B(Ce,Ie)|0;ae=ne,s=a,ne=Q,a=n,Q=V,n=t,t=e+de|0,V=N+ye+B(t,e)|0,N=H,e=c,H=$,c=le,$=C,le=ee,ee=de+Ce|0,C=ye+pe+B(ee,de)|0}this._al=this._al+ee|0,this._bl=this._bl+le|0,this._cl=this._cl+c|0,this._dl=this._dl+e|0,this._el=this._el+t|0,this._fl=this._fl+n|0,this._gl=this._gl+a|0,this._hl=this._hl+s|0,this._ah=this._ah+C+B(this._al,ee)|0,this._bh=this._bh+$+B(this._bl,le)|0,this._ch=this._ch+H+B(this._cl,c)|0,this._dh=this._dh+N+B(this._dl,e)|0,this._eh=this._eh+V+B(this._el,t)|0,this._fh=this._fh+Q+B(this._fl,n)|0,this._gh=this._gh+ne+B(this._gl,a)|0,this._hh=this._hh+ae+B(this._hl,s)|0},f.prototype._hash=function(){var A=I.allocUnsafe(64);function D(C,$,H){A.writeInt32BE(C,H),A.writeInt32BE($,H+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),D(this._gh,this._gl,48),D(this._hh,this._hl,56),A},sha512$1=f,sha512$1}var sha384$1,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$1;hasRequiredSha384=1;var _=requireInherits_browser(),S=requireSha512(),I=requireHash$1(),p=requireSafeBuffer$2().Buffer,R=new Array(160);function f(){this.init(),this._w=R,I.call(this,128,112)}return _(f,S),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var w=p.allocUnsafe(48);function m(v,y,d){w.writeInt32BE(v,d),w.writeInt32BE(y,d+4)}return m(this._ah,this._al,0),m(this._bh,this._bl,8),m(this._ch,this._cl,16),m(this._dh,this._dl,24),m(this._eh,this._el,32),m(this._fh,this._fl,40),w},sha384$1=f,sha384$1}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,(function(_){_.exports=function(I){var p=I.toLowerCase(),R=_.exports[p];if(!R)throw new Error(p+" is not supported (we accept pull requests)");return new R},_.exports.sha=requireSha$1(),_.exports.sha1=requireSha1(),_.exports.sha224=requireSha224(),_.exports.sha256=requireSha256(),_.exports.sha384=requireSha384(),_.exports.sha512=requireSha512()})(sha_js)),sha_js.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var _=requireSafeBuffer$2().Buffer,S=requireStreamBrowserify().Transform,I=requireString_decoder().StringDecoder,p=requireInherits_browser(),R=requireToBuffer$2();function f(w){S.call(this),this.hashMode=typeof w=="string",this.hashMode?this[w]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return p(f,S),f.prototype.update=function(w,m,v){var y=R(w,m),d=this._update(y);return this.hashMode?this:(v&&(d=this._toString(d,v)),d)},f.prototype.setAutoPadding=function(){},f.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},f.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},f.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},f.prototype._transform=function(w,m,v){var y;try{this.hashMode?this._update(w):this.push(this._update(w))}catch(d){y=d}finally{v(y)}},f.prototype._flush=function(w){var m;try{this.push(this.__final())}catch(v){m=v}w(m)},f.prototype._finalOrDigest=function(w){var m=this.__final()||_.alloc(0);return w&&(m=this._toString(m,w,!0)),m},f.prototype._toString=function(w,m,v){if(this._decoder||(this._decoder=new I(m),this._encoding=m),this._encoding!==m)throw new Error("can’t switch encodings");var y=this._decoder.write(w);return v&&(y+=this._decoder.end()),y},cipherBase=f,cipherBase}var browser$9,hasRequiredBrowser$9;function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var _=requireInherits_browser(),S=requireMd5_js(),I=requireRipemd160(),p=requireSha_js(),R=requireCipherBase();function f(w){R.call(this,"digest"),this._hash=w}return _(f,R),f.prototype._update=function(w){this._hash.update(w)},f.prototype._final=function(){return this._hash.digest()},browser$9=function(m){return m=m.toLowerCase(),m==="md5"?new S:m==="rmd160"||m==="ripemd160"?new I:new f(p(m))},browser$9}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var _=requireInherits_browser(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=S.alloc(128),R=64;function f(w,m){I.call(this,"digest"),typeof m=="string"&&(m=S.from(m)),this._alg=w,this._key=m,m.length>R?m=w(m):m.length<R&&(m=S.concat([m,p],R));for(var v=this._ipad=S.allocUnsafe(R),y=this._opad=S.allocUnsafe(R),d=0;d<R;d++)v[d]=m[d]^54,y[d]=m[d]^92;this._hash=[v]}return _(f,I),f.prototype._update=function(w){this._hash.push(w)},f.prototype._final=function(){var w=this._alg(S.concat(this._hash));return this._alg(S.concat([this._opad,w]))},legacy=f,legacy}var md5,hasRequiredMd5;function requireMd5(){if(hasRequiredMd5)return md5;hasRequiredMd5=1;var _=requireMd5_js();return md5=function(S){return new _().update(S).digest()},md5}var browser$8,hasRequiredBrowser$8;function requireBrowser$8(){if(hasRequiredBrowser$8)return browser$8;hasRequiredBrowser$8=1;var _=requireInherits_browser(),S=requireLegacy(),I=requireCipherBase(),p=requireSafeBuffer$2().Buffer,R=requireMd5(),f=requireRipemd160(),w=requireSha_js(),m=p.alloc(128);function v(y,d){I.call(this,"digest"),typeof d=="string"&&(d=p.from(d));var g=y==="sha512"||y==="sha384"?128:64;if(this._alg=y,this._key=d,d.length>g){var M=y==="rmd160"?new f:w(y);d=M.update(d).digest()}else d.length<g&&(d=p.concat([d,m],g));for(var x=this._ipad=p.allocUnsafe(g),B=this._opad=p.allocUnsafe(g),A=0;A<g;A++)x[A]=d[A]^54,B[A]=d[A]^92;this._hash=y==="rmd160"?new f:w(y),this._hash.update(x)}return _(v,I),v.prototype._update=function(y){this._hash.update(y)},v.prototype._final=function(){var y=this._hash.digest(),d=this._alg==="rmd160"?new f:w(this._alg);return d.update(this._opad).update(y).digest()},browser$8=function(d,g){return d=d.toLowerCase(),d==="rmd160"||d==="ripemd160"?new v("rmd160",g):d==="md5"?new S(R,g):new v(d,g)},browser$8}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256={sign:"ecdsa",hash:"sha256",id:""},sha224={sign:"ecdsa",hash:"sha224",id:""},sha384={sign:"ecdsa",hash:"sha384",id:""},sha512={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},require$$6={sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256,sha224,sha384,sha512,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos||(hasRequiredAlgos=1,algos=require$$6),algos}var browser$7={},precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var _=isFinite,S=Math.pow(2,30)-1;return precondition=function(I,p){if(typeof I!="number")throw new TypeError("Iterations not a number");if(I<0||!_(I))throw new TypeError("Bad iterations");if(typeof p!="number")throw new TypeError("Key length not a number");if(p<0||p>S||p!==p)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var _;if(commonjsGlobal.process&&commonjsGlobal.process.browser)_="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var S=parseInt(process$1.version.split(".")[0].slice(1),10);_=S>=6?"utf-8":"binary"}else _="utf-8";return defaultEncoding_1=_,defaultEncoding_1}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2(),I=typeof Uint8Array<"u",p=I&&typeof ArrayBuffer<"u",R=p&&ArrayBuffer.isView;return toBuffer_1=function(f,w,m){if(typeof f=="string"||_.isBuffer(f)||I&&f instanceof Uint8Array||R&&R(f))return S(f,w);throw new TypeError(m+" must be a string, a Buffer, a Uint8Array, or a DataView")},toBuffer_1}var syncBrowser,hasRequiredSyncBrowser;function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var _=requireMd5(),S=requireRipemd160(),I=requireSha_js(),p=requireSafeBuffer$2().Buffer,R=requirePrecondition(),f=requireDefaultEncoding(),w=requireToBuffer(),m=p.alloc(128),v={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},y={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function d(B){return new S().update(B).digest()}function g(B){function A(D){return I(B).update(D).digest()}return B==="rmd160"||B==="ripemd160"?d:B==="md5"?_:A}function M(B,A,D){var C=g(B),$=B==="sha512"||B==="sha384"?128:64;A.length>$?A=C(A):A.length<$&&(A=p.concat([A,m],$));for(var H=p.allocUnsafe($+v[B]),N=p.allocUnsafe($+v[B]),V=0;V<$;V++)H[V]=A[V]^54,N[V]=A[V]^92;var Q=p.allocUnsafe($+D+4);H.copy(Q,0,0,$),this.ipad1=Q,this.ipad2=H,this.opad=N,this.alg=B,this.blocksize=$,this.hash=C,this.size=v[B]}M.prototype.run=function(B,A){B.copy(A,this.blocksize);var D=this.hash(A);return D.copy(this.opad,this.blocksize),this.hash(this.opad)};function x(B,A,D,C,$){R(D,C),B=w(B,f,"Password"),A=w(A,f,"Salt");var H=($||"sha1").toLowerCase(),N=y[H]||H,V=v[N];if(typeof V!="number"||!V)throw new TypeError("Digest algorithm not supported: "+$);var Q=new M(N,B,A.length),ne=p.allocUnsafe(C),ae=p.allocUnsafe(A.length+4);A.copy(ae,0,0,A.length);for(var ee=0,le=V,c=Math.ceil(C/le),e=1;e<=c;e++){ae.writeUInt32BE(e,A.length);for(var t=Q.run(ae,Q.ipad1),n=t,a=1;a<D;a++){n=Q.run(n,Q.ipad2);for(var s=0;s<le;s++)t[s]^=n[s]}t.copy(ne,ee),ee+=le}return ne}return syncBrowser=x,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var _=requireSafeBuffer$2().Buffer,S=requirePrecondition(),I=requireDefaultEncoding(),p=requireSyncBrowser(),R=requireToBuffer(),f,w=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,m={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},v=[],y;function d(){return y||(commonjsGlobal.process&&commonjsGlobal.process.nextTick?y=commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?y=commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?y=commonjsGlobal.setImmediate:y=commonjsGlobal.setTimeout,y)}function g(B,A,D,C,$){return w.importKey("raw",B,{name:"PBKDF2"},!1,["deriveBits"]).then(function(H){return w.deriveBits({name:"PBKDF2",salt:A,iterations:D,hash:{name:$}},H,C<<3)}).then(function(H){return _.from(H)})}function M(B){if(commonjsGlobal.process&&!commonjsGlobal.process.browser||!w||!w.importKey||!w.deriveBits)return Promise.resolve(!1);if(v[B]!==void 0)return v[B];f=f||_.alloc(8);var A=g(f,f,10,128,B).then(function(){return!0},function(){return!1});return v[B]=A,A}function x(B,A){B.then(function(D){d()(function(){A(null,D)})},function(D){d()(function(){A(D)})})}return async=function(B,A,D,C,$,H){if(typeof $=="function"&&(H=$,$=void 0),S(D,C),B=R(B,I,"Password"),A=R(A,I,"Salt"),typeof H!="function")throw new Error("No callback provided to pbkdf2");$=$||"sha1";var N=m[$.toLowerCase()];if(!N||typeof commonjsGlobal.Promise!="function"){d()(function(){var V;try{V=p(B,A,D,C,$)}catch(Q){H(Q);return}H(null,V)});return}x(M(N).then(function(V){return V?g(B,A,D,C,N):p(B,A,D,C,$)}),H)},async}var hasRequiredBrowser$7;function requireBrowser$7(){return hasRequiredBrowser$7||(hasRequiredBrowser$7=1,browser$7.pbkdf2=requireAsync(),browser$7.pbkdf2Sync=requireSyncBrowser()),browser$7}var browser$6={},des$1={},utils$3={},hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$3;hasRequiredUtils$3=1,utils$3.readUInt32BE=function(R,f){var w=R[0+f]<<24|R[1+f]<<16|R[2+f]<<8|R[3+f];return w>>>0},utils$3.writeUInt32BE=function(R,f,w){R[0+w]=f>>>24,R[1+w]=f>>>16&255,R[2+w]=f>>>8&255,R[3+w]=f&255},utils$3.ip=function(R,f,w,m){for(var v=0,y=0,d=6;d>=0;d-=2){for(var g=0;g<=24;g+=8)v<<=1,v|=f>>>g+d&1;for(var g=0;g<=24;g+=8)v<<=1,v|=R>>>g+d&1}for(var d=6;d>=0;d-=2){for(var g=1;g<=25;g+=8)y<<=1,y|=f>>>g+d&1;for(var g=1;g<=25;g+=8)y<<=1,y|=R>>>g+d&1}w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.rip=function(R,f,w,m){for(var v=0,y=0,d=0;d<4;d++)for(var g=24;g>=0;g-=8)v<<=1,v|=f>>>g+d&1,v<<=1,v|=R>>>g+d&1;for(var d=4;d<8;d++)for(var g=24;g>=0;g-=8)y<<=1,y|=f>>>g+d&1,y<<=1,y|=R>>>g+d&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.pc1=function(R,f,w,m){for(var v=0,y=0,d=7;d>=5;d--){for(var g=0;g<=24;g+=8)v<<=1,v|=f>>g+d&1;for(var g=0;g<=24;g+=8)v<<=1,v|=R>>g+d&1}for(var g=0;g<=24;g+=8)v<<=1,v|=f>>g+d&1;for(var d=1;d<=3;d++){for(var g=0;g<=24;g+=8)y<<=1,y|=f>>g+d&1;for(var g=0;g<=24;g+=8)y<<=1,y|=R>>g+d&1}for(var g=0;g<=24;g+=8)y<<=1,y|=R>>g+d&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.r28shl=function(R,f){return R<<f&268435455|R>>>28-f};var _=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];utils$3.pc2=function(R,f,w,m){for(var v=0,y=0,d=_.length>>>1,g=0;g<d;g++)v<<=1,v|=R>>>_[g]&1;for(var g=d;g<_.length;g++)y<<=1,y|=f>>>_[g]&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.expand=function(R,f,w){var m=0,v=0;m=(R&1)<<5|R>>>27;for(var y=23;y>=15;y-=4)m<<=6,m|=R>>>y&63;for(var y=11;y>=3;y-=4)v|=R>>>y&63,v<<=6;v|=(R&31)<<1|R>>>31,f[w+0]=m>>>0,f[w+1]=v>>>0};var S=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];utils$3.substitute=function(R,f){for(var w=0,m=0;m<4;m++){var v=R>>>18-m*6&63,y=S[m*64+v];w<<=4,w|=y}for(var m=0;m<4;m++){var v=f>>>18-m*6&63,y=S[256+m*64+v];w<<=4,w|=y}return w>>>0};var I=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return utils$3.permute=function(R){for(var f=0,w=0;w<I.length;w++)f<<=1,f|=R>>>I[w]&1;return f>>>0},utils$3.padSplit=function(R,f,w){for(var m=R.toString(2);m.length<f;)m="0"+m;for(var v=[],y=0;y<f;y+=w)v.push(m.slice(y,y+w));return v.join(" ")},utils$3}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=_;function _(S,I){if(!S)throw new Error(I||"Assertion failed")}return _.equal=function(I,p,R){if(I!=p)throw new Error(R||"Assertion failed: "+I+" != "+p)},minimalisticAssert}var cipher,hasRequiredCipher;function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var _=requireMinimalisticAssert();function S(I){this.options=I,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=I.padding!==!1}return cipher=S,S.prototype._init=function(){},S.prototype.update=function(p){return p.length===0?[]:this.type==="decrypt"?this._updateDecrypt(p):this._updateEncrypt(p)},S.prototype._buffer=function(p,R){for(var f=Math.min(this.buffer.length-this.bufferOff,p.length-R),w=0;w<f;w++)this.buffer[this.bufferOff+w]=p[R+w];return this.bufferOff+=f,f},S.prototype._flushBuffer=function(p,R){return this._update(this.buffer,0,p,R),this.bufferOff=0,this.blockSize},S.prototype._updateEncrypt=function(p){var R=0,f=0,w=(this.bufferOff+p.length)/this.blockSize|0,m=new Array(w*this.blockSize);this.bufferOff!==0&&(R+=this._buffer(p,R),this.bufferOff===this.buffer.length&&(f+=this._flushBuffer(m,f)));for(var v=p.length-(p.length-R)%this.blockSize;R<v;R+=this.blockSize)this._update(p,R,m,f),f+=this.blockSize;for(;R<p.length;R++,this.bufferOff++)this.buffer[this.bufferOff]=p[R];return m},S.prototype._updateDecrypt=function(p){for(var R=0,f=0,w=Math.ceil((this.bufferOff+p.length)/this.blockSize)-1,m=new Array(w*this.blockSize);w>0;w--)R+=this._buffer(p,R),f+=this._flushBuffer(m,f);return R+=this._buffer(p,R),m},S.prototype.final=function(p){var R;p&&(R=this.update(p));var f;return this.type==="encrypt"?f=this._finalEncrypt():f=this._finalDecrypt(),R?R.concat(f):f},S.prototype._pad=function(p,R){if(R===0)return!1;for(;R<p.length;)p[R++]=0;return!0},S.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var p=new Array(this.blockSize);return this._update(this.buffer,0,p,0),p},S.prototype._unpad=function(p){return p},S.prototype._finalDecrypt=function(){_.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var p=new Array(this.blockSize);return this._flushBuffer(p,0),this._unpad(p)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I=requireUtils$3(),p=requireCipher();function R(){this.tmp=new Array(2),this.keys=null}function f(m){p.call(this,m);var v=new R;this._desState=v,this.deriveKeys(v,m.key)}S(f,p),des=f,f.create=function(v){return new f(v)};var w=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return f.prototype.deriveKeys=function(v,y){v.keys=new Array(32),_.equal(y.length,this.blockSize,"Invalid key length");var d=I.readUInt32BE(y,0),g=I.readUInt32BE(y,4);I.pc1(d,g,v.tmp,0),d=v.tmp[0],g=v.tmp[1];for(var M=0;M<v.keys.length;M+=2){var x=w[M>>>1];d=I.r28shl(d,x),g=I.r28shl(g,x),I.pc2(d,g,v.keys,M)}},f.prototype._update=function(v,y,d,g){var M=this._desState,x=I.readUInt32BE(v,y),B=I.readUInt32BE(v,y+4);I.ip(x,B,M.tmp,0),x=M.tmp[0],B=M.tmp[1],this.type==="encrypt"?this._encrypt(M,x,B,M.tmp,0):this._decrypt(M,x,B,M.tmp,0),x=M.tmp[0],B=M.tmp[1],I.writeUInt32BE(d,x,g),I.writeUInt32BE(d,B,g+4)},f.prototype._pad=function(v,y){if(this.padding===!1)return!1;for(var d=v.length-y,g=y;g<v.length;g++)v[g]=d;return!0},f.prototype._unpad=function(v){if(this.padding===!1)return v;for(var y=v[v.length-1],d=v.length-y;d<v.length;d++)_.equal(v[d],y);return v.slice(0,v.length-y)},f.prototype._encrypt=function(v,y,d,g,M){for(var x=y,B=d,A=0;A<v.keys.length;A+=2){var D=v.keys[A],C=v.keys[A+1];I.expand(B,v.tmp,0),D^=v.tmp[0],C^=v.tmp[1];var $=I.substitute(D,C),H=I.permute($),N=B;B=(x^H)>>>0,x=N}I.rip(B,x,g,M)},f.prototype._decrypt=function(v,y,d,g,M){for(var x=d,B=y,A=v.keys.length-2;A>=0;A-=2){var D=v.keys[A],C=v.keys[A+1];I.expand(x,v.tmp,0),D^=v.tmp[0],C^=v.tmp[1];var $=I.substitute(D,C),H=I.permute($),N=x;x=(B^H)>>>0,B=N}I.rip(x,B,g,M)},des}var cbc$1={},hasRequiredCbc$1;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I={};function p(f){_.equal(f.length,8,"Invalid IV length"),this.iv=new Array(8);for(var w=0;w<this.iv.length;w++)this.iv[w]=f[w]}function R(f){function w(d){f.call(this,d),this._cbcInit()}S(w,f);for(var m=Object.keys(I),v=0;v<m.length;v++){var y=m[v];w.prototype[y]=I[y]}return w.create=function(g){return new w(g)},w}return cbc$1.instantiate=R,I._cbcInit=function(){var w=new p(this.options.iv);this._cbcState=w},I._update=function(w,m,v,y){var d=this._cbcState,g=this.constructor.super_.prototype,M=d.iv;if(this.type==="encrypt"){for(var x=0;x<this.blockSize;x++)M[x]^=w[m+x];g._update.call(this,M,0,v,y);for(var x=0;x<this.blockSize;x++)M[x]=v[y+x]}else{g._update.call(this,w,m,v,y);for(var x=0;x<this.blockSize;x++)v[y+x]^=M[x];for(var x=0;x<this.blockSize;x++)M[x]=w[m+x]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I=requireCipher(),p=requireDes$1();function R(w,m){_.equal(m.length,24,"Invalid key length");var v=m.slice(0,8),y=m.slice(8,16),d=m.slice(16,24);w==="encrypt"?this.ciphers=[p.create({type:"encrypt",key:v}),p.create({type:"decrypt",key:y}),p.create({type:"encrypt",key:d})]:this.ciphers=[p.create({type:"decrypt",key:d}),p.create({type:"encrypt",key:y}),p.create({type:"decrypt",key:v})]}function f(w){I.call(this,w);var m=new R(this.type,this.options.key);this._edeState=m}return S(f,I),ede=f,f.create=function(m){return new f(m)},f.prototype._update=function(m,v,y,d){var g=this._edeState;g.ciphers[0]._update(m,v,y,d),g.ciphers[1]._update(y,d,y,d),g.ciphers[2]._update(y,d,y,d)},f.prototype._pad=p.prototype._pad,f.prototype._unpad=p.prototype._unpad,ede}var hasRequiredDes;function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$3(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}var browserifyDes,hasRequiredBrowserifyDes;function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var _=requireCipherBase(),S=requireDes(),I=requireInherits_browser(),p=requireSafeBuffer$2().Buffer,R={"des-ede3-cbc":S.CBC.instantiate(S.EDE),"des-ede3":S.EDE,"des-ede-cbc":S.CBC.instantiate(S.EDE),"des-ede":S.EDE,"des-cbc":S.CBC.instantiate(S.DES),"des-ecb":S.DES};R.des=R["des-cbc"],R.des3=R["des-ede3-cbc"],browserifyDes=f,I(f,_);function f(w){_.call(this);var m=w.mode.toLowerCase(),v=R[m],y;w.decrypt?y="decrypt":y="encrypt";var d=w.key;p.isBuffer(d)||(d=p.from(d)),(m==="des-ede"||m==="des-ede-cbc")&&(d=p.concat([d,d.slice(0,8)]));var g=w.iv;p.isBuffer(g)||(g=p.from(g)),this._des=v.create({key:d,iv:g,type:y})}return f.prototype._update=function(w){return p.from(this._des.update(w))},f.prototype._final=function(){return p.from(this._des.final())},browserifyDes}var browser$5={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(_,S){return _._cipher.encryptBlock(S)},ecb.decrypt=function(_,S){return _._cipher.decryptBlock(S)}),ecb}var cbc={},buffer$1={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup[45]=62;revLookup[95]=63;function getLens(_){var S=_.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=_.indexOf("=");I===-1&&(I=S);var p=I===S?0:4-I%4;return[I,p]}function byteLength(_){var S=getLens(_),I=S[0],p=S[1];return(I+p)*3/4-p}function _byteLength(_,S,I){return(S+I)*3/4-I}function toByteArray(_){var S,I=getLens(_),p=I[0],R=I[1],f=new Arr(_byteLength(_,p,R)),w=0,m=R>0?p-4:p,v;for(v=0;v<m;v+=4)S=revLookup[_.charCodeAt(v)]<<18|revLookup[_.charCodeAt(v+1)]<<12|revLookup[_.charCodeAt(v+2)]<<6|revLookup[_.charCodeAt(v+3)],f[w++]=S>>16&255,f[w++]=S>>8&255,f[w++]=S&255;return R===2&&(S=revLookup[_.charCodeAt(v)]<<2|revLookup[_.charCodeAt(v+1)]>>4,f[w++]=S&255),R===1&&(S=revLookup[_.charCodeAt(v)]<<10|revLookup[_.charCodeAt(v+1)]<<4|revLookup[_.charCodeAt(v+2)]>>2,f[w++]=S>>8&255,f[w++]=S&255),f}function tripletToBase64(_){return lookup[_>>18&63]+lookup[_>>12&63]+lookup[_>>6&63]+lookup[_&63]}function encodeChunk(_,S,I){for(var p,R=[],f=S;f<I;f+=3)p=(_[f]<<16&16711680)+(_[f+1]<<8&65280)+(_[f+2]&255),R.push(tripletToBase64(p));return R.join("")}function fromByteArray(_){for(var S,I=_.length,p=I%3,R=[],f=16383,w=0,m=I-p;w<m;w+=f)R.push(encodeChunk(_,w,w+f>m?m:w+f));return p===1?(S=_[I-1],R.push(lookup[S>>2]+lookup[S<<4&63]+"==")):p===2&&(S=(_[I-2]<<8)+_[I-1],R.push(lookup[S>>10]+lookup[S>>4&63]+lookup[S<<2&63]+"=")),R.join("")}var ieee754={};ieee754.read=function(_,S,I,p,R){var f,w,m=R*8-p-1,v=(1<<m)-1,y=v>>1,d=-7,g=I?R-1:0,M=I?-1:1,x=_[S+g];for(g+=M,f=x&(1<<-d)-1,x>>=-d,d+=m;d>0;f=f*256+_[S+g],g+=M,d-=8);for(w=f&(1<<-d)-1,f>>=-d,d+=p;d>0;w=w*256+_[S+g],g+=M,d-=8);if(f===0)f=1-y;else{if(f===v)return w?NaN:(x?-1:1)*(1/0);w=w+Math.pow(2,p),f=f-y}return(x?-1:1)*w*Math.pow(2,f-p)};ieee754.write=function(_,S,I,p,R,f){var w,m,v,y=f*8-R-1,d=(1<<y)-1,g=d>>1,M=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=p?0:f-1,B=p?1:-1,A=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(m=isNaN(S)?1:0,w=d):(w=Math.floor(Math.log(S)/Math.LN2),S*(v=Math.pow(2,-w))<1&&(w--,v*=2),w+g>=1?S+=M/v:S+=M*Math.pow(2,1-g),S*v>=2&&(w++,v/=2),w+g>=d?(m=0,w=d):w+g>=1?(m=(S*v-1)*Math.pow(2,R),w=w+g):(m=S*Math.pow(2,g-1)*Math.pow(2,R),w=0));R>=8;_[I+x]=m&255,x+=B,m/=256,R-=8);for(w=w<<R|m,y+=R;y>0;_[I+x]=w&255,x+=B,w/=256,y-=8);_[I+x-B]|=A*128};(function(_){const S=base64Js,I=ieee754,p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_.Buffer=d,_.SlowBuffer=V,_.INSPECT_MAX_BYTES=50;const R=2147483647;_.kMaxLength=R;const{Uint8Array:f,ArrayBuffer:w,SharedArrayBuffer:m}=globalThis;d.TYPED_ARRAY_SUPPORT=v(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function v(){try{const j=new f(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,f.prototype),Object.setPrototypeOf(j,k),j.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function y(j){if(j>R)throw new RangeError('The value "'+j+'" is invalid for option "size"');const k=new f(j);return Object.setPrototypeOf(k,d.prototype),k}function d(j,k,O){if(typeof j=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(j)}return g(j,k,O)}d.poolSize=8192;function g(j,k,O){if(typeof j=="string")return A(j,k);if(w.isView(j))return C(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(_e(j,w)||j&&_e(j.buffer,w)||typeof m<"u"&&(_e(j,m)||j&&_e(j.buffer,m)))return $(j,k,O);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=j.valueOf&&j.valueOf();if(G!=null&&G!==j)return d.from(G,k,O);const te=H(j);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return d.from(j[Symbol.toPrimitive]("string"),k,O);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}d.from=function(j,k,O){return g(j,k,O)},Object.setPrototypeOf(d.prototype,f.prototype),Object.setPrototypeOf(d,f);function M(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function x(j,k,O){return M(j),j<=0?y(j):k!==void 0?typeof O=="string"?y(j).fill(k,O):y(j).fill(k):y(j)}d.alloc=function(j,k,O){return x(j,k,O)};function B(j){return M(j),y(j<0?0:N(j)|0)}d.allocUnsafe=function(j){return B(j)},d.allocUnsafeSlow=function(j){return B(j)};function A(j,k){if((typeof k!="string"||k==="")&&(k="utf8"),!d.isEncoding(k))throw new TypeError("Unknown encoding: "+k);const O=Q(j,k)|0;let G=y(O);const te=G.write(j,k);return te!==O&&(G=G.slice(0,te)),G}function D(j){const k=j.length<0?0:N(j.length)|0,O=y(k);for(let G=0;G<k;G+=1)O[G]=j[G]&255;return O}function C(j){if(_e(j,f)){const k=new f(j);return $(k.buffer,k.byteOffset,k.byteLength)}return D(j)}function $(j,k,O){if(k<0||j.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(j.byteLength<k+(O||0))throw new RangeError('"length" is outside of buffer bounds');let G;return k===void 0&&O===void 0?G=new f(j):O===void 0?G=new f(j,k):G=new f(j,k,O),Object.setPrototypeOf(G,d.prototype),G}function H(j){if(d.isBuffer(j)){const k=N(j.length)|0,O=y(k);return O.length===0||j.copy(O,0,0,k),O}if(j.length!==void 0)return typeof j.length!="number"||Ue(j.length)?y(0):D(j);if(j.type==="Buffer"&&Array.isArray(j.data))return D(j.data)}function N(j){if(j>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return j|0}function V(j){return+j!=j&&(j=0),d.alloc(+j)}d.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==d.prototype},d.compare=function(k,O){if(_e(k,f)&&(k=d.from(k,k.offset,k.byteLength)),_e(O,f)&&(O=d.from(O,O.offset,O.byteLength)),!d.isBuffer(k)||!d.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===O)return 0;let G=k.length,te=O.length;for(let ce=0,fe=Math.min(G,te);ce<fe;++ce)if(k[ce]!==O[ce]){G=k[ce],te=O[ce];break}return G<te?-1:te<G?1:0},d.isEncoding=function(k){switch(String(k).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}},d.concat=function(k,O){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return d.alloc(0);let G;if(O===void 0)for(O=0,G=0;G<k.length;++G)O+=k[G].length;const te=d.allocUnsafe(O);let ce=0;for(G=0;G<k.length;++G){let fe=k[G];if(_e(fe,f))ce+fe.length>te.length?(d.isBuffer(fe)||(fe=d.from(fe)),fe.copy(te,ce)):f.prototype.set.call(te,fe,ce);else if(d.isBuffer(fe))fe.copy(te,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=fe.length}return te};function Q(j,k){if(d.isBuffer(j))return j.length;if(w.isView(j)||_e(j,w))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const O=j.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&O===0)return 0;let te=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return O;case"utf8":case"utf-8":return De(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O*2;case"hex":return O>>>1;case"base64":return Ce(j).length;default:if(te)return G?-1:De(j).length;k=(""+k).toLowerCase(),te=!0}}d.byteLength=Q;function ne(j,k,O){let G=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((O===void 0||O>this.length)&&(O=this.length),O<=0)||(O>>>=0,k>>>=0,O<=k))return"";for(j||(j="utf8");;)switch(j){case"hex":return b(this,k,O);case"utf8":case"utf-8":return u(this,k,O);case"ascii":return r(this,k,O);case"latin1":case"binary":return h(this,k,O);case"base64":return s(this,k,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,k,O);default:if(G)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),G=!0}}d.prototype._isBuffer=!0;function ae(j,k,O){const G=j[k];j[k]=j[O],j[O]=G}d.prototype.swap16=function(){const k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let O=0;O<k;O+=2)ae(this,O,O+1);return this},d.prototype.swap32=function(){const k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let O=0;O<k;O+=4)ae(this,O,O+3),ae(this,O+1,O+2);return this},d.prototype.swap64=function(){const k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let O=0;O<k;O+=8)ae(this,O,O+7),ae(this,O+1,O+6),ae(this,O+2,O+5),ae(this,O+3,O+4);return this},d.prototype.toString=function(){const k=this.length;return k===0?"":arguments.length===0?u(this,0,k):ne.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(k){if(!d.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:d.compare(this,k)===0},d.prototype.inspect=function(){let k="";const O=_.INSPECT_MAX_BYTES;return k=this.toString("hex",0,O).replace(/(.{2})/g,"$1 ").trim(),this.length>O&&(k+=" ... "),"<Buffer "+k+">"},p&&(d.prototype[p]=d.prototype.inspect),d.prototype.compare=function(k,O,G,te,ce){if(_e(k,f)&&(k=d.from(k,k.offset,k.byteLength)),!d.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(O===void 0&&(O=0),G===void 0&&(G=k?k.length:0),te===void 0&&(te=0),ce===void 0&&(ce=this.length),O<0||G>k.length||te<0||ce>this.length)throw new RangeError("out of range index");if(te>=ce&&O>=G)return 0;if(te>=ce)return-1;if(O>=G)return 1;if(O>>>=0,G>>>=0,te>>>=0,ce>>>=0,this===k)return 0;let fe=ce-te,we=G-O;const Ne=Math.min(fe,we),be=this.slice(te,ce),Se=k.slice(O,G);for(let Oe=0;Oe<Ne;++Oe)if(be[Oe]!==Se[Oe]){fe=be[Oe],we=Se[Oe];break}return fe<we?-1:we<fe?1:0};function ee(j,k,O,G,te){if(j.length===0)return-1;if(typeof O=="string"?(G=O,O=0):O>2147483647?O=2147483647:O<-2147483648&&(O=-2147483648),O=+O,Ue(O)&&(O=te?0:j.length-1),O<0&&(O=j.length+O),O>=j.length){if(te)return-1;O=j.length-1}else if(O<0)if(te)O=0;else return-1;if(typeof k=="string"&&(k=d.from(k,G)),d.isBuffer(k))return k.length===0?-1:le(j,k,O,G,te);if(typeof k=="number")return k=k&255,typeof f.prototype.indexOf=="function"?te?f.prototype.indexOf.call(j,k,O):f.prototype.lastIndexOf.call(j,k,O):le(j,[k],O,G,te);throw new TypeError("val must be string, number or Buffer")}function le(j,k,O,G,te){let ce=1,fe=j.length,we=k.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(j.length<2||k.length<2)return-1;ce=2,fe/=2,we/=2,O/=2}function Ne(Se,Oe){return ce===1?Se[Oe]:Se.readUInt16BE(Oe*ce)}let be;if(te){let Se=-1;for(be=O;be<fe;be++)if(Ne(j,be)===Ne(k,Se===-1?0:be-Se)){if(Se===-1&&(Se=be),be-Se+1===we)return Se*ce}else Se!==-1&&(be-=be-Se),Se=-1}else for(O+we>fe&&(O=fe-we),be=O;be>=0;be--){let Se=!0;for(let Oe=0;Oe<we;Oe++)if(Ne(j,be+Oe)!==Ne(k,Oe)){Se=!1;break}if(Se)return be}return-1}d.prototype.includes=function(k,O,G){return this.indexOf(k,O,G)!==-1},d.prototype.indexOf=function(k,O,G){return ee(this,k,O,G,!0)},d.prototype.lastIndexOf=function(k,O,G){return ee(this,k,O,G,!1)};function c(j,k,O,G){O=Number(O)||0;const te=j.length-O;G?(G=Number(G),G>te&&(G=te)):G=te;const ce=k.length;G>ce/2&&(G=ce/2);let fe;for(fe=0;fe<G;++fe){const we=parseInt(k.substr(fe*2,2),16);if(Ue(we))return fe;j[O+fe]=we}return fe}function e(j,k,O,G){return pe(De(k,j.length-O),j,O,G)}function t(j,k,O,G){return pe(de(k),j,O,G)}function n(j,k,O,G){return pe(Ce(k),j,O,G)}function a(j,k,O,G){return pe(ye(k,j.length-O),j,O,G)}d.prototype.write=function(k,O,G,te){if(O===void 0)te="utf8",G=this.length,O=0;else if(G===void 0&&typeof O=="string")te=O,G=this.length,O=0;else if(isFinite(O))O=O>>>0,isFinite(G)?(G=G>>>0,te===void 0&&(te="utf8")):(te=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ce=this.length-O;if((G===void 0||G>ce)&&(G=ce),k.length>0&&(G<0||O<0)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let fe=!1;for(;;)switch(te){case"hex":return c(this,k,O,G);case"utf8":case"utf-8":return e(this,k,O,G);case"ascii":case"latin1":case"binary":return t(this,k,O,G);case"base64":return n(this,k,O,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,k,O,G);default:if(fe)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),fe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function s(j,k,O){return k===0&&O===j.length?S.fromByteArray(j):S.fromByteArray(j.slice(k,O))}function u(j,k,O){O=Math.min(j.length,O);const G=[];let te=k;for(;te<O;){const ce=j[te];let fe=null,we=ce>239?4:ce>223?3:ce>191?2:1;if(te+we<=O){let Ne,be,Se,Oe;switch(we){case 1:ce<128&&(fe=ce);break;case 2:Ne=j[te+1],(Ne&192)===128&&(Oe=(ce&31)<<6|Ne&63,Oe>127&&(fe=Oe));break;case 3:Ne=j[te+1],be=j[te+2],(Ne&192)===128&&(be&192)===128&&(Oe=(ce&15)<<12|(Ne&63)<<6|be&63,Oe>2047&&(Oe<55296||Oe>57343)&&(fe=Oe));break;case 4:Ne=j[te+1],be=j[te+2],Se=j[te+3],(Ne&192)===128&&(be&192)===128&&(Se&192)===128&&(Oe=(ce&15)<<18|(Ne&63)<<12|(be&63)<<6|Se&63,Oe>65535&&Oe<1114112&&(fe=Oe))}}fe===null?(fe=65533,we=1):fe>65535&&(fe-=65536,G.push(fe>>>10&1023|55296),fe=56320|fe&1023),G.push(fe),te+=we}return o(G)}const l=4096;function o(j){const k=j.length;if(k<=l)return String.fromCharCode.apply(String,j);let O="",G=0;for(;G<k;)O+=String.fromCharCode.apply(String,j.slice(G,G+=l));return O}function r(j,k,O){let G="";O=Math.min(j.length,O);for(let te=k;te<O;++te)G+=String.fromCharCode(j[te]&127);return G}function h(j,k,O){let G="";O=Math.min(j.length,O);for(let te=k;te<O;++te)G+=String.fromCharCode(j[te]);return G}function b(j,k,O){const G=j.length;(!k||k<0)&&(k=0),(!O||O<0||O>G)&&(O=G);let te="";for(let ce=k;ce<O;++ce)te+=xe[j[ce]];return te}function E(j,k,O){const G=j.slice(k,O);let te="";for(let ce=0;ce<G.length-1;ce+=2)te+=String.fromCharCode(G[ce]+G[ce+1]*256);return te}d.prototype.slice=function(k,O){const G=this.length;k=~~k,O=O===void 0?G:~~O,k<0?(k+=G,k<0&&(k=0)):k>G&&(k=G),O<0?(O+=G,O<0&&(O=0)):O>G&&(O=G),O<k&&(O=k);const te=this.subarray(k,O);return Object.setPrototypeOf(te,d.prototype),te};function L(j,k,O){if(j%1!==0||j<0)throw new RangeError("offset is not uint");if(j+k>O)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k],ce=1,fe=0;for(;++fe<O&&(ce*=256);)te+=this[k+fe]*ce;return te},d.prototype.readUintBE=d.prototype.readUIntBE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k+--O],ce=1;for(;O>0&&(ce*=256);)te+=this[k+--O]*ce;return te},d.prototype.readUint8=d.prototype.readUInt8=function(k,O){return k=k>>>0,O||L(k,1,this.length),this[k]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(k,O){return k=k>>>0,O||L(k,2,this.length),this[k]|this[k+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(k,O){return k=k>>>0,O||L(k,2,this.length),this[k]<<8|this[k+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(k,O){return k=k>>>0,O||L(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},d.prototype.readBigUInt64LE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=O+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24,ce=this[++k]+this[++k]*2**8+this[++k]*2**16+G*2**24;return BigInt(te)+(BigInt(ce)<<BigInt(32))}),d.prototype.readBigUInt64BE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=O*2**24+this[++k]*2**16+this[++k]*2**8+this[++k],ce=this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+G;return(BigInt(te)<<BigInt(32))+BigInt(ce)}),d.prototype.readIntLE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k],ce=1,fe=0;for(;++fe<O&&(ce*=256);)te+=this[k+fe]*ce;return ce*=128,te>=ce&&(te-=Math.pow(2,8*O)),te},d.prototype.readIntBE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=O,ce=1,fe=this[k+--te];for(;te>0&&(ce*=256);)fe+=this[k+--te]*ce;return ce*=128,fe>=ce&&(fe-=Math.pow(2,8*O)),fe},d.prototype.readInt8=function(k,O){return k=k>>>0,O||L(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},d.prototype.readInt16LE=function(k,O){k=k>>>0,O||L(k,2,this.length);const G=this[k]|this[k+1]<<8;return G&32768?G|4294901760:G},d.prototype.readInt16BE=function(k,O){k=k>>>0,O||L(k,2,this.length);const G=this[k+1]|this[k]<<8;return G&32768?G|4294901760:G},d.prototype.readInt32LE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},d.prototype.readInt32BE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},d.prototype.readBigInt64LE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=this[k+4]+this[k+5]*2**8+this[k+6]*2**16+(G<<24);return(BigInt(te)<<BigInt(32))+BigInt(O+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24)}),d.prototype.readBigInt64BE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=(O<<24)+this[++k]*2**16+this[++k]*2**8+this[++k];return(BigInt(te)<<BigInt(32))+BigInt(this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+G)}),d.prototype.readFloatLE=function(k,O){return k=k>>>0,O||L(k,4,this.length),I.read(this,k,!0,23,4)},d.prototype.readFloatBE=function(k,O){return k=k>>>0,O||L(k,4,this.length),I.read(this,k,!1,23,4)},d.prototype.readDoubleLE=function(k,O){return k=k>>>0,O||L(k,8,this.length),I.read(this,k,!0,52,8)},d.prototype.readDoubleBE=function(k,O){return k=k>>>0,O||L(k,8,this.length),I.read(this,k,!1,52,8)};function Y(j,k,O,G,te,ce){if(!d.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>te||k<ce)throw new RangeError('"value" argument is out of bounds');if(O+G>j.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(k,O,G,te){if(k=+k,O=O>>>0,G=G>>>0,!te){const we=Math.pow(2,8*G)-1;Y(this,k,O,G,we,0)}let ce=1,fe=0;for(this[O]=k&255;++fe<G&&(ce*=256);)this[O+fe]=k/ce&255;return O+G},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(k,O,G,te){if(k=+k,O=O>>>0,G=G>>>0,!te){const we=Math.pow(2,8*G)-1;Y(this,k,O,G,we,0)}let ce=G-1,fe=1;for(this[O+ce]=k&255;--ce>=0&&(fe*=256);)this[O+ce]=k/fe&255;return O+G},d.prototype.writeUint8=d.prototype.writeUInt8=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,1,255,0),this[O]=k&255,O+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,65535,0),this[O]=k&255,this[O+1]=k>>>8,O+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,65535,0),this[O]=k>>>8,this[O+1]=k&255,O+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,4294967295,0),this[O+3]=k>>>24,this[O+2]=k>>>16,this[O+1]=k>>>8,this[O]=k&255,O+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,4294967295,0),this[O]=k>>>24,this[O+1]=k>>>16,this[O+2]=k>>>8,this[O+3]=k&255,O+4};function K(j,k,O,G,te){ue(k,G,te,j,O,7);let ce=Number(k&BigInt(4294967295));j[O++]=ce,ce=ce>>8,j[O++]=ce,ce=ce>>8,j[O++]=ce,ce=ce>>8,j[O++]=ce;let fe=Number(k>>BigInt(32)&BigInt(4294967295));return j[O++]=fe,fe=fe>>8,j[O++]=fe,fe=fe>>8,j[O++]=fe,fe=fe>>8,j[O++]=fe,O}function q(j,k,O,G,te){ue(k,G,te,j,O,7);let ce=Number(k&BigInt(4294967295));j[O+7]=ce,ce=ce>>8,j[O+6]=ce,ce=ce>>8,j[O+5]=ce,ce=ce>>8,j[O+4]=ce;let fe=Number(k>>BigInt(32)&BigInt(4294967295));return j[O+3]=fe,fe=fe>>8,j[O+2]=fe,fe=fe>>8,j[O+1]=fe,fe=fe>>8,j[O]=fe,O+8}d.prototype.writeBigUInt64LE=Ae(function(k,O=0){return K(this,k,O,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=Ae(function(k,O=0){return q(this,k,O,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(k,O,G,te){if(k=+k,O=O>>>0,!te){const Ne=Math.pow(2,8*G-1);Y(this,k,O,G,Ne-1,-Ne)}let ce=0,fe=1,we=0;for(this[O]=k&255;++ce<G&&(fe*=256);)k<0&&we===0&&this[O+ce-1]!==0&&(we=1),this[O+ce]=(k/fe>>0)-we&255;return O+G},d.prototype.writeIntBE=function(k,O,G,te){if(k=+k,O=O>>>0,!te){const Ne=Math.pow(2,8*G-1);Y(this,k,O,G,Ne-1,-Ne)}let ce=G-1,fe=1,we=0;for(this[O+ce]=k&255;--ce>=0&&(fe*=256);)k<0&&we===0&&this[O+ce+1]!==0&&(we=1),this[O+ce]=(k/fe>>0)-we&255;return O+G},d.prototype.writeInt8=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,1,127,-128),k<0&&(k=255+k+1),this[O]=k&255,O+1},d.prototype.writeInt16LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,32767,-32768),this[O]=k&255,this[O+1]=k>>>8,O+2},d.prototype.writeInt16BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,32767,-32768),this[O]=k>>>8,this[O+1]=k&255,O+2},d.prototype.writeInt32LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,2147483647,-2147483648),this[O]=k&255,this[O+1]=k>>>8,this[O+2]=k>>>16,this[O+3]=k>>>24,O+4},d.prototype.writeInt32BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[O]=k>>>24,this[O+1]=k>>>16,this[O+2]=k>>>8,this[O+3]=k&255,O+4},d.prototype.writeBigInt64LE=Ae(function(k,O=0){return K(this,k,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=Ae(function(k,O=0){return q(this,k,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function P(j,k,O,G,te,ce){if(O+G>j.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("Index out of range")}function W(j,k,O,G,te){return k=+k,O=O>>>0,te||P(j,k,O,4),I.write(j,k,O,G,23,4),O+4}d.prototype.writeFloatLE=function(k,O,G){return W(this,k,O,!0,G)},d.prototype.writeFloatBE=function(k,O,G){return W(this,k,O,!1,G)};function J(j,k,O,G,te){return k=+k,O=O>>>0,te||P(j,k,O,8),I.write(j,k,O,G,52,8),O+8}d.prototype.writeDoubleLE=function(k,O,G){return J(this,k,O,!0,G)},d.prototype.writeDoubleBE=function(k,O,G){return J(this,k,O,!1,G)},d.prototype.copy=function(k,O,G,te){if(!d.isBuffer(k))throw new TypeError("argument should be a Buffer");if(G||(G=0),!te&&te!==0&&(te=this.length),O>=k.length&&(O=k.length),O||(O=0),te>0&&te<G&&(te=G),te===G||k.length===0||this.length===0)return 0;if(O<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),k.length-O<te-G&&(te=k.length-O+G);const ce=te-G;return this===k&&typeof f.prototype.copyWithin=="function"?this.copyWithin(O,G,te):f.prototype.set.call(k,this.subarray(G,te),O),ce},d.prototype.fill=function(k,O,G,te){if(typeof k=="string"){if(typeof O=="string"?(te=O,O=0,G=this.length):typeof G=="string"&&(te=G,G=this.length),te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!d.isEncoding(te))throw new TypeError("Unknown encoding: "+te);if(k.length===1){const fe=k.charCodeAt(0);(te==="utf8"&&fe<128||te==="latin1")&&(k=fe)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(O<0||this.length<O||this.length<G)throw new RangeError("Out of range index");if(G<=O)return this;O=O>>>0,G=G===void 0?this.length:G>>>0,k||(k=0);let ce;if(typeof k=="number")for(ce=O;ce<G;++ce)this[ce]=k;else{const fe=d.isBuffer(k)?k:d.from(k,te),we=fe.length;if(we===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(ce=0;ce<G-O;++ce)this[ce+O]=fe[ce%we]}return this};const X={};function U(j,k,O){X[j]=class extends O{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${j}]`,this.stack,delete this.name}get code(){return j}set code(te){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:te,writable:!0})}toString(){return`${this.name} [${j}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(j){return j?`${j} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(j,k){return`The "${j}" argument must be of type number. Received type ${typeof k}`},TypeError),U("ERR_OUT_OF_RANGE",function(j,k,O){let G=`The value of "${j}" is out of range.`,te=O;return Number.isInteger(O)&&Math.abs(O)>2**32?te=re(String(O)):typeof O=="bigint"&&(te=String(O),(O>BigInt(2)**BigInt(32)||O<-(BigInt(2)**BigInt(32)))&&(te=re(te)),te+="n"),G+=` It must be ${k}. Received ${te}`,G},RangeError);function re(j){let k="",O=j.length;const G=j[0]==="-"?1:0;for(;O>=G+4;O-=3)k=`_${j.slice(O-3,O)}${k}`;return`${j.slice(0,O)}${k}`}function Ie(j,k,O){he(k,"offset"),(j[k]===void 0||j[k+O]===void 0)&&$e(k,j.length-(O+1))}function ue(j,k,O,G,te,ce){if(j>O||j<k){const fe=typeof k=="bigint"?"n":"";let we;throw k===0||k===BigInt(0)?we=`>= 0${fe} and < 2${fe} ** ${(ce+1)*8}${fe}`:we=`>= -(2${fe} ** ${(ce+1)*8-1}${fe}) and < 2 ** ${(ce+1)*8-1}${fe}`,new X.ERR_OUT_OF_RANGE("value",we,j)}Ie(G,te,ce)}function he(j,k){if(typeof j!="number")throw new X.ERR_INVALID_ARG_TYPE(k,"number",j)}function $e(j,k,O){throw Math.floor(j)!==j?(he(j,O),new X.ERR_OUT_OF_RANGE("offset","an integer",j)):k<0?new X.ERR_BUFFER_OUT_OF_BOUNDS:new X.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${k}`,j)}const me=/[^+/0-9A-Za-z-_]/g;function se(j){if(j=j.split("=")[0],j=j.trim().replace(me,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function De(j,k){k=k||1/0;let O;const G=j.length;let te=null;const ce=[];for(let fe=0;fe<G;++fe){if(O=j.charCodeAt(fe),O>55295&&O<57344){if(!te){if(O>56319){(k-=3)>-1&&ce.push(239,191,189);continue}else if(fe+1===G){(k-=3)>-1&&ce.push(239,191,189);continue}te=O;continue}if(O<56320){(k-=3)>-1&&ce.push(239,191,189),te=O;continue}O=(te-55296<<10|O-56320)+65536}else te&&(k-=3)>-1&&ce.push(239,191,189);if(te=null,O<128){if((k-=1)<0)break;ce.push(O)}else if(O<2048){if((k-=2)<0)break;ce.push(O>>6|192,O&63|128)}else if(O<65536){if((k-=3)<0)break;ce.push(O>>12|224,O>>6&63|128,O&63|128)}else if(O<1114112){if((k-=4)<0)break;ce.push(O>>18|240,O>>12&63|128,O>>6&63|128,O&63|128)}else throw new Error("Invalid code point")}return ce}function de(j){const k=[];for(let O=0;O<j.length;++O)k.push(j.charCodeAt(O)&255);return k}function ye(j,k){let O,G,te;const ce=[];for(let fe=0;fe<j.length&&!((k-=2)<0);++fe)O=j.charCodeAt(fe),G=O>>8,te=O%256,ce.push(te),ce.push(G);return ce}function Ce(j){return S.toByteArray(se(j))}function pe(j,k,O,G){let te;for(te=0;te<G&&!(te+O>=k.length||te>=j.length);++te)k[te+O]=j[te];return te}function _e(j,k){return j instanceof k||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===k.name}function Ue(j){return j!==j}const xe=(function(){const j="0123456789abcdef",k=new Array(256);for(let O=0;O<16;++O){const G=O*16;for(let te=0;te<16;++te)k[G+te]=j[O]+j[te]}return k})();function Ae(j){return typeof BigInt>"u"?je:j}function je(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer=buffer$1.Buffer;var bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(S,I){for(var p=Math.min(S.length,I.length),R=new Buffer(p),f=0;f<p;++f)R[f]=S[f]^I[f];return R}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var _=requireBufferXor();return cbc.encrypt=function(S,I){var p=_(I,S._prev);return S._prev=S._cipher.encryptBlock(p),S._prev},cbc.decrypt=function(S,I){var p=S._prev;S._prev=I;var R=S._cipher.decryptBlock(I);return _(R,p)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var _=requireSafeBuffer$2().Buffer,S=requireBufferXor();function I(p,R,f){var w=R.length,m=S(R,p._cache);return p._cache=p._cache.slice(w),p._prev=_.concat([p._prev,f?R:m]),m}return cfb.encrypt=function(p,R,f){for(var w=_.allocUnsafe(0),m;R.length;)if(p._cache.length===0&&(p._cache=p._cipher.encryptBlock(p._prev),p._prev=_.allocUnsafe(0)),p._cache.length<=R.length)m=p._cache.length,w=_.concat([w,I(p,R.slice(0,m),f)]),R=R.slice(m);else{w=_.concat([w,I(p,R,f)]);break}return w},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var _=requireSafeBuffer$2().Buffer;function S(I,p,R){var f=I._cipher.encryptBlock(I._prev),w=f[0]^p;return I._prev=_.concat([I._prev.slice(1),_.from([R?p:w])]),w}return cfb8.encrypt=function(I,p,R){for(var f=p.length,w=_.allocUnsafe(f),m=-1;++m<f;)w[m]=S(I,p[m],R);return w},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var _=requireSafeBuffer$2().Buffer;function S(p,R,f){for(var w,m=-1,v=8,y=0,d,g;++m<v;)w=p._cipher.encryptBlock(p._prev),d=R&1<<7-m?128:0,g=w[0]^d,y+=(g&128)>>m%8,p._prev=I(p._prev,f?d:g);return y}function I(p,R){var f=p.length,w=-1,m=_.allocUnsafe(p.length);for(p=_.concat([p,_.from([R])]);++w<f;)m[w]=p[w]<<1|p[w+1]>>7;return m}return cfb1.encrypt=function(p,R,f){for(var w=R.length,m=_.allocUnsafe(w),v=-1;++v<w;)m[v]=S(p,R[v],f);return m},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var _=requireBufferXor();function S(I){return I._prev=I._cipher.encryptBlock(I._prev),I._prev}return ofb.encrypt=function(I,p){for(;I._cache.length<p.length;)I._cache=Buffer.concat([I._cache,S(I)]);var R=I._cache.slice(0,p.length);return I._cache=I._cache.slice(p.length),_(p,R)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function _(S){for(var I=S.length,p;I--;)if(p=S.readUInt8(I),p===255)S.writeUInt8(0,I);else{p++,S.writeUInt8(p,I);break}}return incr32_1=_,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var _=requireBufferXor(),S=requireSafeBuffer$2().Buffer,I=requireIncr32();function p(f){var w=f._cipher.encryptBlockRaw(f._prev);return I(f._prev),w}var R=16;return ctr.encrypt=function(f,w){var m=Math.ceil(w.length/R),v=f._cache.length;f._cache=S.concat([f._cache,S.allocUnsafe(m*R)]);for(var y=0;y<m;y++){var d=p(f),g=v+y*R;f._cache.writeUInt32BE(d[0],g+0),f._cache.writeUInt32BE(d[1],g+4),f._cache.writeUInt32BE(d[2],g+8),f._cache.writeUInt32BE(d[3],g+12)}var M=f._cache.slice(0,w.length);return f._cache=f._cache.slice(w.length),_(w,M)},ctr}const aes128={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},require$$2={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128,aes192,aes256,"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};var modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var _={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},S=require$$2;for(var I in S)S[I].module=_[S[I].mode];return modes_1=S,modes_1}var aes={},hasRequiredAes;function requireAes(){if(hasRequiredAes)return aes;hasRequiredAes=1;var _=requireSafeBuffer$2().Buffer;function S(m){_.isBuffer(m)||(m=_.from(m));for(var v=m.length/4|0,y=new Array(v),d=0;d<v;d++)y[d]=m.readUInt32BE(d*4);return y}function I(m){for(var v=0;v<m.length;m++)m[v]=0}function p(m,v,y,d,g){for(var M=y[0],x=y[1],B=y[2],A=y[3],D=m[0]^v[0],C=m[1]^v[1],$=m[2]^v[2],H=m[3]^v[3],N,V,Q,ne,ae=4,ee=1;ee<g;ee++)N=M[D>>>24]^x[C>>>16&255]^B[$>>>8&255]^A[H&255]^v[ae++],V=M[C>>>24]^x[$>>>16&255]^B[H>>>8&255]^A[D&255]^v[ae++],Q=M[$>>>24]^x[H>>>16&255]^B[D>>>8&255]^A[C&255]^v[ae++],ne=M[H>>>24]^x[D>>>16&255]^B[C>>>8&255]^A[$&255]^v[ae++],D=N,C=V,$=Q,H=ne;return N=(d[D>>>24]<<24|d[C>>>16&255]<<16|d[$>>>8&255]<<8|d[H&255])^v[ae++],V=(d[C>>>24]<<24|d[$>>>16&255]<<16|d[H>>>8&255]<<8|d[D&255])^v[ae++],Q=(d[$>>>24]<<24|d[H>>>16&255]<<16|d[D>>>8&255]<<8|d[C&255])^v[ae++],ne=(d[H>>>24]<<24|d[D>>>16&255]<<16|d[C>>>8&255]<<8|d[$&255])^v[ae++],N=N>>>0,V=V>>>0,Q=Q>>>0,ne=ne>>>0,[N,V,Q,ne]}var R=[0,1,2,4,8,16,32,64,128,27,54],f=(function(){for(var m=new Array(256),v=0;v<256;v++)v<128?m[v]=v<<1:m[v]=v<<1^283;for(var y=[],d=[],g=[[],[],[],[]],M=[[],[],[],[]],x=0,B=0,A=0;A<256;++A){var D=B^B<<1^B<<2^B<<3^B<<4;D=D>>>8^D&255^99,y[x]=D,d[D]=x;var C=m[x],$=m[C],H=m[$],N=m[D]*257^D*16843008;g[0][x]=N<<24|N>>>8,g[1][x]=N<<16|N>>>16,g[2][x]=N<<8|N>>>24,g[3][x]=N,N=H*16843009^$*65537^C*257^x*16843008,M[0][D]=N<<24|N>>>8,M[1][D]=N<<16|N>>>16,M[2][D]=N<<8|N>>>24,M[3][D]=N,x===0?x=B=1:(x=C^m[m[m[H^C]]],B^=m[m[B]])}return{SBOX:y,INV_SBOX:d,SUB_MIX:g,INV_SUB_MIX:M}})();function w(m){this._key=S(m),this._reset()}return w.blockSize=16,w.keySize=256/8,w.prototype.blockSize=w.blockSize,w.prototype.keySize=w.keySize,w.prototype._reset=function(){for(var m=this._key,v=m.length,y=v+6,d=(y+1)*4,g=[],M=0;M<v;M++)g[M]=m[M];for(M=v;M<d;M++){var x=g[M-1];M%v===0?(x=x<<8|x>>>24,x=f.SBOX[x>>>24]<<24|f.SBOX[x>>>16&255]<<16|f.SBOX[x>>>8&255]<<8|f.SBOX[x&255],x^=R[M/v|0]<<24):v>6&&M%v===4&&(x=f.SBOX[x>>>24]<<24|f.SBOX[x>>>16&255]<<16|f.SBOX[x>>>8&255]<<8|f.SBOX[x&255]),g[M]=g[M-v]^x}for(var B=[],A=0;A<d;A++){var D=d-A,C=g[D-(A%4?0:4)];A<4||D<=4?B[A]=C:B[A]=f.INV_SUB_MIX[0][f.SBOX[C>>>24]]^f.INV_SUB_MIX[1][f.SBOX[C>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[C>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[C&255]]}this._nRounds=y,this._keySchedule=g,this._invKeySchedule=B},w.prototype.encryptBlockRaw=function(m){return m=S(m),p(m,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},w.prototype.encryptBlock=function(m){var v=this.encryptBlockRaw(m),y=_.allocUnsafe(16);return y.writeUInt32BE(v[0],0),y.writeUInt32BE(v[1],4),y.writeUInt32BE(v[2],8),y.writeUInt32BE(v[3],12),y},w.prototype.decryptBlock=function(m){m=S(m);var v=m[1];m[1]=m[3],m[3]=v;var y=p(m,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),d=_.allocUnsafe(16);return d.writeUInt32BE(y[0],0),d.writeUInt32BE(y[3],4),d.writeUInt32BE(y[2],8),d.writeUInt32BE(y[1],12),d},w.prototype.scrub=function(){I(this._keySchedule),I(this._invKeySchedule),I(this._key)},aes.AES=w,aes}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var _=requireSafeBuffer$2().Buffer,S=_.alloc(16,0);function I(f){return[f.readUInt32BE(0),f.readUInt32BE(4),f.readUInt32BE(8),f.readUInt32BE(12)]}function p(f){var w=_.allocUnsafe(16);return w.writeUInt32BE(f[0]>>>0,0),w.writeUInt32BE(f[1]>>>0,4),w.writeUInt32BE(f[2]>>>0,8),w.writeUInt32BE(f[3]>>>0,12),w}function R(f){this.h=f,this.state=_.alloc(16,0),this.cache=_.allocUnsafe(0)}return R.prototype.ghash=function(f){for(var w=-1;++w<f.length;)this.state[w]^=f[w];this._multiply()},R.prototype._multiply=function(){for(var f=I(this.h),w=[0,0,0,0],m,v,y,d=-1;++d<128;){for(v=(this.state[~~(d/8)]&1<<7-d%8)!==0,v&&(w[0]^=f[0],w[1]^=f[1],w[2]^=f[2],w[3]^=f[3]),y=(f[3]&1)!==0,m=3;m>0;m--)f[m]=f[m]>>>1|(f[m-1]&1)<<31;f[0]=f[0]>>>1,y&&(f[0]=f[0]^225<<24)}this.state=p(w)},R.prototype.update=function(f){this.cache=_.concat([this.cache,f]);for(var w;this.cache.length>=16;)w=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(w)},R.prototype.final=function(f,w){return this.cache.length&&this.ghash(_.concat([this.cache,S],16)),this.ghash(p([0,f,0,w])),this.state},ghash=R,ghash}var authCipher,hasRequiredAuthCipher;function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var _=requireAes(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=requireInherits_browser(),R=requireGhash(),f=requireBufferXor(),w=requireIncr32();function m(d,g){var M=0;d.length!==g.length&&M++;for(var x=Math.min(d.length,g.length),B=0;B<x;++B)M+=d[B]^g[B];return M}function v(d,g,M){if(g.length===12)return d._finID=S.concat([g,S.from([0,0,0,1])]),S.concat([g,S.from([0,0,0,2])]);var x=new R(M),B=g.length,A=B%16;x.update(g),A&&(A=16-A,x.update(S.alloc(A,0))),x.update(S.alloc(8,0));var D=B*8,C=S.alloc(8);C.writeUIntBE(D,0,8),x.update(C),d._finID=x.state;var $=S.from(d._finID);return w($),$}function y(d,g,M,x){I.call(this);var B=S.alloc(4,0);this._cipher=new _.AES(g);var A=this._cipher.encryptBlock(B);this._ghash=new R(A),M=v(this,M,A),this._prev=S.from(M),this._cache=S.allocUnsafe(0),this._secCache=S.allocUnsafe(0),this._decrypt=x,this._alen=0,this._len=0,this._mode=d,this._authTag=null,this._called=!1}return p(y,I),y.prototype._update=function(d){if(!this._called&&this._alen){var g=16-this._alen%16;g<16&&(g=S.alloc(g,0),this._ghash.update(g))}this._called=!0;var M=this._mode.encrypt(this,d);return this._decrypt?this._ghash.update(d):this._ghash.update(M),this._len+=d.length,M},y.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var d=f(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&m(d,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=d,this._cipher.scrub()},y.prototype.getAuthTag=function(){if(this._decrypt||!S.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},y.prototype.setAuthTag=function(g){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=g},y.prototype.setAAD=function(g){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(g),this._alen+=g.length},authCipher=y,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var _=requireAes(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=requireInherits_browser();function R(f,w,m,v){I.call(this),this._cipher=new _.AES(w),this._prev=S.from(m),this._cache=S.allocUnsafe(0),this._secCache=S.allocUnsafe(0),this._decrypt=v,this._mode=f}return p(R,I),R.prototype._update=function(f){return this._mode.encrypt(this,f,this._decrypt)},R.prototype._final=function(){this._cipher.scrub()},streamCipher=R,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var _=requireSafeBuffer$2().Buffer,S=requireMd5_js();function I(p,R,f,w){if(_.isBuffer(p)||(p=_.from(p,"binary")),R&&(_.isBuffer(R)||(R=_.from(R,"binary")),R.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var m=f/8,v=_.alloc(m),y=_.alloc(w||0),d=_.alloc(0);m>0||w>0;){var g=new S;g.update(d),g.update(p),R&&g.update(R),d=g.digest();var M=0;if(m>0){var x=v.length-m;M=Math.min(m,d.length),d.copy(v,x,0,M),m-=M}if(M<d.length&&w>0){var B=y.length-w,A=Math.min(w,d.length-M);d.copy(y,B,M,M+A),w-=A}}return d.fill(0),{key:v,iv:y}}return evp_bytestokey=I,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var _=requireModes$1(),S=requireAuthCipher(),I=requireSafeBuffer$2().Buffer,p=requireStreamCipher(),R=requireCipherBase(),f=requireAes(),w=requireEvp_bytestokey(),m=requireInherits_browser();function v(x,B,A){R.call(this),this._cache=new d,this._cipher=new f.AES(B),this._prev=I.from(A),this._mode=x,this._autopadding=!0}m(v,R),v.prototype._update=function(x){this._cache.add(x);for(var B,A,D=[];B=this._cache.get();)A=this._mode.encrypt(this,B),D.push(A);return I.concat(D)};var y=I.alloc(16,16);v.prototype._final=function(){var x=this._cache.flush();if(this._autopadding)return x=this._mode.encrypt(this,x),this._cipher.scrub(),x;if(!x.equals(y))throw this._cipher.scrub(),new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(x){return this._autopadding=!!x,this};function d(){this.cache=I.allocUnsafe(0)}d.prototype.add=function(x){this.cache=I.concat([this.cache,x])},d.prototype.get=function(){if(this.cache.length>15){var x=this.cache.slice(0,16);return this.cache=this.cache.slice(16),x}return null},d.prototype.flush=function(){for(var x=16-this.cache.length,B=I.allocUnsafe(x),A=-1;++A<x;)B.writeUInt8(x,A);return I.concat([this.cache,B])};function g(x,B,A){var D=_[x.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof B=="string"&&(B=I.from(B)),B.length!==D.key/8)throw new TypeError("invalid key length "+B.length);if(typeof A=="string"&&(A=I.from(A)),D.mode!=="GCM"&&A.length!==D.iv)throw new TypeError("invalid iv length "+A.length);return D.type==="stream"?new p(D.module,B,A):D.type==="auth"?new S(D.module,B,A):new v(D.module,B,A)}function M(x,B){var A=_[x.toLowerCase()];if(!A)throw new TypeError("invalid suite type");var D=w(B,!1,A.key,A.iv);return g(x,D.key,D.iv)}return encrypter.createCipheriv=g,encrypter.createCipher=M,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var _=requireAuthCipher(),S=requireSafeBuffer$2().Buffer,I=requireModes$1(),p=requireStreamCipher(),R=requireCipherBase(),f=requireAes(),w=requireEvp_bytestokey(),m=requireInherits_browser();function v(x,B,A){R.call(this),this._cache=new y,this._last=void 0,this._cipher=new f.AES(B),this._prev=S.from(A),this._mode=x,this._autopadding=!0}m(v,R),v.prototype._update=function(x){this._cache.add(x);for(var B,A,D=[];B=this._cache.get(this._autopadding);)A=this._mode.decrypt(this,B),D.push(A);return S.concat(D)},v.prototype._final=function(){var x=this._cache.flush();if(this._autopadding)return d(this._mode.decrypt(this,x));if(x)throw new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(x){return this._autopadding=!!x,this};function y(){this.cache=S.allocUnsafe(0)}y.prototype.add=function(x){this.cache=S.concat([this.cache,x])},y.prototype.get=function(x){var B;if(x){if(this.cache.length>16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B}else if(this.cache.length>=16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B;return null},y.prototype.flush=function(){if(this.cache.length)return this.cache};function d(x){var B=x[15];if(B<1||B>16)throw new Error("unable to decrypt data");for(var A=-1;++A<B;)if(x[A+(16-B)]!==B)throw new Error("unable to decrypt data");if(B!==16)return x.slice(0,16-B)}function g(x,B,A){var D=I[x.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof A=="string"&&(A=S.from(A)),D.mode!=="GCM"&&A.length!==D.iv)throw new TypeError("invalid iv length "+A.length);if(typeof B=="string"&&(B=S.from(B)),B.length!==D.key/8)throw new TypeError("invalid key length "+B.length);return D.type==="stream"?new p(D.module,B,A,!0):D.type==="auth"?new _(D.module,B,A,!0):new v(D.module,B,A)}function M(x,B){var A=I[x.toLowerCase()];if(!A)throw new TypeError("invalid suite type");var D=w(B,!1,A.key,A.iv);return g(x,D.key,D.iv)}return decrypter.createDecipher=M,decrypter.createDecipheriv=g,decrypter}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$5;hasRequiredBrowser$6=1;var _=requireEncrypter(),S=requireDecrypter(),I=require$$2;function p(){return Object.keys(I)}return browser$5.createCipher=browser$5.Cipher=_.createCipher,browser$5.createCipheriv=browser$5.Cipheriv=_.createCipheriv,browser$5.createDecipher=browser$5.Decipher=S.createDecipher,browser$5.createDecipheriv=browser$5.Decipheriv=S.createDecipheriv,browser$5.listCiphers=browser$5.getCiphers=p,browser$5}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,(function(_){_["des-ecb"]={key:8,iv:0},_["des-cbc"]=_.des={key:8,iv:8},_["des-ede3-cbc"]=_.des3={key:24,iv:8},_["des-ede3"]={key:24,iv:0},_["des-ede-cbc"]={key:16,iv:8},_["des-ede"]={key:16,iv:0}})(modes)),modes}var hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$6;hasRequiredBrowser$5=1;var _=requireBrowserifyDes(),S=requireBrowser$6(),I=requireModes$1(),p=requireModes(),R=requireEvp_bytestokey();function f(d,g){d=d.toLowerCase();var M,x;if(I[d])M=I[d].key,x=I[d].iv;else if(p[d])M=p[d].key*8,x=p[d].iv;else throw new TypeError("invalid suite type");var B=R(g,!1,M,x);return m(d,B.key,B.iv)}function w(d,g){d=d.toLowerCase();var M,x;if(I[d])M=I[d].key,x=I[d].iv;else if(p[d])M=p[d].key*8,x=p[d].iv;else throw new TypeError("invalid suite type");var B=R(g,!1,M,x);return v(d,B.key,B.iv)}function m(d,g,M){if(d=d.toLowerCase(),I[d])return S.createCipheriv(d,g,M);if(p[d])return new _({key:g,iv:M,mode:d});throw new TypeError("invalid suite type")}function v(d,g,M){if(d=d.toLowerCase(),I[d])return S.createDecipheriv(d,g,M);if(p[d])return new _({key:g,iv:M,mode:d,decrypt:!0});throw new TypeError("invalid suite type")}function y(){return Object.keys(p).concat(S.getCiphers())}return browser$6.createCipher=browser$6.Cipher=f,browser$6.createCipheriv=browser$6.Cipheriv=m,browser$6.createDecipher=browser$6.Decipher=w,browser$6.createDecipheriv=browser$6.Decipheriv=v,browser$6.listCiphers=browser$6.getCiphers=y,browser$6}var browser$4={},bn$d={exports:{}},bn$c=bn$d.exports,hasRequiredBn$6;function requireBn$6(){return hasRequiredBn$6||(hasRequiredBn$6=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.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},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],M=[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];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.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()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$c)})(bn$d)),bn$d.exports}var bn$b={exports:{}},bn$a=bn$b.exports,hasRequiredBn$5;function requireBn$5(){return hasRequiredBn$5||(hasRequiredBn$5=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.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},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],M=[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];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.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()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$a)})(bn$b)),bn$b.exports}var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var _;brorand.exports=function(R){return _||(_=new S(null)),_.generate(R)};function S(p){this.rand=p}if(brorand.exports.Rand=S,S.prototype.generate=function(R){return this._rand(R)},S.prototype._rand=function(R){if(this.rand.getBytes)return this.rand.getBytes(R);for(var f=new Uint8Array(R),w=0;w<f.length;w++)f[w]=this.rand.getByte();return f},typeof self=="object")self.crypto&&self.crypto.getRandomValues?S.prototype._rand=function(R){var f=new Uint8Array(R);return self.crypto.getRandomValues(f),f}:self.msCrypto&&self.msCrypto.getRandomValues?S.prototype._rand=function(R){var f=new Uint8Array(R);return self.msCrypto.getRandomValues(f),f}:typeof window=="object"&&(S.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var I=requireCryptoBrowserify();if(typeof I.randomBytes!="function")throw new Error("Not supported");S.prototype._rand=function(R){return I.randomBytes(R)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var _=requireBn$5(),S=requireBrorand();function I(p){this.rand=p||new S.Rand}return mr=I,I.create=function(R){return new I(R)},I.prototype._randbelow=function(R){var f=R.bitLength(),w=Math.ceil(f/8);do var m=new _(this.rand.generate(w));while(m.cmp(R)>=0);return m},I.prototype._randrange=function(R,f){var w=f.sub(R);return R.add(this._randbelow(w))},I.prototype.test=function(R,f,w){var m=R.bitLength(),v=_.mont(R),y=new _(1).toRed(v);f||(f=Math.max(1,m/48|0));for(var d=R.subn(1),g=0;!d.testn(g);g++);for(var M=R.shrn(g),x=d.toRed(v),B=!0;f>0;f--){var A=this._randrange(new _(2),d);w&&w(A);var D=A.toRed(v).redPow(M);if(!(D.cmp(y)===0||D.cmp(x)===0)){for(var C=1;C<g;C++){if(D=D.redSqr(),D.cmp(y)===0)return!1;if(D.cmp(x)===0)break}if(C===g)return!1}}return B},I.prototype.getDivisor=function(R,f){var w=R.bitLength(),m=_.mont(R),v=new _(1).toRed(m);f||(f=Math.max(1,w/48|0));for(var y=R.subn(1),d=0;!y.testn(d);d++);for(var g=R.shrn(d),M=y.toRed(m);f>0;f--){var x=this._randrange(new _(2),y),B=R.gcd(x);if(B.cmpn(1)!==0)return B;var A=x.toRed(m).redPow(g);if(!(A.cmp(v)===0||A.cmp(M)===0)){for(var D=1;D<d;D++){if(A=A.redSqr(),A.cmp(v)===0)return A.fromRed().subn(1).gcd(R);if(A.cmp(M)===0)break}if(D===d)return A=A.redSqr(),A.fromRed().subn(1).gcd(R)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var _=requireBrowser$b();generatePrime=D,D.simpleSieve=B,D.fermatTest=A;var S=requireBn$6(),I=new S(24),p=requireMr(),R=new p,f=new S(1),w=new S(2),m=new S(5);new S(16),new S(8);var v=new S(10),y=new S(3);new S(7);var d=new S(11),g=new S(4);new S(12);var M=null;function x(){if(M!==null)return M;var C=1048576,$=[];$[0]=2;for(var H=1,N=3;N<C;N+=2){for(var V=Math.ceil(Math.sqrt(N)),Q=0;Q<H&&$[Q]<=V&&N%$[Q]!==0;Q++);H!==Q&&$[Q]<=V||($[H++]=N)}return M=$,$}function B(C){for(var $=x(),H=0;H<$.length;H++)if(C.modn($[H])===0)return C.cmpn($[H])===0;return!0}function A(C){var $=S.mont(C);return w.toRed($).redPow(C.subn(1)).fromRed().cmpn(1)===0}function D(C,$){if(C<16)return $===2||$===5?new S([140,123]):new S([140,39]);$=new S($);for(var H,N;;){for(H=new S(_(Math.ceil(C/8)));H.bitLength()>C;)H.ishrn(1);if(H.isEven()&&H.iadd(f),H.testn(1)||H.iadd(w),$.cmp(w)){if(!$.cmp(m))for(;H.mod(v).cmp(y);)H.iadd(g)}else for(;H.mod(I).cmp(d);)H.iadd(g);if(N=H.shrn(1),B(N)&&B(H)&&A(N)&&A(H)&&R.test(N)&&R.test(H))return H}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},require$$1$1={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18};var dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var _=requireBn$6(),S=requireMr(),I=new S,p=new _(24),R=new _(11),f=new _(10),w=new _(3),m=new _(7),v=requireGeneratePrime(),y=requireBrowser$b();dh=B;function d(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this._pub=new _(D),this}function g(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this._priv=new _(D),this}var M={};function x(D,C){var $=C.toString("hex"),H=[$,D.toString(16)].join("_");if(H in M)return M[H];var N=0;if(D.isEven()||!v.simpleSieve||!v.fermatTest(D)||!I.test(D))return N+=1,$==="02"||$==="05"?N+=8:N+=4,M[H]=N,N;I.test(D.shrn(1))||(N+=2);var V;switch($){case"02":D.mod(p).cmp(R)&&(N+=8);break;case"05":V=D.mod(f),V.cmp(w)&&V.cmp(m)&&(N+=8);break;default:N+=4}return M[H]=N,N}function B(D,C,$){this.setGenerator(C),this.__prime=new _(D),this._prime=_.mont(this.__prime),this._primeLen=D.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,$?(this.setPublicKey=d,this.setPrivateKey=g):this._primeCode=8}Object.defineProperty(B.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=x(this.__prime,this.__gen)),this._primeCode}}),B.prototype.generateKeys=function(){return this._priv||(this._priv=new _(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},B.prototype.computeSecret=function(D){D=new _(D),D=D.toRed(this._prime);var C=D.redPow(this._priv).fromRed(),$=new Buffer(C.toArray()),H=this.getPrime();if($.length<H.length){var N=new Buffer(H.length-$.length);N.fill(0),$=Buffer.concat([N,$])}return $},B.prototype.getPublicKey=function(C){return A(this._pub,C)},B.prototype.getPrivateKey=function(C){return A(this._priv,C)},B.prototype.getPrime=function(D){return A(this.__prime,D)},B.prototype.getGenerator=function(D){return A(this._gen,D)},B.prototype.setGenerator=function(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this.__gen=D,this._gen=new _(D),this};function A(D,C){var $=new Buffer(D.toArray());return C?$.toString(C):$}return dh}var hasRequiredBrowser$4;function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var _=requireGeneratePrime(),S=require$$1$1,I=requireDh();function p(w){var m=new Buffer(S[w].prime,"hex"),v=new Buffer(S[w].gen,"hex");return new I(m,v)}var R={binary:!0,hex:!0,base64:!0};function f(w,m,v,y){return Buffer.isBuffer(m)||R[m]===void 0?f(w,"binary",m,v):(m=m||"binary",y=y||"binary",v=v||new Buffer([2]),Buffer.isBuffer(v)||(v=new Buffer(v,y)),typeof w=="number"?new I(_(w,v),v,!0):(Buffer.isBuffer(w)||(w=new Buffer(w,m)),new I(w,v,!0)))}return browser$4.DiffieHellmanGroup=browser$4.createDiffieHellmanGroup=browser$4.getDiffieHellman=p,browser$4.createDiffieHellman=browser$4.DiffieHellman=f,browser$4}var readableBrowser={exports:{}},isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var _={}.toString;return isarray=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray}var streamBrowser,hasRequiredStreamBrowser;function requireStreamBrowser(){return hasRequiredStreamBrowser||(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter),streamBrowser}var safeBuffer={exports:{}},hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer,safeBuffer.exports)),safeBuffer.exports}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,(function(_){function S(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}var I=requireSafeBuffer().Buffer,p=requireUtil$1();function R(f,w,m){f.copy(w,m)}_.exports=(function(){function f(){S(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(m){var v={data:m,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},f.prototype.unshift=function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},f.prototype.shift=function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(m){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=m+v.data;return y},f.prototype.concat=function(m){if(this.length===0)return I.alloc(0);for(var v=I.allocUnsafe(m>>>0),y=this.head,d=0;y;)R(y.data,v,d),d+=y.data.length,y=y.next;return v},f})(),p&&p.inspect&&p.inspect.custom&&(_.exports.prototype[p.inspect.custom]=function(){var f=p.inspect({length:this.length});return this.constructor.name+" "+f})})(BufferList)),BufferList.exports}var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var _=requireProcessNextickArgs();function S(R,f){var w=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(f?f(R):R&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(p,this,R)):_.nextTick(p,this,R)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(R||null,function(y){!f&&y?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,_.nextTick(p,w,y)):_.nextTick(p,w,y):f&&f(y)}),this)}function I(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(R,f){R.emit("error",f)}return destroy_1={destroy:S,undestroy:I},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var _=requireProcessNextickArgs();_stream_writable=A;function S(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var I=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:_.nextTick,p;A.WritableState=x;var R=Object.create(requireUtil());R.inherits=requireInherits_browser();var f={deprecate:requireBrowser$a()},w=requireStreamBrowser(),m=requireSafeBuffer().Buffer,v=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y(u){return m.from(u)}function d(u){return m.isBuffer(u)||u instanceof v}var g=requireDestroy();R.inherits(A,w);function M(){}function x(u,l){p=p||require_stream_duplex(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,b=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=b,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var E=u.decodeStrings===!1;this.decodeStrings=!E,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){ne(l,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}x.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(x.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(u){return B.call(this,u)?!0:this!==A?!1:u&&u._writableState instanceof x}})):B=function(u){return u instanceof this};function A(u){if(p=p||require_stream_duplex(),!B.call(A,this)&&!(this instanceof p))return new A(u);this._writableState=new x(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function D(u,l){var o=new Error("write after end");u.emit("error",o),_.nextTick(l,o)}function C(u,l,o,r){var h=!0,b=!1;return o===null?b=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(b=new TypeError("Invalid non-string/buffer chunk")),b&&(u.emit("error",b),_.nextTick(r,b),h=!1),h}A.prototype.write=function(u,l,o){var r=this._writableState,h=!1,b=!r.objectMode&&d(u);return b&&!m.isBuffer(u)&&(u=y(u)),typeof l=="function"&&(o=l,l=null),b?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=M),r.ended?D(this,o):(b||C(this,r,u,o))&&(r.pendingcb++,h=H(this,r,b,u,l,o)),h},A.prototype.cork=function(){var u=this._writableState;u.corked++},A.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&le(this,u))},A.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function $(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=m.from(l,o)),l}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(u,l,o,r,h,b){if(!o){var E=$(l,r,h);r!==E&&(o=!0,h="buffer",r=E)}var L=l.objectMode?1:r.length;l.length+=L;var Y=l.length<l.highWaterMark;if(Y||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:b,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else N(u,l,!1,L,r,h,b);return Y}function N(u,l,o,r,h,b,E){l.writelen=r,l.writecb=E,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,b,l.onwrite),l.sync=!1}function V(u,l,o,r,h){--l.pendingcb,o?(_.nextTick(h,r),_.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),l)V(u,o,r,l,h);else{var b=c(o);!b&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&le(u,o),r?I(ae,u,o,b,h):ae(u,o,b,h)}}function ae(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function le(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),b=l.corkedRequestsFree;b.entry=o;for(var E=0,L=!0;o;)h[E]=o,o.isBuf||(L=!1),o=o.next,E+=1;h.allBuffers=L,N(u,l,!0,l.length,h,"",b.finish),l.pendingcb++,l.lastBufferedRequest=null,b.next?(l.corkedRequestsFree=b.next,b.next=null):l.corkedRequestsFree=new S(l),l.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,K=o.encoding,q=o.callback,P=l.objectMode?1:Y.length;if(N(u,l,!1,P,Y,K,q),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}A.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||a(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,_.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function a(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?_.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable}var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var _=requireProcessNextickArgs(),S=Object.keys||function(g){var M=[];for(var x in g)M.push(x);return M};_stream_duplex=v;var I=Object.create(requireUtil());I.inherits=requireInherits_browser();var p=require_stream_readable(),R=require_stream_writable();I.inherits(v,p);for(var f=S(R.prototype),w=0;w<f.length;w++){var m=f[w];v.prototype[m]||(v.prototype[m]=R.prototype[m])}function v(g){if(!(this instanceof v))return new v(g);p.call(this,g),R.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||_.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),v.prototype._destroy=function(g,M){this.push(null),this.end(),_.nextTick(M,g)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var _=requireProcessNextickArgs();_stream_readable=$;var S=requireIsarray(),I;$.ReadableState=C,requireEvents().EventEmitter;var p=function(q,P){return q.listeners(P).length},R=requireStreamBrowser(),f=requireSafeBuffer().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(q){return f.from(q)}function v(q){return f.isBuffer(q)||q instanceof w}var y=Object.create(requireUtil());y.inherits=requireInherits_browser();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var M=requireBufferList(),x=requireDestroy(),B;y.inherits($,R);var A=["error","close","destroy","pause","resume"];function D(q,P,W){if(typeof q.prependListener=="function")return q.prependListener(P,W);!q._events||!q._events[P]?q.on(P,W):S(q._events[P])?q._events[P].unshift(W):q._events[P]=[W,q._events[P]]}function C(q,P){I=I||require_stream_duplex(),q=q||{};var W=P instanceof I;this.objectMode=!!q.objectMode,W&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var J=q.highWaterMark,X=q.readableHighWaterMark,U=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:W&&(X||X===0)?this.highWaterMark=X:this.highWaterMark=U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(B||(B=requireString_decoder().StringDecoder),this.decoder=new B(q.encoding),this.encoding=q.encoding)}function $(q){if(I=I||require_stream_duplex(),!(this instanceof $))return new $(q);this._readableState=new C(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),R.call(this)}Object.defineProperty($.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),$.prototype.destroy=x.destroy,$.prototype._undestroy=x.undestroy,$.prototype._destroy=function(q,P){this.push(null),P(q)},$.prototype.push=function(q,P){var W=this._readableState,J;return W.objectMode?J=!0:typeof q=="string"&&(P=P||W.defaultEncoding,P!==W.encoding&&(q=f.from(q,P),P=""),J=!0),H(this,q,P,!1,J)},$.prototype.unshift=function(q){return H(this,q,null,!0,!1)};function H(q,P,W,J,X){var U=q._readableState;if(P===null)U.reading=!1,le(q,U);else{var re;X||(re=V(U,P)),re?q.emit("error",re):U.objectMode||P&&P.length>0?(typeof P!="string"&&!U.objectMode&&Object.getPrototypeOf(P)!==f.prototype&&(P=m(P)),J?U.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):N(q,U,P,!0):U.ended?q.emit("error",new Error("stream.push() after EOF")):(U.reading=!1,U.decoder&&!W?(P=U.decoder.write(P),U.objectMode||P.length!==0?N(q,U,P,!1):t(q,U)):N(q,U,P,!1))):J||(U.reading=!1)}return Q(U)}function N(q,P,W,J){P.flowing&&P.length===0&&!P.sync?(q.emit("data",W),q.read(0)):(P.length+=P.objectMode?1:W.length,J?P.buffer.unshift(W):P.buffer.push(W),P.needReadable&&c(q)),t(q,P)}function V(q,P){var W;return!v(P)&&typeof P!="string"&&P!==void 0&&!q.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function Q(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(q){return B||(B=requireString_decoder().StringDecoder),this._readableState.decoder=new B(q),this._readableState.encoding=q,this};var ne=8388608;function ae(q){return q>=ne?q=ne:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function ee(q,P){return q<=0||P.length===0&&P.ended?0:P.objectMode?1:q!==q?P.flowing&&P.length?P.buffer.head.data.length:P.length:(q>P.highWaterMark&&(P.highWaterMark=ae(q)),q<=P.length?q:P.ended?P.length:(P.needReadable=!0,0))}$.prototype.read=function(q){g("read",q),q=parseInt(q,10);var P=this._readableState,W=q;if(q!==0&&(P.emittedReadable=!1),q===0&&P.needReadable&&(P.length>=P.highWaterMark||P.ended))return g("read: emitReadable",P.length,P.ended),P.length===0&&P.ended?L(this):c(this),null;if(q=ee(q,P),q===0&&P.ended)return P.length===0&&L(this),null;var J=P.needReadable;g("need readable",J),(P.length===0||P.length-q<P.highWaterMark)&&(J=!0,g("length less than watermark",J)),P.ended||P.reading?(J=!1,g("reading or ended",J)):J&&(g("do read"),P.reading=!0,P.sync=!0,P.length===0&&(P.needReadable=!0),this._read(P.highWaterMark),P.sync=!1,P.reading||(q=ee(W,P)));var X;return q>0?X=r(q,P):X=null,X===null?(P.needReadable=!0,q=0):P.length-=q,P.length===0&&(P.ended||(P.needReadable=!0),W!==q&&P.ended&&L(this)),X!==null&&this.emit("data",X),X};function le(q,P){if(!P.ended){if(P.decoder){var W=P.decoder.end();W&&W.length&&(P.buffer.push(W),P.length+=P.objectMode?1:W.length)}P.ended=!0,c(q)}}function c(q){var P=q._readableState;P.needReadable=!1,P.emittedReadable||(g("emitReadable",P.flowing),P.emittedReadable=!0,P.sync?_.nextTick(e,q):e(q))}function e(q){g("emit readable"),q.emit("readable"),o(q)}function t(q,P){P.readingMore||(P.readingMore=!0,_.nextTick(n,q,P))}function n(q,P){for(var W=P.length;!P.reading&&!P.flowing&&!P.ended&&P.length<P.highWaterMark&&(g("maybeReadMore read 0"),q.read(0),W!==P.length);)W=P.length;P.readingMore=!1}$.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},$.prototype.pipe=function(q,P){var W=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=q;break;case 1:J.pipes=[J.pipes,q];break;default:J.pipes.push(q);break}J.pipesCount+=1,g("pipe count=%d opts=%j",J.pipesCount,P);var X=(!P||P.end!==!1)&&q!==process$1.stdout&&q!==process$1.stderr,U=X?Ie:Ce;J.endEmitted?_.nextTick(U):W.once("end",U),q.on("unpipe",re);function re(pe,_e){g("onunpipe"),pe===W&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,$e())}function Ie(){g("onend"),q.end()}var ue=a(W);q.on("drain",ue);var he=!1;function $e(){g("cleanup"),q.removeListener("close",de),q.removeListener("finish",ye),q.removeListener("drain",ue),q.removeListener("error",De),q.removeListener("unpipe",re),W.removeListener("end",Ie),W.removeListener("end",Ce),W.removeListener("data",se),he=!0,J.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ue()}var me=!1;W.on("data",se);function se(pe){g("ondata"),me=!1;var _e=q.write(pe);_e===!1&&!me&&((J.pipesCount===1&&J.pipes===q||J.pipesCount>1&&K(J.pipes,q)!==-1)&&!he&&(g("false write response, pause",J.awaitDrain),J.awaitDrain++,me=!0),W.pause())}function De(pe){g("onerror",pe),Ce(),q.removeListener("error",De),p(q,"error")===0&&q.emit("error",pe)}D(q,"error",De);function de(){q.removeListener("finish",ye),Ce()}q.once("close",de);function ye(){g("onfinish"),q.removeListener("close",de),Ce()}q.once("finish",ye);function Ce(){g("unpipe"),W.unpipe(q)}return q.emit("pipe",W),J.flowing||(g("pipe resume"),W.resume()),q};function a(q){return function(){var P=q._readableState;g("pipeOnDrain",P.awaitDrain),P.awaitDrain&&P.awaitDrain--,P.awaitDrain===0&&p(q,"data")&&(P.flowing=!0,o(q))}}$.prototype.unpipe=function(q){var P=this._readableState,W={hasUnpiped:!1};if(P.pipesCount===0)return this;if(P.pipesCount===1)return q&&q!==P.pipes?this:(q||(q=P.pipes),P.pipes=null,P.pipesCount=0,P.flowing=!1,q&&q.emit("unpipe",this,W),this);if(!q){var J=P.pipes,X=P.pipesCount;P.pipes=null,P.pipesCount=0,P.flowing=!1;for(var U=0;U<X;U++)J[U].emit("unpipe",this,{hasUnpiped:!1});return this}var re=K(P.pipes,q);return re===-1?this:(P.pipes.splice(re,1),P.pipesCount-=1,P.pipesCount===1&&(P.pipes=P.pipes[0]),q.emit("unpipe",this,W),this)},$.prototype.on=function(q,P){var W=R.prototype.on.call(this,q,P);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var J=this._readableState;!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.emittedReadable=!1,J.reading?J.length&&c(this):_.nextTick(s,this))}return W},$.prototype.addListener=$.prototype.on;function s(q){g("readable nexttick read 0"),q.read(0)}$.prototype.resume=function(){var q=this._readableState;return q.flowing||(g("resume"),q.flowing=!0,u(this,q)),this};function u(q,P){P.resumeScheduled||(P.resumeScheduled=!0,_.nextTick(l,q,P))}function l(q,P){P.reading||(g("resume read 0"),q.read(0)),P.resumeScheduled=!1,P.awaitDrain=0,q.emit("resume"),o(q),P.flowing&&!P.reading&&q.read(0)}$.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(q){var P=q._readableState;for(g("flow",P.flowing);P.flowing&&q.read()!==null;);}$.prototype.wrap=function(q){var P=this,W=this._readableState,J=!1;q.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var re=W.decoder.end();re&&re.length&&P.push(re)}P.push(null)}),q.on("data",function(re){if(g("wrapped data"),W.decoder&&(re=W.decoder.write(re)),!(W.objectMode&&re==null)&&!(!W.objectMode&&(!re||!re.length))){var Ie=P.push(re);Ie||(J=!0,q.pause())}});for(var X in q)this[X]===void 0&&typeof q[X]=="function"&&(this[X]=(function(re){return function(){return q[re].apply(q,arguments)}})(X));for(var U=0;U<A.length;U++)q.on(A[U],this.emit.bind(this,A[U]));return this._read=function(re){g("wrapped _read",re),J&&(J=!1,q.resume())},this},Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),$._fromList=r;function r(q,P){if(P.length===0)return null;var W;return P.objectMode?W=P.buffer.shift():!q||q>=P.length?(P.decoder?W=P.buffer.join(""):P.buffer.length===1?W=P.buffer.head.data:W=P.buffer.concat(P.length),P.buffer.clear()):W=h(q,P.buffer,P.decoder),W}function h(q,P,W){var J;return q<P.head.data.length?(J=P.head.data.slice(0,q),P.head.data=P.head.data.slice(q)):q===P.head.data.length?J=P.shift():J=W?b(q,P):E(q,P),J}function b(q,P){var W=P.head,J=1,X=W.data;for(q-=X.length;W=W.next;){var U=W.data,re=q>U.length?U.length:q;if(re===U.length?X+=U:X+=U.slice(0,q),q-=re,q===0){re===U.length?(++J,W.next?P.head=W.next:P.head=P.tail=null):(P.head=W,W.data=U.slice(re));break}++J}return P.length-=J,X}function E(q,P){var W=f.allocUnsafe(q),J=P.head,X=1;for(J.data.copy(W),q-=J.data.length;J=J.next;){var U=J.data,re=q>U.length?U.length:q;if(U.copy(W,W.length-q,0,re),q-=re,q===0){re===U.length?(++X,J.next?P.head=J.next:P.head=P.tail=null):(P.head=J,J.data=U.slice(re));break}++X}return P.length-=X,W}function L(q){var P=q._readableState;if(P.length>0)throw new Error('"endReadable()" called on non-empty stream');P.endEmitted||(P.ended=!0,_.nextTick(Y,P,q))}function Y(q,P){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,P.readable=!1,P.emit("end"))}function K(q,P){for(var W=0,J=q.length;W<J;W++)if(q[W]===P)return W;return-1}return _stream_readable}var _stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=p;var _=require_stream_duplex(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(p,_);function I(w,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);_.call(this,w),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",R)}function R(){var w=this;typeof this._flush=="function"?this._flush(function(m,v){f(w,m,v)}):f(this,null,null)}p.prototype.push=function(w,m){return this._transformState.needTransform=!1,_.prototype.push.call(this,w,m)},p.prototype._transform=function(w,m,v){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=w,y.writeencoding=m,!y.transforming){var d=this._readableState;(y.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},p.prototype._destroy=function(w,m){var v=this;_.prototype._destroy.call(this,w,function(y){m(y),v.emit("close")})};function f(w,m,v){if(m)return w.emit("error",m);if(v!=null&&w.push(v),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform}var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=I;var _=require_stream_transform(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(I,_);function I(p){if(!(this instanceof I))return new I(p);_.call(this,p)}return I.prototype._transform=function(p,R,f){f(null,p)},_stream_passthrough}var hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,(function(_,S){S=_.exports=require_stream_readable(),S.Stream=S,S.Readable=S,S.Writable=require_stream_writable(),S.Duplex=require_stream_duplex(),S.Transform=require_stream_transform(),S.PassThrough=require_stream_passthrough()})(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var sign={exports:{}},bn$9={exports:{}},bn$8=bn$9.exports,hasRequiredBn$4;function requireBn$4(){return hasRequiredBn$4||(hasRequiredBn$4=1,(function(_){(function(S,I){function p(t,n){if(!t)throw new Error(n||"Assertion failed")}function R(t,n){t.super_=n;var a=function(){};a.prototype=n.prototype,t.prototype=new a,t.prototype.constructor=t}function f(t,n,a){if(f.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,t!==null&&((n==="le"||n==="be")&&(a=n,n=10),this._init(t||0,n||10,a||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(n){return n instanceof f?!0:n!==null&&typeof n=="object"&&n.constructor.wordSize===f.wordSize&&Array.isArray(n.words)},f.max=function(n,a){return n.cmp(a)>0?n:a},f.min=function(n,a){return n.cmp(a)<0?n:a},f.prototype._init=function(n,a,s){if(typeof n=="number")return this._initNumber(n,a,s);if(typeof n=="object")return this._initArray(n,a,s);a==="hex"&&(a=16),p(a===(a|0)&&a>=2&&a<=36),n=n.toString().replace(/\s+/g,"");var u=0;n[0]==="-"&&(u++,this.negative=1),u<n.length&&(a===16?this._parseHex(n,u,s):(this._parseBase(n,a,u),s==="le"&&this._initArray(this.toArray(),a,s)))},f.prototype._initNumber=function(n,a,s){n<0&&(this.negative=1,n=-n),n<67108864?(this.words=[n&67108863],this.length=1):n<4503599627370496?(this.words=[n&67108863,n/67108864&67108863],this.length=2):(p(n<9007199254740992),this.words=[n&67108863,n/67108864&67108863,1],this.length=3),s==="le"&&this._initArray(this.toArray(),a,s)},f.prototype._initArray=function(n,a,s){if(p(typeof n.length=="number"),n.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(n.length/3),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l,o,r=0;if(s==="be")for(u=n.length-1,l=0;u>=0;u-=3)o=n[u]|n[u-1]<<8|n[u-2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);else if(s==="le")for(u=0,l=0;u<n.length;u+=3)o=n[u]|n[u+1]<<8|n[u+2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);return this._strip()};function m(t,n){var a=t.charCodeAt(n);if(a>=48&&a<=57)return a-48;if(a>=65&&a<=70)return a-55;if(a>=97&&a<=102)return a-87;p(!1,"Invalid character in "+t)}function v(t,n,a){var s=m(t,a);return a-1>=n&&(s|=m(t,a-1)<<4),s}f.prototype._parseHex=function(n,a,s){this.length=Math.ceil((n.length-a)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,o=0,r;if(s==="be")for(u=n.length-1;u>=a;u-=2)r=v(n,a,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8;else{var h=n.length-a;for(u=h%2===0?a+1:a;u<n.length;u+=2)r=v(n,a,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8}this._strip()};function y(t,n,a,s){for(var u=0,l=0,o=Math.min(t.length,a),r=n;r<o;r++){var h=t.charCodeAt(r)-48;u*=s,h>=49?l=h-49+10:h>=17?l=h-17+10:l=h,p(h>=0&&l<s,"Invalid character"),u+=l}return u}f.prototype._parseBase=function(n,a,s){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=a)u++;u--,l=l/a|0;for(var o=n.length-s,r=o%u,h=Math.min(o,o-r)+s,b=0,E=s;E<h;E+=u)b=y(n,E,E+u,a),this.imuln(l),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b);if(r!==0){var L=1;for(b=y(n,E,n.length,a),E=0;E<r;E++)L*=a;this.imuln(L),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b)}this._strip()},f.prototype.copy=function(n){n.words=new Array(this.length);for(var a=0;a<this.length;a++)n.words[a]=this.words[a];n.length=this.length,n.negative=this.negative,n.red=this.red};function d(t,n){t.words=n.words,t.length=n.length,t.negative=n.negative,t.red=n.red}if(f.prototype._move=function(n){d(n,this)},f.prototype.clone=function(){var n=new f(null);return this.copy(n),n},f.prototype._expand=function(n){for(;this.length<n;)this.words[this.length++]=0;return this},f.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{f.prototype.inspect=g}else f.prototype.inspect=g;function g(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var M=["","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"],x=[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],B=[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];f.prototype.toString=function(n,a){n=n||10,a=a|0||1;var s;if(n===16||n==="hex"){s="";for(var u=0,l=0,o=0;o<this.length;o++){var r=this.words[o],h=((r<<u|l)&16777215).toString(16);l=r>>>24-u&16777215,u+=2,u>=26&&(u-=26,o--),l!==0||o!==this.length-1?s=M[6-h.length]+h+s:s=h+s}for(l!==0&&(s=l.toString(16)+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}if(n===(n|0)&&n>=2&&n<=36){var b=x[n],E=B[n];s="";var L=this.clone();for(L.negative=0;!L.isZero();){var Y=L.modrn(E).toString(n);L=L.idivn(E),L.isZero()?s=Y+s:s=M[b-Y.length]+Y+s}for(this.isZero()&&(s="0"+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var n=this.words[0];return this.length===2?n+=this.words[1]*67108864:this.length===3&&this.words[2]===1?n+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-n:n},f.prototype.toJSON=function(){return this.toString(16,2)},w&&(f.prototype.toBuffer=function(n,a){return this.toArrayLike(w,n,a)}),f.prototype.toArray=function(n,a){return this.toArrayLike(Array,n,a)};var A=function(n,a){return n.allocUnsafe?n.allocUnsafe(a):new n(a)};f.prototype.toArrayLike=function(n,a,s){this._strip();var u=this.byteLength(),l=s||Math.max(1,u);p(u<=l,"byte array longer than desired length"),p(l>0,"Requested array length <= 0");var o=A(n,l),r=a==="le"?"LE":"BE";return this["_toArrayLike"+r](o,u),o},f.prototype._toArrayLikeLE=function(n,a){for(var s=0,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s++]=r&255,s<n.length&&(n[s++]=r>>8&255),s<n.length&&(n[s++]=r>>16&255),o===6?(s<n.length&&(n[s++]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s<n.length)for(n[s++]=u;s<n.length;)n[s++]=0},f.prototype._toArrayLikeBE=function(n,a){for(var s=n.length-1,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s--]=r&255,s>=0&&(n[s--]=r>>8&255),s>=0&&(n[s--]=r>>16&255),o===6?(s>=0&&(n[s--]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s>=0)for(n[s--]=u;s>=0;)n[s--]=0},Math.clz32?f.prototype._countBits=function(n){return 32-Math.clz32(n)}:f.prototype._countBits=function(n){var a=n,s=0;return a>=4096&&(s+=13,a>>>=13),a>=64&&(s+=7,a>>>=7),a>=8&&(s+=4,a>>>=4),a>=2&&(s+=2,a>>>=2),s+a},f.prototype._zeroBits=function(n){if(n===0)return 26;var a=n,s=0;return(a&8191)===0&&(s+=13,a>>>=13),(a&127)===0&&(s+=7,a>>>=7),(a&15)===0&&(s+=4,a>>>=4),(a&3)===0&&(s+=2,a>>>=2),(a&1)===0&&s++,s},f.prototype.bitLength=function(){var n=this.words[this.length-1],a=this._countBits(n);return(this.length-1)*26+a};function D(t){for(var n=new Array(t.bitLength()),a=0;a<n.length;a++){var s=a/26|0,u=a%26;n[a]=t.words[s]>>>u&1}return n}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,a=0;a<this.length;a++){var s=this._zeroBits(this.words[a]);if(n+=s,s!==26)break}return n},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(n){return this.negative!==0?this.abs().inotn(n).iaddn(1):this.clone()},f.prototype.fromTwos=function(n){return this.testn(n-1)?this.notn(n).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(n){for(;this.length<n.length;)this.words[this.length++]=0;for(var a=0;a<n.length;a++)this.words[a]=this.words[a]|n.words[a];return this._strip()},f.prototype.ior=function(n){return p((this.negative|n.negative)===0),this.iuor(n)},f.prototype.or=function(n){return this.length>n.length?this.clone().ior(n):n.clone().ior(this)},f.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},f.prototype.iuand=function(n){var a;this.length>n.length?a=n:a=this;for(var s=0;s<a.length;s++)this.words[s]=this.words[s]&n.words[s];return this.length=a.length,this._strip()},f.prototype.iand=function(n){return p((this.negative|n.negative)===0),this.iuand(n)},f.prototype.and=function(n){return this.length>n.length?this.clone().iand(n):n.clone().iand(this)},f.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},f.prototype.iuxor=function(n){var a,s;this.length>n.length?(a=this,s=n):(a=n,s=this);for(var u=0;u<s.length;u++)this.words[u]=a.words[u]^s.words[u];if(this!==a)for(;u<a.length;u++)this.words[u]=a.words[u];return this.length=a.length,this._strip()},f.prototype.ixor=function(n){return p((this.negative|n.negative)===0),this.iuxor(n)},f.prototype.xor=function(n){return this.length>n.length?this.clone().ixor(n):n.clone().ixor(this)},f.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},f.prototype.inotn=function(n){p(typeof n=="number"&&n>=0);var a=Math.ceil(n/26)|0,s=n%26;this._expand(a),s>0&&a--;for(var u=0;u<a;u++)this.words[u]=~this.words[u]&67108863;return s>0&&(this.words[u]=~this.words[u]&67108863>>26-s),this._strip()},f.prototype.notn=function(n){return this.clone().inotn(n)},f.prototype.setn=function(n,a){p(typeof n=="number"&&n>=0);var s=n/26|0,u=n%26;return this._expand(s+1),a?this.words[s]=this.words[s]|1<<u:this.words[s]=this.words[s]&~(1<<u),this._strip()},f.prototype.iadd=function(n){var a;if(this.negative!==0&&n.negative===0)return this.negative=0,a=this.isub(n),this.negative^=1,this._normSign();if(this.negative===0&&n.negative!==0)return n.negative=0,a=this.isub(n),n.negative=1,a._normSign();var s,u;this.length>n.length?(s=this,u=n):(s=n,u=this);for(var l=0,o=0;o<u.length;o++)a=(s.words[o]|0)+(u.words[o]|0)+l,this.words[o]=a&67108863,l=a>>>26;for(;l!==0&&o<s.length;o++)a=(s.words[o]|0)+l,this.words[o]=a&67108863,l=a>>>26;if(this.length=s.length,l!==0)this.words[this.length]=l,this.length++;else if(s!==this)for(;o<s.length;o++)this.words[o]=s.words[o];return this},f.prototype.add=function(n){var a;return n.negative!==0&&this.negative===0?(n.negative=0,a=this.sub(n),n.negative^=1,a):n.negative===0&&this.negative!==0?(this.negative=0,a=n.sub(this),this.negative=1,a):this.length>n.length?this.clone().iadd(n):n.clone().iadd(this)},f.prototype.isub=function(n){if(n.negative!==0){n.negative=0;var a=this.iadd(n);return n.negative=1,a._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var s=this.cmp(n);if(s===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,l;s>0?(u=this,l=n):(u=n,l=this);for(var o=0,r=0;r<l.length;r++)a=(u.words[r]|0)-(l.words[r]|0)+o,o=a>>26,this.words[r]=a&67108863;for(;o!==0&&r<u.length;r++)a=(u.words[r]|0)+o,o=a>>26,this.words[r]=a&67108863;if(o===0&&r<u.length&&u!==this)for(;r<u.length;r++)this.words[r]=u.words[r];return this.length=Math.max(this.length,r),u!==this&&(this.negative=1),this._strip()},f.prototype.sub=function(n){return this.clone().isub(n)};function C(t,n,a){a.negative=n.negative^t.negative;var s=t.length+n.length|0;a.length=s,s=s-1|0;var u=t.words[0]|0,l=n.words[0]|0,o=u*l,r=o&67108863,h=o/67108864|0;a.words[0]=r;for(var b=1;b<s;b++){for(var E=h>>>26,L=h&67108863,Y=Math.min(b,n.length-1),K=Math.max(0,b-t.length+1);K<=Y;K++){var q=b-K|0;u=t.words[q]|0,l=n.words[K]|0,o=u*l+L,E+=o/67108864|0,L=o&67108863}a.words[b]=L|0,h=E|0}return h!==0?a.words[b]=h|0:a.length--,a._strip()}var $=function(n,a,s){var u=n.words,l=a.words,o=s.words,r=0,h,b,E,L=u[0]|0,Y=L&8191,K=L>>>13,q=u[1]|0,P=q&8191,W=q>>>13,J=u[2]|0,X=J&8191,U=J>>>13,re=u[3]|0,Ie=re&8191,ue=re>>>13,he=u[4]|0,$e=he&8191,me=he>>>13,se=u[5]|0,De=se&8191,de=se>>>13,ye=u[6]|0,Ce=ye&8191,pe=ye>>>13,_e=u[7]|0,Ue=_e&8191,xe=_e>>>13,Ae=u[8]|0,je=Ae&8191,j=Ae>>>13,k=u[9]|0,O=k&8191,G=k>>>13,te=l[0]|0,ce=te&8191,fe=te>>>13,we=l[1]|0,Ne=we&8191,be=we>>>13,Se=l[2]|0,Oe=Se&8191,qe=Se>>>13,ke=l[3]|0,We=ke&8191,Re=ke>>>13,Te=l[4]|0,Ke=Te&8191,z=Te>>>13,T=l[5]|0,F=T&8191,Z=T>>>13,ie=l[6]|0,ve=ie&8191,oe=ie>>>13,Me=l[7]|0,Le=Me&8191,ge=Me>>>13,Be=l[8]|0,Fe=Be&8191,Ee=Be>>>13,Pe=l[9]|0,He=Pe&8191,ze=Pe>>>13;s.negative=n.negative^a.negative,s.length=19,h=Math.imul(Y,ce),b=Math.imul(Y,fe),b=b+Math.imul(K,ce)|0,E=Math.imul(K,fe);var Ge=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,h=Math.imul(P,ce),b=Math.imul(P,fe),b=b+Math.imul(W,ce)|0,E=Math.imul(W,fe),h=h+Math.imul(Y,Ne)|0,b=b+Math.imul(Y,be)|0,b=b+Math.imul(K,Ne)|0,E=E+Math.imul(K,be)|0;var Ze=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,h=Math.imul(X,ce),b=Math.imul(X,fe),b=b+Math.imul(U,ce)|0,E=Math.imul(U,fe),h=h+Math.imul(P,Ne)|0,b=b+Math.imul(P,be)|0,b=b+Math.imul(W,Ne)|0,E=E+Math.imul(W,be)|0,h=h+Math.imul(Y,Oe)|0,b=b+Math.imul(Y,qe)|0,b=b+Math.imul(K,Oe)|0,E=E+Math.imul(K,qe)|0;var Ve=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,h=Math.imul(Ie,ce),b=Math.imul(Ie,fe),b=b+Math.imul(ue,ce)|0,E=Math.imul(ue,fe),h=h+Math.imul(X,Ne)|0,b=b+Math.imul(X,be)|0,b=b+Math.imul(U,Ne)|0,E=E+Math.imul(U,be)|0,h=h+Math.imul(P,Oe)|0,b=b+Math.imul(P,qe)|0,b=b+Math.imul(W,Oe)|0,E=E+Math.imul(W,qe)|0,h=h+Math.imul(Y,We)|0,b=b+Math.imul(Y,Re)|0,b=b+Math.imul(K,We)|0,E=E+Math.imul(K,Re)|0;var Xe=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,h=Math.imul($e,ce),b=Math.imul($e,fe),b=b+Math.imul(me,ce)|0,E=Math.imul(me,fe),h=h+Math.imul(Ie,Ne)|0,b=b+Math.imul(Ie,be)|0,b=b+Math.imul(ue,Ne)|0,E=E+Math.imul(ue,be)|0,h=h+Math.imul(X,Oe)|0,b=b+Math.imul(X,qe)|0,b=b+Math.imul(U,Oe)|0,E=E+Math.imul(U,qe)|0,h=h+Math.imul(P,We)|0,b=b+Math.imul(P,Re)|0,b=b+Math.imul(W,We)|0,E=E+Math.imul(W,Re)|0,h=h+Math.imul(Y,Ke)|0,b=b+Math.imul(Y,z)|0,b=b+Math.imul(K,Ke)|0,E=E+Math.imul(K,z)|0;var Je=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Je>>>26)|0,Je&=67108863,h=Math.imul(De,ce),b=Math.imul(De,fe),b=b+Math.imul(de,ce)|0,E=Math.imul(de,fe),h=h+Math.imul($e,Ne)|0,b=b+Math.imul($e,be)|0,b=b+Math.imul(me,Ne)|0,E=E+Math.imul(me,be)|0,h=h+Math.imul(Ie,Oe)|0,b=b+Math.imul(Ie,qe)|0,b=b+Math.imul(ue,Oe)|0,E=E+Math.imul(ue,qe)|0,h=h+Math.imul(X,We)|0,b=b+Math.imul(X,Re)|0,b=b+Math.imul(U,We)|0,E=E+Math.imul(U,Re)|0,h=h+Math.imul(P,Ke)|0,b=b+Math.imul(P,z)|0,b=b+Math.imul(W,Ke)|0,E=E+Math.imul(W,z)|0,h=h+Math.imul(Y,F)|0,b=b+Math.imul(Y,Z)|0,b=b+Math.imul(K,F)|0,E=E+Math.imul(K,Z)|0;var Ye=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,h=Math.imul(Ce,ce),b=Math.imul(Ce,fe),b=b+Math.imul(pe,ce)|0,E=Math.imul(pe,fe),h=h+Math.imul(De,Ne)|0,b=b+Math.imul(De,be)|0,b=b+Math.imul(de,Ne)|0,E=E+Math.imul(de,be)|0,h=h+Math.imul($e,Oe)|0,b=b+Math.imul($e,qe)|0,b=b+Math.imul(me,Oe)|0,E=E+Math.imul(me,qe)|0,h=h+Math.imul(Ie,We)|0,b=b+Math.imul(Ie,Re)|0,b=b+Math.imul(ue,We)|0,E=E+Math.imul(ue,Re)|0,h=h+Math.imul(X,Ke)|0,b=b+Math.imul(X,z)|0,b=b+Math.imul(U,Ke)|0,E=E+Math.imul(U,z)|0,h=h+Math.imul(P,F)|0,b=b+Math.imul(P,Z)|0,b=b+Math.imul(W,F)|0,E=E+Math.imul(W,Z)|0,h=h+Math.imul(Y,ve)|0,b=b+Math.imul(Y,oe)|0,b=b+Math.imul(K,ve)|0,E=E+Math.imul(K,oe)|0;var Qe=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,h=Math.imul(Ue,ce),b=Math.imul(Ue,fe),b=b+Math.imul(xe,ce)|0,E=Math.imul(xe,fe),h=h+Math.imul(Ce,Ne)|0,b=b+Math.imul(Ce,be)|0,b=b+Math.imul(pe,Ne)|0,E=E+Math.imul(pe,be)|0,h=h+Math.imul(De,Oe)|0,b=b+Math.imul(De,qe)|0,b=b+Math.imul(de,Oe)|0,E=E+Math.imul(de,qe)|0,h=h+Math.imul($e,We)|0,b=b+Math.imul($e,Re)|0,b=b+Math.imul(me,We)|0,E=E+Math.imul(me,Re)|0,h=h+Math.imul(Ie,Ke)|0,b=b+Math.imul(Ie,z)|0,b=b+Math.imul(ue,Ke)|0,E=E+Math.imul(ue,z)|0,h=h+Math.imul(X,F)|0,b=b+Math.imul(X,Z)|0,b=b+Math.imul(U,F)|0,E=E+Math.imul(U,Z)|0,h=h+Math.imul(P,ve)|0,b=b+Math.imul(P,oe)|0,b=b+Math.imul(W,ve)|0,E=E+Math.imul(W,oe)|0,h=h+Math.imul(Y,Le)|0,b=b+Math.imul(Y,ge)|0,b=b+Math.imul(K,Le)|0,E=E+Math.imul(K,ge)|0;var er=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(er>>>26)|0,er&=67108863,h=Math.imul(je,ce),b=Math.imul(je,fe),b=b+Math.imul(j,ce)|0,E=Math.imul(j,fe),h=h+Math.imul(Ue,Ne)|0,b=b+Math.imul(Ue,be)|0,b=b+Math.imul(xe,Ne)|0,E=E+Math.imul(xe,be)|0,h=h+Math.imul(Ce,Oe)|0,b=b+Math.imul(Ce,qe)|0,b=b+Math.imul(pe,Oe)|0,E=E+Math.imul(pe,qe)|0,h=h+Math.imul(De,We)|0,b=b+Math.imul(De,Re)|0,b=b+Math.imul(de,We)|0,E=E+Math.imul(de,Re)|0,h=h+Math.imul($e,Ke)|0,b=b+Math.imul($e,z)|0,b=b+Math.imul(me,Ke)|0,E=E+Math.imul(me,z)|0,h=h+Math.imul(Ie,F)|0,b=b+Math.imul(Ie,Z)|0,b=b+Math.imul(ue,F)|0,E=E+Math.imul(ue,Z)|0,h=h+Math.imul(X,ve)|0,b=b+Math.imul(X,oe)|0,b=b+Math.imul(U,ve)|0,E=E+Math.imul(U,oe)|0,h=h+Math.imul(P,Le)|0,b=b+Math.imul(P,ge)|0,b=b+Math.imul(W,Le)|0,E=E+Math.imul(W,ge)|0,h=h+Math.imul(Y,Fe)|0,b=b+Math.imul(Y,Ee)|0,b=b+Math.imul(K,Fe)|0,E=E+Math.imul(K,Ee)|0;var rr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(rr>>>26)|0,rr&=67108863,h=Math.imul(O,ce),b=Math.imul(O,fe),b=b+Math.imul(G,ce)|0,E=Math.imul(G,fe),h=h+Math.imul(je,Ne)|0,b=b+Math.imul(je,be)|0,b=b+Math.imul(j,Ne)|0,E=E+Math.imul(j,be)|0,h=h+Math.imul(Ue,Oe)|0,b=b+Math.imul(Ue,qe)|0,b=b+Math.imul(xe,Oe)|0,E=E+Math.imul(xe,qe)|0,h=h+Math.imul(Ce,We)|0,b=b+Math.imul(Ce,Re)|0,b=b+Math.imul(pe,We)|0,E=E+Math.imul(pe,Re)|0,h=h+Math.imul(De,Ke)|0,b=b+Math.imul(De,z)|0,b=b+Math.imul(de,Ke)|0,E=E+Math.imul(de,z)|0,h=h+Math.imul($e,F)|0,b=b+Math.imul($e,Z)|0,b=b+Math.imul(me,F)|0,E=E+Math.imul(me,Z)|0,h=h+Math.imul(Ie,ve)|0,b=b+Math.imul(Ie,oe)|0,b=b+Math.imul(ue,ve)|0,E=E+Math.imul(ue,oe)|0,h=h+Math.imul(X,Le)|0,b=b+Math.imul(X,ge)|0,b=b+Math.imul(U,Le)|0,E=E+Math.imul(U,ge)|0,h=h+Math.imul(P,Fe)|0,b=b+Math.imul(P,Ee)|0,b=b+Math.imul(W,Fe)|0,E=E+Math.imul(W,Ee)|0,h=h+Math.imul(Y,He)|0,b=b+Math.imul(Y,ze)|0,b=b+Math.imul(K,He)|0,E=E+Math.imul(K,ze)|0;var tr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(tr>>>26)|0,tr&=67108863,h=Math.imul(O,Ne),b=Math.imul(O,be),b=b+Math.imul(G,Ne)|0,E=Math.imul(G,be),h=h+Math.imul(je,Oe)|0,b=b+Math.imul(je,qe)|0,b=b+Math.imul(j,Oe)|0,E=E+Math.imul(j,qe)|0,h=h+Math.imul(Ue,We)|0,b=b+Math.imul(Ue,Re)|0,b=b+Math.imul(xe,We)|0,E=E+Math.imul(xe,Re)|0,h=h+Math.imul(Ce,Ke)|0,b=b+Math.imul(Ce,z)|0,b=b+Math.imul(pe,Ke)|0,E=E+Math.imul(pe,z)|0,h=h+Math.imul(De,F)|0,b=b+Math.imul(De,Z)|0,b=b+Math.imul(de,F)|0,E=E+Math.imul(de,Z)|0,h=h+Math.imul($e,ve)|0,b=b+Math.imul($e,oe)|0,b=b+Math.imul(me,ve)|0,E=E+Math.imul(me,oe)|0,h=h+Math.imul(Ie,Le)|0,b=b+Math.imul(Ie,ge)|0,b=b+Math.imul(ue,Le)|0,E=E+Math.imul(ue,ge)|0,h=h+Math.imul(X,Fe)|0,b=b+Math.imul(X,Ee)|0,b=b+Math.imul(U,Fe)|0,E=E+Math.imul(U,Ee)|0,h=h+Math.imul(P,He)|0,b=b+Math.imul(P,ze)|0,b=b+Math.imul(W,He)|0,E=E+Math.imul(W,ze)|0;var ir=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ir>>>26)|0,ir&=67108863,h=Math.imul(O,Oe),b=Math.imul(O,qe),b=b+Math.imul(G,Oe)|0,E=Math.imul(G,qe),h=h+Math.imul(je,We)|0,b=b+Math.imul(je,Re)|0,b=b+Math.imul(j,We)|0,E=E+Math.imul(j,Re)|0,h=h+Math.imul(Ue,Ke)|0,b=b+Math.imul(Ue,z)|0,b=b+Math.imul(xe,Ke)|0,E=E+Math.imul(xe,z)|0,h=h+Math.imul(Ce,F)|0,b=b+Math.imul(Ce,Z)|0,b=b+Math.imul(pe,F)|0,E=E+Math.imul(pe,Z)|0,h=h+Math.imul(De,ve)|0,b=b+Math.imul(De,oe)|0,b=b+Math.imul(de,ve)|0,E=E+Math.imul(de,oe)|0,h=h+Math.imul($e,Le)|0,b=b+Math.imul($e,ge)|0,b=b+Math.imul(me,Le)|0,E=E+Math.imul(me,ge)|0,h=h+Math.imul(Ie,Fe)|0,b=b+Math.imul(Ie,Ee)|0,b=b+Math.imul(ue,Fe)|0,E=E+Math.imul(ue,Ee)|0,h=h+Math.imul(X,He)|0,b=b+Math.imul(X,ze)|0,b=b+Math.imul(U,He)|0,E=E+Math.imul(U,ze)|0;var nr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(nr>>>26)|0,nr&=67108863,h=Math.imul(O,We),b=Math.imul(O,Re),b=b+Math.imul(G,We)|0,E=Math.imul(G,Re),h=h+Math.imul(je,Ke)|0,b=b+Math.imul(je,z)|0,b=b+Math.imul(j,Ke)|0,E=E+Math.imul(j,z)|0,h=h+Math.imul(Ue,F)|0,b=b+Math.imul(Ue,Z)|0,b=b+Math.imul(xe,F)|0,E=E+Math.imul(xe,Z)|0,h=h+Math.imul(Ce,ve)|0,b=b+Math.imul(Ce,oe)|0,b=b+Math.imul(pe,ve)|0,E=E+Math.imul(pe,oe)|0,h=h+Math.imul(De,Le)|0,b=b+Math.imul(De,ge)|0,b=b+Math.imul(de,Le)|0,E=E+Math.imul(de,ge)|0,h=h+Math.imul($e,Fe)|0,b=b+Math.imul($e,Ee)|0,b=b+Math.imul(me,Fe)|0,E=E+Math.imul(me,Ee)|0,h=h+Math.imul(Ie,He)|0,b=b+Math.imul(Ie,ze)|0,b=b+Math.imul(ue,He)|0,E=E+Math.imul(ue,ze)|0;var ar=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ar>>>26)|0,ar&=67108863,h=Math.imul(O,Ke),b=Math.imul(O,z),b=b+Math.imul(G,Ke)|0,E=Math.imul(G,z),h=h+Math.imul(je,F)|0,b=b+Math.imul(je,Z)|0,b=b+Math.imul(j,F)|0,E=E+Math.imul(j,Z)|0,h=h+Math.imul(Ue,ve)|0,b=b+Math.imul(Ue,oe)|0,b=b+Math.imul(xe,ve)|0,E=E+Math.imul(xe,oe)|0,h=h+Math.imul(Ce,Le)|0,b=b+Math.imul(Ce,ge)|0,b=b+Math.imul(pe,Le)|0,E=E+Math.imul(pe,ge)|0,h=h+Math.imul(De,Fe)|0,b=b+Math.imul(De,Ee)|0,b=b+Math.imul(de,Fe)|0,E=E+Math.imul(de,Ee)|0,h=h+Math.imul($e,He)|0,b=b+Math.imul($e,ze)|0,b=b+Math.imul(me,He)|0,E=E+Math.imul(me,ze)|0;var fr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(fr>>>26)|0,fr&=67108863,h=Math.imul(O,F),b=Math.imul(O,Z),b=b+Math.imul(G,F)|0,E=Math.imul(G,Z),h=h+Math.imul(je,ve)|0,b=b+Math.imul(je,oe)|0,b=b+Math.imul(j,ve)|0,E=E+Math.imul(j,oe)|0,h=h+Math.imul(Ue,Le)|0,b=b+Math.imul(Ue,ge)|0,b=b+Math.imul(xe,Le)|0,E=E+Math.imul(xe,ge)|0,h=h+Math.imul(Ce,Fe)|0,b=b+Math.imul(Ce,Ee)|0,b=b+Math.imul(pe,Fe)|0,E=E+Math.imul(pe,Ee)|0,h=h+Math.imul(De,He)|0,b=b+Math.imul(De,ze)|0,b=b+Math.imul(de,He)|0,E=E+Math.imul(de,ze)|0;var or=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(or>>>26)|0,or&=67108863,h=Math.imul(O,ve),b=Math.imul(O,oe),b=b+Math.imul(G,ve)|0,E=Math.imul(G,oe),h=h+Math.imul(je,Le)|0,b=b+Math.imul(je,ge)|0,b=b+Math.imul(j,Le)|0,E=E+Math.imul(j,ge)|0,h=h+Math.imul(Ue,Fe)|0,b=b+Math.imul(Ue,Ee)|0,b=b+Math.imul(xe,Fe)|0,E=E+Math.imul(xe,Ee)|0,h=h+Math.imul(Ce,He)|0,b=b+Math.imul(Ce,ze)|0,b=b+Math.imul(pe,He)|0,E=E+Math.imul(pe,ze)|0;var sr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(sr>>>26)|0,sr&=67108863,h=Math.imul(O,Le),b=Math.imul(O,ge),b=b+Math.imul(G,Le)|0,E=Math.imul(G,ge),h=h+Math.imul(je,Fe)|0,b=b+Math.imul(je,Ee)|0,b=b+Math.imul(j,Fe)|0,E=E+Math.imul(j,Ee)|0,h=h+Math.imul(Ue,He)|0,b=b+Math.imul(Ue,ze)|0,b=b+Math.imul(xe,He)|0,E=E+Math.imul(xe,ze)|0;var hr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(hr>>>26)|0,hr&=67108863,h=Math.imul(O,Fe),b=Math.imul(O,Ee),b=b+Math.imul(G,Fe)|0,E=Math.imul(G,Ee),h=h+Math.imul(je,He)|0,b=b+Math.imul(je,ze)|0,b=b+Math.imul(j,He)|0,E=E+Math.imul(j,ze)|0;var ur=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ur>>>26)|0,ur&=67108863,h=Math.imul(O,He),b=Math.imul(O,ze),b=b+Math.imul(G,He)|0,E=Math.imul(G,ze);var lr=(r+h|0)+((b&8191)<<13)|0;return r=(E+(b>>>13)|0)+(lr>>>26)|0,lr&=67108863,o[0]=Ge,o[1]=Ze,o[2]=Ve,o[3]=Xe,o[4]=Je,o[5]=Ye,o[6]=Qe,o[7]=er,o[8]=rr,o[9]=tr,o[10]=ir,o[11]=nr,o[12]=ar,o[13]=fr,o[14]=or,o[15]=sr,o[16]=hr,o[17]=ur,o[18]=lr,r!==0&&(o[19]=r,s.length++),s};Math.imul||($=C);function H(t,n,a){a.negative=n.negative^t.negative,a.length=t.length+n.length;for(var s=0,u=0,l=0;l<a.length-1;l++){var o=u;u=0;for(var r=s&67108863,h=Math.min(l,n.length-1),b=Math.max(0,l-t.length+1);b<=h;b++){var E=l-b,L=t.words[E]|0,Y=n.words[b]|0,K=L*Y,q=K&67108863;o=o+(K/67108864|0)|0,q=q+r|0,r=q&67108863,o=o+(q>>>26)|0,u+=o>>>26,o&=67108863}a.words[l]=r,s=o,o=u}return s!==0?a.words[l]=s:a.length--,a._strip()}function N(t,n,a){return H(t,n,a)}f.prototype.mulTo=function(n,a){var s,u=this.length+n.length;return this.length===10&&n.length===10?s=$(this,n,a):u<63?s=C(this,n,a):u<1024?s=H(this,n,a):s=N(this,n,a),s},f.prototype.mul=function(n){var a=new f(null);return a.words=new Array(this.length+n.length),this.mulTo(n,a)},f.prototype.mulf=function(n){var a=new f(null);return a.words=new Array(this.length+n.length),N(this,n,a)},f.prototype.imul=function(n){return this.clone().mulTo(n,this)},f.prototype.imuln=function(n){var a=n<0;a&&(n=-n),p(typeof n=="number"),p(n<67108864);for(var s=0,u=0;u<this.length;u++){var l=(this.words[u]|0)*n,o=(l&67108863)+(s&67108863);s>>=26,s+=l/67108864|0,s+=o>>>26,this.words[u]=o&67108863}return s!==0&&(this.words[u]=s,this.length++),this.length=n===0?1:this.length,a?this.ineg():this},f.prototype.muln=function(n){return this.clone().imuln(n)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(n){var a=D(n);if(a.length===0)return new f(1);for(var s=this,u=0;u<a.length&&a[u]===0;u++,s=s.sqr());if(++u<a.length)for(var l=s.sqr();u<a.length;u++,l=l.sqr())a[u]!==0&&(s=s.mul(l));return s},f.prototype.iushln=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26,u=67108863>>>26-a<<26-a,l;if(a!==0){var o=0;for(l=0;l<this.length;l++){var r=this.words[l]&u,h=(this.words[l]|0)-r<<a;this.words[l]=h|o,o=r>>>26-a}o&&(this.words[l]=o,this.length++)}if(s!==0){for(l=this.length-1;l>=0;l--)this.words[l+s]=this.words[l];for(l=0;l<s;l++)this.words[l]=0;this.length+=s}return this._strip()},f.prototype.ishln=function(n){return p(this.negative===0),this.iushln(n)},f.prototype.iushrn=function(n,a,s){p(typeof n=="number"&&n>=0);var u;a?u=(a-a%26)/26:u=0;var l=n%26,o=Math.min((n-l)/26,this.length),r=67108863^67108863>>>l<<l,h=s;if(u-=o,u=Math.max(0,u),h){for(var b=0;b<o;b++)h.words[b]=this.words[b];h.length=o}if(o!==0)if(this.length>o)for(this.length-=o,b=0;b<this.length;b++)this.words[b]=this.words[b+o];else this.words[0]=0,this.length=1;var E=0;for(b=this.length-1;b>=0&&(E!==0||b>=u);b--){var L=this.words[b]|0;this.words[b]=E<<26-l|L>>>l,E=L&r}return h&&E!==0&&(h.words[h.length++]=E),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(n,a,s){return p(this.negative===0),this.iushrn(n,a,s)},f.prototype.shln=function(n){return this.clone().ishln(n)},f.prototype.ushln=function(n){return this.clone().iushln(n)},f.prototype.shrn=function(n){return this.clone().ishrn(n)},f.prototype.ushrn=function(n){return this.clone().iushrn(n)},f.prototype.testn=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26,u=1<<a;if(this.length<=s)return!1;var l=this.words[s];return!!(l&u)},f.prototype.imaskn=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=s)return this;if(a!==0&&s++,this.length=Math.min(s,this.length),a!==0){var u=67108863^67108863>>>a<<a;this.words[this.length-1]&=u}return this._strip()},f.prototype.maskn=function(n){return this.clone().imaskn(n)},f.prototype.iaddn=function(n){return p(typeof n=="number"),p(n<67108864),n<0?this.isubn(-n):this.negative!==0?this.length===1&&(this.words[0]|0)<=n?(this.words[0]=n-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(n),this.negative=1,this):this._iaddn(n)},f.prototype._iaddn=function(n){this.words[0]+=n;for(var a=0;a<this.length&&this.words[a]>=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},f.prototype.isubn=function(n){if(p(typeof n=="number"),p(n<67108864),n<0)return this.iaddn(-n);if(this.negative!==0)return this.negative=0,this.iaddn(n),this.negative=1,this;if(this.words[0]-=n,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a<this.length&&this.words[a]<0;a++)this.words[a]+=67108864,this.words[a+1]-=1;return this._strip()},f.prototype.addn=function(n){return this.clone().iaddn(n)},f.prototype.subn=function(n){return this.clone().isubn(n)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(n,a,s){var u=n.length+s,l;this._expand(u);var o,r=0;for(l=0;l<n.length;l++){o=(this.words[l+s]|0)+r;var h=(n.words[l]|0)*a;o-=h&67108863,r=(o>>26)-(h/67108864|0),this.words[l+s]=o&67108863}for(;l<this.length-s;l++)o=(this.words[l+s]|0)+r,r=o>>26,this.words[l+s]=o&67108863;if(r===0)return this._strip();for(p(r===-1),r=0,l=0;l<this.length;l++)o=-(this.words[l]|0)+r,r=o>>26,this.words[l]=o&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(n,a){var s=this.length-n.length,u=this.clone(),l=n,o=l.words[l.length-1]|0,r=this._countBits(o);s=26-r,s!==0&&(l=l.ushln(s),u.iushln(s),o=l.words[l.length-1]|0);var h=u.length-l.length,b;if(a!=="mod"){b=new f(null),b.length=h+1,b.words=new Array(b.length);for(var E=0;E<b.length;E++)b.words[E]=0}var L=u.clone()._ishlnsubmul(l,1,h);L.negative===0&&(u=L,b&&(b.words[h]=1));for(var Y=h-1;Y>=0;Y--){var K=(u.words[l.length+Y]|0)*67108864+(u.words[l.length+Y-1]|0);for(K=Math.min(K/o|0,67108863),u._ishlnsubmul(l,K,Y);u.negative!==0;)K--,u.negative=0,u._ishlnsubmul(l,1,Y),u.isZero()||(u.negative^=1);b&&(b.words[Y]=K)}return b&&b._strip(),u._strip(),a!=="div"&&s!==0&&u.iushrn(s),{div:b||null,mod:u}},f.prototype.divmod=function(n,a,s){if(p(!n.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var u,l,o;return this.negative!==0&&n.negative===0?(o=this.neg().divmod(n,a),a!=="mod"&&(u=o.div.neg()),a!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.iadd(n)),{div:u,mod:l}):this.negative===0&&n.negative!==0?(o=this.divmod(n.neg(),a),a!=="mod"&&(u=o.div.neg()),{div:u,mod:o.mod}):(this.negative&n.negative)!==0?(o=this.neg().divmod(n.neg(),a),a!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.isub(n)),{div:o.div,mod:l}):n.length>this.length||this.cmp(n)<0?{div:new f(0),mod:this}:n.length===1?a==="div"?{div:this.divn(n.words[0]),mod:null}:a==="mod"?{div:null,mod:new f(this.modrn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new f(this.modrn(n.words[0]))}:this._wordDiv(n,a)},f.prototype.div=function(n){return this.divmod(n,"div",!1).div},f.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},f.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},f.prototype.divRound=function(n){var a=this.divmod(n);if(a.mod.isZero())return a.div;var s=a.div.negative!==0?a.mod.isub(n):a.mod,u=n.ushrn(1),l=n.andln(1),o=s.cmp(u);return o<0||l===1&&o===0?a.div:a.div.negative!==0?a.div.isubn(1):a.div.iaddn(1)},f.prototype.modrn=function(n){var a=n<0;a&&(n=-n),p(n<=67108863);for(var s=(1<<26)%n,u=0,l=this.length-1;l>=0;l--)u=(s*u+(this.words[l]|0))%n;return a?-u:u},f.prototype.modn=function(n){return this.modrn(n)},f.prototype.idivn=function(n){var a=n<0;a&&(n=-n),p(n<=67108863);for(var s=0,u=this.length-1;u>=0;u--){var l=(this.words[u]|0)+s*67108864;this.words[u]=l/n|0,s=l%n}return this._strip(),a?this.ineg():this},f.prototype.divn=function(n){return this.clone().idivn(n)},f.prototype.egcd=function(n){p(n.negative===0),p(!n.isZero());var a=this,s=n.clone();a.negative!==0?a=a.umod(n):a=a.clone();for(var u=new f(1),l=new f(0),o=new f(0),r=new f(1),h=0;a.isEven()&&s.isEven();)a.iushrn(1),s.iushrn(1),++h;for(var b=s.clone(),E=a.clone();!a.isZero();){for(var L=0,Y=1;(a.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(a.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(b),l.isub(E)),u.iushrn(1),l.iushrn(1);for(var K=0,q=1;(s.words[0]&q)===0&&K<26;++K,q<<=1);if(K>0)for(s.iushrn(K);K-- >0;)(o.isOdd()||r.isOdd())&&(o.iadd(b),r.isub(E)),o.iushrn(1),r.iushrn(1);a.cmp(s)>=0?(a.isub(s),u.isub(o),l.isub(r)):(s.isub(a),o.isub(u),r.isub(l))}return{a:o,b:r,gcd:s.iushln(h)}},f.prototype._invmp=function(n){p(n.negative===0),p(!n.isZero());var a=this,s=n.clone();a.negative!==0?a=a.umod(n):a=a.clone();for(var u=new f(1),l=new f(0),o=s.clone();a.cmpn(1)>0&&s.cmpn(1)>0;){for(var r=0,h=1;(a.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(a.iushrn(r);r-- >0;)u.isOdd()&&u.iadd(o),u.iushrn(1);for(var b=0,E=1;(s.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(s.iushrn(b);b-- >0;)l.isOdd()&&l.iadd(o),l.iushrn(1);a.cmp(s)>=0?(a.isub(s),u.isub(l)):(s.isub(a),l.isub(u))}var L;return a.cmpn(1)===0?L=u:L=l,L.cmpn(0)<0&&L.iadd(n),L},f.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var a=this.clone(),s=n.clone();a.negative=0,s.negative=0;for(var u=0;a.isEven()&&s.isEven();u++)a.iushrn(1),s.iushrn(1);do{for(;a.isEven();)a.iushrn(1);for(;s.isEven();)s.iushrn(1);var l=a.cmp(s);if(l<0){var o=a;a=s,s=o}else if(l===0||s.cmpn(1)===0)break;a.isub(s)}while(!0);return s.iushln(u)},f.prototype.invm=function(n){return this.egcd(n).a.umod(n)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(n){return this.words[0]&n},f.prototype.bincn=function(n){p(typeof n=="number");var a=n%26,s=(n-a)/26,u=1<<a;if(this.length<=s)return this._expand(s+1),this.words[s]|=u,this;for(var l=u,o=s;l!==0&&o<this.length;o++){var r=this.words[o]|0;r+=l,l=r>>>26,r&=67108863,this.words[o]=r}return l!==0&&(this.words[o]=l,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(n){var a=n<0;if(this.negative!==0&&!a)return-1;if(this.negative===0&&a)return 1;this._strip();var s;if(this.length>1)s=1;else{a&&(n=-n),p(n<=67108863,"Number is too big");var u=this.words[0]|0;s=u===n?0:u<n?-1:1}return this.negative!==0?-s|0:s},f.prototype.cmp=function(n){if(this.negative!==0&&n.negative===0)return-1;if(this.negative===0&&n.negative!==0)return 1;var a=this.ucmp(n);return this.negative!==0?-a|0:a},f.prototype.ucmp=function(n){if(this.length>n.length)return 1;if(this.length<n.length)return-1;for(var a=0,s=this.length-1;s>=0;s--){var u=this.words[s]|0,l=n.words[s]|0;if(u!==l){u<l?a=-1:u>l&&(a=1);break}}return a},f.prototype.gtn=function(n){return this.cmpn(n)===1},f.prototype.gt=function(n){return this.cmp(n)===1},f.prototype.gten=function(n){return this.cmpn(n)>=0},f.prototype.gte=function(n){return this.cmp(n)>=0},f.prototype.ltn=function(n){return this.cmpn(n)===-1},f.prototype.lt=function(n){return this.cmp(n)===-1},f.prototype.lten=function(n){return this.cmpn(n)<=0},f.prototype.lte=function(n){return this.cmp(n)<=0},f.prototype.eqn=function(n){return this.cmpn(n)===0},f.prototype.eq=function(n){return this.cmp(n)===0},f.red=function(n){return new c(n)},f.prototype.toRed=function(n){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),n.convertTo(this)._forceRed(n)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(n){return this.red=n,this},f.prototype.forceRed=function(n){return p(!this.red,"Already a number in reduction context"),this._forceRed(n)},f.prototype.redAdd=function(n){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},f.prototype.redIAdd=function(n){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},f.prototype.redSub=function(n){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},f.prototype.redISub=function(n){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},f.prototype.redShl=function(n){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},f.prototype.redMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},f.prototype.redIMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(n){return p(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var V={k256:null,p224:null,p192:null,p25519:null};function Q(t,n){this.name=t,this.p=new f(n,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Q.prototype._tmp=function(){var n=new f(null);return n.words=new Array(Math.ceil(this.n/13)),n},Q.prototype.ireduce=function(n){var a=n,s;do this.split(a,this.tmp),a=this.imulK(a),a=a.iadd(this.tmp),s=a.bitLength();while(s>this.n);var u=s<this.n?-1:a.ucmp(this.p);return u===0?(a.words[0]=0,a.length=1):u>0?a.isub(this.p):a.strip!==void 0?a.strip():a._strip(),a},Q.prototype.split=function(n,a){n.iushrn(this.n,0,a)},Q.prototype.imulK=function(n){return n.imul(this.k)};function ne(){Q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(ne,Q),ne.prototype.split=function(n,a){for(var s=4194303,u=Math.min(n.length,9),l=0;l<u;l++)a.words[l]=n.words[l];if(a.length=u,n.length<=9){n.words[0]=0,n.length=1;return}var o=n.words[9];for(a.words[a.length++]=o&s,l=10;l<n.length;l++){var r=n.words[l]|0;n.words[l-10]=(r&s)<<4|o>>>22,o=r}o>>>=22,n.words[l-10]=o,o===0&&n.length>10?n.length-=10:n.length-=9},ne.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var a=0,s=0;s<n.length;s++){var u=n.words[s]|0;a+=u*977,n.words[s]=a&67108863,a=u*64+(a/67108864|0)}return n.words[n.length-1]===0&&(n.length--,n.words[n.length-1]===0&&n.length--),n};function ae(){Q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(ae,Q);function ee(){Q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ee,Q);function le(){Q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(le,Q),le.prototype.imulK=function(n){for(var a=0,s=0;s<n.length;s++){var u=(n.words[s]|0)*19+a,l=u&67108863;u>>>=26,n.words[s]=l,a=u}return a!==0&&(n.words[n.length++]=a),n},f._prime=function(n){if(V[n])return V[n];var a;if(n==="k256")a=new ne;else if(n==="p224")a=new ae;else if(n==="p192")a=new ee;else if(n==="p25519")a=new le;else throw new Error("Unknown prime "+n);return V[n]=a,a};function c(t){if(typeof t=="string"){var n=f._prime(t);this.m=n.p,this.prime=n}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}c.prototype._verify1=function(n){p(n.negative===0,"red works only with positives"),p(n.red,"red works only with red numbers")},c.prototype._verify2=function(n,a){p((n.negative|a.negative)===0,"red works only with positives"),p(n.red&&n.red===a.red,"red works only with red numbers")},c.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):(d(n,n.umod(this.m)._forceRed(this)),n)},c.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},c.prototype.add=function(n,a){this._verify2(n,a);var s=n.add(a);return s.cmp(this.m)>=0&&s.isub(this.m),s._forceRed(this)},c.prototype.iadd=function(n,a){this._verify2(n,a);var s=n.iadd(a);return s.cmp(this.m)>=0&&s.isub(this.m),s},c.prototype.sub=function(n,a){this._verify2(n,a);var s=n.sub(a);return s.cmpn(0)<0&&s.iadd(this.m),s._forceRed(this)},c.prototype.isub=function(n,a){this._verify2(n,a);var s=n.isub(a);return s.cmpn(0)<0&&s.iadd(this.m),s},c.prototype.shl=function(n,a){return this._verify1(n),this.imod(n.ushln(a))},c.prototype.imul=function(n,a){return this._verify2(n,a),this.imod(n.imul(a))},c.prototype.mul=function(n,a){return this._verify2(n,a),this.imod(n.mul(a))},c.prototype.isqr=function(n){return this.imul(n,n.clone())},c.prototype.sqr=function(n){return this.mul(n,n)},c.prototype.sqrt=function(n){if(n.isZero())return n.clone();var a=this.m.andln(3);if(p(a%2===1),a===3){var s=this.m.add(new f(1)).iushrn(2);return this.pow(n,s)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);p(!u.isZero());var o=new f(1).toRed(this),r=o.redNeg(),h=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new f(2*b*b).toRed(this);this.pow(b,h).cmp(r)!==0;)b.redIAdd(r);for(var E=this.pow(b,u),L=this.pow(n,u.addn(1).iushrn(1)),Y=this.pow(n,u),K=l;Y.cmp(o)!==0;){for(var q=Y,P=0;q.cmp(o)!==0;P++)q=q.redSqr();p(P<K);var W=this.pow(E,new f(1).iushln(K-P-1));L=L.redMul(W),E=W.redSqr(),Y=Y.redMul(E),K=P}return L},c.prototype.invm=function(n){var a=n._invmp(this.m);return a.negative!==0?(a.negative=0,this.imod(a).redNeg()):this.imod(a)},c.prototype.pow=function(n,a){if(a.isZero())return new f(1).toRed(this);if(a.cmpn(1)===0)return n.clone();var s=4,u=new Array(1<<s);u[0]=new f(1).toRed(this),u[1]=n;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],n);var o=u[0],r=0,h=0,b=a.bitLength()%26;for(b===0&&(b=26),l=a.length-1;l>=0;l--){for(var E=a.words[l],L=b-1;L>=0;L--){var Y=E>>L&1;if(o!==u[0]&&(o=this.sqr(o)),Y===0&&r===0){h=0;continue}r<<=1,r|=Y,h++,!(h!==s&&(l!==0||L!==0))&&(o=this.mul(o,u[r]),h=0,r=0)}b=26}return o},c.prototype.convertTo=function(n){var a=n.umod(this.m);return a===n?a.clone():a},c.prototype.convertFrom=function(n){var a=n.clone();return a.red=null,a},f.mont=function(n){return new e(n)};function e(t){c.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}R(e,c),e.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},e.prototype.convertFrom=function(n){var a=this.imod(n.mul(this.rinv));return a.red=null,a},e.prototype.imul=function(n,a){if(n.isZero()||a.isZero())return n.words[0]=0,n.length=1,n;var s=n.imul(a),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.mul=function(n,a){if(n.isZero()||a.isZero())return new f(0)._forceRed(this);var s=n.mul(a),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.invm=function(n){var a=this.imod(n._invmp(this.m).mul(this.r2));return a._forceRed(this)}})(_,bn$8)})(bn$9)),bn$9.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var _=requireBn$4(),S=requireBrowser$b(),I=requireSafeBuffer$2().Buffer;function p(w){var m=w.modulus.byteLength(),v;do v=new _(S(m));while(v.cmp(w.modulus)>=0||!v.umod(w.prime1)||!v.umod(w.prime2));return v}function R(w){var m=p(w),v=m.toRed(_.mont(w.modulus)).redPow(new _(w.publicExponent)).fromRed();return{blinder:v,unblinder:m.invm(w.modulus)}}function f(w,m){var v=R(m),y=m.modulus.byteLength(),d=new _(w).mul(v.blinder).umod(m.modulus),g=d.toRed(_.mont(m.prime1)),M=d.toRed(_.mont(m.prime2)),x=m.coefficient,B=m.prime1,A=m.prime2,D=g.redPow(m.exponent1).fromRed(),C=M.redPow(m.exponent2).fromRed(),$=D.isub(C).imul(x).umod(B).imul(A);return C.iadd($).imul(v.unblinder).umod(m.modulus).toArrayLike(I,"be",y)}return f.getr=p,browserifyRsa=f,browserifyRsa}var elliptic={};const version="6.6.1",require$$0={version};var utils$2={},bn$7={exports:{}},bn$6=bn$7.exports,hasRequiredBn$3;function requireBn$3(){return hasRequiredBn$3||(hasRequiredBn$3=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.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},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],M=[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];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.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()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$6)})(bn$7)),bn$7.exports}var utils$1={},hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,(function(_){var S=_;function I(f,w){if(Array.isArray(f))return f.slice();if(!f)return[];var m=[];if(typeof f!="string"){for(var v=0;v<f.length;v++)m[v]=f[v]|0;return m}if(w==="hex"){f=f.replace(/[^a-z0-9]+/ig,""),f.length%2!==0&&(f="0"+f);for(var v=0;v<f.length;v+=2)m.push(parseInt(f[v]+f[v+1],16))}else for(var v=0;v<f.length;v++){var y=f.charCodeAt(v),d=y>>8,g=y&255;d?m.push(d,g):m.push(g)}return m}S.toArray=I;function p(f){return f.length===1?"0"+f:f}S.zero2=p;function R(f){for(var w="",m=0;m<f.length;m++)w+=p(f[m].toString(16));return w}S.toHex=R,S.encode=function(w,m){return m==="hex"?R(w):w}})(utils$1)),utils$1}var hasRequiredUtils$1;function requireUtils$1(){return hasRequiredUtils$1||(hasRequiredUtils$1=1,(function(_){var S=_,I=requireBn$3(),p=requireMinimalisticAssert(),R=requireUtils$2();S.assert=p,S.toArray=R.toArray,S.zero2=R.zero2,S.toHex=R.toHex,S.encode=R.encode;function f(d,g,M){var x=new Array(Math.max(d.bitLength(),M)+1),B;for(B=0;B<x.length;B+=1)x[B]=0;var A=1<<g+1,D=d.clone();for(B=0;B<x.length;B++){var C,$=D.andln(A-1);D.isOdd()?($>(A>>1)-1?C=(A>>1)-$:C=$,D.isubn(C)):C=0,x[B]=C,D.iushrn(1)}return x}S.getNAF=f;function w(d,g){var M=[[],[]];d=d.clone(),g=g.clone();for(var x=0,B=0,A;d.cmpn(-x)>0||g.cmpn(-B)>0;){var D=d.andln(3)+x&3,C=g.andln(3)+B&3;D===3&&(D=-1),C===3&&(C=-1);var $;(D&1)===0?$=0:(A=d.andln(7)+x&7,(A===3||A===5)&&C===2?$=-D:$=D),M[0].push($);var H;(C&1)===0?H=0:(A=g.andln(7)+B&7,(A===3||A===5)&&D===2?H=-C:H=C),M[1].push(H),2*x===$+1&&(x=1-x),2*B===H+1&&(B=1-B),d.iushrn(1),g.iushrn(1)}return M}S.getJSF=w;function m(d,g,M){var x="_"+g;d.prototype[g]=function(){return this[x]!==void 0?this[x]:this[x]=M.call(this)}}S.cachedProperty=m;function v(d){return typeof d=="string"?S.toArray(d,"hex"):d}S.parseBytes=v;function y(d){return new I(d,"hex","le")}S.intFromLE=y})(utils$2)),utils$2}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.getNAF,p=S.getJSF,R=S.assert;function f(m,v){this.type=m,this.p=new _(v.p,16),this.red=v.prime?_.red(v.prime):_.mont(this.p),this.zero=new _(0).toRed(this.red),this.one=new _(1).toRed(this.red),this.two=new _(2).toRed(this.red),this.n=v.n&&new _(v.n,16),this.g=v.g&&this.pointFromJSON(v.g,v.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var y=this.n&&this.p.div(this.n);!y||y.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}base$1=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(v,y){R(v.precomputed);var d=v._getDoubles(),g=I(y,1,this._bitLength),M=(1<<d.step+1)-(d.step%2===0?2:1);M/=3;var x=[],B,A;for(B=0;B<g.length;B+=d.step){A=0;for(var D=B+d.step-1;D>=B;D--)A=(A<<1)+g[D];x.push(A)}for(var C=this.jpoint(null,null,null),$=this.jpoint(null,null,null),H=M;H>0;H--){for(B=0;B<x.length;B++)A=x[B],A===H?$=$.mixedAdd(d.points[B]):A===-H&&($=$.mixedAdd(d.points[B].neg()));C=C.add($)}return C.toP()},f.prototype._wnafMul=function(v,y){var d=4,g=v._getNAFPoints(d);d=g.wnd;for(var M=g.points,x=I(y,d,this._bitLength),B=this.jpoint(null,null,null),A=x.length-1;A>=0;A--){for(var D=0;A>=0&&x[A]===0;A--)D++;if(A>=0&&D++,B=B.dblp(D),A<0)break;var C=x[A];R(C!==0),v.type==="affine"?C>0?B=B.mixedAdd(M[C-1>>1]):B=B.mixedAdd(M[-C-1>>1].neg()):C>0?B=B.add(M[C-1>>1]):B=B.add(M[-C-1>>1].neg())}return v.type==="affine"?B.toP():B},f.prototype._wnafMulAdd=function(v,y,d,g,M){var x=this._wnafT1,B=this._wnafT2,A=this._wnafT3,D=0,C,$,H;for(C=0;C<g;C++){H=y[C];var N=H._getNAFPoints(v);x[C]=N.wnd,B[C]=N.points}for(C=g-1;C>=1;C-=2){var V=C-1,Q=C;if(x[V]!==1||x[Q]!==1){A[V]=I(d[V],x[V],this._bitLength),A[Q]=I(d[Q],x[Q],this._bitLength),D=Math.max(A[V].length,D),D=Math.max(A[Q].length,D);continue}var ne=[y[V],null,null,y[Q]];y[V].y.cmp(y[Q].y)===0?(ne[1]=y[V].add(y[Q]),ne[2]=y[V].toJ().mixedAdd(y[Q].neg())):y[V].y.cmp(y[Q].y.redNeg())===0?(ne[1]=y[V].toJ().mixedAdd(y[Q]),ne[2]=y[V].add(y[Q].neg())):(ne[1]=y[V].toJ().mixedAdd(y[Q]),ne[2]=y[V].toJ().mixedAdd(y[Q].neg()));var ae=[-3,-1,-5,-7,0,7,5,1,3],ee=p(d[V],d[Q]);for(D=Math.max(ee[0].length,D),A[V]=new Array(D),A[Q]=new Array(D),$=0;$<D;$++){var le=ee[0][$]|0,c=ee[1][$]|0;A[V][$]=ae[(le+1)*3+(c+1)],A[Q][$]=0,B[V]=ne}}var e=this.jpoint(null,null,null),t=this._wnafT4;for(C=D;C>=0;C--){for(var n=0;C>=0;){var a=!0;for($=0;$<g;$++)t[$]=A[$][C]|0,t[$]!==0&&(a=!1);if(!a)break;n++,C--}if(C>=0&&n++,e=e.dblp(n),C<0)break;for($=0;$<g;$++){var s=t[$];s!==0&&(s>0?H=B[$][s-1>>1]:s<0&&(H=B[$][-s-1>>1].neg()),H.type==="affine"?e=e.mixedAdd(H):e=e.add(H))}}for(C=0;C<g;C++)B[C]=null;return M?e:e.toP()};function w(m,v){this.curve=m,this.type=v,this.precomputed=null}return f.BasePoint=w,w.prototype.eq=function(){throw new Error("Not implemented")},w.prototype.validate=function(){return this.curve.validate(this)},f.prototype.decodePoint=function(v,y){v=S.toArray(v,y);var d=this.p.byteLength();if((v[0]===4||v[0]===6||v[0]===7)&&v.length-1===2*d){v[0]===6?R(v[v.length-1]%2===0):v[0]===7&&R(v[v.length-1]%2===1);var g=this.point(v.slice(1,1+d),v.slice(1+d,1+2*d));return g}else if((v[0]===2||v[0]===3)&&v.length-1===d)return this.pointFromX(v.slice(1,1+d),v[0]===3);throw new Error("Unknown point format")},w.prototype.encodeCompressed=function(v){return this.encode(v,!0)},w.prototype._encode=function(v){var y=this.curve.p.byteLength(),d=this.getX().toArray("be",y);return v?[this.getY().isEven()?2:3].concat(d):[4].concat(d,this.getY().toArray("be",y))},w.prototype.encode=function(v,y){return S.encode(this._encode(y),v)},w.prototype.precompute=function(v){if(this.precomputed)return this;var y={doubles:null,naf:null,beta:null};return y.naf=this._getNAFPoints(8),y.doubles=this._getDoubles(4,v),y.beta=this._getBeta(),this.precomputed=y,this},w.prototype._hasDoubles=function(v){if(!this.precomputed)return!1;var y=this.precomputed.doubles;return y?y.points.length>=Math.ceil((v.bitLength()+1)/y.step):!1},w.prototype._getDoubles=function(v,y){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var d=[this],g=this,M=0;M<y;M+=v){for(var x=0;x<v;x++)g=g.dbl();d.push(g)}return{step:v,points:d}},w.prototype._getNAFPoints=function(v){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var y=[this],d=(1<<v)-1,g=d===1?null:this.dbl(),M=1;M<d;M++)y[M]=y[M-1].add(g);return{wnd:v,points:y}},w.prototype._getBeta=function(){return null},w.prototype.dblp=function(v){for(var y=this,d=0;d<v;d++)y=y.dbl();return y},base$1}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var _=requireUtils$1(),S=requireBn$3(),I=requireInherits_browser(),p=requireBase$1(),R=_.assert;function f(v){p.call(this,"short",v),this.a=new S(v.a,16).toRed(this.red),this.b=new S(v.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(v),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}I(f,p),short=f,f.prototype._getEndomorphism=function(y){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var d,g;if(y.beta)d=new S(y.beta,16).toRed(this.red);else{var M=this._getEndoRoots(this.p);d=M[0].cmp(M[1])<0?M[0]:M[1],d=d.toRed(this.red)}if(y.lambda)g=new S(y.lambda,16);else{var x=this._getEndoRoots(this.n);this.g.mul(x[0]).x.cmp(this.g.x.redMul(d))===0?g=x[0]:(g=x[1],R(this.g.mul(g).x.cmp(this.g.x.redMul(d))===0))}var B;return y.basis?B=y.basis.map(function(A){return{a:new S(A.a,16),b:new S(A.b,16)}}):B=this._getEndoBasis(g),{beta:d,lambda:g,basis:B}}},f.prototype._getEndoRoots=function(y){var d=y===this.p?this.red:S.mont(y),g=new S(2).toRed(d).redInvm(),M=g.redNeg(),x=new S(3).toRed(d).redNeg().redSqrt().redMul(g),B=M.redAdd(x).fromRed(),A=M.redSub(x).fromRed();return[B,A]},f.prototype._getEndoBasis=function(y){for(var d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),g=y,M=this.n.clone(),x=new S(1),B=new S(0),A=new S(0),D=new S(1),C,$,H,N,V,Q,ne,ae=0,ee,le;g.cmpn(0)!==0;){var c=M.div(g);ee=M.sub(c.mul(g)),le=A.sub(c.mul(x));var e=D.sub(c.mul(B));if(!H&&ee.cmp(d)<0)C=ne.neg(),$=x,H=ee.neg(),N=le;else if(H&&++ae===2)break;ne=ee,M=g,g=ee,A=x,x=le,D=B,B=e}V=ee.neg(),Q=le;var t=H.sqr().add(N.sqr()),n=V.sqr().add(Q.sqr());return n.cmp(t)>=0&&(V=C,Q=$),H.negative&&(H=H.neg(),N=N.neg()),V.negative&&(V=V.neg(),Q=Q.neg()),[{a:H,b:N},{a:V,b:Q}]},f.prototype._endoSplit=function(y){var d=this.endo.basis,g=d[0],M=d[1],x=M.b.mul(y).divRound(this.n),B=g.b.neg().mul(y).divRound(this.n),A=x.mul(g.a),D=B.mul(M.a),C=x.mul(g.b),$=B.mul(M.b),H=y.sub(A).sub(D),N=C.add($).neg();return{k1:H,k2:N}},f.prototype.pointFromX=function(y,d){y=new S(y,16),y.red||(y=y.toRed(this.red));var g=y.redSqr().redMul(y).redIAdd(y.redMul(this.a)).redIAdd(this.b),M=g.redSqrt();if(M.redSqr().redSub(g).cmp(this.zero)!==0)throw new Error("invalid point");var x=M.fromRed().isOdd();return(d&&!x||!d&&x)&&(M=M.redNeg()),this.point(y,M)},f.prototype.validate=function(y){if(y.inf)return!0;var d=y.x,g=y.y,M=this.a.redMul(d),x=d.redSqr().redMul(d).redIAdd(M).redIAdd(this.b);return g.redSqr().redISub(x).cmpn(0)===0},f.prototype._endoWnafMulAdd=function(y,d,g){for(var M=this._endoWnafT1,x=this._endoWnafT2,B=0;B<y.length;B++){var A=this._endoSplit(d[B]),D=y[B],C=D._getBeta();A.k1.negative&&(A.k1.ineg(),D=D.neg(!0)),A.k2.negative&&(A.k2.ineg(),C=C.neg(!0)),M[B*2]=D,M[B*2+1]=C,x[B*2]=A.k1,x[B*2+1]=A.k2}for(var $=this._wnafMulAdd(1,M,x,B*2,g),H=0;H<B*2;H++)M[H]=null,x[H]=null;return $};function w(v,y,d,g){p.BasePoint.call(this,v,"affine"),y===null&&d===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new S(y,16),this.y=new S(d,16),g&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}I(w,p.BasePoint),f.prototype.point=function(y,d,g){return new w(this,y,d,g)},f.prototype.pointFromJSON=function(y,d){return w.fromJSON(this,y,d)},w.prototype._getBeta=function(){if(this.curve.endo){var y=this.precomputed;if(y&&y.beta)return y.beta;var d=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(y){var g=this.curve,M=function(x){return g.point(x.x.redMul(g.endo.beta),x.y)};y.beta=d,d.precomputed={beta:null,naf:y.naf&&{wnd:y.naf.wnd,points:y.naf.points.map(M)},doubles:y.doubles&&{step:y.doubles.step,points:y.doubles.points.map(M)}}}return d}},w.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},w.fromJSON=function(y,d,g){typeof d=="string"&&(d=JSON.parse(d));var M=y.point(d[0],d[1],g);if(!d[2])return M;function x(A){return y.point(A[0],A[1],g)}var B=d[2];return M.precomputed={beta:null,doubles:B.doubles&&{step:B.doubles.step,points:[M].concat(B.doubles.points.map(x))},naf:B.naf&&{wnd:B.naf.wnd,points:[M].concat(B.naf.points.map(x))}},M},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.inf},w.prototype.add=function(y){if(this.inf)return y;if(y.inf)return this;if(this.eq(y))return this.dbl();if(this.neg().eq(y))return this.curve.point(null,null);if(this.x.cmp(y.x)===0)return this.curve.point(null,null);var d=this.y.redSub(y.y);d.cmpn(0)!==0&&(d=d.redMul(this.x.redSub(y.x).redInvm()));var g=d.redSqr().redISub(this.x).redISub(y.x),M=d.redMul(this.x.redSub(g)).redISub(this.y);return this.curve.point(g,M)},w.prototype.dbl=function(){if(this.inf)return this;var y=this.y.redAdd(this.y);if(y.cmpn(0)===0)return this.curve.point(null,null);var d=this.curve.a,g=this.x.redSqr(),M=y.redInvm(),x=g.redAdd(g).redIAdd(g).redIAdd(d).redMul(M),B=x.redSqr().redISub(this.x.redAdd(this.x)),A=x.redMul(this.x.redSub(B)).redISub(this.y);return this.curve.point(B,A)},w.prototype.getX=function(){return this.x.fromRed()},w.prototype.getY=function(){return this.y.fromRed()},w.prototype.mul=function(y){return y=new S(y,16),this.isInfinity()?this:this._hasDoubles(y)?this.curve._fixedNafMul(this,y):this.curve.endo?this.curve._endoWnafMulAdd([this],[y]):this.curve._wnafMul(this,y)},w.prototype.mulAdd=function(y,d,g){var M=[this,d],x=[y,g];return this.curve.endo?this.curve._endoWnafMulAdd(M,x):this.curve._wnafMulAdd(1,M,x,2)},w.prototype.jmulAdd=function(y,d,g){var M=[this,d],x=[y,g];return this.curve.endo?this.curve._endoWnafMulAdd(M,x,!0):this.curve._wnafMulAdd(1,M,x,2,!0)},w.prototype.eq=function(y){return this===y||this.inf===y.inf&&(this.inf||this.x.cmp(y.x)===0&&this.y.cmp(y.y)===0)},w.prototype.neg=function(y){if(this.inf)return this;var d=this.curve.point(this.x,this.y.redNeg());if(y&&this.precomputed){var g=this.precomputed,M=function(x){return x.neg()};d.precomputed={naf:g.naf&&{wnd:g.naf.wnd,points:g.naf.points.map(M)},doubles:g.doubles&&{step:g.doubles.step,points:g.doubles.points.map(M)}}}return d},w.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var y=this.curve.jpoint(this.x,this.y,this.curve.one);return y};function m(v,y,d,g){p.BasePoint.call(this,v,"jacobian"),y===null&&d===null&&g===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new S(0)):(this.x=new S(y,16),this.y=new S(d,16),this.z=new S(g,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return I(m,p.BasePoint),f.prototype.jpoint=function(y,d,g){return new m(this,y,d,g)},m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var y=this.z.redInvm(),d=y.redSqr(),g=this.x.redMul(d),M=this.y.redMul(d).redMul(y);return this.curve.point(g,M)},m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},m.prototype.add=function(y){if(this.isInfinity())return y;if(y.isInfinity())return this;var d=y.z.redSqr(),g=this.z.redSqr(),M=this.x.redMul(d),x=y.x.redMul(g),B=this.y.redMul(d.redMul(y.z)),A=y.y.redMul(g.redMul(this.z)),D=M.redSub(x),C=B.redSub(A);if(D.cmpn(0)===0)return C.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var $=D.redSqr(),H=$.redMul(D),N=M.redMul($),V=C.redSqr().redIAdd(H).redISub(N).redISub(N),Q=C.redMul(N.redISub(V)).redISub(B.redMul(H)),ne=this.z.redMul(y.z).redMul(D);return this.curve.jpoint(V,Q,ne)},m.prototype.mixedAdd=function(y){if(this.isInfinity())return y.toJ();if(y.isInfinity())return this;var d=this.z.redSqr(),g=this.x,M=y.x.redMul(d),x=this.y,B=y.y.redMul(d).redMul(this.z),A=g.redSub(M),D=x.redSub(B);if(A.cmpn(0)===0)return D.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var C=A.redSqr(),$=C.redMul(A),H=g.redMul(C),N=D.redSqr().redIAdd($).redISub(H).redISub(H),V=D.redMul(H.redISub(N)).redISub(x.redMul($)),Q=this.z.redMul(A);return this.curve.jpoint(N,V,Q)},m.prototype.dblp=function(y){if(y===0)return this;if(this.isInfinity())return this;if(!y)return this.dbl();var d;if(this.curve.zeroA||this.curve.threeA){var g=this;for(d=0;d<y;d++)g=g.dbl();return g}var M=this.curve.a,x=this.curve.tinv,B=this.x,A=this.y,D=this.z,C=D.redSqr().redSqr(),$=A.redAdd(A);for(d=0;d<y;d++){var H=B.redSqr(),N=$.redSqr(),V=N.redSqr(),Q=H.redAdd(H).redIAdd(H).redIAdd(M.redMul(C)),ne=B.redMul(N),ae=Q.redSqr().redISub(ne.redAdd(ne)),ee=ne.redISub(ae),le=Q.redMul(ee);le=le.redIAdd(le).redISub(V);var c=$.redMul(D);d+1<y&&(C=C.redMul(V)),B=ae,D=c,$=le}return this.curve.jpoint(B,$.redMul(x),D)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},m.prototype._zeroDbl=function(){var y,d,g;if(this.zOne){var M=this.x.redSqr(),x=this.y.redSqr(),B=x.redSqr(),A=this.x.redAdd(x).redSqr().redISub(M).redISub(B);A=A.redIAdd(A);var D=M.redAdd(M).redIAdd(M),C=D.redSqr().redISub(A).redISub(A),$=B.redIAdd(B);$=$.redIAdd($),$=$.redIAdd($),y=C,d=D.redMul(A.redISub(C)).redISub($),g=this.y.redAdd(this.y)}else{var H=this.x.redSqr(),N=this.y.redSqr(),V=N.redSqr(),Q=this.x.redAdd(N).redSqr().redISub(H).redISub(V);Q=Q.redIAdd(Q);var ne=H.redAdd(H).redIAdd(H),ae=ne.redSqr(),ee=V.redIAdd(V);ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),y=ae.redISub(Q).redISub(Q),d=ne.redMul(Q.redISub(y)).redISub(ee),g=this.y.redMul(this.z),g=g.redIAdd(g)}return this.curve.jpoint(y,d,g)},m.prototype._threeDbl=function(){var y,d,g;if(this.zOne){var M=this.x.redSqr(),x=this.y.redSqr(),B=x.redSqr(),A=this.x.redAdd(x).redSqr().redISub(M).redISub(B);A=A.redIAdd(A);var D=M.redAdd(M).redIAdd(M).redIAdd(this.curve.a),C=D.redSqr().redISub(A).redISub(A);y=C;var $=B.redIAdd(B);$=$.redIAdd($),$=$.redIAdd($),d=D.redMul(A.redISub(C)).redISub($),g=this.y.redAdd(this.y)}else{var H=this.z.redSqr(),N=this.y.redSqr(),V=this.x.redMul(N),Q=this.x.redSub(H).redMul(this.x.redAdd(H));Q=Q.redAdd(Q).redIAdd(Q);var ne=V.redIAdd(V);ne=ne.redIAdd(ne);var ae=ne.redAdd(ne);y=Q.redSqr().redISub(ae),g=this.y.redAdd(this.z).redSqr().redISub(N).redISub(H);var ee=N.redSqr();ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),d=Q.redMul(ne.redISub(y)).redISub(ee)}return this.curve.jpoint(y,d,g)},m.prototype._dbl=function(){var y=this.curve.a,d=this.x,g=this.y,M=this.z,x=M.redSqr().redSqr(),B=d.redSqr(),A=g.redSqr(),D=B.redAdd(B).redIAdd(B).redIAdd(y.redMul(x)),C=d.redAdd(d);C=C.redIAdd(C);var $=C.redMul(A),H=D.redSqr().redISub($.redAdd($)),N=$.redISub(H),V=A.redSqr();V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=D.redMul(N).redISub(V),ne=g.redAdd(g).redMul(M);return this.curve.jpoint(H,Q,ne)},m.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var y=this.x.redSqr(),d=this.y.redSqr(),g=this.z.redSqr(),M=d.redSqr(),x=y.redAdd(y).redIAdd(y),B=x.redSqr(),A=this.x.redAdd(d).redSqr().redISub(y).redISub(M);A=A.redIAdd(A),A=A.redAdd(A).redIAdd(A),A=A.redISub(B);var D=A.redSqr(),C=M.redIAdd(M);C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var $=x.redIAdd(A).redSqr().redISub(B).redISub(D).redISub(C),H=d.redMul($);H=H.redIAdd(H),H=H.redIAdd(H);var N=this.x.redMul(D).redISub(H);N=N.redIAdd(N),N=N.redIAdd(N);var V=this.y.redMul($.redMul(C.redISub($)).redISub(A.redMul(D)));V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=this.z.redAdd(A).redSqr().redISub(g).redISub(D);return this.curve.jpoint(N,V,Q)},m.prototype.mul=function(y,d){return y=new S(y,d),this.curve._wnafMul(this,y)},m.prototype.eq=function(y){if(y.type==="affine")return this.eq(y.toJ());if(this===y)return!0;var d=this.z.redSqr(),g=y.z.redSqr();if(this.x.redMul(g).redISub(y.x.redMul(d)).cmpn(0)!==0)return!1;var M=d.redMul(this.z),x=g.redMul(y.z);return this.y.redMul(x).redISub(y.y.redMul(M)).cmpn(0)===0},m.prototype.eqXToP=function(y){var d=this.z.redSqr(),g=y.toRed(this.curve.red).redMul(d);if(this.x.cmp(g)===0)return!0;for(var M=y.clone(),x=this.curve.redN.redMul(d);;){if(M.iadd(this.curve.n),M.cmp(this.curve.p)>=0)return!1;if(g.redIAdd(x),this.x.cmp(g)===0)return!0}},m.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},m.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var _=requireBn$3(),S=requireInherits_browser(),I=requireBase$1(),p=requireUtils$1();function R(w){I.call(this,"mont",w),this.a=new _(w.a,16).toRed(this.red),this.b=new _(w.b,16).toRed(this.red),this.i4=new _(4).toRed(this.red).redInvm(),this.two=new _(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}S(R,I),mont=R,R.prototype.validate=function(m){var v=m.normalize().x,y=v.redSqr(),d=y.redMul(v).redAdd(y.redMul(this.a)).redAdd(v),g=d.redSqrt();return g.redSqr().cmp(d)===0};function f(w,m,v){I.BasePoint.call(this,w,"projective"),m===null&&v===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new _(m,16),this.z=new _(v,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return S(f,I.BasePoint),R.prototype.decodePoint=function(m,v){return this.point(p.toArray(m,v),1)},R.prototype.point=function(m,v){return new f(this,m,v)},R.prototype.pointFromJSON=function(m){return f.fromJSON(this,m)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(m,v){return new f(m,v[0],v[1]||m.one)},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.z.cmpn(0)===0},f.prototype.dbl=function(){var m=this.x.redAdd(this.z),v=m.redSqr(),y=this.x.redSub(this.z),d=y.redSqr(),g=v.redSub(d),M=v.redMul(d),x=g.redMul(d.redAdd(this.curve.a24.redMul(g)));return this.curve.point(M,x)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(m,v){var y=this.x.redAdd(this.z),d=this.x.redSub(this.z),g=m.x.redAdd(m.z),M=m.x.redSub(m.z),x=M.redMul(y),B=g.redMul(d),A=v.z.redMul(x.redAdd(B).redSqr()),D=v.x.redMul(x.redISub(B).redSqr());return this.curve.point(A,D)},f.prototype.mul=function(m){for(var v=m.clone(),y=this,d=this.curve.point(null,null),g=this,M=[];v.cmpn(0)!==0;v.iushrn(1))M.push(v.andln(1));for(var x=M.length-1;x>=0;x--)M[x]===0?(y=y.diffAdd(d,g),d=d.dbl()):(d=y.diffAdd(d,g),y=y.dbl());return d},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(m){return this.getX().cmp(m.getX())===0},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}var edwards,hasRequiredEdwards;function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var _=requireUtils$1(),S=requireBn$3(),I=requireInherits_browser(),p=requireBase$1(),R=_.assert;function f(m){this.twisted=(m.a|0)!==1,this.mOneA=this.twisted&&(m.a|0)===-1,this.extended=this.mOneA,p.call(this,"edwards",m),this.a=new S(m.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new S(m.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new S(m.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),R(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(m.c|0)===1}I(f,p),edwards=f,f.prototype._mulA=function(v){return this.mOneA?v.redNeg():this.a.redMul(v)},f.prototype._mulC=function(v){return this.oneC?v:this.c.redMul(v)},f.prototype.jpoint=function(v,y,d,g){return this.point(v,y,d,g)},f.prototype.pointFromX=function(v,y){v=new S(v,16),v.red||(v=v.toRed(this.red));var d=v.redSqr(),g=this.c2.redSub(this.a.redMul(d)),M=this.one.redSub(this.c2.redMul(this.d).redMul(d)),x=g.redMul(M.redInvm()),B=x.redSqrt();if(B.redSqr().redSub(x).cmp(this.zero)!==0)throw new Error("invalid point");var A=B.fromRed().isOdd();return(y&&!A||!y&&A)&&(B=B.redNeg()),this.point(v,B)},f.prototype.pointFromY=function(v,y){v=new S(v,16),v.red||(v=v.toRed(this.red));var d=v.redSqr(),g=d.redSub(this.c2),M=d.redMul(this.d).redMul(this.c2).redSub(this.a),x=g.redMul(M.redInvm());if(x.cmp(this.zero)===0){if(y)throw new Error("invalid point");return this.point(this.zero,v)}var B=x.redSqrt();if(B.redSqr().redSub(x).cmp(this.zero)!==0)throw new Error("invalid point");return B.fromRed().isOdd()!==y&&(B=B.redNeg()),this.point(B,v)},f.prototype.validate=function(v){if(v.isInfinity())return!0;v.normalize();var y=v.x.redSqr(),d=v.y.redSqr(),g=y.redMul(this.a).redAdd(d),M=this.c2.redMul(this.one.redAdd(this.d.redMul(y).redMul(d)));return g.cmp(M)===0};function w(m,v,y,d,g){p.BasePoint.call(this,m,"projective"),v===null&&y===null&&d===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new S(v,16),this.y=new S(y,16),this.z=d?new S(d,16):this.curve.one,this.t=g&&new S(g,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return I(w,p.BasePoint),f.prototype.pointFromJSON=function(v){return w.fromJSON(this,v)},f.prototype.point=function(v,y,d,g){return new w(this,v,y,d,g)},w.fromJSON=function(v,y){return new w(v,y[0],y[1],y[2])},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},w.prototype._extDbl=function(){var v=this.x.redSqr(),y=this.y.redSqr(),d=this.z.redSqr();d=d.redIAdd(d);var g=this.curve._mulA(v),M=this.x.redAdd(this.y).redSqr().redISub(v).redISub(y),x=g.redAdd(y),B=x.redSub(d),A=g.redSub(y),D=M.redMul(B),C=x.redMul(A),$=M.redMul(A),H=B.redMul(x);return this.curve.point(D,C,H,$)},w.prototype._projDbl=function(){var v=this.x.redAdd(this.y).redSqr(),y=this.x.redSqr(),d=this.y.redSqr(),g,M,x,B,A,D;if(this.curve.twisted){B=this.curve._mulA(y);var C=B.redAdd(d);this.zOne?(g=v.redSub(y).redSub(d).redMul(C.redSub(this.curve.two)),M=C.redMul(B.redSub(d)),x=C.redSqr().redSub(C).redSub(C)):(A=this.z.redSqr(),D=C.redSub(A).redISub(A),g=v.redSub(y).redISub(d).redMul(D),M=C.redMul(B.redSub(d)),x=C.redMul(D))}else B=y.redAdd(d),A=this.curve._mulC(this.z).redSqr(),D=B.redSub(A).redSub(A),g=this.curve._mulC(v.redISub(B)).redMul(D),M=this.curve._mulC(B).redMul(y.redISub(d)),x=B.redMul(D);return this.curve.point(g,M,x)},w.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},w.prototype._extAdd=function(v){var y=this.y.redSub(this.x).redMul(v.y.redSub(v.x)),d=this.y.redAdd(this.x).redMul(v.y.redAdd(v.x)),g=this.t.redMul(this.curve.dd).redMul(v.t),M=this.z.redMul(v.z.redAdd(v.z)),x=d.redSub(y),B=M.redSub(g),A=M.redAdd(g),D=d.redAdd(y),C=x.redMul(B),$=A.redMul(D),H=x.redMul(D),N=B.redMul(A);return this.curve.point(C,$,N,H)},w.prototype._projAdd=function(v){var y=this.z.redMul(v.z),d=y.redSqr(),g=this.x.redMul(v.x),M=this.y.redMul(v.y),x=this.curve.d.redMul(g).redMul(M),B=d.redSub(x),A=d.redAdd(x),D=this.x.redAdd(this.y).redMul(v.x.redAdd(v.y)).redISub(g).redISub(M),C=y.redMul(B).redMul(D),$,H;return this.curve.twisted?($=y.redMul(A).redMul(M.redSub(this.curve._mulA(g))),H=B.redMul(A)):($=y.redMul(A).redMul(M.redSub(g)),H=this.curve._mulC(B).redMul(A)),this.curve.point(C,$,H)},w.prototype.add=function(v){return this.isInfinity()?v:v.isInfinity()?this:this.curve.extended?this._extAdd(v):this._projAdd(v)},w.prototype.mul=function(v){return this._hasDoubles(v)?this.curve._fixedNafMul(this,v):this.curve._wnafMul(this,v)},w.prototype.mulAdd=function(v,y,d){return this.curve._wnafMulAdd(1,[this,y],[v,d],2,!1)},w.prototype.jmulAdd=function(v,y,d){return this.curve._wnafMulAdd(1,[this,y],[v,d],2,!0)},w.prototype.normalize=function(){if(this.zOne)return this;var v=this.z.redInvm();return this.x=this.x.redMul(v),this.y=this.y.redMul(v),this.t&&(this.t=this.t.redMul(v)),this.z=this.curve.one,this.zOne=!0,this},w.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},w.prototype.getX=function(){return this.normalize(),this.x.fromRed()},w.prototype.getY=function(){return this.normalize(),this.y.fromRed()},w.prototype.eq=function(v){return this===v||this.getX().cmp(v.getX())===0&&this.getY().cmp(v.getY())===0},w.prototype.eqXToP=function(v){var y=v.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(y)===0)return!0;for(var d=v.clone(),g=this.curve.redN.redMul(this.z);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(y.redIAdd(g),this.x.cmp(y)===0)return!0}},w.prototype.toP=w.prototype.normalize,w.prototype.mixedAdd=w.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,(function(_){var S=_;S.base=requireBase$1(),S.short=requireShort(),S.mont=requireMont(),S.edwards=requireEdwards()})(curve)),curve}var curves={},hash={},utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var _=requireMinimalisticAssert(),S=requireInherits_browser();utils.inherits=S;function I(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function p(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),s=0;s<e.length;s+=2)n.push(parseInt(e[s]+e[s+1],16))}else for(var a=0,s=0;s<e.length;s++){var u=e.charCodeAt(s);u<128?n[a++]=u:u<2048?(n[a++]=u>>6|192,n[a++]=u&63|128):I(e,s)?(u=65536+((u&1023)<<10)+(e.charCodeAt(++s)&1023),n[a++]=u>>18|240,n[a++]=u>>12&63|128,n[a++]=u>>6&63|128,n[a++]=u&63|128):(n[a++]=u>>12|224,n[a++]=u>>6&63|128,n[a++]=u&63|128)}else for(s=0;s<e.length;s++)n[s]=e[s]|0;return n}utils.toArray=p;function R(e){for(var t="",n=0;n<e.length;n++)t+=m(e[n].toString(16));return t}utils.toHex=R;function f(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}utils.htonl=f;function w(e,t){for(var n="",a=0;a<e.length;a++){var s=e[a];t==="little"&&(s=f(s)),n+=v(s.toString(16))}return n}utils.toHex32=w;function m(e){return e.length===1?"0"+e:e}utils.zero2=m;function v(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}utils.zero8=v;function y(e,t,n,a){var s=n-t;_(s%4===0);for(var u=new Array(s/4),l=0,o=t;l<u.length;l++,o+=4){var r;a==="big"?r=e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3]:r=e[o+3]<<24|e[o+2]<<16|e[o+1]<<8|e[o],u[l]=r>>>0}return u}utils.join32=y;function d(e,t){for(var n=new Array(e.length*4),a=0,s=0;a<e.length;a++,s+=4){var u=e[a];t==="big"?(n[s]=u>>>24,n[s+1]=u>>>16&255,n[s+2]=u>>>8&255,n[s+3]=u&255):(n[s+3]=u>>>24,n[s+2]=u>>>16&255,n[s+1]=u>>>8&255,n[s]=u&255)}return n}utils.split32=d;function g(e,t){return e>>>t|e<<32-t}utils.rotr32=g;function M(e,t){return e<<t|e>>>32-t}utils.rotl32=M;function x(e,t){return e+t>>>0}utils.sum32=x;function B(e,t,n){return e+t+n>>>0}utils.sum32_3=B;function A(e,t,n,a){return e+t+n+a>>>0}utils.sum32_4=A;function D(e,t,n,a,s){return e+t+n+a+s>>>0}utils.sum32_5=D;function C(e,t,n,a){var s=e[t],u=e[t+1],l=a+u>>>0,o=(l<a?1:0)+n+s;e[t]=o>>>0,e[t+1]=l}utils.sum64=C;function $(e,t,n,a){var s=t+a>>>0,u=(s<t?1:0)+e+n;return u>>>0}utils.sum64_hi=$;function H(e,t,n,a){var s=t+a;return s>>>0}utils.sum64_lo=H;function N(e,t,n,a,s,u,l,o){var r=0,h=t;h=h+a>>>0,r+=h<t?1:0,h=h+u>>>0,r+=h<u?1:0,h=h+o>>>0,r+=h<o?1:0;var b=e+n+s+l+r;return b>>>0}utils.sum64_4_hi=N;function V(e,t,n,a,s,u,l,o){var r=t+a+u+o;return r>>>0}utils.sum64_4_lo=V;function Q(e,t,n,a,s,u,l,o,r,h){var b=0,E=t;E=E+a>>>0,b+=E<t?1:0,E=E+u>>>0,b+=E<u?1:0,E=E+o>>>0,b+=E<o?1:0,E=E+h>>>0,b+=E<h?1:0;var L=e+n+s+l+r+b;return L>>>0}utils.sum64_5_hi=Q;function ne(e,t,n,a,s,u,l,o,r,h){var b=t+a+u+o+h;return b>>>0}utils.sum64_5_lo=ne;function ae(e,t,n){var a=t<<32-n|e>>>n;return a>>>0}utils.rotr64_hi=ae;function ee(e,t,n){var a=e<<32-n|t>>>n;return a>>>0}utils.rotr64_lo=ee;function le(e,t,n){return e>>>n}utils.shr64_hi=le;function c(e,t,n){var a=e<<32-n|t>>>n;return a>>>0}return utils.shr64_lo=c,utils}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var _=requireUtils(),S=requireMinimalisticAssert();function I(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return common$1.BlockHash=I,I.prototype.update=function(R,f){if(R=_.toArray(R,f),this.pending?this.pending=this.pending.concat(R):this.pending=R,this.pendingTotal+=R.length,this.pending.length>=this._delta8){R=this.pending;var w=R.length%this._delta8;this.pending=R.slice(R.length-w,R.length),this.pending.length===0&&(this.pending=null),R=_.join32(R,0,R.length-w,this.endian);for(var m=0;m<R.length;m+=this._delta32)this._update(R,m,m+this._delta32)}return this},I.prototype.digest=function(R){return this.update(this._pad()),S(this.pending===null),this._digest(R)},I.prototype._pad=function(){var R=this.pendingTotal,f=this._delta8,w=f-(R+this.padLength)%f,m=new Array(w+this.padLength);m[0]=128;for(var v=1;v<w;v++)m[v]=0;if(R<<=3,this.endian==="big"){for(var y=8;y<this.padLength;y++)m[v++]=0;m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=R>>>24&255,m[v++]=R>>>16&255,m[v++]=R>>>8&255,m[v++]=R&255}else for(m[v++]=R&255,m[v++]=R>>>8&255,m[v++]=R>>>16&255,m[v++]=R>>>24&255,m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=0,y=8;y<this.padLength;y++)m[v++]=0;return m},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var _=requireUtils(),S=_.rotr32;function I(d,g,M,x){if(d===0)return p(g,M,x);if(d===1||d===3)return f(g,M,x);if(d===2)return R(g,M,x)}common.ft_1=I;function p(d,g,M){return d&g^~d&M}common.ch32=p;function R(d,g,M){return d&g^d&M^g&M}common.maj32=R;function f(d,g,M){return d^g^M}common.p32=f;function w(d){return S(d,2)^S(d,13)^S(d,22)}common.s0_256=w;function m(d){return S(d,6)^S(d,11)^S(d,25)}common.s1_256=m;function v(d){return S(d,7)^S(d,18)^d>>>3}common.g0_256=v;function y(d){return S(d,17)^S(d,19)^d>>>10}return common.g1_256=y,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var _=requireUtils(),S=requireCommon$1(),I=requireCommon(),p=_.rotl32,R=_.sum32,f=_.sum32_5,w=I.ft_1,m=S.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return _.inherits(y,m),_1=y,y.blockSize=512,y.outSize=160,y.hmacStrength=80,y.padLength=64,y.prototype._update=function(g,M){for(var x=this.W,B=0;B<16;B++)x[B]=g[M+B];for(;B<x.length;B++)x[B]=p(x[B-3]^x[B-8]^x[B-14]^x[B-16],1);var A=this.h[0],D=this.h[1],C=this.h[2],$=this.h[3],H=this.h[4];for(B=0;B<x.length;B++){var N=~~(B/20),V=f(p(A,5),w(N,D,C,$),H,x[B],v[N]);H=$,$=C,C=p(D,30),D=A,A=V}this.h[0]=R(this.h[0],A),this.h[1]=R(this.h[1],D),this.h[2]=R(this.h[2],C),this.h[3]=R(this.h[3],$),this.h[4]=R(this.h[4],H)},y.prototype._digest=function(g){return g==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var _=requireUtils(),S=requireCommon$1(),I=requireCommon(),p=requireMinimalisticAssert(),R=_.sum32,f=_.sum32_4,w=_.sum32_5,m=I.ch32,v=I.maj32,y=I.s0_256,d=I.s1_256,g=I.g0_256,M=I.g1_256,x=S.BlockHash,B=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function A(){if(!(this instanceof A))return new A;x.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=B,this.W=new Array(64)}return _.inherits(A,x),_256=A,A.blockSize=512,A.outSize=256,A.hmacStrength=192,A.padLength=64,A.prototype._update=function(C,$){for(var H=this.W,N=0;N<16;N++)H[N]=C[$+N];for(;N<H.length;N++)H[N]=f(M(H[N-2]),H[N-7],g(H[N-15]),H[N-16]);var V=this.h[0],Q=this.h[1],ne=this.h[2],ae=this.h[3],ee=this.h[4],le=this.h[5],c=this.h[6],e=this.h[7];for(p(this.k.length===H.length),N=0;N<H.length;N++){var t=w(e,d(ee),m(ee,le,c),this.k[N],H[N]),n=R(y(V),v(V,Q,ne));e=c,c=le,le=ee,ee=R(ae,t),ae=ne,ne=Q,Q=V,V=R(t,n)}this.h[0]=R(this.h[0],V),this.h[1]=R(this.h[1],Q),this.h[2]=R(this.h[2],ne),this.h[3]=R(this.h[3],ae),this.h[4]=R(this.h[4],ee),this.h[5]=R(this.h[5],le),this.h[6]=R(this.h[6],c),this.h[7]=R(this.h[7],e)},A.prototype._digest=function(C){return C==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var _=requireUtils(),S=require_256();function I(){if(!(this instanceof I))return new I;S.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return _.inherits(I,S),_224=I,I.blockSize=512,I.outSize=224,I.hmacStrength=192,I.padLength=64,I.prototype._digest=function(R){return R==="hex"?_.toHex32(this.h.slice(0,7),"big"):_.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var _=requireUtils(),S=requireCommon$1(),I=requireMinimalisticAssert(),p=_.rotr64_hi,R=_.rotr64_lo,f=_.shr64_hi,w=_.shr64_lo,m=_.sum64,v=_.sum64_hi,y=_.sum64_lo,d=_.sum64_4_hi,g=_.sum64_4_lo,M=_.sum64_5_hi,x=_.sum64_5_lo,B=S.BlockHash,A=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function D(){if(!(this instanceof D))return new D;B.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=A,this.W=new Array(160)}_.inherits(D,B),_512=D,D.blockSize=1024,D.outSize=512,D.hmacStrength=192,D.padLength=128,D.prototype._prepareBlock=function(n,a){for(var s=this.W,u=0;u<32;u++)s[u]=n[a+u];for(;u<s.length;u+=2){var l=c(s[u-4],s[u-3]),o=e(s[u-4],s[u-3]),r=s[u-14],h=s[u-13],b=ee(s[u-30],s[u-29]),E=le(s[u-30],s[u-29]),L=s[u-32],Y=s[u-31];s[u]=d(l,o,r,h,b,E,L,Y),s[u+1]=g(l,o,r,h,b,E,L,Y)}},D.prototype._update=function(n,a){this._prepareBlock(n,a);var s=this.W,u=this.h[0],l=this.h[1],o=this.h[2],r=this.h[3],h=this.h[4],b=this.h[5],E=this.h[6],L=this.h[7],Y=this.h[8],K=this.h[9],q=this.h[10],P=this.h[11],W=this.h[12],J=this.h[13],X=this.h[14],U=this.h[15];I(this.k.length===s.length);for(var re=0;re<s.length;re+=2){var Ie=X,ue=U,he=ne(Y,K),$e=ae(Y,K),me=C(Y,K,q,P,W),se=$(Y,K,q,P,W,J),De=this.k[re],de=this.k[re+1],ye=s[re],Ce=s[re+1],pe=M(Ie,ue,he,$e,me,se,De,de,ye,Ce),_e=x(Ie,ue,he,$e,me,se,De,de,ye,Ce);Ie=V(u,l),ue=Q(u,l),he=H(u,l,o,r,h),$e=N(u,l,o,r,h,b);var Ue=v(Ie,ue,he,$e),xe=y(Ie,ue,he,$e);X=W,U=J,W=q,J=P,q=Y,P=K,Y=v(E,L,pe,_e),K=y(L,L,pe,_e),E=h,L=b,h=o,b=r,o=u,r=l,u=v(pe,_e,Ue,xe),l=y(pe,_e,Ue,xe)}m(this.h,0,u,l),m(this.h,2,o,r),m(this.h,4,h,b),m(this.h,6,E,L),m(this.h,8,Y,K),m(this.h,10,q,P),m(this.h,12,W,J),m(this.h,14,X,U)},D.prototype._digest=function(n){return n==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")};function C(t,n,a,s,u){var l=t&a^~t&u;return l<0&&(l+=4294967296),l}function $(t,n,a,s,u,l){var o=n&s^~n&l;return o<0&&(o+=4294967296),o}function H(t,n,a,s,u){var l=t&a^t&u^a&u;return l<0&&(l+=4294967296),l}function N(t,n,a,s,u,l){var o=n&s^n&l^s&l;return o<0&&(o+=4294967296),o}function V(t,n){var a=p(t,n,28),s=p(n,t,2),u=p(n,t,7),l=a^s^u;return l<0&&(l+=4294967296),l}function Q(t,n){var a=R(t,n,28),s=R(n,t,2),u=R(n,t,7),l=a^s^u;return l<0&&(l+=4294967296),l}function ne(t,n){var a=p(t,n,14),s=p(t,n,18),u=p(n,t,9),l=a^s^u;return l<0&&(l+=4294967296),l}function ae(t,n){var a=R(t,n,14),s=R(t,n,18),u=R(n,t,9),l=a^s^u;return l<0&&(l+=4294967296),l}function ee(t,n){var a=p(t,n,1),s=p(t,n,8),u=f(t,n,7),l=a^s^u;return l<0&&(l+=4294967296),l}function le(t,n){var a=R(t,n,1),s=R(t,n,8),u=w(t,n,7),l=a^s^u;return l<0&&(l+=4294967296),l}function c(t,n){var a=p(t,n,19),s=p(n,t,29),u=f(t,n,6),l=a^s^u;return l<0&&(l+=4294967296),l}function e(t,n){var a=R(t,n,19),s=R(n,t,29),u=w(t,n,6),l=a^s^u;return l<0&&(l+=4294967296),l}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var _=requireUtils(),S=require_512();function I(){if(!(this instanceof I))return new I;S.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return _.inherits(I,S),_384=I,I.blockSize=1024,I.outSize=384,I.hmacStrength=192,I.padLength=128,I.prototype._digest=function(R){return R==="hex"?_.toHex32(this.h.slice(0,12),"big"):_.split32(this.h.slice(0,12),"big")},_384}var hasRequiredSha;function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var _=requireUtils(),S=requireCommon$1(),I=_.rotl32,p=_.sum32,R=_.sum32_3,f=_.sum32_4,w=S.BlockHash;function m(){if(!(this instanceof m))return new m;w.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}_.inherits(m,w),ripemd.ripemd160=m,m.blockSize=512,m.outSize=160,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(D,C){for(var $=this.h[0],H=this.h[1],N=this.h[2],V=this.h[3],Q=this.h[4],ne=$,ae=H,ee=N,le=V,c=Q,e=0;e<80;e++){var t=p(I(f($,v(e,H,N,V),D[g[e]+C],y(e)),x[e]),Q);$=Q,Q=V,V=I(N,10),N=H,H=t,t=p(I(f(ne,v(79-e,ae,ee,le),D[M[e]+C],d(e)),B[e]),c),ne=c,c=le,le=I(ee,10),ee=ae,ae=t}t=R(this.h[1],N,le),this.h[1]=R(this.h[2],V,c),this.h[2]=R(this.h[3],Q,ne),this.h[3]=R(this.h[4],$,ae),this.h[4]=R(this.h[0],H,ee),this.h[0]=t},m.prototype._digest=function(D){return D==="hex"?_.toHex32(this.h,"little"):_.split32(this.h,"little")};function v(A,D,C,$){return A<=15?D^C^$:A<=31?D&C|~D&$:A<=47?(D|~C)^$:A<=63?D&$|C&~$:D^(C|~$)}function y(A){return A<=15?0:A<=31?1518500249:A<=47?1859775393:A<=63?2400959708:2840853838}function d(A){return A<=15?1352829926:A<=31?1548603684:A<=47?1836072691:A<=63?2053994217:0}var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],M=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],x=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return ripemd}var hmac,hasRequiredHmac;function requireHmac(){if(hasRequiredHmac)return hmac;hasRequiredHmac=1;var _=requireUtils(),S=requireMinimalisticAssert();function I(p,R,f){if(!(this instanceof I))return new I(p,R,f);this.Hash=p,this.blockSize=p.blockSize/8,this.outSize=p.outSize/8,this.inner=null,this.outer=null,this._init(_.toArray(R,f))}return hmac=I,I.prototype._init=function(R){R.length>this.blockSize&&(R=new this.Hash().update(R).digest()),S(R.length<=this.blockSize);for(var f=R.length;f<this.blockSize;f++)R.push(0);for(f=0;f<R.length;f++)R[f]^=54;for(this.inner=new this.Hash().update(R),f=0;f<R.length;f++)R[f]^=106;this.outer=new this.Hash().update(R)},I.prototype.update=function(R,f){return this.inner.update(R,f),this},I.prototype.digest=function(R){return this.outer.update(this.inner.digest()),this.outer.digest(R)},hmac}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,(function(_){var S=_;S.utils=requireUtils(),S.common=requireCommon$1(),S.sha=requireSha(),S.ripemd=requireRipemd(),S.hmac=requireHmac(),S.sha1=S.sha.sha1,S.sha256=S.sha.sha256,S.sha224=S.sha.sha224,S.sha384=S.sha.sha384,S.sha512=S.sha.sha512,S.ripemd160=S.ripemd.ripemd160})(hash)),hash}var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),secp256k1}var hasRequiredCurves;function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,(function(_){var S=_,I=requireHash(),p=requireCurve(),R=requireUtils$1(),f=R.assert;function w(y){y.type==="short"?this.curve=new p.short(y):y.type==="edwards"?this.curve=new p.edwards(y):this.curve=new p.mont(y),this.g=this.curve.g,this.n=this.curve.n,this.hash=y.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}S.PresetCurve=w;function m(y,d){Object.defineProperty(S,y,{configurable:!0,enumerable:!0,get:function(){var g=new w(d);return Object.defineProperty(S,y,{configurable:!0,enumerable:!0,value:g}),g}})}m("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:I.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),m("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:I.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),m("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:I.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),m("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:I.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),m("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:I.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),m("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:I.sha256,gRed:!1,g:["9"]}),m("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:I.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var v;try{v=requireSecp256k1()}catch{v=void 0}m("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:I.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",v]})})(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var _=requireHash(),S=requireUtils$2(),I=requireMinimalisticAssert();function p(R){if(!(this instanceof p))return new p(R);this.hash=R.hash,this.predResist=!!R.predResist,this.outLen=this.hash.outSize,this.minEntropy=R.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var f=S.toArray(R.entropy,R.entropyEnc||"hex"),w=S.toArray(R.nonce,R.nonceEnc||"hex"),m=S.toArray(R.pers,R.persEnc||"hex");I(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,w,m)}return hmacDrbg=p,p.prototype._init=function(f,w,m){var v=f.concat(w).concat(m);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var y=0;y<this.V.length;y++)this.K[y]=0,this.V[y]=1;this._update(v),this._reseed=1,this.reseedInterval=281474976710656},p.prototype._hmac=function(){return new _.hmac(this.hash,this.K)},p.prototype._update=function(f){var w=this._hmac().update(this.V).update([0]);f&&(w=w.update(f)),this.K=w.digest(),this.V=this._hmac().update(this.V).digest(),f&&(this.K=this._hmac().update(this.V).update([1]).update(f).digest(),this.V=this._hmac().update(this.V).digest())},p.prototype.reseed=function(f,w,m,v){typeof w!="string"&&(v=m,m=w,w=null),f=S.toArray(f,w),m=S.toArray(m,v),I(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(f.concat(m||[])),this._reseed=1},p.prototype.generate=function(f,w,m,v){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof w!="string"&&(v=m,m=w,w=null),m&&(m=S.toArray(m,v||"hex"),this._update(m));for(var y=[];y.length<f;)this.V=this._hmac().update(this.V).digest(),y=y.concat(this.V);var d=y.slice(0,f);return this._update(m),this._reseed++,S.encode(d,w)},hmacDrbg}var key$1,hasRequiredKey$1;function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert;function p(R,f){this.ec=R,this.priv=null,this.pub=null,f.priv&&this._importPrivate(f.priv,f.privEnc),f.pub&&this._importPublic(f.pub,f.pubEnc)}return key$1=p,p.fromPublic=function(f,w,m){return w instanceof p?w:new p(f,{pub:w,pubEnc:m})},p.fromPrivate=function(f,w,m){return w instanceof p?w:new p(f,{priv:w,privEnc:m})},p.prototype.validate=function(){var f=this.getPublic();return f.isInfinity()?{result:!1,reason:"Invalid public key"}:f.validate()?f.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},p.prototype.getPublic=function(f,w){return typeof f=="string"&&(w=f,f=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),w?this.pub.encode(w,f):this.pub},p.prototype.getPrivate=function(f){return f==="hex"?this.priv.toString(16,2):this.priv},p.prototype._importPrivate=function(f,w){this.priv=new _(f,w||16),this.priv=this.priv.umod(this.ec.curve.n)},p.prototype._importPublic=function(f,w){if(f.x||f.y){this.ec.curve.type==="mont"?I(f.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&I(f.x&&f.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(f.x,f.y);return}this.pub=this.ec.curve.decodePoint(f,w)},p.prototype.derive=function(f){return f.validate()||I(f.validate(),"public point not validated"),f.mul(this.priv).getX()},p.prototype.sign=function(f,w,m){return this.ec.sign(f,this,w,m)},p.prototype.verify=function(f,w,m){return this.ec.verify(f,w,this,void 0,m)},p.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}var signature$1,hasRequiredSignature$1;function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert;function p(v,y){if(v instanceof p)return v;this._importDER(v,y)||(I(v.r&&v.s,"Signature without r or s"),this.r=new _(v.r,16),this.s=new _(v.s,16),v.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=v.recoveryParam)}signature$1=p;function R(){this.place=0}function f(v,y){var d=v[y.place++];if(!(d&128))return d;var g=d&15;if(g===0||g>4||v[y.place]===0)return!1;for(var M=0,x=0,B=y.place;x<g;x++,B++)M<<=8,M|=v[B],M>>>=0;return M<=127?!1:(y.place=B,M)}function w(v){for(var y=0,d=v.length-1;!v[y]&&!(v[y+1]&128)&&y<d;)y++;return y===0?v:v.slice(y)}p.prototype._importDER=function(y,d){y=S.toArray(y,d);var g=new R;if(y[g.place++]!==48)return!1;var M=f(y,g);if(M===!1||M+g.place!==y.length||y[g.place++]!==2)return!1;var x=f(y,g);if(x===!1||(y[g.place]&128)!==0)return!1;var B=y.slice(g.place,x+g.place);if(g.place+=x,y[g.place++]!==2)return!1;var A=f(y,g);if(A===!1||y.length!==A+g.place||(y[g.place]&128)!==0)return!1;var D=y.slice(g.place,A+g.place);if(B[0]===0)if(B[1]&128)B=B.slice(1);else return!1;if(D[0]===0)if(D[1]&128)D=D.slice(1);else return!1;return this.r=new _(B),this.s=new _(D),this.recoveryParam=null,!0};function m(v,y){if(y<128){v.push(y);return}var d=1+(Math.log(y)/Math.LN2>>>3);for(v.push(d|128);--d;)v.push(y>>>(d<<3)&255);v.push(y)}return p.prototype.toDER=function(y){var d=this.r.toArray(),g=this.s.toArray();for(d[0]&128&&(d=[0].concat(d)),g[0]&128&&(g=[0].concat(g)),d=w(d),g=w(g);!g[0]&&!(g[1]&128);)g=g.slice(1);var M=[2];m(M,d.length),M=M.concat(d),M.push(2),m(M,g.length);var x=M.concat(g),B=[48];return m(B,x.length),B=B.concat(x),S.encode(B,y)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var _=requireBn$3(),S=requireHmacDrbg(),I=requireUtils$1(),p=requireCurves(),R=requireBrorand(),f=I.assert,w=requireKey$1(),m=requireSignature$1();function v(y){if(!(this instanceof v))return new v(y);typeof y=="string"&&(f(Object.prototype.hasOwnProperty.call(p,y),"Unknown curve "+y),y=p[y]),y instanceof p.PresetCurve&&(y={curve:y}),this.curve=y.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=y.curve.g,this.g.precompute(y.curve.n.bitLength()+1),this.hash=y.hash||y.curve.hash}return ec=v,v.prototype.keyPair=function(d){return new w(this,d)},v.prototype.keyFromPrivate=function(d,g){return w.fromPrivate(this,d,g)},v.prototype.keyFromPublic=function(d,g){return w.fromPublic(this,d,g)},v.prototype.genKeyPair=function(d){d||(d={});for(var g=new S({hash:this.hash,pers:d.pers,persEnc:d.persEnc||"utf8",entropy:d.entropy||R(this.hash.hmacStrength),entropyEnc:d.entropy&&d.entropyEnc||"utf8",nonce:this.n.toArray()}),M=this.n.byteLength(),x=this.n.sub(new _(2));;){var B=new _(g.generate(M));if(!(B.cmp(x)>0))return B.iaddn(1),this.keyFromPrivate(B)}},v.prototype._truncateToN=function(d,g,M){var x;if(_.isBN(d)||typeof d=="number")d=new _(d,16),x=d.byteLength();else if(typeof d=="object")x=d.length,d=new _(d,16);else{var B=d.toString();x=B.length+1>>>1,d=new _(B,16)}typeof M!="number"&&(M=x*8);var A=M-this.n.bitLength();return A>0&&(d=d.ushrn(A)),!g&&d.cmp(this.n)>=0?d.sub(this.n):d},v.prototype.sign=function(d,g,M,x){if(typeof M=="object"&&(x=M,M=null),x||(x={}),typeof d!="string"&&typeof d!="number"&&!_.isBN(d)){f(typeof d=="object"&&d&&typeof d.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),f(d.length>>>0===d.length);for(var B=0;B<d.length;B++)f((d[B]&255)===d[B])}g=this.keyFromPrivate(g,M),d=this._truncateToN(d,!1,x.msgBitLength),f(!d.isNeg(),"Can not sign a negative message");var A=this.n.byteLength(),D=g.getPrivate().toArray("be",A),C=d.toArray("be",A);f(new _(C).eq(d),"Can not sign message");for(var $=new S({hash:this.hash,entropy:D,nonce:C,pers:x.pers,persEnc:x.persEnc||"utf8"}),H=this.n.sub(new _(1)),N=0;;N++){var V=x.k?x.k(N):new _($.generate(this.n.byteLength()));if(V=this._truncateToN(V,!0),!(V.cmpn(1)<=0||V.cmp(H)>=0)){var Q=this.g.mul(V);if(!Q.isInfinity()){var ne=Q.getX(),ae=ne.umod(this.n);if(ae.cmpn(0)!==0){var ee=V.invm(this.n).mul(ae.mul(g.getPrivate()).iadd(d));if(ee=ee.umod(this.n),ee.cmpn(0)!==0){var le=(Q.getY().isOdd()?1:0)|(ne.cmp(ae)!==0?2:0);return x.canonical&&ee.cmp(this.nh)>0&&(ee=this.n.sub(ee),le^=1),new m({r:ae,s:ee,recoveryParam:le})}}}}}},v.prototype.verify=function(d,g,M,x,B){B||(B={}),d=this._truncateToN(d,!1,B.msgBitLength),M=this.keyFromPublic(M,x),g=new m(g,"hex");var A=g.r,D=g.s;if(A.cmpn(1)<0||A.cmp(this.n)>=0||D.cmpn(1)<0||D.cmp(this.n)>=0)return!1;var C=D.invm(this.n),$=C.mul(d).umod(this.n),H=C.mul(A).umod(this.n),N;return this.curve._maxwellTrick?(N=this.g.jmulAdd($,M.getPublic(),H),N.isInfinity()?!1:N.eqXToP(A)):(N=this.g.mulAdd($,M.getPublic(),H),N.isInfinity()?!1:N.getX().umod(this.n).cmp(A)===0)},v.prototype.recoverPubKey=function(y,d,g,M){f((3&g)===g,"The recovery param is more than two bits"),d=new m(d,M);var x=this.n,B=new _(y),A=d.r,D=d.s,C=g&1,$=g>>1;if(A.cmp(this.curve.p.umod(this.curve.n))>=0&&$)throw new Error("Unable to find sencond key candinate");$?A=this.curve.pointFromX(A.add(this.curve.n),C):A=this.curve.pointFromX(A,C);var H=d.r.invm(x),N=x.sub(B).mul(H).umod(x),V=D.mul(H).umod(x);return this.g.mulAdd(N,A,V)},v.prototype.getKeyRecoveryParam=function(y,d,g,M){if(d=new m(d,M),d.recoveryParam!==null)return d.recoveryParam;for(var x=0;x<4;x++){var B;try{B=this.recoverPubKey(y,d,x)}catch{continue}if(B.eq(g))return x}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var _=requireUtils$1(),S=_.assert,I=_.parseBytes,p=_.cachedProperty;function R(f,w){this.eddsa=f,this._secret=I(w.secret),f.isPoint(w.pub)?this._pub=w.pub:this._pubBytes=I(w.pub)}return R.fromPublic=function(w,m){return m instanceof R?m:new R(w,{pub:m})},R.fromSecret=function(w,m){return m instanceof R?m:new R(w,{secret:m})},R.prototype.secret=function(){return this._secret},p(R,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),p(R,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),p(R,"privBytes",function(){var w=this.eddsa,m=this.hash(),v=w.encodingLength-1,y=m.slice(0,w.encodingLength);return y[0]&=248,y[v]&=127,y[v]|=64,y}),p(R,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),p(R,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),p(R,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),R.prototype.sign=function(w){return S(this._secret,"KeyPair can only verify"),this.eddsa.sign(w,this)},R.prototype.verify=function(w,m){return this.eddsa.verify(w,m,this)},R.prototype.getSecret=function(w){return S(this._secret,"KeyPair is public only"),_.encode(this.secret(),w)},R.prototype.getPublic=function(w){return _.encode(this.pubBytes(),w)},key=R,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert,p=S.cachedProperty,R=S.parseBytes;function f(w,m){this.eddsa=w,typeof m!="object"&&(m=R(m)),Array.isArray(m)&&(I(m.length===w.encodingLength*2,"Signature has invalid size"),m={R:m.slice(0,w.encodingLength),S:m.slice(w.encodingLength)}),I(m.R&&m.S,"Signature without R or S"),w.isPoint(m.R)&&(this._R=m.R),m.S instanceof _&&(this._S=m.S),this._Rencoded=Array.isArray(m.R)?m.R:m.Rencoded,this._Sencoded=Array.isArray(m.S)?m.S:m.Sencoded}return p(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),p(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),p(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),p(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return S.encode(this.toBytes(),"hex").toUpperCase()},signature=f,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var _=requireHash(),S=requireCurves(),I=requireUtils$1(),p=I.assert,R=I.parseBytes,f=requireKey(),w=requireSignature();function m(v){if(p(v==="ed25519","only tested with ed25519 so far"),!(this instanceof m))return new m(v);v=S[v].curve,this.curve=v,this.g=v.g,this.g.precompute(v.n.bitLength()+1),this.pointClass=v.point().constructor,this.encodingLength=Math.ceil(v.n.bitLength()/8),this.hash=_.sha512}return eddsa=m,m.prototype.sign=function(y,d){y=R(y);var g=this.keyFromSecret(d),M=this.hashInt(g.messagePrefix(),y),x=this.g.mul(M),B=this.encodePoint(x),A=this.hashInt(B,g.pubBytes(),y).mul(g.priv()),D=M.add(A).umod(this.curve.n);return this.makeSignature({R:x,S:D,Rencoded:B})},m.prototype.verify=function(y,d,g){if(y=R(y),d=this.makeSignature(d),d.S().gte(d.eddsa.curve.n)||d.S().isNeg())return!1;var M=this.keyFromPublic(g),x=this.hashInt(d.Rencoded(),M.pubBytes(),y),B=this.g.mul(d.S()),A=d.R().add(M.pub().mul(x));return A.eq(B)},m.prototype.hashInt=function(){for(var y=this.hash(),d=0;d<arguments.length;d++)y.update(arguments[d]);return I.intFromLE(y.digest()).umod(this.curve.n)},m.prototype.keyFromPublic=function(y){return f.fromPublic(this,y)},m.prototype.keyFromSecret=function(y){return f.fromSecret(this,y)},m.prototype.makeSignature=function(y){return y instanceof w?y:new w(this,y)},m.prototype.encodePoint=function(y){var d=y.getY().toArray("le",this.encodingLength);return d[this.encodingLength-1]|=y.getX().isOdd()?128:0,d},m.prototype.decodePoint=function(y){y=I.parseBytes(y);var d=y.length-1,g=y.slice(0,d).concat(y[d]&-129),M=(y[d]&128)!==0,x=I.intFromLE(g);return this.curve.pointFromY(x,M)},m.prototype.encodeInt=function(y){return y.toArray("le",this.encodingLength)},m.prototype.decodeInt=function(y){return I.intFromLE(y)},m.prototype.isPoint=function(y){return y instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,(function(_){var S=_;S.version=require$$0.version,S.utils=requireUtils$1(),S.rand=requireBrorand(),S.curve=requireCurve(),S.curves=requireCurves(),S.ec=requireEc(),S.eddsa=requireEddsa()})(elliptic)),elliptic}var asn1$1={},asn1={},bn$5={exports:{}},bn$4=bn$5.exports,hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.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},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],M=[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];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.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()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$4)})(bn$5)),bn$5.exports}var api={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,(function(exports$1){var indexOf=function(_,S){if(_.indexOf)return _.indexOf(S);for(var I=0;I<_.length;I++)if(_[I]===S)return I;return-1},Object_keys=function(_){if(Object.keys)return Object.keys(_);var S=[];for(var I in _)S.push(I);return S},forEach=function(_,S){if(_.forEach)return _.forEach(S);for(var I=0;I<_.length;I++)S(_[I],I,_)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(_,S,I){Object.defineProperty(_,S,{writable:!0,enumerable:!1,configurable:!0,value:I})}}catch{return function(S,I,p){S[I]=p}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports$1.Script=function(S){if(!(this instanceof Script))return new Script(S);this.code=S};Script.prototype.runInContext=function(_){if(!(_ instanceof Context))throw new TypeError("needs a 'context' argument.");var S=document.createElement("iframe");S.style||(S.style={}),S.style.display="none",document.body.appendChild(S);var I=S.contentWindow,p=I.eval,R=I.execScript;!p&&R&&(R.call(I,"null"),p=I.eval),forEach(Object_keys(_),function(m){I[m]=_[m]}),forEach(globals,function(m){_[m]&&(I[m]=_[m])});var f=Object_keys(I),w=p.call(I,this.code);return forEach(Object_keys(I),function(m){(m in _||indexOf(f,m)===-1)&&(_[m]=I[m])}),forEach(globals,function(m){m in _||defineProp(_,m,I[m])}),document.body.removeChild(S),w},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(_){var S=Script.createContext(_),I=this.runInContext(S);return _&&forEach(Object_keys(S),function(p){_[p]=S[p]}),I},forEach(Object_keys(Script.prototype),function(_){exports$1[_]=Script[_]=function(S){var I=Script(S);return I[_].apply(I,[].slice.call(arguments,1))}}),exports$1.isContext=function(_){return _ instanceof Context},exports$1.createScript=function(_){return exports$1.Script(_)},exports$1.createContext=Script.createContext=function(_){var S=new Context;return typeof _=="object"&&forEach(Object_keys(_),function(I){S[I]=_[I]}),S}})(vmBrowserify)),vmBrowserify}var hasRequiredApi;function requireApi(){return hasRequiredApi||(hasRequiredApi=1,(function(_){var S=requireAsn1$1(),I=requireInherits_browser(),p=_;p.define=function(w,m){return new R(w,m)};function R(f,w){this.name=f,this.body=w,this.decoders={},this.encoders={}}R.prototype._createNamed=function(w){var m;try{m=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) {
|
|
12
12
|
this._initNamed(entity);
|
|
13
|
-
})`)}catch{v=function(m){this._initNamed(m)}}return S(v,w),v.prototype._initNamed=function(m){w.call(this,m)},new v(this)},E.prototype._getDecoder=function(w){return w=w||"der",this.decoders.hasOwnProperty(w)||(this.decoders[w]=this._createNamed(_.decoders[w])),this.decoders[w]},E.prototype.decode=function(w,v,y){return this._getDecoder(v).decode(w,y)},E.prototype._getEncoder=function(w){return w=w||"der",this.encoders.hasOwnProperty(w)||(this.encoders[w]=this._createNamed(_.encoders[w])),this.encoders[w]},E.prototype.encode=function(w,v,y){return this._getEncoder(v).encode(w,y)}})(api$1)),api$1}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var b=requireInherits_browser$8();function _(p){this._reporterState={obj:null,path:[],options:p||{},errors:[]}}reporter.Reporter=_,_.prototype.isError=function(E){return E instanceof S},_.prototype.save=function(){var E=this._reporterState;return{obj:E.obj,pathLen:E.path.length}},_.prototype.restore=function(E){var a=this._reporterState;a.obj=E.obj,a.path=a.path.slice(0,E.pathLen)},_.prototype.enterKey=function(E){return this._reporterState.path.push(E)},_.prototype.exitKey=function(E){var a=this._reporterState;a.path=a.path.slice(0,E-1)},_.prototype.leaveKey=function(E,a,w){var v=this._reporterState;this.exitKey(E),v.obj!==null&&(v.obj[a]=w)},_.prototype.path=function(){return this._reporterState.path.join("/")},_.prototype.enterObject=function(){var E=this._reporterState,a=E.obj;return E.obj={},a},_.prototype.leaveObject=function(E){var a=this._reporterState,w=a.obj;return a.obj=E,w},_.prototype.error=function(E){var a,w=this._reporterState,v=E instanceof S;if(v?a=E:a=new S(w.path.map(function(y){return"["+JSON.stringify(y)+"]"}).join(""),E.message||E,E.stack),!w.options.partial)throw a;return v||w.errors.push(a),a},_.prototype.wrapResult=function(E){var a=this._reporterState;return a.options.partial?{result:this.isError(E)?null:E,errors:a.errors}:E};function S(p,E){this.path=p,this.rethrow(E)}return b(S,Error),S.prototype.rethrow=function(E){if(this.message=E+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,S),!this.stack)try{throw new Error(this.message)}catch(a){this.stack=a.stack}return this},reporter}var buffer={},hasRequiredBuffer;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var b=requireInherits_browser$8(),_=requireBase().Reporter,S=requireDist().Buffer;function p(a,w){if(_.call(this,w),!S.isBuffer(a)){this.error("Input not Buffer");return}this.base=a,this.offset=0,this.length=a.length}b(p,_),buffer.DecoderBuffer=p,p.prototype.save=function(){return{offset:this.offset,reporter:_.prototype.save.call(this)}},p.prototype.restore=function(w){var v=new p(this.base);return v.offset=w.offset,v.length=this.offset,this.offset=w.offset,_.prototype.restore.call(this,w.reporter),v},p.prototype.isEmpty=function(){return this.offset===this.length},p.prototype.readUInt8=function(w){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(w||"DecoderBuffer overrun")},p.prototype.skip=function(w,v){if(!(this.offset+w<=this.length))return this.error(v||"DecoderBuffer overrun");var y=new p(this.base);return y._reporterState=this._reporterState,y.offset=this.offset,y.length=this.offset+w,this.offset+=w,y},p.prototype.raw=function(w){return this.base.slice(w?w.offset:this.offset,this.length)};function E(a,w){if(Array.isArray(a))this.length=0,this.value=a.map(function(v){return v instanceof E||(v=new E(v,w)),this.length+=v.length,v},this);else if(typeof a=="number"){if(!(0<=a&&a<=255))return w.error("non-byte EncoderBuffer value");this.value=a,this.length=1}else if(typeof a=="string")this.value=a,this.length=S.byteLength(a);else if(S.isBuffer(a))this.value=a,this.length=a.length;else return w.error("Unsupported type: "+typeof a)}return buffer.EncoderBuffer=E,E.prototype.join=function(w,v){return w||(w=new S(this.length)),v||(v=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(y){y.join(w,v),v+=y.length}):(typeof this.value=="number"?w[v]=this.value:typeof this.value=="string"?w.write(this.value,v):S.isBuffer(this.value)&&this.value.copy(w,v),v+=this.length)),w},buffer}var node,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node;hasRequiredNode=1;var b=requireBase().Reporter,_=requireBase().EncoderBuffer,S=requireBase().DecoderBuffer,p=requireMinimalisticAssert(),E=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],a=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(E),w=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function v(m,d){var g={};this._baseState=g,g.enc=m,g.parent=d||null,g.children=null,g.tag=null,g.args=null,g.reverseArgs=null,g.choice=null,g.optional=!1,g.any=!1,g.obj=!1,g.use=null,g.useDecoder=null,g.key=null,g.default=null,g.explicit=null,g.implicit=null,g.contains=null,g.parent||(g.children=[],this._wrap())}node=v;var y=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return v.prototype.clone=function(){var d=this._baseState,g={};y.forEach(function(R){g[R]=d[R]});var x=new this.constructor(g.parent);return x._baseState=g,x},v.prototype._wrap=function(){var d=this._baseState;a.forEach(function(g){this[g]=function(){var R=new this.constructor(this);return d.children.push(R),R[g].apply(R,arguments)}},this)},v.prototype._init=function(d){var g=this._baseState;p(g.parent===null),d.call(this),g.children=g.children.filter(function(x){return x._baseState.parent===this},this),p.equal(g.children.length,1,"Root node can have only one child")},v.prototype._useArgs=function(d){var g=this._baseState,x=d.filter(function(R){return R instanceof this.constructor},this);d=d.filter(function(R){return!(R instanceof this.constructor)},this),x.length!==0&&(p(g.children===null),g.children=x,x.forEach(function(R){R._baseState.parent=this},this)),d.length!==0&&(p(g.args===null),g.args=d,g.reverseArgs=d.map(function(R){if(typeof R!="object"||R.constructor!==Object)return R;var q={};return Object.keys(R).forEach(function(B){B==(B|0)&&(B|=0);var $=R[B];q[$]=B}),q}))},w.forEach(function(m){v.prototype[m]=function(){var g=this._baseState;throw new Error(m+" not implemented for encoding: "+g.enc)}}),E.forEach(function(m){v.prototype[m]=function(){var g=this._baseState,x=Array.prototype.slice.call(arguments);return p(g.tag===null),g.tag=m,this._useArgs(x),this}}),v.prototype.use=function(d){p(d);var g=this._baseState;return p(g.use===null),g.use=d,this},v.prototype.optional=function(){var d=this._baseState;return d.optional=!0,this},v.prototype.def=function(d){var g=this._baseState;return p(g.default===null),g.default=d,g.optional=!0,this},v.prototype.explicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.explicit=d,this},v.prototype.implicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.implicit=d,this},v.prototype.obj=function(){var d=this._baseState,g=Array.prototype.slice.call(arguments);return d.obj=!0,g.length!==0&&this._useArgs(g),this},v.prototype.key=function(d){var g=this._baseState;return p(g.key===null),g.key=d,this},v.prototype.any=function(){var d=this._baseState;return d.any=!0,this},v.prototype.choice=function(d){var g=this._baseState;return p(g.choice===null),g.choice=d,this._useArgs(Object.keys(d).map(function(x){return d[x]})),this},v.prototype.contains=function(d){var g=this._baseState;return p(g.use===null),g.contains=d,this},v.prototype._decode=function(d,g){var x=this._baseState;if(x.parent===null)return d.wrapResult(x.children[0]._decode(d,g));var R=x.default,q=!0,B=null;if(x.key!==null&&(B=d.enterKey(x.key)),x.optional){var $=null;if(x.explicit!==null?$=x.explicit:x.implicit!==null?$=x.implicit:x.tag!==null&&($=x.tag),$===null&&!x.any){var k=d.save();try{x.choice===null?this._decodeGeneric(x.tag,d,g):this._decodeChoice(d,g),q=!0}catch{q=!1}d.restore(k)}else if(q=this._peekTag(d,$,x.any),d.isError(q))return q}var I;if(x.obj&&q&&(I=d.enterObject()),q){if(x.explicit!==null){var L=this._decodeTag(d,x.explicit);if(d.isError(L))return L;d=L}var D=d.offset;if(x.use===null&&x.choice===null){if(x.any)var k=d.save();var G=this._decodeTag(d,x.implicit!==null?x.implicit:x.tag,x.any);if(d.isError(G))return G;x.any?R=d.raw(k):d=G}if(g&&g.track&&x.tag!==null&&g.track(d.path(),D,d.length,"tagged"),g&&g.track&&x.tag!==null&&g.track(d.path(),d.offset,d.length,"content"),x.any?R=R:x.choice===null?R=this._decodeGeneric(x.tag,d,g):R=this._decodeChoice(d,g),d.isError(R))return R;if(!x.any&&x.choice===null&&x.children!==null&&x.children.forEach(function(ie){ie._decode(d,g)}),x.contains&&(x.tag==="octstr"||x.tag==="bitstr")){var X=new S(R);R=this._getUse(x.contains,d._reporterState.obj)._decode(X,g)}}return x.obj&&q&&(R=d.leaveObject(I)),x.key!==null&&(R!==null||q===!0)?d.leaveKey(B,x.key,R):B!==null&&d.exitKey(B),R},v.prototype._decodeGeneric=function(d,g,x){var R=this._baseState;return d==="seq"||d==="set"?null:d==="seqof"||d==="setof"?this._decodeList(g,d,R.args[0],x):/str$/.test(d)?this._decodeStr(g,d,x):d==="objid"&&R.args?this._decodeObjid(g,R.args[0],R.args[1],x):d==="objid"?this._decodeObjid(g,null,null,x):d==="gentime"||d==="utctime"?this._decodeTime(g,d,x):d==="null_"?this._decodeNull(g,x):d==="bool"?this._decodeBool(g,x):d==="objDesc"?this._decodeStr(g,d,x):d==="int"||d==="enum"?this._decodeInt(g,R.args&&R.args[0],x):R.use!==null?this._getUse(R.use,g._reporterState.obj)._decode(g,x):g.error("unknown tag: "+d)},v.prototype._getUse=function(d,g){var x=this._baseState;return x.useDecoder=this._use(d,g),p(x.useDecoder._baseState.parent===null),x.useDecoder=x.useDecoder._baseState.children[0],x.implicit!==x.useDecoder._baseState.implicit&&(x.useDecoder=x.useDecoder.clone(),x.useDecoder._baseState.implicit=x.implicit),x.useDecoder},v.prototype._decodeChoice=function(d,g){var x=this._baseState,R=null,q=!1;return Object.keys(x.choice).some(function(B){var $=d.save(),k=x.choice[B];try{var I=k._decode(d,g);if(d.isError(I))return!1;R={type:B,value:I},q=!0}catch{return d.restore($),!1}return!0},this),q?R:d.error("Choice not matched")},v.prototype._createEncoderBuffer=function(d){return new _(d,this.reporter)},v.prototype._encode=function(d,g,x){var R=this._baseState;if(!(R.default!==null&&R.default===d)){var q=this._encodeValue(d,g,x);if(q!==void 0&&!this._skipDefault(q,g,x))return q}},v.prototype._encodeValue=function(d,g,x){var R=this._baseState;if(R.parent===null)return R.children[0]._encode(d,g||new b);var k=null;if(this.reporter=g,R.optional&&d===void 0)if(R.default!==null)d=R.default;else return;var q=null,B=!1;if(R.any)k=this._createEncoderBuffer(d);else if(R.choice)k=this._encodeChoice(d,g);else if(R.contains)q=this._getUse(R.contains,x)._encode(d,g),B=!0;else if(R.children)q=R.children.map(function(D){if(D._baseState.tag==="null_")return D._encode(null,g,d);if(D._baseState.key===null)return g.error("Child should have a key");var G=g.enterKey(D._baseState.key);if(typeof d!="object")return g.error("Child expected, but input is not object");var X=D._encode(d[D._baseState.key],g,d);return g.leaveKey(G),X},this).filter(function(D){return D}),q=this._createEncoderBuffer(q);else if(R.tag==="seqof"||R.tag==="setof"){if(!(R.args&&R.args.length===1))return g.error("Too many args for : "+R.tag);if(!Array.isArray(d))return g.error("seqof/setof, but data is not Array");var $=this.clone();$._baseState.implicit=null,q=this._createEncoderBuffer(d.map(function(D){var G=this._baseState;return this._getUse(G.args[0],d)._encode(D,g)},$))}else R.use!==null?k=this._getUse(R.use,x)._encode(d,g):(q=this._encodePrimitive(R.tag,d),B=!0);var k;if(!R.any&&R.choice===null){var I=R.implicit!==null?R.implicit:R.tag,L=R.implicit===null?"universal":"context";I===null?R.use===null&&g.error("Tag could be omitted only for .use()"):R.use===null&&(k=this._encodeComposite(I,B,L,q))}return R.explicit!==null&&(k=this._encodeComposite(R.explicit,!1,"context",k)),k},v.prototype._encodeChoice=function(d,g){var x=this._baseState,R=x.choice[d.type];return R||p(!1,d.type+" not found in "+JSON.stringify(Object.keys(x.choice))),R._encode(d.value,g)},v.prototype._encodePrimitive=function(d,g){var x=this._baseState;if(/str$/.test(d))return this._encodeStr(g,d);if(d==="objid"&&x.args)return this._encodeObjid(g,x.reverseArgs[0],x.args[1]);if(d==="objid")return this._encodeObjid(g,null,null);if(d==="gentime"||d==="utctime")return this._encodeTime(g,d);if(d==="null_")return this._encodeNull();if(d==="int"||d==="enum")return this._encodeInt(g,x.args&&x.reverseArgs[0]);if(d==="bool")return this._encodeBool(g);if(d==="objDesc")return this._encodeStr(g,d);throw new Error("Unsupported tag: "+d)},v.prototype._isNumstr=function(d){return/^[0-9 ]*$/.test(d)},v.prototype._isPrintstr=function(d){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(d)},node}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,(function(b){var _=b;_.Reporter=requireReporter().Reporter,_.DecoderBuffer=requireBuffer().DecoderBuffer,_.EncoderBuffer=requireBuffer().EncoderBuffer,_.Node=requireNode()})(base)),base}var constants={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,(function(b){var _=requireConstants();b.tagClass={0:"universal",1:"application",2:"context",3:"private"},b.tagClassByName=_._reverse(b.tagClass),b.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},b.tagByName=_._reverse(b.tag)})(der)),der}var hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,(function(b){var _=b;_._reverse=function(p){var E={};return Object.keys(p).forEach(function(a){(a|0)==a&&(a=a|0);var w=p[a];E[w]=a}),E},_.der=requireDer$2()})(constants)),constants}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var b=requireInherits_browser$8(),_=requireAsn1$1(),S=_.base,p=_.bignum,E=_.constants.der;function a(m){this.enc="der",this.name=m.name,this.entity=m,this.tree=new w,this.tree._init(m.body)}der_1$1=a,a.prototype.decode=function(d,g){return d instanceof S.DecoderBuffer||(d=new S.DecoderBuffer(d,g)),this.tree._decode(d,g)};function w(m){S.Node.call(this,"der",m)}b(w,S.Node),w.prototype._peekTag=function(d,g,x){if(d.isEmpty())return!1;var R=d.save(),q=v(d,'Failed to peek tag: "'+g+'"');return d.isError(q)?q:(d.restore(R),q.tag===g||q.tagStr===g||q.tagStr+"of"===g||x)},w.prototype._decodeTag=function(d,g,x){var R=v(d,'Failed to decode tag of "'+g+'"');if(d.isError(R))return R;var q=y(d,R.primitive,'Failed to get length of "'+g+'"');if(d.isError(q))return q;if(!x&&R.tag!==g&&R.tagStr!==g&&R.tagStr+"of"!==g)return d.error('Failed to match tag: "'+g+'"');if(R.primitive||q!==null)return d.skip(q,'Failed to match body of: "'+g+'"');var B=d.save(),$=this._skipUntilEnd(d,'Failed to skip indefinite length body: "'+this.tag+'"');return d.isError($)?$:(q=d.offset-B.offset,d.restore(B),d.skip(q,'Failed to match body of: "'+g+'"'))},w.prototype._skipUntilEnd=function(d,g){for(;;){var x=v(d,g);if(d.isError(x))return x;var R=y(d,x.primitive,g);if(d.isError(R))return R;var q;if(x.primitive||R!==null?q=d.skip(R):q=this._skipUntilEnd(d,g),d.isError(q))return q;if(x.tagStr==="end")break}},w.prototype._decodeList=function(d,g,x,R){for(var q=[];!d.isEmpty();){var B=this._peekTag(d,"end");if(d.isError(B))return B;var $=x.decode(d,"der",R);if(d.isError($)&&B)break;q.push($)}return q},w.prototype._decodeStr=function(d,g){if(g==="bitstr"){var x=d.readUInt8();return d.isError(x)?x:{unused:x,data:d.raw()}}else if(g==="bmpstr"){var R=d.raw();if(R.length%2===1)return d.error("Decoding of string type: bmpstr length mismatch");for(var q="",B=0;B<R.length/2;B++)q+=String.fromCharCode(R.readUInt16BE(B*2));return q}else if(g==="numstr"){var $=d.raw().toString("ascii");return this._isNumstr($)?$:d.error("Decoding of string type: numstr unsupported characters")}else{if(g==="octstr")return d.raw();if(g==="objDesc")return d.raw();if(g==="printstr"){var k=d.raw().toString("ascii");return this._isPrintstr(k)?k:d.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(g)?d.raw().toString():d.error("Decoding of string type: "+g+" unsupported")}},w.prototype._decodeObjid=function(d,g,x){for(var R,q=[],B=0;!d.isEmpty();){var $=d.readUInt8();B<<=7,B|=$&127,($&128)===0&&(q.push(B),B=0)}$&128&&q.push(B);var k=q[0]/40|0,I=q[0]%40;if(x?R=q:R=[k,I].concat(q.slice(1)),g){var L=g[R.join(" ")];L===void 0&&(L=g[R.join(".")]),L!==void 0&&(R=L)}return R},w.prototype._decodeTime=function(d,g){var x=d.raw().toString();if(g==="gentime")var R=x.slice(0,4)|0,q=x.slice(4,6)|0,B=x.slice(6,8)|0,$=x.slice(8,10)|0,k=x.slice(10,12)|0,I=x.slice(12,14)|0;else if(g==="utctime"){var R=x.slice(0,2)|0,q=x.slice(2,4)|0,B=x.slice(4,6)|0,$=x.slice(6,8)|0,k=x.slice(8,10)|0,I=x.slice(10,12)|0;R<70?R=2e3+R:R=1900+R}else return d.error("Decoding "+g+" time is not supported yet");return Date.UTC(R,q-1,B,$,k,I,0)},w.prototype._decodeNull=function(d){return null},w.prototype._decodeBool=function(d){var g=d.readUInt8();return d.isError(g)?g:g!==0},w.prototype._decodeInt=function(d,g){var x=d.raw(),R=new p(x);return g&&(R=g[R.toString(10)]||R),R},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getDecoder("der").tree};function v(m,d){var g=m.readUInt8(d);if(m.isError(g))return g;var x=E.tagClass[g>>6],R=(g&32)===0;if((g&31)===31){var q=g;for(g=0;(q&128)===128;){if(q=m.readUInt8(d),m.isError(q))return q;g<<=7,g|=q&127}}else g&=31;var B=E.tag[g];return{cls:x,primitive:R,tag:g,tagStr:B}}function y(m,d,g){var x=m.readUInt8(g);if(m.isError(x))return x;if(!d&&x===128)return null;if((x&128)===0)return x;var R=x&127;if(R>4)return m.error("length octect is too long");x=0;for(var q=0;q<R;q++){x<<=8;var B=m.readUInt8(g);if(m.isError(B))return B;x|=B}return x}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var b=requireInherits_browser$8(),_=requireDist().Buffer,S=requireDer$1();function p(E){S.call(this,E),this.enc="pem"}return b(p,S),pem$1=p,p.prototype.decode=function(a,w){for(var v=a.toString().split(/[\r\n]+/g),y=w.label.toUpperCase(),m=/^-----(BEGIN|END) ([^-]+)-----$/,d=-1,g=-1,x=0;x<v.length;x++){var R=v[x].match(m);if(R!==null&&R[2]===y)if(d===-1){if(R[1]!=="BEGIN")break;d=x}else{if(R[1]!=="END")break;g=x;break}}if(d===-1||g===-1)throw new Error("PEM section not found for: "+y);var q=v.slice(d+1,g).join("");q.replace(/[^a-z0-9\+\/=]+/gi,"");var B=new _(q,"base64");return S.prototype.decode.call(this,B,w)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,(function(b){var _=b;_.der=requireDer$1(),_.pem=requirePem$1()})(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var b=requireInherits_browser$8(),_=requireDist().Buffer,S=requireAsn1$1(),p=S.base,E=S.constants.der;function a(m){this.enc="der",this.name=m.name,this.entity=m,this.tree=new w,this.tree._init(m.body)}der_1=a,a.prototype.encode=function(d,g){return this.tree._encode(d,g).join()};function w(m){p.Node.call(this,"der",m)}b(w,p.Node),w.prototype._encodeComposite=function(d,g,x,R){var q=y(d,g,x,this.reporter);if(R.length<128){var k=new _(2);return k[0]=q,k[1]=R.length,this._createEncoderBuffer([k,R])}for(var B=1,$=R.length;$>=256;$>>=8)B++;var k=new _(2+B);k[0]=q,k[1]=128|B;for(var $=1+B,I=R.length;I>0;$--,I>>=8)k[$]=I&255;return this._createEncoderBuffer([k,R])},w.prototype._encodeStr=function(d,g){if(g==="bitstr")return this._createEncoderBuffer([d.unused|0,d.data]);if(g==="bmpstr"){for(var x=new _(d.length*2),R=0;R<d.length;R++)x.writeUInt16BE(d.charCodeAt(R),R*2);return this._createEncoderBuffer(x)}else return g==="numstr"?this._isNumstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: numstr supports only digits and space"):g==="printstr"?this._isPrintstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(g)?this._createEncoderBuffer(d):g==="objDesc"?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: "+g+" unsupported")},w.prototype._encodeObjid=function(d,g,x){if(typeof d=="string"){if(!g)return this.reporter.error("string objid given, but no values map found");if(!g.hasOwnProperty(d))return this.reporter.error("objid not found in values map");d=g[d].split(/[\s\.]+/g);for(var R=0;R<d.length;R++)d[R]|=0}else if(Array.isArray(d)){d=d.slice();for(var R=0;R<d.length;R++)d[R]|=0}if(!Array.isArray(d))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(d));if(!x){if(d[1]>=40)return this.reporter.error("Second objid identifier OOB");d.splice(0,2,d[0]*40+d[1])}for(var q=0,R=0;R<d.length;R++){var B=d[R];for(q++;B>=128;B>>=7)q++}for(var $=new _(q),k=$.length-1,R=d.length-1;R>=0;R--){var B=d[R];for($[k--]=B&127;(B>>=7)>0;)$[k--]=128|B&127}return this._createEncoderBuffer($)};function v(m){return m<10?"0"+m:m}w.prototype._encodeTime=function(d,g){var x,R=new Date(d);return g==="gentime"?x=[v(R.getFullYear()),v(R.getUTCMonth()+1),v(R.getUTCDate()),v(R.getUTCHours()),v(R.getUTCMinutes()),v(R.getUTCSeconds()),"Z"].join(""):g==="utctime"?x=[v(R.getFullYear()%100),v(R.getUTCMonth()+1),v(R.getUTCDate()),v(R.getUTCHours()),v(R.getUTCMinutes()),v(R.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+g+" time is not supported yet"),this._encodeStr(x,"octstr")},w.prototype._encodeNull=function(){return this._createEncoderBuffer("")},w.prototype._encodeInt=function(d,g){if(typeof d=="string"){if(!g)return this.reporter.error("String int or enum given, but no values map");if(!g.hasOwnProperty(d))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(d));d=g[d]}if(typeof d!="number"&&!_.isBuffer(d)){var x=d.toArray();!d.sign&&x[0]&128&&x.unshift(0),d=new _(x)}if(_.isBuffer(d)){var R=d.length;d.length===0&&R++;var B=new _(R);return d.copy(B),d.length===0&&(B[0]=0),this._createEncoderBuffer(B)}if(d<128)return this._createEncoderBuffer(d);if(d<256)return this._createEncoderBuffer([0,d]);for(var R=1,q=d;q>=256;q>>=8)R++;for(var B=new Array(R),q=B.length-1;q>=0;q--)B[q]=d&255,d>>=8;return B[0]&128&&B.unshift(0),this._createEncoderBuffer(new _(B))},w.prototype._encodeBool=function(d){return this._createEncoderBuffer(d?255:0)},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getEncoder("der").tree},w.prototype._skipDefault=function(d,g,x){var R=this._baseState,q;if(R.default===null)return!1;var B=d.join();if(R.defaultBuffer===void 0&&(R.defaultBuffer=this._encodeValue(R.default,g,x).join()),B.length!==R.defaultBuffer.length)return!1;for(q=0;q<B.length;q++)if(B[q]!==R.defaultBuffer[q])return!1;return!0};function y(m,d,g,x){var R;if(m==="seqof"?m="seq":m==="setof"&&(m="set"),E.tagByName.hasOwnProperty(m))R=E.tagByName[m];else if(typeof m=="number"&&(m|0)===m)R=m;else return x.error("Unknown tag: "+m);return R>=31?x.error("Multi-octet tag encoding unsupported"):(d||(R|=32),R|=E.tagClassByName[g||"universal"]<<6,R)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var b=requireInherits_browser$8(),_=requireDer();function S(p){_.call(this,p),this.enc="pem"}return b(S,_),pem=S,S.prototype.encode=function(E,a){for(var w=_.prototype.encode.call(this,E),v=w.toString("base64"),y=["-----BEGIN "+a.label+"-----"],m=0;m<v.length;m+=64)y.push(v.slice(m,m+64));return y.push("-----END "+a.label+"-----"),y.join(`
|
|
14
|
-
`)},pem}var hasRequiredEncoders;function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,(function(b){var _=b;_.der=requireDer(),_.pem=requirePem()})(encoders)),encoders}var hasRequiredAsn1$1;function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,(function(b){var _=b;_.bignum=requireBn$2(),_.define=requireApi().define,_.base=requireBase(),_.constants=requireConstants(),_.decoders=requireDecoders(),_.encoders=requireEncoders()})(asn1)),asn1}var certificate,hasRequiredCertificate;function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var b=requireAsn1$1(),_=b.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),S=b.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),p=b.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),E=b.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())}),a=b.define("RelativeDistinguishedName",function(){this.setof(S)}),w=b.define("RDNSequence",function(){this.seqof(a)}),v=b.define("Name",function(){this.choice({rdnSequence:this.use(w)})}),y=b.define("Validity",function(){this.seq().obj(this.key("notBefore").use(_),this.key("notAfter").use(_))}),m=b.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=b.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(p),this.key("issuer").use(v),this.key("validity").use(y),this.key("subject").use(v),this.key("subjectPublicKeyInfo").use(E),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(m).optional())}),g=b.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(p),this.key("signatureValue").bitstr())});return certificate=g,certificate}var hasRequiredAsn1;function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var b=requireAsn1$1();asn1$1.certificate=requireCertificate();var _=b.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});asn1$1.RSAPrivateKey=_;var S=b.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});asn1$1.RSAPublicKey=S;var p=b.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),E=b.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())});asn1$1.PublicKey=E;var a=b.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(p),this.key("subjectPrivateKey").octstr())});asn1$1.PrivateKey=a;var w=b.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});asn1$1.EncryptedPrivateKey=w;var v=b.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});asn1$1.DSAPrivateKey=v,asn1$1.DSAparam=b.define("DSAparam",function(){this.int()});var y=b.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),m=b.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(y),this.key("publicKey").optional().explicit(1).bitstr())});return asn1$1.ECPrivateKey=m,asn1$1.signature=b.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}),asn1$1}const require$$1$2={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"};var fixProc,hasRequiredFixProc;function requireFixProc(){if(hasRequiredFixProc)return fixProc;hasRequiredFixProc=1;var b=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,_=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,S=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,p=requireEvp_bytestokey(),E=requireBrowser$7(),a=requireSafeBuffer$2().Buffer;return fixProc=function(w,v){var y=w.toString(),m=y.match(b),d;if(m){var x="aes"+m[1],R=a.from(m[2],"hex"),q=a.from(m[3].replace(/[\r\n]/g,""),"base64"),B=p(v,R.slice(0,8),parseInt(m[1],10)).key,$=[],k=E.createDecipheriv(x,B,R);$.push(k.update(q)),$.push(k.final()),d=a.concat($)}else{var g=y.match(S);d=a.from(g[2].replace(/[\r\n]/g,""),"base64")}var I=y.match(_)[1];return{tag:I,data:d}},fixProc}var parseAsn1,hasRequiredParseAsn1;function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var b=requireAsn1(),_=require$$1$2,S=requireFixProc(),p=requireBrowser$7(),E=requireBrowser$8().pbkdf2Sync,a=requireSafeBuffer$2().Buffer;function w(y,m){var d=y.algorithm.decrypt.kde.kdeparams.salt,g=parseInt(y.algorithm.decrypt.kde.kdeparams.iters.toString(),10),x=_[y.algorithm.decrypt.cipher.algo.join(".")],R=y.algorithm.decrypt.cipher.iv,q=y.subjectPrivateKey,B=parseInt(x.split("-")[1],10)/8,$=E(m,d,g,B,"sha1"),k=p.createDecipheriv(x,$,R),I=[];return I.push(k.update(q)),I.push(k.final()),a.concat(I)}function v(y){var m;typeof y=="object"&&!a.isBuffer(y)&&(m=y.passphrase,y=y.key),typeof y=="string"&&(y=a.from(y));var d=S(y,m),g=d.tag,x=d.data,R,q;switch(g){case"CERTIFICATE":q=b.certificate.decode(x,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(q||(q=b.PublicKey.decode(x,"der")),R=q.algorithm.algorithm.join("."),R){case"1.2.840.113549.1.1.1":return b.RSAPublicKey.decode(q.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return q.subjectPrivateKey=q.subjectPublicKey,{type:"ec",data:q};case"1.2.840.10040.4.1":return q.algorithm.params.pub_key=b.DSAparam.decode(q.subjectPublicKey.data,"der"),{type:"dsa",data:q.algorithm.params};default:throw new Error("unknown key id "+R)}case"ENCRYPTED PRIVATE KEY":x=b.EncryptedPrivateKey.decode(x,"der"),x=w(x,m);case"PRIVATE KEY":switch(q=b.PrivateKey.decode(x,"der"),R=q.algorithm.algorithm.join("."),R){case"1.2.840.113549.1.1.1":return b.RSAPrivateKey.decode(q.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:q.algorithm.curve,privateKey:b.ECPrivateKey.decode(q.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return q.algorithm.params.priv_key=b.DSAparam.decode(q.subjectPrivateKey,"der"),{type:"dsa",params:q.algorithm.params};default:throw new Error("unknown key id "+R)}case"RSA PUBLIC KEY":return b.RSAPublicKey.decode(x,"der");case"RSA PRIVATE KEY":return b.RSAPrivateKey.decode(x,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:b.DSAPrivateKey.decode(x,"der")};case"EC PRIVATE KEY":return x=b.ECPrivateKey.decode(x,"der"),{curve:x.parameters.value,privateKey:x.privateKey};default:throw new Error("unknown key type "+g)}}return v.signature=b.signature,parseAsn1=v,parseAsn1}const require$$4={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};var hasRequiredSign;function requireSign(){if(hasRequiredSign)return sign.exports;hasRequiredSign=1;var b=requireSafeBuffer$2().Buffer,_=requireBrowser$9(),S=requireBrowserifyRsa(),p=requireElliptic().ec,E=requireBn$4(),a=requireParseAsn1(),w=require$$4,v=1;function y(k,I,L,D,G){var X=a(I);if(X.curve){if(D!=="ecdsa"&&D!=="ecdsa/rsa")throw new Error("wrong private key type");return m(k,X)}else if(X.type==="dsa"){if(D!=="dsa")throw new Error("wrong private key type");return d(k,X,L)}if(D!=="rsa"&&D!=="ecdsa/rsa")throw new Error("wrong private key type");if(I.padding!==void 0&&I.padding!==v)throw new Error("illegal or unsupported padding mode");k=b.concat([G,k]);for(var te=X.modulus.byteLength(),ie=[0,1];k.length+ie.length+1<te;)ie.push(255);ie.push(0);for(var ee=-1;++ee<k.length;)ie.push(k[ee]);var ue=S(ie,X);return ue}function m(k,I){var L=w[I.curve.join(".")];if(!L)throw new Error("unknown curve "+I.curve.join("."));var D=new p(L),G=D.keyFromPrivate(I.privateKey),X=G.sign(k);return b.from(X.toDER())}function d(k,I,L){for(var D=I.params.priv_key,G=I.params.p,X=I.params.q,te=I.params.g,ie=new E(0),ee,ue=R(k,X).mod(X),c=!1,e=x(D,X,k,L);c===!1;)ee=B(X,e,L),ie=$(te,ee,G,X),c=ee.invm(X).imul(ue.add(D.mul(ie))).mod(X),c.cmpn(0)===0&&(c=!1,ie=new E(0));return g(ie,c)}function g(k,I){k=k.toArray(),I=I.toArray(),k[0]&128&&(k=[0].concat(k)),I[0]&128&&(I=[0].concat(I));var L=k.length+I.length+4,D=[48,L,2,k.length];return D=D.concat(k,[2,I.length],I),b.from(D)}function x(k,I,L,D){if(k=b.from(k.toArray()),k.length<I.byteLength()){var G=b.alloc(I.byteLength()-k.length);k=b.concat([G,k])}var X=L.length,te=q(L,I),ie=b.alloc(X);ie.fill(1);var ee=b.alloc(X);return ee=_(D,ee).update(ie).update(b.from([0])).update(k).update(te).digest(),ie=_(D,ee).update(ie).digest(),ee=_(D,ee).update(ie).update(b.from([1])).update(k).update(te).digest(),ie=_(D,ee).update(ie).digest(),{k:ee,v:ie}}function R(k,I){var L=new E(k),D=(k.length<<3)-I.bitLength();return D>0&&L.ishrn(D),L}function q(k,I){k=R(k,I),k=k.mod(I);var L=b.from(k.toArray());if(L.length<I.byteLength()){var D=b.alloc(I.byteLength()-L.length);L=b.concat([D,L])}return L}function B(k,I,L){var D,G;do{for(D=b.alloc(0);D.length*8<k.bitLength();)I.v=_(L,I.k).update(I.v).digest(),D=b.concat([D,I.v]);G=R(D,k),I.k=_(L,I.k).update(I.v).update(b.from([0])).digest(),I.v=_(L,I.k).update(I.v).digest()}while(G.cmp(k)!==-1);return G}function $(k,I,L,D){return k.toRed(E.mont(L)).redPow(I).fromRed().mod(D)}return sign.exports=y,sign.exports.getKey=x,sign.exports.makeKey=B,sign.exports}var verify_1,hasRequiredVerify;function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var b=requireSafeBuffer$2().Buffer,_=requireBn$4(),S=requireElliptic().ec,p=requireParseAsn1(),E=require$$4;function a(m,d,g,x,R){var q=p(g);if(q.type==="ec"){if(x!=="ecdsa"&&x!=="ecdsa/rsa")throw new Error("wrong public key type");return w(m,d,q)}else if(q.type==="dsa"){if(x!=="dsa")throw new Error("wrong public key type");return v(m,d,q)}if(x!=="rsa"&&x!=="ecdsa/rsa")throw new Error("wrong public key type");d=b.concat([R,d]);for(var B=q.modulus.byteLength(),$=[1],k=0;d.length+$.length+2<B;)$.push(255),k+=1;$.push(0);for(var I=-1;++I<d.length;)$.push(d[I]);$=b.from($);var L=_.mont(q.modulus);m=new _(m).toRed(L),m=m.redPow(new _(q.publicExponent)),m=b.from(m.fromRed().toArray());var D=k<8?1:0;for(B=Math.min(m.length,$.length),m.length!==$.length&&(D=1),I=-1;++I<B;)D|=m[I]^$[I];return D===0}function w(m,d,g){var x=E[g.data.algorithm.curve.join(".")];if(!x)throw new Error("unknown curve "+g.data.algorithm.curve.join("."));var R=new S(x),q=g.data.subjectPrivateKey.data;return R.verify(d,m,q)}function v(m,d,g){var x=g.data.p,R=g.data.q,q=g.data.g,B=g.data.pub_key,$=p.signature.decode(m,"der"),k=$.s,I=$.r;y(k,R),y(I,R);var L=_.mont(x),D=k.invm(R),G=q.toRed(L).redPow(new _(d).mul(D).mod(R)).fromRed().mul(B.toRed(L).redPow(I.mul(D).mod(R)).fromRed()).mod(x).mod(R);return G.cmp(I)===0}function y(m,d){if(m.cmpn(0)<=0)throw new Error("invalid sig");if(m.cmp(d)>=0)throw new Error("invalid sig")}return verify_1=a,verify_1}var browser$4,hasRequiredBrowser$4;function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var b=requireSafeBuffer$2().Buffer,_=requireBrowser$a(),S=requireReadableBrowser$1(),p=requireInherits_browser$2(),E=requireSign(),a=requireVerify(),w=require$$6;Object.keys(w).forEach(function(g){w[g].id=b.from(w[g].id,"hex"),w[g.toLowerCase()]=w[g]});function v(g){S.Writable.call(this);var x=w[g];if(!x)throw new Error("Unknown message digest");this._hashType=x.hash,this._hash=_(x.hash),this._tag=x.id,this._signType=x.sign}p(v,S.Writable),v.prototype._write=function(x,R,q){this._hash.update(x),q()},v.prototype.update=function(x,R){return this._hash.update(typeof x=="string"?b.from(x,R):x),this},v.prototype.sign=function(x,R){this.end();var q=this._hash.digest(),B=E(q,x,this._hashType,this._signType,this._tag);return R?B.toString(R):B};function y(g){S.Writable.call(this);var x=w[g];if(!x)throw new Error("Unknown message digest");this._hash=_(x.hash),this._tag=x.id,this._signType=x.sign}p(y,S.Writable),y.prototype._write=function(x,R,q){this._hash.update(x),q()},y.prototype.update=function(x,R){return this._hash.update(typeof x=="string"?b.from(x,R):x),this},y.prototype.verify=function(x,R,q){var B=typeof R=="string"?b.from(R,q):R;this.end();var $=this._hash.digest();return a(B,$,x,this._signType,this._tag)};function m(g){return new v(g)}function d(g){return new y(g)}return browser$4={Sign:m,Verify:d,createSign:m,createVerify:d},browser$4}var bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,(function(b){(function(_,S){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function E(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function a(c,e,t){if(a.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof _=="object"?_.exports=a:S.BN=a,a.BN=a,a.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}a.isBN=function(e){return e instanceof a?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var f=0;e[0]==="-"&&(f++,this.negative=1),f<e.length&&(t===16?this._parseHex(e,f,n):(this._parseBase(e,t,f),n==="le"&&this._initArray(this.toArray(),t,n)))},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 f=0;f<this.length;f++)this.words[f]=0;var s,u,l=0;if(n==="be")for(f=e.length-1,s=0;f>=0;f-=3)u=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(f=0,s=0;f<e.length;f+=3)u=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function v(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function y(c,e,t){var n=v(c,t);return t-1>=e&&(n|=v(c,t-1)<<4),n}a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var s=0,u=0,l;if(n==="be")for(f=e.length-1;f>=t;f-=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function m(c,e,t,n){for(var f=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;f*=n,l>=49?f+=l-49+10:l>=17?f+=l-17+10:f+=l}return f}a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var f=0,s=1;s<=67108863;s*=t)f++;f--,s=s/t|0;for(var u=e.length-n,l=u%f,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=f)r=m(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var M=1;for(r=m(e,h,e.length,t),h=0;h<l;h++)M*=t;this.imuln(M),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],x=[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];a.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var f=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<f|s)&16777215).toString(16);s=l>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=x[e];n="";var M=this.clone();for(M.negative=0;!M.isZero();){var T=M.modn(h).toString(e);M=M.idivn(h),M.isZero()?n=T+n:n=d[r-T.length]+T+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var f=this.byteLength(),s=n||Math.max(1,f);p(f<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-f;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function R(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(c.words[n]&1<<f)>>>f}return e}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var f=0;f<n.length;f++)this.words[f]=t.words[f]^n.words[f];if(this!==t)for(;f<t.length;f++)this.words[f]=t.words[f];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var f=0;f<t;f++)this.words[f]=~this.words[f]&67108863;return n>0&&(this.words[f]=~this.words[f]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,f=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<f:this.words[n]=this.words[n]&~(1<<f),this.strip()},a.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,f;this.length>e.length?(n=this,f=e):(n=e,f=this);for(var s=0,u=0;u<f.length;u++)t=(n.words[u]|0)+(f.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},a.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,s;n>0?(f=this,s=e):(f=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(f.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<f.length;l++)t=(f.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<f.length&&f!==this)for(;l<f.length;l++)this.words[l]=f.words[l];return this.length=Math.max(this.length,l),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function q(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var f=c.words[0]|0,s=e.words[0]|0,u=f*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,M=o&67108863,T=Math.min(r,e.length-1),N=Math.max(0,r-c.length+1);N<=T;N++){var Q=r-N|0;f=c.words[Q]|0,s=e.words[N]|0,u=f*s+M,h+=u/67108864|0,M=u&67108863}t.words[r]=M|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var B=function(e,t,n){var f=e.words,s=t.words,u=n.words,l=0,o,r,h,M=f[0]|0,T=M&8191,N=M>>>13,Q=f[1]|0,K=Q&8191,A=Q>>>13,O=f[2]|0,W=O&8191,Y=O>>>13,Z=f[3]|0,j=Z&8191,ne=Z>>>13,Re=f[4]|0,le=Re&8191,de=Re>>>13,Pe=f[5]|0,me=Pe&8191,he=Pe>>>13,Le=f[6]|0,ve=Le&8191,ge=Le>>>13,De=f[7]|0,ye=De&8191,xe=De>>>13,Ue=f[8]|0,Se=Ue&8191,Ae=Ue>>>13,He=f[9]|0,z=He&8191,C=He>>>13,F=s[0]|0,V=F&8191,ae=F>>>13,pe=s[1]|0,re=pe&8191,oe=pe>>>13,Oe=s[2]|0,ce=Oe&8191,we=Oe>>>13,Ce=s[3]|0,qe=Ce&8191,Te=Ce>>>13,je=s[4]|0,Be=je&8191,$e=je>>>13,ze=s[5]|0,H=ze&8191,P=ze>>>13,U=s[6]|0,J=U&8191,fe=U>>>13,be=s[7]|0,se=be&8191,_e=be>>>13,Ne=s[8]|0,Me=Ne&8191,Ee=Ne>>>13,Fe=s[9]|0,Ie=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(T,V),r=Math.imul(T,ae),r=r+Math.imul(N,V)|0,h=Math.imul(N,ae);var We=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(K,V),r=Math.imul(K,ae),r=r+Math.imul(A,V)|0,h=Math.imul(A,ae),o=o+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,r=r+Math.imul(N,re)|0,h=h+Math.imul(N,oe)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(W,V),r=Math.imul(W,ae),r=r+Math.imul(Y,V)|0,h=Math.imul(Y,ae),o=o+Math.imul(K,re)|0,r=r+Math.imul(K,oe)|0,r=r+Math.imul(A,re)|0,h=h+Math.imul(A,oe)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(T,we)|0,r=r+Math.imul(N,ce)|0,h=h+Math.imul(N,we)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(j,V),r=Math.imul(j,ae),r=r+Math.imul(ne,V)|0,h=Math.imul(ne,ae),o=o+Math.imul(W,re)|0,r=r+Math.imul(W,oe)|0,r=r+Math.imul(Y,re)|0,h=h+Math.imul(Y,oe)|0,o=o+Math.imul(K,ce)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(A,ce)|0,h=h+Math.imul(A,we)|0,o=o+Math.imul(T,qe)|0,r=r+Math.imul(T,Te)|0,r=r+Math.imul(N,qe)|0,h=h+Math.imul(N,Te)|0;var Ke=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(le,V),r=Math.imul(le,ae),r=r+Math.imul(de,V)|0,h=Math.imul(de,ae),o=o+Math.imul(j,re)|0,r=r+Math.imul(j,oe)|0,r=r+Math.imul(ne,re)|0,h=h+Math.imul(ne,oe)|0,o=o+Math.imul(W,ce)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(Y,ce)|0,h=h+Math.imul(Y,we)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(A,qe)|0,h=h+Math.imul(A,Te)|0,o=o+Math.imul(T,Be)|0,r=r+Math.imul(T,$e)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,$e)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(me,V),r=Math.imul(me,ae),r=r+Math.imul(he,V)|0,h=Math.imul(he,ae),o=o+Math.imul(le,re)|0,r=r+Math.imul(le,oe)|0,r=r+Math.imul(de,re)|0,h=h+Math.imul(de,oe)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(j,we)|0,r=r+Math.imul(ne,ce)|0,h=h+Math.imul(ne,we)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(Y,qe)|0,h=h+Math.imul(Y,Te)|0,o=o+Math.imul(K,Be)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(A,Be)|0,h=h+Math.imul(A,$e)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(T,P)|0,r=r+Math.imul(N,H)|0,h=h+Math.imul(N,P)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ve,V),r=Math.imul(ve,ae),r=r+Math.imul(ge,V)|0,h=Math.imul(ge,ae),o=o+Math.imul(me,re)|0,r=r+Math.imul(me,oe)|0,r=r+Math.imul(he,re)|0,h=h+Math.imul(he,oe)|0,o=o+Math.imul(le,ce)|0,r=r+Math.imul(le,we)|0,r=r+Math.imul(de,ce)|0,h=h+Math.imul(de,we)|0,o=o+Math.imul(j,qe)|0,r=r+Math.imul(j,Te)|0,r=r+Math.imul(ne,qe)|0,h=h+Math.imul(ne,Te)|0,o=o+Math.imul(W,Be)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(Y,Be)|0,h=h+Math.imul(Y,$e)|0,o=o+Math.imul(K,H)|0,r=r+Math.imul(K,P)|0,r=r+Math.imul(A,H)|0,h=h+Math.imul(A,P)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(T,fe)|0,r=r+Math.imul(N,J)|0,h=h+Math.imul(N,fe)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(ye,V),r=Math.imul(ye,ae),r=r+Math.imul(xe,V)|0,h=Math.imul(xe,ae),o=o+Math.imul(ve,re)|0,r=r+Math.imul(ve,oe)|0,r=r+Math.imul(ge,re)|0,h=h+Math.imul(ge,oe)|0,o=o+Math.imul(me,ce)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(he,ce)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(le,qe)|0,r=r+Math.imul(le,Te)|0,r=r+Math.imul(de,qe)|0,h=h+Math.imul(de,Te)|0,o=o+Math.imul(j,Be)|0,r=r+Math.imul(j,$e)|0,r=r+Math.imul(ne,Be)|0,h=h+Math.imul(ne,$e)|0,o=o+Math.imul(W,H)|0,r=r+Math.imul(W,P)|0,r=r+Math.imul(Y,H)|0,h=h+Math.imul(Y,P)|0,o=o+Math.imul(K,J)|0,r=r+Math.imul(K,fe)|0,r=r+Math.imul(A,J)|0,h=h+Math.imul(A,fe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(T,_e)|0,r=r+Math.imul(N,se)|0,h=h+Math.imul(N,_e)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(Se,V),r=Math.imul(Se,ae),r=r+Math.imul(Ae,V)|0,h=Math.imul(Ae,ae),o=o+Math.imul(ye,re)|0,r=r+Math.imul(ye,oe)|0,r=r+Math.imul(xe,re)|0,h=h+Math.imul(xe,oe)|0,o=o+Math.imul(ve,ce)|0,r=r+Math.imul(ve,we)|0,r=r+Math.imul(ge,ce)|0,h=h+Math.imul(ge,we)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(le,Be)|0,r=r+Math.imul(le,$e)|0,r=r+Math.imul(de,Be)|0,h=h+Math.imul(de,$e)|0,o=o+Math.imul(j,H)|0,r=r+Math.imul(j,P)|0,r=r+Math.imul(ne,H)|0,h=h+Math.imul(ne,P)|0,o=o+Math.imul(W,J)|0,r=r+Math.imul(W,fe)|0,r=r+Math.imul(Y,J)|0,h=h+Math.imul(Y,fe)|0,o=o+Math.imul(K,se)|0,r=r+Math.imul(K,_e)|0,r=r+Math.imul(A,se)|0,h=h+Math.imul(A,_e)|0,o=o+Math.imul(T,Me)|0,r=r+Math.imul(T,Ee)|0,r=r+Math.imul(N,Me)|0,h=h+Math.imul(N,Ee)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(z,V),r=Math.imul(z,ae),r=r+Math.imul(C,V)|0,h=Math.imul(C,ae),o=o+Math.imul(Se,re)|0,r=r+Math.imul(Se,oe)|0,r=r+Math.imul(Ae,re)|0,h=h+Math.imul(Ae,oe)|0,o=o+Math.imul(ye,ce)|0,r=r+Math.imul(ye,we)|0,r=r+Math.imul(xe,ce)|0,h=h+Math.imul(xe,we)|0,o=o+Math.imul(ve,qe)|0,r=r+Math.imul(ve,Te)|0,r=r+Math.imul(ge,qe)|0,h=h+Math.imul(ge,Te)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(he,Be)|0,h=h+Math.imul(he,$e)|0,o=o+Math.imul(le,H)|0,r=r+Math.imul(le,P)|0,r=r+Math.imul(de,H)|0,h=h+Math.imul(de,P)|0,o=o+Math.imul(j,J)|0,r=r+Math.imul(j,fe)|0,r=r+Math.imul(ne,J)|0,h=h+Math.imul(ne,fe)|0,o=o+Math.imul(W,se)|0,r=r+Math.imul(W,_e)|0,r=r+Math.imul(Y,se)|0,h=h+Math.imul(Y,_e)|0,o=o+Math.imul(K,Me)|0,r=r+Math.imul(K,Ee)|0,r=r+Math.imul(A,Me)|0,h=h+Math.imul(A,Ee)|0,o=o+Math.imul(T,Ie)|0,r=r+Math.imul(T,ke)|0,r=r+Math.imul(N,Ie)|0,h=h+Math.imul(N,ke)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(z,re),r=Math.imul(z,oe),r=r+Math.imul(C,re)|0,h=Math.imul(C,oe),o=o+Math.imul(Se,ce)|0,r=r+Math.imul(Se,we)|0,r=r+Math.imul(Ae,ce)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(ye,qe)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(xe,qe)|0,h=h+Math.imul(xe,Te)|0,o=o+Math.imul(ve,Be)|0,r=r+Math.imul(ve,$e)|0,r=r+Math.imul(ge,Be)|0,h=h+Math.imul(ge,$e)|0,o=o+Math.imul(me,H)|0,r=r+Math.imul(me,P)|0,r=r+Math.imul(he,H)|0,h=h+Math.imul(he,P)|0,o=o+Math.imul(le,J)|0,r=r+Math.imul(le,fe)|0,r=r+Math.imul(de,J)|0,h=h+Math.imul(de,fe)|0,o=o+Math.imul(j,se)|0,r=r+Math.imul(j,_e)|0,r=r+Math.imul(ne,se)|0,h=h+Math.imul(ne,_e)|0,o=o+Math.imul(W,Me)|0,r=r+Math.imul(W,Ee)|0,r=r+Math.imul(Y,Me)|0,h=h+Math.imul(Y,Ee)|0,o=o+Math.imul(K,Ie)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(A,Ie)|0,h=h+Math.imul(A,ke)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(z,ce),r=Math.imul(z,we),r=r+Math.imul(C,ce)|0,h=Math.imul(C,we),o=o+Math.imul(Se,qe)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,$e)|0,r=r+Math.imul(xe,Be)|0,h=h+Math.imul(xe,$e)|0,o=o+Math.imul(ve,H)|0,r=r+Math.imul(ve,P)|0,r=r+Math.imul(ge,H)|0,h=h+Math.imul(ge,P)|0,o=o+Math.imul(me,J)|0,r=r+Math.imul(me,fe)|0,r=r+Math.imul(he,J)|0,h=h+Math.imul(he,fe)|0,o=o+Math.imul(le,se)|0,r=r+Math.imul(le,_e)|0,r=r+Math.imul(de,se)|0,h=h+Math.imul(de,_e)|0,o=o+Math.imul(j,Me)|0,r=r+Math.imul(j,Ee)|0,r=r+Math.imul(ne,Me)|0,h=h+Math.imul(ne,Ee)|0,o=o+Math.imul(W,Ie)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(Y,Ie)|0,h=h+Math.imul(Y,ke)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(z,qe),r=Math.imul(z,Te),r=r+Math.imul(C,qe)|0,h=Math.imul(C,Te),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,$e)|0,r=r+Math.imul(Ae,Be)|0,h=h+Math.imul(Ae,$e)|0,o=o+Math.imul(ye,H)|0,r=r+Math.imul(ye,P)|0,r=r+Math.imul(xe,H)|0,h=h+Math.imul(xe,P)|0,o=o+Math.imul(ve,J)|0,r=r+Math.imul(ve,fe)|0,r=r+Math.imul(ge,J)|0,h=h+Math.imul(ge,fe)|0,o=o+Math.imul(me,se)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(he,se)|0,h=h+Math.imul(he,_e)|0,o=o+Math.imul(le,Me)|0,r=r+Math.imul(le,Ee)|0,r=r+Math.imul(de,Me)|0,h=h+Math.imul(de,Ee)|0,o=o+Math.imul(j,Ie)|0,r=r+Math.imul(j,ke)|0,r=r+Math.imul(ne,Ie)|0,h=h+Math.imul(ne,ke)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(z,Be),r=Math.imul(z,$e),r=r+Math.imul(C,Be)|0,h=Math.imul(C,$e),o=o+Math.imul(Se,H)|0,r=r+Math.imul(Se,P)|0,r=r+Math.imul(Ae,H)|0,h=h+Math.imul(Ae,P)|0,o=o+Math.imul(ye,J)|0,r=r+Math.imul(ye,fe)|0,r=r+Math.imul(xe,J)|0,h=h+Math.imul(xe,fe)|0,o=o+Math.imul(ve,se)|0,r=r+Math.imul(ve,_e)|0,r=r+Math.imul(ge,se)|0,h=h+Math.imul(ge,_e)|0,o=o+Math.imul(me,Me)|0,r=r+Math.imul(me,Ee)|0,r=r+Math.imul(he,Me)|0,h=h+Math.imul(he,Ee)|0,o=o+Math.imul(le,Ie)|0,r=r+Math.imul(le,ke)|0,r=r+Math.imul(de,Ie)|0,h=h+Math.imul(de,ke)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(z,H),r=Math.imul(z,P),r=r+Math.imul(C,H)|0,h=Math.imul(C,P),o=o+Math.imul(Se,J)|0,r=r+Math.imul(Se,fe)|0,r=r+Math.imul(Ae,J)|0,h=h+Math.imul(Ae,fe)|0,o=o+Math.imul(ye,se)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(xe,se)|0,h=h+Math.imul(xe,_e)|0,o=o+Math.imul(ve,Me)|0,r=r+Math.imul(ve,Ee)|0,r=r+Math.imul(ge,Me)|0,h=h+Math.imul(ge,Ee)|0,o=o+Math.imul(me,Ie)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(he,Ie)|0,h=h+Math.imul(he,ke)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(z,J),r=Math.imul(z,fe),r=r+Math.imul(C,J)|0,h=Math.imul(C,fe),o=o+Math.imul(Se,se)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ae,se)|0,h=h+Math.imul(Ae,_e)|0,o=o+Math.imul(ye,Me)|0,r=r+Math.imul(ye,Ee)|0,r=r+Math.imul(xe,Me)|0,h=h+Math.imul(xe,Ee)|0,o=o+Math.imul(ve,Ie)|0,r=r+Math.imul(ve,ke)|0,r=r+Math.imul(ge,Ie)|0,h=h+Math.imul(ge,ke)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(z,se),r=Math.imul(z,_e),r=r+Math.imul(C,se)|0,h=Math.imul(C,_e),o=o+Math.imul(Se,Me)|0,r=r+Math.imul(Se,Ee)|0,r=r+Math.imul(Ae,Me)|0,h=h+Math.imul(Ae,Ee)|0,o=o+Math.imul(ye,Ie)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(xe,Ie)|0,h=h+Math.imul(xe,ke)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(z,Me),r=Math.imul(z,Ee),r=r+Math.imul(C,Me)|0,h=Math.imul(C,Ee),o=o+Math.imul(Se,Ie)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ae,Ie)|0,h=h+Math.imul(Ae,ke)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(z,Ie),r=Math.imul(z,ke),r=r+Math.imul(C,Ie)|0,h=Math.imul(C,ke);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=We,u[1]=Ge,u[2]=Ve,u[3]=Ke,u[4]=Ze,u[5]=Ye,u[6]=Xe,u[7]=Je,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(B=q);function $(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,M=c.words[h]|0,T=e.words[r]|0,N=M*T,Q=N&67108863;u=u+(N/67108864|0)|0,Q=Q+l|0,l=Q&67108863,u=u+(Q>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function k(c,e,t){var n=new I;return n.mulp(c,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=B(this,e,t):f<63?n=q(this,e,t):f<1024?n=$(this,e,t):n=k(this,e,t),n};function I(c,e){this.x=c,this.y=e}I.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,f=0;f<e;f++)t[f]=this.revBin(f,n,e);return t},I.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var f=0,s=0;s<t;s++)f|=(e&1)<<t-s-1,e>>=1;return f},I.prototype.permute=function(e,t,n,f,s,u){for(var l=0;l<u;l++)f[l]=t[e[l]],s[l]=n[e[l]]},I.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),M=0;M<s;M+=o)for(var T=r,N=h,Q=0;Q<l;Q++){var K=n[M+Q],A=f[M+Q],O=n[M+Q+l],W=f[M+Q+l],Y=T*O-N*W;W=T*W+N*O,O=Y,n[M+Q]=K+O,f[M+Q]=A+W,n[M+Q+l]=K-O,f[M+Q+l]=A-W,Q!==o&&(Y=r*T-h*N,N=r*N+h*T,T=Y)}},I.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,f=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+f},I.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var f=0;f<n/2;f++){var s=e[f];e[f]=e[n-f-1],e[n-f-1]=s,s=t[f],t[f]=-t[n-f-1],t[n-f-1]=-s}},I.prototype.normalize13b=function(e,t){for(var n=0,f=0;f<t/2;f++){var s=Math.round(e[2*f+1]/t)*8192+Math.round(e[2*f]/t)+n;e[f]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},I.prototype.convert13b=function(e,t,n,f){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<f;++u)n[u]=0;p(s===0),p((s&-8192)===0)},I.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},I.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),l=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),M=new Array(f),T=new Array(f),N=n.words;N.length=f,this.convert13b(e.words,e.length,l,f),this.convert13b(t.words,t.length,h,f),this.transform(l,u,o,r,f,s),this.transform(h,u,M,T,f,s);for(var Q=0;Q<f;Q++){var K=o[Q]*M[Q]-r[Q]*T[Q];r[Q]=o[Q]*T[Q]+r[Q]*M[Q],o[Q]=K}return this.conjugate(o,r,f),this.transform(o,r,N,u,f,s),this.conjugate(N,u,f),this.normalize13b(N,f),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),k(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var f=(this.words[n]|0)*e,s=(f&67108863)+(t&67108863);t>>=26,t+=f/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=R(e);if(t.length===0)return new a(1);for(var n=this,f=0;f<t.length&&t[f]===0;f++,n=n.sqr());if(++f<t.length)for(var s=n.sqr();f<t.length;f++,s=s.sqr())t[f]!==0&&(n=n.mul(s));return n},a.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&f,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var f;t?f=(t-t%26)/26:f=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(f-=u,f=Math.max(0,f),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=f);r--){var M=this.words[r]|0;this.words[r]=h<<26-s|M>>>s,h=M&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&f)},a.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var f=67108863^67108863>>>t<<t;this.words[this.length-1]&=f}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var f=e.length+n,s;this._expand(f);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,f=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),f.iushln(n),u=s.words[s.length-1]|0);var o=f.length-s.length,r;if(t!=="mod"){r=new a(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var M=f.clone()._ishlnsubmul(s,1,o);M.negative===0&&(f=M,r&&(r.words[o]=1));for(var T=o-1;T>=0;T--){var N=(f.words[s.length+T]|0)*67108864+(f.words[s.length+T-1]|0);for(N=Math.min(N/u|0,67108863),f._ishlnsubmul(s,N,T);f.negative!==0;)N--,f.negative=0,f._ishlnsubmul(s,1,T),f.isZero()||(f.negative^=1);r&&(r.words[T]=N)}return r&&r.strip(),f.strip(),t!=="div"&&n!==0&&f.iushrn(n),{div:r||null,mod:f}},a.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var f,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(f=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:f,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(f=u.div.neg()),{div:f,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,f=e.ushrn(1),s=e.andln(1),u=n.cmp(f);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,f=this.length-1;f>=0;f--)n=(t*n+(this.words[f]|0))%e;return n},a.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var f=(this.words[n]|0)+t*67108864;this.words[n]=f/e|0,t=f%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=new a(0),l=new a(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var M=0,T=1;(t.words[0]&T)===0&&M<26;++M,T<<=1);if(M>0)for(t.iushrn(M);M-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var N=0,Q=1;(n.words[0]&Q)===0&&N<26;++N,Q<<=1);if(N>0)for(n.iushrn(N);N-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(l)):(n.isub(t),u.isub(f),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},a.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)f.isOdd()&&f.iadd(u),f.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(s)):(n.isub(t),s.isub(f))}var M;return t.cmpn(1)===0?M=f:M=s,M.cmpn(0)<0&&M.iadd(e),M},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var f=0;t.isEven()&&n.isEven();f++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(f)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=f,this;for(var s=f,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var f=this.words[0]|0;n=f===e?0:f<e?-1:1}return this.negative!==0?-n|0:n},a.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var f=this.words[n]|0,s=e.words[n]|0;if(f!==s){f<s?t=-1:f>s&&(t=1);break}}return t},a.prototype.gtn=function(e){return this.cmpn(e)===1},a.prototype.gt=function(e){return this.cmp(e)===1},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return this.cmpn(e)===0},a.prototype.eq=function(e){return this.cmp(e)===0},a.red=function(e){return new ee(e)},a.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var L={k256:null,p224:null,p192:null,p25519:null};function D(c,e){this.name=c,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},D.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var f=n<this.n?-1:t.ucmp(this.p);return f===0?(t.words[0]=0,t.length=1):f>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},D.prototype.split=function(e,t){e.iushrn(this.n,0,t)},D.prototype.imulK=function(e){return e.imul(this.k)};function G(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}E(G,D),G.prototype.split=function(e,t){for(var n=4194303,f=Math.min(e.length,9),s=0;s<f;s++)t.words[s]=e.words[s];if(t.length=f,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},G.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var f=e.words[n]|0;t+=f*977,e.words[n]=t&67108863,t=f*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function X(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}E(X,D);function te(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}E(te,D);function ie(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}E(ie,D),ie.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var f=(e.words[n]|0)*19+t,s=f&67108863;f>>>=26,e.words[n]=s,t=f}return t!==0&&(e.words[e.length++]=t),e},a._prime=function(e){if(L[e])return L[e];var t;if(e==="k256")t=new G;else if(e==="p224")t=new X;else if(e==="p192")t=new te;else if(e==="p25519")t=new ie;else throw new Error("Unknown prime "+e);return L[e]=t,t};function ee(c){if(typeof c=="string"){var e=a._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var f=this.m.subn(1),s=0;!f.isZero()&&f.andln(1)===0;)s++,f.iushrn(1);p(!f.isZero());var u=new a(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,f),M=this.pow(e,f.addn(1).iushrn(1)),T=this.pow(e,f),N=s;T.cmp(u)!==0;){for(var Q=T,K=0;Q.cmp(u)!==0;K++)Q=Q.redSqr();p(K<N);var A=this.pow(h,new a(1).iushln(N-K-1));M=M.redMul(A),h=A.redSqr(),T=T.redMul(h),N=K}return M},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,f=new Array(1<<n);f[0]=new a(1).toRed(this),f[1]=e;for(var s=2;s<f.length;s++)f[s]=this.mul(f[s-1],e);var u=f[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],M=r-1;M>=0;M--){var T=h>>M&1;if(u!==f[0]&&(u=this.sqr(u)),T===0&&l===0){o=0;continue}l<<=1,l|=T,o++,!(o!==n&&(s!==0||M!==0))&&(u=this.mul(u,f[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new ue(e)};function ue(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}E(ue,ee),ue.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},ue.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},ue.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(b,bn$2)})(bn$3)),bn$3.exports}var browser$3,hasRequiredBrowser$3;function requireBrowser$3(){if(hasRequiredBrowser$3)return browser$3;hasRequiredBrowser$3=1;var b=requireElliptic(),_=requireBn$1();browser$3=function(w){return new p(w)};var S={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};S.p224=S.secp224r1,S.p256=S.secp256r1=S.prime256v1,S.p192=S.secp192r1=S.prime192v1,S.p384=S.secp384r1,S.p521=S.secp521r1;function p(a){this.curveType=S[a],this.curveType||(this.curveType={name:a}),this.curve=new b.ec(this.curveType.name),this.keys=void 0}p.prototype.generateKeys=function(a,w){return this.keys=this.curve.genKeyPair(),this.getPublicKey(a,w)},p.prototype.computeSecret=function(a,w,v){w=w||"utf8",Buffer.isBuffer(a)||(a=new Buffer(a,w));var y=this.curve.keyFromPublic(a).getPublic(),m=y.mul(this.keys.getPrivate()).getX();return E(m,v,this.curveType.byteLength)},p.prototype.getPublicKey=function(a,w){var v=this.keys.getPublic(w==="compressed",!0);return w==="hybrid"&&(v[v.length-1]%2?v[0]=7:v[0]=6),E(v,a)},p.prototype.getPrivateKey=function(a){return E(this.keys.getPrivate(),a)},p.prototype.setPublicKey=function(a,w){return w=w||"utf8",Buffer.isBuffer(a)||(a=new Buffer(a,w)),this.keys._importPublic(a),this},p.prototype.setPrivateKey=function(a,w){w=w||"utf8",Buffer.isBuffer(a)||(a=new Buffer(a,w));var v=new _(a);return v=v.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(v),this};function E(a,w,v){Array.isArray(a)||(a=a.toArray());var y=new Buffer(a);if(v&&y.length<v){var m=new Buffer(v-y.length);m.fill(0),y=Buffer.concat([m,y])}return w?y.toString(w):y}return browser$3}var browser$2={},mgf,hasRequiredMgf;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var b=requireBrowser$a(),_=requireSafeBuffer$2().Buffer;mgf=function(p,E){for(var a=_.alloc(0),w=0,v;a.length<E;)v=S(w++),a=_.concat([a,b("sha1").update(p).update(v).digest()]);return a.slice(0,E)};function S(p){var E=_.allocUnsafe(4);return E.writeUInt32BE(p,0),E}return mgf}var xor,hasRequiredXor;function requireXor(){return hasRequiredXor||(hasRequiredXor=1,xor=function(_,S){for(var p=_.length,E=-1;++E<p;)_[E]^=S[E];return _}),xor}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,(function(b){(function(_,S){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function E(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function a(c,e,t){if(a.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof _=="object"?_.exports=a:S.BN=a,a.BN=a,a.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}a.isBN=function(e){return e instanceof a?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var f=0;e[0]==="-"&&(f++,this.negative=1),f<e.length&&(t===16?this._parseHex(e,f,n):(this._parseBase(e,t,f),n==="le"&&this._initArray(this.toArray(),t,n)))},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 f=0;f<this.length;f++)this.words[f]=0;var s,u,l=0;if(n==="be")for(f=e.length-1,s=0;f>=0;f-=3)u=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(f=0,s=0;f<e.length;f+=3)u=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function v(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function y(c,e,t){var n=v(c,t);return t-1>=e&&(n|=v(c,t-1)<<4),n}a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var s=0,u=0,l;if(n==="be")for(f=e.length-1;f>=t;f-=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)l=y(e,t,f)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function m(c,e,t,n){for(var f=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;f*=n,l>=49?f+=l-49+10:l>=17?f+=l-17+10:f+=l}return f}a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var f=0,s=1;s<=67108863;s*=t)f++;f--,s=s/t|0;for(var u=e.length-n,l=u%f,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=f)r=m(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var M=1;for(r=m(e,h,e.length,t),h=0;h<l;h++)M*=t;this.imuln(M),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],x=[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];a.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var f=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<f|s)&16777215).toString(16);s=l>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=x[e];n="";var M=this.clone();for(M.negative=0;!M.isZero();){var T=M.modn(h).toString(e);M=M.idivn(h),M.isZero()?n=T+n:n=d[r-T.length]+T+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var f=this.byteLength(),s=n||Math.max(1,f);p(f<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-f;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function R(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(c.words[n]&1<<f)>>>f}return e}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var f=0;f<n.length;f++)this.words[f]=t.words[f]^n.words[f];if(this!==t)for(;f<t.length;f++)this.words[f]=t.words[f];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var f=0;f<t;f++)this.words[f]=~this.words[f]&67108863;return n>0&&(this.words[f]=~this.words[f]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,f=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<f:this.words[n]=this.words[n]&~(1<<f),this.strip()},a.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,f;this.length>e.length?(n=this,f=e):(n=e,f=this);for(var s=0,u=0;u<f.length;u++)t=(n.words[u]|0)+(f.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},a.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,s;n>0?(f=this,s=e):(f=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(f.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<f.length;l++)t=(f.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<f.length&&f!==this)for(;l<f.length;l++)this.words[l]=f.words[l];return this.length=Math.max(this.length,l),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function q(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var f=c.words[0]|0,s=e.words[0]|0,u=f*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,M=o&67108863,T=Math.min(r,e.length-1),N=Math.max(0,r-c.length+1);N<=T;N++){var Q=r-N|0;f=c.words[Q]|0,s=e.words[N]|0,u=f*s+M,h+=u/67108864|0,M=u&67108863}t.words[r]=M|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var B=function(e,t,n){var f=e.words,s=t.words,u=n.words,l=0,o,r,h,M=f[0]|0,T=M&8191,N=M>>>13,Q=f[1]|0,K=Q&8191,A=Q>>>13,O=f[2]|0,W=O&8191,Y=O>>>13,Z=f[3]|0,j=Z&8191,ne=Z>>>13,Re=f[4]|0,le=Re&8191,de=Re>>>13,Pe=f[5]|0,me=Pe&8191,he=Pe>>>13,Le=f[6]|0,ve=Le&8191,ge=Le>>>13,De=f[7]|0,ye=De&8191,xe=De>>>13,Ue=f[8]|0,Se=Ue&8191,Ae=Ue>>>13,He=f[9]|0,z=He&8191,C=He>>>13,F=s[0]|0,V=F&8191,ae=F>>>13,pe=s[1]|0,re=pe&8191,oe=pe>>>13,Oe=s[2]|0,ce=Oe&8191,we=Oe>>>13,Ce=s[3]|0,qe=Ce&8191,Te=Ce>>>13,je=s[4]|0,Be=je&8191,$e=je>>>13,ze=s[5]|0,H=ze&8191,P=ze>>>13,U=s[6]|0,J=U&8191,fe=U>>>13,be=s[7]|0,se=be&8191,_e=be>>>13,Ne=s[8]|0,Me=Ne&8191,Ee=Ne>>>13,Fe=s[9]|0,Ie=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(T,V),r=Math.imul(T,ae),r=r+Math.imul(N,V)|0,h=Math.imul(N,ae);var We=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(K,V),r=Math.imul(K,ae),r=r+Math.imul(A,V)|0,h=Math.imul(A,ae),o=o+Math.imul(T,re)|0,r=r+Math.imul(T,oe)|0,r=r+Math.imul(N,re)|0,h=h+Math.imul(N,oe)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(W,V),r=Math.imul(W,ae),r=r+Math.imul(Y,V)|0,h=Math.imul(Y,ae),o=o+Math.imul(K,re)|0,r=r+Math.imul(K,oe)|0,r=r+Math.imul(A,re)|0,h=h+Math.imul(A,oe)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(T,we)|0,r=r+Math.imul(N,ce)|0,h=h+Math.imul(N,we)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(j,V),r=Math.imul(j,ae),r=r+Math.imul(ne,V)|0,h=Math.imul(ne,ae),o=o+Math.imul(W,re)|0,r=r+Math.imul(W,oe)|0,r=r+Math.imul(Y,re)|0,h=h+Math.imul(Y,oe)|0,o=o+Math.imul(K,ce)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(A,ce)|0,h=h+Math.imul(A,we)|0,o=o+Math.imul(T,qe)|0,r=r+Math.imul(T,Te)|0,r=r+Math.imul(N,qe)|0,h=h+Math.imul(N,Te)|0;var Ke=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(le,V),r=Math.imul(le,ae),r=r+Math.imul(de,V)|0,h=Math.imul(de,ae),o=o+Math.imul(j,re)|0,r=r+Math.imul(j,oe)|0,r=r+Math.imul(ne,re)|0,h=h+Math.imul(ne,oe)|0,o=o+Math.imul(W,ce)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(Y,ce)|0,h=h+Math.imul(Y,we)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(A,qe)|0,h=h+Math.imul(A,Te)|0,o=o+Math.imul(T,Be)|0,r=r+Math.imul(T,$e)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,$e)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(me,V),r=Math.imul(me,ae),r=r+Math.imul(he,V)|0,h=Math.imul(he,ae),o=o+Math.imul(le,re)|0,r=r+Math.imul(le,oe)|0,r=r+Math.imul(de,re)|0,h=h+Math.imul(de,oe)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(j,we)|0,r=r+Math.imul(ne,ce)|0,h=h+Math.imul(ne,we)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(Y,qe)|0,h=h+Math.imul(Y,Te)|0,o=o+Math.imul(K,Be)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(A,Be)|0,h=h+Math.imul(A,$e)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(T,P)|0,r=r+Math.imul(N,H)|0,h=h+Math.imul(N,P)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ve,V),r=Math.imul(ve,ae),r=r+Math.imul(ge,V)|0,h=Math.imul(ge,ae),o=o+Math.imul(me,re)|0,r=r+Math.imul(me,oe)|0,r=r+Math.imul(he,re)|0,h=h+Math.imul(he,oe)|0,o=o+Math.imul(le,ce)|0,r=r+Math.imul(le,we)|0,r=r+Math.imul(de,ce)|0,h=h+Math.imul(de,we)|0,o=o+Math.imul(j,qe)|0,r=r+Math.imul(j,Te)|0,r=r+Math.imul(ne,qe)|0,h=h+Math.imul(ne,Te)|0,o=o+Math.imul(W,Be)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(Y,Be)|0,h=h+Math.imul(Y,$e)|0,o=o+Math.imul(K,H)|0,r=r+Math.imul(K,P)|0,r=r+Math.imul(A,H)|0,h=h+Math.imul(A,P)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(T,fe)|0,r=r+Math.imul(N,J)|0,h=h+Math.imul(N,fe)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(ye,V),r=Math.imul(ye,ae),r=r+Math.imul(xe,V)|0,h=Math.imul(xe,ae),o=o+Math.imul(ve,re)|0,r=r+Math.imul(ve,oe)|0,r=r+Math.imul(ge,re)|0,h=h+Math.imul(ge,oe)|0,o=o+Math.imul(me,ce)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(he,ce)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(le,qe)|0,r=r+Math.imul(le,Te)|0,r=r+Math.imul(de,qe)|0,h=h+Math.imul(de,Te)|0,o=o+Math.imul(j,Be)|0,r=r+Math.imul(j,$e)|0,r=r+Math.imul(ne,Be)|0,h=h+Math.imul(ne,$e)|0,o=o+Math.imul(W,H)|0,r=r+Math.imul(W,P)|0,r=r+Math.imul(Y,H)|0,h=h+Math.imul(Y,P)|0,o=o+Math.imul(K,J)|0,r=r+Math.imul(K,fe)|0,r=r+Math.imul(A,J)|0,h=h+Math.imul(A,fe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(T,_e)|0,r=r+Math.imul(N,se)|0,h=h+Math.imul(N,_e)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(Se,V),r=Math.imul(Se,ae),r=r+Math.imul(Ae,V)|0,h=Math.imul(Ae,ae),o=o+Math.imul(ye,re)|0,r=r+Math.imul(ye,oe)|0,r=r+Math.imul(xe,re)|0,h=h+Math.imul(xe,oe)|0,o=o+Math.imul(ve,ce)|0,r=r+Math.imul(ve,we)|0,r=r+Math.imul(ge,ce)|0,h=h+Math.imul(ge,we)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(le,Be)|0,r=r+Math.imul(le,$e)|0,r=r+Math.imul(de,Be)|0,h=h+Math.imul(de,$e)|0,o=o+Math.imul(j,H)|0,r=r+Math.imul(j,P)|0,r=r+Math.imul(ne,H)|0,h=h+Math.imul(ne,P)|0,o=o+Math.imul(W,J)|0,r=r+Math.imul(W,fe)|0,r=r+Math.imul(Y,J)|0,h=h+Math.imul(Y,fe)|0,o=o+Math.imul(K,se)|0,r=r+Math.imul(K,_e)|0,r=r+Math.imul(A,se)|0,h=h+Math.imul(A,_e)|0,o=o+Math.imul(T,Me)|0,r=r+Math.imul(T,Ee)|0,r=r+Math.imul(N,Me)|0,h=h+Math.imul(N,Ee)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(z,V),r=Math.imul(z,ae),r=r+Math.imul(C,V)|0,h=Math.imul(C,ae),o=o+Math.imul(Se,re)|0,r=r+Math.imul(Se,oe)|0,r=r+Math.imul(Ae,re)|0,h=h+Math.imul(Ae,oe)|0,o=o+Math.imul(ye,ce)|0,r=r+Math.imul(ye,we)|0,r=r+Math.imul(xe,ce)|0,h=h+Math.imul(xe,we)|0,o=o+Math.imul(ve,qe)|0,r=r+Math.imul(ve,Te)|0,r=r+Math.imul(ge,qe)|0,h=h+Math.imul(ge,Te)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(he,Be)|0,h=h+Math.imul(he,$e)|0,o=o+Math.imul(le,H)|0,r=r+Math.imul(le,P)|0,r=r+Math.imul(de,H)|0,h=h+Math.imul(de,P)|0,o=o+Math.imul(j,J)|0,r=r+Math.imul(j,fe)|0,r=r+Math.imul(ne,J)|0,h=h+Math.imul(ne,fe)|0,o=o+Math.imul(W,se)|0,r=r+Math.imul(W,_e)|0,r=r+Math.imul(Y,se)|0,h=h+Math.imul(Y,_e)|0,o=o+Math.imul(K,Me)|0,r=r+Math.imul(K,Ee)|0,r=r+Math.imul(A,Me)|0,h=h+Math.imul(A,Ee)|0,o=o+Math.imul(T,Ie)|0,r=r+Math.imul(T,ke)|0,r=r+Math.imul(N,Ie)|0,h=h+Math.imul(N,ke)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(z,re),r=Math.imul(z,oe),r=r+Math.imul(C,re)|0,h=Math.imul(C,oe),o=o+Math.imul(Se,ce)|0,r=r+Math.imul(Se,we)|0,r=r+Math.imul(Ae,ce)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(ye,qe)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(xe,qe)|0,h=h+Math.imul(xe,Te)|0,o=o+Math.imul(ve,Be)|0,r=r+Math.imul(ve,$e)|0,r=r+Math.imul(ge,Be)|0,h=h+Math.imul(ge,$e)|0,o=o+Math.imul(me,H)|0,r=r+Math.imul(me,P)|0,r=r+Math.imul(he,H)|0,h=h+Math.imul(he,P)|0,o=o+Math.imul(le,J)|0,r=r+Math.imul(le,fe)|0,r=r+Math.imul(de,J)|0,h=h+Math.imul(de,fe)|0,o=o+Math.imul(j,se)|0,r=r+Math.imul(j,_e)|0,r=r+Math.imul(ne,se)|0,h=h+Math.imul(ne,_e)|0,o=o+Math.imul(W,Me)|0,r=r+Math.imul(W,Ee)|0,r=r+Math.imul(Y,Me)|0,h=h+Math.imul(Y,Ee)|0,o=o+Math.imul(K,Ie)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(A,Ie)|0,h=h+Math.imul(A,ke)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(z,ce),r=Math.imul(z,we),r=r+Math.imul(C,ce)|0,h=Math.imul(C,we),o=o+Math.imul(Se,qe)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,$e)|0,r=r+Math.imul(xe,Be)|0,h=h+Math.imul(xe,$e)|0,o=o+Math.imul(ve,H)|0,r=r+Math.imul(ve,P)|0,r=r+Math.imul(ge,H)|0,h=h+Math.imul(ge,P)|0,o=o+Math.imul(me,J)|0,r=r+Math.imul(me,fe)|0,r=r+Math.imul(he,J)|0,h=h+Math.imul(he,fe)|0,o=o+Math.imul(le,se)|0,r=r+Math.imul(le,_e)|0,r=r+Math.imul(de,se)|0,h=h+Math.imul(de,_e)|0,o=o+Math.imul(j,Me)|0,r=r+Math.imul(j,Ee)|0,r=r+Math.imul(ne,Me)|0,h=h+Math.imul(ne,Ee)|0,o=o+Math.imul(W,Ie)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(Y,Ie)|0,h=h+Math.imul(Y,ke)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(z,qe),r=Math.imul(z,Te),r=r+Math.imul(C,qe)|0,h=Math.imul(C,Te),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,$e)|0,r=r+Math.imul(Ae,Be)|0,h=h+Math.imul(Ae,$e)|0,o=o+Math.imul(ye,H)|0,r=r+Math.imul(ye,P)|0,r=r+Math.imul(xe,H)|0,h=h+Math.imul(xe,P)|0,o=o+Math.imul(ve,J)|0,r=r+Math.imul(ve,fe)|0,r=r+Math.imul(ge,J)|0,h=h+Math.imul(ge,fe)|0,o=o+Math.imul(me,se)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(he,se)|0,h=h+Math.imul(he,_e)|0,o=o+Math.imul(le,Me)|0,r=r+Math.imul(le,Ee)|0,r=r+Math.imul(de,Me)|0,h=h+Math.imul(de,Ee)|0,o=o+Math.imul(j,Ie)|0,r=r+Math.imul(j,ke)|0,r=r+Math.imul(ne,Ie)|0,h=h+Math.imul(ne,ke)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(z,Be),r=Math.imul(z,$e),r=r+Math.imul(C,Be)|0,h=Math.imul(C,$e),o=o+Math.imul(Se,H)|0,r=r+Math.imul(Se,P)|0,r=r+Math.imul(Ae,H)|0,h=h+Math.imul(Ae,P)|0,o=o+Math.imul(ye,J)|0,r=r+Math.imul(ye,fe)|0,r=r+Math.imul(xe,J)|0,h=h+Math.imul(xe,fe)|0,o=o+Math.imul(ve,se)|0,r=r+Math.imul(ve,_e)|0,r=r+Math.imul(ge,se)|0,h=h+Math.imul(ge,_e)|0,o=o+Math.imul(me,Me)|0,r=r+Math.imul(me,Ee)|0,r=r+Math.imul(he,Me)|0,h=h+Math.imul(he,Ee)|0,o=o+Math.imul(le,Ie)|0,r=r+Math.imul(le,ke)|0,r=r+Math.imul(de,Ie)|0,h=h+Math.imul(de,ke)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(z,H),r=Math.imul(z,P),r=r+Math.imul(C,H)|0,h=Math.imul(C,P),o=o+Math.imul(Se,J)|0,r=r+Math.imul(Se,fe)|0,r=r+Math.imul(Ae,J)|0,h=h+Math.imul(Ae,fe)|0,o=o+Math.imul(ye,se)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(xe,se)|0,h=h+Math.imul(xe,_e)|0,o=o+Math.imul(ve,Me)|0,r=r+Math.imul(ve,Ee)|0,r=r+Math.imul(ge,Me)|0,h=h+Math.imul(ge,Ee)|0,o=o+Math.imul(me,Ie)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(he,Ie)|0,h=h+Math.imul(he,ke)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(z,J),r=Math.imul(z,fe),r=r+Math.imul(C,J)|0,h=Math.imul(C,fe),o=o+Math.imul(Se,se)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ae,se)|0,h=h+Math.imul(Ae,_e)|0,o=o+Math.imul(ye,Me)|0,r=r+Math.imul(ye,Ee)|0,r=r+Math.imul(xe,Me)|0,h=h+Math.imul(xe,Ee)|0,o=o+Math.imul(ve,Ie)|0,r=r+Math.imul(ve,ke)|0,r=r+Math.imul(ge,Ie)|0,h=h+Math.imul(ge,ke)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(z,se),r=Math.imul(z,_e),r=r+Math.imul(C,se)|0,h=Math.imul(C,_e),o=o+Math.imul(Se,Me)|0,r=r+Math.imul(Se,Ee)|0,r=r+Math.imul(Ae,Me)|0,h=h+Math.imul(Ae,Ee)|0,o=o+Math.imul(ye,Ie)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(xe,Ie)|0,h=h+Math.imul(xe,ke)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(z,Me),r=Math.imul(z,Ee),r=r+Math.imul(C,Me)|0,h=Math.imul(C,Ee),o=o+Math.imul(Se,Ie)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ae,Ie)|0,h=h+Math.imul(Ae,ke)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(z,Ie),r=Math.imul(z,ke),r=r+Math.imul(C,Ie)|0,h=Math.imul(C,ke);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=We,u[1]=Ge,u[2]=Ve,u[3]=Ke,u[4]=Ze,u[5]=Ye,u[6]=Xe,u[7]=Je,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(B=q);function $(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,M=c.words[h]|0,T=e.words[r]|0,N=M*T,Q=N&67108863;u=u+(N/67108864|0)|0,Q=Q+l|0,l=Q&67108863,u=u+(Q>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function k(c,e,t){var n=new I;return n.mulp(c,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=B(this,e,t):f<63?n=q(this,e,t):f<1024?n=$(this,e,t):n=k(this,e,t),n};function I(c,e){this.x=c,this.y=e}I.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,f=0;f<e;f++)t[f]=this.revBin(f,n,e);return t},I.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var f=0,s=0;s<t;s++)f|=(e&1)<<t-s-1,e>>=1;return f},I.prototype.permute=function(e,t,n,f,s,u){for(var l=0;l<u;l++)f[l]=t[e[l]],s[l]=n[e[l]]},I.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),M=0;M<s;M+=o)for(var T=r,N=h,Q=0;Q<l;Q++){var K=n[M+Q],A=f[M+Q],O=n[M+Q+l],W=f[M+Q+l],Y=T*O-N*W;W=T*W+N*O,O=Y,n[M+Q]=K+O,f[M+Q]=A+W,n[M+Q+l]=K-O,f[M+Q+l]=A-W,Q!==o&&(Y=r*T-h*N,N=r*N+h*T,T=Y)}},I.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,f=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+f},I.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var f=0;f<n/2;f++){var s=e[f];e[f]=e[n-f-1],e[n-f-1]=s,s=t[f],t[f]=-t[n-f-1],t[n-f-1]=-s}},I.prototype.normalize13b=function(e,t){for(var n=0,f=0;f<t/2;f++){var s=Math.round(e[2*f+1]/t)*8192+Math.round(e[2*f]/t)+n;e[f]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},I.prototype.convert13b=function(e,t,n,f){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<f;++u)n[u]=0;p(s===0),p((s&-8192)===0)},I.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},I.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),l=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),M=new Array(f),T=new Array(f),N=n.words;N.length=f,this.convert13b(e.words,e.length,l,f),this.convert13b(t.words,t.length,h,f),this.transform(l,u,o,r,f,s),this.transform(h,u,M,T,f,s);for(var Q=0;Q<f;Q++){var K=o[Q]*M[Q]-r[Q]*T[Q];r[Q]=o[Q]*T[Q]+r[Q]*M[Q],o[Q]=K}return this.conjugate(o,r,f),this.transform(o,r,N,u,f,s),this.conjugate(N,u,f),this.normalize13b(N,f),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),k(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var f=(this.words[n]|0)*e,s=(f&67108863)+(t&67108863);t>>=26,t+=f/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=R(e);if(t.length===0)return new a(1);for(var n=this,f=0;f<t.length&&t[f]===0;f++,n=n.sqr());if(++f<t.length)for(var s=n.sqr();f<t.length;f++,s=s.sqr())t[f]!==0&&(n=n.mul(s));return n},a.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&f,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var f;t?f=(t-t%26)/26:f=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(f-=u,f=Math.max(0,f),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=f);r--){var M=this.words[r]|0;this.words[r]=h<<26-s|M>>>s,h=M&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&f)},a.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var f=67108863^67108863>>>t<<t;this.words[this.length-1]&=f}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var f=e.length+n,s;this._expand(f);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,f=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),f.iushln(n),u=s.words[s.length-1]|0);var o=f.length-s.length,r;if(t!=="mod"){r=new a(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var M=f.clone()._ishlnsubmul(s,1,o);M.negative===0&&(f=M,r&&(r.words[o]=1));for(var T=o-1;T>=0;T--){var N=(f.words[s.length+T]|0)*67108864+(f.words[s.length+T-1]|0);for(N=Math.min(N/u|0,67108863),f._ishlnsubmul(s,N,T);f.negative!==0;)N--,f.negative=0,f._ishlnsubmul(s,1,T),f.isZero()||(f.negative^=1);r&&(r.words[T]=N)}return r&&r.strip(),f.strip(),t!=="div"&&n!==0&&f.iushrn(n),{div:r||null,mod:f}},a.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var f,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(f=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:f,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(f=u.div.neg()),{div:f,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,f=e.ushrn(1),s=e.andln(1),u=n.cmp(f);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,f=this.length-1;f>=0;f--)n=(t*n+(this.words[f]|0))%e;return n},a.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var f=(this.words[n]|0)+t*67108864;this.words[n]=f/e|0,t=f%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=new a(0),l=new a(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var M=0,T=1;(t.words[0]&T)===0&&M<26;++M,T<<=1);if(M>0)for(t.iushrn(M);M-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var N=0,Q=1;(n.words[0]&Q)===0&&N<26;++N,Q<<=1);if(N>0)for(n.iushrn(N);N-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(l)):(n.isub(t),u.isub(f),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},a.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var f=new a(1),s=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)f.isOdd()&&f.iadd(u),f.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(s)):(n.isub(t),s.isub(f))}var M;return t.cmpn(1)===0?M=f:M=s,M.cmpn(0)<0&&M.iadd(e),M},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var f=0;t.isEven()&&n.isEven();f++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(f)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,f=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=f,this;for(var s=f,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var f=this.words[0]|0;n=f===e?0:f<e?-1:1}return this.negative!==0?-n|0:n},a.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var f=this.words[n]|0,s=e.words[n]|0;if(f!==s){f<s?t=-1:f>s&&(t=1);break}}return t},a.prototype.gtn=function(e){return this.cmpn(e)===1},a.prototype.gt=function(e){return this.cmp(e)===1},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return this.cmpn(e)===0},a.prototype.eq=function(e){return this.cmp(e)===0},a.red=function(e){return new ee(e)},a.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var L={k256:null,p224:null,p192:null,p25519:null};function D(c,e){this.name=c,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},D.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var f=n<this.n?-1:t.ucmp(this.p);return f===0?(t.words[0]=0,t.length=1):f>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},D.prototype.split=function(e,t){e.iushrn(this.n,0,t)},D.prototype.imulK=function(e){return e.imul(this.k)};function G(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}E(G,D),G.prototype.split=function(e,t){for(var n=4194303,f=Math.min(e.length,9),s=0;s<f;s++)t.words[s]=e.words[s];if(t.length=f,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},G.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var f=e.words[n]|0;t+=f*977,e.words[n]=t&67108863,t=f*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function X(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}E(X,D);function te(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}E(te,D);function ie(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}E(ie,D),ie.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var f=(e.words[n]|0)*19+t,s=f&67108863;f>>>=26,e.words[n]=s,t=f}return t!==0&&(e.words[e.length++]=t),e},a._prime=function(e){if(L[e])return L[e];var t;if(e==="k256")t=new G;else if(e==="p224")t=new X;else if(e==="p192")t=new te;else if(e==="p25519")t=new ie;else throw new Error("Unknown prime "+e);return L[e]=t,t};function ee(c){if(typeof c=="string"){var e=a._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var f=this.m.subn(1),s=0;!f.isZero()&&f.andln(1)===0;)s++,f.iushrn(1);p(!f.isZero());var u=new a(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new a(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,f),M=this.pow(e,f.addn(1).iushrn(1)),T=this.pow(e,f),N=s;T.cmp(u)!==0;){for(var Q=T,K=0;Q.cmp(u)!==0;K++)Q=Q.redSqr();p(K<N);var A=this.pow(h,new a(1).iushln(N-K-1));M=M.redMul(A),h=A.redSqr(),T=T.redMul(h),N=K}return M},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,f=new Array(1<<n);f[0]=new a(1).toRed(this),f[1]=e;for(var s=2;s<f.length;s++)f[s]=this.mul(f[s-1],e);var u=f[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],M=r-1;M>=0;M--){var T=h>>M&1;if(u!==f[0]&&(u=this.sqr(u)),T===0&&l===0){o=0;continue}l<<=1,l|=T,o++,!(o!==n&&(s!==0||M!==0))&&(u=this.mul(u,f[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new ue(e)};function ue(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}E(ue,ee),ue.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},ue.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},ue.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),f=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(f).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},ue.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(b,bn)})(bn$1)),bn$1.exports}var withPublic_1,hasRequiredWithPublic;function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var b=requireBn(),_=requireSafeBuffer$2().Buffer;function S(p,E){return _.from(p.toRed(b.mont(E.modulus)).redPow(new b(E.publicExponent)).fromRed().toArray())}return withPublic_1=S,withPublic_1}var publicEncrypt,hasRequiredPublicEncrypt;function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var b=requireParseAsn1(),_=requireBrowser$c(),S=requireBrowser$a(),p=requireMgf(),E=requireXor(),a=requireBn(),w=requireWithPublic(),v=requireBrowserifyRsa(),y=requireSafeBuffer$2().Buffer;publicEncrypt=function(R,q,B){var $;R.padding?$=R.padding:B?$=1:$=4;var k=b(R),I;if($===4)I=m(k,q);else if($===1)I=d(k,q,B);else if($===3){if(I=new a(q),I.cmp(k.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return B?v(I,k):w(I,k)};function m(x,R){var q=x.modulus.byteLength(),B=R.length,$=S("sha1").update(y.alloc(0)).digest(),k=$.length,I=2*k;if(B>q-I-2)throw new Error("message too long");var L=y.alloc(q-B-I-2),D=q-k-1,G=_(k),X=E(y.concat([$,L,y.alloc(1,1),R],D),p(G,D)),te=E(G,p(X,k));return new a(y.concat([y.alloc(1),te,X],q))}function d(x,R,q){var B=R.length,$=x.modulus.byteLength();if(B>$-11)throw new Error("message too long");var k;return q?k=y.alloc($-B-3,255):k=g($-B-3),new a(y.concat([y.from([0,q?1:2]),k,y.alloc(1),R],$))}function g(x){for(var R=y.allocUnsafe(x),q=0,B=_(x*2),$=0,k;q<x;)$===B.length&&(B=_(x*2),$=0),k=B[$++],k&&(R[q++]=k);return R}return publicEncrypt}var privateDecrypt,hasRequiredPrivateDecrypt;function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var b=requireParseAsn1(),_=requireMgf(),S=requireXor(),p=requireBn(),E=requireBrowserifyRsa(),a=requireBrowser$a(),w=requireWithPublic(),v=requireSafeBuffer$2().Buffer;privateDecrypt=function(x,R,q){var B;x.padding?B=x.padding:q?B=1:B=4;var $=b(x),k=$.modulus.byteLength();if(R.length>k||new p(R).cmp($.modulus)>=0)throw new Error("decryption error");var I;q?I=w(new p(R),$):I=E(R,$);var L=v.alloc(k-I.length);if(I=v.concat([L,I],k),B===4)return y($,I);if(B===1)return m($,I,q);if(B===3)return I;throw new Error("unknown padding")};function y(g,x){var R=g.modulus.byteLength(),q=a("sha1").update(v.alloc(0)).digest(),B=q.length;if(x[0]!==0)throw new Error("decryption error");var $=x.slice(1,B+1),k=x.slice(B+1),I=S($,_(k,B)),L=S(k,_(I,R-B-1));if(d(q,L.slice(0,B)))throw new Error("decryption error");for(var D=B;L[D]===0;)D++;if(L[D++]!==1)throw new Error("decryption error");return L.slice(D)}function m(g,x,R){for(var q=x.slice(0,2),B=2,$=0;x[B++]!==0;)if(B>=x.length){$++;break}var k=x.slice(2,B-1);if((q.toString("hex")!=="0002"&&!R||q.toString("hex")!=="0001"&&R)&&$++,k.length<8&&$++,$)throw new Error("decryption error");return x.slice(B)}function d(g,x){g=v.from(g),x=v.from(x);var R=0,q=g.length;g.length!==x.length&&(R++,q=Math.min(g.length,x.length));for(var B=-1;++B<q;)R+=g[B]^x[B];return R}return privateDecrypt}var hasRequiredBrowser$2;function requireBrowser$2(){return hasRequiredBrowser$2||(hasRequiredBrowser$2=1,(function(b){b.publicEncrypt=requirePublicEncrypt(),b.privateDecrypt=requirePrivateDecrypt(),b.privateEncrypt=function(S,p){return b.publicEncrypt(S,p,!0)},b.publicDecrypt=function(S,p){return b.privateDecrypt(S,p,!0)}})(browser$2)),browser$2}var browser$1={},hasRequiredBrowser$1;function requireBrowser$1(){if(hasRequiredBrowser$1)return browser$1;hasRequiredBrowser$1=1;function b(){throw new Error(`secure random number generation not supported by this browser
|
|
15
|
-
use chrome, FireFox or Internet Explorer 11`)}var
|
|
13
|
+
})`)}catch{m=function(y){this._initNamed(y)}}return I(m,w),m.prototype._initNamed=function(y){w.call(this,y)},new m(this)},R.prototype._getDecoder=function(w){return w=w||"der",this.decoders.hasOwnProperty(w)||(this.decoders[w]=this._createNamed(S.decoders[w])),this.decoders[w]},R.prototype.decode=function(w,m,v){return this._getDecoder(m).decode(w,v)},R.prototype._getEncoder=function(w){return w=w||"der",this.encoders.hasOwnProperty(w)||(this.encoders[w]=this._createNamed(S.encoders[w])),this.encoders[w]},R.prototype.encode=function(w,m,v){return this._getEncoder(m).encode(w,v)}})(api)),api}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var _=requireInherits_browser();function S(p){this._reporterState={obj:null,path:[],options:p||{},errors:[]}}reporter.Reporter=S,S.prototype.isError=function(R){return R instanceof I},S.prototype.save=function(){var R=this._reporterState;return{obj:R.obj,pathLen:R.path.length}},S.prototype.restore=function(R){var f=this._reporterState;f.obj=R.obj,f.path=f.path.slice(0,R.pathLen)},S.prototype.enterKey=function(R){return this._reporterState.path.push(R)},S.prototype.exitKey=function(R){var f=this._reporterState;f.path=f.path.slice(0,R-1)},S.prototype.leaveKey=function(R,f,w){var m=this._reporterState;this.exitKey(R),m.obj!==null&&(m.obj[f]=w)},S.prototype.path=function(){return this._reporterState.path.join("/")},S.prototype.enterObject=function(){var R=this._reporterState,f=R.obj;return R.obj={},f},S.prototype.leaveObject=function(R){var f=this._reporterState,w=f.obj;return f.obj=R,w},S.prototype.error=function(R){var f,w=this._reporterState,m=R instanceof I;if(m?f=R:f=new I(w.path.map(function(v){return"["+JSON.stringify(v)+"]"}).join(""),R.message||R,R.stack),!w.options.partial)throw f;return m||w.errors.push(f),f},S.prototype.wrapResult=function(R){var f=this._reporterState;return f.options.partial?{result:this.isError(R)?null:R,errors:f.errors}:R};function I(p,R){this.path=p,this.rethrow(R)}return _(I,Error),I.prototype.rethrow=function(R){if(this.message=R+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,I),!this.stack)try{throw new Error(this.message)}catch(f){this.stack=f.stack}return this},reporter}var buffer={},hasRequiredBuffer;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var _=requireInherits_browser(),S=requireBase().Reporter,I=requireDist().Buffer;function p(f,w){if(S.call(this,w),!I.isBuffer(f)){this.error("Input not Buffer");return}this.base=f,this.offset=0,this.length=f.length}_(p,S),buffer.DecoderBuffer=p,p.prototype.save=function(){return{offset:this.offset,reporter:S.prototype.save.call(this)}},p.prototype.restore=function(w){var m=new p(this.base);return m.offset=w.offset,m.length=this.offset,this.offset=w.offset,S.prototype.restore.call(this,w.reporter),m},p.prototype.isEmpty=function(){return this.offset===this.length},p.prototype.readUInt8=function(w){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(w||"DecoderBuffer overrun")},p.prototype.skip=function(w,m){if(!(this.offset+w<=this.length))return this.error(m||"DecoderBuffer overrun");var v=new p(this.base);return v._reporterState=this._reporterState,v.offset=this.offset,v.length=this.offset+w,this.offset+=w,v},p.prototype.raw=function(w){return this.base.slice(w?w.offset:this.offset,this.length)};function R(f,w){if(Array.isArray(f))this.length=0,this.value=f.map(function(m){return m instanceof R||(m=new R(m,w)),this.length+=m.length,m},this);else if(typeof f=="number"){if(!(0<=f&&f<=255))return w.error("non-byte EncoderBuffer value");this.value=f,this.length=1}else if(typeof f=="string")this.value=f,this.length=I.byteLength(f);else if(I.isBuffer(f))this.value=f,this.length=f.length;else return w.error("Unsupported type: "+typeof f)}return buffer.EncoderBuffer=R,R.prototype.join=function(w,m){return w||(w=new I(this.length)),m||(m=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(v){v.join(w,m),m+=v.length}):(typeof this.value=="number"?w[m]=this.value:typeof this.value=="string"?w.write(this.value,m):I.isBuffer(this.value)&&this.value.copy(w,m),m+=this.length)),w},buffer}var node,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node;hasRequiredNode=1;var _=requireBase().Reporter,S=requireBase().EncoderBuffer,I=requireBase().DecoderBuffer,p=requireMinimalisticAssert(),R=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(R),w=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function m(y,d){var g={};this._baseState=g,g.enc=y,g.parent=d||null,g.children=null,g.tag=null,g.args=null,g.reverseArgs=null,g.choice=null,g.optional=!1,g.any=!1,g.obj=!1,g.use=null,g.useDecoder=null,g.key=null,g.default=null,g.explicit=null,g.implicit=null,g.contains=null,g.parent||(g.children=[],this._wrap())}node=m;var v=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return m.prototype.clone=function(){var d=this._baseState,g={};v.forEach(function(x){g[x]=d[x]});var M=new this.constructor(g.parent);return M._baseState=g,M},m.prototype._wrap=function(){var d=this._baseState;f.forEach(function(g){this[g]=function(){var x=new this.constructor(this);return d.children.push(x),x[g].apply(x,arguments)}},this)},m.prototype._init=function(d){var g=this._baseState;p(g.parent===null),d.call(this),g.children=g.children.filter(function(M){return M._baseState.parent===this},this),p.equal(g.children.length,1,"Root node can have only one child")},m.prototype._useArgs=function(d){var g=this._baseState,M=d.filter(function(x){return x instanceof this.constructor},this);d=d.filter(function(x){return!(x instanceof this.constructor)},this),M.length!==0&&(p(g.children===null),g.children=M,M.forEach(function(x){x._baseState.parent=this},this)),d.length!==0&&(p(g.args===null),g.args=d,g.reverseArgs=d.map(function(x){if(typeof x!="object"||x.constructor!==Object)return x;var B={};return Object.keys(x).forEach(function(A){A==(A|0)&&(A|=0);var D=x[A];B[D]=A}),B}))},w.forEach(function(y){m.prototype[y]=function(){var g=this._baseState;throw new Error(y+" not implemented for encoding: "+g.enc)}}),R.forEach(function(y){m.prototype[y]=function(){var g=this._baseState,M=Array.prototype.slice.call(arguments);return p(g.tag===null),g.tag=y,this._useArgs(M),this}}),m.prototype.use=function(d){p(d);var g=this._baseState;return p(g.use===null),g.use=d,this},m.prototype.optional=function(){var d=this._baseState;return d.optional=!0,this},m.prototype.def=function(d){var g=this._baseState;return p(g.default===null),g.default=d,g.optional=!0,this},m.prototype.explicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.explicit=d,this},m.prototype.implicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.implicit=d,this},m.prototype.obj=function(){var d=this._baseState,g=Array.prototype.slice.call(arguments);return d.obj=!0,g.length!==0&&this._useArgs(g),this},m.prototype.key=function(d){var g=this._baseState;return p(g.key===null),g.key=d,this},m.prototype.any=function(){var d=this._baseState;return d.any=!0,this},m.prototype.choice=function(d){var g=this._baseState;return p(g.choice===null),g.choice=d,this._useArgs(Object.keys(d).map(function(M){return d[M]})),this},m.prototype.contains=function(d){var g=this._baseState;return p(g.use===null),g.contains=d,this},m.prototype._decode=function(d,g){var M=this._baseState;if(M.parent===null)return d.wrapResult(M.children[0]._decode(d,g));var x=M.default,B=!0,A=null;if(M.key!==null&&(A=d.enterKey(M.key)),M.optional){var D=null;if(M.explicit!==null?D=M.explicit:M.implicit!==null?D=M.implicit:M.tag!==null&&(D=M.tag),D===null&&!M.any){var C=d.save();try{M.choice===null?this._decodeGeneric(M.tag,d,g):this._decodeChoice(d,g),B=!0}catch{B=!1}d.restore(C)}else if(B=this._peekTag(d,D,M.any),d.isError(B))return B}var $;if(M.obj&&B&&($=d.enterObject()),B){if(M.explicit!==null){var H=this._decodeTag(d,M.explicit);if(d.isError(H))return H;d=H}var N=d.offset;if(M.use===null&&M.choice===null){if(M.any)var C=d.save();var V=this._decodeTag(d,M.implicit!==null?M.implicit:M.tag,M.any);if(d.isError(V))return V;M.any?x=d.raw(C):d=V}if(g&&g.track&&M.tag!==null&&g.track(d.path(),N,d.length,"tagged"),g&&g.track&&M.tag!==null&&g.track(d.path(),d.offset,d.length,"content"),M.any?x=x:M.choice===null?x=this._decodeGeneric(M.tag,d,g):x=this._decodeChoice(d,g),d.isError(x))return x;if(!M.any&&M.choice===null&&M.children!==null&&M.children.forEach(function(ae){ae._decode(d,g)}),M.contains&&(M.tag==="octstr"||M.tag==="bitstr")){var Q=new I(x);x=this._getUse(M.contains,d._reporterState.obj)._decode(Q,g)}}return M.obj&&B&&(x=d.leaveObject($)),M.key!==null&&(x!==null||B===!0)?d.leaveKey(A,M.key,x):A!==null&&d.exitKey(A),x},m.prototype._decodeGeneric=function(d,g,M){var x=this._baseState;return d==="seq"||d==="set"?null:d==="seqof"||d==="setof"?this._decodeList(g,d,x.args[0],M):/str$/.test(d)?this._decodeStr(g,d,M):d==="objid"&&x.args?this._decodeObjid(g,x.args[0],x.args[1],M):d==="objid"?this._decodeObjid(g,null,null,M):d==="gentime"||d==="utctime"?this._decodeTime(g,d,M):d==="null_"?this._decodeNull(g,M):d==="bool"?this._decodeBool(g,M):d==="objDesc"?this._decodeStr(g,d,M):d==="int"||d==="enum"?this._decodeInt(g,x.args&&x.args[0],M):x.use!==null?this._getUse(x.use,g._reporterState.obj)._decode(g,M):g.error("unknown tag: "+d)},m.prototype._getUse=function(d,g){var M=this._baseState;return M.useDecoder=this._use(d,g),p(M.useDecoder._baseState.parent===null),M.useDecoder=M.useDecoder._baseState.children[0],M.implicit!==M.useDecoder._baseState.implicit&&(M.useDecoder=M.useDecoder.clone(),M.useDecoder._baseState.implicit=M.implicit),M.useDecoder},m.prototype._decodeChoice=function(d,g){var M=this._baseState,x=null,B=!1;return Object.keys(M.choice).some(function(A){var D=d.save(),C=M.choice[A];try{var $=C._decode(d,g);if(d.isError($))return!1;x={type:A,value:$},B=!0}catch{return d.restore(D),!1}return!0},this),B?x:d.error("Choice not matched")},m.prototype._createEncoderBuffer=function(d){return new S(d,this.reporter)},m.prototype._encode=function(d,g,M){var x=this._baseState;if(!(x.default!==null&&x.default===d)){var B=this._encodeValue(d,g,M);if(B!==void 0&&!this._skipDefault(B,g,M))return B}},m.prototype._encodeValue=function(d,g,M){var x=this._baseState;if(x.parent===null)return x.children[0]._encode(d,g||new _);var C=null;if(this.reporter=g,x.optional&&d===void 0)if(x.default!==null)d=x.default;else return;var B=null,A=!1;if(x.any)C=this._createEncoderBuffer(d);else if(x.choice)C=this._encodeChoice(d,g);else if(x.contains)B=this._getUse(x.contains,M)._encode(d,g),A=!0;else if(x.children)B=x.children.map(function(N){if(N._baseState.tag==="null_")return N._encode(null,g,d);if(N._baseState.key===null)return g.error("Child should have a key");var V=g.enterKey(N._baseState.key);if(typeof d!="object")return g.error("Child expected, but input is not object");var Q=N._encode(d[N._baseState.key],g,d);return g.leaveKey(V),Q},this).filter(function(N){return N}),B=this._createEncoderBuffer(B);else if(x.tag==="seqof"||x.tag==="setof"){if(!(x.args&&x.args.length===1))return g.error("Too many args for : "+x.tag);if(!Array.isArray(d))return g.error("seqof/setof, but data is not Array");var D=this.clone();D._baseState.implicit=null,B=this._createEncoderBuffer(d.map(function(N){var V=this._baseState;return this._getUse(V.args[0],d)._encode(N,g)},D))}else x.use!==null?C=this._getUse(x.use,M)._encode(d,g):(B=this._encodePrimitive(x.tag,d),A=!0);var C;if(!x.any&&x.choice===null){var $=x.implicit!==null?x.implicit:x.tag,H=x.implicit===null?"universal":"context";$===null?x.use===null&&g.error("Tag could be omitted only for .use()"):x.use===null&&(C=this._encodeComposite($,A,H,B))}return x.explicit!==null&&(C=this._encodeComposite(x.explicit,!1,"context",C)),C},m.prototype._encodeChoice=function(d,g){var M=this._baseState,x=M.choice[d.type];return x||p(!1,d.type+" not found in "+JSON.stringify(Object.keys(M.choice))),x._encode(d.value,g)},m.prototype._encodePrimitive=function(d,g){var M=this._baseState;if(/str$/.test(d))return this._encodeStr(g,d);if(d==="objid"&&M.args)return this._encodeObjid(g,M.reverseArgs[0],M.args[1]);if(d==="objid")return this._encodeObjid(g,null,null);if(d==="gentime"||d==="utctime")return this._encodeTime(g,d);if(d==="null_")return this._encodeNull();if(d==="int"||d==="enum")return this._encodeInt(g,M.args&&M.reverseArgs[0]);if(d==="bool")return this._encodeBool(g);if(d==="objDesc")return this._encodeStr(g,d);throw new Error("Unsupported tag: "+d)},m.prototype._isNumstr=function(d){return/^[0-9 ]*$/.test(d)},m.prototype._isPrintstr=function(d){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(d)},node}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,(function(_){var S=_;S.Reporter=requireReporter().Reporter,S.DecoderBuffer=requireBuffer().DecoderBuffer,S.EncoderBuffer=requireBuffer().EncoderBuffer,S.Node=requireNode()})(base)),base}var constants={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,(function(_){var S=requireConstants();_.tagClass={0:"universal",1:"application",2:"context",3:"private"},_.tagClassByName=S._reverse(_.tagClass),_.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},_.tagByName=S._reverse(_.tag)})(der)),der}var hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,(function(_){var S=_;S._reverse=function(p){var R={};return Object.keys(p).forEach(function(f){(f|0)==f&&(f=f|0);var w=p[f];R[w]=f}),R},S.der=requireDer$2()})(constants)),constants}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var _=requireInherits_browser(),S=requireAsn1$1(),I=S.base,p=S.bignum,R=S.constants.der;function f(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new w,this.tree._init(y.body)}der_1$1=f,f.prototype.decode=function(d,g){return d instanceof I.DecoderBuffer||(d=new I.DecoderBuffer(d,g)),this.tree._decode(d,g)};function w(y){I.Node.call(this,"der",y)}_(w,I.Node),w.prototype._peekTag=function(d,g,M){if(d.isEmpty())return!1;var x=d.save(),B=m(d,'Failed to peek tag: "'+g+'"');return d.isError(B)?B:(d.restore(x),B.tag===g||B.tagStr===g||B.tagStr+"of"===g||M)},w.prototype._decodeTag=function(d,g,M){var x=m(d,'Failed to decode tag of "'+g+'"');if(d.isError(x))return x;var B=v(d,x.primitive,'Failed to get length of "'+g+'"');if(d.isError(B))return B;if(!M&&x.tag!==g&&x.tagStr!==g&&x.tagStr+"of"!==g)return d.error('Failed to match tag: "'+g+'"');if(x.primitive||B!==null)return d.skip(B,'Failed to match body of: "'+g+'"');var A=d.save(),D=this._skipUntilEnd(d,'Failed to skip indefinite length body: "'+this.tag+'"');return d.isError(D)?D:(B=d.offset-A.offset,d.restore(A),d.skip(B,'Failed to match body of: "'+g+'"'))},w.prototype._skipUntilEnd=function(d,g){for(;;){var M=m(d,g);if(d.isError(M))return M;var x=v(d,M.primitive,g);if(d.isError(x))return x;var B;if(M.primitive||x!==null?B=d.skip(x):B=this._skipUntilEnd(d,g),d.isError(B))return B;if(M.tagStr==="end")break}},w.prototype._decodeList=function(d,g,M,x){for(var B=[];!d.isEmpty();){var A=this._peekTag(d,"end");if(d.isError(A))return A;var D=M.decode(d,"der",x);if(d.isError(D)&&A)break;B.push(D)}return B},w.prototype._decodeStr=function(d,g){if(g==="bitstr"){var M=d.readUInt8();return d.isError(M)?M:{unused:M,data:d.raw()}}else if(g==="bmpstr"){var x=d.raw();if(x.length%2===1)return d.error("Decoding of string type: bmpstr length mismatch");for(var B="",A=0;A<x.length/2;A++)B+=String.fromCharCode(x.readUInt16BE(A*2));return B}else if(g==="numstr"){var D=d.raw().toString("ascii");return this._isNumstr(D)?D:d.error("Decoding of string type: numstr unsupported characters")}else{if(g==="octstr")return d.raw();if(g==="objDesc")return d.raw();if(g==="printstr"){var C=d.raw().toString("ascii");return this._isPrintstr(C)?C:d.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(g)?d.raw().toString():d.error("Decoding of string type: "+g+" unsupported")}},w.prototype._decodeObjid=function(d,g,M){for(var x,B=[],A=0;!d.isEmpty();){var D=d.readUInt8();A<<=7,A|=D&127,(D&128)===0&&(B.push(A),A=0)}D&128&&B.push(A);var C=B[0]/40|0,$=B[0]%40;if(M?x=B:x=[C,$].concat(B.slice(1)),g){var H=g[x.join(" ")];H===void 0&&(H=g[x.join(".")]),H!==void 0&&(x=H)}return x},w.prototype._decodeTime=function(d,g){var M=d.raw().toString();if(g==="gentime")var x=M.slice(0,4)|0,B=M.slice(4,6)|0,A=M.slice(6,8)|0,D=M.slice(8,10)|0,C=M.slice(10,12)|0,$=M.slice(12,14)|0;else if(g==="utctime"){var x=M.slice(0,2)|0,B=M.slice(2,4)|0,A=M.slice(4,6)|0,D=M.slice(6,8)|0,C=M.slice(8,10)|0,$=M.slice(10,12)|0;x<70?x=2e3+x:x=1900+x}else return d.error("Decoding "+g+" time is not supported yet");return Date.UTC(x,B-1,A,D,C,$,0)},w.prototype._decodeNull=function(d){return null},w.prototype._decodeBool=function(d){var g=d.readUInt8();return d.isError(g)?g:g!==0},w.prototype._decodeInt=function(d,g){var M=d.raw(),x=new p(M);return g&&(x=g[x.toString(10)]||x),x},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getDecoder("der").tree};function m(y,d){var g=y.readUInt8(d);if(y.isError(g))return g;var M=R.tagClass[g>>6],x=(g&32)===0;if((g&31)===31){var B=g;for(g=0;(B&128)===128;){if(B=y.readUInt8(d),y.isError(B))return B;g<<=7,g|=B&127}}else g&=31;var A=R.tag[g];return{cls:M,primitive:x,tag:g,tagStr:A}}function v(y,d,g){var M=y.readUInt8(g);if(y.isError(M))return M;if(!d&&M===128)return null;if((M&128)===0)return M;var x=M&127;if(x>4)return y.error("length octect is too long");M=0;for(var B=0;B<x;B++){M<<=8;var A=y.readUInt8(g);if(y.isError(A))return A;M|=A}return M}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var _=requireInherits_browser(),S=requireDist().Buffer,I=requireDer$1();function p(R){I.call(this,R),this.enc="pem"}return _(p,I),pem$1=p,p.prototype.decode=function(f,w){for(var m=f.toString().split(/[\r\n]+/g),v=w.label.toUpperCase(),y=/^-----(BEGIN|END) ([^-]+)-----$/,d=-1,g=-1,M=0;M<m.length;M++){var x=m[M].match(y);if(x!==null&&x[2]===v)if(d===-1){if(x[1]!=="BEGIN")break;d=M}else{if(x[1]!=="END")break;g=M;break}}if(d===-1||g===-1)throw new Error("PEM section not found for: "+v);var B=m.slice(d+1,g).join("");B.replace(/[^a-z0-9\+\/=]+/gi,"");var A=new S(B,"base64");return I.prototype.decode.call(this,A,w)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,(function(_){var S=_;S.der=requireDer$1(),S.pem=requirePem$1()})(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var _=requireInherits_browser(),S=requireDist().Buffer,I=requireAsn1$1(),p=I.base,R=I.constants.der;function f(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new w,this.tree._init(y.body)}der_1=f,f.prototype.encode=function(d,g){return this.tree._encode(d,g).join()};function w(y){p.Node.call(this,"der",y)}_(w,p.Node),w.prototype._encodeComposite=function(d,g,M,x){var B=v(d,g,M,this.reporter);if(x.length<128){var C=new S(2);return C[0]=B,C[1]=x.length,this._createEncoderBuffer([C,x])}for(var A=1,D=x.length;D>=256;D>>=8)A++;var C=new S(2+A);C[0]=B,C[1]=128|A;for(var D=1+A,$=x.length;$>0;D--,$>>=8)C[D]=$&255;return this._createEncoderBuffer([C,x])},w.prototype._encodeStr=function(d,g){if(g==="bitstr")return this._createEncoderBuffer([d.unused|0,d.data]);if(g==="bmpstr"){for(var M=new S(d.length*2),x=0;x<d.length;x++)M.writeUInt16BE(d.charCodeAt(x),x*2);return this._createEncoderBuffer(M)}else return g==="numstr"?this._isNumstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: numstr supports only digits and space"):g==="printstr"?this._isPrintstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(g)?this._createEncoderBuffer(d):g==="objDesc"?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: "+g+" unsupported")},w.prototype._encodeObjid=function(d,g,M){if(typeof d=="string"){if(!g)return this.reporter.error("string objid given, but no values map found");if(!g.hasOwnProperty(d))return this.reporter.error("objid not found in values map");d=g[d].split(/[\s\.]+/g);for(var x=0;x<d.length;x++)d[x]|=0}else if(Array.isArray(d)){d=d.slice();for(var x=0;x<d.length;x++)d[x]|=0}if(!Array.isArray(d))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(d));if(!M){if(d[1]>=40)return this.reporter.error("Second objid identifier OOB");d.splice(0,2,d[0]*40+d[1])}for(var B=0,x=0;x<d.length;x++){var A=d[x];for(B++;A>=128;A>>=7)B++}for(var D=new S(B),C=D.length-1,x=d.length-1;x>=0;x--){var A=d[x];for(D[C--]=A&127;(A>>=7)>0;)D[C--]=128|A&127}return this._createEncoderBuffer(D)};function m(y){return y<10?"0"+y:y}w.prototype._encodeTime=function(d,g){var M,x=new Date(d);return g==="gentime"?M=[m(x.getFullYear()),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):g==="utctime"?M=[m(x.getFullYear()%100),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+g+" time is not supported yet"),this._encodeStr(M,"octstr")},w.prototype._encodeNull=function(){return this._createEncoderBuffer("")},w.prototype._encodeInt=function(d,g){if(typeof d=="string"){if(!g)return this.reporter.error("String int or enum given, but no values map");if(!g.hasOwnProperty(d))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(d));d=g[d]}if(typeof d!="number"&&!S.isBuffer(d)){var M=d.toArray();!d.sign&&M[0]&128&&M.unshift(0),d=new S(M)}if(S.isBuffer(d)){var x=d.length;d.length===0&&x++;var A=new S(x);return d.copy(A),d.length===0&&(A[0]=0),this._createEncoderBuffer(A)}if(d<128)return this._createEncoderBuffer(d);if(d<256)return this._createEncoderBuffer([0,d]);for(var x=1,B=d;B>=256;B>>=8)x++;for(var A=new Array(x),B=A.length-1;B>=0;B--)A[B]=d&255,d>>=8;return A[0]&128&&A.unshift(0),this._createEncoderBuffer(new S(A))},w.prototype._encodeBool=function(d){return this._createEncoderBuffer(d?255:0)},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getEncoder("der").tree},w.prototype._skipDefault=function(d,g,M){var x=this._baseState,B;if(x.default===null)return!1;var A=d.join();if(x.defaultBuffer===void 0&&(x.defaultBuffer=this._encodeValue(x.default,g,M).join()),A.length!==x.defaultBuffer.length)return!1;for(B=0;B<A.length;B++)if(A[B]!==x.defaultBuffer[B])return!1;return!0};function v(y,d,g,M){var x;if(y==="seqof"?y="seq":y==="setof"&&(y="set"),R.tagByName.hasOwnProperty(y))x=R.tagByName[y];else if(typeof y=="number"&&(y|0)===y)x=y;else return M.error("Unknown tag: "+y);return x>=31?M.error("Multi-octet tag encoding unsupported"):(d||(x|=32),x|=R.tagClassByName[g||"universal"]<<6,x)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var _=requireInherits_browser(),S=requireDer();function I(p){S.call(this,p),this.enc="pem"}return _(I,S),pem=I,I.prototype.encode=function(R,f){for(var w=S.prototype.encode.call(this,R),m=w.toString("base64"),v=["-----BEGIN "+f.label+"-----"],y=0;y<m.length;y+=64)v.push(m.slice(y,y+64));return v.push("-----END "+f.label+"-----"),v.join(`
|
|
14
|
+
`)},pem}var hasRequiredEncoders;function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,(function(_){var S=_;S.der=requireDer(),S.pem=requirePem()})(encoders)),encoders}var hasRequiredAsn1$1;function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,(function(_){var S=_;S.bignum=requireBn$2(),S.define=requireApi().define,S.base=requireBase(),S.constants=requireConstants(),S.decoders=requireDecoders(),S.encoders=requireEncoders()})(asn1)),asn1}var certificate,hasRequiredCertificate;function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var _=requireAsn1$1(),S=_.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),I=_.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),p=_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),R=_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())}),f=_.define("RelativeDistinguishedName",function(){this.setof(I)}),w=_.define("RDNSequence",function(){this.seqof(f)}),m=_.define("Name",function(){this.choice({rdnSequence:this.use(w)})}),v=_.define("Validity",function(){this.seq().obj(this.key("notBefore").use(S),this.key("notAfter").use(S))}),y=_.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=_.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(p),this.key("issuer").use(m),this.key("validity").use(v),this.key("subject").use(m),this.key("subjectPublicKeyInfo").use(R),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(y).optional())}),g=_.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(p),this.key("signatureValue").bitstr())});return certificate=g,certificate}var hasRequiredAsn1;function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var _=requireAsn1$1();asn1$1.certificate=requireCertificate();var S=_.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});asn1$1.RSAPrivateKey=S;var I=_.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});asn1$1.RSAPublicKey=I;var p=_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),R=_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())});asn1$1.PublicKey=R;var f=_.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(p),this.key("subjectPrivateKey").octstr())});asn1$1.PrivateKey=f;var w=_.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});asn1$1.EncryptedPrivateKey=w;var m=_.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});asn1$1.DSAPrivateKey=m,asn1$1.DSAparam=_.define("DSAparam",function(){this.int()});var v=_.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),y=_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(v),this.key("publicKey").optional().explicit(1).bitstr())});return asn1$1.ECPrivateKey=y,asn1$1.signature=_.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}),asn1$1}const require$$1={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"};var fixProc,hasRequiredFixProc;function requireFixProc(){if(hasRequiredFixProc)return fixProc;hasRequiredFixProc=1;var _=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,S=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,I=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,p=requireEvp_bytestokey(),R=requireBrowser$6(),f=requireSafeBuffer$2().Buffer;return fixProc=function(w,m){var v=w.toString(),y=v.match(_),d;if(y){var M="aes"+y[1],x=f.from(y[2],"hex"),B=f.from(y[3].replace(/[\r\n]/g,""),"base64"),A=p(m,x.slice(0,8),parseInt(y[1],10)).key,D=[],C=R.createDecipheriv(M,A,x);D.push(C.update(B)),D.push(C.final()),d=f.concat(D)}else{var g=v.match(I);d=f.from(g[2].replace(/[\r\n]/g,""),"base64")}var $=v.match(S)[1];return{tag:$,data:d}},fixProc}var parseAsn1,hasRequiredParseAsn1;function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var _=requireAsn1(),S=require$$1,I=requireFixProc(),p=requireBrowser$6(),R=requireBrowser$7().pbkdf2Sync,f=requireSafeBuffer$2().Buffer;function w(v,y){var d=v.algorithm.decrypt.kde.kdeparams.salt,g=parseInt(v.algorithm.decrypt.kde.kdeparams.iters.toString(),10),M=S[v.algorithm.decrypt.cipher.algo.join(".")],x=v.algorithm.decrypt.cipher.iv,B=v.subjectPrivateKey,A=parseInt(M.split("-")[1],10)/8,D=R(y,d,g,A,"sha1"),C=p.createDecipheriv(M,D,x),$=[];return $.push(C.update(B)),$.push(C.final()),f.concat($)}function m(v){var y;typeof v=="object"&&!f.isBuffer(v)&&(y=v.passphrase,v=v.key),typeof v=="string"&&(v=f.from(v));var d=I(v,y),g=d.tag,M=d.data,x,B;switch(g){case"CERTIFICATE":B=_.certificate.decode(M,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(B||(B=_.PublicKey.decode(M,"der")),x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return _.RSAPublicKey.decode(B.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return B.subjectPrivateKey=B.subjectPublicKey,{type:"ec",data:B};case"1.2.840.10040.4.1":return B.algorithm.params.pub_key=_.DSAparam.decode(B.subjectPublicKey.data,"der"),{type:"dsa",data:B.algorithm.params};default:throw new Error("unknown key id "+x)}case"ENCRYPTED PRIVATE KEY":M=_.EncryptedPrivateKey.decode(M,"der"),M=w(M,y);case"PRIVATE KEY":switch(B=_.PrivateKey.decode(M,"der"),x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return _.RSAPrivateKey.decode(B.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:B.algorithm.curve,privateKey:_.ECPrivateKey.decode(B.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return B.algorithm.params.priv_key=_.DSAparam.decode(B.subjectPrivateKey,"der"),{type:"dsa",params:B.algorithm.params};default:throw new Error("unknown key id "+x)}case"RSA PUBLIC KEY":return _.RSAPublicKey.decode(M,"der");case"RSA PRIVATE KEY":return _.RSAPrivateKey.decode(M,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:_.DSAPrivateKey.decode(M,"der")};case"EC PRIVATE KEY":return M=_.ECPrivateKey.decode(M,"der"),{curve:M.parameters.value,privateKey:M.privateKey};default:throw new Error("unknown key type "+g)}}return m.signature=_.signature,parseAsn1=m,parseAsn1}const require$$4={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};var hasRequiredSign;function requireSign(){if(hasRequiredSign)return sign.exports;hasRequiredSign=1;var _=requireSafeBuffer$2().Buffer,S=requireBrowser$8(),I=requireBrowserifyRsa(),p=requireElliptic().ec,R=requireBn$4(),f=requireParseAsn1(),w=require$$4,m=1;function v(C,$,H,N,V){var Q=f($);if(Q.curve){if(N!=="ecdsa"&&N!=="ecdsa/rsa")throw new Error("wrong private key type");return y(C,Q)}else if(Q.type==="dsa"){if(N!=="dsa")throw new Error("wrong private key type");return d(C,Q,H)}if(N!=="rsa"&&N!=="ecdsa/rsa")throw new Error("wrong private key type");if($.padding!==void 0&&$.padding!==m)throw new Error("illegal or unsupported padding mode");C=_.concat([V,C]);for(var ne=Q.modulus.byteLength(),ae=[0,1];C.length+ae.length+1<ne;)ae.push(255);ae.push(0);for(var ee=-1;++ee<C.length;)ae.push(C[ee]);var le=I(ae,Q);return le}function y(C,$){var H=w[$.curve.join(".")];if(!H)throw new Error("unknown curve "+$.curve.join("."));var N=new p(H),V=N.keyFromPrivate($.privateKey),Q=V.sign(C);return _.from(Q.toDER())}function d(C,$,H){for(var N=$.params.priv_key,V=$.params.p,Q=$.params.q,ne=$.params.g,ae=new R(0),ee,le=x(C,Q).mod(Q),c=!1,e=M(N,Q,C,H);c===!1;)ee=A(Q,e,H),ae=D(ne,ee,V,Q),c=ee.invm(Q).imul(le.add(N.mul(ae))).mod(Q),c.cmpn(0)===0&&(c=!1,ae=new R(0));return g(ae,c)}function g(C,$){C=C.toArray(),$=$.toArray(),C[0]&128&&(C=[0].concat(C)),$[0]&128&&($=[0].concat($));var H=C.length+$.length+4,N=[48,H,2,C.length];return N=N.concat(C,[2,$.length],$),_.from(N)}function M(C,$,H,N){if(C=_.from(C.toArray()),C.length<$.byteLength()){var V=_.alloc($.byteLength()-C.length);C=_.concat([V,C])}var Q=H.length,ne=B(H,$),ae=_.alloc(Q);ae.fill(1);var ee=_.alloc(Q);return ee=S(N,ee).update(ae).update(_.from([0])).update(C).update(ne).digest(),ae=S(N,ee).update(ae).digest(),ee=S(N,ee).update(ae).update(_.from([1])).update(C).update(ne).digest(),ae=S(N,ee).update(ae).digest(),{k:ee,v:ae}}function x(C,$){var H=new R(C),N=(C.length<<3)-$.bitLength();return N>0&&H.ishrn(N),H}function B(C,$){C=x(C,$),C=C.mod($);var H=_.from(C.toArray());if(H.length<$.byteLength()){var N=_.alloc($.byteLength()-H.length);H=_.concat([N,H])}return H}function A(C,$,H){var N,V;do{for(N=_.alloc(0);N.length*8<C.bitLength();)$.v=S(H,$.k).update($.v).digest(),N=_.concat([N,$.v]);V=x(N,C),$.k=S(H,$.k).update($.v).update(_.from([0])).digest(),$.v=S(H,$.k).update($.v).digest()}while(V.cmp(C)!==-1);return V}function D(C,$,H,N){return C.toRed(R.mont(H)).redPow($).fromRed().mod(N)}return sign.exports=v,sign.exports.getKey=M,sign.exports.makeKey=A,sign.exports}var verify_1,hasRequiredVerify;function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var _=requireSafeBuffer$2().Buffer,S=requireBn$4(),I=requireElliptic().ec,p=requireParseAsn1(),R=require$$4;function f(y,d,g,M,x){var B=p(g);if(B.type==="ec"){if(M!=="ecdsa"&&M!=="ecdsa/rsa")throw new Error("wrong public key type");return w(y,d,B)}else if(B.type==="dsa"){if(M!=="dsa")throw new Error("wrong public key type");return m(y,d,B)}if(M!=="rsa"&&M!=="ecdsa/rsa")throw new Error("wrong public key type");d=_.concat([x,d]);for(var A=B.modulus.byteLength(),D=[1],C=0;d.length+D.length+2<A;)D.push(255),C+=1;D.push(0);for(var $=-1;++$<d.length;)D.push(d[$]);D=_.from(D);var H=S.mont(B.modulus);y=new S(y).toRed(H),y=y.redPow(new S(B.publicExponent)),y=_.from(y.fromRed().toArray());var N=C<8?1:0;for(A=Math.min(y.length,D.length),y.length!==D.length&&(N=1),$=-1;++$<A;)N|=y[$]^D[$];return N===0}function w(y,d,g){var M=R[g.data.algorithm.curve.join(".")];if(!M)throw new Error("unknown curve "+g.data.algorithm.curve.join("."));var x=new I(M),B=g.data.subjectPrivateKey.data;return x.verify(d,y,B)}function m(y,d,g){var M=g.data.p,x=g.data.q,B=g.data.g,A=g.data.pub_key,D=p.signature.decode(y,"der"),C=D.s,$=D.r;v(C,x),v($,x);var H=S.mont(M),N=C.invm(x),V=B.toRed(H).redPow(new S(d).mul(N).mod(x)).fromRed().mul(A.toRed(H).redPow($.mul(N).mod(x)).fromRed()).mod(M).mod(x);return V.cmp($)===0}function v(y,d){if(y.cmpn(0)<=0)throw new Error("invalid sig");if(y.cmp(d)>=0)throw new Error("invalid sig")}return verify_1=f,verify_1}var browser$3,hasRequiredBrowser$3;function requireBrowser$3(){if(hasRequiredBrowser$3)return browser$3;hasRequiredBrowser$3=1;var _=requireSafeBuffer$2().Buffer,S=requireBrowser$9(),I=requireReadableBrowser(),p=requireInherits_browser(),R=requireSign(),f=requireVerify(),w=require$$6;Object.keys(w).forEach(function(g){w[g].id=_.from(w[g].id,"hex"),w[g.toLowerCase()]=w[g]});function m(g){I.Writable.call(this);var M=w[g];if(!M)throw new Error("Unknown message digest");this._hashType=M.hash,this._hash=S(M.hash),this._tag=M.id,this._signType=M.sign}p(m,I.Writable),m.prototype._write=function(M,x,B){this._hash.update(M),B()},m.prototype.update=function(M,x){return this._hash.update(typeof M=="string"?_.from(M,x):M),this},m.prototype.sign=function(M,x){this.end();var B=this._hash.digest(),A=R(B,M,this._hashType,this._signType,this._tag);return x?A.toString(x):A};function v(g){I.Writable.call(this);var M=w[g];if(!M)throw new Error("Unknown message digest");this._hash=S(M.hash),this._tag=M.id,this._signType=M.sign}p(v,I.Writable),v.prototype._write=function(M,x,B){this._hash.update(M),B()},v.prototype.update=function(M,x){return this._hash.update(typeof M=="string"?_.from(M,x):M),this},v.prototype.verify=function(M,x,B){var A=typeof x=="string"?_.from(x,B):x;this.end();var D=this._hash.digest();return f(A,D,M,this._signType,this._tag)};function y(g){return new m(g)}function d(g){return new v(g)}return browser$3={Sign:y,Verify:d,createSign:y,createVerify:d},browser$3}var bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.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},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],M=[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];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.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()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$2)})(bn$3)),bn$3.exports}var browser$2,hasRequiredBrowser$2;function requireBrowser$2(){if(hasRequiredBrowser$2)return browser$2;hasRequiredBrowser$2=1;var _=requireElliptic(),S=requireBn$1();browser$2=function(w){return new p(w)};var I={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};I.p224=I.secp224r1,I.p256=I.secp256r1=I.prime256v1,I.p192=I.secp192r1=I.prime192v1,I.p384=I.secp384r1,I.p521=I.secp521r1;function p(f){this.curveType=I[f],this.curveType||(this.curveType={name:f}),this.curve=new _.ec(this.curveType.name),this.keys=void 0}p.prototype.generateKeys=function(f,w){return this.keys=this.curve.genKeyPair(),this.getPublicKey(f,w)},p.prototype.computeSecret=function(f,w,m){w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w));var v=this.curve.keyFromPublic(f).getPublic(),y=v.mul(this.keys.getPrivate()).getX();return R(y,m,this.curveType.byteLength)},p.prototype.getPublicKey=function(f,w){var m=this.keys.getPublic(w==="compressed",!0);return w==="hybrid"&&(m[m.length-1]%2?m[0]=7:m[0]=6),R(m,f)},p.prototype.getPrivateKey=function(f){return R(this.keys.getPrivate(),f)},p.prototype.setPublicKey=function(f,w){return w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w)),this.keys._importPublic(f),this},p.prototype.setPrivateKey=function(f,w){w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w));var m=new S(f);return m=m.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(m),this};function R(f,w,m){Array.isArray(f)||(f=f.toArray());var v=new Buffer(f);if(m&&v.length<m){var y=new Buffer(m-v.length);y.fill(0),v=Buffer.concat([y,v])}return w?v.toString(w):v}return browser$2}var browser$1={},mgf,hasRequiredMgf;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var _=requireBrowser$9(),S=requireSafeBuffer$2().Buffer;mgf=function(p,R){for(var f=S.alloc(0),w=0,m;f.length<R;)m=I(w++),f=S.concat([f,_("sha1").update(p).update(m).digest()]);return f.slice(0,R)};function I(p){var R=S.allocUnsafe(4);return R.writeUInt32BE(p,0),R}return mgf}var xor,hasRequiredXor;function requireXor(){return hasRequiredXor||(hasRequiredXor=1,xor=function(S,I){for(var p=S.length,R=-1;++R<p;)S[R]^=I[R];return S}),xor}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),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 a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.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},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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"],g=[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],M=[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];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.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()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn)})(bn$1)),bn$1.exports}var withPublic_1,hasRequiredWithPublic;function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var _=requireBn(),S=requireSafeBuffer$2().Buffer;function I(p,R){return S.from(p.toRed(_.mont(R.modulus)).redPow(new _(R.publicExponent)).fromRed().toArray())}return withPublic_1=I,withPublic_1}var publicEncrypt,hasRequiredPublicEncrypt;function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var _=requireParseAsn1(),S=requireBrowser$b(),I=requireBrowser$9(),p=requireMgf(),R=requireXor(),f=requireBn(),w=requireWithPublic(),m=requireBrowserifyRsa(),v=requireSafeBuffer$2().Buffer;publicEncrypt=function(x,B,A){var D;x.padding?D=x.padding:A?D=1:D=4;var C=_(x),$;if(D===4)$=y(C,B);else if(D===1)$=d(C,B,A);else if(D===3){if($=new f(B),$.cmp(C.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return A?m($,C):w($,C)};function y(M,x){var B=M.modulus.byteLength(),A=x.length,D=I("sha1").update(v.alloc(0)).digest(),C=D.length,$=2*C;if(A>B-$-2)throw new Error("message too long");var H=v.alloc(B-A-$-2),N=B-C-1,V=S(C),Q=R(v.concat([D,H,v.alloc(1,1),x],N),p(V,N)),ne=R(V,p(Q,C));return new f(v.concat([v.alloc(1),ne,Q],B))}function d(M,x,B){var A=x.length,D=M.modulus.byteLength();if(A>D-11)throw new Error("message too long");var C;return B?C=v.alloc(D-A-3,255):C=g(D-A-3),new f(v.concat([v.from([0,B?1:2]),C,v.alloc(1),x],D))}function g(M){for(var x=v.allocUnsafe(M),B=0,A=S(M*2),D=0,C;B<M;)D===A.length&&(A=S(M*2),D=0),C=A[D++],C&&(x[B++]=C);return x}return publicEncrypt}var privateDecrypt,hasRequiredPrivateDecrypt;function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var _=requireParseAsn1(),S=requireMgf(),I=requireXor(),p=requireBn(),R=requireBrowserifyRsa(),f=requireBrowser$9(),w=requireWithPublic(),m=requireSafeBuffer$2().Buffer;privateDecrypt=function(M,x,B){var A;M.padding?A=M.padding:B?A=1:A=4;var D=_(M),C=D.modulus.byteLength();if(x.length>C||new p(x).cmp(D.modulus)>=0)throw new Error("decryption error");var $;B?$=w(new p(x),D):$=R(x,D);var H=m.alloc(C-$.length);if($=m.concat([H,$],C),A===4)return v(D,$);if(A===1)return y(D,$,B);if(A===3)return $;throw new Error("unknown padding")};function v(g,M){var x=g.modulus.byteLength(),B=f("sha1").update(m.alloc(0)).digest(),A=B.length;if(M[0]!==0)throw new Error("decryption error");var D=M.slice(1,A+1),C=M.slice(A+1),$=I(D,S(C,A)),H=I(C,S($,x-A-1));if(d(B,H.slice(0,A)))throw new Error("decryption error");for(var N=A;H[N]===0;)N++;if(H[N++]!==1)throw new Error("decryption error");return H.slice(N)}function y(g,M,x){for(var B=M.slice(0,2),A=2,D=0;M[A++]!==0;)if(A>=M.length){D++;break}var C=M.slice(2,A-1);if((B.toString("hex")!=="0002"&&!x||B.toString("hex")!=="0001"&&x)&&D++,C.length<8&&D++,D)throw new Error("decryption error");return M.slice(A)}function d(g,M){g=m.from(g),M=m.from(M);var x=0,B=g.length;g.length!==M.length&&(x++,B=Math.min(g.length,M.length));for(var A=-1;++A<B;)x+=g[A]^M[A];return x}return privateDecrypt}var hasRequiredBrowser$1;function requireBrowser$1(){return hasRequiredBrowser$1||(hasRequiredBrowser$1=1,(function(_){_.publicEncrypt=requirePublicEncrypt(),_.privateDecrypt=requirePrivateDecrypt(),_.privateEncrypt=function(I,p){return _.publicEncrypt(I,p,!0)},_.publicDecrypt=function(I,p){return _.privateDecrypt(I,p,!0)}})(browser$1)),browser$1}var browser={},hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;function _(){throw new Error(`secure random number generation not supported by this browser
|
|
15
|
+
use chrome, FireFox or Internet Explorer 11`)}var S=requireSafeBuffer$2(),I=requireBrowser$b(),p=S.Buffer,R=S.kMaxLength,f=commonjsGlobal.crypto||commonjsGlobal.msCrypto,w=Math.pow(2,32)-1;function m(M,x){if(typeof M!="number"||M!==M)throw new TypeError("offset must be a number");if(M>w||M<0)throw new TypeError("offset must be a uint32");if(M>R||M>x)throw new RangeError("offset out of range")}function v(M,x,B){if(typeof M!="number"||M!==M)throw new TypeError("size must be a number");if(M>w||M<0)throw new TypeError("size must be a uint32");if(M+x>B||M>R)throw new RangeError("buffer too small")}f&&f.getRandomValues||!process$1.browser?(browser.randomFill=y,browser.randomFillSync=g):(browser.randomFill=_,browser.randomFillSync=_);function y(M,x,B,A){if(!p.isBuffer(M)&&!(M instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof x=="function")A=x,x=0,B=M.length;else if(typeof B=="function")A=B,B=M.length-x;else if(typeof A!="function")throw new TypeError('"cb" argument must be a function');return m(x,M.length),v(B,x,M.length),d(M,x,B,A)}function d(M,x,B,A){if(process$1.browser){var D=M.buffer,C=new Uint8Array(D,x,B);if(f.getRandomValues(C),A){process$1.nextTick(function(){A(null,M)});return}return M}if(A){I(B,function(H,N){if(H)return A(H);N.copy(M,x),A(null,M)});return}var $=I(B);return $.copy(M,x),M}function g(M,x,B){if(typeof x>"u"&&(x=0),!p.isBuffer(M)&&!(M instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return m(x,M.length),B===void 0&&(B=M.length-x),v(B,x,M.length),d(M,x,B)}return browser}var hasRequiredCryptoBrowserify;function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=requireBrowser$b(),cryptoBrowserify.createHash=cryptoBrowserify.Hash=requireBrowser$9(),cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=requireBrowser$8();var _=requireAlgos(),S=Object.keys(_),I=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(S);cryptoBrowserify.getHashes=function(){return I};var p=requireBrowser$7();cryptoBrowserify.pbkdf2=p.pbkdf2,cryptoBrowserify.pbkdf2Sync=p.pbkdf2Sync;var R=requireBrowser$5();cryptoBrowserify.Cipher=R.Cipher,cryptoBrowserify.createCipher=R.createCipher,cryptoBrowserify.Cipheriv=R.Cipheriv,cryptoBrowserify.createCipheriv=R.createCipheriv,cryptoBrowserify.Decipher=R.Decipher,cryptoBrowserify.createDecipher=R.createDecipher,cryptoBrowserify.Decipheriv=R.Decipheriv,cryptoBrowserify.createDecipheriv=R.createDecipheriv,cryptoBrowserify.getCiphers=R.getCiphers,cryptoBrowserify.listCiphers=R.listCiphers;var f=requireBrowser$4();cryptoBrowserify.DiffieHellmanGroup=f.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=f.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=f.getDiffieHellman,cryptoBrowserify.createDiffieHellman=f.createDiffieHellman,cryptoBrowserify.DiffieHellman=f.DiffieHellman;var w=requireBrowser$3();cryptoBrowserify.createSign=w.createSign,cryptoBrowserify.Sign=w.Sign,cryptoBrowserify.createVerify=w.createVerify,cryptoBrowserify.Verify=w.Verify,cryptoBrowserify.createECDH=requireBrowser$2();var m=requireBrowser$1();cryptoBrowserify.publicEncrypt=m.publicEncrypt,cryptoBrowserify.privateEncrypt=m.privateEncrypt,cryptoBrowserify.publicDecrypt=m.publicDecrypt,cryptoBrowserify.privateDecrypt=m.privateDecrypt;var v=requireBrowser();return cryptoBrowserify.randomFill=v.randomFill,cryptoBrowserify.randomFillSync=v.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
|
|
16
16
|
we accept pull requests
|
|
17
|
-
https://github.com/browserify/crypto-browserify`)},cryptoBrowserify.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},cryptoBrowserify}var cryptoBrowserifyExports=requireCryptoBrowserify(),httpsBrowserify={exports:{}},streamHttp={},request={exports:{}},capability={},hasRequiredCapability;function requireCapability(){return hasRequiredCapability||(hasRequiredCapability=1,(function(b){b.fetch=E(commonjsGlobal.fetch)&&E(commonjsGlobal.ReadableStream),b.writableStream=E(commonjsGlobal.WritableStream),b.abortController=E(commonjsGlobal.AbortController);var _;function S(){if(_!==void 0)return _;if(commonjsGlobal.XMLHttpRequest){_=new commonjsGlobal.XMLHttpRequest;try{_.open("GET",commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{_=null}}else _=null;return _}function p(a){var w=S();if(!w)return!1;try{return w.responseType=a,w.responseType===a}catch{}return!1}b.arraybuffer=b.fetch||p("arraybuffer"),b.msstream=!b.fetch&&p("ms-stream"),b.mozchunkedarraybuffer=!b.fetch&&p("moz-chunked-arraybuffer"),b.overrideMimeType=b.fetch||(S()?E(S().overrideMimeType):!1);function E(a){return typeof a=="function"}_=null})(capability)),capability}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(_,S){S&&(_.super_=S,_.prototype=Object.create(S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(_,S){if(S){_.super_=S;var p=function(){};p.prototype=S.prototype,_.prototype=new p,_.prototype.constructor=_}}),inherits_browser.exports}var response={},readableBrowser={exports:{}},hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,(function(b,_){_=b.exports=require_stream_readable$2(),_.Stream=_,_.Readable=_,_.Writable=require_stream_writable$2(),_.Duplex=require_stream_duplex$2(),_.Transform=require_stream_transform$2(),_.PassThrough=require_stream_passthrough$2(),_.finished=requireEndOfStream(),_.pipeline=requirePipeline()})(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var hasRequiredResponse;function requireResponse(){if(hasRequiredResponse)return response;hasRequiredResponse=1;var b=requireCapability(),_=requireInherits_browser(),S=requireReadableBrowser(),p=response.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},E=response.IncomingMessage=function(a,w,v,y){var m=this;if(S.Readable.call(m),m._mode=v,m.headers={},m.rawHeaders=[],m.trailers={},m.rawTrailers=[],m.on("end",function(){process$1.nextTick(function(){m.emit("close")})}),v==="fetch"){let B=function(){g.read().then(function($){if(!m._destroyed){if(y($.done),$.done){m.push(null);return}m.push(Buffer.from($.value)),B()}}).catch(function($){y(!0),m._destroyed||m.emit("error",$)})};if(m._fetchResponse=w,m.url=w.url,m.statusCode=w.status,m.statusMessage=w.statusText,w.headers.forEach(function($,k){m.headers[k.toLowerCase()]=$,m.rawHeaders.push(k,$)}),b.writableStream){var d=new WritableStream({write:function($){return y(!1),new Promise(function(k,I){m._destroyed?I():m.push(Buffer.from($))?k():m._resumeFetch=k})},close:function(){y(!0),m._destroyed||m.push(null)},abort:function($){y(!0),m._destroyed||m.emit("error",$)}});try{w.body.pipeTo(d).catch(function($){y(!0),m._destroyed||m.emit("error",$)});return}catch{}}var g=w.body.getReader();B()}else{m._xhr=a,m._pos=0,m.url=a.responseURL,m.statusCode=a.status,m.statusMessage=a.statusText;var x=a.getAllResponseHeaders().split(/\r?\n/);if(x.forEach(function(B){var $=B.match(/^([^:]+):\s*(.*)/);if($){var k=$[1].toLowerCase();k==="set-cookie"?(m.headers[k]===void 0&&(m.headers[k]=[]),m.headers[k].push($[2])):m.headers[k]!==void 0?m.headers[k]+=", "+$[2]:m.headers[k]=$[2],m.rawHeaders.push($[1],$[2])}}),m._charset="x-user-defined",!b.overrideMimeType){var R=m.rawHeaders["mime-type"];if(R){var q=R.match(/;\s*charset=([^;])(;|$)/);q&&(m._charset=q[1].toLowerCase())}m._charset||(m._charset="utf-8")}}};return _(E,S.Readable),E.prototype._read=function(){var a=this,w=a._resumeFetch;w&&(a._resumeFetch=null,w())},E.prototype._onXHRProgress=function(a){var w=this,v=w._xhr,y=null;switch(w._mode){case"text":if(y=v.responseText,y.length>w._pos){var m=y.substr(w._pos);if(w._charset==="x-user-defined"){for(var d=Buffer.alloc(m.length),g=0;g<m.length;g++)d[g]=m.charCodeAt(g)&255;w.push(d)}else w.push(m,w._charset);w._pos=y.length}break;case"arraybuffer":if(v.readyState!==p.DONE||!v.response)break;y=v.response,w.push(Buffer.from(new Uint8Array(y)));break;case"moz-chunked-arraybuffer":if(y=v.response,v.readyState!==p.LOADING||!y)break;w.push(Buffer.from(new Uint8Array(y)));break;case"ms-stream":if(y=v.response,v.readyState!==p.LOADING)break;var x=new commonjsGlobal.MSStreamReader;x.onprogress=function(){x.result.byteLength>w._pos&&(w.push(Buffer.from(new Uint8Array(x.result.slice(w._pos)))),w._pos=x.result.byteLength)},x.onload=function(){a(!0),w.push(null)},x.readAsArrayBuffer(y);break}w._xhr.readyState===p.DONE&&w._mode!=="ms-stream"&&(a(!0),w.push(null))},response}var hasRequiredRequest;function requireRequest(){if(hasRequiredRequest)return request.exports;hasRequiredRequest=1;var b=requireCapability(),_=requireInherits_browser(),S=requireResponse(),p=requireReadableBrowser(),E=S.IncomingMessage,a=S.readyStates;function w(d,g){return b.fetch&&g?"fetch":b.mozchunkedarraybuffer?"moz-chunked-arraybuffer":b.msstream?"ms-stream":b.arraybuffer&&d?"arraybuffer":"text"}var v=request.exports=function(d){var g=this;p.Writable.call(g),g._opts=d,g._body=[],g._headers={},d.auth&&g.setHeader("Authorization","Basic "+Buffer.from(d.auth).toString("base64")),Object.keys(d.headers).forEach(function(q){g.setHeader(q,d.headers[q])});var x,R=!0;if(d.mode==="disable-fetch"||"requestTimeout"in d&&!b.abortController)R=!1,x=!0;else if(d.mode==="prefer-streaming")x=!1;else if(d.mode==="allow-wrong-content-type")x=!b.overrideMimeType;else if(!d.mode||d.mode==="default"||d.mode==="prefer-fast")x=!0;else throw new Error("Invalid value for opts.mode");g._mode=w(x,R),g._fetchTimer=null,g._socketTimeout=null,g._socketTimer=null,g.on("finish",function(){g._onFinish()})};_(v,p.Writable),v.prototype.setHeader=function(d,g){var x=this,R=d.toLowerCase();m.indexOf(R)===-1&&(x._headers[R]={name:d,value:g})},v.prototype.getHeader=function(d){var g=this._headers[d.toLowerCase()];return g?g.value:null},v.prototype.removeHeader=function(d){var g=this;delete g._headers[d.toLowerCase()]},v.prototype._onFinish=function(){var d=this;if(!d._destroyed){var g=d._opts;"timeout"in g&&g.timeout!==0&&d.setTimeout(g.timeout);var x=d._headers,R=null;g.method!=="GET"&&g.method!=="HEAD"&&(R=new Blob(d._body,{type:(x["content-type"]||{}).value||""}));var q=[];if(Object.keys(x).forEach(function(I){var L=x[I].name,D=x[I].value;Array.isArray(D)?D.forEach(function(G){q.push([L,G])}):q.push([L,D])}),d._mode==="fetch"){var B=null;if(b.abortController){var $=new AbortController;B=$.signal,d._fetchAbortController=$,"requestTimeout"in g&&g.requestTimeout!==0&&(d._fetchTimer=commonjsGlobal.setTimeout(function(){d.emit("requestTimeout"),d._fetchAbortController&&d._fetchAbortController.abort()},g.requestTimeout))}commonjsGlobal.fetch(d._opts.url,{method:d._opts.method,headers:q,body:R||void 0,mode:"cors",credentials:g.withCredentials?"include":"same-origin",signal:B}).then(function(I){d._fetchResponse=I,d._resetTimers(!1),d._connect()},function(I){d._resetTimers(!0),d._destroyed||d.emit("error",I)})}else{var k=d._xhr=new commonjsGlobal.XMLHttpRequest;try{k.open(d._opts.method,d._opts.url,!0)}catch(I){process$1.nextTick(function(){d.emit("error",I)});return}"responseType"in k&&(k.responseType=d._mode),"withCredentials"in k&&(k.withCredentials=!!g.withCredentials),d._mode==="text"&&"overrideMimeType"in k&&k.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in g&&(k.timeout=g.requestTimeout,k.ontimeout=function(){d.emit("requestTimeout")}),q.forEach(function(I){k.setRequestHeader(I[0],I[1])}),d._response=null,k.onreadystatechange=function(){switch(k.readyState){case a.LOADING:case a.DONE:d._onXHRProgress();break}},d._mode==="moz-chunked-arraybuffer"&&(k.onprogress=function(){d._onXHRProgress()}),k.onerror=function(){d._destroyed||(d._resetTimers(!0),d.emit("error",new Error("XHR error")))};try{k.send(R)}catch(I){process$1.nextTick(function(){d.emit("error",I)});return}}}};function y(d){try{var g=d.status;return g!==null&&g!==0}catch{return!1}}v.prototype._onXHRProgress=function(){var d=this;d._resetTimers(!1),!(!y(d._xhr)||d._destroyed)&&(d._response||d._connect(),d._response._onXHRProgress(d._resetTimers.bind(d)))},v.prototype._connect=function(){var d=this;d._destroyed||(d._response=new E(d._xhr,d._fetchResponse,d._mode,d._resetTimers.bind(d)),d._response.on("error",function(g){d.emit("error",g)}),d.emit("response",d._response))},v.prototype._write=function(d,g,x){var R=this;R._body.push(d),x()},v.prototype._resetTimers=function(d){var g=this;commonjsGlobal.clearTimeout(g._socketTimer),g._socketTimer=null,d?(commonjsGlobal.clearTimeout(g._fetchTimer),g._fetchTimer=null):g._socketTimeout&&(g._socketTimer=commonjsGlobal.setTimeout(function(){g.emit("timeout")},g._socketTimeout))},v.prototype.abort=v.prototype.destroy=function(d){var g=this;g._destroyed=!0,g._resetTimers(!0),g._response&&(g._response._destroyed=!0),g._xhr?g._xhr.abort():g._fetchAbortController&&g._fetchAbortController.abort(),d&&g.emit("error",d)},v.prototype.end=function(d,g,x){var R=this;typeof d=="function"&&(x=d,d=void 0),p.Writable.prototype.end.call(R,d,g,x)},v.prototype.setTimeout=function(d,g){var x=this;g&&x.once("timeout",g),x._socketTimeout=d,x._resetTimers(!1)},v.prototype.flushHeaders=function(){},v.prototype.setNoDelay=function(){},v.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return request.exports}var immutable,hasRequiredImmutable;function requireImmutable(){if(hasRequiredImmutable)return immutable;hasRequiredImmutable=1,immutable=_;var b=Object.prototype.hasOwnProperty;function _(){for(var S={},p=0;p<arguments.length;p++){var E=arguments[p];for(var a in E)b.call(E,a)&&(S[a]=E[a])}return S}return immutable}var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),browser}var punycode$2={exports:{}};var punycode$1=punycode$2.exports,hasRequiredPunycode;function requirePunycode(){return hasRequiredPunycode||(hasRequiredPunycode=1,(function(b,_){(function(S){var p=_&&!_.nodeType&&_,E=b&&!b.nodeType&&b,a=typeof commonjsGlobal=="object"&&commonjsGlobal;(a.global===a||a.window===a||a.self===a)&&(S=a);var w,v=2147483647,y=36,m=1,d=26,g=38,x=700,R=72,q=128,B="-",$=/^xn--/,k=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=y-m,G=Math.floor,X=String.fromCharCode,te;function ie(r){throw new RangeError(L[r])}function ee(r,h){for(var M=r.length,T=[];M--;)T[M]=h(r[M]);return T}function ue(r,h){var M=r.split("@"),T="";M.length>1&&(T=M[0]+"@",r=M[1]),r=r.replace(I,".");var N=r.split("."),Q=ee(N,h).join(".");return T+Q}function c(r){for(var h=[],M=0,T=r.length,N,Q;M<T;)N=r.charCodeAt(M++),N>=55296&&N<=56319&&M<T?(Q=r.charCodeAt(M++),(Q&64512)==56320?h.push(((N&1023)<<10)+(Q&1023)+65536):(h.push(N),M--)):h.push(N);return h}function e(r){return ee(r,function(h){var M="";return h>65535&&(h-=65536,M+=X(h>>>10&1023|55296),h=56320|h&1023),M+=X(h),M}).join("")}function t(r){return r-48<10?r-22:r-65<26?r-65:r-97<26?r-97:y}function n(r,h){return r+22+75*(r<26)-((h!=0)<<5)}function f(r,h,M){var T=0;for(r=M?G(r/x):r>>1,r+=G(r/h);r>D*d>>1;T+=y)r=G(r/D);return G(T+(D+1)*r/(r+g))}function s(r){var h=[],M=r.length,T,N=0,Q=q,K=R,A,O,W,Y,Z,j,ne,Re,le;for(A=r.lastIndexOf(B),A<0&&(A=0),O=0;O<A;++O)r.charCodeAt(O)>=128&&ie("not-basic"),h.push(r.charCodeAt(O));for(W=A>0?A+1:0;W<M;){for(Y=N,Z=1,j=y;W>=M&&ie("invalid-input"),ne=t(r.charCodeAt(W++)),(ne>=y||ne>G((v-N)/Z))&&ie("overflow"),N+=ne*Z,Re=j<=K?m:j>=K+d?d:j-K,!(ne<Re);j+=y)le=y-Re,Z>G(v/le)&&ie("overflow"),Z*=le;T=h.length+1,K=f(N-Y,T,Y==0),G(N/T)>v-Q&&ie("overflow"),Q+=G(N/T),N%=T,h.splice(N++,0,Q)}return e(h)}function u(r){var h,M,T,N,Q,K,A,O,W,Y,Z,j=[],ne,Re,le,de;for(r=c(r),ne=r.length,h=q,M=0,Q=R,K=0;K<ne;++K)Z=r[K],Z<128&&j.push(X(Z));for(T=N=j.length,N&&j.push(B);T<ne;){for(A=v,K=0;K<ne;++K)Z=r[K],Z>=h&&Z<A&&(A=Z);for(Re=T+1,A-h>G((v-M)/Re)&&ie("overflow"),M+=(A-h)*Re,h=A,K=0;K<ne;++K)if(Z=r[K],Z<h&&++M>v&&ie("overflow"),Z==h){for(O=M,W=y;Y=W<=Q?m:W>=Q+d?d:W-Q,!(O<Y);W+=y)de=O-Y,le=y-Y,j.push(X(n(Y+de%le,0))),O=G(de/le);j.push(X(n(O,0))),Q=f(M,Re,T==N),M=0,++T}++M,++h}return j.join("")}function l(r){return ue(r,function(h){return $.test(h)?s(h.slice(4).toLowerCase()):h})}function o(r){return ue(r,function(h){return k.test(h)?"xn--"+u(h):h})}if(w={version:"1.4.1",ucs2:{decode:c,encode:e},decode:s,encode:u,toASCII:o,toUnicode:l},p&&E)if(b.exports==p)E.exports=w;else for(te in w)w.hasOwnProperty(te)&&(p[te]=w[te]);else S.punycode=w})(punycode$1)})(punycode$2,punycode$2.exports)),punycode$2.exports}var punycodeExports=requirePunycode();const require$$0$1=getDefaultExportFromCjs(punycodeExports),__viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var objectInspect,hasRequiredObjectInspect;function requireObjectInspect(){if(hasRequiredObjectInspect)return objectInspect;hasRequiredObjectInspect=1;var b=typeof Map=="function"&&Map.prototype,_=Object.getOwnPropertyDescriptor&&b?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,S=b&&_&&typeof _.get=="function"?_.get:null,p=b&&Map.prototype.forEach,E=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&E?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,w=E&&a&&typeof a.get=="function"?a.get:null,v=E&&Set.prototype.forEach,y=typeof WeakMap=="function"&&WeakMap.prototype,m=y?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,g=d?WeakSet.prototype.has:null,x=typeof WeakRef=="function"&&WeakRef.prototype,R=x?WeakRef.prototype.deref:null,q=Boolean.prototype.valueOf,B=Object.prototype.toString,$=Function.prototype.toString,k=String.prototype.match,I=String.prototype.slice,L=String.prototype.replace,D=String.prototype.toUpperCase,G=String.prototype.toLowerCase,X=RegExp.prototype.test,te=Array.prototype.concat,ie=Array.prototype.join,ee=Array.prototype.slice,ue=Math.floor,c=typeof BigInt=="function"?BigInt.prototype.valueOf:null,e=Object.getOwnPropertySymbols,t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,n=typeof Symbol=="function"&&typeof Symbol.iterator=="object",f=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===n||!0)?Symbol.toStringTag:null,s=Object.prototype.propertyIsEnumerable,u=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(re){return re.__proto__}:null);function l(re,oe){if(re===1/0||re===-1/0||re!==re||re&&re>-1e3&&re<1e3||X.call(/e/,oe))return oe;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof re=="number"){var ce=re<0?-ue(-re):ue(re);if(ce!==re){var we=String(ce),Ce=I.call(oe,we.length+1);return L.call(we,Oe,"$&_")+"."+L.call(L.call(Ce,/([0-9]{3})/g,"$&_"),/_$/,"")}}return L.call(oe,Oe,"$&_")}var o=require$$0,r=o.custom,h=Re(r)?r:null,M={__proto__:null,double:'"',single:"'"},T={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};objectInspect=function re(oe,Oe,ce,we){var Ce=Oe||{};if(Pe(Ce,"quoteStyle")&&!Pe(M,Ce.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Pe(Ce,"maxStringLength")&&(typeof Ce.maxStringLength=="number"?Ce.maxStringLength<0&&Ce.maxStringLength!==1/0:Ce.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var qe=Pe(Ce,"customInspect")?Ce.customInspect:!0;if(typeof qe!="boolean"&&qe!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Pe(Ce,"indent")&&Ce.indent!==null&&Ce.indent!==" "&&!(parseInt(Ce.indent,10)===Ce.indent&&Ce.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Pe(Ce,"numericSeparator")&&typeof Ce.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Te=Ce.numericSeparator;if(typeof oe>"u")return"undefined";if(oe===null)return"null";if(typeof oe=="boolean")return oe?"true":"false";if(typeof oe=="string")return Se(oe,Ce);if(typeof oe=="number"){if(oe===0)return 1/0/oe>0?"0":"-0";var je=String(oe);return Te?l(oe,je):je}if(typeof oe=="bigint"){var Be=String(oe)+"n";return Te?l(oe,Be):Be}var $e=typeof Ce.depth>"u"?5:Ce.depth;if(typeof ce>"u"&&(ce=0),ce>=$e&&$e>0&&typeof oe=="object")return A(oe)?"[Array]":"[Object]";var ze=V(Ce,ce);if(typeof we>"u")we=[];else if(Le(we,oe)>=0)return"[Circular]";function H(Ke,Ze,Ye){if(Ze&&(we=ee.call(we),we.push(Ze)),Ye){var Xe={depth:Ce.depth};return Pe(Ce,"quoteStyle")&&(Xe.quoteStyle=Ce.quoteStyle),re(Ke,Xe,ce+1,we)}return re(Ke,Ce,ce+1,we)}if(typeof oe=="function"&&!W(oe)){var P=he(oe),U=pe(oe,H);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(U.length>0?" { "+ie.call(U,", ")+" }":"")}if(Re(oe)){var J=n?L.call(String(oe),/^(Symbol\(.*\))_[^)]*$/,"$1"):t.call(oe);return typeof oe=="object"&&!n?He(J):J}if(Ue(oe)){for(var fe="<"+G.call(String(oe.nodeName)),be=oe.attributes||[],se=0;se<be.length;se++)fe+=" "+be[se].name+"="+N(Q(be[se].value),"double",Ce);return fe+=">",oe.childNodes&&oe.childNodes.length&&(fe+="..."),fe+="</"+G.call(String(oe.nodeName))+">",fe}if(A(oe)){if(oe.length===0)return"[]";var _e=pe(oe,H);return ze&&!F(_e)?"["+ae(_e,ze)+"]":"[ "+ie.call(_e,", ")+" ]"}if(Y(oe)){var Ne=pe(oe,H);return!("cause"in Error.prototype)&&"cause"in oe&&!s.call(oe,"cause")?"{ ["+String(oe)+"] "+ie.call(te.call("[cause]: "+H(oe.cause),Ne),", ")+" }":Ne.length===0?"["+String(oe)+"]":"{ ["+String(oe)+"] "+ie.call(Ne,", ")+" }"}if(typeof oe=="object"&&qe){if(h&&typeof oe[h]=="function"&&o)return o(oe,{depth:$e-ce});if(qe!=="symbol"&&typeof oe.inspect=="function")return oe.inspect()}if(ve(oe)){var Me=[];return p&&p.call(oe,function(Ke,Ze){Me.push(H(Ze,oe,!0)+" => "+H(Ke,oe))}),C("Map",S.call(oe),Me,ze)}if(ye(oe)){var Ee=[];return v&&v.call(oe,function(Ke){Ee.push(H(Ke,oe))}),C("Set",w.call(oe),Ee,ze)}if(ge(oe))return z("WeakMap");if(xe(oe))return z("WeakSet");if(De(oe))return z("WeakRef");if(j(oe))return He(H(Number(oe)));if(le(oe))return He(H(c.call(oe)));if(ne(oe))return He(q.call(oe));if(Z(oe))return He(H(String(oe)));if(typeof window<"u"&&oe===window)return"{ [object Window] }";if(typeof globalThis<"u"&&oe===globalThis||typeof commonjsGlobal<"u"&&oe===commonjsGlobal)return"{ [object globalThis] }";if(!O(oe)&&!W(oe)){var Fe=pe(oe,H),Ie=u?u(oe)===Object.prototype:oe instanceof Object||oe.constructor===Object,ke=oe instanceof Object?"":"null prototype",We=!Ie&&f&&Object(oe)===oe&&f in oe?I.call(me(oe),8,-1):ke?"Object":"",Ge=Ie||typeof oe.constructor!="function"?"":oe.constructor.name?oe.constructor.name+" ":"",Ve=Ge+(We||ke?"["+ie.call(te.call([],We||[],ke||[]),": ")+"] ":"");return Fe.length===0?Ve+"{}":ze?Ve+"{"+ae(Fe,ze)+"}":Ve+"{ "+ie.call(Fe,", ")+" }"}return String(oe)};function N(re,oe,Oe){var ce=Oe.quoteStyle||oe,we=M[ce];return we+re+we}function Q(re){return L.call(String(re),/"/g,""")}function K(re){return!f||!(typeof re=="object"&&(f in re||typeof re[f]<"u"))}function A(re){return me(re)==="[object Array]"&&K(re)}function O(re){return me(re)==="[object Date]"&&K(re)}function W(re){return me(re)==="[object RegExp]"&&K(re)}function Y(re){return me(re)==="[object Error]"&&K(re)}function Z(re){return me(re)==="[object String]"&&K(re)}function j(re){return me(re)==="[object Number]"&&K(re)}function ne(re){return me(re)==="[object Boolean]"&&K(re)}function Re(re){if(n)return re&&typeof re=="object"&&re instanceof Symbol;if(typeof re=="symbol")return!0;if(!re||typeof re!="object"||!t)return!1;try{return t.call(re),!0}catch{}return!1}function le(re){if(!re||typeof re!="object"||!c)return!1;try{return c.call(re),!0}catch{}return!1}var de=Object.prototype.hasOwnProperty||function(re){return re in this};function Pe(re,oe){return de.call(re,oe)}function me(re){return B.call(re)}function he(re){if(re.name)return re.name;var oe=k.call($.call(re),/^function\s*([\w$]+)/);return oe?oe[1]:null}function Le(re,oe){if(re.indexOf)return re.indexOf(oe);for(var Oe=0,ce=re.length;Oe<ce;Oe++)if(re[Oe]===oe)return Oe;return-1}function ve(re){if(!S||!re||typeof re!="object")return!1;try{S.call(re);try{w.call(re)}catch{return!0}return re instanceof Map}catch{}return!1}function ge(re){if(!m||!re||typeof re!="object")return!1;try{m.call(re,m);try{g.call(re,g)}catch{return!0}return re instanceof WeakMap}catch{}return!1}function De(re){if(!R||!re||typeof re!="object")return!1;try{return R.call(re),!0}catch{}return!1}function ye(re){if(!w||!re||typeof re!="object")return!1;try{w.call(re);try{S.call(re)}catch{return!0}return re instanceof Set}catch{}return!1}function xe(re){if(!g||!re||typeof re!="object")return!1;try{g.call(re,g);try{m.call(re,m)}catch{return!0}return re instanceof WeakSet}catch{}return!1}function Ue(re){return!re||typeof re!="object"?!1:typeof HTMLElement<"u"&&re instanceof HTMLElement?!0:typeof re.nodeName=="string"&&typeof re.getAttribute=="function"}function Se(re,oe){if(re.length>oe.maxStringLength){var Oe=re.length-oe.maxStringLength,ce="... "+Oe+" more character"+(Oe>1?"s":"");return Se(I.call(re,0,oe.maxStringLength),oe)+ce}var we=T[oe.quoteStyle||"single"];we.lastIndex=0;var Ce=L.call(L.call(re,we,"\\$1"),/[\x00-\x1f]/g,Ae);return N(Ce,"single",oe)}function Ae(re){var oe=re.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[oe];return Oe?"\\"+Oe:"\\x"+(oe<16?"0":"")+D.call(oe.toString(16))}function He(re){return"Object("+re+")"}function z(re){return re+" { ? }"}function C(re,oe,Oe,ce){var we=ce?ae(Oe,ce):ie.call(Oe,", ");return re+" ("+oe+") {"+we+"}"}function F(re){for(var oe=0;oe<re.length;oe++)if(Le(re[oe],`
|
|
18
|
-
`)>=0)return!1;return!0}function V(re,oe){var Oe;if(re.indent===" ")Oe=" ";else if(typeof re.indent=="number"&&re.indent>0)Oe=ie.call(Array(re.indent+1)," ");else return null;return{base:Oe,prev:ie.call(Array(oe+1),Oe)}}function ae(re,oe){if(re.length===0)return"";var Oe=`
|
|
19
|
-
`+oe.prev+oe.base;return Oe+ie.call(re,","+Oe)+`
|
|
20
|
-
`+oe.prev}function pe(re,oe){var Oe=A(re),ce=[];if(Oe){ce.length=re.length;for(var we=0;we<re.length;we++)ce[we]=Pe(re,we)?oe(re[we],re):""}var Ce=typeof e=="function"?e(re):[],qe;if(n){qe={};for(var Te=0;Te<Ce.length;Te++)qe["$"+Ce[Te]]=Ce[Te]}for(var je in re)Pe(re,je)&&(Oe&&String(Number(je))===je&&je<re.length||n&&qe["$"+je]instanceof Symbol||(X.call(/[^\w$]/,je)?ce.push(oe(je,re)+": "+oe(re[je],re)):ce.push(je+": "+oe(re[je],re))));if(typeof e=="function")for(var Be=0;Be<Ce.length;Be++)s.call(re,Ce[Be])&&ce.push("["+oe(Ce[Be])+"]: "+oe(re[Ce[Be]],re));return ce}return objectInspect}var sideChannelList,hasRequiredSideChannelList;function requireSideChannelList(){if(hasRequiredSideChannelList)return sideChannelList;hasRequiredSideChannelList=1;var b=requireObjectInspect(),_=requireType(),S=function(v,y,m){for(var d=v,g;(g=d.next)!=null;d=g)if(g.key===y)return d.next=g.next,m||(g.next=v.next,v.next=g),g},p=function(v,y){if(v){var m=S(v,y);return m&&m.value}},E=function(v,y,m){var d=S(v,y);d?d.value=m:v.next={key:y,next:v.next,value:m}},a=function(v,y){return v?!!S(v,y):!1},w=function(v,y){if(v)return S(v,y,!0)};return sideChannelList=function(){var y,m={assert:function(d){if(!m.has(d))throw new _("Side channel does not contain "+b(d))},delete:function(d){var g=y&&y.next,x=w(y,d);return x&&g&&g===x&&(y=void 0),!!x},get:function(d){return p(y,d)},has:function(d){return a(y,d)},set:function(d,g){y||(y={next:void 0}),E(y,d,g)}};return m},sideChannelList}var sideChannelMap,hasRequiredSideChannelMap;function requireSideChannelMap(){if(hasRequiredSideChannelMap)return sideChannelMap;hasRequiredSideChannelMap=1;var b=requireGetIntrinsic(),_=requireCallBound(),S=requireObjectInspect(),p=requireType(),E=b("%Map%",!0),a=_("Map.prototype.get",!0),w=_("Map.prototype.set",!0),v=_("Map.prototype.has",!0),y=_("Map.prototype.delete",!0),m=_("Map.prototype.size",!0);return sideChannelMap=!!E&&function(){var g,x={assert:function(R){if(!x.has(R))throw new p("Side channel does not contain "+S(R))},delete:function(R){if(g){var q=y(g,R);return m(g)===0&&(g=void 0),q}return!1},get:function(R){if(g)return a(g,R)},has:function(R){return g?v(g,R):!1},set:function(R,q){g||(g=new E),w(g,R,q)}};return x},sideChannelMap}var sideChannelWeakmap,hasRequiredSideChannelWeakmap;function requireSideChannelWeakmap(){if(hasRequiredSideChannelWeakmap)return sideChannelWeakmap;hasRequiredSideChannelWeakmap=1;var b=requireGetIntrinsic(),_=requireCallBound(),S=requireObjectInspect(),p=requireSideChannelMap(),E=requireType(),a=b("%WeakMap%",!0),w=_("WeakMap.prototype.get",!0),v=_("WeakMap.prototype.set",!0),y=_("WeakMap.prototype.has",!0),m=_("WeakMap.prototype.delete",!0);return sideChannelWeakmap=a?function(){var g,x,R={assert:function(q){if(!R.has(q))throw new E("Side channel does not contain "+S(q))},delete:function(q){if(a&&q&&(typeof q=="object"||typeof q=="function")){if(g)return m(g,q)}else if(p&&x)return x.delete(q);return!1},get:function(q){return a&&q&&(typeof q=="object"||typeof q=="function")&&g?w(g,q):x&&x.get(q)},has:function(q){return a&&q&&(typeof q=="object"||typeof q=="function")&&g?y(g,q):!!x&&x.has(q)},set:function(q,B){a&&q&&(typeof q=="object"||typeof q=="function")?(g||(g=new a),v(g,q,B)):p&&(x||(x=p()),x.set(q,B))}};return R}:p,sideChannelWeakmap}var sideChannel,hasRequiredSideChannel;function requireSideChannel(){if(hasRequiredSideChannel)return sideChannel;hasRequiredSideChannel=1;var b=requireType(),_=requireObjectInspect(),S=requireSideChannelList(),p=requireSideChannelMap(),E=requireSideChannelWeakmap(),a=E||p||S;return sideChannel=function(){var v,y={assert:function(m){if(!y.has(m))throw new b("Side channel does not contain "+_(m))},delete:function(m){return!!v&&v.delete(m)},get:function(m){return v&&v.get(m)},has:function(m){return!!v&&v.has(m)},set:function(m,d){v||(v=a()),v.set(m,d)}};return y},sideChannel}var formats,hasRequiredFormats;function requireFormats(){if(hasRequiredFormats)return formats;hasRequiredFormats=1;var b=String.prototype.replace,_=/%20/g,S={RFC1738:"RFC1738",RFC3986:"RFC3986"};return formats={default:S.RFC3986,formatters:{RFC1738:function(p){return b.call(p,_,"+")},RFC3986:function(p){return String(p)}},RFC1738:S.RFC1738,RFC3986:S.RFC3986},formats}var utils,hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var b=requireFormats(),_=requireSideChannel(),S=Object.prototype.hasOwnProperty,p=Array.isArray,E=_(),a=function(te,ie){return E.set(te,ie),te},w=function(te){return E.has(te)},v=function(te){return E.get(te)},y=function(te,ie){E.set(te,ie)},m=(function(){for(var X=[],te=0;te<256;++te)X.push("%"+((te<16?"0":"")+te.toString(16)).toUpperCase());return X})(),d=function(te){for(;te.length>1;){var ie=te.pop(),ee=ie.obj[ie.prop];if(p(ee)){for(var ue=[],c=0;c<ee.length;++c)typeof ee[c]<"u"&&ue.push(ee[c]);ie.obj[ie.prop]=ue}}},g=function(te,ie){for(var ee=ie&&ie.plainObjects?{__proto__:null}:{},ue=0;ue<te.length;++ue)typeof te[ue]<"u"&&(ee[ue]=te[ue]);return ee},x=function X(te,ie,ee){if(!ie)return te;if(typeof ie!="object"&&typeof ie!="function"){if(p(te))te.push(ie);else if(te&&typeof te=="object")if(w(te)){var ue=v(te)+1;te[ue]=ie,y(te,ue)}else(ee&&(ee.plainObjects||ee.allowPrototypes)||!S.call(Object.prototype,ie))&&(te[ie]=!0);else return[te,ie];return te}if(!te||typeof te!="object"){if(w(ie)){for(var c=Object.keys(ie),e=ee&&ee.plainObjects?{__proto__:null,0:te}:{0:te},t=0;t<c.length;t++){var n=parseInt(c[t],10);e[n+1]=ie[c[t]]}return a(e,v(ie)+1)}return[te].concat(ie)}var f=te;return p(te)&&!p(ie)&&(f=g(te,ee)),p(te)&&p(ie)?(ie.forEach(function(s,u){if(S.call(te,u)){var l=te[u];l&&typeof l=="object"&&s&&typeof s=="object"?te[u]=X(l,s,ee):te.push(s)}else te[u]=s}),te):Object.keys(ie).reduce(function(s,u){var l=ie[u];return S.call(s,u)?s[u]=X(s[u],l,ee):s[u]=l,s},f)},R=function(te,ie){return Object.keys(ie).reduce(function(ee,ue){return ee[ue]=ie[ue],ee},te)},q=function(X,te,ie){var ee=X.replace(/\+/g," ");if(ie==="iso-8859-1")return ee.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(ee)}catch{return ee}},B=1024,$=function(te,ie,ee,ue,c){if(te.length===0)return te;var e=te;if(typeof te=="symbol"?e=Symbol.prototype.toString.call(te):typeof te!="string"&&(e=String(te)),ee==="iso-8859-1")return escape(e).replace(/%u[0-9a-f]{4}/gi,function(o){return"%26%23"+parseInt(o.slice(2),16)+"%3B"});for(var t="",n=0;n<e.length;n+=B){for(var f=e.length>=B?e.slice(n,n+B):e,s=[],u=0;u<f.length;++u){var l=f.charCodeAt(u);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||c===b.RFC1738&&(l===40||l===41)){s[s.length]=f.charAt(u);continue}if(l<128){s[s.length]=m[l];continue}if(l<2048){s[s.length]=m[192|l>>6]+m[128|l&63];continue}if(l<55296||l>=57344){s[s.length]=m[224|l>>12]+m[128|l>>6&63]+m[128|l&63];continue}u+=1,l=65536+((l&1023)<<10|f.charCodeAt(u)&1023),s[s.length]=m[240|l>>18]+m[128|l>>12&63]+m[128|l>>6&63]+m[128|l&63]}t+=s.join("")}return t},k=function(te){for(var ie=[{obj:{o:te},prop:"o"}],ee=[],ue=0;ue<ie.length;++ue)for(var c=ie[ue],e=c.obj[c.prop],t=Object.keys(e),n=0;n<t.length;++n){var f=t[n],s=e[f];typeof s=="object"&&s!==null&&ee.indexOf(s)===-1&&(ie.push({obj:e,prop:f}),ee.push(s))}return d(ie),te},I=function(te){return Object.prototype.toString.call(te)==="[object RegExp]"},L=function(te){return!te||typeof te!="object"?!1:!!(te.constructor&&te.constructor.isBuffer&&te.constructor.isBuffer(te))},D=function(te,ie,ee,ue){if(w(te)){var c=v(te)+1;return te[c]=ie,y(te,c),te}var e=[].concat(te,ie);return e.length>ee?a(g(e,{plainObjects:ue}),e.length-1):e},G=function(te,ie){if(p(te)){for(var ee=[],ue=0;ue<te.length;ue+=1)ee.push(ie(te[ue]));return ee}return ie(te)};return utils={arrayToObject:g,assign:R,combine:D,compact:k,decode:q,encode:$,isBuffer:L,isOverflow:w,isRegExp:I,maybeMap:G,merge:x},utils}var stringify_1,hasRequiredStringify;function requireStringify(){if(hasRequiredStringify)return stringify_1;hasRequiredStringify=1;var b=requireSideChannel(),_=requireUtils(),S=requireFormats(),p=Object.prototype.hasOwnProperty,E={brackets:function($){return $+"[]"},comma:"comma",indices:function($,k){return $+"["+k+"]"},repeat:function($){return $}},a=Array.isArray,w=Array.prototype.push,v=function(B,$){w.apply(B,a($)?$:[$])},y=Date.prototype.toISOString,m=S.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:_.encode,encodeValuesOnly:!1,filter:void 0,format:m,formatter:S.formatters[m],indices:!1,serializeDate:function($){return y.call($)},skipNulls:!1,strictNullHandling:!1},g=function($){return typeof $=="string"||typeof $=="number"||typeof $=="boolean"||typeof $=="symbol"||typeof $=="bigint"},x={},R=function B($,k,I,L,D,G,X,te,ie,ee,ue,c,e,t,n,f,s,u){for(var l=$,o=u,r=0,h=!1;(o=o.get(x))!==void 0&&!h;){var M=o.get($);if(r+=1,typeof M<"u"){if(M===r)throw new RangeError("Cyclic object value");h=!0}typeof o.get(x)>"u"&&(r=0)}if(typeof ee=="function"?l=ee(k,l):l instanceof Date?l=e(l):I==="comma"&&a(l)&&(l=_.maybeMap(l,function(le){return le instanceof Date?e(le):le})),l===null){if(G)return ie&&!f?ie(k,d.encoder,s,"key",t):k;l=""}if(g(l)||_.isBuffer(l)){if(ie){var T=f?k:ie(k,d.encoder,s,"key",t);return[n(T)+"="+n(ie(l,d.encoder,s,"value",t))]}return[n(k)+"="+n(String(l))]}var N=[];if(typeof l>"u")return N;var Q;if(I==="comma"&&a(l))f&&ie&&(l=_.maybeMap(l,ie)),Q=[{value:l.length>0?l.join(",")||null:void 0}];else if(a(ee))Q=ee;else{var K=Object.keys(l);Q=ue?K.sort(ue):K}var A=te?String(k).replace(/\./g,"%2E"):String(k),O=L&&a(l)&&l.length===1?A+"[]":A;if(D&&a(l)&&l.length===0)return O+"[]";for(var W=0;W<Q.length;++W){var Y=Q[W],Z=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:l[Y];if(!(X&&Z===null)){var j=c&&te?String(Y).replace(/\./g,"%2E"):String(Y),ne=a(l)?typeof I=="function"?I(O,j):O:O+(c?"."+j:"["+j+"]");u.set($,r);var Re=b();Re.set(x,u),v(N,B(Z,ne,I,L,D,G,X,te,I==="comma"&&f&&a(l)?null:ie,ee,ue,c,e,t,n,f,s,Re))}}return N},q=function($){if(!$)return d;if(typeof $.allowEmptyArrays<"u"&&typeof $.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof $.encodeDotInKeys<"u"&&typeof $.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if($.encoder!==null&&typeof $.encoder<"u"&&typeof $.encoder!="function")throw new TypeError("Encoder has to be a function.");var k=$.charset||d.charset;if(typeof $.charset<"u"&&$.charset!=="utf-8"&&$.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var I=S.default;if(typeof $.format<"u"){if(!p.call(S.formatters,$.format))throw new TypeError("Unknown format option provided.");I=$.format}var L=S.formatters[I],D=d.filter;(typeof $.filter=="function"||a($.filter))&&(D=$.filter);var G;if($.arrayFormat in E?G=$.arrayFormat:"indices"in $?G=$.indices?"indices":"repeat":G=d.arrayFormat,"commaRoundTrip"in $&&typeof $.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var X=typeof $.allowDots>"u"?$.encodeDotInKeys===!0?!0:d.allowDots:!!$.allowDots;return{addQueryPrefix:typeof $.addQueryPrefix=="boolean"?$.addQueryPrefix:d.addQueryPrefix,allowDots:X,allowEmptyArrays:typeof $.allowEmptyArrays=="boolean"?!!$.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:G,charset:k,charsetSentinel:typeof $.charsetSentinel=="boolean"?$.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!$.commaRoundTrip,delimiter:typeof $.delimiter>"u"?d.delimiter:$.delimiter,encode:typeof $.encode=="boolean"?$.encode:d.encode,encodeDotInKeys:typeof $.encodeDotInKeys=="boolean"?$.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof $.encoder=="function"?$.encoder:d.encoder,encodeValuesOnly:typeof $.encodeValuesOnly=="boolean"?$.encodeValuesOnly:d.encodeValuesOnly,filter:D,format:I,formatter:L,serializeDate:typeof $.serializeDate=="function"?$.serializeDate:d.serializeDate,skipNulls:typeof $.skipNulls=="boolean"?$.skipNulls:d.skipNulls,sort:typeof $.sort=="function"?$.sort:null,strictNullHandling:typeof $.strictNullHandling=="boolean"?$.strictNullHandling:d.strictNullHandling}};return stringify_1=function(B,$){var k=B,I=q($),L,D;typeof I.filter=="function"?(D=I.filter,k=D("",k)):a(I.filter)&&(D=I.filter,L=D);var G=[];if(typeof k!="object"||k===null)return"";var X=E[I.arrayFormat],te=X==="comma"&&I.commaRoundTrip;L||(L=Object.keys(k)),I.sort&&L.sort(I.sort);for(var ie=b(),ee=0;ee<L.length;++ee){var ue=L[ee],c=k[ue];I.skipNulls&&c===null||v(G,R(c,ue,X,te,I.allowEmptyArrays,I.strictNullHandling,I.skipNulls,I.encodeDotInKeys,I.encode?I.encoder:null,I.filter,I.sort,I.allowDots,I.serializeDate,I.format,I.formatter,I.encodeValuesOnly,I.charset,ie))}var e=G.join(I.delimiter),t=I.addQueryPrefix===!0?"?":"";return I.charsetSentinel&&(I.charset==="iso-8859-1"?t+="utf8=%26%2310003%3B&":t+="utf8=%E2%9C%93&"),e.length>0?t+e:""},stringify_1}var parse$1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse$1;hasRequiredParse=1;var b=requireUtils(),_=Object.prototype.hasOwnProperty,S=Array.isArray,p={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:b.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},E=function(R){return R.replace(/&#(\d+);/g,function(q,B){return String.fromCharCode(parseInt(B,10))})},a=function(R,q,B){if(R&&typeof R=="string"&&q.comma&&R.indexOf(",")>-1)return R.split(",");if(q.throwOnLimitExceeded&&B>=q.arrayLimit)throw new RangeError("Array limit exceeded. Only "+q.arrayLimit+" element"+(q.arrayLimit===1?"":"s")+" allowed in an array.");return R},w="utf8=%26%2310003%3B",v="utf8=%E2%9C%93",y=function(q,B){var $={__proto__:null},k=B.ignoreQueryPrefix?q.replace(/^\?/,""):q;k=k.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var I=B.parameterLimit===1/0?void 0:B.parameterLimit,L=k.split(B.delimiter,B.throwOnLimitExceeded?I+1:I);if(B.throwOnLimitExceeded&&L.length>I)throw new RangeError("Parameter limit exceeded. Only "+I+" parameter"+(I===1?"":"s")+" allowed.");var D=-1,G,X=B.charset;if(B.charsetSentinel)for(G=0;G<L.length;++G)L[G].indexOf("utf8=")===0&&(L[G]===v?X="utf-8":L[G]===w&&(X="iso-8859-1"),D=G,G=L.length);for(G=0;G<L.length;++G)if(G!==D){var te=L[G],ie=te.indexOf("]="),ee=ie===-1?te.indexOf("="):ie+1,ue,c;if(ee===-1?(ue=B.decoder(te,p.decoder,X,"key"),c=B.strictNullHandling?null:""):(ue=B.decoder(te.slice(0,ee),p.decoder,X,"key"),ue!==null&&(c=b.maybeMap(a(te.slice(ee+1),B,S($[ue])?$[ue].length:0),function(t){return B.decoder(t,p.decoder,X,"value")}))),c&&B.interpretNumericEntities&&X==="iso-8859-1"&&(c=E(String(c))),te.indexOf("[]=")>-1&&(c=S(c)?[c]:c),ue!==null){var e=_.call($,ue);e&&B.duplicates==="combine"?$[ue]=b.combine($[ue],c,B.arrayLimit,B.plainObjects):(!e||B.duplicates==="last")&&($[ue]=c)}}return $},m=function(R,q,B,$){var k=0;if(R.length>0&&R[R.length-1]==="[]"){var I=R.slice(0,-1).join("");k=Array.isArray(q)&&q[I]?q[I].length:0}for(var L=$?q:a(q,B,k),D=R.length-1;D>=0;--D){var G,X=R[D];if(X==="[]"&&B.parseArrays)b.isOverflow(L)?G=L:G=B.allowEmptyArrays&&(L===""||B.strictNullHandling&&L===null)?[]:b.combine([],L,B.arrayLimit,B.plainObjects);else{G=B.plainObjects?{__proto__:null}:{};var te=X.charAt(0)==="["&&X.charAt(X.length-1)==="]"?X.slice(1,-1):X,ie=B.decodeDotInKeys?te.replace(/%2E/g,"."):te,ee=parseInt(ie,10);!B.parseArrays&&ie===""?G={0:L}:!isNaN(ee)&&X!==ie&&String(ee)===ie&&ee>=0&&B.parseArrays&&ee<=B.arrayLimit?(G=[],G[ee]=L):ie!=="__proto__"&&(G[ie]=L)}L=G}return L},d=function(q,B){var $=B.allowDots?q.replace(/\.([^.[]+)/g,"[$1]"):q;if(B.depth<=0)return!B.plainObjects&&_.call(Object.prototype,$)&&!B.allowPrototypes?void 0:[$];var k=/(\[[^[\]]*])/,I=/(\[[^[\]]*])/g,L=k.exec($),D=L?$.slice(0,L.index):$,G=[];if(D){if(!B.plainObjects&&_.call(Object.prototype,D)&&!B.allowPrototypes)return;G.push(D)}for(var X=0;(L=I.exec($))!==null&&X<B.depth;){X+=1;var te=L[1].slice(1,-1);if(!B.plainObjects&&_.call(Object.prototype,te)&&!B.allowPrototypes)return;G.push(L[1])}if(L){if(B.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+B.depth+" and strictDepth is true");G.push("["+$.slice(L.index)+"]")}return G},g=function(q,B,$,k){if(q){var I=d(q,$);if(I)return m(I,B,$,k)}},x=function(q){if(!q)return p;if(typeof q.allowEmptyArrays<"u"&&typeof q.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof q.decodeDotInKeys<"u"&&typeof q.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(q.decoder!==null&&typeof q.decoder<"u"&&typeof q.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof q.charset<"u"&&q.charset!=="utf-8"&&q.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof q.throwOnLimitExceeded<"u"&&typeof q.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var B=typeof q.charset>"u"?p.charset:q.charset,$=typeof q.duplicates>"u"?p.duplicates:q.duplicates;if($!=="combine"&&$!=="first"&&$!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var k=typeof q.allowDots>"u"?q.decodeDotInKeys===!0?!0:p.allowDots:!!q.allowDots;return{allowDots:k,allowEmptyArrays:typeof q.allowEmptyArrays=="boolean"?!!q.allowEmptyArrays:p.allowEmptyArrays,allowPrototypes:typeof q.allowPrototypes=="boolean"?q.allowPrototypes:p.allowPrototypes,allowSparse:typeof q.allowSparse=="boolean"?q.allowSparse:p.allowSparse,arrayLimit:typeof q.arrayLimit=="number"?q.arrayLimit:p.arrayLimit,charset:B,charsetSentinel:typeof q.charsetSentinel=="boolean"?q.charsetSentinel:p.charsetSentinel,comma:typeof q.comma=="boolean"?q.comma:p.comma,decodeDotInKeys:typeof q.decodeDotInKeys=="boolean"?q.decodeDotInKeys:p.decodeDotInKeys,decoder:typeof q.decoder=="function"?q.decoder:p.decoder,delimiter:typeof q.delimiter=="string"||b.isRegExp(q.delimiter)?q.delimiter:p.delimiter,depth:typeof q.depth=="number"||q.depth===!1?+q.depth:p.depth,duplicates:$,ignoreQueryPrefix:q.ignoreQueryPrefix===!0,interpretNumericEntities:typeof q.interpretNumericEntities=="boolean"?q.interpretNumericEntities:p.interpretNumericEntities,parameterLimit:typeof q.parameterLimit=="number"?q.parameterLimit:p.parameterLimit,parseArrays:q.parseArrays!==!1,plainObjects:typeof q.plainObjects=="boolean"?q.plainObjects:p.plainObjects,strictDepth:typeof q.strictDepth=="boolean"?!!q.strictDepth:p.strictDepth,strictNullHandling:typeof q.strictNullHandling=="boolean"?q.strictNullHandling:p.strictNullHandling,throwOnLimitExceeded:typeof q.throwOnLimitExceeded=="boolean"?q.throwOnLimitExceeded:!1}};return parse$1=function(R,q){var B=x(q);if(R===""||R===null||typeof R>"u")return B.plainObjects?{__proto__:null}:{};for(var $=typeof R=="string"?y(R,B):R,k=B.plainObjects?{__proto__:null}:{},I=Object.keys($),L=0;L<I.length;++L){var D=I[L],G=g(D,$[D],B,typeof R=="string");k=b.merge(k,G,B)}return B.allowSparse===!0?k:b.compact(k)},parse$1}var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var b=requireStringify(),_=requireParse(),S=requireFormats();return lib={formats:S,parse:_,stringify:b},lib}var libExports=requireLib();const require$$1$1=getDefaultExportFromCjs(libExports);var punycode=require$$0$1;function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r",`
|
|
21
|
-
`," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require$$1$1;function urlParse(b,_,S){if(b&&typeof b=="object"&&b instanceof Url)return b;var p=new Url;return p.parse(b,_,S),p}Url.prototype.parse=function(b,_,S){if(typeof b!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof b);var p=b.indexOf("?"),E=p!==-1&&p<b.indexOf("#")?"?":"#",a=b.split(E),w=/\\/g;a[0]=a[0].replace(w,"/"),b=a.join(E);var v=b;if(v=v.trim(),!S&&b.split("#").length===1){var y=simplePathPattern.exec(v);if(y)return this.path=v,this.href=v,this.pathname=y[1],y[2]?(this.search=y[2],_?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):_&&(this.search="",this.query={}),this}var m=protocolPattern.exec(v);if(m){m=m[0];var d=m.toLowerCase();this.protocol=d,v=v.substr(m.length)}if(S||m||v.match(/^\/\/[^@/]+@[^@/]+/)){var g=v.substr(0,2)==="//";g&&!(m&&hostlessProtocol[m])&&(v=v.substr(2),this.slashes=!0)}if(!hostlessProtocol[m]&&(g||m&&!slashedProtocol[m])){for(var x=-1,R=0;R<hostEndingChars.length;R++){var q=v.indexOf(hostEndingChars[R]);q!==-1&&(x===-1||q<x)&&(x=q)}var B,$;x===-1?$=v.lastIndexOf("@"):$=v.lastIndexOf("@",x),$!==-1&&(B=v.slice(0,$),v=v.slice($+1),this.auth=decodeURIComponent(B)),x=-1;for(var R=0;R<nonHostChars.length;R++){var q=v.indexOf(nonHostChars[R]);q!==-1&&(x===-1||q<x)&&(x=q)}x===-1&&(x=v.length),this.host=v.slice(0,x),v=v.slice(x),this.parseHost(),this.hostname=this.hostname||"";var k=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!k)for(var I=this.hostname.split(/\./),R=0,L=I.length;R<L;R++){var D=I[R];if(D&&!D.match(hostnamePartPattern)){for(var G="",X=0,te=D.length;X<te;X++)D.charCodeAt(X)>127?G+="x":G+=D[X];if(!G.match(hostnamePartPattern)){var ie=I.slice(0,R),ee=I.slice(R+1),ue=D.match(hostnamePartStart);ue&&(ie.push(ue[1]),ee.unshift(ue[2])),ee.length&&(v="/"+ee.join(".")+v),this.hostname=ie.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=punycode.toASCII(this.hostname));var c=this.port?":"+this.port:"",e=this.hostname||"";this.host=e+c,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),v[0]!=="/"&&(v="/"+v))}if(!unsafeProtocol[d])for(var R=0,L=autoEscape.length;R<L;R++){var t=autoEscape[R];if(v.indexOf(t)!==-1){var n=encodeURIComponent(t);n===t&&(n=escape(t)),v=v.split(t).join(n)}}var f=v.indexOf("#");f!==-1&&(this.hash=v.substr(f),v=v.slice(0,f));var s=v.indexOf("?");if(s!==-1?(this.search=v.substr(s),this.query=v.substr(s+1),_&&(this.query=querystring.parse(this.query)),v=v.slice(0,s)):_&&(this.search="",this.query={}),v&&(this.pathname=v),slashedProtocol[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var c=this.pathname||"",u=this.search||"";this.path=c+u}return this.href=this.format(),this};function urlFormat(b){return typeof b=="string"&&(b=urlParse(b)),b instanceof Url?b.format():Url.prototype.format.call(b)}Url.prototype.format=function(){var b=this.auth||"";b&&(b=encodeURIComponent(b),b=b.replace(/%3A/i,":"),b+="@");var _=this.protocol||"",S=this.pathname||"",p=this.hash||"",E=!1,a="";this.host?E=b+this.host:this.hostname&&(E=b+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(E+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=querystring.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var w=this.search||a&&"?"+a||"";return _&&_.substr(-1)!==":"&&(_+=":"),this.slashes||(!_||slashedProtocol[_])&&E!==!1?(E="//"+(E||""),S&&S.charAt(0)!=="/"&&(S="/"+S)):E||(E=""),p&&p.charAt(0)!=="#"&&(p="#"+p),w&&w.charAt(0)!=="?"&&(w="?"+w),S=S.replace(/[?#]/g,function(v){return encodeURIComponent(v)}),w=w.replace("#","%23"),_+E+S+w+p};function urlResolve(b,_){return urlParse(b,!1,!0).resolve(_)}Url.prototype.resolve=function(b){return this.resolveObject(urlParse(b,!1,!0)).format()};function urlResolveObject(b,_){return b?urlParse(b,!1,!0).resolveObject(_):_}Url.prototype.resolveObject=function(b){if(typeof b=="string"){var _=new Url;_.parse(b,!1,!0),b=_}for(var S=new Url,p=Object.keys(this),E=0;E<p.length;E++){var a=p[E];S[a]=this[a]}if(S.hash=b.hash,b.href==="")return S.href=S.format(),S;if(b.slashes&&!b.protocol){for(var w=Object.keys(b),v=0;v<w.length;v++){var y=w[v];y!=="protocol"&&(S[y]=b[y])}return slashedProtocol[S.protocol]&&S.hostname&&!S.pathname&&(S.pathname="/",S.path=S.pathname),S.href=S.format(),S}if(b.protocol&&b.protocol!==S.protocol){if(!slashedProtocol[b.protocol]){for(var m=Object.keys(b),d=0;d<m.length;d++){var g=m[d];S[g]=b[g]}return S.href=S.format(),S}if(S.protocol=b.protocol,!b.host&&!hostlessProtocol[b.protocol]){for(var L=(b.pathname||"").split("/");L.length&&!(b.host=L.shift()););b.host||(b.host=""),b.hostname||(b.hostname=""),L[0]!==""&&L.unshift(""),L.length<2&&L.unshift(""),S.pathname=L.join("/")}else S.pathname=b.pathname;if(S.search=b.search,S.query=b.query,S.host=b.host||"",S.auth=b.auth,S.hostname=b.hostname||b.host,S.port=b.port,S.pathname||S.search){var x=S.pathname||"",R=S.search||"";S.path=x+R}return S.slashes=S.slashes||b.slashes,S.href=S.format(),S}var q=S.pathname&&S.pathname.charAt(0)==="/",B=b.host||b.pathname&&b.pathname.charAt(0)==="/",$=B||q||S.host&&b.pathname,k=$,I=S.pathname&&S.pathname.split("/")||[],L=b.pathname&&b.pathname.split("/")||[],D=S.protocol&&!slashedProtocol[S.protocol];if(D&&(S.hostname="",S.port=null,S.host&&(I[0]===""?I[0]=S.host:I.unshift(S.host)),S.host="",b.protocol&&(b.hostname=null,b.port=null,b.host&&(L[0]===""?L[0]=b.host:L.unshift(b.host)),b.host=null),$=$&&(L[0]===""||I[0]==="")),B)S.host=b.host||b.host===""?b.host:S.host,S.hostname=b.hostname||b.hostname===""?b.hostname:S.hostname,S.search=b.search,S.query=b.query,I=L;else if(L.length)I||(I=[]),I.pop(),I=I.concat(L),S.search=b.search,S.query=b.query;else if(b.search!=null){if(D){S.host=I.shift(),S.hostname=S.host;var G=S.host&&S.host.indexOf("@")>0?S.host.split("@"):!1;G&&(S.auth=G.shift(),S.hostname=G.shift(),S.host=S.hostname)}return S.search=b.search,S.query=b.query,(S.pathname!==null||S.search!==null)&&(S.path=(S.pathname?S.pathname:"")+(S.search?S.search:"")),S.href=S.format(),S}if(!I.length)return S.pathname=null,S.search?S.path="/"+S.search:S.path=null,S.href=S.format(),S;for(var X=I.slice(-1)[0],te=(S.host||b.host||I.length>1)&&(X==="."||X==="..")||X==="",ie=0,ee=I.length;ee>=0;ee--)X=I[ee],X==="."?I.splice(ee,1):X===".."?(I.splice(ee,1),ie++):ie&&(I.splice(ee,1),ie--);if(!$&&!k)for(;ie--;ie)I.unshift("..");$&&I[0]!==""&&(!I[0]||I[0].charAt(0)!=="/")&&I.unshift(""),te&&I.join("/").substr(-1)!=="/"&&I.push("");var ue=I[0]===""||I[0]&&I[0].charAt(0)==="/";if(D){S.hostname=ue?"":I.length?I.shift():"",S.host=S.hostname;var G=S.host&&S.host.indexOf("@")>0?S.host.split("@"):!1;G&&(S.auth=G.shift(),S.hostname=G.shift(),S.host=S.hostname)}return $=$||S.host&&I.length,$&&!ue&&I.unshift(""),I.length>0?S.pathname=I.join("/"):(S.pathname=null,S.path=null),(S.pathname!==null||S.search!==null)&&(S.path=(S.pathname?S.pathname:"")+(S.search?S.search:"")),S.auth=b.auth||S.auth,S.slashes=S.slashes||b.slashes,S.href=S.format(),S};Url.prototype.parseHost=function(){var b=this.host,_=portPattern.exec(b);_&&(_=_[0],_!==":"&&(this.port=_.substr(1)),b=b.substr(0,b.length-_.length)),b&&(this.hostname=b)};var parse=urlParse,resolve$1=urlResolve,resolveObject=urlResolveObject,format=urlFormat,Url_1=Url;function normalizeArray(b,_){for(var S=0,p=b.length-1;p>=0;p--){var E=b[p];E==="."?b.splice(p,1):E===".."?(b.splice(p,1),S++):S&&(b.splice(p,1),S--)}if(_)for(;S--;S)b.unshift("..");return b}function resolve(){for(var b="",_=!1,S=arguments.length-1;S>=-1&&!_;S--){var p=S>=0?arguments[S]:"/";if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;b=p+"/"+b,_=p.charAt(0)==="/"}return b=normalizeArray(filter(b.split("/"),function(E){return!!E}),!_).join("/"),(_?"/":"")+b||"."}function filter(b,_){if(b.filter)return b.filter(_);for(var S=[],p=0;p<b.length;p++)_(b[p],p,b)&&S.push(b[p]);return S}var _globalThis=(function(b){function _(){var p=this||self;return delete b.prototype.__magic__,p}if(typeof globalThis=="object")return globalThis;if(this)return _();b.defineProperty(b.prototype,"__magic__",{configurable:!0,get:_});var S=__magic__;return S})(Object),formatImport=format,parseImport=parse,resolveImport=resolve$1,UrlImport=Url_1,URL=_globalThis.URL,URLSearchParams=_globalThis.URLSearchParams,percentRegEx=/%/g,backslashRegEx=/\\/g,newlineRegEx=/\n/g,carriageReturnRegEx=/\r/g,tabRegEx=/\t/g,CHAR_FORWARD_SLASH=47;function isURLInstance(b){var _=b??null;return!!(_!==null&&_?.href&&_?.origin)}function getPathFromURLPosix(b){if(b.hostname!=="")throw new TypeError('File URL host must be "localhost" or empty on browser');for(var _=b.pathname,S=0;S<_.length;S++)if(_[S]==="%"){var p=_.codePointAt(S+2)|32;if(_[S+1]==="2"&&p===102)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(_)}function encodePathChars(b){return b.includes("%")&&(b=b.replace(percentRegEx,"%25")),b.includes("\\")&&(b=b.replace(backslashRegEx,"%5C")),b.includes(`
|
|
22
|
-
`)&&(b=b.replace(newlineRegEx,"%0A")),b.includes("\r")&&(b=b.replace(carriageReturnRegEx,"%0D")),b.includes(" ")&&(b=b.replace(tabRegEx,"%09")),b}var domainToASCII=function b(_){if(typeof _>"u")throw new TypeError('The "domain" argument must be specified');return new URL("http://"+_).hostname},domainToUnicode=function b(_){if(typeof _>"u")throw new TypeError('The "domain" argument must be specified');return new URL("http://"+_).hostname},pathToFileURL=function b(_){var S=new URL("file://"),p=resolve(_),E=_.charCodeAt(_.length-1);return E===CHAR_FORWARD_SLASH&&p[p.length-1]!=="/"&&(p+="/"),S.pathname=encodePathChars(p),S},fileURLToPath=function b(_){if(!isURLInstance(_)&&typeof _!="string")throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof _+" ("+_+")");var S=new URL(_);if(S.protocol!=="file:")throw new TypeError("The URL must be of scheme file");return getPathFromURLPosix(S)},formatImportWithOverloads=function b(_,S){var p,E,a,w;if(S===void 0&&(S={}),!(_ instanceof URL))return formatImport(_);if(typeof S!="object"||S===null)throw new TypeError('The "options" argument must be of type object.');var v=(p=S.auth)!=null?p:!0,y=(E=S.fragment)!=null?E:!0,m=(a=S.search)!=null?a:!0;(w=S.unicode)!=null;var d=new URL(_.toString());return v||(d.username="",d.password=""),y||(d.hash=""),m||(d.search=""),d.toString()},api={format:formatImportWithOverloads,parse:parseImport,resolve:resolveImport,resolveObject,Url:UrlImport,URL,URLSearchParams,domainToASCII,domainToUnicode,pathToFileURL,fileURLToPath};const url=Object.freeze(Object.defineProperty({__proto__:null,URL,URLSearchParams,Url:UrlImport,default:api,domainToASCII,domainToUnicode,fileURLToPath,format:formatImportWithOverloads,parse:parseImport,pathToFileURL,resolve:resolveImport,resolveObject},Symbol.toStringTag,{value:"Module"})),require$$1=getAugmentedNamespace(url);var hasRequiredStreamHttp;function requireStreamHttp(){return hasRequiredStreamHttp||(hasRequiredStreamHttp=1,(function(b){var _=requireRequest(),S=requireResponse(),p=requireImmutable(),E=requireBrowser(),a=require$$1,w=b;w.request=function(v,y){typeof v=="string"?v=a.parse(v):v=p(v);var m=commonjsGlobal.location.protocol.search(/^https?:$/)===-1?"http:":"",d=v.protocol||m,g=v.hostname||v.host,x=v.port,R=v.path||"/";g&&g.indexOf(":")!==-1&&(g="["+g+"]"),v.url=(g?d+"//"+g:"")+(x?":"+x:"")+R,v.method=(v.method||"GET").toUpperCase(),v.headers=v.headers||{};var q=new _(v);return y&&q.on("response",y),q},w.get=function(y,m){var d=w.request(y,m);return d.end(),d},w.ClientRequest=_,w.IncomingMessage=S.IncomingMessage,w.Agent=function(){},w.Agent.defaultMaxSockets=4,w.globalAgent=new w.Agent,w.STATUS_CODES=E,w.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(streamHttp)),streamHttp}var hasRequiredHttpsBrowserify;function requireHttpsBrowserify(){return hasRequiredHttpsBrowserify||(hasRequiredHttpsBrowserify=1,(function(b){var _=requireStreamHttp(),S=require$$1,p=b.exports;for(var E in _)_.hasOwnProperty(E)&&(p[E]=_[E]);p.request=function(w,v){return w=a(w),_.request.call(this,w,v)},p.get=function(w,v){return w=a(w),_.get.call(this,w,v)};function a(w){if(typeof w=="string"&&(w=S.parse(w)),w.protocol||(w.protocol="https:"),w.protocol!=="https:")throw new Error('Protocol "'+w.protocol+'" not supported. Expected "https:"');return w}})(httpsBrowserify)),httpsBrowserify.exports}var httpsBrowserifyExports=requireHttpsBrowserify();const https=getDefaultExportFromCjs(httpsBrowserifyExports),getConfig=(b={})=>({region:b.region||process$1.env.BUNNY_REGION||"SG",baseHostName:"storage.bunnycdn.com",folderName:b.folderName||process$1.env.BUNNY_FOLDER_NAME||"",storageZone:b.storageZone||process$1.env.BUNNY_STORAGE_ZONE||"unset",password:b.password||process$1.env.BUNNY_PASSWORD||"unset"}),install=({storageZone:b,password:_,region:S,folderName:p})=>{b&&(process$1.env.BUNNY_STORAGE_ZONE=b),_&&(process$1.env.BUNNY_PASSWORD=_),S&&(process$1.env.BUNNY_REGION=S),p&&(process$1.env.BUNNY_FOLDER_NAME=p)},upload=async({file:b,buffer:_,...S})=>new Promise(async(p,E)=>{try{!_&&!b&&E({res:!1,message:"No file uploaded"});const a=getConfig(S),w=`${cryptoBrowserifyExports.randomUUID()}.webp`,v=_?_.length:b.buffer.length,y={method:"PUT",hostname:a.region?`${a.region}.${a.baseHostName}`:a.baseHostName,port:443,path:`/${a.storageZone}/${a.folderName}/${w}`,headers:{AccessKey:a.password,"Content-Type":"application/octet-stream","Content-Length":v}},m=https.request(y,d=>{if(d.statusCode===201){const g=a.folderName?`${a.folderName}/`:"",x=`https://${a.storageZone}.b-cdn.net/${g}${w}`;p({res:!0,message:"upload success",url:x})}else E({res:!1,message:"Upload failed"})});m.on("error",d=>{E({res:!1,message:"Upload failed",error:d})}),m.write(_||b.buffer),m.end()}catch{E({res:!1,message:"Server error"})}}),list=async()=>new Promise(b=>{https.get("https://jsonplaceholder.typicode.com/todos/1",_=>{b({res:!0,message:"List retrieved successfully",files:[],result:_})})}),deleteFile=({ObjectName:b,href:_,...S})=>new Promise((p,E)=>{if(!b&&!_){E({res:!1,message:"No file specified for deletion"});return}try{const a=getConfig(S),w=a.region?`${a.region}.${a.baseHostName}`:a.baseHostName,v=_?decodeURIComponent(_.split("/")[_.split("/").length-1]):b;https.request({method:"DELETE",hostname:w,path:`/${a.storageZone}/${a.folderName}/${v}`,headers:{AccessKey:a.password}},y=>{y.statusCode===200?p({res:!0,message:"File deleted successfully"}):p({res:!1,message:"Failed to delete file"})}).end()}catch{E({res:!1,message:"Server error"})}}),BunnyCDN={install,upload,list,deleteFile};exports.default=BunnyCDN;exports.deleteFile=deleteFile;exports.install=install;exports.list=list;exports.upload=upload;
|
|
17
|
+
https://github.com/browserify/crypto-browserify`)},cryptoBrowserify.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},cryptoBrowserify}var cryptoBrowserifyExports=requireCryptoBrowserify();const getConfig=(_={})=>({region:_.region||process$1.env.BUNNY_REGION||"SG",baseHostName:"storage.bunnycdn.com",folderName:_.folderName||process$1.env.BUNNY_FOLDER_NAME||"",storageZone:_.storageZone||process$1.env.BUNNY_STORAGE_ZONE||"unset",password:_.password||process$1.env.BUNNY_PASSWORD||"unset"}),install=({storageZone:_,password:S,region:I,folderName:p})=>{_&&(process$1.env.BUNNY_STORAGE_ZONE=_),S&&(process$1.env.BUNNY_PASSWORD=S),I&&(process$1.env.BUNNY_REGION=I),p&&(process$1.env.BUNNY_FOLDER_NAME=p)},upload=async({file:_,buffer:S,...I})=>new Promise(async(p,R)=>{try{!S&&!_&&R({res:!1,message:"No file uploaded"});const f=getConfig(I),w=`${cryptoBrowserifyExports.randomUUID()}.webp`,m=S?S.length:_.buffer.length,v={method:"PUT",hostname:f.region?`${f.region}.${f.baseHostName}`:f.baseHostName,port:443,path:`/${f.storageZone}/${f.folderName}/${w}`,headers:{AccessKey:f.password,"Content-Type":"application/octet-stream","Content-Length":m.toString()}},y=await fetch(`https://${v.hostname}${v.path}`,{method:"PUT",headers:v.headers,body:S?new Uint8Array(S):new Uint8Array(_.buffer)});if(y.status===201){const d=f.folderName?`${f.folderName}/`:"",g=`https://${f.storageZone}.b-cdn.net/${d}${w}`;p({res:!0,message:"upload success",url:g})}else R({res:!1,message:"Upload failed",error:await y.text()})}catch{R({res:!1,message:"Server error"})}}),list=async(_={})=>new Promise((S,I)=>{try{const p=getConfig(_),R=p.region?`${p.region}.${p.baseHostName}`:p.baseHostName,f=p.folderName?`${p.folderName}/`:"",w=`https://${R}/${p.storageZone}/${f}`,m={AccessKey:p.password};fetch(w,{headers:m}).then(v=>v.json()).then(v=>{const y=v.map(d=>{const g=`https://${p.storageZone}.b-cdn.net/${f}${d.ObjectName}`;return{...d,Url:g}});S({res:!0,message:"List retrieved successfully",files:y})}).catch(v=>{I({res:!1,message:"Network error",error:v})})}catch{I({res:!1,message:"Server error"})}}),deleteFile=({ObjectName:_,href:S,...I})=>new Promise((p,R)=>{if(!_&&!S){R({res:!1,message:"No file specified for deletion"});return}try{const f=getConfig(I),w=f.region?`${f.region}.${f.baseHostName}`:f.baseHostName,m=S?decodeURIComponent(S.split("/")[S.split("/").length-1]):_;fetch(`https://${w}/${f.storageZone}/${f.folderName}/${m}`,{method:"DELETE",headers:{AccessKey:f.password}}).then(v=>{v.status===200?p({res:!0,message:"File deleted successfully"}):p({res:!1,message:"Failed to delete file"})}).catch(v=>{R({res:!1,message:"Network error",error:v})})}catch{R({res:!1,message:"Server error"})}}),BunnyCDN={install,upload,list,deleteFile};exports.default=BunnyCDN;exports.deleteFile=deleteFile;exports.install=install;exports.list=list;exports.upload=upload;
|