lesca-node-bunnycdn 0.0.0

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 ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}function getAugmentedNamespace(d){if(Object.prototype.hasOwnProperty.call(d,"__esModule"))return d;var v=d.default;if(typeof v=="function"){var E=function m(){var A=!1;try{A=this instanceof m}catch{}return A?Reflect.construct(v,arguments,this.constructor):v.apply(this,arguments)};E.prototype=v.prototype}else E={};return Object.defineProperty(E,"__esModule",{value:!0}),Object.keys(d).forEach(function(m){var A=Object.getOwnPropertyDescriptor(d,m);Object.defineProperty(E,m,A.get?A:{enumerable:!0,get:function(){return d[m]}})}),E}var cryptoBrowserify={};function getDefaultExportFromCjs(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var browser$e={exports:{}},process=browser$e.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(d){if(cachedSetTimeout===setTimeout)return setTimeout(d,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(d,0);try{return cachedSetTimeout(d,0)}catch{try{return cachedSetTimeout.call(null,d,0)}catch{return cachedSetTimeout.call(this,d,0)}}}function runClearTimeout(d){if(cachedClearTimeout===clearTimeout)return clearTimeout(d);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(d);try{return cachedClearTimeout(d)}catch{try{return cachedClearTimeout.call(null,d)}catch{return cachedClearTimeout.call(this,d)}}}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 d=runTimeout(cleanUpNextTick);draining=!0;for(var v=queue.length;v;){for(currentQueue=queue,queue=[];++queueIndex<v;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,v=queue.length}currentQueue=null,draining=!1,runClearTimeout(d)}}process.nextTick=function(d){var v=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)v[E-1]=arguments[E];queue.push(new Item(d,v)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(d,v){this.fun=d,this.array=v}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(d){return[]};process.binding=function(d){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(d){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports=browser$e.exports;const process$1=getDefaultExportFromCjs(browserExports);var browser$d={exports:{}},safeBuffer$2={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(d){Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var v={},E={};E.byteLength=l,E.toByteArray=y,E.fromByteArray=S;for(var m=[],A=[],a=typeof Uint8Array<"u"?Uint8Array:Array,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,b=_.length;g<b;++g)m[g]=_[g],A[_.charCodeAt(g)]=g;A[45]=62,A[95]=63;function w(k){var z=k.length;if(z%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var j=k.indexOf("=");j===-1&&(j=z);var V=j===z?0:4-j%4;return[j,V]}function l(k){var z=w(k),j=z[0],V=z[1];return(j+V)*3/4-V}function M(k,z,j){return(z+j)*3/4-j}function y(k){var z,j=w(k),V=j[0],Q=j[1],ne=new a(M(k,V,Q)),ae=0,U=Q>0?V-4:V,fe;for(fe=0;fe<U;fe+=4)z=A[k.charCodeAt(fe)]<<18|A[k.charCodeAt(fe+1)]<<12|A[k.charCodeAt(fe+2)]<<6|A[k.charCodeAt(fe+3)],ne[ae++]=z>>16&255,ne[ae++]=z>>8&255,ne[ae++]=z&255;return Q===2&&(z=A[k.charCodeAt(fe)]<<2|A[k.charCodeAt(fe+1)]>>4,ne[ae++]=z&255),Q===1&&(z=A[k.charCodeAt(fe)]<<10|A[k.charCodeAt(fe+1)]<<4|A[k.charCodeAt(fe+2)]>>2,ne[ae++]=z>>8&255,ne[ae++]=z&255),ne}function B(k){return m[k>>18&63]+m[k>>12&63]+m[k>>6&63]+m[k&63]}function R(k,z,j){for(var V,Q=[],ne=z;ne<j;ne+=3)V=(k[ne]<<16&16711680)+(k[ne+1]<<8&65280)+(k[ne+2]&255),Q.push(B(V));return Q.join("")}function S(k){for(var z,j=k.length,V=j%3,Q=[],ne=16383,ae=0,U=j-V;ae<U;ae+=ne)Q.push(R(k,ae,ae+ne>U?U:ae+ne));return V===1?(z=k[j-1],Q.push(m[z>>2]+m[z<<4&63]+"==")):V===2&&(z=(k[j-2]<<8)+k[j-1],Q.push(m[z>>10]+m[z>>4&63]+m[z<<2&63]+"=")),Q.join("")}var P={};P.read=function(k,z,j,V,Q){var ne,ae,U=Q*8-V-1,fe=(1<<U)-1,p=fe>>1,e=-7,t=j?Q-1:0,n=j?-1:1,f=k[z+t];for(t+=n,ne=f&(1<<-e)-1,f>>=-e,e+=U;e>0;ne=ne*256+k[z+t],t+=n,e-=8);for(ae=ne&(1<<-e)-1,ne>>=-e,e+=V;e>0;ae=ae*256+k[z+t],t+=n,e-=8);if(ne===0)ne=1-p;else{if(ne===fe)return ae?NaN:(f?-1:1)*(1/0);ae=ae+Math.pow(2,V),ne=ne-p}return(f?-1:1)*ae*Math.pow(2,ne-V)},P.write=function(k,z,j,V,Q,ne){var ae,U,fe,p=ne*8-Q-1,e=(1<<p)-1,t=e>>1,n=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=V?0:ne-1,s=V?1:-1,u=z<0||z===0&&1/z<0?1:0;for(z=Math.abs(z),isNaN(z)||z===1/0?(U=isNaN(z)?1:0,ae=e):(ae=Math.floor(Math.log(z)/Math.LN2),z*(fe=Math.pow(2,-ae))<1&&(ae--,fe*=2),ae+t>=1?z+=n/fe:z+=n*Math.pow(2,1-t),z*fe>=2&&(ae++,fe/=2),ae+t>=e?(U=0,ae=e):ae+t>=1?(U=(z*fe-1)*Math.pow(2,Q),ae=ae+t):(U=z*Math.pow(2,t-1)*Math.pow(2,Q),ae=0));Q>=8;k[j+f]=U&255,f+=s,U/=256,Q-=8);for(ae=ae<<Q|U,p+=Q;p>0;k[j+f]=ae&255,f+=s,ae/=256,p-=8);k[j+f-s]|=u*128};(function(k){const z=E,j=P,V=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;k.Buffer=e,k.SlowBuffer=$,k.INSPECT_MAX_BYTES=50;const Q=2147483647;k.kMaxLength=Q;const{Uint8Array:ne,ArrayBuffer:ae,SharedArrayBuffer:U}=globalThis;e.TYPED_ARRAY_SUPPORT=fe(),!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 fe(){try{const K=new ne(1),O={foo:function(){return 42}};return Object.setPrototypeOf(O,ne.prototype),Object.setPrototypeOf(K,O),K.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 p(K){if(K>Q)throw new RangeError('The value "'+K+'" is invalid for option "size"');const O=new ne(K);return Object.setPrototypeOf(O,e.prototype),O}function e(K,O,W){if(typeof K=="number"){if(typeof O=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(K)}return t(K,O,W)}e.poolSize=8192;function t(K,O,W){if(typeof K=="string")return u(K,O);if(ae.isView(K))return o(K);if(K==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K);if(Pe(K,ae)||K&&Pe(K.buffer,ae)||typeof U<"u"&&(Pe(K,U)||K&&Pe(K.buffer,U)))return r(K,O,W);if(typeof K=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const te=K.valueOf&&K.valueOf();if(te!=null&&te!==K)return e.from(te,O,W);const se=h(K);if(se)return se;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof K[Symbol.toPrimitive]=="function")return e.from(K[Symbol.toPrimitive]("string"),O,W);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K)}e.from=function(K,O,W){return t(K,O,W)},Object.setPrototypeOf(e.prototype,ne.prototype),Object.setPrototypeOf(e,ne);function n(K){if(typeof K!="number")throw new TypeError('"size" argument must be of type number');if(K<0)throw new RangeError('The value "'+K+'" is invalid for option "size"')}function f(K,O,W){return n(K),K<=0?p(K):O!==void 0?typeof W=="string"?p(K).fill(O,W):p(K).fill(O):p(K)}e.alloc=function(K,O,W){return f(K,O,W)};function s(K){return n(K),p(K<0?0:q(K)|0)}e.allocUnsafe=function(K){return s(K)},e.allocUnsafeSlow=function(K){return s(K)};function u(K,O){if((typeof O!="string"||O==="")&&(O="utf8"),!e.isEncoding(O))throw new TypeError("Unknown encoding: "+O);const W=H(K,O)|0;let te=p(W);const se=te.write(K,O);return se!==W&&(te=te.slice(0,se)),te}function c(K){const O=K.length<0?0:q(K.length)|0,W=p(O);for(let te=0;te<O;te+=1)W[te]=K[te]&255;return W}function o(K){if(Pe(K,ne)){const O=new ne(K);return r(O.buffer,O.byteOffset,O.byteLength)}return c(K)}function r(K,O,W){if(O<0||K.byteLength<O)throw new RangeError('"offset" is outside of buffer bounds');if(K.byteLength<O+(W||0))throw new RangeError('"length" is outside of buffer bounds');let te;return O===void 0&&W===void 0?te=new ne(K):W===void 0?te=new ne(K,O):te=new ne(K,O,W),Object.setPrototypeOf(te,e.prototype),te}function h(K){if(e.isBuffer(K)){const O=q(K.length)|0,W=p(O);return W.length===0||K.copy(W,0,0,O),W}if(K.length!==void 0)return typeof K.length!="number"||He(K.length)?p(0):c(K);if(K.type==="Buffer"&&Array.isArray(K.data))return c(K.data)}function q(K){if(K>=Q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return K|0}function $(K){return+K!=K&&(K=0),e.alloc(+K)}e.isBuffer=function(O){return O!=null&&O._isBuffer===!0&&O!==e.prototype},e.compare=function(O,W){if(Pe(O,ne)&&(O=e.from(O,O.offset,O.byteLength)),Pe(W,ne)&&(W=e.from(W,W.offset,W.byteLength)),!e.isBuffer(O)||!e.isBuffer(W))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(O===W)return 0;let te=O.length,se=W.length;for(let we=0,de=Math.min(te,se);we<de;++we)if(O[we]!==W[we]){te=O[we],se=W[we];break}return te<se?-1:se<te?1:0},e.isEncoding=function(O){switch(String(O).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(O,W){if(!Array.isArray(O))throw new TypeError('"list" argument must be an Array of Buffers');if(O.length===0)return e.alloc(0);let te;if(W===void 0)for(W=0,te=0;te<O.length;++te)W+=O[te].length;const se=e.allocUnsafe(W);let we=0;for(te=0;te<O.length;++te){let de=O[te];if(Pe(de,ne))we+de.length>se.length?(e.isBuffer(de)||(de=e.from(de)),de.copy(se,we)):ne.prototype.set.call(se,de,we);else if(e.isBuffer(de))de.copy(se,we);else throw new TypeError('"list" argument must be an Array of Buffers');we+=de.length}return se};function H(K,O){if(e.isBuffer(K))return K.length;if(ae.isView(K)||Pe(K,ae))return K.byteLength;if(typeof K!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof K);const W=K.length,te=arguments.length>2&&arguments[2]===!0;if(!te&&W===0)return 0;let se=!1;for(;;)switch(O){case"ascii":case"latin1":case"binary":return W;case"utf8":case"utf-8":return Oe(K).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W*2;case"hex":return W>>>1;case"base64":return Le(K).length;default:if(se)return te?-1:Oe(K).length;O=(""+O).toLowerCase(),se=!0}}e.byteLength=H;function Y(K,O,W){let te=!1;if((O===void 0||O<0)&&(O=0),O>this.length||((W===void 0||W>this.length)&&(W=this.length),W<=0)||(W>>>=0,O>>>=0,W<=O))return"";for(K||(K="utf8");;)switch(K){case"hex":return Ne(this,O,W);case"utf8":case"utf-8":return ue(this,O,W);case"ascii":return me(this,O,W);case"latin1":case"binary":return ce(this,O,W);case"base64":return le(this,O,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,O,W);default:if(te)throw new TypeError("Unknown encoding: "+K);K=(K+"").toLowerCase(),te=!0}}e.prototype._isBuffer=!0;function J(K,O,W){const te=K[O];K[O]=K[W],K[W]=te}e.prototype.swap16=function(){const O=this.length;if(O%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let W=0;W<O;W+=2)J(this,W,W+1);return this},e.prototype.swap32=function(){const O=this.length;if(O%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let W=0;W<O;W+=4)J(this,W,W+3),J(this,W+1,W+2);return this},e.prototype.swap64=function(){const O=this.length;if(O%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let W=0;W<O;W+=8)J(this,W,W+7),J(this,W+1,W+6),J(this,W+2,W+5),J(this,W+3,W+4);return this},e.prototype.toString=function(){const O=this.length;return O===0?"":arguments.length===0?ue(this,0,O):Y.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(O){if(!e.isBuffer(O))throw new TypeError("Argument must be a Buffer");return this===O?!0:e.compare(this,O)===0},e.prototype.inspect=function(){let O="";const W=k.INSPECT_MAX_BYTES;return O=this.toString("hex",0,W).replace(/(.{2})/g,"$1 ").trim(),this.length>W&&(O+=" ... "),"<Buffer "+O+">"},V&&(e.prototype[V]=e.prototype.inspect),e.prototype.compare=function(O,W,te,se,we){if(Pe(O,ne)&&(O=e.from(O,O.offset,O.byteLength)),!e.isBuffer(O))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof O);if(W===void 0&&(W=0),te===void 0&&(te=O?O.length:0),se===void 0&&(se=0),we===void 0&&(we=this.length),W<0||te>O.length||se<0||we>this.length)throw new RangeError("out of range index");if(se>=we&&W>=te)return 0;if(se>=we)return-1;if(W>=te)return 1;if(W>>>=0,te>>>=0,se>>>=0,we>>>=0,this===O)return 0;let de=we-se,qe=te-W;const Ue=Math.min(de,qe),xe=this.slice(se,we),Ae=O.slice(W,te);for(let Fe=0;Fe<Ue;++Fe)if(xe[Fe]!==Ae[Fe]){de=xe[Fe],qe=Ae[Fe];break}return de<qe?-1:qe<de?1:0};function x(K,O,W,te,se){if(K.length===0)return-1;if(typeof W=="string"?(te=W,W=0):W>2147483647?W=2147483647:W<-2147483648&&(W=-2147483648),W=+W,He(W)&&(W=se?0:K.length-1),W<0&&(W=K.length+W),W>=K.length){if(se)return-1;W=K.length-1}else if(W<0)if(se)W=0;else return-1;if(typeof O=="string"&&(O=e.from(O,te)),e.isBuffer(O))return O.length===0?-1:I(K,O,W,te,se);if(typeof O=="number")return O=O&255,typeof ne.prototype.indexOf=="function"?se?ne.prototype.indexOf.call(K,O,W):ne.prototype.lastIndexOf.call(K,O,W):I(K,[O],W,te,se);throw new TypeError("val must be string, number or Buffer")}function I(K,O,W,te,se){let we=1,de=K.length,qe=O.length;if(te!==void 0&&(te=String(te).toLowerCase(),te==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(K.length<2||O.length<2)return-1;we=2,de/=2,qe/=2,W/=2}function Ue(Ae,Fe){return we===1?Ae[Fe]:Ae.readUInt16BE(Fe*we)}let xe;if(se){let Ae=-1;for(xe=W;xe<de;xe++)if(Ue(K,xe)===Ue(O,Ae===-1?0:xe-Ae)){if(Ae===-1&&(Ae=xe),xe-Ae+1===qe)return Ae*we}else Ae!==-1&&(xe-=xe-Ae),Ae=-1}else for(W+qe>de&&(W=de-qe),xe=W;xe>=0;xe--){let Ae=!0;for(let Fe=0;Fe<qe;Fe++)if(Ue(K,xe+Fe)!==Ue(O,Fe)){Ae=!1;break}if(Ae)return xe}return-1}e.prototype.includes=function(O,W,te){return this.indexOf(O,W,te)!==-1},e.prototype.indexOf=function(O,W,te){return x(this,O,W,te,!0)},e.prototype.lastIndexOf=function(O,W,te){return x(this,O,W,te,!1)};function C(K,O,W,te){W=Number(W)||0;const se=K.length-W;te?(te=Number(te),te>se&&(te=se)):te=se;const we=O.length;te>we/2&&(te=we/2);let de;for(de=0;de<te;++de){const qe=parseInt(O.substr(de*2,2),16);if(He(qe))return de;K[W+de]=qe}return de}function N(K,O,W,te){return Ee(Oe(O,K.length-W),K,W,te)}function F(K,O,W,te){return Ee(ve(O),K,W,te)}function D(K,O,W,te){return Ee(Le(O),K,W,te)}function X(K,O,W,te){return Ee(_e(O,K.length-W),K,W,te)}e.prototype.write=function(O,W,te,se){if(W===void 0)se="utf8",te=this.length,W=0;else if(te===void 0&&typeof W=="string")se=W,te=this.length,W=0;else if(isFinite(W))W=W>>>0,isFinite(te)?(te=te>>>0,se===void 0&&(se="utf8")):(se=te,te=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const we=this.length-W;if((te===void 0||te>we)&&(te=we),O.length>0&&(te<0||W<0)||W>this.length)throw new RangeError("Attempt to write outside buffer bounds");se||(se="utf8");let de=!1;for(;;)switch(se){case"hex":return C(this,O,W,te);case"utf8":case"utf-8":return N(this,O,W,te);case"ascii":case"latin1":case"binary":return F(this,O,W,te);case"base64":return D(this,O,W,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,O,W,te);default:if(de)throw new TypeError("Unknown encoding: "+se);se=(""+se).toLowerCase(),de=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function le(K,O,W){return O===0&&W===K.length?z.fromByteArray(K):z.fromByteArray(K.slice(O,W))}function ue(K,O,W){W=Math.min(K.length,W);const te=[];let se=O;for(;se<W;){const we=K[se];let de=null,qe=we>239?4:we>223?3:we>191?2:1;if(se+qe<=W){let Ue,xe,Ae,Fe;switch(qe){case 1:we<128&&(de=we);break;case 2:Ue=K[se+1],(Ue&192)===128&&(Fe=(we&31)<<6|Ue&63,Fe>127&&(de=Fe));break;case 3:Ue=K[se+1],xe=K[se+2],(Ue&192)===128&&(xe&192)===128&&(Fe=(we&15)<<12|(Ue&63)<<6|xe&63,Fe>2047&&(Fe<55296||Fe>57343)&&(de=Fe));break;case 4:Ue=K[se+1],xe=K[se+2],Ae=K[se+3],(Ue&192)===128&&(xe&192)===128&&(Ae&192)===128&&(Fe=(we&15)<<18|(Ue&63)<<12|(xe&63)<<6|Ae&63,Fe>65535&&Fe<1114112&&(de=Fe))}}de===null?(de=65533,qe=1):de>65535&&(de-=65536,te.push(de>>>10&1023|55296),de=56320|de&1023),te.push(de),se+=qe}return Ce(te)}const pe=4096;function Ce(K){const O=K.length;if(O<=pe)return String.fromCharCode.apply(String,K);let W="",te=0;for(;te<O;)W+=String.fromCharCode.apply(String,K.slice(te,te+=pe));return W}function me(K,O,W){let te="";W=Math.min(K.length,W);for(let se=O;se<W;++se)te+=String.fromCharCode(K[se]&127);return te}function ce(K,O,W){let te="";W=Math.min(K.length,W);for(let se=O;se<W;++se)te+=String.fromCharCode(K[se]);return te}function Ne(K,O,W){const te=K.length;(!O||O<0)&&(O=0),(!W||W<0||W>te)&&(W=te);let se="";for(let we=O;we<W;++we)se+=Be[K[we]];return se}function ye(K,O,W){const te=K.slice(O,W);let se="";for(let we=0;we<te.length-1;we+=2)se+=String.fromCharCode(te[we]+te[we+1]*256);return se}e.prototype.slice=function(O,W){const te=this.length;O=~~O,W=W===void 0?te:~~W,O<0?(O+=te,O<0&&(O=0)):O>te&&(O=te),W<0?(W+=te,W<0&&(W=0)):W>te&&(W=te),W<O&&(W=O);const se=this.subarray(O,W);return Object.setPrototypeOf(se,e.prototype),se};function Me(K,O,W){if(K%1!==0||K<0)throw new RangeError("offset is not uint");if(K+O>W)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(O,W,te){O=O>>>0,W=W>>>0,te||Me(O,W,this.length);let se=this[O],we=1,de=0;for(;++de<W&&(we*=256);)se+=this[O+de]*we;return se},e.prototype.readUintBE=e.prototype.readUIntBE=function(O,W,te){O=O>>>0,W=W>>>0,te||Me(O,W,this.length);let se=this[O+--W],we=1;for(;W>0&&(we*=256);)se+=this[O+--W]*we;return se},e.prototype.readUint8=e.prototype.readUInt8=function(O,W){return O=O>>>0,W||Me(O,1,this.length),this[O]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(O,W){return O=O>>>0,W||Me(O,2,this.length),this[O]|this[O+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(O,W){return O=O>>>0,W||Me(O,2,this.length),this[O]<<8|this[O+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(O,W){return O=O>>>0,W||Me(O,4,this.length),(this[O]|this[O+1]<<8|this[O+2]<<16)+this[O+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(O,W){return O=O>>>0,W||Me(O,4,this.length),this[O]*16777216+(this[O+1]<<16|this[O+2]<<8|this[O+3])},e.prototype.readBigUInt64LE=Te(function(O){O=O>>>0,oe(O,"offset");const W=this[O],te=this[O+7];(W===void 0||te===void 0)&&ge(O,this.length-8);const se=W+this[++O]*2**8+this[++O]*2**16+this[++O]*2**24,we=this[++O]+this[++O]*2**8+this[++O]*2**16+te*2**24;return BigInt(se)+(BigInt(we)<<BigInt(32))}),e.prototype.readBigUInt64BE=Te(function(O){O=O>>>0,oe(O,"offset");const W=this[O],te=this[O+7];(W===void 0||te===void 0)&&ge(O,this.length-8);const se=W*2**24+this[++O]*2**16+this[++O]*2**8+this[++O],we=this[++O]*2**24+this[++O]*2**16+this[++O]*2**8+te;return(BigInt(se)<<BigInt(32))+BigInt(we)}),e.prototype.readIntLE=function(O,W,te){O=O>>>0,W=W>>>0,te||Me(O,W,this.length);let se=this[O],we=1,de=0;for(;++de<W&&(we*=256);)se+=this[O+de]*we;return we*=128,se>=we&&(se-=Math.pow(2,8*W)),se},e.prototype.readIntBE=function(O,W,te){O=O>>>0,W=W>>>0,te||Me(O,W,this.length);let se=W,we=1,de=this[O+--se];for(;se>0&&(we*=256);)de+=this[O+--se]*we;return we*=128,de>=we&&(de-=Math.pow(2,8*W)),de},e.prototype.readInt8=function(O,W){return O=O>>>0,W||Me(O,1,this.length),this[O]&128?(255-this[O]+1)*-1:this[O]},e.prototype.readInt16LE=function(O,W){O=O>>>0,W||Me(O,2,this.length);const te=this[O]|this[O+1]<<8;return te&32768?te|4294901760:te},e.prototype.readInt16BE=function(O,W){O=O>>>0,W||Me(O,2,this.length);const te=this[O+1]|this[O]<<8;return te&32768?te|4294901760:te},e.prototype.readInt32LE=function(O,W){return O=O>>>0,W||Me(O,4,this.length),this[O]|this[O+1]<<8|this[O+2]<<16|this[O+3]<<24},e.prototype.readInt32BE=function(O,W){return O=O>>>0,W||Me(O,4,this.length),this[O]<<24|this[O+1]<<16|this[O+2]<<8|this[O+3]},e.prototype.readBigInt64LE=Te(function(O){O=O>>>0,oe(O,"offset");const W=this[O],te=this[O+7];(W===void 0||te===void 0)&&ge(O,this.length-8);const se=this[O+4]+this[O+5]*2**8+this[O+6]*2**16+(te<<24);return(BigInt(se)<<BigInt(32))+BigInt(W+this[++O]*2**8+this[++O]*2**16+this[++O]*2**24)}),e.prototype.readBigInt64BE=Te(function(O){O=O>>>0,oe(O,"offset");const W=this[O],te=this[O+7];(W===void 0||te===void 0)&&ge(O,this.length-8);const se=(W<<24)+this[++O]*2**16+this[++O]*2**8+this[++O];return(BigInt(se)<<BigInt(32))+BigInt(this[++O]*2**24+this[++O]*2**16+this[++O]*2**8+te)}),e.prototype.readFloatLE=function(O,W){return O=O>>>0,W||Me(O,4,this.length),j.read(this,O,!0,23,4)},e.prototype.readFloatBE=function(O,W){return O=O>>>0,W||Me(O,4,this.length),j.read(this,O,!1,23,4)},e.prototype.readDoubleLE=function(O,W){return O=O>>>0,W||Me(O,8,this.length),j.read(this,O,!0,52,8)},e.prototype.readDoubleBE=function(O,W){return O=O>>>0,W||Me(O,8,this.length),j.read(this,O,!1,52,8)};function De(K,O,W,te,se,we){if(!e.isBuffer(K))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>se||O<we)throw new RangeError('"value" argument is out of bounds');if(W+te>K.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(O,W,te,se){if(O=+O,W=W>>>0,te=te>>>0,!se){const qe=Math.pow(2,8*te)-1;De(this,O,W,te,qe,0)}let we=1,de=0;for(this[W]=O&255;++de<te&&(we*=256);)this[W+de]=O/we&255;return W+te},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(O,W,te,se){if(O=+O,W=W>>>0,te=te>>>0,!se){const qe=Math.pow(2,8*te)-1;De(this,O,W,te,qe,0)}let we=te-1,de=1;for(this[W+we]=O&255;--we>=0&&(de*=256);)this[W+we]=O/de&255;return W+te},e.prototype.writeUint8=e.prototype.writeUInt8=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,1,255,0),this[W]=O&255,W+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,2,65535,0),this[W]=O&255,this[W+1]=O>>>8,W+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,2,65535,0),this[W]=O>>>8,this[W+1]=O&255,W+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,4,4294967295,0),this[W+3]=O>>>24,this[W+2]=O>>>16,this[W+1]=O>>>8,this[W]=O&255,W+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,4,4294967295,0),this[W]=O>>>24,this[W+1]=O>>>16,this[W+2]=O>>>8,this[W+3]=O&255,W+4};function be(K,O,W,te,se){ee(O,te,se,K,W,7);let we=Number(O&BigInt(4294967295));K[W++]=we,we=we>>8,K[W++]=we,we=we>>8,K[W++]=we,we=we>>8,K[W++]=we;let de=Number(O>>BigInt(32)&BigInt(4294967295));return K[W++]=de,de=de>>8,K[W++]=de,de=de>>8,K[W++]=de,de=de>>8,K[W++]=de,W}function Re(K,O,W,te,se){ee(O,te,se,K,W,7);let we=Number(O&BigInt(4294967295));K[W+7]=we,we=we>>8,K[W+6]=we,we=we>>8,K[W+5]=we,we=we>>8,K[W+4]=we;let de=Number(O>>BigInt(32)&BigInt(4294967295));return K[W+3]=de,de=de>>8,K[W+2]=de,de=de>>8,K[W+1]=de,de=de>>8,K[W]=de,W+8}e.prototype.writeBigUInt64LE=Te(function(O,W=0){return be(this,O,W,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=Te(function(O,W=0){return Re(this,O,W,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(O,W,te,se){if(O=+O,W=W>>>0,!se){const Ue=Math.pow(2,8*te-1);De(this,O,W,te,Ue-1,-Ue)}let we=0,de=1,qe=0;for(this[W]=O&255;++we<te&&(de*=256);)O<0&&qe===0&&this[W+we-1]!==0&&(qe=1),this[W+we]=(O/de>>0)-qe&255;return W+te},e.prototype.writeIntBE=function(O,W,te,se){if(O=+O,W=W>>>0,!se){const Ue=Math.pow(2,8*te-1);De(this,O,W,te,Ue-1,-Ue)}let we=te-1,de=1,qe=0;for(this[W+we]=O&255;--we>=0&&(de*=256);)O<0&&qe===0&&this[W+we+1]!==0&&(qe=1),this[W+we]=(O/de>>0)-qe&255;return W+te},e.prototype.writeInt8=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,1,127,-128),O<0&&(O=255+O+1),this[W]=O&255,W+1},e.prototype.writeInt16LE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,2,32767,-32768),this[W]=O&255,this[W+1]=O>>>8,W+2},e.prototype.writeInt16BE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,2,32767,-32768),this[W]=O>>>8,this[W+1]=O&255,W+2},e.prototype.writeInt32LE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,4,2147483647,-2147483648),this[W]=O&255,this[W+1]=O>>>8,this[W+2]=O>>>16,this[W+3]=O>>>24,W+4},e.prototype.writeInt32BE=function(O,W,te){return O=+O,W=W>>>0,te||De(this,O,W,4,2147483647,-2147483648),O<0&&(O=4294967295+O+1),this[W]=O>>>24,this[W+1]=O>>>16,this[W+2]=O>>>8,this[W+3]=O&255,W+4},e.prototype.writeBigInt64LE=Te(function(O,W=0){return be(this,O,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=Te(function(O,W=0){return Re(this,O,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function je(K,O,W,te,se,we){if(W+te>K.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("Index out of range")}function Se(K,O,W,te,se){return O=+O,W=W>>>0,se||je(K,O,W,4),j.write(K,O,W,te,23,4),W+4}e.prototype.writeFloatLE=function(O,W,te){return Se(this,O,W,!0,te)},e.prototype.writeFloatBE=function(O,W,te){return Se(this,O,W,!1,te)};function Ie(K,O,W,te,se){return O=+O,W=W>>>0,se||je(K,O,W,8),j.write(K,O,W,te,52,8),W+8}e.prototype.writeDoubleLE=function(O,W,te){return Ie(this,O,W,!0,te)},e.prototype.writeDoubleBE=function(O,W,te){return Ie(this,O,W,!1,te)},e.prototype.copy=function(O,W,te,se){if(!e.isBuffer(O))throw new TypeError("argument should be a Buffer");if(te||(te=0),!se&&se!==0&&(se=this.length),W>=O.length&&(W=O.length),W||(W=0),se>0&&se<te&&(se=te),se===te||O.length===0||this.length===0)return 0;if(W<0)throw new RangeError("targetStart out of bounds");if(te<0||te>=this.length)throw new RangeError("Index out of range");if(se<0)throw new RangeError("sourceEnd out of bounds");se>this.length&&(se=this.length),O.length-W<se-te&&(se=O.length-W+te);const we=se-te;return this===O&&typeof ne.prototype.copyWithin=="function"?this.copyWithin(W,te,se):ne.prototype.set.call(O,this.subarray(te,se),W),we},e.prototype.fill=function(O,W,te,se){if(typeof O=="string"){if(typeof W=="string"?(se=W,W=0,te=this.length):typeof te=="string"&&(se=te,te=this.length),se!==void 0&&typeof se!="string")throw new TypeError("encoding must be a string");if(typeof se=="string"&&!e.isEncoding(se))throw new TypeError("Unknown encoding: "+se);if(O.length===1){const de=O.charCodeAt(0);(se==="utf8"&&de<128||se==="latin1")&&(O=de)}}else typeof O=="number"?O=O&255:typeof O=="boolean"&&(O=Number(O));if(W<0||this.length<W||this.length<te)throw new RangeError("Out of range index");if(te<=W)return this;W=W>>>0,te=te===void 0?this.length:te>>>0,O||(O=0);let we;if(typeof O=="number")for(we=W;we<te;++we)this[we]=O;else{const de=e.isBuffer(O)?O:e.from(O,se),qe=de.length;if(qe===0)throw new TypeError('The value "'+O+'" is invalid for argument "value"');for(we=0;we<te-W;++we)this[we+W]=de[we%qe]}return this};const ze={};function Z(K,O,W){ze[K]=class extends W{constructor(){super(),Object.defineProperty(this,"message",{value:O.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${K}]`,this.stack,delete this.name}get code(){return K}set code(se){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:se,writable:!0})}toString(){return`${this.name} [${K}]: ${this.message}`}}}Z("ERR_BUFFER_OUT_OF_BOUNDS",function(K){return K?`${K} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Z("ERR_INVALID_ARG_TYPE",function(K,O){return`The "${K}" argument must be of type number. Received type ${typeof O}`},TypeError),Z("ERR_OUT_OF_RANGE",function(K,O,W){let te=`The value of "${K}" is out of range.`,se=W;return Number.isInteger(W)&&Math.abs(W)>2**32?se=L(String(W)):typeof W=="bigint"&&(se=String(W),(W>BigInt(2)**BigInt(32)||W<-(BigInt(2)**BigInt(32)))&&(se=L(se)),se+="n"),te+=` It must be ${O}. Received ${se}`,te},RangeError);function L(K){let O="",W=K.length;const te=K[0]==="-"?1:0;for(;W>=te+4;W-=3)O=`_${K.slice(W-3,W)}${O}`;return`${K.slice(0,W)}${O}`}function G(K,O,W){oe(O,"offset"),(K[O]===void 0||K[O+W]===void 0)&&ge(O,K.length-(W+1))}function ee(K,O,W,te,se,we){if(K>W||K<O){const de=typeof O=="bigint"?"n":"";let qe;throw O===0||O===BigInt(0)?qe=`>= 0${de} and < 2${de} ** ${(we+1)*8}${de}`:qe=`>= -(2${de} ** ${(we+1)*8-1}${de}) and < 2 ** ${(we+1)*8-1}${de}`,new ze.ERR_OUT_OF_RANGE("value",qe,K)}G(te,se,we)}function oe(K,O){if(typeof K!="number")throw new ze.ERR_INVALID_ARG_TYPE(O,"number",K)}function ge(K,O,W){throw Math.floor(K)!==K?(oe(K,W),new ze.ERR_OUT_OF_RANGE("offset","an integer",K)):O<0?new ze.ERR_BUFFER_OUT_OF_BOUNDS:new ze.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${O}`,K)}const ie=/[^+/0-9A-Za-z-_]/g;function he(K){if(K=K.split("=")[0],K=K.trim().replace(ie,""),K.length<2)return"";for(;K.length%4!==0;)K=K+"=";return K}function Oe(K,O){O=O||1/0;let W;const te=K.length;let se=null;const we=[];for(let de=0;de<te;++de){if(W=K.charCodeAt(de),W>55295&&W<57344){if(!se){if(W>56319){(O-=3)>-1&&we.push(239,191,189);continue}else if(de+1===te){(O-=3)>-1&&we.push(239,191,189);continue}se=W;continue}if(W<56320){(O-=3)>-1&&we.push(239,191,189),se=W;continue}W=(se-55296<<10|W-56320)+65536}else se&&(O-=3)>-1&&we.push(239,191,189);if(se=null,W<128){if((O-=1)<0)break;we.push(W)}else if(W<2048){if((O-=2)<0)break;we.push(W>>6|192,W&63|128)}else if(W<65536){if((O-=3)<0)break;we.push(W>>12|224,W>>6&63|128,W&63|128)}else if(W<1114112){if((O-=4)<0)break;we.push(W>>18|240,W>>12&63|128,W>>6&63|128,W&63|128)}else throw new Error("Invalid code point")}return we}function ve(K){const O=[];for(let W=0;W<K.length;++W)O.push(K.charCodeAt(W)&255);return O}function _e(K,O){let W,te,se;const we=[];for(let de=0;de<K.length&&!((O-=2)<0);++de)W=K.charCodeAt(de),te=W>>8,se=W%256,we.push(se),we.push(te);return we}function Le(K){return z.toByteArray(he(K))}function Ee(K,O,W,te){let se;for(se=0;se<te&&!(se+W>=O.length||se>=K.length);++se)O[se+W]=K[se];return se}function Pe(K,O){return K instanceof O||K!=null&&K.constructor!=null&&K.constructor.name!=null&&K.constructor.name===O.name}function He(K){return K!==K}const Be=(function(){const K="0123456789abcdef",O=new Array(256);for(let W=0;W<16;++W){const te=W*16;for(let se=0;se<16;++se)O[te+se]=K[W]+K[se]}return O})();function Te(K){return typeof BigInt>"u"?Ge:K}function Ge(){throw new Error("BigInt not supported")}})(v);const T=v.Buffer;d.Blob=v.Blob,d.BlobOptions=v.BlobOptions,d.Buffer=v.Buffer,d.File=v.File,d.FileOptions=v.FileOptions,d.INSPECT_MAX_BYTES=v.INSPECT_MAX_BYTES,d.SlowBuffer=v.SlowBuffer,d.TranscodeEncoding=v.TranscodeEncoding,d.atob=v.atob,d.btoa=v.btoa,d.constants=v.constants,d.default=T,d.isAscii=v.isAscii,d.isUtf8=v.isUtf8,d.kMaxLength=v.kMaxLength,d.kStringMaxLength=v.kStringMaxLength,d.resolveObjectURL=v.resolveObjectURL,d.transcode=v.transcode})(dist)),dist}var hasRequiredSafeBuffer$2;function requireSafeBuffer$2(){return hasRequiredSafeBuffer$2||(hasRequiredSafeBuffer$2=1,(function(d,v){var E=requireDist(),m=E.Buffer;function A(_,g){for(var b in _)g[b]=_[b]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?d.exports=E:(A(E,v),v.Buffer=a);function a(_,g,b){return m(_,g,b)}a.prototype=Object.create(m.prototype),A(m,a),a.from=function(_,g,b){if(typeof _=="number")throw new TypeError("Argument must not be a number");return m(_,g,b)},a.alloc=function(_,g,b){if(typeof _!="number")throw new TypeError("Argument must be a number");var w=m(_);return g!==void 0?typeof b=="string"?w.fill(g,b):w.fill(g):w.fill(0),w},a.allocUnsafe=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return m(_)},a.allocUnsafeSlow=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return E.SlowBuffer(_)}})(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}var hasRequiredBrowser$d;function requireBrowser$d(){if(hasRequiredBrowser$d)return browser$d.exports;hasRequiredBrowser$d=1;var d=65536,v=4294967295;function E(){throw new Error(`Secure random number generation is not supported by this browser.
2
+ Use Chrome, Firefox or Internet Explorer 11`)}var m=requireSafeBuffer$2().Buffer,A=commonjsGlobal.crypto||commonjsGlobal.msCrypto;A&&A.getRandomValues?browser$d.exports=a:browser$d.exports=E;function a(_,g){if(_>v)throw new RangeError("requested too many random bytes");var b=m.allocUnsafe(_);if(_>0)if(_>d)for(var w=0;w<_;w+=d)A.getRandomValues(b.slice(w,w+d));else A.getRandomValues(b);return typeof g=="function"?process$1.nextTick(function(){g(null,b)}):b}return browser$d.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(v,E){v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})}:inherits_browser$8.exports=function(v,E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}),inherits_browser$8.exports}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var d=typeof Reflect=="object"?Reflect:null,v=d&&typeof d.apply=="function"?d.apply:function(V,Q,ne){return Function.prototype.apply.call(V,Q,ne)},E;d&&typeof d.ownKeys=="function"?E=d.ownKeys:Object.getOwnPropertySymbols?E=function(V){return Object.getOwnPropertyNames(V).concat(Object.getOwnPropertySymbols(V))}:E=function(V){return Object.getOwnPropertyNames(V)};function m(j){console&&console.warn&&console.warn(j)}var A=Number.isNaN||function(V){return V!==V};function a(){a.init.call(this)}events.exports=a,events.exports.once=T,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var _=10;function g(j){if(typeof j!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof j)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(j){if(typeof j!="number"||j<0||A(j))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+j+".");_=j}}),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(V){if(typeof V!="number"||V<0||A(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 b(j){return j._maxListeners===void 0?a.defaultMaxListeners:j._maxListeners}a.prototype.getMaxListeners=function(){return b(this)},a.prototype.emit=function(V){for(var Q=[],ne=1;ne<arguments.length;ne++)Q.push(arguments[ne]);var ae=V==="error",U=this._events;if(U!==void 0)ae=ae&&U.error===void 0;else if(!ae)return!1;if(ae){var fe;if(Q.length>0&&(fe=Q[0]),fe instanceof Error)throw fe;var p=new Error("Unhandled error."+(fe?" ("+fe.message+")":""));throw p.context=fe,p}var e=U[V];if(e===void 0)return!1;if(typeof e=="function")v(e,this,Q);else for(var t=e.length,n=R(e,t),ne=0;ne<t;++ne)v(n[ne],this,Q);return!0};function w(j,V,Q,ne){var ae,U,fe;if(g(Q),U=j._events,U===void 0?(U=j._events=Object.create(null),j._eventsCount=0):(U.newListener!==void 0&&(j.emit("newListener",V,Q.listener?Q.listener:Q),U=j._events),fe=U[V]),fe===void 0)fe=U[V]=Q,++j._eventsCount;else if(typeof fe=="function"?fe=U[V]=ne?[Q,fe]:[fe,Q]:ne?fe.unshift(Q):fe.push(Q),ae=b(j),ae>0&&fe.length>ae&&!fe.warned){fe.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+fe.length+" "+String(V)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=j,p.type=V,p.count=fe.length,m(p)}return j}a.prototype.addListener=function(V,Q){return w(this,V,Q,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(V,Q){return w(this,V,Q,!0)};function l(){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 M(j,V,Q){var ne={fired:!1,wrapFn:void 0,target:j,type:V,listener:Q},ae=l.bind(ne);return ae.listener=Q,ne.wrapFn=ae,ae}a.prototype.once=function(V,Q){return g(Q),this.on(V,M(this,V,Q)),this},a.prototype.prependOnceListener=function(V,Q){return g(Q),this.prependListener(V,M(this,V,Q)),this},a.prototype.removeListener=function(V,Q){var ne,ae,U,fe,p;if(g(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(U=-1,fe=ne.length-1;fe>=0;fe--)if(ne[fe]===Q||ne[fe].listener===Q){p=ne[fe].listener,U=fe;break}if(U<0)return this;U===0?ne.shift():S(ne,U),ne.length===1&&(ae[V]=ne[0]),ae.removeListener!==void 0&&this.emit("removeListener",V,p||Q)}return this},a.prototype.off=a.prototype.removeListener,a.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 U=Object.keys(ne),fe;for(ae=0;ae<U.length;++ae)fe=U[ae],fe!=="removeListener"&&this.removeAllListeners(fe);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 y(j,V,Q){var ne=j._events;if(ne===void 0)return[];var ae=ne[V];return ae===void 0?[]:typeof ae=="function"?Q?[ae.listener||ae]:[ae]:Q?P(ae):R(ae,ae.length)}a.prototype.listeners=function(V){return y(this,V,!0)},a.prototype.rawListeners=function(V){return y(this,V,!1)},a.listenerCount=function(j,V){return typeof j.listenerCount=="function"?j.listenerCount(V):B.call(j,V)},a.prototype.listenerCount=B;function B(j){var V=this._events;if(V!==void 0){var Q=V[j];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function R(j,V){for(var Q=new Array(V),ne=0;ne<V;++ne)Q[ne]=j[ne];return Q}function S(j,V){for(;V+1<j.length;V++)j[V]=j[V+1];j.pop()}function P(j){for(var V=new Array(j.length),Q=0;Q<V.length;++Q)V[Q]=j[Q].listener||j[Q];return V}function T(j,V){return new Promise(function(Q,ne){function ae(fe){j.removeListener(V,U),ne(fe)}function U(){typeof j.removeListener=="function"&&j.removeListener("error",ae),Q([].slice.call(arguments))}z(j,V,U,{once:!0}),V!=="error"&&k(j,ae,{once:!0})})}function k(j,V,Q){typeof j.on=="function"&&z(j,"error",V,Q)}function z(j,V,Q,ne){if(typeof j.on=="function")ne.once?j.once(V,Q):j.on(V,Q);else if(typeof j.addEventListener=="function")j.addEventListener(V,function ae(U){ne.once&&j.removeEventListener(V,ae),Q(U)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof j)}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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$7.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),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 v={},E=Symbol("test"),m=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(m)!=="[object Symbol]")return!1;var A=42;v[E]=A;for(var a in v)return!1;if(typeof Object.keys=="function"&&Object.keys(v).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(v).length!==0)return!1;var _=Object.getOwnPropertySymbols(v);if(_.length!==1||_[0]!==E||!Object.prototype.propertyIsEnumerable.call(v,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var g=Object.getOwnPropertyDescriptor(v,E);if(g.value!==A||g.enumerable!==!0)return!1}return!0}),shams$1}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var d=requireShams$1();return shams=function(){return d()&&!!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$1,hasRequiredRange$1;function requireRange$1(){return hasRequiredRange$1||(hasRequiredRange$1=1,range$1=RangeError),range$1}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(v){return v!==v}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var d=require_isNaN();return sign$1=function(E){return d(E)||E===0?E:E<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 d=requireGOPD();if(d)try{d([],"length")}catch{d=null}return gopd=d,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var d=Object.defineProperty||!1;if(d)try{d({},"a",{value:1})}catch{d=!1}return esDefineProperty=d,esDefineProperty}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var d=typeof Symbol<"u"&&Symbol,v=requireShams$1();return hasSymbols=function(){return typeof d!="function"||typeof Symbol!="function"||typeof d("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:v()},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 d=requireEsObjectAtoms();return Object_getPrototypeOf=d.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var d="Function.prototype.bind called on incompatible ",v=Object.prototype.toString,E=Math.max,m="[object Function]",A=function(b,w){for(var l=[],M=0;M<b.length;M+=1)l[M]=b[M];for(var y=0;y<w.length;y+=1)l[y+b.length]=w[y];return l},a=function(b,w){for(var l=[],M=w,y=0;M<b.length;M+=1,y+=1)l[y]=b[M];return l},_=function(g,b){for(var w="",l=0;l<g.length;l+=1)w+=g[l],l+1<g.length&&(w+=b);return w};return implementation=function(b){var w=this;if(typeof w!="function"||v.apply(w)!==m)throw new TypeError(d+w);for(var l=a(arguments,1),M,y=function(){if(this instanceof M){var T=w.apply(this,A(l,arguments));return Object(T)===T?T:this}return w.apply(b,A(l,arguments))},B=E(0,w.length-l.length),R=[],S=0;S<B;S++)R[S]="$"+S;if(M=Function("binder","return function ("+_(R,",")+"){ return binder.apply(this,arguments); }")(y),w.prototype){var P=function(){};P.prototype=w.prototype,M.prototype=new P,P.prototype=null}return M},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var d=requireImplementation();return functionBind=Function.prototype.bind||d,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 d=requireFunctionBind(),v=requireFunctionApply(),E=requireFunctionCall(),m=requireReflectApply();return actualApply=m||d.call(E,v),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var d=requireFunctionBind(),v=requireType(),E=requireFunctionCall(),m=requireActualApply();return callBindApplyHelpers=function(a){if(a.length<1||typeof a[0]!="function")throw new v("a function is required");return m(d,E,a)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var d=requireCallBindApplyHelpers(),v=requireGopd(),E;try{E=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var m=!!E&&v&&v(Object.prototype,"__proto__"),A=Object,a=A.getPrototypeOf;return get=m&&typeof m.get=="function"?d([m.get]):typeof a=="function"?function(g){return a(g==null?g:A(g))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var d=requireReflect_getPrototypeOf(),v=requireObject_getPrototypeOf(),E=requireGet();return getProto=d?function(A){return d(A)}:v?function(A){if(!A||typeof A!="object"&&typeof A!="function")throw new TypeError("getProto: not an object");return v(A)}:E?function(A){return E(A)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var d=Function.prototype.call,v=Object.prototype.hasOwnProperty,E=requireFunctionBind();return hasown=E.call(d,v),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var d,v=requireEsObjectAtoms(),E=requireEsErrors(),m=require_eval(),A=requireRange$1(),a=requireRef(),_=requireSyntax(),g=requireType(),b=requireUri(),w=requireAbs(),l=requireFloor(),M=requireMax(),y=requireMin(),B=requirePow(),R=requireRound(),S=requireSign$1(),P=Function,T=function(C){try{return P('"use strict"; return ('+C+").constructor;")()}catch{}},k=requireGopd(),z=requireEsDefineProperty(),j=function(){throw new g},V=k?(function(){try{return arguments.callee,j}catch{try{return k(arguments,"callee").get}catch{return j}}})():j,Q=requireHasSymbols()(),ne=requireGetProto(),ae=requireObject_getPrototypeOf(),U=requireReflect_getPrototypeOf(),fe=requireFunctionApply(),p=requireFunctionCall(),e={},t=typeof Uint8Array>"u"||!ne?d:ne(Uint8Array),n={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?d:ArrayBuffer,"%ArrayIteratorPrototype%":Q&&ne?ne([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":e,"%AsyncGenerator%":e,"%AsyncGeneratorFunction%":e,"%AsyncIteratorPrototype%":e,"%Atomics%":typeof Atomics>"u"?d:Atomics,"%BigInt%":typeof BigInt>"u"?d:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?d:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?d:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":m,"%Float16Array%":typeof Float16Array>"u"?d:Float16Array,"%Float32Array%":typeof Float32Array>"u"?d:Float32Array,"%Float64Array%":typeof Float64Array>"u"?d:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?d:FinalizationRegistry,"%Function%":P,"%GeneratorFunction%":e,"%Int8Array%":typeof Int8Array>"u"?d:Int8Array,"%Int16Array%":typeof Int16Array>"u"?d:Int16Array,"%Int32Array%":typeof Int32Array>"u"?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Q&&ne?ne(ne([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%Map%":typeof Map>"u"?d:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Q||!ne?d:ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":v,"%Object.getOwnPropertyDescriptor%":k,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?d:Promise,"%Proxy%":typeof Proxy>"u"?d:Proxy,"%RangeError%":A,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?d:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?d:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Q||!ne?d:ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Q&&ne?ne(""[Symbol.iterator]()):d,"%Symbol%":Q?Symbol:d,"%SyntaxError%":_,"%ThrowTypeError%":V,"%TypedArray%":t,"%TypeError%":g,"%Uint8Array%":typeof Uint8Array>"u"?d:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?d:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?d:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?d:Uint32Array,"%URIError%":b,"%WeakMap%":typeof WeakMap>"u"?d:WeakMap,"%WeakRef%":typeof WeakRef>"u"?d:WeakRef,"%WeakSet%":typeof WeakSet>"u"?d:WeakSet,"%Function.prototype.call%":p,"%Function.prototype.apply%":fe,"%Object.defineProperty%":z,"%Object.getPrototypeOf%":ae,"%Math.abs%":w,"%Math.floor%":l,"%Math.max%":M,"%Math.min%":y,"%Math.pow%":B,"%Math.round%":R,"%Math.sign%":S,"%Reflect.getPrototypeOf%":U};if(ne)try{null.error}catch(C){var f=ne(ne(C));n["%Error.prototype%"]=f}var s=function C(N){var F;if(N==="%AsyncFunction%")F=T("async function () {}");else if(N==="%GeneratorFunction%")F=T("function* () {}");else if(N==="%AsyncGeneratorFunction%")F=T("async function* () {}");else if(N==="%AsyncGenerator%"){var D=C("%AsyncGeneratorFunction%");D&&(F=D.prototype)}else if(N==="%AsyncIteratorPrototype%"){var X=C("%AsyncGenerator%");X&&ne&&(F=ne(X.prototype))}return n[N]=F,F},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"]},c=requireFunctionBind(),o=requireHasown(),r=c.call(p,Array.prototype.concat),h=c.call(fe,Array.prototype.splice),q=c.call(p,String.prototype.replace),$=c.call(p,String.prototype.slice),H=c.call(p,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J=/\\(\\)?/g,x=function(N){var F=$(N,0,1),D=$(N,-1);if(F==="%"&&D!=="%")throw new _("invalid intrinsic syntax, expected closing `%`");if(D==="%"&&F!=="%")throw new _("invalid intrinsic syntax, expected opening `%`");var X=[];return q(N,Y,function(le,ue,pe,Ce){X[X.length]=pe?q(Ce,J,"$1"):ue||le}),X},I=function(N,F){var D=N,X;if(o(u,D)&&(X=u[D],D="%"+X[0]+"%"),o(n,D)){var le=n[D];if(le===e&&(le=s(D)),typeof le>"u"&&!F)throw new g("intrinsic "+N+" exists, but is not available. Please file an issue!");return{alias:X,name:D,value:le}}throw new _("intrinsic "+N+" does not exist!")};return getIntrinsic=function(N,F){if(typeof N!="string"||N.length===0)throw new g("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof F!="boolean")throw new g('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,N)===null)throw new _("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=x(N),X=D.length>0?D[0]:"",le=I("%"+X+"%",F),ue=le.name,pe=le.value,Ce=!1,me=le.alias;me&&(X=me[0],h(D,r([0,1],me)));for(var ce=1,Ne=!0;ce<D.length;ce+=1){var ye=D[ce],Me=$(ye,0,1),De=$(ye,-1);if((Me==='"'||Me==="'"||Me==="`"||De==='"'||De==="'"||De==="`")&&Me!==De)throw new _("property names with quotes must have matching quotes");if((ye==="constructor"||!Ne)&&(Ce=!0),X+="."+ye,ue="%"+X+"%",o(n,ue))pe=n[ue];else if(pe!=null){if(!(ye in pe)){if(!F)throw new g("base intrinsic for "+N+" exists, but the property is not available.");return}if(k&&ce+1>=D.length){var be=k(pe,ye);Ne=!!be,Ne&&"get"in be&&!("originalValue"in be.get)?pe=be.get:pe=pe[ye]}else Ne=o(pe,ye),pe=pe[ye];Ne&&!Ce&&(n[ue]=pe)}}return pe},getIntrinsic}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var d=requireGetIntrinsic(),v=requireCallBindApplyHelpers(),E=v([d("%String.prototype.indexOf%")]);return callBound=function(A,a){var _=d(A,!!a);return typeof _=="function"&&E(A,".prototype.")>-1?v([_]):_},callBound}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var d=requireShams()(),v=requireCallBound(),E=v("Object.prototype.toString"),m=function(g){return d&&g&&typeof g=="object"&&Symbol.toStringTag in g?!1:E(g)==="[object Arguments]"},A=function(g){return m(g)?!0:g!==null&&typeof g=="object"&&"length"in g&&typeof g.length=="number"&&g.length>=0&&E(g)!=="[object Array]"&&"callee"in g&&E(g.callee)==="[object Function]"},a=(function(){return m(arguments)})();return m.isLegacyArguments=A,isArguments=a?m:A,isArguments}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var d=requireCallBound(),v=requireShams()(),E=requireHasown(),m=requireGopd(),A;if(v){var a=d("RegExp.prototype.exec"),_={},g=function(){throw _},b={toString:g,valueOf:g};typeof Symbol.toPrimitive=="symbol"&&(b[Symbol.toPrimitive]=g),A=function(y){if(!y||typeof y!="object")return!1;var B=m(y,"lastIndex"),R=B&&E(B,"value");if(!R)return!1;try{a(y,b)}catch(S){return S===_}}}else{var w=d("Object.prototype.toString"),l="[object RegExp]";A=function(y){return!y||typeof y!="object"&&typeof y!="function"?!1:w(y)===l}}return isRegex=A,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var d=requireCallBound(),v=requireIsRegex(),E=d("RegExp.prototype.exec"),m=requireType();return safeRegexTest=function(a){if(!v(a))throw new m("`regex` must be a RegExp");return function(g){return E(a,g)!==null}},safeRegexTest}var generatorFunction,hasRequiredGeneratorFunction;function requireGeneratorFunction(){if(hasRequiredGeneratorFunction)return generatorFunction;hasRequiredGeneratorFunction=1;const d=(function*(){}).constructor;return generatorFunction=()=>d,generatorFunction}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var d=requireCallBound(),v=requireSafeRegexTest(),E=v(/^\s*(?:function)?\*/),m=requireShams()(),A=requireGetProto(),a=d("Object.prototype.toString"),_=d("Function.prototype.toString"),g=requireGeneratorFunction();return isGeneratorFunction=function(w){if(typeof w!="function")return!1;if(E(_(w)))return!0;if(!m){var l=a(w);return l==="[object GeneratorFunction]"}if(!A)return!1;var M=g();return M&&A(w)===M.prototype},isGeneratorFunction}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var d=Function.prototype.toString,v=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,m;if(typeof v=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw m}}),m={},v(function(){throw 42},null,E)}catch(k){k!==m&&(v=null)}else v=null;var A=/^\s*class\b/,a=function(z){try{var j=d.call(z);return A.test(j)}catch{return!1}},_=function(z){try{return a(z)?!1:(d.call(z),!0)}catch{return!1}},g=Object.prototype.toString,b="[object Object]",w="[object Function]",l="[object GeneratorFunction]",M="[object HTMLAllCollection]",y="[object HTML document.all class]",B="[object HTMLCollection]",R=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),P=function(){return!1};if(typeof document=="object"){var T=document.all;g.call(T)===g.call(document.all)&&(P=function(z){if((S||!z)&&(typeof z>"u"||typeof z=="object"))try{var j=g.call(z);return(j===M||j===y||j===B||j===b)&&z("")==null}catch{}return!1})}return isCallable=v?function(z){if(P(z))return!0;if(!z||typeof z!="function"&&typeof z!="object")return!1;try{v(z,null,E)}catch(j){if(j!==m)return!1}return!a(z)&&_(z)}:function(z){if(P(z))return!0;if(!z||typeof z!="function"&&typeof z!="object")return!1;if(R)return _(z);if(a(z))return!1;var j=g.call(z);return j!==w&&j!==l&&!/^\[object HTML/.test(j)?!1:_(z)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var d=requireIsCallable(),v=Object.prototype.toString,E=Object.prototype.hasOwnProperty,m=function(b,w,l){for(var M=0,y=b.length;M<y;M++)E.call(b,M)&&(l==null?w(b[M],M,b):w.call(l,b[M],M,b))},A=function(b,w,l){for(var M=0,y=b.length;M<y;M++)l==null?w(b.charAt(M),M,b):w.call(l,b.charAt(M),M,b)},a=function(b,w,l){for(var M in b)E.call(b,M)&&(l==null?w(b[M],M,b):w.call(l,b[M],M,b))};function _(g){return v.call(g)==="[object Array]"}return forEach=function(b,w,l){if(!d(w))throw new TypeError("iterator must be a function");var M;arguments.length>=3&&(M=l),_(b)?m(b,w,M):typeof b=="string"?A(b,w,M):a(b,w,M)},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 d=requirePossibleTypedArrayNames(),v=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var m=[],A=0;A<d.length;A++)typeof v[d[A]]=="function"&&(m[m.length]=d[A]);return m},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var d=requireEsDefineProperty(),v=requireSyntax(),E=requireType(),m=requireGopd();return defineDataProperty=function(a,_,g){if(!a||typeof a!="object"&&typeof a!="function")throw new E("`obj` must be an object or a function`");if(typeof _!="string"&&typeof _!="symbol")throw new E("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var b=arguments.length>3?arguments[3]:null,w=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,M=arguments.length>6?arguments[6]:!1,y=!!m&&m(a,_);if(d)d(a,_,{configurable:l===null&&y?y.configurable:!l,enumerable:b===null&&y?y.enumerable:!b,value:g,writable:w===null&&y?y.writable:!w});else if(M||!b&&!w&&!l)a[_]=g;else throw new v("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 d=requireEsDefineProperty(),v=function(){return!!d};return v.hasArrayLengthDefineBug=function(){if(!d)return null;try{return d([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=v,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var d=requireGetIntrinsic(),v=requireDefineDataProperty(),E=requireHasPropertyDescriptors()(),m=requireGopd(),A=requireType(),a=d("%Math.floor%");return setFunctionLength=function(g,b){if(typeof g!="function")throw new A("`fn` is not a function");if(typeof b!="number"||b<0||b>4294967295||a(b)!==b)throw new A("`length` must be a positive 32-bit integer");var w=arguments.length>2&&!!arguments[2],l=!0,M=!0;if("length"in g&&m){var y=m(g,"length");y&&!y.configurable&&(l=!1),y&&!y.writable&&(M=!1)}return(l||M||!w)&&(E?v(g,"length",b,!0,!0):v(g,"length",b)),g},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var d=requireFunctionBind(),v=requireFunctionApply(),E=requireActualApply();return applyBind=function(){return E(d,v,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,(function(d){var v=requireSetFunctionLength(),E=requireEsDefineProperty(),m=requireCallBindApplyHelpers(),A=requireApplyBind();d.exports=function(_){var g=m(arguments),b=_.length-(arguments.length-1);return v(g,1+(b>0?b:0),!0)},E?E(d.exports,"apply",{value:A}):d.exports.apply=A})(callBind)),callBind.exports}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var d=requireForEach(),v=requireAvailableTypedArrays(),E=requireCallBind(),m=requireCallBound(),A=requireGopd(),a=requireGetProto(),_=m("Object.prototype.toString"),g=requireShams()(),b=typeof globalThis>"u"?commonjsGlobal:globalThis,w=v(),l=m("String.prototype.slice"),M=m("Array.prototype.indexOf",!0)||function(P,T){for(var k=0;k<P.length;k+=1)if(P[k]===T)return k;return-1},y={__proto__:null};g&&A&&a?d(w,function(S){var P=new b[S];if(Symbol.toStringTag in P&&a){var T=a(P),k=A(T,Symbol.toStringTag);if(!k&&T){var z=a(T);k=A(z,Symbol.toStringTag)}if(k&&k.get){var j=E(k.get);y["$"+S]=j}}}):d(w,function(S){var P=new b[S],T=P.slice||P.set;if(T){var k=E(T);y["$"+S]=k}});var B=function(P){var T=!1;return d(y,function(k,z){if(!T)try{"$"+k(P)===z&&(T=l(z,1))}catch{}}),T},R=function(P){var T=!1;return d(y,function(k,z){if(!T)try{k(P),T=l(z,1)}catch{}}),T};return whichTypedArray=function(P){if(!P||typeof P!="object")return!1;if(!g){var T=l(_(P),8,-1);return M(w,T)>-1?T:T!=="Object"?!1:R(P)}return A?B(P):null},whichTypedArray}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var d=requireWhichTypedArray();return isTypedArray=function(E){return!!d(E)},isTypedArray}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,(function(d){var v=requireIsArguments(),E=requireIsGeneratorFunction(),m=requireWhichTypedArray(),A=requireIsTypedArray();function a(ce){return ce.call.bind(ce)}var _=typeof BigInt<"u",g=typeof Symbol<"u",b=a(Object.prototype.toString),w=a(Number.prototype.valueOf),l=a(String.prototype.valueOf),M=a(Boolean.prototype.valueOf);if(_)var y=a(BigInt.prototype.valueOf);if(g)var B=a(Symbol.prototype.valueOf);function R(ce,Ne){if(typeof ce!="object")return!1;try{return Ne(ce),!0}catch{return!1}}d.isArgumentsObject=v,d.isGeneratorFunction=E,d.isTypedArray=A;function S(ce){return typeof Promise<"u"&&ce instanceof Promise||ce!==null&&typeof ce=="object"&&typeof ce.then=="function"&&typeof ce.catch=="function"}d.isPromise=S;function P(ce){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ce):A(ce)||$(ce)}d.isArrayBufferView=P;function T(ce){return m(ce)==="Uint8Array"}d.isUint8Array=T;function k(ce){return m(ce)==="Uint8ClampedArray"}d.isUint8ClampedArray=k;function z(ce){return m(ce)==="Uint16Array"}d.isUint16Array=z;function j(ce){return m(ce)==="Uint32Array"}d.isUint32Array=j;function V(ce){return m(ce)==="Int8Array"}d.isInt8Array=V;function Q(ce){return m(ce)==="Int16Array"}d.isInt16Array=Q;function ne(ce){return m(ce)==="Int32Array"}d.isInt32Array=ne;function ae(ce){return m(ce)==="Float32Array"}d.isFloat32Array=ae;function U(ce){return m(ce)==="Float64Array"}d.isFloat64Array=U;function fe(ce){return m(ce)==="BigInt64Array"}d.isBigInt64Array=fe;function p(ce){return m(ce)==="BigUint64Array"}d.isBigUint64Array=p;function e(ce){return b(ce)==="[object Map]"}e.working=typeof Map<"u"&&e(new Map);function t(ce){return typeof Map>"u"?!1:e.working?e(ce):ce instanceof Map}d.isMap=t;function n(ce){return b(ce)==="[object Set]"}n.working=typeof Set<"u"&&n(new Set);function f(ce){return typeof Set>"u"?!1:n.working?n(ce):ce instanceof Set}d.isSet=f;function s(ce){return b(ce)==="[object WeakMap]"}s.working=typeof WeakMap<"u"&&s(new WeakMap);function u(ce){return typeof WeakMap>"u"?!1:s.working?s(ce):ce instanceof WeakMap}d.isWeakMap=u;function c(ce){return b(ce)==="[object WeakSet]"}c.working=typeof WeakSet<"u"&&c(new WeakSet);function o(ce){return c(ce)}d.isWeakSet=o;function r(ce){return b(ce)==="[object ArrayBuffer]"}r.working=typeof ArrayBuffer<"u"&&r(new ArrayBuffer);function h(ce){return typeof ArrayBuffer>"u"?!1:r.working?r(ce):ce instanceof ArrayBuffer}d.isArrayBuffer=h;function q(ce){return b(ce)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function $(ce){return typeof DataView>"u"?!1:q.working?q(ce):ce instanceof DataView}d.isDataView=$;var H=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Y(ce){return b(ce)==="[object SharedArrayBuffer]"}function J(ce){return typeof H>"u"?!1:(typeof Y.working>"u"&&(Y.working=Y(new H)),Y.working?Y(ce):ce instanceof H)}d.isSharedArrayBuffer=J;function x(ce){return b(ce)==="[object AsyncFunction]"}d.isAsyncFunction=x;function I(ce){return b(ce)==="[object Map Iterator]"}d.isMapIterator=I;function C(ce){return b(ce)==="[object Set Iterator]"}d.isSetIterator=C;function N(ce){return b(ce)==="[object Generator]"}d.isGeneratorObject=N;function F(ce){return b(ce)==="[object WebAssembly.Module]"}d.isWebAssemblyCompiledModule=F;function D(ce){return R(ce,w)}d.isNumberObject=D;function X(ce){return R(ce,l)}d.isStringObject=X;function le(ce){return R(ce,M)}d.isBooleanObject=le;function ue(ce){return _&&R(ce,y)}d.isBigIntObject=ue;function pe(ce){return g&&R(ce,B)}d.isSymbolObject=pe;function Ce(ce){return D(ce)||X(ce)||le(ce)||ue(ce)||pe(ce)}d.isBoxedPrimitive=Ce;function me(ce){return typeof Uint8Array<"u"&&(h(ce)||J(ce))}d.isAnyArrayBuffer=me,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ce){Object.defineProperty(d,ce,{enumerable:!1,value:function(){throw new Error(ce+" is not supported in userland")}})})})(types)),types}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,(function(d){var v=Object.getOwnPropertyDescriptors||function($){for(var H=Object.keys($),Y={},J=0;J<H.length;J++)Y[H[J]]=Object.getOwnPropertyDescriptor($,H[J]);return Y},E=/%[sdj%]/g;d.format=function(q){if(!V(q)){for(var $=[],H=0;H<arguments.length;H++)$.push(_(arguments[H]));return $.join(" ")}for(var H=1,Y=arguments,J=Y.length,x=String(q).replace(E,function(C){if(C==="%%")return"%";if(H>=J)return C;switch(C){case"%s":return String(Y[H++]);case"%d":return Number(Y[H++]);case"%j":try{return JSON.stringify(Y[H++])}catch{return"[Circular]"}default:return C}}),I=Y[H];H<J;I=Y[++H])k(I)||!U(I)?x+=" "+I:x+=" "+_(I);return x},d.deprecate=function(q,$){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return q;if(typeof process$1>"u")return function(){return d.deprecate(q,$).apply(this,arguments)};var H=!1;function Y(){if(!H){if(process$1.throwDeprecation)throw new Error($);process$1.traceDeprecation?console.trace($):console.error($),H=!0}return q.apply(this,arguments)}return Y};var m={},A=/^$/;if(process$1.env.NODE_DEBUG){var a=process$1.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),A=new RegExp("^"+a+"$","i")}d.debuglog=function(q){if(q=q.toUpperCase(),!m[q])if(A.test(q)){var $=process$1.pid;m[q]=function(){var H=d.format.apply(d,arguments);console.error("%s %d: %s",q,$,H)}}else m[q]=function(){};return m[q]};function _(q,$){var H={seen:[],stylize:b};return arguments.length>=3&&(H.depth=arguments[2]),arguments.length>=4&&(H.colors=arguments[3]),T($)?H.showHidden=$:$&&d._extend(H,$),ne(H.showHidden)&&(H.showHidden=!1),ne(H.depth)&&(H.depth=2),ne(H.colors)&&(H.colors=!1),ne(H.customInspect)&&(H.customInspect=!0),H.colors&&(H.stylize=g),l(H,q,H.depth)}d.inspect=_,_.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]},_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function g(q,$){var H=_.styles[$];return H?"\x1B["+_.colors[H][0]+"m"+q+"\x1B["+_.colors[H][1]+"m":q}function b(q,$){return q}function w(q){var $={};return q.forEach(function(H,Y){$[H]=!0}),$}function l(q,$,H){if(q.customInspect&&$&&e($.inspect)&&$.inspect!==d.inspect&&!($.constructor&&$.constructor.prototype===$)){var Y=$.inspect(H,q);return V(Y)||(Y=l(q,Y,H)),Y}var J=M(q,$);if(J)return J;var x=Object.keys($),I=w(x);if(q.showHidden&&(x=Object.getOwnPropertyNames($)),p($)&&(x.indexOf("message")>=0||x.indexOf("description")>=0))return y($);if(x.length===0){if(e($)){var C=$.name?": "+$.name:"";return q.stylize("[Function"+C+"]","special")}if(ae($))return q.stylize(RegExp.prototype.toString.call($),"regexp");if(fe($))return q.stylize(Date.prototype.toString.call($),"date");if(p($))return y($)}var N="",F=!1,D=["{","}"];if(P($)&&(F=!0,D=["[","]"]),e($)){var X=$.name?": "+$.name:"";N=" [Function"+X+"]"}if(ae($)&&(N=" "+RegExp.prototype.toString.call($)),fe($)&&(N=" "+Date.prototype.toUTCString.call($)),p($)&&(N=" "+y($)),x.length===0&&(!F||$.length==0))return D[0]+N+D[1];if(H<0)return ae($)?q.stylize(RegExp.prototype.toString.call($),"regexp"):q.stylize("[Object]","special");q.seen.push($);var le;return F?le=B(q,$,H,I,x):le=x.map(function(ue){return R(q,$,H,I,ue,F)}),q.seen.pop(),S(le,N,D)}function M(q,$){if(ne($))return q.stylize("undefined","undefined");if(V($)){var H="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(H,"string")}if(j($))return q.stylize(""+$,"number");if(T($))return q.stylize(""+$,"boolean");if(k($))return q.stylize("null","null")}function y(q){return"["+Error.prototype.toString.call(q)+"]"}function B(q,$,H,Y,J){for(var x=[],I=0,C=$.length;I<C;++I)c($,String(I))?x.push(R(q,$,H,Y,String(I),!0)):x.push("");return J.forEach(function(N){N.match(/^\d+$/)||x.push(R(q,$,H,Y,N,!0))}),x}function R(q,$,H,Y,J,x){var I,C,N;if(N=Object.getOwnPropertyDescriptor($,J)||{value:$[J]},N.get?N.set?C=q.stylize("[Getter/Setter]","special"):C=q.stylize("[Getter]","special"):N.set&&(C=q.stylize("[Setter]","special")),c(Y,J)||(I="["+J+"]"),C||(q.seen.indexOf(N.value)<0?(k(H)?C=l(q,N.value,null):C=l(q,N.value,H-1),C.indexOf(`
3
+ `)>-1&&(x?C=C.split(`
4
+ `).map(function(F){return" "+F}).join(`
5
+ `).slice(2):C=`
6
+ `+C.split(`
7
+ `).map(function(F){return" "+F}).join(`
8
+ `))):C=q.stylize("[Circular]","special")),ne(I)){if(x&&J.match(/^\d+$/))return C;I=JSON.stringify(""+J),I.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(I=I.slice(1,-1),I=q.stylize(I,"name")):(I=I.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),I=q.stylize(I,"string"))}return I+": "+C}function S(q,$,H){var Y=q.reduce(function(J,x){return x.indexOf(`
9
+ `)>=0,J+x.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Y>60?H[0]+($===""?"":$+`
10
+ `)+" "+q.join(`,
11
+ `)+" "+H[1]:H[0]+$+" "+q.join(", ")+" "+H[1]}d.types=requireTypes();function P(q){return Array.isArray(q)}d.isArray=P;function T(q){return typeof q=="boolean"}d.isBoolean=T;function k(q){return q===null}d.isNull=k;function z(q){return q==null}d.isNullOrUndefined=z;function j(q){return typeof q=="number"}d.isNumber=j;function V(q){return typeof q=="string"}d.isString=V;function Q(q){return typeof q=="symbol"}d.isSymbol=Q;function ne(q){return q===void 0}d.isUndefined=ne;function ae(q){return U(q)&&n(q)==="[object RegExp]"}d.isRegExp=ae,d.types.isRegExp=ae;function U(q){return typeof q=="object"&&q!==null}d.isObject=U;function fe(q){return U(q)&&n(q)==="[object Date]"}d.isDate=fe,d.types.isDate=fe;function p(q){return U(q)&&(n(q)==="[object Error]"||q instanceof Error)}d.isError=p,d.types.isNativeError=p;function e(q){return typeof q=="function"}d.isFunction=e;function t(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}d.isPrimitive=t,d.isBuffer=requireIsBufferBrowser();function n(q){return Object.prototype.toString.call(q)}function f(q){return q<10?"0"+q.toString(10):q.toString(10)}var s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u(){var q=new Date,$=[f(q.getHours()),f(q.getMinutes()),f(q.getSeconds())].join(":");return[q.getDate(),s[q.getMonth()],$].join(" ")}d.log=function(){console.log("%s - %s",u(),d.format.apply(d,arguments))},d.inherits=requireInherits_browser$8(),d._extend=function(q,$){if(!$||!U($))return q;for(var H=Object.keys($),Y=H.length;Y--;)q[H[Y]]=$[H[Y]];return q};function c(q,$){return Object.prototype.hasOwnProperty.call(q,$)}var o=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;d.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(o&&$[o]){var H=$[o];if(typeof H!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(H,o,{value:H,enumerable:!1,writable:!1,configurable:!0}),H}function H(){for(var Y,J,x=new Promise(function(N,F){Y=N,J=F}),I=[],C=0;C<arguments.length;C++)I.push(arguments[C]);I.push(function(N,F){N?J(N):Y(F)});try{$.apply(this,I)}catch(N){J(N)}return x}return Object.setPrototypeOf(H,Object.getPrototypeOf($)),o&&Object.defineProperty(H,o,{value:H,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(H,v($))},d.promisify.custom=o;function r(q,$){if(!q){var H=new Error("Promise was rejected with a falsy value");H.reason=q,q=H}return $(q)}function h(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');function $(){for(var H=[],Y=0;Y<arguments.length;Y++)H.push(arguments[Y]);var J=H.pop();if(typeof J!="function")throw new TypeError("The last argument must be of type Function");var x=this,I=function(){return J.apply(x,arguments)};q.apply(this,H).then(function(C){process$1.nextTick(I.bind(null,null,C))},function(C){process$1.nextTick(r.bind(null,C,I))})}return Object.setPrototypeOf($,Object.getPrototypeOf(q)),Object.defineProperties($,v(q)),$}d.callbackify=h})(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function d(R,S){var P=Object.keys(R);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(R);S&&(T=T.filter(function(k){return Object.getOwnPropertyDescriptor(R,k).enumerable})),P.push.apply(P,T)}return P}function v(R){for(var S=1;S<arguments.length;S++){var P=arguments[S]!=null?arguments[S]:{};S%2?d(Object(P),!0).forEach(function(T){E(R,T,P[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(P)):d(Object(P)).forEach(function(T){Object.defineProperty(R,T,Object.getOwnPropertyDescriptor(P,T))})}return R}function E(R,S,P){return S=_(S),S in R?Object.defineProperty(R,S,{value:P,enumerable:!0,configurable:!0,writable:!0}):R[S]=P,R}function m(R,S){if(!(R instanceof S))throw new TypeError("Cannot call a class as a function")}function A(R,S){for(var P=0;P<S.length;P++){var T=S[P];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(R,_(T.key),T)}}function a(R,S,P){return S&&A(R.prototype,S),Object.defineProperty(R,"prototype",{writable:!1}),R}function _(R){var S=g(R,"string");return typeof S=="symbol"?S:String(S)}function g(R,S){if(typeof R!="object"||R===null)return R;var P=R[Symbol.toPrimitive];if(P!==void 0){var T=P.call(R,S);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(R)}var b=requireDist(),w=b.Buffer,l=requireUtil$1(),M=l.inspect,y=M&&M.custom||"inspect";function B(R,S,P){w.prototype.copy.call(R,S,P)}return buffer_list=(function(){function R(){m(this,R),this.head=null,this.tail=null,this.length=0}return a(R,[{key:"push",value:function(P){var T={data:P,next:null};this.length>0?this.tail.next=T:this.head=T,this.tail=T,++this.length}},{key:"unshift",value:function(P){var T={data:P,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length}},{key:"shift",value:function(){if(this.length!==0){var P=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,P}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(P){if(this.length===0)return"";for(var T=this.head,k=""+T.data;T=T.next;)k+=P+T.data;return k}},{key:"concat",value:function(P){if(this.length===0)return w.alloc(0);for(var T=w.allocUnsafe(P>>>0),k=this.head,z=0;k;)B(k.data,T,z),z+=k.data.length,k=k.next;return T}},{key:"consume",value:function(P,T){var k;return P<this.head.data.length?(k=this.head.data.slice(0,P),this.head.data=this.head.data.slice(P)):P===this.head.data.length?k=this.shift():k=T?this._getString(P):this._getBuffer(P),k}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(P){var T=this.head,k=1,z=T.data;for(P-=z.length;T=T.next;){var j=T.data,V=P>j.length?j.length:P;if(V===j.length?z+=j:z+=j.slice(0,P),P-=V,P===0){V===j.length?(++k,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=j.slice(V));break}++k}return this.length-=k,z}},{key:"_getBuffer",value:function(P){var T=w.allocUnsafe(P),k=this.head,z=1;for(k.data.copy(T),P-=k.data.length;k=k.next;){var j=k.data,V=P>j.length?j.length:P;if(j.copy(T,T.length-P,0,V),P-=V,P===0){V===j.length?(++z,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=j.slice(V));break}++z}return this.length-=z,T}},{key:y,value:function(P,T){return M(this,v(v({},T),{},{depth:0,customInspect:!1}))}}]),R})(),buffer_list}var destroy_1$2,hasRequiredDestroy$2;function requireDestroy$2(){if(hasRequiredDestroy$2)return destroy_1$2;hasRequiredDestroy$2=1;function d(_,g){var b=this,w=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return w||l?(g?g(_):_&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(A,this,_)):process$1.nextTick(A,this,_)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(_||null,function(M){!g&&M?b._writableState?b._writableState.errorEmitted?process$1.nextTick(E,b):(b._writableState.errorEmitted=!0,process$1.nextTick(v,b,M)):process$1.nextTick(v,b,M):g?(process$1.nextTick(E,b),g(M)):process$1.nextTick(E,b)}),this)}function v(_,g){A(_,g),E(_)}function E(_){_._writableState&&!_._writableState.emitClose||_._readableState&&!_._readableState.emitClose||_.emit("close")}function m(){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 A(_,g){_.emit("error",g)}function a(_,g){var b=_._readableState,w=_._writableState;b&&b.autoDestroy||w&&w.autoDestroy?_.destroy(g):_.emit("error",g)}return destroy_1$2={destroy:d,undestroy:m,errorOrDestroy:a},destroy_1$2}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function d(g,b){g.prototype=Object.create(b.prototype),g.prototype.constructor=g,g.__proto__=b}var v={};function E(g,b,w){w||(w=Error);function l(y,B,R){return typeof b=="string"?b:b(y,B,R)}var M=(function(y){d(B,y);function B(R,S,P){return y.call(this,l(R,S,P))||this}return B})(w);M.prototype.name=w.name,M.prototype.code=g,v[g]=M}function m(g,b){if(Array.isArray(g)){var w=g.length;return g=g.map(function(l){return String(l)}),w>2?"one of ".concat(b," ").concat(g.slice(0,w-1).join(", "),", or ")+g[w-1]:w===2?"one of ".concat(b," ").concat(g[0]," or ").concat(g[1]):"of ".concat(b," ").concat(g[0])}else return"of ".concat(b," ").concat(String(g))}function A(g,b,w){return g.substr(0,b.length)===b}function a(g,b,w){return(w===void 0||w>g.length)&&(w=g.length),g.substring(w-b.length,w)===b}function _(g,b,w){return typeof w!="number"&&(w=0),w+b.length>g.length?!1:g.indexOf(b,w)!==-1}return E("ERR_INVALID_OPT_VALUE",function(g,b){return'The value "'+b+'" is invalid for option "'+g+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(g,b,w){var l;typeof b=="string"&&A(b,"not ")?(l="must not be",b=b.replace(/^not /,"")):l="must be";var M;if(a(g," argument"))M="The ".concat(g," ").concat(l," ").concat(m(b,"type"));else{var y=_(g,".")?"property":"argument";M='The "'.concat(g,'" ').concat(y," ").concat(l," ").concat(m(b,"type"))}return M+=". Received type ".concat(typeof w),M},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(g){return"The "+g+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(g){return"Cannot call "+g+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(g){return"Unknown encoding: "+g},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=v,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var d=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function v(m,A,a){return m.highWaterMark!=null?m.highWaterMark:A?m[a]:null}function E(m,A,a,_){var g=v(A,_,a);if(g!=null){if(!(isFinite(g)&&Math.floor(g)===g)||g<0){var b=_?a:"highWaterMark";throw new d(b,g)}return Math.floor(g)}return m.objectMode?16:16*1024}return state={getHighWaterMark:E},state}var browser$c,hasRequiredBrowser$c;function requireBrowser$c(){if(hasRequiredBrowser$c)return browser$c;hasRequiredBrowser$c=1,browser$c=d;function d(E,m){if(v("noDeprecation"))return E;var A=!1;function a(){if(!A){if(v("throwDeprecation"))throw new Error(m);v("traceDeprecation")?console.trace(m):console.warn(m),A=!0}return E.apply(this,arguments)}return a}function v(E){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var m=commonjsGlobal.localStorage[E];return m==null?!1:String(m).toLowerCase()==="true"}return browser$c}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 d(J){var x=this;this.next=null,this.entry=null,this.finish=function(){Y(x,J)}}var v;ae.WritableState=Q;var E={deprecate:requireBrowser$c()},m=requireStreamBrowser$2(),A=requireDist().Buffer,a=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _(J){return A.from(J)}function g(J){return A.isBuffer(J)||J instanceof a}var b=requireDestroy$2(),w=requireState(),l=w.getHighWaterMark,M=requireErrorsBrowser().codes,y=M.ERR_INVALID_ARG_TYPE,B=M.ERR_METHOD_NOT_IMPLEMENTED,R=M.ERR_MULTIPLE_CALLBACK,S=M.ERR_STREAM_CANNOT_PIPE,P=M.ERR_STREAM_DESTROYED,T=M.ERR_STREAM_NULL_VALUES,k=M.ERR_STREAM_WRITE_AFTER_END,z=M.ERR_UNKNOWN_ENCODING,j=b.errorOrDestroy;requireInherits_browser$8()(ae,m);function V(){}function Q(J,x,I){v=v||require_stream_duplex$2(),J=J||{},typeof I!="boolean"&&(I=x instanceof v),this.objectMode=!!J.objectMode,I&&(this.objectMode=this.objectMode||!!J.writableObjectMode),this.highWaterMark=l(this,J,"writableHighWaterMark",I),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var C=J.decodeStrings===!1;this.decodeStrings=!C,this.defaultEncoding=J.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(N){s(x,N)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=J.emitClose!==!1,this.autoDestroy=!!J.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}Q.prototype.getBuffer=function(){for(var x=this.bufferedRequest,I=[];x;)I.push(x),x=x.next;return I},(function(){try{Object.defineProperty(Q.prototype,"buffer",{get:E.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(x){return ne.call(this,x)?!0:this!==ae?!1:x&&x._writableState instanceof Q}})):ne=function(x){return x instanceof this};function ae(J){v=v||require_stream_duplex$2();var x=this instanceof v;if(!x&&!ne.call(ae,this))return new ae(J);this._writableState=new Q(J,this,x),this.writable=!0,J&&(typeof J.write=="function"&&(this._write=J.write),typeof J.writev=="function"&&(this._writev=J.writev),typeof J.destroy=="function"&&(this._destroy=J.destroy),typeof J.final=="function"&&(this._final=J.final)),m.call(this)}ae.prototype.pipe=function(){j(this,new S)};function U(J,x){var I=new k;j(J,I),process$1.nextTick(x,I)}function fe(J,x,I,C){var N;return I===null?N=new T:typeof I!="string"&&!x.objectMode&&(N=new y("chunk",["string","Buffer"],I)),N?(j(J,N),process$1.nextTick(C,N),!1):!0}ae.prototype.write=function(J,x,I){var C=this._writableState,N=!1,F=!C.objectMode&&g(J);return F&&!A.isBuffer(J)&&(J=_(J)),typeof x=="function"&&(I=x,x=null),F?x="buffer":x||(x=C.defaultEncoding),typeof I!="function"&&(I=V),C.ending?U(this,I):(F||fe(this,C,J,I))&&(C.pendingcb++,N=e(this,C,F,J,x,I)),N},ae.prototype.cork=function(){this._writableState.corked++},ae.prototype.uncork=function(){var J=this._writableState;J.corked&&(J.corked--,!J.writing&&!J.corked&&!J.bufferProcessing&&J.bufferedRequest&&o(this,J))},ae.prototype.setDefaultEncoding=function(x){if(typeof x=="string"&&(x=x.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((x+"").toLowerCase())>-1))throw new z(x);return this._writableState.defaultEncoding=x,this},Object.defineProperty(ae.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function p(J,x,I){return!J.objectMode&&J.decodeStrings!==!1&&typeof x=="string"&&(x=A.from(x,I)),x}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function e(J,x,I,C,N,F){if(!I){var D=p(x,C,N);C!==D&&(I=!0,N="buffer",C=D)}var X=x.objectMode?1:C.length;x.length+=X;var le=x.length<x.highWaterMark;if(le||(x.needDrain=!0),x.writing||x.corked){var ue=x.lastBufferedRequest;x.lastBufferedRequest={chunk:C,encoding:N,isBuf:I,callback:F,next:null},ue?ue.next=x.lastBufferedRequest:x.bufferedRequest=x.lastBufferedRequest,x.bufferedRequestCount+=1}else t(J,x,!1,X,C,N,F);return le}function t(J,x,I,C,N,F,D){x.writelen=C,x.writecb=D,x.writing=!0,x.sync=!0,x.destroyed?x.onwrite(new P("write")):I?J._writev(N,x.onwrite):J._write(N,F,x.onwrite),x.sync=!1}function n(J,x,I,C,N){--x.pendingcb,I?(process$1.nextTick(N,C),process$1.nextTick($,J,x),J._writableState.errorEmitted=!0,j(J,C)):(N(C),J._writableState.errorEmitted=!0,j(J,C),$(J,x))}function f(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}function s(J,x){var I=J._writableState,C=I.sync,N=I.writecb;if(typeof N!="function")throw new R;if(f(I),x)n(J,I,C,x,N);else{var F=r(I)||J.destroyed;!F&&!I.corked&&!I.bufferProcessing&&I.bufferedRequest&&o(J,I),C?process$1.nextTick(u,J,I,F,N):u(J,I,F,N)}}function u(J,x,I,C){I||c(J,x),x.pendingcb--,C(),$(J,x)}function c(J,x){x.length===0&&x.needDrain&&(x.needDrain=!1,J.emit("drain"))}function o(J,x){x.bufferProcessing=!0;var I=x.bufferedRequest;if(J._writev&&I&&I.next){var C=x.bufferedRequestCount,N=new Array(C),F=x.corkedRequestsFree;F.entry=I;for(var D=0,X=!0;I;)N[D]=I,I.isBuf||(X=!1),I=I.next,D+=1;N.allBuffers=X,t(J,x,!0,x.length,N,"",F.finish),x.pendingcb++,x.lastBufferedRequest=null,F.next?(x.corkedRequestsFree=F.next,F.next=null):x.corkedRequestsFree=new d(x),x.bufferedRequestCount=0}else{for(;I;){var le=I.chunk,ue=I.encoding,pe=I.callback,Ce=x.objectMode?1:le.length;if(t(J,x,!1,Ce,le,ue,pe),I=I.next,x.bufferedRequestCount--,x.writing)break}I===null&&(x.lastBufferedRequest=null)}x.bufferedRequest=I,x.bufferProcessing=!1}ae.prototype._write=function(J,x,I){I(new B("_write()"))},ae.prototype._writev=null,ae.prototype.end=function(J,x,I){var C=this._writableState;return typeof J=="function"?(I=J,J=null,x=null):typeof x=="function"&&(I=x,x=null),J!=null&&this.write(J,x),C.corked&&(C.corked=1,this.uncork()),C.ending||H(this,C,I),this},Object.defineProperty(ae.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function r(J){return J.ending&&J.length===0&&J.bufferedRequest===null&&!J.finished&&!J.writing}function h(J,x){J._final(function(I){x.pendingcb--,I&&j(J,I),x.prefinished=!0,J.emit("prefinish"),$(J,x)})}function q(J,x){!x.prefinished&&!x.finalCalled&&(typeof J._final=="function"&&!x.destroyed?(x.pendingcb++,x.finalCalled=!0,process$1.nextTick(h,J,x)):(x.prefinished=!0,J.emit("prefinish")))}function $(J,x){var I=r(x);if(I&&(q(J,x),x.pendingcb===0&&(x.finished=!0,J.emit("finish"),x.autoDestroy))){var C=J._readableState;(!C||C.autoDestroy&&C.endEmitted)&&J.destroy()}return I}function H(J,x,I){x.ending=!0,$(J,x),I&&(x.finished?process$1.nextTick(I):J.once("finish",I)),x.ended=!0,J.writable=!1}function Y(J,x,I){var C=J.entry;for(J.entry=null;C;){var N=C.callback;x.pendingcb--,N(I),C=C.next}x.corkedRequestsFree.next=J}return Object.defineProperty(ae.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(x){this._writableState&&(this._writableState.destroyed=x)}}),ae.prototype.destroy=b.destroy,ae.prototype._undestroy=b.undestroy,ae.prototype._destroy=function(J,x){x(J)},_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 d=Object.keys||function(w){var l=[];for(var M in w)l.push(M);return l};_stream_duplex$2=_;var v=require_stream_readable$2(),E=require_stream_writable$2();requireInherits_browser$8()(_,v);for(var m=d(E.prototype),A=0;A<m.length;A++){var a=m[A];_.prototype[a]||(_.prototype[a]=E.prototype[a])}function _(w){if(!(this instanceof _))return new _(w);v.call(this,w),E.call(this,w),this.allowHalfOpen=!0,w&&(w.readable===!1&&(this.readable=!1),w.writable===!1&&(this.writable=!1),w.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",g)))}Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function g(){this._writableState.ended||process$1.nextTick(b,this)}function b(w){w.end()}return Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(l){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=l,this._writableState.destroyed=l)}}),_stream_duplex$2}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var d=requireSafeBuffer$2().Buffer,v=d.isEncoding||function(T){switch(T=""+T,T&&T.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 E(T){if(!T)return"utf8";for(var k;;)switch(T){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 T;default:if(k)return;T=(""+T).toLowerCase(),k=!0}}function m(T){var k=E(T);if(typeof k!="string"&&(d.isEncoding===v||!v(T)))throw new Error("Unknown encoding: "+T);return k||T}string_decoder.StringDecoder=A;function A(T){this.encoding=m(T);var k;switch(this.encoding){case"utf16le":this.text=M,this.end=y,k=4;break;case"utf8":this.fillLast=b,k=4;break;case"base64":this.text=B,this.end=R,k=3;break;default:this.write=S,this.end=P;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=d.allocUnsafe(k)}A.prototype.write=function(T){if(T.length===0)return"";var k,z;if(this.lastNeed){if(k=this.fillLast(T),k===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<T.length?k?k+this.text(T,z):this.text(T,z):k||""},A.prototype.end=l,A.prototype.text=w,A.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function a(T){return T<=127?0:T>>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function _(T,k,z){var j=k.length-1;if(j<z)return 0;var V=a(k[j]);return V>=0?(V>0&&(T.lastNeed=V-1),V):--j<z||V===-2?0:(V=a(k[j]),V>=0?(V>0&&(T.lastNeed=V-2),V):--j<z||V===-2?0:(V=a(k[j]),V>=0?(V>0&&(V===2?V=0:T.lastNeed=V-3),V):0))}function g(T,k,z){if((k[0]&192)!==128)return T.lastNeed=0,"�";if(T.lastNeed>1&&k.length>1){if((k[1]&192)!==128)return T.lastNeed=1,"�";if(T.lastNeed>2&&k.length>2&&(k[2]&192)!==128)return T.lastNeed=2,"�"}}function b(T){var k=this.lastTotal-this.lastNeed,z=g(this,T);if(z!==void 0)return z;if(this.lastNeed<=T.length)return T.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,k,0,T.length),this.lastNeed-=T.length}function w(T,k){var z=_(this,T,k);if(!this.lastNeed)return T.toString("utf8",k);this.lastTotal=z;var j=T.length-(z-this.lastNeed);return T.copy(this.lastChar,0,j),T.toString("utf8",k,j)}function l(T){var k=T&&T.length?this.write(T):"";return this.lastNeed?k+"�":k}function M(T,k){if((T.length-k)%2===0){var z=T.toString("utf16le",k);if(z){var j=z.charCodeAt(z.length-1);if(j>=55296&&j<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",k,T.length-1)}function y(T){var k=T&&T.length?this.write(T):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,z)}return k}function B(T,k){var z=(T.length-k)%3;return z===0?T.toString("base64",k):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",k,T.length-z))}function R(T){var k=T&&T.length?this.write(T):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function S(T){return T.toString(this.encoding)}function P(T){return T&&T.length?this.write(T):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var d=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function v(a){var _=!1;return function(){if(!_){_=!0;for(var g=arguments.length,b=new Array(g),w=0;w<g;w++)b[w]=arguments[w];a.apply(this,b)}}}function E(){}function m(a){return a.setHeader&&typeof a.abort=="function"}function A(a,_,g){if(typeof _=="function")return A(a,null,_);_||(_={}),g=v(g||E);var b=_.readable||_.readable!==!1&&a.readable,w=_.writable||_.writable!==!1&&a.writable,l=function(){a.writable||y()},M=a._writableState&&a._writableState.finished,y=function(){w=!1,M=!0,b||g.call(a)},B=a._readableState&&a._readableState.endEmitted,R=function(){b=!1,B=!0,w||g.call(a)},S=function(z){g.call(a,z)},P=function(){var z;if(b&&!B)return(!a._readableState||!a._readableState.ended)&&(z=new d),g.call(a,z);if(w&&!M)return(!a._writableState||!a._writableState.ended)&&(z=new d),g.call(a,z)},T=function(){a.req.on("finish",y)};return m(a)?(a.on("complete",y),a.on("abort",P),a.req?T():a.on("request",T)):w&&!a._writableState&&(a.on("end",l),a.on("close",l)),a.on("end",R),a.on("finish",y),_.error!==!1&&a.on("error",S),a.on("close",P),function(){a.removeListener("complete",y),a.removeListener("abort",P),a.removeListener("request",T),a.req&&a.req.removeListener("finish",y),a.removeListener("end",l),a.removeListener("close",l),a.removeListener("finish",y),a.removeListener("end",R),a.removeListener("error",S),a.removeListener("close",P)}}return endOfStream=A,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var d;function v(z,j,V){return j=E(j),j in z?Object.defineProperty(z,j,{value:V,enumerable:!0,configurable:!0,writable:!0}):z[j]=V,z}function E(z){var j=m(z,"string");return typeof j=="symbol"?j:String(j)}function m(z,j){if(typeof z!="object"||z===null)return z;var V=z[Symbol.toPrimitive];if(V!==void 0){var Q=V.call(z,j);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(z)}var A=requireEndOfStream(),a=Symbol("lastResolve"),_=Symbol("lastReject"),g=Symbol("error"),b=Symbol("ended"),w=Symbol("lastPromise"),l=Symbol("handlePromise"),M=Symbol("stream");function y(z,j){return{value:z,done:j}}function B(z){var j=z[a];if(j!==null){var V=z[M].read();V!==null&&(z[w]=null,z[a]=null,z[_]=null,j(y(V,!1)))}}function R(z){process$1.nextTick(B,z)}function S(z,j){return function(V,Q){z.then(function(){if(j[b]){V(y(void 0,!0));return}j[l](V,Q)},Q)}}var P=Object.getPrototypeOf(function(){}),T=Object.setPrototypeOf((d={get stream(){return this[M]},next:function(){var j=this,V=this[g];if(V!==null)return Promise.reject(V);if(this[b])return Promise.resolve(y(void 0,!0));if(this[M].destroyed)return new Promise(function(U,fe){process$1.nextTick(function(){j[g]?fe(j[g]):U(y(void 0,!0))})});var Q=this[w],ne;if(Q)ne=new Promise(S(Q,this));else{var ae=this[M].read();if(ae!==null)return Promise.resolve(y(ae,!1));ne=new Promise(this[l])}return this[w]=ne,ne}},v(d,Symbol.asyncIterator,function(){return this}),v(d,"return",function(){var j=this;return new Promise(function(V,Q){j[M].destroy(null,function(ne){if(ne){Q(ne);return}V(y(void 0,!0))})})}),d),P),k=function(j){var V,Q=Object.create(T,(V={},v(V,M,{value:j,writable:!0}),v(V,a,{value:null,writable:!0}),v(V,_,{value:null,writable:!0}),v(V,g,{value:null,writable:!0}),v(V,b,{value:j._readableState.endEmitted,writable:!0}),v(V,l,{value:function(ae,U){var fe=Q[M].read();fe?(Q[w]=null,Q[a]=null,Q[_]=null,ae(y(fe,!1))):(Q[a]=ae,Q[_]=U)},writable:!0}),V));return Q[w]=null,A(j,function(ne){if(ne&&ne.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ae=Q[_];ae!==null&&(Q[w]=null,Q[a]=null,Q[_]=null,ae(ne)),Q[g]=ne;return}var U=Q[a];U!==null&&(Q[w]=null,Q[a]=null,Q[_]=null,U(y(void 0,!0))),Q[b]=!0}),j.on("readable",R.bind(null,Q)),Q};return async_iterator=k,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=U;var d;U.ReadableState=ae,requireEvents().EventEmitter;var v=function(D,X){return D.listeners(X).length},E=requireStreamBrowser$2(),m=requireDist().Buffer,A=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(F){return m.from(F)}function _(F){return m.isBuffer(F)||F instanceof A}var g=requireUtil$1(),b;g&&g.debuglog?b=g.debuglog("stream"):b=function(){};var w=requireBuffer_list(),l=requireDestroy$2(),M=requireState(),y=M.getHighWaterMark,B=requireErrorsBrowser().codes,R=B.ERR_INVALID_ARG_TYPE,S=B.ERR_STREAM_PUSH_AFTER_EOF,P=B.ERR_METHOD_NOT_IMPLEMENTED,T=B.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,z,j;requireInherits_browser$8()(U,E);var V=l.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ne(F,D,X){if(typeof F.prependListener=="function")return F.prependListener(D,X);!F._events||!F._events[D]?F.on(D,X):Array.isArray(F._events[D])?F._events[D].unshift(X):F._events[D]=[X,F._events[D]]}function ae(F,D,X){d=d||require_stream_duplex$2(),F=F||{},typeof X!="boolean"&&(X=D instanceof d),this.objectMode=!!F.objectMode,X&&(this.objectMode=this.objectMode||!!F.readableObjectMode),this.highWaterMark=y(this,F,"readableHighWaterMark",X),this.buffer=new w,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=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.destroyed=!1,this.defaultEncoding=F.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,F.encoding&&(k||(k=requireString_decoder().StringDecoder),this.decoder=new k(F.encoding),this.encoding=F.encoding)}function U(F){if(d=d||require_stream_duplex$2(),!(this instanceof U))return new U(F);var D=this instanceof d;this._readableState=new ae(F,this,D),this.readable=!0,F&&(typeof F.read=="function"&&(this._read=F.read),typeof F.destroy=="function"&&(this._destroy=F.destroy)),E.call(this)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),U.prototype.destroy=l.destroy,U.prototype._undestroy=l.undestroy,U.prototype._destroy=function(F,D){D(F)},U.prototype.push=function(F,D){var X=this._readableState,le;return X.objectMode?le=!0:typeof F=="string"&&(D=D||X.defaultEncoding,D!==X.encoding&&(F=m.from(F,D),D=""),le=!0),fe(this,F,D,!1,le)},U.prototype.unshift=function(F){return fe(this,F,null,!0,!1)};function fe(F,D,X,le,ue){b("readableAddChunk",D);var pe=F._readableState;if(D===null)pe.reading=!1,s(F,pe);else{var Ce;if(ue||(Ce=e(pe,D)),Ce)V(F,Ce);else if(pe.objectMode||D&&D.length>0)if(typeof D!="string"&&!pe.objectMode&&Object.getPrototypeOf(D)!==m.prototype&&(D=a(D)),le)pe.endEmitted?V(F,new T):p(F,pe,D,!0);else if(pe.ended)V(F,new S);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!X?(D=pe.decoder.write(D),pe.objectMode||D.length!==0?p(F,pe,D,!1):o(F,pe)):p(F,pe,D,!1)}else le||(pe.reading=!1,o(F,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function p(F,D,X,le){D.flowing&&D.length===0&&!D.sync?(D.awaitDrain=0,F.emit("data",X)):(D.length+=D.objectMode?1:X.length,le?D.buffer.unshift(X):D.buffer.push(X),D.needReadable&&u(F)),o(F,D)}function e(F,D){var X;return!_(D)&&typeof D!="string"&&D!==void 0&&!F.objectMode&&(X=new R("chunk",["string","Buffer","Uint8Array"],D)),X}U.prototype.isPaused=function(){return this._readableState.flowing===!1},U.prototype.setEncoding=function(F){k||(k=requireString_decoder().StringDecoder);var D=new k(F);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var X=this._readableState.buffer.head,le="";X!==null;)le+=D.write(X.data),X=X.next;return this._readableState.buffer.clear(),le!==""&&this._readableState.buffer.push(le),this._readableState.length=le.length,this};var t=1073741824;function n(F){return F>=t?F=t:(F--,F|=F>>>1,F|=F>>>2,F|=F>>>4,F|=F>>>8,F|=F>>>16,F++),F}function f(F,D){return F<=0||D.length===0&&D.ended?0:D.objectMode?1:F!==F?D.flowing&&D.length?D.buffer.head.data.length:D.length:(F>D.highWaterMark&&(D.highWaterMark=n(F)),F<=D.length?F:D.ended?D.length:(D.needReadable=!0,0))}U.prototype.read=function(F){b("read",F),F=parseInt(F,10);var D=this._readableState,X=F;if(F!==0&&(D.emittedReadable=!1),F===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return b("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?I(this):u(this),null;if(F=f(F,D),F===0&&D.ended)return D.length===0&&I(this),null;var le=D.needReadable;b("need readable",le),(D.length===0||D.length-F<D.highWaterMark)&&(le=!0,b("length less than watermark",le)),D.ended||D.reading?(le=!1,b("reading or ended",le)):le&&(b("do read"),D.reading=!0,D.sync=!0,D.length===0&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(F=f(X,D)));var ue;return F>0?ue=x(F,D):ue=null,ue===null?(D.needReadable=D.length<=D.highWaterMark,F=0):(D.length-=F,D.awaitDrain=0),D.length===0&&(D.ended||(D.needReadable=!0),X!==F&&D.ended&&I(this)),ue!==null&&this.emit("data",ue),ue};function s(F,D){if(b("onEofChunk"),!D.ended){if(D.decoder){var X=D.decoder.end();X&&X.length&&(D.buffer.push(X),D.length+=D.objectMode?1:X.length)}D.ended=!0,D.sync?u(F):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,c(F)))}}function u(F){var D=F._readableState;b("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(b("emitReadable",D.flowing),D.emittedReadable=!0,process$1.nextTick(c,F))}function c(F){var D=F._readableState;b("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&(D.length||D.ended)&&(F.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,J(F)}function o(F,D){D.readingMore||(D.readingMore=!0,process$1.nextTick(r,F,D))}function r(F,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){var X=D.length;if(b("maybeReadMore read 0"),F.read(0),X===D.length)break}D.readingMore=!1}U.prototype._read=function(F){V(this,new P("_read()"))},U.prototype.pipe=function(F,D){var X=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=F;break;case 1:le.pipes=[le.pipes,F];break;default:le.pipes.push(F);break}le.pipesCount+=1,b("pipe count=%d opts=%j",le.pipesCount,D);var ue=(!D||D.end!==!1)&&F!==process$1.stdout&&F!==process$1.stderr,pe=ue?me:je;le.endEmitted?process$1.nextTick(pe):X.once("end",pe),F.on("unpipe",Ce);function Ce(Se,Ie){b("onunpipe"),Se===X&&Ie&&Ie.hasUnpiped===!1&&(Ie.hasUnpiped=!0,ye())}function me(){b("onend"),F.end()}var ce=h(X);F.on("drain",ce);var Ne=!1;function ye(){b("cleanup"),F.removeListener("close",be),F.removeListener("finish",Re),F.removeListener("drain",ce),F.removeListener("error",De),F.removeListener("unpipe",Ce),X.removeListener("end",me),X.removeListener("end",je),X.removeListener("data",Me),Ne=!0,le.awaitDrain&&(!F._writableState||F._writableState.needDrain)&&ce()}X.on("data",Me);function Me(Se){b("ondata");var Ie=F.write(Se);b("dest.write",Ie),Ie===!1&&((le.pipesCount===1&&le.pipes===F||le.pipesCount>1&&N(le.pipes,F)!==-1)&&!Ne&&(b("false write response, pause",le.awaitDrain),le.awaitDrain++),X.pause())}function De(Se){b("onerror",Se),je(),F.removeListener("error",De),v(F,"error")===0&&V(F,Se)}ne(F,"error",De);function be(){F.removeListener("finish",Re),je()}F.once("close",be);function Re(){b("onfinish"),F.removeListener("close",be),je()}F.once("finish",Re);function je(){b("unpipe"),X.unpipe(F)}return F.emit("pipe",X),le.flowing||(b("pipe resume"),X.resume()),F};function h(F){return function(){var X=F._readableState;b("pipeOnDrain",X.awaitDrain),X.awaitDrain&&X.awaitDrain--,X.awaitDrain===0&&v(F,"data")&&(X.flowing=!0,J(F))}}U.prototype.unpipe=function(F){var D=this._readableState,X={hasUnpiped:!1};if(D.pipesCount===0)return this;if(D.pipesCount===1)return F&&F!==D.pipes?this:(F||(F=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,F&&F.emit("unpipe",this,X),this);if(!F){var le=D.pipes,ue=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var pe=0;pe<ue;pe++)le[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Ce=N(D.pipes,F);return Ce===-1?this:(D.pipes.splice(Ce,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),F.emit("unpipe",this,X),this)},U.prototype.on=function(F,D){var X=E.prototype.on.call(this,F,D),le=this._readableState;return F==="data"?(le.readableListening=this.listenerCount("readable")>0,le.flowing!==!1&&this.resume()):F==="readable"&&!le.endEmitted&&!le.readableListening&&(le.readableListening=le.needReadable=!0,le.flowing=!1,le.emittedReadable=!1,b("on readable",le.length,le.reading),le.length?u(this):le.reading||process$1.nextTick($,this)),X},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(F,D){var X=E.prototype.removeListener.call(this,F,D);return F==="readable"&&process$1.nextTick(q,this),X},U.prototype.removeAllListeners=function(F){var D=E.prototype.removeAllListeners.apply(this,arguments);return(F==="readable"||F===void 0)&&process$1.nextTick(q,this),D};function q(F){var D=F._readableState;D.readableListening=F.listenerCount("readable")>0,D.resumeScheduled&&!D.paused?D.flowing=!0:F.listenerCount("data")>0&&F.resume()}function $(F){b("readable nexttick read 0"),F.read(0)}U.prototype.resume=function(){var F=this._readableState;return F.flowing||(b("resume"),F.flowing=!F.readableListening,H(this,F)),F.paused=!1,this};function H(F,D){D.resumeScheduled||(D.resumeScheduled=!0,process$1.nextTick(Y,F,D))}function Y(F,D){b("resume",D.reading),D.reading||F.read(0),D.resumeScheduled=!1,F.emit("resume"),J(F),D.flowing&&!D.reading&&F.read(0)}U.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function J(F){var D=F._readableState;for(b("flow",D.flowing);D.flowing&&F.read()!==null;);}U.prototype.wrap=function(F){var D=this,X=this._readableState,le=!1;F.on("end",function(){if(b("wrapped end"),X.decoder&&!X.ended){var Ce=X.decoder.end();Ce&&Ce.length&&D.push(Ce)}D.push(null)}),F.on("data",function(Ce){if(b("wrapped data"),X.decoder&&(Ce=X.decoder.write(Ce)),!(X.objectMode&&Ce==null)&&!(!X.objectMode&&(!Ce||!Ce.length))){var me=D.push(Ce);me||(le=!0,F.pause())}});for(var ue in F)this[ue]===void 0&&typeof F[ue]=="function"&&(this[ue]=(function(me){return function(){return F[me].apply(F,arguments)}})(ue));for(var pe=0;pe<Q.length;pe++)F.on(Q[pe],this.emit.bind(this,Q[pe]));return this._read=function(Ce){b("wrapped _read",Ce),le&&(le=!1,F.resume())},this},typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=requireAsync_iterator()),z(this)}),Object.defineProperty(U.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(U.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(U.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),U._fromList=x,Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function x(F,D){if(D.length===0)return null;var X;return D.objectMode?X=D.buffer.shift():!F||F>=D.length?(D.decoder?X=D.buffer.join(""):D.buffer.length===1?X=D.buffer.first():X=D.buffer.concat(D.length),D.buffer.clear()):X=D.buffer.consume(F,D.decoder),X}function I(F){var D=F._readableState;b("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,process$1.nextTick(C,D,F))}function C(F,D){if(b("endReadableNT",F.endEmitted,F.length),!F.endEmitted&&F.length===0&&(F.endEmitted=!0,D.readable=!1,D.emit("end"),F.autoDestroy)){var X=D._writableState;(!X||X.autoDestroy&&X.finished)&&D.destroy()}}typeof Symbol=="function"&&(U.from=function(F,D){return j===void 0&&(j=requireFromBrowser()),j(U,F,D)});function N(F,D){for(var X=0,le=F.length;X<le;X++)if(F[X]===D)return X;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=g;var d=requireErrorsBrowser().codes,v=d.ERR_METHOD_NOT_IMPLEMENTED,E=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_TRANSFORM_ALREADY_TRANSFORMING,A=d.ERR_TRANSFORM_WITH_LENGTH_0,a=require_stream_duplex$2();requireInherits_browser$8()(g,a);function _(l,M){var y=this._transformState;y.transforming=!1;var B=y.writecb;if(B===null)return this.emit("error",new E);y.writechunk=null,y.writecb=null,M!=null&&this.push(M),B(l);var R=this._readableState;R.reading=!1,(R.needReadable||R.length<R.highWaterMark)&&this._read(R.highWaterMark)}function g(l){if(!(this instanceof g))return new g(l);a.call(this,l),this._transformState={afterTransform:_.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",b)}function b(){var l=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(M,y){w(l,M,y)}):w(this,null,null)}g.prototype.push=function(l,M){return this._transformState.needTransform=!1,a.prototype.push.call(this,l,M)},g.prototype._transform=function(l,M,y){y(new v("_transform()"))},g.prototype._write=function(l,M,y){var B=this._transformState;if(B.writecb=y,B.writechunk=l,B.writeencoding=M,!B.transforming){var R=this._readableState;(B.needTransform||R.needReadable||R.length<R.highWaterMark)&&this._read(R.highWaterMark)}},g.prototype._read=function(l){var M=this._transformState;M.writechunk!==null&&!M.transforming?(M.transforming=!0,this._transform(M.writechunk,M.writeencoding,M.afterTransform)):M.needTransform=!0},g.prototype._destroy=function(l,M){a.prototype._destroy.call(this,l,function(y){M(y)})};function w(l,M,y){if(M)return l.emit("error",M);if(y!=null&&l.push(y),l._writableState.length)throw new A;if(l._transformState.transforming)throw new m;return l.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=v;var d=require_stream_transform$2();requireInherits_browser$8()(v,d);function v(E){if(!(this instanceof v))return new v(E);d.call(this,E)}return v.prototype._transform=function(E,m,A){A(null,E)},_stream_passthrough$2}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var d;function v(y){var B=!1;return function(){B||(B=!0,y.apply(void 0,arguments))}}var E=requireErrorsBrowser().codes,m=E.ERR_MISSING_ARGS,A=E.ERR_STREAM_DESTROYED;function a(y){if(y)throw y}function _(y){return y.setHeader&&typeof y.abort=="function"}function g(y,B,R,S){S=v(S);var P=!1;y.on("close",function(){P=!0}),d===void 0&&(d=requireEndOfStream()),d(y,{readable:B,writable:R},function(k){if(k)return S(k);P=!0,S()});var T=!1;return function(k){if(!P&&!T){if(T=!0,_(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();S(k||new A("pipe"))}}}function b(y){y()}function w(y,B){return y.pipe(B)}function l(y){return!y.length||typeof y[y.length-1]!="function"?a:y.pop()}function M(){for(var y=arguments.length,B=new Array(y),R=0;R<y;R++)B[R]=arguments[R];var S=l(B);if(Array.isArray(B[0])&&(B=B[0]),B.length<2)throw new m("streams");var P,T=B.map(function(k,z){var j=z<B.length-1,V=z>0;return g(k,j,V,function(Q){P||(P=Q),Q&&T.forEach(b),!j&&(T.forEach(b),S(P))})});return B.reduce(w)}return pipeline_1=M,pipeline_1}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=E;var d=requireEvents().EventEmitter,v=requireInherits_browser$7();v(E,d),E.Readable=require_stream_readable$2(),E.Writable=require_stream_writable$2(),E.Duplex=require_stream_duplex$2(),E.Transform=require_stream_transform$2(),E.PassThrough=require_stream_passthrough$2(),E.finished=requireEndOfStream(),E.pipeline=requirePipeline(),E.Stream=E;function E(){d.call(this)}return E.prototype.pipe=function(m,A){var a=this;function _(B){m.writable&&m.write(B)===!1&&a.pause&&a.pause()}a.on("data",_);function g(){a.readable&&a.resume&&a.resume()}m.on("drain",g),!m._isStdio&&(!A||A.end!==!1)&&(a.on("end",w),a.on("close",l));var b=!1;function w(){b||(b=!0,m.end())}function l(){b||(b=!0,typeof m.destroy=="function"&&m.destroy())}function M(B){if(y(),d.listenerCount(this,"error")===0)throw B}a.on("error",M),m.on("error",M);function y(){a.removeListener("data",_),m.removeListener("drain",g),a.removeListener("end",w),a.removeListener("close",l),a.removeListener("error",M),m.removeListener("error",M),a.removeListener("end",y),a.removeListener("close",y),m.removeListener("close",y)}return a.on("end",y),a.on("close",y),m.on("close",y),m.emit("pipe",a),m},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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$6.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),inherits_browser$6.exports}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var d=requireSafeBuffer$2().Buffer,v=requireStreamBrowserify().Transform,E=requireInherits_browser$6();function m(g){v.call(this),this._block=d.allocUnsafe(g),this._blockSize=g,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}E(m,v),m.prototype._transform=function(g,b,w){var l=null;try{this.update(g,b)}catch(M){l=M}w(l)},m.prototype._flush=function(g){var b=null;try{this.push(this.digest())}catch(w){b=w}g(b)};var A=typeof Uint8Array<"u",a=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(d.prototype instanceof Uint8Array||d.TYPED_ARRAY_SUPPORT);function _(g,b){if(g instanceof d)return g;if(typeof g=="string")return d.from(g,b);if(a&&ArrayBuffer.isView(g)){if(g.byteLength===0)return d.alloc(0);var w=d.from(g.buffer,g.byteOffset,g.byteLength);if(w.byteLength===g.byteLength)return w}if(A&&g instanceof Uint8Array||d.isBuffer(g)&&g.constructor&&typeof g.constructor.isBuffer=="function"&&g.constructor.isBuffer(g))return d.from(g);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return m.prototype.update=function(g,b){if(this._finalized)throw new Error("Digest already called");g=_(g,b);for(var w=this._block,l=0;this._blockOffset+g.length-l>=this._blockSize;){for(var M=this._blockOffset;M<this._blockSize;)w[M++]=g[l++];this._update(),this._blockOffset=0}for(;l<g.length;)w[this._blockOffset++]=g[l++];for(var y=0,B=g.length*8;B>0;++y)this._length[y]+=B,B=this._length[y]/4294967296|0,B>0&&(this._length[y]-=4294967296*B);return this},m.prototype._update=function(){throw new Error("_update is not implemented")},m.prototype.digest=function(g){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var b=this._digest();g!==void 0&&(b=b.toString(g)),this._block.fill(0),this._blockOffset=0;for(var w=0;w<4;++w)this._length[w]=0;return b},m.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=m,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var d=requireInherits_browser$8(),v=requireHashBase$1(),E=requireSafeBuffer$2().Buffer,m=new Array(16);function A(){v.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}d(A,v),A.prototype._update=function(){for(var l=m,M=0;M<16;++M)l[M]=this._block.readInt32LE(M*4);var y=this._a,B=this._b,R=this._c,S=this._d;y=_(y,B,R,S,l[0],3614090360,7),S=_(S,y,B,R,l[1],3905402710,12),R=_(R,S,y,B,l[2],606105819,17),B=_(B,R,S,y,l[3],3250441966,22),y=_(y,B,R,S,l[4],4118548399,7),S=_(S,y,B,R,l[5],1200080426,12),R=_(R,S,y,B,l[6],2821735955,17),B=_(B,R,S,y,l[7],4249261313,22),y=_(y,B,R,S,l[8],1770035416,7),S=_(S,y,B,R,l[9],2336552879,12),R=_(R,S,y,B,l[10],4294925233,17),B=_(B,R,S,y,l[11],2304563134,22),y=_(y,B,R,S,l[12],1804603682,7),S=_(S,y,B,R,l[13],4254626195,12),R=_(R,S,y,B,l[14],2792965006,17),B=_(B,R,S,y,l[15],1236535329,22),y=g(y,B,R,S,l[1],4129170786,5),S=g(S,y,B,R,l[6],3225465664,9),R=g(R,S,y,B,l[11],643717713,14),B=g(B,R,S,y,l[0],3921069994,20),y=g(y,B,R,S,l[5],3593408605,5),S=g(S,y,B,R,l[10],38016083,9),R=g(R,S,y,B,l[15],3634488961,14),B=g(B,R,S,y,l[4],3889429448,20),y=g(y,B,R,S,l[9],568446438,5),S=g(S,y,B,R,l[14],3275163606,9),R=g(R,S,y,B,l[3],4107603335,14),B=g(B,R,S,y,l[8],1163531501,20),y=g(y,B,R,S,l[13],2850285829,5),S=g(S,y,B,R,l[2],4243563512,9),R=g(R,S,y,B,l[7],1735328473,14),B=g(B,R,S,y,l[12],2368359562,20),y=b(y,B,R,S,l[5],4294588738,4),S=b(S,y,B,R,l[8],2272392833,11),R=b(R,S,y,B,l[11],1839030562,16),B=b(B,R,S,y,l[14],4259657740,23),y=b(y,B,R,S,l[1],2763975236,4),S=b(S,y,B,R,l[4],1272893353,11),R=b(R,S,y,B,l[7],4139469664,16),B=b(B,R,S,y,l[10],3200236656,23),y=b(y,B,R,S,l[13],681279174,4),S=b(S,y,B,R,l[0],3936430074,11),R=b(R,S,y,B,l[3],3572445317,16),B=b(B,R,S,y,l[6],76029189,23),y=b(y,B,R,S,l[9],3654602809,4),S=b(S,y,B,R,l[12],3873151461,11),R=b(R,S,y,B,l[15],530742520,16),B=b(B,R,S,y,l[2],3299628645,23),y=w(y,B,R,S,l[0],4096336452,6),S=w(S,y,B,R,l[7],1126891415,10),R=w(R,S,y,B,l[14],2878612391,15),B=w(B,R,S,y,l[5],4237533241,21),y=w(y,B,R,S,l[12],1700485571,6),S=w(S,y,B,R,l[3],2399980690,10),R=w(R,S,y,B,l[10],4293915773,15),B=w(B,R,S,y,l[1],2240044497,21),y=w(y,B,R,S,l[8],1873313359,6),S=w(S,y,B,R,l[15],4264355552,10),R=w(R,S,y,B,l[6],2734768916,15),B=w(B,R,S,y,l[13],1309151649,21),y=w(y,B,R,S,l[4],4149444226,6),S=w(S,y,B,R,l[11],3174756917,10),R=w(R,S,y,B,l[2],718787259,15),B=w(B,R,S,y,l[9],3951481745,21),this._a=this._a+y|0,this._b=this._b+B|0,this._c=this._c+R|0,this._d=this._d+S|0},A.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 l=E.allocUnsafe(16);return l.writeInt32LE(this._a,0),l.writeInt32LE(this._b,4),l.writeInt32LE(this._c,8),l.writeInt32LE(this._d,12),l};function a(l,M){return l<<M|l>>>32-M}function _(l,M,y,B,R,S,P){return a(l+(M&y|~M&B)+R+S|0,P)+M|0}function g(l,M,y,B,R,S,P){return a(l+(M&B|y&~B)+R+S|0,P)+M|0}function b(l,M,y,B,R,S,P){return a(l+(M^y^B)+R+S|0,P)+M|0}function w(l,M,y,B,R,S,P){return a(l+(y^(M|~B))+R+S|0,P)+M|0}return md5_js=A,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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$5.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),inherits_browser$5.exports}var isarray$2,hasRequiredIsarray$2;function requireIsarray$2(){if(hasRequiredIsarray$2)return isarray$2;hasRequiredIsarray$2=1;var d={}.toString;return isarray$2=Array.isArray||function(v){return d.call(v)=="[object Array]"},isarray$2}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var d=requireType(),v=requireCallBound(),E=v("TypedArray.prototype.buffer",!0),m=requireIsTypedArray();return typedArrayBuffer=E||function(a){if(!m(a))throw new d("Not a Typed Array");return a.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$2;function requireToBuffer$2(){if(hasRequiredToBuffer$2)return toBuffer;hasRequiredToBuffer$2=1;var d=requireSafeBuffer$2().Buffer,v=requireIsarray$2(),E=requireTypedArrayBuffer(),m=ArrayBuffer.isView||function(b){try{return E(b),!0}catch{return!1}},A=typeof Uint8Array<"u",a=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",_=a&&(d.prototype instanceof Uint8Array||d.TYPED_ARRAY_SUPPORT);return toBuffer=function(b,w){if(d.isBuffer(b))return b.constructor&&!("isBuffer"in b)?d.from(b):b;if(typeof b=="string")return d.from(b,w);if(a&&m(b)){if(b.byteLength===0)return d.alloc(0);if(_){var l=d.from(b.buffer,b.byteOffset,b.byteLength);if(l.byteLength===b.byteLength)return l}var M=b instanceof Uint8Array?b:new Uint8Array(b.buffer,b.byteOffset,b.byteLength),y=d.from(M);if(y.length===b.byteLength)return y}if(A&&b instanceof Uint8Array)return d.from(b);var B=v(b);if(B)for(var R=0;R<b.length;R+=1){var S=b[R];if(typeof S!="number"||S<0||S>255||~~S!==S)throw new RangeError("Array items must be numbers in the range 0-255.")}if(B||d.isBuffer(b)&&b.constructor&&typeof b.constructor.isBuffer=="function"&&b.constructor.isBuffer(b))return d.from(b);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 d=requireSafeBuffer$2().Buffer,v=requireToBuffer$2(),E=typeof Uint8Array<"u",m=E&&typeof ArrayBuffer<"u",A=m&&ArrayBuffer.isView;return toBuffer_1$1=function(a,_){if(typeof a=="string"||d.isBuffer(a)||E&&a instanceof Uint8Array||A&&A(a))return v(a,_);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:d}:processNextickArgs.exports=process$1;function d(v,E,m,A){if(typeof v!="function")throw new TypeError('"callback" argument must be a function');var a=arguments.length,_,g;switch(a){case 0:case 1:return process$1.nextTick(v);case 2:return process$1.nextTick(function(){v.call(null,E)});case 3:return process$1.nextTick(function(){v.call(null,E,m)});case 4:return process$1.nextTick(function(){v.call(null,E,m,A)});default:for(_=new Array(a-1),g=0;g<_.length;)_[g++]=arguments[g];return process$1.nextTick(function(){v.apply(null,_)})}}return processNextickArgs.exports}var isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var d={}.toString;return isarray$1=Array.isArray||function(v){return d.call(v)=="[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(d,v){var E=requireDist(),m=E.Buffer;function A(_,g){for(var b in _)g[b]=_[b]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?d.exports=E:(A(E,v),v.Buffer=a);function a(_,g,b){return m(_,g,b)}A(m,a),a.from=function(_,g,b){if(typeof _=="number")throw new TypeError("Argument must not be a number");return m(_,g,b)},a.alloc=function(_,g,b){if(typeof _!="number")throw new TypeError("Argument must be a number");var w=m(_);return g!==void 0?typeof b=="string"?w.fill(g,b):w.fill(g):w.fill(0),w},a.allocUnsafe=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return m(_)},a.allocUnsafeSlow=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return E.SlowBuffer(_)}})(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function d(S){return Array.isArray?Array.isArray(S):R(S)==="[object Array]"}util.isArray=d;function v(S){return typeof S=="boolean"}util.isBoolean=v;function E(S){return S===null}util.isNull=E;function m(S){return S==null}util.isNullOrUndefined=m;function A(S){return typeof S=="number"}util.isNumber=A;function a(S){return typeof S=="string"}util.isString=a;function _(S){return typeof S=="symbol"}util.isSymbol=_;function g(S){return S===void 0}util.isUndefined=g;function b(S){return R(S)==="[object RegExp]"}util.isRegExp=b;function w(S){return typeof S=="object"&&S!==null}util.isObject=w;function l(S){return R(S)==="[object Date]"}util.isDate=l;function M(S){return R(S)==="[object Error]"||S instanceof Error}util.isError=M;function y(S){return typeof S=="function"}util.isFunction=y;function B(S){return S===null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||typeof S=="symbol"||typeof S>"u"}util.isPrimitive=B,util.isBuffer=requireDist().Buffer.isBuffer;function R(S){return Object.prototype.toString.call(S)}return util}var BufferList$1={exports:{}},hasRequiredBufferList$1;function requireBufferList$1(){return hasRequiredBufferList$1||(hasRequiredBufferList$1=1,(function(d){function v(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}var E=requireSafeBuffer$1().Buffer,m=requireUtil$1();function A(a,_,g){a.copy(_,g)}d.exports=(function(){function a(){v(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(g){var b={data:g,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},a.prototype.unshift=function(g){var b={data:g,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},a.prototype.shift=function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(g){if(this.length===0)return"";for(var b=this.head,w=""+b.data;b=b.next;)w+=g+b.data;return w},a.prototype.concat=function(g){if(this.length===0)return E.alloc(0);for(var b=E.allocUnsafe(g>>>0),w=this.head,l=0;w;)A(w.data,b,l),l+=w.data.length,w=w.next;return b},a})(),m&&m.inspect&&m.inspect.custom&&(d.exports.prototype[m.inspect.custom]=function(){var a=m.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 d=requireProcessNextickArgs();function v(A,a){var _=this,g=this._readableState&&this._readableState.destroyed,b=this._writableState&&this._writableState.destroyed;return g||b?(a?a(A):A&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(m,this,A)):d.nextTick(m,this,A)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(A||null,function(w){!a&&w?_._writableState?_._writableState.errorEmitted||(_._writableState.errorEmitted=!0,d.nextTick(m,_,w)):d.nextTick(m,_,w):a&&a(w)}),this)}function E(){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 m(A,a){A.emit("error",a)}return destroy_1$1={destroy:v,undestroy:E},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 d=requireProcessNextickArgs();_stream_writable$1=S;function v(u){var c=this;this.next=null,this.entry=null,this.finish=function(){s(c,u)}}var E=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:d.nextTick,m;S.WritableState=B;var A=Object.create(requireUtil());A.inherits=requireInherits_browser$5();var a={deprecate:requireBrowser$c()},_=requireStreamBrowser$1(),g=requireSafeBuffer$1().Buffer,b=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function w(u){return g.from(u)}function l(u){return g.isBuffer(u)||u instanceof b}var M=requireDestroy$1();A.inherits(S,_);function y(){}function B(u,c){m=m||require_stream_duplex$1(),u=u||{};var o=c instanceof m;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,q=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=q,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 $=u.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){ne(c,H)},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 v(this)}B.prototype.getBuffer=function(){for(var c=this.bufferedRequest,o=[];c;)o.push(c),c=c.next;return o},(function(){try{Object.defineProperty(B.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var R;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(u){return R.call(this,u)?!0:this!==S?!1:u&&u._writableState instanceof B}})):R=function(u){return u instanceof this};function S(u){if(m=m||require_stream_duplex$1(),!R.call(S,this)&&!(this instanceof m))return new S(u);this._writableState=new B(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)),_.call(this)}S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function P(u,c){var o=new Error("write after end");u.emit("error",o),d.nextTick(c,o)}function T(u,c,o,r){var h=!0,q=!1;return o===null?q=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!c.objectMode&&(q=new TypeError("Invalid non-string/buffer chunk")),q&&(u.emit("error",q),d.nextTick(r,q),h=!1),h}S.prototype.write=function(u,c,o){var r=this._writableState,h=!1,q=!r.objectMode&&l(u);return q&&!g.isBuffer(u)&&(u=w(u)),typeof c=="function"&&(o=c,c=null),q?c="buffer":c||(c=r.defaultEncoding),typeof o!="function"&&(o=y),r.ended?P(this,o):(q||T(this,r,u,o))&&(r.pendingcb++,h=z(this,r,q,u,c,o)),h},S.prototype.cork=function(){var u=this._writableState;u.corked++},S.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&fe(this,u))},S.prototype.setDefaultEncoding=function(c){if(typeof c=="string"&&(c=c.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((c+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+c);return this._writableState.defaultEncoding=c,this};function k(u,c,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof c=="string"&&(c=g.from(c,o)),c}Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(u,c,o,r,h,q){if(!o){var $=k(c,r,h);r!==$&&(o=!0,h="buffer",r=$)}var H=c.objectMode?1:r.length;c.length+=H;var Y=c.length<c.highWaterMark;if(Y||(c.needDrain=!0),c.writing||c.corked){var J=c.lastBufferedRequest;c.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:q,next:null},J?J.next=c.lastBufferedRequest:c.bufferedRequest=c.lastBufferedRequest,c.bufferedRequestCount+=1}else j(u,c,!1,H,r,h,q);return Y}function j(u,c,o,r,h,q,$){c.writelen=r,c.writecb=$,c.writing=!0,c.sync=!0,o?u._writev(h,c.onwrite):u._write(h,q,c.onwrite),c.sync=!1}function V(u,c,o,r,h){--c.pendingcb,o?(d.nextTick(h,r),d.nextTick(n,u,c),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,c))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,c){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),c)V(u,o,r,c,h);else{var q=p(o);!q&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&fe(u,o),r?E(ae,u,o,q,h):ae(u,o,q,h)}}function ae(u,c,o,r){o||U(u,c),c.pendingcb--,r(),n(u,c)}function U(u,c){c.length===0&&c.needDrain&&(c.needDrain=!1,u.emit("drain"))}function fe(u,c){c.bufferProcessing=!0;var o=c.bufferedRequest;if(u._writev&&o&&o.next){var r=c.bufferedRequestCount,h=new Array(r),q=c.corkedRequestsFree;q.entry=o;for(var $=0,H=!0;o;)h[$]=o,o.isBuf||(H=!1),o=o.next,$+=1;h.allBuffers=H,j(u,c,!0,c.length,h,"",q.finish),c.pendingcb++,c.lastBufferedRequest=null,q.next?(c.corkedRequestsFree=q.next,q.next=null):c.corkedRequestsFree=new v(c),c.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,J=o.encoding,x=o.callback,I=c.objectMode?1:Y.length;if(j(u,c,!1,I,Y,J,x),o=o.next,c.bufferedRequestCount--,c.writing)break}o===null&&(c.lastBufferedRequest=null)}c.bufferedRequest=o,c.bufferProcessing=!1}S.prototype._write=function(u,c,o){o(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(u,c,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,c=null):typeof c=="function"&&(o=c,c=null),u!=null&&this.write(u,c),r.corked&&(r.corked=1,this.uncork()),r.ending||f(this,r,o)};function p(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,c){u._final(function(o){c.pendingcb--,o&&u.emit("error",o),c.prefinished=!0,u.emit("prefinish"),n(u,c)})}function t(u,c){!c.prefinished&&!c.finalCalled&&(typeof u._final=="function"?(c.pendingcb++,c.finalCalled=!0,d.nextTick(e,u,c)):(c.prefinished=!0,u.emit("prefinish")))}function n(u,c){var o=p(c);return o&&(t(u,c),c.pendingcb===0&&(c.finished=!0,u.emit("finish"))),o}function f(u,c,o){c.ending=!0,n(u,c),o&&(c.finished?d.nextTick(o):u.once("finish",o)),c.ended=!0,u.writable=!1}function s(u,c,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;c.pendingcb--,h(o),r=r.next}c.corkedRequestsFree.next=u}return Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),S.prototype.destroy=M.destroy,S.prototype._undestroy=M.undestroy,S.prototype._destroy=function(u,c){this.end(),c(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 d=requireProcessNextickArgs(),v=Object.keys||function(M){var y=[];for(var B in M)y.push(B);return y};_stream_duplex$1=b;var E=Object.create(requireUtil());E.inherits=requireInherits_browser$5();var m=require_stream_readable$1(),A=require_stream_writable$1();E.inherits(b,m);for(var a=v(A.prototype),_=0;_<a.length;_++){var g=a[_];b.prototype[g]||(b.prototype[g]=A.prototype[g])}function b(M){if(!(this instanceof b))return new b(M);m.call(this,M),A.call(this,M),M&&M.readable===!1&&(this.readable=!1),M&&M.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,M&&M.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function w(){this.allowHalfOpen||this._writableState.ended||d.nextTick(l,this)}function l(M){M.end()}return Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(M){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=M,this._writableState.destroyed=M)}}),b.prototype._destroy=function(M,y){this.push(null),this.end(),d.nextTick(y,M)},_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 d=requireProcessNextickArgs();_stream_readable$1=k;var v=requireIsarray$1(),E;k.ReadableState=T,requireEvents().EventEmitter;var m=function(x,I){return x.listeners(I).length},A=requireStreamBrowser$1(),a=requireSafeBuffer$1().Buffer,_=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function g(x){return a.from(x)}function b(x){return a.isBuffer(x)||x instanceof _}var w=Object.create(requireUtil());w.inherits=requireInherits_browser$5();var l=requireUtil$1(),M=void 0;l&&l.debuglog?M=l.debuglog("stream"):M=function(){};var y=requireBufferList$1(),B=requireDestroy$1(),R;w.inherits(k,A);var S=["error","close","destroy","pause","resume"];function P(x,I,C){if(typeof x.prependListener=="function")return x.prependListener(I,C);!x._events||!x._events[I]?x.on(I,C):v(x._events[I])?x._events[I].unshift(C):x._events[I]=[C,x._events[I]]}function T(x,I){E=E||require_stream_duplex$1(),x=x||{};var C=I instanceof E;this.objectMode=!!x.objectMode,C&&(this.objectMode=this.objectMode||!!x.readableObjectMode);var N=x.highWaterMark,F=x.readableHighWaterMark,D=this.objectMode?16:16*1024;N||N===0?this.highWaterMark=N:C&&(F||F===0)?this.highWaterMark=F:this.highWaterMark=D,this.highWaterMark=Math.floor(this.highWaterMark),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.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(R||(R=requireString_decoder().StringDecoder),this.decoder=new R(x.encoding),this.encoding=x.encoding)}function k(x){if(E=E||require_stream_duplex$1(),!(this instanceof k))return new k(x);this._readableState=new T(x,this),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),A.call(this)}Object.defineProperty(k.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),k.prototype.destroy=B.destroy,k.prototype._undestroy=B.undestroy,k.prototype._destroy=function(x,I){this.push(null),I(x)},k.prototype.push=function(x,I){var C=this._readableState,N;return C.objectMode?N=!0:typeof x=="string"&&(I=I||C.defaultEncoding,I!==C.encoding&&(x=a.from(x,I),I=""),N=!0),z(this,x,I,!1,N)},k.prototype.unshift=function(x){return z(this,x,null,!0,!1)};function z(x,I,C,N,F){var D=x._readableState;if(I===null)D.reading=!1,fe(x,D);else{var X;F||(X=V(D,I)),X?x.emit("error",X):D.objectMode||I&&I.length>0?(typeof I!="string"&&!D.objectMode&&Object.getPrototypeOf(I)!==a.prototype&&(I=g(I)),N?D.endEmitted?x.emit("error",new Error("stream.unshift() after end event")):j(x,D,I,!0):D.ended?x.emit("error",new Error("stream.push() after EOF")):(D.reading=!1,D.decoder&&!C?(I=D.decoder.write(I),D.objectMode||I.length!==0?j(x,D,I,!1):t(x,D)):j(x,D,I,!1))):N||(D.reading=!1)}return Q(D)}function j(x,I,C,N){I.flowing&&I.length===0&&!I.sync?(x.emit("data",C),x.read(0)):(I.length+=I.objectMode?1:C.length,N?I.buffer.unshift(C):I.buffer.push(C),I.needReadable&&p(x)),t(x,I)}function V(x,I){var C;return!b(I)&&typeof I!="string"&&I!==void 0&&!x.objectMode&&(C=new TypeError("Invalid non-string/buffer chunk")),C}function Q(x){return!x.ended&&(x.needReadable||x.length<x.highWaterMark||x.length===0)}k.prototype.isPaused=function(){return this._readableState.flowing===!1},k.prototype.setEncoding=function(x){return R||(R=requireString_decoder().StringDecoder),this._readableState.decoder=new R(x),this._readableState.encoding=x,this};var ne=8388608;function ae(x){return x>=ne?x=ne:(x--,x|=x>>>1,x|=x>>>2,x|=x>>>4,x|=x>>>8,x|=x>>>16,x++),x}function U(x,I){return x<=0||I.length===0&&I.ended?0:I.objectMode?1:x!==x?I.flowing&&I.length?I.buffer.head.data.length:I.length:(x>I.highWaterMark&&(I.highWaterMark=ae(x)),x<=I.length?x:I.ended?I.length:(I.needReadable=!0,0))}k.prototype.read=function(x){M("read",x),x=parseInt(x,10);var I=this._readableState,C=x;if(x!==0&&(I.emittedReadable=!1),x===0&&I.needReadable&&(I.length>=I.highWaterMark||I.ended))return M("read: emitReadable",I.length,I.ended),I.length===0&&I.ended?H(this):p(this),null;if(x=U(x,I),x===0&&I.ended)return I.length===0&&H(this),null;var N=I.needReadable;M("need readable",N),(I.length===0||I.length-x<I.highWaterMark)&&(N=!0,M("length less than watermark",N)),I.ended||I.reading?(N=!1,M("reading or ended",N)):N&&(M("do read"),I.reading=!0,I.sync=!0,I.length===0&&(I.needReadable=!0),this._read(I.highWaterMark),I.sync=!1,I.reading||(x=U(C,I)));var F;return x>0?F=r(x,I):F=null,F===null?(I.needReadable=!0,x=0):I.length-=x,I.length===0&&(I.ended||(I.needReadable=!0),C!==x&&I.ended&&H(this)),F!==null&&this.emit("data",F),F};function fe(x,I){if(!I.ended){if(I.decoder){var C=I.decoder.end();C&&C.length&&(I.buffer.push(C),I.length+=I.objectMode?1:C.length)}I.ended=!0,p(x)}}function p(x){var I=x._readableState;I.needReadable=!1,I.emittedReadable||(M("emitReadable",I.flowing),I.emittedReadable=!0,I.sync?d.nextTick(e,x):e(x))}function e(x){M("emit readable"),x.emit("readable"),o(x)}function t(x,I){I.readingMore||(I.readingMore=!0,d.nextTick(n,x,I))}function n(x,I){for(var C=I.length;!I.reading&&!I.flowing&&!I.ended&&I.length<I.highWaterMark&&(M("maybeReadMore read 0"),x.read(0),C!==I.length);)C=I.length;I.readingMore=!1}k.prototype._read=function(x){this.emit("error",new Error("_read() is not implemented"))},k.prototype.pipe=function(x,I){var C=this,N=this._readableState;switch(N.pipesCount){case 0:N.pipes=x;break;case 1:N.pipes=[N.pipes,x];break;default:N.pipes.push(x);break}N.pipesCount+=1,M("pipe count=%d opts=%j",N.pipesCount,I);var F=(!I||I.end!==!1)&&x!==process$1.stdout&&x!==process$1.stderr,D=F?le:De;N.endEmitted?d.nextTick(D):C.once("end",D),x.on("unpipe",X);function X(be,Re){M("onunpipe"),be===C&&Re&&Re.hasUnpiped===!1&&(Re.hasUnpiped=!0,Ce())}function le(){M("onend"),x.end()}var ue=f(C);x.on("drain",ue);var pe=!1;function Ce(){M("cleanup"),x.removeListener("close",ye),x.removeListener("finish",Me),x.removeListener("drain",ue),x.removeListener("error",Ne),x.removeListener("unpipe",X),C.removeListener("end",le),C.removeListener("end",De),C.removeListener("data",ce),pe=!0,N.awaitDrain&&(!x._writableState||x._writableState.needDrain)&&ue()}var me=!1;C.on("data",ce);function ce(be){M("ondata"),me=!1;var Re=x.write(be);Re===!1&&!me&&((N.pipesCount===1&&N.pipes===x||N.pipesCount>1&&J(N.pipes,x)!==-1)&&!pe&&(M("false write response, pause",N.awaitDrain),N.awaitDrain++,me=!0),C.pause())}function Ne(be){M("onerror",be),De(),x.removeListener("error",Ne),m(x,"error")===0&&x.emit("error",be)}P(x,"error",Ne);function ye(){x.removeListener("finish",Me),De()}x.once("close",ye);function Me(){M("onfinish"),x.removeListener("close",ye),De()}x.once("finish",Me);function De(){M("unpipe"),C.unpipe(x)}return x.emit("pipe",C),N.flowing||(M("pipe resume"),C.resume()),x};function f(x){return function(){var I=x._readableState;M("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&m(x,"data")&&(I.flowing=!0,o(x))}}k.prototype.unpipe=function(x){var I=this._readableState,C={hasUnpiped:!1};if(I.pipesCount===0)return this;if(I.pipesCount===1)return x&&x!==I.pipes?this:(x||(x=I.pipes),I.pipes=null,I.pipesCount=0,I.flowing=!1,x&&x.emit("unpipe",this,C),this);if(!x){var N=I.pipes,F=I.pipesCount;I.pipes=null,I.pipesCount=0,I.flowing=!1;for(var D=0;D<F;D++)N[D].emit("unpipe",this,{hasUnpiped:!1});return this}var X=J(I.pipes,x);return X===-1?this:(I.pipes.splice(X,1),I.pipesCount-=1,I.pipesCount===1&&(I.pipes=I.pipes[0]),x.emit("unpipe",this,C),this)},k.prototype.on=function(x,I){var C=A.prototype.on.call(this,x,I);if(x==="data")this._readableState.flowing!==!1&&this.resume();else if(x==="readable"){var N=this._readableState;!N.endEmitted&&!N.readableListening&&(N.readableListening=N.needReadable=!0,N.emittedReadable=!1,N.reading?N.length&&p(this):d.nextTick(s,this))}return C},k.prototype.addListener=k.prototype.on;function s(x){M("readable nexttick read 0"),x.read(0)}k.prototype.resume=function(){var x=this._readableState;return x.flowing||(M("resume"),x.flowing=!0,u(this,x)),this};function u(x,I){I.resumeScheduled||(I.resumeScheduled=!0,d.nextTick(c,x,I))}function c(x,I){I.reading||(M("resume read 0"),x.read(0)),I.resumeScheduled=!1,I.awaitDrain=0,x.emit("resume"),o(x),I.flowing&&!I.reading&&x.read(0)}k.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(x){var I=x._readableState;for(M("flow",I.flowing);I.flowing&&x.read()!==null;);}k.prototype.wrap=function(x){var I=this,C=this._readableState,N=!1;x.on("end",function(){if(M("wrapped end"),C.decoder&&!C.ended){var X=C.decoder.end();X&&X.length&&I.push(X)}I.push(null)}),x.on("data",function(X){if(M("wrapped data"),C.decoder&&(X=C.decoder.write(X)),!(C.objectMode&&X==null)&&!(!C.objectMode&&(!X||!X.length))){var le=I.push(X);le||(N=!0,x.pause())}});for(var F in x)this[F]===void 0&&typeof x[F]=="function"&&(this[F]=(function(X){return function(){return x[X].apply(x,arguments)}})(F));for(var D=0;D<S.length;D++)x.on(S[D],this.emit.bind(this,S[D]));return this._read=function(X){M("wrapped _read",X),N&&(N=!1,x.resume())},this},Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),k._fromList=r;function r(x,I){if(I.length===0)return null;var C;return I.objectMode?C=I.buffer.shift():!x||x>=I.length?(I.decoder?C=I.buffer.join(""):I.buffer.length===1?C=I.buffer.head.data:C=I.buffer.concat(I.length),I.buffer.clear()):C=h(x,I.buffer,I.decoder),C}function h(x,I,C){var N;return x<I.head.data.length?(N=I.head.data.slice(0,x),I.head.data=I.head.data.slice(x)):x===I.head.data.length?N=I.shift():N=C?q(x,I):$(x,I),N}function q(x,I){var C=I.head,N=1,F=C.data;for(x-=F.length;C=C.next;){var D=C.data,X=x>D.length?D.length:x;if(X===D.length?F+=D:F+=D.slice(0,x),x-=X,x===0){X===D.length?(++N,C.next?I.head=C.next:I.head=I.tail=null):(I.head=C,C.data=D.slice(X));break}++N}return I.length-=N,F}function $(x,I){var C=a.allocUnsafe(x),N=I.head,F=1;for(N.data.copy(C),x-=N.data.length;N=N.next;){var D=N.data,X=x>D.length?D.length:x;if(D.copy(C,C.length-x,0,X),x-=X,x===0){X===D.length?(++F,N.next?I.head=N.next:I.head=I.tail=null):(I.head=N,N.data=D.slice(X));break}++F}return I.length-=F,C}function H(x){var I=x._readableState;if(I.length>0)throw new Error('"endReadable()" called on non-empty stream');I.endEmitted||(I.ended=!0,d.nextTick(Y,I,x))}function Y(x,I){!x.endEmitted&&x.length===0&&(x.endEmitted=!0,I.readable=!1,I.emit("end"))}function J(x,I){for(var C=0,N=x.length;C<N;C++)if(x[C]===I)return C;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=m;var d=require_stream_duplex$1(),v=Object.create(requireUtil());v.inherits=requireInherits_browser$5(),v.inherits(m,d);function E(_,g){var b=this._transformState;b.transforming=!1;var w=b.writecb;if(!w)return this.emit("error",new Error("write callback called multiple times"));b.writechunk=null,b.writecb=null,g!=null&&this.push(g),w(_);var l=this._readableState;l.reading=!1,(l.needReadable||l.length<l.highWaterMark)&&this._read(l.highWaterMark)}function m(_){if(!(this instanceof m))return new m(_);d.call(this,_),this._transformState={afterTransform:E.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,_&&(typeof _.transform=="function"&&(this._transform=_.transform),typeof _.flush=="function"&&(this._flush=_.flush)),this.on("prefinish",A)}function A(){var _=this;typeof this._flush=="function"?this._flush(function(g,b){a(_,g,b)}):a(this,null,null)}m.prototype.push=function(_,g){return this._transformState.needTransform=!1,d.prototype.push.call(this,_,g)},m.prototype._transform=function(_,g,b){throw new Error("_transform() is not implemented")},m.prototype._write=function(_,g,b){var w=this._transformState;if(w.writecb=b,w.writechunk=_,w.writeencoding=g,!w.transforming){var l=this._readableState;(w.needTransform||l.needReadable||l.length<l.highWaterMark)&&this._read(l.highWaterMark)}},m.prototype._read=function(_){var g=this._transformState;g.writechunk!==null&&g.writecb&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},m.prototype._destroy=function(_,g){var b=this;d.prototype._destroy.call(this,_,function(w){g(w),b.emit("close")})};function a(_,g,b){if(g)return _.emit("error",g);if(b!=null&&_.push(b),_._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(_._transformState.transforming)throw new Error("Calling transform done when still transforming");return _.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=E;var d=require_stream_transform$1(),v=Object.create(requireUtil());v.inherits=requireInherits_browser$5(),v.inherits(E,d);function E(m){if(!(this instanceof E))return new E(m);d.call(this,m)}return E.prototype._transform=function(m,A,a){a(null,m)},_stream_passthrough$1}var hasRequiredReadableBrowser$2;function requireReadableBrowser$2(){return hasRequiredReadableBrowser$2||(hasRequiredReadableBrowser$2=1,(function(d,v){v=d.exports=require_stream_readable$1(),v.Stream=v,v.Readable=v,v.Writable=require_stream_writable$1(),v.Duplex=require_stream_duplex$1(),v.Transform=require_stream_transform$1(),v.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 d=requireSafeBuffer$2().Buffer,v=requireToBuffer$1(),E=requireReadableBrowser$2().Transform,m=requireInherits_browser$5();function A(a){E.call(this),this._block=d.allocUnsafe(a),this._blockSize=a,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return m(A,E),A.prototype._transform=function(a,_,g){var b=null;try{this.update(a,_)}catch(w){b=w}g(b)},A.prototype._flush=function(a){var _=null;try{this.push(this.digest())}catch(g){_=g}a(_)},A.prototype.update=function(a,_){if(this._finalized)throw new Error("Digest already called");for(var g=v(a,_),b=this._block,w=0;this._blockOffset+g.length-w>=this._blockSize;){for(var l=this._blockOffset;l<this._blockSize;)b[l]=g[w],l+=1,w+=1;this._update(),this._blockOffset=0}for(;w<g.length;)b[this._blockOffset]=g[w],this._blockOffset+=1,w+=1;for(var M=0,y=g.length*8;y>0;++M)this._length[M]+=y,y=this._length[M]/4294967296|0,y>0&&(this._length[M]-=4294967296*y);return this},A.prototype._update=function(){throw new Error("_update is not implemented")},A.prototype.digest=function(a){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var _=this._digest();a!==void 0&&(_=_.toString(a)),this._block.fill(0),this._blockOffset=0;for(var g=0;g<4;++g)this._length[g]=0;return _},A.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=A,hashBase}var ripemd160,hasRequiredRipemd160;function requireRipemd160(){if(hasRequiredRipemd160)return ripemd160;hasRequiredRipemd160=1;var d=requireDist().Buffer,v=requireInherits_browser$5(),E=requireHashBase(),m=new Array(16),A=[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],_=[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],g=[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],b=[0,1518500249,1859775393,2400959708,2840853838],w=[1352829926,1548603684,1836072691,2053994217,0];function l(T,k){return T<<k|T>>>32-k}function M(T,k,z,j,V,Q,ne,ae){return l(T+(k^z^j)+Q+ne|0,ae)+V|0}function y(T,k,z,j,V,Q,ne,ae){return l(T+(k&z|~k&j)+Q+ne|0,ae)+V|0}function B(T,k,z,j,V,Q,ne,ae){return l(T+((k|~z)^j)+Q+ne|0,ae)+V|0}function R(T,k,z,j,V,Q,ne,ae){return l(T+(k&j|z&~j)+Q+ne|0,ae)+V|0}function S(T,k,z,j,V,Q,ne,ae){return l(T+(k^(z|~j))+Q+ne|0,ae)+V|0}function P(){E.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}return v(P,E),P.prototype._update=function(){for(var T=m,k=0;k<16;++k)T[k]=this._block.readInt32LE(k*4);for(var z=this._a|0,j=this._b|0,V=this._c|0,Q=this._d|0,ne=this._e|0,ae=this._a|0,U=this._b|0,fe=this._c|0,p=this._d|0,e=this._e|0,t=0;t<80;t+=1){var n,f;t<16?(n=M(z,j,V,Q,ne,T[A[t]],b[0],_[t]),f=S(ae,U,fe,p,e,T[a[t]],w[0],g[t])):t<32?(n=y(z,j,V,Q,ne,T[A[t]],b[1],_[t]),f=R(ae,U,fe,p,e,T[a[t]],w[1],g[t])):t<48?(n=B(z,j,V,Q,ne,T[A[t]],b[2],_[t]),f=B(ae,U,fe,p,e,T[a[t]],w[2],g[t])):t<64?(n=R(z,j,V,Q,ne,T[A[t]],b[3],_[t]),f=y(ae,U,fe,p,e,T[a[t]],w[3],g[t])):(n=S(z,j,V,Q,ne,T[A[t]],b[4],_[t]),f=M(ae,U,fe,p,e,T[a[t]],w[4],g[t])),z=ne,ne=Q,Q=l(V,10),V=j,j=n,ae=e,e=p,p=l(fe,10),fe=U,U=f}var s=this._b+V+p|0;this._b=this._c+Q+e|0,this._c=this._d+ne+ae|0,this._d=this._e+z+U|0,this._e=this._a+j+fe|0,this._a=s},P.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 T=d.alloc?d.alloc(20):new d(20);return T.writeInt32LE(this._a,0),T.writeInt32LE(this._b,4),T.writeInt32LE(this._c,8),T.writeInt32LE(this._d,12),T.writeInt32LE(this._e,16),T},ripemd160=P,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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$4.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),inherits_browser$4.exports}var hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var d=requireSafeBuffer$2().Buffer,v=requireToBuffer$2();function E(m,A){this._block=d.alloc(m),this._finalSize=A,this._blockSize=m,this._len=0}return E.prototype.update=function(m,A){m=v(m,A||"utf8");for(var a=this._block,_=this._blockSize,g=m.length,b=this._len,w=0;w<g;){for(var l=b%_,M=Math.min(g-w,_-l),y=0;y<M;y++)a[l+y]=m[w+y];b+=M,w+=M,b%_===0&&this._update(a)}return this._len+=g,this},E.prototype.digest=function(m){var A=this._len%this._blockSize;this._block[A]=128,this._block.fill(0,A+1),A>=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 _=(a&4294967295)>>>0,g=(a-_)/4294967296;this._block.writeUInt32BE(g,this._blockSize-8),this._block.writeUInt32BE(_,this._blockSize-4)}this._update(this._block);var b=this._hash();return m?b.toString(m):b},E.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=E,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var d=requireInherits_browser$4(),v=requireHash$1(),E=requireSafeBuffer$2().Buffer,m=[1518500249,1859775393,-1894007588,-899497514],A=new Array(80);function a(){this.init(),this._w=A,v.call(this,64,56)}d(a,v),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function _(w){return w<<5|w>>>27}function g(w){return w<<30|w>>>2}function b(w,l,M,y){return w===0?l&M|~l&y:w===2?l&M|l&y|M&y:l^M^y}return a.prototype._update=function(w){for(var l=this._w,M=this._a|0,y=this._b|0,B=this._c|0,R=this._d|0,S=this._e|0,P=0;P<16;++P)l[P]=w.readInt32BE(P*4);for(;P<80;++P)l[P]=l[P-3]^l[P-8]^l[P-14]^l[P-16];for(var T=0;T<80;++T){var k=~~(T/20),z=_(M)+b(k,y,B,R)+S+l[T]+m[k]|0;S=R,R=B,B=g(y),y=M,M=z}this._a=M+this._a|0,this._b=y+this._b|0,this._c=B+this._c|0,this._d=R+this._d|0,this._e=S+this._e|0},a.prototype._hash=function(){var w=E.allocUnsafe(20);return w.writeInt32BE(this._a|0,0),w.writeInt32BE(this._b|0,4),w.writeInt32BE(this._c|0,8),w.writeInt32BE(this._d|0,12),w.writeInt32BE(this._e|0,16),w},sha$1=a,sha$1}var sha1,hasRequiredSha1;function requireSha1(){if(hasRequiredSha1)return sha1;hasRequiredSha1=1;var d=requireInherits_browser$4(),v=requireHash$1(),E=requireSafeBuffer$2().Buffer,m=[1518500249,1859775393,-1894007588,-899497514],A=new Array(80);function a(){this.init(),this._w=A,v.call(this,64,56)}d(a,v),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function _(l){return l<<1|l>>>31}function g(l){return l<<5|l>>>27}function b(l){return l<<30|l>>>2}function w(l,M,y,B){return l===0?M&y|~M&B:l===2?M&y|M&B|y&B:M^y^B}return a.prototype._update=function(l){for(var M=this._w,y=this._a|0,B=this._b|0,R=this._c|0,S=this._d|0,P=this._e|0,T=0;T<16;++T)M[T]=l.readInt32BE(T*4);for(;T<80;++T)M[T]=_(M[T-3]^M[T-8]^M[T-14]^M[T-16]);for(var k=0;k<80;++k){var z=~~(k/20),j=g(y)+w(z,B,R,S)+P+M[k]+m[z]|0;P=S,S=R,R=b(B),B=y,y=j}this._a=y+this._a|0,this._b=B+this._b|0,this._c=R+this._c|0,this._d=S+this._d|0,this._e=P+this._e|0},a.prototype._hash=function(){var l=E.allocUnsafe(20);return l.writeInt32BE(this._a|0,0),l.writeInt32BE(this._b|0,4),l.writeInt32BE(this._c|0,8),l.writeInt32BE(this._d|0,12),l.writeInt32BE(this._e|0,16),l},sha1=a,sha1}var sha256$1,hasRequiredSha256;function requireSha256(){if(hasRequiredSha256)return sha256$1;hasRequiredSha256=1;var d=requireInherits_browser$4(),v=requireHash$1(),E=requireSafeBuffer$2().Buffer,m=[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],A=new Array(64);function a(){this.init(),this._w=A,v.call(this,64,56)}d(a,v),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 _(y,B,R){return R^y&(B^R)}function g(y,B,R){return y&B|R&(y|B)}function b(y){return(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10)}function w(y){return(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7)}function l(y){return(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3}function M(y){return(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10}return a.prototype._update=function(y){for(var B=this._w,R=this._a|0,S=this._b|0,P=this._c|0,T=this._d|0,k=this._e|0,z=this._f|0,j=this._g|0,V=this._h|0,Q=0;Q<16;++Q)B[Q]=y.readInt32BE(Q*4);for(;Q<64;++Q)B[Q]=M(B[Q-2])+B[Q-7]+l(B[Q-15])+B[Q-16]|0;for(var ne=0;ne<64;++ne){var ae=V+w(k)+_(k,z,j)+m[ne]+B[ne]|0,U=b(R)+g(R,S,P)|0;V=j,j=z,z=k,k=T+ae|0,T=P,P=S,S=R,R=ae+U|0}this._a=R+this._a|0,this._b=S+this._b|0,this._c=P+this._c|0,this._d=T+this._d|0,this._e=k+this._e|0,this._f=z+this._f|0,this._g=j+this._g|0,this._h=V+this._h|0},a.prototype._hash=function(){var y=E.allocUnsafe(32);return y.writeInt32BE(this._a,0),y.writeInt32BE(this._b,4),y.writeInt32BE(this._c,8),y.writeInt32BE(this._d,12),y.writeInt32BE(this._e,16),y.writeInt32BE(this._f,20),y.writeInt32BE(this._g,24),y.writeInt32BE(this._h,28),y},sha256$1=a,sha256$1}var sha224$1,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$1;hasRequiredSha224=1;var d=requireInherits_browser$4(),v=requireSha256(),E=requireHash$1(),m=requireSafeBuffer$2().Buffer,A=new Array(64);function a(){this.init(),this._w=A,E.call(this,64,56)}return d(a,v),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 _=m.allocUnsafe(28);return _.writeInt32BE(this._a,0),_.writeInt32BE(this._b,4),_.writeInt32BE(this._c,8),_.writeInt32BE(this._d,12),_.writeInt32BE(this._e,16),_.writeInt32BE(this._f,20),_.writeInt32BE(this._g,24),_},sha224$1=a,sha224$1}var sha512$1,hasRequiredSha512;function requireSha512(){if(hasRequiredSha512)return sha512$1;hasRequiredSha512=1;var d=requireInherits_browser$4(),v=requireHash$1(),E=requireSafeBuffer$2().Buffer,m=[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],A=new Array(160);function a(){this.init(),this._w=A,v.call(this,128,112)}d(a,v),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 _(S,P,T){return T^S&(P^T)}function g(S,P,T){return S&P|T&(S|P)}function b(S,P){return(S>>>28|P<<4)^(P>>>2|S<<30)^(P>>>7|S<<25)}function w(S,P){return(S>>>14|P<<18)^(S>>>18|P<<14)^(P>>>9|S<<23)}function l(S,P){return(S>>>1|P<<31)^(S>>>8|P<<24)^S>>>7}function M(S,P){return(S>>>1|P<<31)^(S>>>8|P<<24)^(S>>>7|P<<25)}function y(S,P){return(S>>>19|P<<13)^(P>>>29|S<<3)^S>>>6}function B(S,P){return(S>>>19|P<<13)^(P>>>29|S<<3)^(S>>>6|P<<26)}function R(S,P){return S>>>0<P>>>0?1:0}return a.prototype._update=function(S){for(var P=this._w,T=this._ah|0,k=this._bh|0,z=this._ch|0,j=this._dh|0,V=this._eh|0,Q=this._fh|0,ne=this._gh|0,ae=this._hh|0,U=this._al|0,fe=this._bl|0,p=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)P[u]=S.readInt32BE(u*4),P[u+1]=S.readInt32BE(u*4+4);for(;u<160;u+=2){var c=P[u-30],o=P[u-30+1],r=l(c,o),h=M(o,c);c=P[u-4],o=P[u-4+1];var q=y(c,o),$=B(o,c),H=P[u-14],Y=P[u-14+1],J=P[u-32],x=P[u-32+1],I=h+Y|0,C=r+H+R(I,h)|0;I=I+$|0,C=C+q+R(I,$)|0,I=I+x|0,C=C+J+R(I,x)|0,P[u]=C,P[u+1]=I}for(var N=0;N<160;N+=2){C=P[N],I=P[N+1];var F=g(T,k,z),D=g(U,fe,p),X=b(T,U),le=b(U,T),ue=w(V,t),pe=w(t,V),Ce=m[N],me=m[N+1],ce=_(V,Q,ne),Ne=_(t,n,f),ye=s+pe|0,Me=ae+ue+R(ye,s)|0;ye=ye+Ne|0,Me=Me+ce+R(ye,Ne)|0,ye=ye+me|0,Me=Me+Ce+R(ye,me)|0,ye=ye+I|0,Me=Me+C+R(ye,I)|0;var De=le+D|0,be=X+F+R(De,le)|0;ae=ne,s=f,ne=Q,f=n,Q=V,n=t,t=e+ye|0,V=j+Me+R(t,e)|0,j=z,e=p,z=k,p=fe,k=T,fe=U,U=ye+De|0,T=Me+be+R(U,ye)|0}this._al=this._al+U|0,this._bl=this._bl+fe|0,this._cl=this._cl+p|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+T+R(this._al,U)|0,this._bh=this._bh+k+R(this._bl,fe)|0,this._ch=this._ch+z+R(this._cl,p)|0,this._dh=this._dh+j+R(this._dl,e)|0,this._eh=this._eh+V+R(this._el,t)|0,this._fh=this._fh+Q+R(this._fl,n)|0,this._gh=this._gh+ne+R(this._gl,f)|0,this._hh=this._hh+ae+R(this._hl,s)|0},a.prototype._hash=function(){var S=E.allocUnsafe(64);function P(T,k,z){S.writeInt32BE(T,z),S.writeInt32BE(k,z+4)}return P(this._ah,this._al,0),P(this._bh,this._bl,8),P(this._ch,this._cl,16),P(this._dh,this._dl,24),P(this._eh,this._el,32),P(this._fh,this._fl,40),P(this._gh,this._gl,48),P(this._hh,this._hl,56),S},sha512$1=a,sha512$1}var sha384$1,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$1;hasRequiredSha384=1;var d=requireInherits_browser$4(),v=requireSha512(),E=requireHash$1(),m=requireSafeBuffer$2().Buffer,A=new Array(160);function a(){this.init(),this._w=A,E.call(this,128,112)}return d(a,v),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 _=m.allocUnsafe(48);function g(b,w,l){_.writeInt32BE(b,l),_.writeInt32BE(w,l+4)}return g(this._ah,this._al,0),g(this._bh,this._bl,8),g(this._ch,this._cl,16),g(this._dh,this._dl,24),g(this._eh,this._el,32),g(this._fh,this._fl,40),_},sha384$1=a,sha384$1}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,(function(d){d.exports=function(E){var m=E.toLowerCase(),A=d.exports[m];if(!A)throw new Error(m+" is not supported (we accept pull requests)");return new A},d.exports.sha=requireSha$1(),d.exports.sha1=requireSha1(),d.exports.sha224=requireSha224(),d.exports.sha256=requireSha256(),d.exports.sha384=requireSha384(),d.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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$3.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),inherits_browser$3.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var d=requireSafeBuffer$2().Buffer,v=requireStreamBrowserify().Transform,E=requireString_decoder().StringDecoder,m=requireInherits_browser$3(),A=requireToBuffer$2();function a(_){v.call(this),this.hashMode=typeof _=="string",this.hashMode?this[_]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return m(a,v),a.prototype.update=function(_,g,b){var w=A(_,g),l=this._update(w);return this.hashMode?this:(b&&(l=this._toString(l,b)),l)},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(_,g,b){var w;try{this.hashMode?this._update(_):this.push(this._update(_))}catch(l){w=l}finally{b(w)}},a.prototype._flush=function(_){var g;try{this.push(this.__final())}catch(b){g=b}_(g)},a.prototype._finalOrDigest=function(_){var g=this.__final()||d.alloc(0);return _&&(g=this._toString(g,_,!0)),g},a.prototype._toString=function(_,g,b){if(this._decoder||(this._decoder=new E(g),this._encoding=g),this._encoding!==g)throw new Error("can’t switch encodings");var w=this._decoder.write(_);return b&&(w+=this._decoder.end()),w},cipherBase=a,cipherBase}var browser$b,hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b;hasRequiredBrowser$b=1;var d=requireInherits_browser$8(),v=requireMd5_js(),E=requireRipemd160(),m=requireSha_js(),A=requireCipherBase();function a(_){A.call(this,"digest"),this._hash=_}return d(a,A),a.prototype._update=function(_){this._hash.update(_)},a.prototype._final=function(){return this._hash.digest()},browser$b=function(g){return g=g.toLowerCase(),g==="md5"?new v:g==="rmd160"||g==="ripemd160"?new E:new a(m(g))},browser$b}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var d=requireInherits_browser$8(),v=requireSafeBuffer$2().Buffer,E=requireCipherBase(),m=v.alloc(128),A=64;function a(_,g){E.call(this,"digest"),typeof g=="string"&&(g=v.from(g)),this._alg=_,this._key=g,g.length>A?g=_(g):g.length<A&&(g=v.concat([g,m],A));for(var b=this._ipad=v.allocUnsafe(A),w=this._opad=v.allocUnsafe(A),l=0;l<A;l++)b[l]=g[l]^54,w[l]=g[l]^92;this._hash=[b]}return d(a,E),a.prototype._update=function(_){this._hash.push(_)},a.prototype._final=function(){var _=this._alg(v.concat(this._hash));return this._alg(v.concat([this._opad,_]))},legacy=a,legacy}var md5,hasRequiredMd5;function requireMd5(){if(hasRequiredMd5)return md5;hasRequiredMd5=1;var d=requireMd5_js();return md5=function(v){return new d().update(v).digest()},md5}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1;var d=requireInherits_browser$8(),v=requireLegacy(),E=requireCipherBase(),m=requireSafeBuffer$2().Buffer,A=requireMd5(),a=requireRipemd160(),_=requireSha_js(),g=m.alloc(128);function b(w,l){E.call(this,"digest"),typeof l=="string"&&(l=m.from(l));var M=w==="sha512"||w==="sha384"?128:64;if(this._alg=w,this._key=l,l.length>M){var y=w==="rmd160"?new a:_(w);l=y.update(l).digest()}else l.length<M&&(l=m.concat([l,g],M));for(var B=this._ipad=m.allocUnsafe(M),R=this._opad=m.allocUnsafe(M),S=0;S<M;S++)B[S]=l[S]^54,R[S]=l[S]^92;this._hash=w==="rmd160"?new a:_(w),this._hash.update(B)}return d(b,E),b.prototype._update=function(w){this._hash.update(w)},b.prototype._final=function(){var w=this._hash.digest(),l=this._alg==="rmd160"?new a:_(this._alg);return l.update(this._opad).update(w).digest()},browser$a=function(l,M){return l=l.toLowerCase(),l==="rmd160"||l==="ripemd160"?new b("rmd160",M):l==="md5"?new v(A,M):new b(l,M)},browser$a}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$1={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$1),algos}var browser$9={},precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var d=isFinite,v=Math.pow(2,30)-1;return precondition=function(E,m){if(typeof E!="number")throw new TypeError("Iterations not a number");if(E<0||!d(E))throw new TypeError("Bad iterations");if(typeof m!="number")throw new TypeError("Key length not a number");if(m<0||m>v||m!==m)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var d;if(commonjsGlobal.process&&commonjsGlobal.process.browser)d="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var v=parseInt(process$1.version.split(".")[0].slice(1),10);d=v>=6?"utf-8":"binary"}else d="utf-8";return defaultEncoding_1=d,defaultEncoding_1}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var d=requireSafeBuffer$2().Buffer,v=requireToBuffer$2(),E=typeof Uint8Array<"u",m=E&&typeof ArrayBuffer<"u",A=m&&ArrayBuffer.isView;return toBuffer_1=function(a,_,g){if(typeof a=="string"||d.isBuffer(a)||E&&a instanceof Uint8Array||A&&A(a))return v(a,_);throw new TypeError(g+" 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 d=requireMd5(),v=requireRipemd160(),E=requireSha_js(),m=requireSafeBuffer$2().Buffer,A=requirePrecondition(),a=requireDefaultEncoding(),_=requireToBuffer(),g=m.alloc(128),b={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},w={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function l(R){return new v().update(R).digest()}function M(R){function S(P){return E(R).update(P).digest()}return R==="rmd160"||R==="ripemd160"?l:R==="md5"?d:S}function y(R,S,P){var T=M(R),k=R==="sha512"||R==="sha384"?128:64;S.length>k?S=T(S):S.length<k&&(S=m.concat([S,g],k));for(var z=m.allocUnsafe(k+b[R]),j=m.allocUnsafe(k+b[R]),V=0;V<k;V++)z[V]=S[V]^54,j[V]=S[V]^92;var Q=m.allocUnsafe(k+P+4);z.copy(Q,0,0,k),this.ipad1=Q,this.ipad2=z,this.opad=j,this.alg=R,this.blocksize=k,this.hash=T,this.size=b[R]}y.prototype.run=function(R,S){R.copy(S,this.blocksize);var P=this.hash(S);return P.copy(this.opad,this.blocksize),this.hash(this.opad)};function B(R,S,P,T,k){A(P,T),R=_(R,a,"Password"),S=_(S,a,"Salt");var z=(k||"sha1").toLowerCase(),j=w[z]||z,V=b[j];if(typeof V!="number"||!V)throw new TypeError("Digest algorithm not supported: "+k);var Q=new y(j,R,S.length),ne=m.allocUnsafe(T),ae=m.allocUnsafe(S.length+4);S.copy(ae,0,0,S.length);for(var U=0,fe=V,p=Math.ceil(T/fe),e=1;e<=p;e++){ae.writeUInt32BE(e,S.length);for(var t=Q.run(ae,Q.ipad1),n=t,f=1;f<P;f++){n=Q.run(n,Q.ipad2);for(var s=0;s<fe;s++)t[s]^=n[s]}t.copy(ne,U),U+=fe}return ne}return syncBrowser=B,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var d=requireSafeBuffer$2().Buffer,v=requirePrecondition(),E=requireDefaultEncoding(),m=requireSyncBrowser(),A=requireToBuffer(),a,_=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,g={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"},b=[],w;function l(){return w||(commonjsGlobal.process&&commonjsGlobal.process.nextTick?w=commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?w=commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?w=commonjsGlobal.setImmediate:w=commonjsGlobal.setTimeout,w)}function M(R,S,P,T,k){return _.importKey("raw",R,{name:"PBKDF2"},!1,["deriveBits"]).then(function(z){return _.deriveBits({name:"PBKDF2",salt:S,iterations:P,hash:{name:k}},z,T<<3)}).then(function(z){return d.from(z)})}function y(R){if(commonjsGlobal.process&&!commonjsGlobal.process.browser||!_||!_.importKey||!_.deriveBits)return Promise.resolve(!1);if(b[R]!==void 0)return b[R];a=a||d.alloc(8);var S=M(a,a,10,128,R).then(function(){return!0},function(){return!1});return b[R]=S,S}function B(R,S){R.then(function(P){l()(function(){S(null,P)})},function(P){l()(function(){S(P)})})}return async=function(R,S,P,T,k,z){if(typeof k=="function"&&(z=k,k=void 0),v(P,T),R=A(R,E,"Password"),S=A(S,E,"Salt"),typeof z!="function")throw new Error("No callback provided to pbkdf2");k=k||"sha1";var j=g[k.toLowerCase()];if(!j||typeof commonjsGlobal.Promise!="function"){l()(function(){var V;try{V=m(R,S,P,T,k)}catch(Q){z(Q);return}z(null,V)});return}B(y(j).then(function(V){return V?M(R,S,P,T,j):m(R,S,P,T,k)}),z)},async}var hasRequiredBrowser$9;function requireBrowser$9(){return hasRequiredBrowser$9||(hasRequiredBrowser$9=1,browser$9.pbkdf2=requireAsync(),browser$9.pbkdf2Sync=requireSyncBrowser()),browser$9}var browser$8={},des$1={},utils$4={},hasRequiredUtils$4;function requireUtils$4(){if(hasRequiredUtils$4)return utils$4;hasRequiredUtils$4=1,utils$4.readUInt32BE=function(A,a){var _=A[0+a]<<24|A[1+a]<<16|A[2+a]<<8|A[3+a];return _>>>0},utils$4.writeUInt32BE=function(A,a,_){A[0+_]=a>>>24,A[1+_]=a>>>16&255,A[2+_]=a>>>8&255,A[3+_]=a&255},utils$4.ip=function(A,a,_,g){for(var b=0,w=0,l=6;l>=0;l-=2){for(var M=0;M<=24;M+=8)b<<=1,b|=a>>>M+l&1;for(var M=0;M<=24;M+=8)b<<=1,b|=A>>>M+l&1}for(var l=6;l>=0;l-=2){for(var M=1;M<=25;M+=8)w<<=1,w|=a>>>M+l&1;for(var M=1;M<=25;M+=8)w<<=1,w|=A>>>M+l&1}_[g+0]=b>>>0,_[g+1]=w>>>0},utils$4.rip=function(A,a,_,g){for(var b=0,w=0,l=0;l<4;l++)for(var M=24;M>=0;M-=8)b<<=1,b|=a>>>M+l&1,b<<=1,b|=A>>>M+l&1;for(var l=4;l<8;l++)for(var M=24;M>=0;M-=8)w<<=1,w|=a>>>M+l&1,w<<=1,w|=A>>>M+l&1;_[g+0]=b>>>0,_[g+1]=w>>>0},utils$4.pc1=function(A,a,_,g){for(var b=0,w=0,l=7;l>=5;l--){for(var M=0;M<=24;M+=8)b<<=1,b|=a>>M+l&1;for(var M=0;M<=24;M+=8)b<<=1,b|=A>>M+l&1}for(var M=0;M<=24;M+=8)b<<=1,b|=a>>M+l&1;for(var l=1;l<=3;l++){for(var M=0;M<=24;M+=8)w<<=1,w|=a>>M+l&1;for(var M=0;M<=24;M+=8)w<<=1,w|=A>>M+l&1}for(var M=0;M<=24;M+=8)w<<=1,w|=A>>M+l&1;_[g+0]=b>>>0,_[g+1]=w>>>0},utils$4.r28shl=function(A,a){return A<<a&268435455|A>>>28-a};var d=[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(A,a,_,g){for(var b=0,w=0,l=d.length>>>1,M=0;M<l;M++)b<<=1,b|=A>>>d[M]&1;for(var M=l;M<d.length;M++)w<<=1,w|=a>>>d[M]&1;_[g+0]=b>>>0,_[g+1]=w>>>0},utils$4.expand=function(A,a,_){var g=0,b=0;g=(A&1)<<5|A>>>27;for(var w=23;w>=15;w-=4)g<<=6,g|=A>>>w&63;for(var w=11;w>=3;w-=4)b|=A>>>w&63,b<<=6;b|=(A&31)<<1|A>>>31,a[_+0]=g>>>0,a[_+1]=b>>>0};var v=[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(A,a){for(var _=0,g=0;g<4;g++){var b=A>>>18-g*6&63,w=v[g*64+b];_<<=4,_|=w}for(var g=0;g<4;g++){var b=a>>>18-g*6&63,w=v[256+g*64+b];_<<=4,_|=w}return _>>>0};var E=[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(A){for(var a=0,_=0;_<E.length;_++)a<<=1,a|=A>>>E[_]&1;return a>>>0},utils$4.padSplit=function(A,a,_){for(var g=A.toString(2);g.length<a;)g="0"+g;for(var b=[],w=0;w<a;w+=_)b.push(g.slice(w,w+_));return b.join(" ")},utils$4}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=d;function d(v,E){if(!v)throw new Error(E||"Assertion failed")}return d.equal=function(E,m,A){if(E!=m)throw new Error(A||"Assertion failed: "+E+" != "+m)},minimalisticAssert}var cipher,hasRequiredCipher;function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var d=requireMinimalisticAssert();function v(E){this.options=E,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=E.padding!==!1}return cipher=v,v.prototype._init=function(){},v.prototype.update=function(m){return m.length===0?[]:this.type==="decrypt"?this._updateDecrypt(m):this._updateEncrypt(m)},v.prototype._buffer=function(m,A){for(var a=Math.min(this.buffer.length-this.bufferOff,m.length-A),_=0;_<a;_++)this.buffer[this.bufferOff+_]=m[A+_];return this.bufferOff+=a,a},v.prototype._flushBuffer=function(m,A){return this._update(this.buffer,0,m,A),this.bufferOff=0,this.blockSize},v.prototype._updateEncrypt=function(m){var A=0,a=0,_=(this.bufferOff+m.length)/this.blockSize|0,g=new Array(_*this.blockSize);this.bufferOff!==0&&(A+=this._buffer(m,A),this.bufferOff===this.buffer.length&&(a+=this._flushBuffer(g,a)));for(var b=m.length-(m.length-A)%this.blockSize;A<b;A+=this.blockSize)this._update(m,A,g,a),a+=this.blockSize;for(;A<m.length;A++,this.bufferOff++)this.buffer[this.bufferOff]=m[A];return g},v.prototype._updateDecrypt=function(m){for(var A=0,a=0,_=Math.ceil((this.bufferOff+m.length)/this.blockSize)-1,g=new Array(_*this.blockSize);_>0;_--)A+=this._buffer(m,A),a+=this._flushBuffer(g,a);return A+=this._buffer(m,A),g},v.prototype.final=function(m){var A;m&&(A=this.update(m));var a;return this.type==="encrypt"?a=this._finalEncrypt():a=this._finalDecrypt(),A?A.concat(a):a},v.prototype._pad=function(m,A){if(A===0)return!1;for(;A<m.length;)m[A++]=0;return!0},v.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var m=new Array(this.blockSize);return this._update(this.buffer,0,m,0),m},v.prototype._unpad=function(m){return m},v.prototype._finalDecrypt=function(){d.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var m=new Array(this.blockSize);return this._flushBuffer(m,0),this._unpad(m)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var d=requireMinimalisticAssert(),v=requireInherits_browser$8(),E=requireUtils$4(),m=requireCipher();function A(){this.tmp=new Array(2),this.keys=null}function a(g){m.call(this,g);var b=new A;this._desState=b,this.deriveKeys(b,g.key)}v(a,m),des=a,a.create=function(b){return new a(b)};var _=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return a.prototype.deriveKeys=function(b,w){b.keys=new Array(32),d.equal(w.length,this.blockSize,"Invalid key length");var l=E.readUInt32BE(w,0),M=E.readUInt32BE(w,4);E.pc1(l,M,b.tmp,0),l=b.tmp[0],M=b.tmp[1];for(var y=0;y<b.keys.length;y+=2){var B=_[y>>>1];l=E.r28shl(l,B),M=E.r28shl(M,B),E.pc2(l,M,b.keys,y)}},a.prototype._update=function(b,w,l,M){var y=this._desState,B=E.readUInt32BE(b,w),R=E.readUInt32BE(b,w+4);E.ip(B,R,y.tmp,0),B=y.tmp[0],R=y.tmp[1],this.type==="encrypt"?this._encrypt(y,B,R,y.tmp,0):this._decrypt(y,B,R,y.tmp,0),B=y.tmp[0],R=y.tmp[1],E.writeUInt32BE(l,B,M),E.writeUInt32BE(l,R,M+4)},a.prototype._pad=function(b,w){if(this.padding===!1)return!1;for(var l=b.length-w,M=w;M<b.length;M++)b[M]=l;return!0},a.prototype._unpad=function(b){if(this.padding===!1)return b;for(var w=b[b.length-1],l=b.length-w;l<b.length;l++)d.equal(b[l],w);return b.slice(0,b.length-w)},a.prototype._encrypt=function(b,w,l,M,y){for(var B=w,R=l,S=0;S<b.keys.length;S+=2){var P=b.keys[S],T=b.keys[S+1];E.expand(R,b.tmp,0),P^=b.tmp[0],T^=b.tmp[1];var k=E.substitute(P,T),z=E.permute(k),j=R;R=(B^z)>>>0,B=j}E.rip(R,B,M,y)},a.prototype._decrypt=function(b,w,l,M,y){for(var B=l,R=w,S=b.keys.length-2;S>=0;S-=2){var P=b.keys[S],T=b.keys[S+1];E.expand(B,b.tmp,0),P^=b.tmp[0],T^=b.tmp[1];var k=E.substitute(P,T),z=E.permute(k),j=B;B=(R^z)>>>0,R=j}E.rip(B,R,M,y)},des}var cbc$1={},hasRequiredCbc$1;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var d=requireMinimalisticAssert(),v=requireInherits_browser$8(),E={};function m(a){d.equal(a.length,8,"Invalid IV length"),this.iv=new Array(8);for(var _=0;_<this.iv.length;_++)this.iv[_]=a[_]}function A(a){function _(l){a.call(this,l),this._cbcInit()}v(_,a);for(var g=Object.keys(E),b=0;b<g.length;b++){var w=g[b];_.prototype[w]=E[w]}return _.create=function(M){return new _(M)},_}return cbc$1.instantiate=A,E._cbcInit=function(){var _=new m(this.options.iv);this._cbcState=_},E._update=function(_,g,b,w){var l=this._cbcState,M=this.constructor.super_.prototype,y=l.iv;if(this.type==="encrypt"){for(var B=0;B<this.blockSize;B++)y[B]^=_[g+B];M._update.call(this,y,0,b,w);for(var B=0;B<this.blockSize;B++)y[B]=b[w+B]}else{M._update.call(this,_,g,b,w);for(var B=0;B<this.blockSize;B++)b[w+B]^=y[B];for(var B=0;B<this.blockSize;B++)y[B]=_[g+B]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var d=requireMinimalisticAssert(),v=requireInherits_browser$8(),E=requireCipher(),m=requireDes$1();function A(_,g){d.equal(g.length,24,"Invalid key length");var b=g.slice(0,8),w=g.slice(8,16),l=g.slice(16,24);_==="encrypt"?this.ciphers=[m.create({type:"encrypt",key:b}),m.create({type:"decrypt",key:w}),m.create({type:"encrypt",key:l})]:this.ciphers=[m.create({type:"decrypt",key:l}),m.create({type:"encrypt",key:w}),m.create({type:"decrypt",key:b})]}function a(_){E.call(this,_);var g=new A(this.type,this.options.key);this._edeState=g}return v(a,E),ede=a,a.create=function(g){return new a(g)},a.prototype._update=function(g,b,w,l){var M=this._edeState;M.ciphers[0]._update(g,b,w,l),M.ciphers[1]._update(w,l,w,l),M.ciphers[2]._update(w,l,w,l)},a.prototype._pad=m.prototype._pad,a.prototype._unpad=m.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 d=requireCipherBase(),v=requireDes(),E=requireInherits_browser$8(),m=requireSafeBuffer$2().Buffer,A={"des-ede3-cbc":v.CBC.instantiate(v.EDE),"des-ede3":v.EDE,"des-ede-cbc":v.CBC.instantiate(v.EDE),"des-ede":v.EDE,"des-cbc":v.CBC.instantiate(v.DES),"des-ecb":v.DES};A.des=A["des-cbc"],A.des3=A["des-ede3-cbc"],browserifyDes=a,E(a,d);function a(_){d.call(this);var g=_.mode.toLowerCase(),b=A[g],w;_.decrypt?w="decrypt":w="encrypt";var l=_.key;m.isBuffer(l)||(l=m.from(l)),(g==="des-ede"||g==="des-ede-cbc")&&(l=m.concat([l,l.slice(0,8)]));var M=_.iv;m.isBuffer(M)||(M=m.from(M)),this._des=b.create({key:l,iv:M,type:w})}return a.prototype._update=function(_){return m.from(this._des.update(_))},a.prototype._final=function(){return m.from(this._des.final())},browserifyDes}var browser$7={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(d,v){return d._cipher.encryptBlock(v)},ecb.decrypt=function(d,v){return d._cipher.decryptBlock(v)}),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(d){var v=d.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=d.indexOf("=");E===-1&&(E=v);var m=E===v?0:4-E%4;return[E,m]}function byteLength(d){var v=getLens(d),E=v[0],m=v[1];return(E+m)*3/4-m}function _byteLength(d,v,E){return(v+E)*3/4-E}function toByteArray(d){var v,E=getLens(d),m=E[0],A=E[1],a=new Arr(_byteLength(d,m,A)),_=0,g=A>0?m-4:m,b;for(b=0;b<g;b+=4)v=revLookup[d.charCodeAt(b)]<<18|revLookup[d.charCodeAt(b+1)]<<12|revLookup[d.charCodeAt(b+2)]<<6|revLookup[d.charCodeAt(b+3)],a[_++]=v>>16&255,a[_++]=v>>8&255,a[_++]=v&255;return A===2&&(v=revLookup[d.charCodeAt(b)]<<2|revLookup[d.charCodeAt(b+1)]>>4,a[_++]=v&255),A===1&&(v=revLookup[d.charCodeAt(b)]<<10|revLookup[d.charCodeAt(b+1)]<<4|revLookup[d.charCodeAt(b+2)]>>2,a[_++]=v>>8&255,a[_++]=v&255),a}function tripletToBase64(d){return lookup[d>>18&63]+lookup[d>>12&63]+lookup[d>>6&63]+lookup[d&63]}function encodeChunk(d,v,E){for(var m,A=[],a=v;a<E;a+=3)m=(d[a]<<16&16711680)+(d[a+1]<<8&65280)+(d[a+2]&255),A.push(tripletToBase64(m));return A.join("")}function fromByteArray(d){for(var v,E=d.length,m=E%3,A=[],a=16383,_=0,g=E-m;_<g;_+=a)A.push(encodeChunk(d,_,_+a>g?g:_+a));return m===1?(v=d[E-1],A.push(lookup[v>>2]+lookup[v<<4&63]+"==")):m===2&&(v=(d[E-2]<<8)+d[E-1],A.push(lookup[v>>10]+lookup[v>>4&63]+lookup[v<<2&63]+"=")),A.join("")}var ieee754={};ieee754.read=function(d,v,E,m,A){var a,_,g=A*8-m-1,b=(1<<g)-1,w=b>>1,l=-7,M=E?A-1:0,y=E?-1:1,B=d[v+M];for(M+=y,a=B&(1<<-l)-1,B>>=-l,l+=g;l>0;a=a*256+d[v+M],M+=y,l-=8);for(_=a&(1<<-l)-1,a>>=-l,l+=m;l>0;_=_*256+d[v+M],M+=y,l-=8);if(a===0)a=1-w;else{if(a===b)return _?NaN:(B?-1:1)*(1/0);_=_+Math.pow(2,m),a=a-w}return(B?-1:1)*_*Math.pow(2,a-m)};ieee754.write=function(d,v,E,m,A,a){var _,g,b,w=a*8-A-1,l=(1<<w)-1,M=l>>1,y=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=m?0:a-1,R=m?1:-1,S=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(g=isNaN(v)?1:0,_=l):(_=Math.floor(Math.log(v)/Math.LN2),v*(b=Math.pow(2,-_))<1&&(_--,b*=2),_+M>=1?v+=y/b:v+=y*Math.pow(2,1-M),v*b>=2&&(_++,b/=2),_+M>=l?(g=0,_=l):_+M>=1?(g=(v*b-1)*Math.pow(2,A),_=_+M):(g=v*Math.pow(2,M-1)*Math.pow(2,A),_=0));A>=8;d[E+B]=g&255,B+=R,g/=256,A-=8);for(_=_<<A|g,w+=A;w>0;d[E+B]=_&255,B+=R,_/=256,w-=8);d[E+B-R]|=S*128};(function(d){const v=base64Js,E=ieee754,m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;d.Buffer=l,d.SlowBuffer=V,d.INSPECT_MAX_BYTES=50;const A=2147483647;d.kMaxLength=A;const{Uint8Array:a,ArrayBuffer:_,SharedArrayBuffer:g}=globalThis;l.TYPED_ARRAY_SUPPORT=b(),!l.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 b(){try{const Z=new a(1),L={foo:function(){return 42}};return Object.setPrototypeOf(L,a.prototype),Object.setPrototypeOf(Z,L),Z.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function w(Z){if(Z>A)throw new RangeError('The value "'+Z+'" is invalid for option "size"');const L=new a(Z);return Object.setPrototypeOf(L,l.prototype),L}function l(Z,L,G){if(typeof Z=="number"){if(typeof L=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(Z)}return M(Z,L,G)}l.poolSize=8192;function M(Z,L,G){if(typeof Z=="string")return S(Z,L);if(_.isView(Z))return T(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(Re(Z,_)||Z&&Re(Z.buffer,_)||typeof g<"u"&&(Re(Z,g)||Z&&Re(Z.buffer,g)))return k(Z,L,G);if(typeof Z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ee=Z.valueOf&&Z.valueOf();if(ee!=null&&ee!==Z)return l.from(ee,L,G);const oe=z(Z);if(oe)return oe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Z[Symbol.toPrimitive]=="function")return l.from(Z[Symbol.toPrimitive]("string"),L,G);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Z)}l.from=function(Z,L,G){return M(Z,L,G)},Object.setPrototypeOf(l.prototype,a.prototype),Object.setPrototypeOf(l,a);function y(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 B(Z,L,G){return y(Z),Z<=0?w(Z):L!==void 0?typeof G=="string"?w(Z).fill(L,G):w(Z).fill(L):w(Z)}l.alloc=function(Z,L,G){return B(Z,L,G)};function R(Z){return y(Z),w(Z<0?0:j(Z)|0)}l.allocUnsafe=function(Z){return R(Z)},l.allocUnsafeSlow=function(Z){return R(Z)};function S(Z,L){if((typeof L!="string"||L==="")&&(L="utf8"),!l.isEncoding(L))throw new TypeError("Unknown encoding: "+L);const G=Q(Z,L)|0;let ee=w(G);const oe=ee.write(Z,L);return oe!==G&&(ee=ee.slice(0,oe)),ee}function P(Z){const L=Z.length<0?0:j(Z.length)|0,G=w(L);for(let ee=0;ee<L;ee+=1)G[ee]=Z[ee]&255;return G}function T(Z){if(Re(Z,a)){const L=new a(Z);return k(L.buffer,L.byteOffset,L.byteLength)}return P(Z)}function k(Z,L,G){if(L<0||Z.byteLength<L)throw new RangeError('"offset" is outside of buffer bounds');if(Z.byteLength<L+(G||0))throw new RangeError('"length" is outside of buffer bounds');let ee;return L===void 0&&G===void 0?ee=new a(Z):G===void 0?ee=new a(Z,L):ee=new a(Z,L,G),Object.setPrototypeOf(ee,l.prototype),ee}function z(Z){if(l.isBuffer(Z)){const L=j(Z.length)|0,G=w(L);return G.length===0||Z.copy(G,0,0,L),G}if(Z.length!==void 0)return typeof Z.length!="number"||je(Z.length)?w(0):P(Z);if(Z.type==="Buffer"&&Array.isArray(Z.data))return P(Z.data)}function j(Z){if(Z>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return Z|0}function V(Z){return+Z!=Z&&(Z=0),l.alloc(+Z)}l.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==l.prototype},l.compare=function(L,G){if(Re(L,a)&&(L=l.from(L,L.offset,L.byteLength)),Re(G,a)&&(G=l.from(G,G.offset,G.byteLength)),!l.isBuffer(L)||!l.isBuffer(G))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===G)return 0;let ee=L.length,oe=G.length;for(let ge=0,ie=Math.min(ee,oe);ge<ie;++ge)if(L[ge]!==G[ge]){ee=L[ge],oe=G[ge];break}return ee<oe?-1:oe<ee?1:0},l.isEncoding=function(L){switch(String(L).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}},l.concat=function(L,G){if(!Array.isArray(L))throw new TypeError('"list" argument must be an Array of Buffers');if(L.length===0)return l.alloc(0);let ee;if(G===void 0)for(G=0,ee=0;ee<L.length;++ee)G+=L[ee].length;const oe=l.allocUnsafe(G);let ge=0;for(ee=0;ee<L.length;++ee){let ie=L[ee];if(Re(ie,a))ge+ie.length>oe.length?(l.isBuffer(ie)||(ie=l.from(ie)),ie.copy(oe,ge)):a.prototype.set.call(oe,ie,ge);else if(l.isBuffer(ie))ie.copy(oe,ge);else throw new TypeError('"list" argument must be an Array of Buffers');ge+=ie.length}return oe};function Q(Z,L){if(l.isBuffer(Z))return Z.length;if(_.isView(Z)||Re(Z,_))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 G=Z.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&G===0)return 0;let oe=!1;for(;;)switch(L){case"ascii":case"latin1":case"binary":return G;case"utf8":case"utf-8":return Ne(Z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G*2;case"hex":return G>>>1;case"base64":return De(Z).length;default:if(oe)return ee?-1:Ne(Z).length;L=(""+L).toLowerCase(),oe=!0}}l.byteLength=Q;function ne(Z,L,G){let ee=!1;if((L===void 0||L<0)&&(L=0),L>this.length||((G===void 0||G>this.length)&&(G=this.length),G<=0)||(G>>>=0,L>>>=0,G<=L))return"";for(Z||(Z="utf8");;)switch(Z){case"hex":return q(this,L,G);case"utf8":case"utf-8":return u(this,L,G);case"ascii":return r(this,L,G);case"latin1":case"binary":return h(this,L,G);case"base64":return s(this,L,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,L,G);default:if(ee)throw new TypeError("Unknown encoding: "+Z);Z=(Z+"").toLowerCase(),ee=!0}}l.prototype._isBuffer=!0;function ae(Z,L,G){const ee=Z[L];Z[L]=Z[G],Z[G]=ee}l.prototype.swap16=function(){const L=this.length;if(L%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let G=0;G<L;G+=2)ae(this,G,G+1);return this},l.prototype.swap32=function(){const L=this.length;if(L%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let G=0;G<L;G+=4)ae(this,G,G+3),ae(this,G+1,G+2);return this},l.prototype.swap64=function(){const L=this.length;if(L%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let G=0;G<L;G+=8)ae(this,G,G+7),ae(this,G+1,G+6),ae(this,G+2,G+5),ae(this,G+3,G+4);return this},l.prototype.toString=function(){const L=this.length;return L===0?"":arguments.length===0?u(this,0,L):ne.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(L){if(!l.isBuffer(L))throw new TypeError("Argument must be a Buffer");return this===L?!0:l.compare(this,L)===0},l.prototype.inspect=function(){let L="";const G=d.INSPECT_MAX_BYTES;return L=this.toString("hex",0,G).replace(/(.{2})/g,"$1 ").trim(),this.length>G&&(L+=" ... "),"<Buffer "+L+">"},m&&(l.prototype[m]=l.prototype.inspect),l.prototype.compare=function(L,G,ee,oe,ge){if(Re(L,a)&&(L=l.from(L,L.offset,L.byteLength)),!l.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(G===void 0&&(G=0),ee===void 0&&(ee=L?L.length:0),oe===void 0&&(oe=0),ge===void 0&&(ge=this.length),G<0||ee>L.length||oe<0||ge>this.length)throw new RangeError("out of range index");if(oe>=ge&&G>=ee)return 0;if(oe>=ge)return-1;if(G>=ee)return 1;if(G>>>=0,ee>>>=0,oe>>>=0,ge>>>=0,this===L)return 0;let ie=ge-oe,he=ee-G;const Oe=Math.min(ie,he),ve=this.slice(oe,ge),_e=L.slice(G,ee);for(let Le=0;Le<Oe;++Le)if(ve[Le]!==_e[Le]){ie=ve[Le],he=_e[Le];break}return ie<he?-1:he<ie?1:0};function U(Z,L,G,ee,oe){if(Z.length===0)return-1;if(typeof G=="string"?(ee=G,G=0):G>2147483647?G=2147483647:G<-2147483648&&(G=-2147483648),G=+G,je(G)&&(G=oe?0:Z.length-1),G<0&&(G=Z.length+G),G>=Z.length){if(oe)return-1;G=Z.length-1}else if(G<0)if(oe)G=0;else return-1;if(typeof L=="string"&&(L=l.from(L,ee)),l.isBuffer(L))return L.length===0?-1:fe(Z,L,G,ee,oe);if(typeof L=="number")return L=L&255,typeof a.prototype.indexOf=="function"?oe?a.prototype.indexOf.call(Z,L,G):a.prototype.lastIndexOf.call(Z,L,G):fe(Z,[L],G,ee,oe);throw new TypeError("val must be string, number or Buffer")}function fe(Z,L,G,ee,oe){let ge=1,ie=Z.length,he=L.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(Z.length<2||L.length<2)return-1;ge=2,ie/=2,he/=2,G/=2}function Oe(_e,Le){return ge===1?_e[Le]:_e.readUInt16BE(Le*ge)}let ve;if(oe){let _e=-1;for(ve=G;ve<ie;ve++)if(Oe(Z,ve)===Oe(L,_e===-1?0:ve-_e)){if(_e===-1&&(_e=ve),ve-_e+1===he)return _e*ge}else _e!==-1&&(ve-=ve-_e),_e=-1}else for(G+he>ie&&(G=ie-he),ve=G;ve>=0;ve--){let _e=!0;for(let Le=0;Le<he;Le++)if(Oe(Z,ve+Le)!==Oe(L,Le)){_e=!1;break}if(_e)return ve}return-1}l.prototype.includes=function(L,G,ee){return this.indexOf(L,G,ee)!==-1},l.prototype.indexOf=function(L,G,ee){return U(this,L,G,ee,!0)},l.prototype.lastIndexOf=function(L,G,ee){return U(this,L,G,ee,!1)};function p(Z,L,G,ee){G=Number(G)||0;const oe=Z.length-G;ee?(ee=Number(ee),ee>oe&&(ee=oe)):ee=oe;const ge=L.length;ee>ge/2&&(ee=ge/2);let ie;for(ie=0;ie<ee;++ie){const he=parseInt(L.substr(ie*2,2),16);if(je(he))return ie;Z[G+ie]=he}return ie}function e(Z,L,G,ee){return be(Ne(L,Z.length-G),Z,G,ee)}function t(Z,L,G,ee){return be(ye(L),Z,G,ee)}function n(Z,L,G,ee){return be(De(L),Z,G,ee)}function f(Z,L,G,ee){return be(Me(L,Z.length-G),Z,G,ee)}l.prototype.write=function(L,G,ee,oe){if(G===void 0)oe="utf8",ee=this.length,G=0;else if(ee===void 0&&typeof G=="string")oe=G,ee=this.length,G=0;else if(isFinite(G))G=G>>>0,isFinite(ee)?(ee=ee>>>0,oe===void 0&&(oe="utf8")):(oe=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ge=this.length-G;if((ee===void 0||ee>ge)&&(ee=ge),L.length>0&&(ee<0||G<0)||G>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");let ie=!1;for(;;)switch(oe){case"hex":return p(this,L,G,ee);case"utf8":case"utf-8":return e(this,L,G,ee);case"ascii":case"latin1":case"binary":return t(this,L,G,ee);case"base64":return n(this,L,G,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,L,G,ee);default:if(ie)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),ie=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function s(Z,L,G){return L===0&&G===Z.length?v.fromByteArray(Z):v.fromByteArray(Z.slice(L,G))}function u(Z,L,G){G=Math.min(Z.length,G);const ee=[];let oe=L;for(;oe<G;){const ge=Z[oe];let ie=null,he=ge>239?4:ge>223?3:ge>191?2:1;if(oe+he<=G){let Oe,ve,_e,Le;switch(he){case 1:ge<128&&(ie=ge);break;case 2:Oe=Z[oe+1],(Oe&192)===128&&(Le=(ge&31)<<6|Oe&63,Le>127&&(ie=Le));break;case 3:Oe=Z[oe+1],ve=Z[oe+2],(Oe&192)===128&&(ve&192)===128&&(Le=(ge&15)<<12|(Oe&63)<<6|ve&63,Le>2047&&(Le<55296||Le>57343)&&(ie=Le));break;case 4:Oe=Z[oe+1],ve=Z[oe+2],_e=Z[oe+3],(Oe&192)===128&&(ve&192)===128&&(_e&192)===128&&(Le=(ge&15)<<18|(Oe&63)<<12|(ve&63)<<6|_e&63,Le>65535&&Le<1114112&&(ie=Le))}}ie===null?(ie=65533,he=1):ie>65535&&(ie-=65536,ee.push(ie>>>10&1023|55296),ie=56320|ie&1023),ee.push(ie),oe+=he}return o(ee)}const c=4096;function o(Z){const L=Z.length;if(L<=c)return String.fromCharCode.apply(String,Z);let G="",ee=0;for(;ee<L;)G+=String.fromCharCode.apply(String,Z.slice(ee,ee+=c));return G}function r(Z,L,G){let ee="";G=Math.min(Z.length,G);for(let oe=L;oe<G;++oe)ee+=String.fromCharCode(Z[oe]&127);return ee}function h(Z,L,G){let ee="";G=Math.min(Z.length,G);for(let oe=L;oe<G;++oe)ee+=String.fromCharCode(Z[oe]);return ee}function q(Z,L,G){const ee=Z.length;(!L||L<0)&&(L=0),(!G||G<0||G>ee)&&(G=ee);let oe="";for(let ge=L;ge<G;++ge)oe+=Se[Z[ge]];return oe}function $(Z,L,G){const ee=Z.slice(L,G);let oe="";for(let ge=0;ge<ee.length-1;ge+=2)oe+=String.fromCharCode(ee[ge]+ee[ge+1]*256);return oe}l.prototype.slice=function(L,G){const ee=this.length;L=~~L,G=G===void 0?ee:~~G,L<0?(L+=ee,L<0&&(L=0)):L>ee&&(L=ee),G<0?(G+=ee,G<0&&(G=0)):G>ee&&(G=ee),G<L&&(G=L);const oe=this.subarray(L,G);return Object.setPrototypeOf(oe,l.prototype),oe};function H(Z,L,G){if(Z%1!==0||Z<0)throw new RangeError("offset is not uint");if(Z+L>G)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(L,G,ee){L=L>>>0,G=G>>>0,ee||H(L,G,this.length);let oe=this[L],ge=1,ie=0;for(;++ie<G&&(ge*=256);)oe+=this[L+ie]*ge;return oe},l.prototype.readUintBE=l.prototype.readUIntBE=function(L,G,ee){L=L>>>0,G=G>>>0,ee||H(L,G,this.length);let oe=this[L+--G],ge=1;for(;G>0&&(ge*=256);)oe+=this[L+--G]*ge;return oe},l.prototype.readUint8=l.prototype.readUInt8=function(L,G){return L=L>>>0,G||H(L,1,this.length),this[L]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(L,G){return L=L>>>0,G||H(L,2,this.length),this[L]|this[L+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(L,G){return L=L>>>0,G||H(L,2,this.length),this[L]<<8|this[L+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(L,G){return L=L>>>0,G||H(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+this[L+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(L,G){return L=L>>>0,G||H(L,4,this.length),this[L]*16777216+(this[L+1]<<16|this[L+2]<<8|this[L+3])},l.prototype.readBigUInt64LE=Ie(function(L){L=L>>>0,pe(L,"offset");const G=this[L],ee=this[L+7];(G===void 0||ee===void 0)&&Ce(L,this.length-8);const oe=G+this[++L]*2**8+this[++L]*2**16+this[++L]*2**24,ge=this[++L]+this[++L]*2**8+this[++L]*2**16+ee*2**24;return BigInt(oe)+(BigInt(ge)<<BigInt(32))}),l.prototype.readBigUInt64BE=Ie(function(L){L=L>>>0,pe(L,"offset");const G=this[L],ee=this[L+7];(G===void 0||ee===void 0)&&Ce(L,this.length-8);const oe=G*2**24+this[++L]*2**16+this[++L]*2**8+this[++L],ge=this[++L]*2**24+this[++L]*2**16+this[++L]*2**8+ee;return(BigInt(oe)<<BigInt(32))+BigInt(ge)}),l.prototype.readIntLE=function(L,G,ee){L=L>>>0,G=G>>>0,ee||H(L,G,this.length);let oe=this[L],ge=1,ie=0;for(;++ie<G&&(ge*=256);)oe+=this[L+ie]*ge;return ge*=128,oe>=ge&&(oe-=Math.pow(2,8*G)),oe},l.prototype.readIntBE=function(L,G,ee){L=L>>>0,G=G>>>0,ee||H(L,G,this.length);let oe=G,ge=1,ie=this[L+--oe];for(;oe>0&&(ge*=256);)ie+=this[L+--oe]*ge;return ge*=128,ie>=ge&&(ie-=Math.pow(2,8*G)),ie},l.prototype.readInt8=function(L,G){return L=L>>>0,G||H(L,1,this.length),this[L]&128?(255-this[L]+1)*-1:this[L]},l.prototype.readInt16LE=function(L,G){L=L>>>0,G||H(L,2,this.length);const ee=this[L]|this[L+1]<<8;return ee&32768?ee|4294901760:ee},l.prototype.readInt16BE=function(L,G){L=L>>>0,G||H(L,2,this.length);const ee=this[L+1]|this[L]<<8;return ee&32768?ee|4294901760:ee},l.prototype.readInt32LE=function(L,G){return L=L>>>0,G||H(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},l.prototype.readInt32BE=function(L,G){return L=L>>>0,G||H(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},l.prototype.readBigInt64LE=Ie(function(L){L=L>>>0,pe(L,"offset");const G=this[L],ee=this[L+7];(G===void 0||ee===void 0)&&Ce(L,this.length-8);const oe=this[L+4]+this[L+5]*2**8+this[L+6]*2**16+(ee<<24);return(BigInt(oe)<<BigInt(32))+BigInt(G+this[++L]*2**8+this[++L]*2**16+this[++L]*2**24)}),l.prototype.readBigInt64BE=Ie(function(L){L=L>>>0,pe(L,"offset");const G=this[L],ee=this[L+7];(G===void 0||ee===void 0)&&Ce(L,this.length-8);const oe=(G<<24)+this[++L]*2**16+this[++L]*2**8+this[++L];return(BigInt(oe)<<BigInt(32))+BigInt(this[++L]*2**24+this[++L]*2**16+this[++L]*2**8+ee)}),l.prototype.readFloatLE=function(L,G){return L=L>>>0,G||H(L,4,this.length),E.read(this,L,!0,23,4)},l.prototype.readFloatBE=function(L,G){return L=L>>>0,G||H(L,4,this.length),E.read(this,L,!1,23,4)},l.prototype.readDoubleLE=function(L,G){return L=L>>>0,G||H(L,8,this.length),E.read(this,L,!0,52,8)},l.prototype.readDoubleBE=function(L,G){return L=L>>>0,G||H(L,8,this.length),E.read(this,L,!1,52,8)};function Y(Z,L,G,ee,oe,ge){if(!l.isBuffer(Z))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>oe||L<ge)throw new RangeError('"value" argument is out of bounds');if(G+ee>Z.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(L,G,ee,oe){if(L=+L,G=G>>>0,ee=ee>>>0,!oe){const he=Math.pow(2,8*ee)-1;Y(this,L,G,ee,he,0)}let ge=1,ie=0;for(this[G]=L&255;++ie<ee&&(ge*=256);)this[G+ie]=L/ge&255;return G+ee},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(L,G,ee,oe){if(L=+L,G=G>>>0,ee=ee>>>0,!oe){const he=Math.pow(2,8*ee)-1;Y(this,L,G,ee,he,0)}let ge=ee-1,ie=1;for(this[G+ge]=L&255;--ge>=0&&(ie*=256);)this[G+ge]=L/ie&255;return G+ee},l.prototype.writeUint8=l.prototype.writeUInt8=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,1,255,0),this[G]=L&255,G+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,2,65535,0),this[G]=L&255,this[G+1]=L>>>8,G+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,2,65535,0),this[G]=L>>>8,this[G+1]=L&255,G+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,4,4294967295,0),this[G+3]=L>>>24,this[G+2]=L>>>16,this[G+1]=L>>>8,this[G]=L&255,G+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,4,4294967295,0),this[G]=L>>>24,this[G+1]=L>>>16,this[G+2]=L>>>8,this[G+3]=L&255,G+4};function J(Z,L,G,ee,oe){ue(L,ee,oe,Z,G,7);let ge=Number(L&BigInt(4294967295));Z[G++]=ge,ge=ge>>8,Z[G++]=ge,ge=ge>>8,Z[G++]=ge,ge=ge>>8,Z[G++]=ge;let ie=Number(L>>BigInt(32)&BigInt(4294967295));return Z[G++]=ie,ie=ie>>8,Z[G++]=ie,ie=ie>>8,Z[G++]=ie,ie=ie>>8,Z[G++]=ie,G}function x(Z,L,G,ee,oe){ue(L,ee,oe,Z,G,7);let ge=Number(L&BigInt(4294967295));Z[G+7]=ge,ge=ge>>8,Z[G+6]=ge,ge=ge>>8,Z[G+5]=ge,ge=ge>>8,Z[G+4]=ge;let ie=Number(L>>BigInt(32)&BigInt(4294967295));return Z[G+3]=ie,ie=ie>>8,Z[G+2]=ie,ie=ie>>8,Z[G+1]=ie,ie=ie>>8,Z[G]=ie,G+8}l.prototype.writeBigUInt64LE=Ie(function(L,G=0){return J(this,L,G,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Ie(function(L,G=0){return x(this,L,G,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(L,G,ee,oe){if(L=+L,G=G>>>0,!oe){const Oe=Math.pow(2,8*ee-1);Y(this,L,G,ee,Oe-1,-Oe)}let ge=0,ie=1,he=0;for(this[G]=L&255;++ge<ee&&(ie*=256);)L<0&&he===0&&this[G+ge-1]!==0&&(he=1),this[G+ge]=(L/ie>>0)-he&255;return G+ee},l.prototype.writeIntBE=function(L,G,ee,oe){if(L=+L,G=G>>>0,!oe){const Oe=Math.pow(2,8*ee-1);Y(this,L,G,ee,Oe-1,-Oe)}let ge=ee-1,ie=1,he=0;for(this[G+ge]=L&255;--ge>=0&&(ie*=256);)L<0&&he===0&&this[G+ge+1]!==0&&(he=1),this[G+ge]=(L/ie>>0)-he&255;return G+ee},l.prototype.writeInt8=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,1,127,-128),L<0&&(L=255+L+1),this[G]=L&255,G+1},l.prototype.writeInt16LE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,2,32767,-32768),this[G]=L&255,this[G+1]=L>>>8,G+2},l.prototype.writeInt16BE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,2,32767,-32768),this[G]=L>>>8,this[G+1]=L&255,G+2},l.prototype.writeInt32LE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,4,2147483647,-2147483648),this[G]=L&255,this[G+1]=L>>>8,this[G+2]=L>>>16,this[G+3]=L>>>24,G+4},l.prototype.writeInt32BE=function(L,G,ee){return L=+L,G=G>>>0,ee||Y(this,L,G,4,2147483647,-2147483648),L<0&&(L=4294967295+L+1),this[G]=L>>>24,this[G+1]=L>>>16,this[G+2]=L>>>8,this[G+3]=L&255,G+4},l.prototype.writeBigInt64LE=Ie(function(L,G=0){return J(this,L,G,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Ie(function(L,G=0){return x(this,L,G,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function I(Z,L,G,ee,oe,ge){if(G+ee>Z.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("Index out of range")}function C(Z,L,G,ee,oe){return L=+L,G=G>>>0,oe||I(Z,L,G,4),E.write(Z,L,G,ee,23,4),G+4}l.prototype.writeFloatLE=function(L,G,ee){return C(this,L,G,!0,ee)},l.prototype.writeFloatBE=function(L,G,ee){return C(this,L,G,!1,ee)};function N(Z,L,G,ee,oe){return L=+L,G=G>>>0,oe||I(Z,L,G,8),E.write(Z,L,G,ee,52,8),G+8}l.prototype.writeDoubleLE=function(L,G,ee){return N(this,L,G,!0,ee)},l.prototype.writeDoubleBE=function(L,G,ee){return N(this,L,G,!1,ee)},l.prototype.copy=function(L,G,ee,oe){if(!l.isBuffer(L))throw new TypeError("argument should be a Buffer");if(ee||(ee=0),!oe&&oe!==0&&(oe=this.length),G>=L.length&&(G=L.length),G||(G=0),oe>0&&oe<ee&&(oe=ee),oe===ee||L.length===0||this.length===0)return 0;if(G<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),L.length-G<oe-ee&&(oe=L.length-G+ee);const ge=oe-ee;return this===L&&typeof a.prototype.copyWithin=="function"?this.copyWithin(G,ee,oe):a.prototype.set.call(L,this.subarray(ee,oe),G),ge},l.prototype.fill=function(L,G,ee,oe){if(typeof L=="string"){if(typeof G=="string"?(oe=G,G=0,ee=this.length):typeof ee=="string"&&(oe=ee,ee=this.length),oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!l.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);if(L.length===1){const ie=L.charCodeAt(0);(oe==="utf8"&&ie<128||oe==="latin1")&&(L=ie)}}else typeof L=="number"?L=L&255:typeof L=="boolean"&&(L=Number(L));if(G<0||this.length<G||this.length<ee)throw new RangeError("Out of range index");if(ee<=G)return this;G=G>>>0,ee=ee===void 0?this.length:ee>>>0,L||(L=0);let ge;if(typeof L=="number")for(ge=G;ge<ee;++ge)this[ge]=L;else{const ie=l.isBuffer(L)?L:l.from(L,oe),he=ie.length;if(he===0)throw new TypeError('The value "'+L+'" is invalid for argument "value"');for(ge=0;ge<ee-G;++ge)this[ge+G]=ie[ge%he]}return this};const F={};function D(Z,L,G){F[Z]=class extends G{constructor(){super(),Object.defineProperty(this,"message",{value:L.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Z}]`,this.stack,delete this.name}get code(){return Z}set code(oe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:oe,writable:!0})}toString(){return`${this.name} [${Z}]: ${this.message}`}}}D("ERR_BUFFER_OUT_OF_BOUNDS",function(Z){return Z?`${Z} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),D("ERR_INVALID_ARG_TYPE",function(Z,L){return`The "${Z}" argument must be of type number. Received type ${typeof L}`},TypeError),D("ERR_OUT_OF_RANGE",function(Z,L,G){let ee=`The value of "${Z}" is out of range.`,oe=G;return Number.isInteger(G)&&Math.abs(G)>2**32?oe=X(String(G)):typeof G=="bigint"&&(oe=String(G),(G>BigInt(2)**BigInt(32)||G<-(BigInt(2)**BigInt(32)))&&(oe=X(oe)),oe+="n"),ee+=` It must be ${L}. Received ${oe}`,ee},RangeError);function X(Z){let L="",G=Z.length;const ee=Z[0]==="-"?1:0;for(;G>=ee+4;G-=3)L=`_${Z.slice(G-3,G)}${L}`;return`${Z.slice(0,G)}${L}`}function le(Z,L,G){pe(L,"offset"),(Z[L]===void 0||Z[L+G]===void 0)&&Ce(L,Z.length-(G+1))}function ue(Z,L,G,ee,oe,ge){if(Z>G||Z<L){const ie=typeof L=="bigint"?"n":"";let he;throw L===0||L===BigInt(0)?he=`>= 0${ie} and < 2${ie} ** ${(ge+1)*8}${ie}`:he=`>= -(2${ie} ** ${(ge+1)*8-1}${ie}) and < 2 ** ${(ge+1)*8-1}${ie}`,new F.ERR_OUT_OF_RANGE("value",he,Z)}le(ee,oe,ge)}function pe(Z,L){if(typeof Z!="number")throw new F.ERR_INVALID_ARG_TYPE(L,"number",Z)}function Ce(Z,L,G){throw Math.floor(Z)!==Z?(pe(Z,G),new F.ERR_OUT_OF_RANGE("offset","an integer",Z)):L<0?new F.ERR_BUFFER_OUT_OF_BOUNDS:new F.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${L}`,Z)}const me=/[^+/0-9A-Za-z-_]/g;function ce(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 Ne(Z,L){L=L||1/0;let G;const ee=Z.length;let oe=null;const ge=[];for(let ie=0;ie<ee;++ie){if(G=Z.charCodeAt(ie),G>55295&&G<57344){if(!oe){if(G>56319){(L-=3)>-1&&ge.push(239,191,189);continue}else if(ie+1===ee){(L-=3)>-1&&ge.push(239,191,189);continue}oe=G;continue}if(G<56320){(L-=3)>-1&&ge.push(239,191,189),oe=G;continue}G=(oe-55296<<10|G-56320)+65536}else oe&&(L-=3)>-1&&ge.push(239,191,189);if(oe=null,G<128){if((L-=1)<0)break;ge.push(G)}else if(G<2048){if((L-=2)<0)break;ge.push(G>>6|192,G&63|128)}else if(G<65536){if((L-=3)<0)break;ge.push(G>>12|224,G>>6&63|128,G&63|128)}else if(G<1114112){if((L-=4)<0)break;ge.push(G>>18|240,G>>12&63|128,G>>6&63|128,G&63|128)}else throw new Error("Invalid code point")}return ge}function ye(Z){const L=[];for(let G=0;G<Z.length;++G)L.push(Z.charCodeAt(G)&255);return L}function Me(Z,L){let G,ee,oe;const ge=[];for(let ie=0;ie<Z.length&&!((L-=2)<0);++ie)G=Z.charCodeAt(ie),ee=G>>8,oe=G%256,ge.push(oe),ge.push(ee);return ge}function De(Z){return v.toByteArray(ce(Z))}function be(Z,L,G,ee){let oe;for(oe=0;oe<ee&&!(oe+G>=L.length||oe>=Z.length);++oe)L[oe+G]=Z[oe];return oe}function Re(Z,L){return Z instanceof L||Z!=null&&Z.constructor!=null&&Z.constructor.name!=null&&Z.constructor.name===L.name}function je(Z){return Z!==Z}const Se=(function(){const Z="0123456789abcdef",L=new Array(256);for(let G=0;G<16;++G){const ee=G*16;for(let oe=0;oe<16;++oe)L[ee+oe]=Z[G]+Z[oe]}return L})();function Ie(Z){return typeof BigInt>"u"?ze:Z}function ze(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer=buffer$1.Buffer;var bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(v,E){for(var m=Math.min(v.length,E.length),A=new Buffer(m),a=0;a<m;++a)A[a]=v[a]^E[a];return A}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var d=requireBufferXor();return cbc.encrypt=function(v,E){var m=d(E,v._prev);return v._prev=v._cipher.encryptBlock(m),v._prev},cbc.decrypt=function(v,E){var m=v._prev;v._prev=E;var A=v._cipher.decryptBlock(E);return d(A,m)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var d=requireSafeBuffer$2().Buffer,v=requireBufferXor();function E(m,A,a){var _=A.length,g=v(A,m._cache);return m._cache=m._cache.slice(_),m._prev=d.concat([m._prev,a?A:g]),g}return cfb.encrypt=function(m,A,a){for(var _=d.allocUnsafe(0),g;A.length;)if(m._cache.length===0&&(m._cache=m._cipher.encryptBlock(m._prev),m._prev=d.allocUnsafe(0)),m._cache.length<=A.length)g=m._cache.length,_=d.concat([_,E(m,A.slice(0,g),a)]),A=A.slice(g);else{_=d.concat([_,E(m,A,a)]);break}return _},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var d=requireSafeBuffer$2().Buffer;function v(E,m,A){var a=E._cipher.encryptBlock(E._prev),_=a[0]^m;return E._prev=d.concat([E._prev.slice(1),d.from([A?m:_])]),_}return cfb8.encrypt=function(E,m,A){for(var a=m.length,_=d.allocUnsafe(a),g=-1;++g<a;)_[g]=v(E,m[g],A);return _},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var d=requireSafeBuffer$2().Buffer;function v(m,A,a){for(var _,g=-1,b=8,w=0,l,M;++g<b;)_=m._cipher.encryptBlock(m._prev),l=A&1<<7-g?128:0,M=_[0]^l,w+=(M&128)>>g%8,m._prev=E(m._prev,a?l:M);return w}function E(m,A){var a=m.length,_=-1,g=d.allocUnsafe(m.length);for(m=d.concat([m,d.from([A])]);++_<a;)g[_]=m[_]<<1|m[_+1]>>7;return g}return cfb1.encrypt=function(m,A,a){for(var _=A.length,g=d.allocUnsafe(_),b=-1;++b<_;)g[b]=v(m,A[b],a);return g},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var d=requireBufferXor();function v(E){return E._prev=E._cipher.encryptBlock(E._prev),E._prev}return ofb.encrypt=function(E,m){for(;E._cache.length<m.length;)E._cache=Buffer.concat([E._cache,v(E)]);var A=E._cache.slice(0,m.length);return E._cache=E._cache.slice(m.length),d(m,A)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function d(v){for(var E=v.length,m;E--;)if(m=v.readUInt8(E),m===255)v.writeUInt8(0,E);else{m++,v.writeUInt8(m,E);break}}return incr32_1=d,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var d=requireBufferXor(),v=requireSafeBuffer$2().Buffer,E=requireIncr32();function m(a){var _=a._cipher.encryptBlockRaw(a._prev);return E(a._prev),_}var A=16;return ctr.encrypt=function(a,_){var g=Math.ceil(_.length/A),b=a._cache.length;a._cache=v.concat([a._cache,v.allocUnsafe(g*A)]);for(var w=0;w<g;w++){var l=m(a),M=b+w*A;a._cache.writeUInt32BE(l[0],M+0),a._cache.writeUInt32BE(l[1],M+4),a._cache.writeUInt32BE(l[2],M+8),a._cache.writeUInt32BE(l[3],M+12)}var y=a._cache.slice(0,_.length);return a._cache=a._cache.slice(_.length),d(_,y)},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 d={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},v=require$$2;for(var E in v)v[E].module=d[v[E].mode];return modes_1=v,modes_1}var aes={},hasRequiredAes;function requireAes(){if(hasRequiredAes)return aes;hasRequiredAes=1;var d=requireSafeBuffer$2().Buffer;function v(g){d.isBuffer(g)||(g=d.from(g));for(var b=g.length/4|0,w=new Array(b),l=0;l<b;l++)w[l]=g.readUInt32BE(l*4);return w}function E(g){for(var b=0;b<g.length;g++)g[b]=0}function m(g,b,w,l,M){for(var y=w[0],B=w[1],R=w[2],S=w[3],P=g[0]^b[0],T=g[1]^b[1],k=g[2]^b[2],z=g[3]^b[3],j,V,Q,ne,ae=4,U=1;U<M;U++)j=y[P>>>24]^B[T>>>16&255]^R[k>>>8&255]^S[z&255]^b[ae++],V=y[T>>>24]^B[k>>>16&255]^R[z>>>8&255]^S[P&255]^b[ae++],Q=y[k>>>24]^B[z>>>16&255]^R[P>>>8&255]^S[T&255]^b[ae++],ne=y[z>>>24]^B[P>>>16&255]^R[T>>>8&255]^S[k&255]^b[ae++],P=j,T=V,k=Q,z=ne;return j=(l[P>>>24]<<24|l[T>>>16&255]<<16|l[k>>>8&255]<<8|l[z&255])^b[ae++],V=(l[T>>>24]<<24|l[k>>>16&255]<<16|l[z>>>8&255]<<8|l[P&255])^b[ae++],Q=(l[k>>>24]<<24|l[z>>>16&255]<<16|l[P>>>8&255]<<8|l[T&255])^b[ae++],ne=(l[z>>>24]<<24|l[P>>>16&255]<<16|l[T>>>8&255]<<8|l[k&255])^b[ae++],j=j>>>0,V=V>>>0,Q=Q>>>0,ne=ne>>>0,[j,V,Q,ne]}var A=[0,1,2,4,8,16,32,64,128,27,54],a=(function(){for(var g=new Array(256),b=0;b<256;b++)b<128?g[b]=b<<1:g[b]=b<<1^283;for(var w=[],l=[],M=[[],[],[],[]],y=[[],[],[],[]],B=0,R=0,S=0;S<256;++S){var P=R^R<<1^R<<2^R<<3^R<<4;P=P>>>8^P&255^99,w[B]=P,l[P]=B;var T=g[B],k=g[T],z=g[k],j=g[P]*257^P*16843008;M[0][B]=j<<24|j>>>8,M[1][B]=j<<16|j>>>16,M[2][B]=j<<8|j>>>24,M[3][B]=j,j=z*16843009^k*65537^T*257^B*16843008,y[0][P]=j<<24|j>>>8,y[1][P]=j<<16|j>>>16,y[2][P]=j<<8|j>>>24,y[3][P]=j,B===0?B=R=1:(B=T^g[g[g[z^T]]],R^=g[g[R]])}return{SBOX:w,INV_SBOX:l,SUB_MIX:M,INV_SUB_MIX:y}})();function _(g){this._key=v(g),this._reset()}return _.blockSize=16,_.keySize=256/8,_.prototype.blockSize=_.blockSize,_.prototype.keySize=_.keySize,_.prototype._reset=function(){for(var g=this._key,b=g.length,w=b+6,l=(w+1)*4,M=[],y=0;y<b;y++)M[y]=g[y];for(y=b;y<l;y++){var B=M[y-1];y%b===0?(B=B<<8|B>>>24,B=a.SBOX[B>>>24]<<24|a.SBOX[B>>>16&255]<<16|a.SBOX[B>>>8&255]<<8|a.SBOX[B&255],B^=A[y/b|0]<<24):b>6&&y%b===4&&(B=a.SBOX[B>>>24]<<24|a.SBOX[B>>>16&255]<<16|a.SBOX[B>>>8&255]<<8|a.SBOX[B&255]),M[y]=M[y-b]^B}for(var R=[],S=0;S<l;S++){var P=l-S,T=M[P-(S%4?0:4)];S<4||P<=4?R[S]=T:R[S]=a.INV_SUB_MIX[0][a.SBOX[T>>>24]]^a.INV_SUB_MIX[1][a.SBOX[T>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[T>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[T&255]]}this._nRounds=w,this._keySchedule=M,this._invKeySchedule=R},_.prototype.encryptBlockRaw=function(g){return g=v(g),m(g,this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},_.prototype.encryptBlock=function(g){var b=this.encryptBlockRaw(g),w=d.allocUnsafe(16);return w.writeUInt32BE(b[0],0),w.writeUInt32BE(b[1],4),w.writeUInt32BE(b[2],8),w.writeUInt32BE(b[3],12),w},_.prototype.decryptBlock=function(g){g=v(g);var b=g[1];g[1]=g[3],g[3]=b;var w=m(g,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),l=d.allocUnsafe(16);return l.writeUInt32BE(w[0],0),l.writeUInt32BE(w[3],4),l.writeUInt32BE(w[2],8),l.writeUInt32BE(w[1],12),l},_.prototype.scrub=function(){E(this._keySchedule),E(this._invKeySchedule),E(this._key)},aes.AES=_,aes}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var d=requireSafeBuffer$2().Buffer,v=d.alloc(16,0);function E(a){return[a.readUInt32BE(0),a.readUInt32BE(4),a.readUInt32BE(8),a.readUInt32BE(12)]}function m(a){var _=d.allocUnsafe(16);return _.writeUInt32BE(a[0]>>>0,0),_.writeUInt32BE(a[1]>>>0,4),_.writeUInt32BE(a[2]>>>0,8),_.writeUInt32BE(a[3]>>>0,12),_}function A(a){this.h=a,this.state=d.alloc(16,0),this.cache=d.allocUnsafe(0)}return A.prototype.ghash=function(a){for(var _=-1;++_<a.length;)this.state[_]^=a[_];this._multiply()},A.prototype._multiply=function(){for(var a=E(this.h),_=[0,0,0,0],g,b,w,l=-1;++l<128;){for(b=(this.state[~~(l/8)]&1<<7-l%8)!==0,b&&(_[0]^=a[0],_[1]^=a[1],_[2]^=a[2],_[3]^=a[3]),w=(a[3]&1)!==0,g=3;g>0;g--)a[g]=a[g]>>>1|(a[g-1]&1)<<31;a[0]=a[0]>>>1,w&&(a[0]=a[0]^225<<24)}this.state=m(_)},A.prototype.update=function(a){this.cache=d.concat([this.cache,a]);for(var _;this.cache.length>=16;)_=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(_)},A.prototype.final=function(a,_){return this.cache.length&&this.ghash(d.concat([this.cache,v],16)),this.ghash(m([0,a,0,_])),this.state},ghash=A,ghash}var authCipher,hasRequiredAuthCipher;function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var d=requireAes(),v=requireSafeBuffer$2().Buffer,E=requireCipherBase(),m=requireInherits_browser$8(),A=requireGhash(),a=requireBufferXor(),_=requireIncr32();function g(l,M){var y=0;l.length!==M.length&&y++;for(var B=Math.min(l.length,M.length),R=0;R<B;++R)y+=l[R]^M[R];return y}function b(l,M,y){if(M.length===12)return l._finID=v.concat([M,v.from([0,0,0,1])]),v.concat([M,v.from([0,0,0,2])]);var B=new A(y),R=M.length,S=R%16;B.update(M),S&&(S=16-S,B.update(v.alloc(S,0))),B.update(v.alloc(8,0));var P=R*8,T=v.alloc(8);T.writeUIntBE(P,0,8),B.update(T),l._finID=B.state;var k=v.from(l._finID);return _(k),k}function w(l,M,y,B){E.call(this);var R=v.alloc(4,0);this._cipher=new d.AES(M);var S=this._cipher.encryptBlock(R);this._ghash=new A(S),y=b(this,y,S),this._prev=v.from(y),this._cache=v.allocUnsafe(0),this._secCache=v.allocUnsafe(0),this._decrypt=B,this._alen=0,this._len=0,this._mode=l,this._authTag=null,this._called=!1}return m(w,E),w.prototype._update=function(l){if(!this._called&&this._alen){var M=16-this._alen%16;M<16&&(M=v.alloc(M,0),this._ghash.update(M))}this._called=!0;var y=this._mode.encrypt(this,l);return this._decrypt?this._ghash.update(l):this._ghash.update(y),this._len+=l.length,y},w.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var l=a(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&g(l,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=l,this._cipher.scrub()},w.prototype.getAuthTag=function(){if(this._decrypt||!v.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},w.prototype.setAuthTag=function(M){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=M},w.prototype.setAAD=function(M){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(M),this._alen+=M.length},authCipher=w,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var d=requireAes(),v=requireSafeBuffer$2().Buffer,E=requireCipherBase(),m=requireInherits_browser$8();function A(a,_,g,b){E.call(this),this._cipher=new d.AES(_),this._prev=v.from(g),this._cache=v.allocUnsafe(0),this._secCache=v.allocUnsafe(0),this._decrypt=b,this._mode=a}return m(A,E),A.prototype._update=function(a){return this._mode.encrypt(this,a,this._decrypt)},A.prototype._final=function(){this._cipher.scrub()},streamCipher=A,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var d=requireSafeBuffer$2().Buffer,v=requireMd5_js();function E(m,A,a,_){if(d.isBuffer(m)||(m=d.from(m,"binary")),A&&(d.isBuffer(A)||(A=d.from(A,"binary")),A.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var g=a/8,b=d.alloc(g),w=d.alloc(_||0),l=d.alloc(0);g>0||_>0;){var M=new v;M.update(l),M.update(m),A&&M.update(A),l=M.digest();var y=0;if(g>0){var B=b.length-g;y=Math.min(g,l.length),l.copy(b,B,0,y),g-=y}if(y<l.length&&_>0){var R=w.length-_,S=Math.min(_,l.length-y);l.copy(w,R,y,y+S),_-=S}}return l.fill(0),{key:b,iv:w}}return evp_bytestokey=E,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var d=requireModes$1(),v=requireAuthCipher(),E=requireSafeBuffer$2().Buffer,m=requireStreamCipher(),A=requireCipherBase(),a=requireAes(),_=requireEvp_bytestokey(),g=requireInherits_browser$8();function b(B,R,S){A.call(this),this._cache=new l,this._cipher=new a.AES(R),this._prev=E.from(S),this._mode=B,this._autopadding=!0}g(b,A),b.prototype._update=function(B){this._cache.add(B);for(var R,S,P=[];R=this._cache.get();)S=this._mode.encrypt(this,R),P.push(S);return E.concat(P)};var w=E.alloc(16,16);b.prototype._final=function(){var B=this._cache.flush();if(this._autopadding)return B=this._mode.encrypt(this,B),this._cipher.scrub(),B;if(!B.equals(w))throw this._cipher.scrub(),new Error("data not multiple of block length")},b.prototype.setAutoPadding=function(B){return this._autopadding=!!B,this};function l(){this.cache=E.allocUnsafe(0)}l.prototype.add=function(B){this.cache=E.concat([this.cache,B])},l.prototype.get=function(){if(this.cache.length>15){var B=this.cache.slice(0,16);return this.cache=this.cache.slice(16),B}return null},l.prototype.flush=function(){for(var B=16-this.cache.length,R=E.allocUnsafe(B),S=-1;++S<B;)R.writeUInt8(B,S);return E.concat([this.cache,R])};function M(B,R,S){var P=d[B.toLowerCase()];if(!P)throw new TypeError("invalid suite type");if(typeof R=="string"&&(R=E.from(R)),R.length!==P.key/8)throw new TypeError("invalid key length "+R.length);if(typeof S=="string"&&(S=E.from(S)),P.mode!=="GCM"&&S.length!==P.iv)throw new TypeError("invalid iv length "+S.length);return P.type==="stream"?new m(P.module,R,S):P.type==="auth"?new v(P.module,R,S):new b(P.module,R,S)}function y(B,R){var S=d[B.toLowerCase()];if(!S)throw new TypeError("invalid suite type");var P=_(R,!1,S.key,S.iv);return M(B,P.key,P.iv)}return encrypter.createCipheriv=M,encrypter.createCipher=y,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var d=requireAuthCipher(),v=requireSafeBuffer$2().Buffer,E=requireModes$1(),m=requireStreamCipher(),A=requireCipherBase(),a=requireAes(),_=requireEvp_bytestokey(),g=requireInherits_browser$8();function b(B,R,S){A.call(this),this._cache=new w,this._last=void 0,this._cipher=new a.AES(R),this._prev=v.from(S),this._mode=B,this._autopadding=!0}g(b,A),b.prototype._update=function(B){this._cache.add(B);for(var R,S,P=[];R=this._cache.get(this._autopadding);)S=this._mode.decrypt(this,R),P.push(S);return v.concat(P)},b.prototype._final=function(){var B=this._cache.flush();if(this._autopadding)return l(this._mode.decrypt(this,B));if(B)throw new Error("data not multiple of block length")},b.prototype.setAutoPadding=function(B){return this._autopadding=!!B,this};function w(){this.cache=v.allocUnsafe(0)}w.prototype.add=function(B){this.cache=v.concat([this.cache,B])},w.prototype.get=function(B){var R;if(B){if(this.cache.length>16)return R=this.cache.slice(0,16),this.cache=this.cache.slice(16),R}else if(this.cache.length>=16)return R=this.cache.slice(0,16),this.cache=this.cache.slice(16),R;return null},w.prototype.flush=function(){if(this.cache.length)return this.cache};function l(B){var R=B[15];if(R<1||R>16)throw new Error("unable to decrypt data");for(var S=-1;++S<R;)if(B[S+(16-R)]!==R)throw new Error("unable to decrypt data");if(R!==16)return B.slice(0,16-R)}function M(B,R,S){var P=E[B.toLowerCase()];if(!P)throw new TypeError("invalid suite type");if(typeof S=="string"&&(S=v.from(S)),P.mode!=="GCM"&&S.length!==P.iv)throw new TypeError("invalid iv length "+S.length);if(typeof R=="string"&&(R=v.from(R)),R.length!==P.key/8)throw new TypeError("invalid key length "+R.length);return P.type==="stream"?new m(P.module,R,S,!0):P.type==="auth"?new d(P.module,R,S,!0):new b(P.module,R,S)}function y(B,R){var S=E[B.toLowerCase()];if(!S)throw new TypeError("invalid suite type");var P=_(R,!1,S.key,S.iv);return M(B,P.key,P.iv)}return decrypter.createDecipher=y,decrypter.createDecipheriv=M,decrypter}var hasRequiredBrowser$8;function requireBrowser$8(){if(hasRequiredBrowser$8)return browser$7;hasRequiredBrowser$8=1;var d=requireEncrypter(),v=requireDecrypter(),E=require$$2;function m(){return Object.keys(E)}return browser$7.createCipher=browser$7.Cipher=d.createCipher,browser$7.createCipheriv=browser$7.Cipheriv=d.createCipheriv,browser$7.createDecipher=browser$7.Decipher=v.createDecipher,browser$7.createDecipheriv=browser$7.Decipheriv=v.createDecipheriv,browser$7.listCiphers=browser$7.getCiphers=m,browser$7}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,(function(d){d["des-ecb"]={key:8,iv:0},d["des-cbc"]=d.des={key:8,iv:8},d["des-ede3-cbc"]=d.des3={key:24,iv:8},d["des-ede3"]={key:24,iv:0},d["des-ede-cbc"]={key:16,iv:8},d["des-ede"]={key:16,iv:0}})(modes)),modes}var hasRequiredBrowser$7;function requireBrowser$7(){if(hasRequiredBrowser$7)return browser$8;hasRequiredBrowser$7=1;var d=requireBrowserifyDes(),v=requireBrowser$8(),E=requireModes$1(),m=requireModes(),A=requireEvp_bytestokey();function a(l,M){l=l.toLowerCase();var y,B;if(E[l])y=E[l].key,B=E[l].iv;else if(m[l])y=m[l].key*8,B=m[l].iv;else throw new TypeError("invalid suite type");var R=A(M,!1,y,B);return g(l,R.key,R.iv)}function _(l,M){l=l.toLowerCase();var y,B;if(E[l])y=E[l].key,B=E[l].iv;else if(m[l])y=m[l].key*8,B=m[l].iv;else throw new TypeError("invalid suite type");var R=A(M,!1,y,B);return b(l,R.key,R.iv)}function g(l,M,y){if(l=l.toLowerCase(),E[l])return v.createCipheriv(l,M,y);if(m[l])return new d({key:M,iv:y,mode:l});throw new TypeError("invalid suite type")}function b(l,M,y){if(l=l.toLowerCase(),E[l])return v.createDecipheriv(l,M,y);if(m[l])return new d({key:M,iv:y,mode:l,decrypt:!0});throw new TypeError("invalid suite type")}function w(){return Object.keys(m).concat(v.getCiphers())}return browser$8.createCipher=browser$8.Cipher=a,browser$8.createCipheriv=browser$8.Cipheriv=g,browser$8.createDecipher=browser$8.Decipher=_,browser$8.createDecipheriv=browser$8.Decipheriv=b,browser$8.listCiphers=browser$8.getCiphers=w,browser$8}var browser$6={},bn$d={exports:{}},bn$c=bn$d.exports,hasRequiredBn$6;function requireBn$6(){return hasRequiredBn$6||(hasRequiredBn$6=1,(function(d){(function(v,E){function m(p,e){if(!p)throw new Error(e||"Assertion failed")}function A(p,e){p.super_=e;var t=function(){};t.prototype=e.prototype,p.prototype=new t,p.prototype.constructor=p}function a(p,e,t){if(a.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(p||0,e||10,t||"be"))}typeof v=="object"?v.exports=a:E.BN=a,a.BN=a,a.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=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),m(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):(m(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(m(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,c=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=26,s++);return this.strip()};function g(p,e){var t=p.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function b(p,e,t){var n=g(p,t);return t-1>=e&&(n|=g(p,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,c;if(n==="be")for(f=e.length-1;f>=t;f-=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8}this.strip()};function w(p,e,t,n){for(var f=0,s=Math.min(p.length,t),u=e;u<s;u++){var c=p.charCodeAt(u)-48;f*=n,c>=49?f+=c-49+10:c>=17?f+=c-17+10:f+=c}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,c=u%f,o=Math.min(u,u-c)+n,r=0,h=n;h<o;h+=f)r=w(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(c!==0){var q=1;for(r=w(e,h,e.length,t),h=0;h<c;h++)q*=t;this.imuln(q),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 l=["","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"],M=[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],y=[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 c=this.words[u],o=((c<<f|s)&16777215).toString(16);s=c>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=l[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=M[e],h=y[e];n="";var q=this.clone();for(q.negative=0;!q.isZero();){var $=q.modn(h).toString(e);q=q.idivn(h),q.isZero()?n=$+n:n=l[r-$.length]+$+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}m(!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&&m(!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 m(typeof _<"u"),this.toArrayLike(_,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);m(f<=s,"byte array longer than desired length"),m(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",c=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[r]=o;for(;r<s;r++)c[r]=0}else{for(r=0;r<s-f;r++)c[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[s-r-1]=o}return c},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 B(p){for(var e=new Array(p.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(p.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 m((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 m((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 m((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){m(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){m(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,c=0;c<s.length;c++)t=(f.words[c]|0)-(s.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;for(;u!==0&&c<f.length;c++)t=(f.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;if(u===0&&c<f.length&&f!==this)for(;c<f.length;c++)this.words[c]=f.words[c];return this.length=Math.max(this.length,c),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function R(p,e,t){t.negative=e.negative^p.negative;var n=p.length+e.length|0;t.length=n,n=n-1|0;var f=p.words[0]|0,s=e.words[0]|0,u=f*s,c=u&67108863,o=u/67108864|0;t.words[0]=c;for(var r=1;r<n;r++){for(var h=o>>>26,q=o&67108863,$=Math.min(r,e.length-1),H=Math.max(0,r-p.length+1);H<=$;H++){var Y=r-H|0;f=p.words[Y]|0,s=e.words[H]|0,u=f*s+q,h+=u/67108864|0,q=u&67108863}t.words[r]=q|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var S=function(e,t,n){var f=e.words,s=t.words,u=n.words,c=0,o,r,h,q=f[0]|0,$=q&8191,H=q>>>13,Y=f[1]|0,J=Y&8191,x=Y>>>13,I=f[2]|0,C=I&8191,N=I>>>13,F=f[3]|0,D=F&8191,X=F>>>13,le=f[4]|0,ue=le&8191,pe=le>>>13,Ce=f[5]|0,me=Ce&8191,ce=Ce>>>13,Ne=f[6]|0,ye=Ne&8191,Me=Ne>>>13,De=f[7]|0,be=De&8191,Re=De>>>13,je=f[8]|0,Se=je&8191,Ie=je>>>13,ze=f[9]|0,Z=ze&8191,L=ze>>>13,G=s[0]|0,ee=G&8191,oe=G>>>13,ge=s[1]|0,ie=ge&8191,he=ge>>>13,Oe=s[2]|0,ve=Oe&8191,_e=Oe>>>13,Le=s[3]|0,Ee=Le&8191,Pe=Le>>>13,He=s[4]|0,Be=He&8191,Te=He>>>13,Ge=s[5]|0,K=Ge&8191,O=Ge>>>13,W=s[6]|0,te=W&8191,se=W>>>13,we=s[7]|0,de=we&8191,qe=we>>>13,Ue=s[8]|0,xe=Ue&8191,Ae=Ue>>>13,Fe=s[9]|0,$e=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul($,ee),r=Math.imul($,oe),r=r+Math.imul(H,ee)|0,h=Math.imul(H,oe);var We=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(J,ee),r=Math.imul(J,oe),r=r+Math.imul(x,ee)|0,h=Math.imul(x,oe),o=o+Math.imul($,ie)|0,r=r+Math.imul($,he)|0,r=r+Math.imul(H,ie)|0,h=h+Math.imul(H,he)|0;var Ke=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(C,ee),r=Math.imul(C,oe),r=r+Math.imul(N,ee)|0,h=Math.imul(N,oe),o=o+Math.imul(J,ie)|0,r=r+Math.imul(J,he)|0,r=r+Math.imul(x,ie)|0,h=h+Math.imul(x,he)|0,o=o+Math.imul($,ve)|0,r=r+Math.imul($,_e)|0,r=r+Math.imul(H,ve)|0,h=h+Math.imul(H,_e)|0;var Xe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(D,ee),r=Math.imul(D,oe),r=r+Math.imul(X,ee)|0,h=Math.imul(X,oe),o=o+Math.imul(C,ie)|0,r=r+Math.imul(C,he)|0,r=r+Math.imul(N,ie)|0,h=h+Math.imul(N,he)|0,o=o+Math.imul(J,ve)|0,r=r+Math.imul(J,_e)|0,r=r+Math.imul(x,ve)|0,h=h+Math.imul(x,_e)|0,o=o+Math.imul($,Ee)|0,r=r+Math.imul($,Pe)|0,r=r+Math.imul(H,Ee)|0,h=h+Math.imul(H,Pe)|0;var Ze=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,ee),r=Math.imul(ue,oe),r=r+Math.imul(pe,ee)|0,h=Math.imul(pe,oe),o=o+Math.imul(D,ie)|0,r=r+Math.imul(D,he)|0,r=r+Math.imul(X,ie)|0,h=h+Math.imul(X,he)|0,o=o+Math.imul(C,ve)|0,r=r+Math.imul(C,_e)|0,r=r+Math.imul(N,ve)|0,h=h+Math.imul(N,_e)|0,o=o+Math.imul(J,Ee)|0,r=r+Math.imul(J,Pe)|0,r=r+Math.imul(x,Ee)|0,h=h+Math.imul(x,Pe)|0,o=o+Math.imul($,Be)|0,r=r+Math.imul($,Te)|0,r=r+Math.imul(H,Be)|0,h=h+Math.imul(H,Te)|0;var Ve=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,ee),r=Math.imul(me,oe),r=r+Math.imul(ce,ee)|0,h=Math.imul(ce,oe),o=o+Math.imul(ue,ie)|0,r=r+Math.imul(ue,he)|0,r=r+Math.imul(pe,ie)|0,h=h+Math.imul(pe,he)|0,o=o+Math.imul(D,ve)|0,r=r+Math.imul(D,_e)|0,r=r+Math.imul(X,ve)|0,h=h+Math.imul(X,_e)|0,o=o+Math.imul(C,Ee)|0,r=r+Math.imul(C,Pe)|0,r=r+Math.imul(N,Ee)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(J,Be)|0,r=r+Math.imul(J,Te)|0,r=r+Math.imul(x,Be)|0,h=h+Math.imul(x,Te)|0,o=o+Math.imul($,K)|0,r=r+Math.imul($,O)|0,r=r+Math.imul(H,K)|0,h=h+Math.imul(H,O)|0;var Ye=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ye,ee),r=Math.imul(ye,oe),r=r+Math.imul(Me,ee)|0,h=Math.imul(Me,oe),o=o+Math.imul(me,ie)|0,r=r+Math.imul(me,he)|0,r=r+Math.imul(ce,ie)|0,h=h+Math.imul(ce,he)|0,o=o+Math.imul(ue,ve)|0,r=r+Math.imul(ue,_e)|0,r=r+Math.imul(pe,ve)|0,h=h+Math.imul(pe,_e)|0,o=o+Math.imul(D,Ee)|0,r=r+Math.imul(D,Pe)|0,r=r+Math.imul(X,Ee)|0,h=h+Math.imul(X,Pe)|0,o=o+Math.imul(C,Be)|0,r=r+Math.imul(C,Te)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,Te)|0,o=o+Math.imul(J,K)|0,r=r+Math.imul(J,O)|0,r=r+Math.imul(x,K)|0,h=h+Math.imul(x,O)|0,o=o+Math.imul($,te)|0,r=r+Math.imul($,se)|0,r=r+Math.imul(H,te)|0,h=h+Math.imul(H,se)|0;var Je=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(be,ee),r=Math.imul(be,oe),r=r+Math.imul(Re,ee)|0,h=Math.imul(Re,oe),o=o+Math.imul(ye,ie)|0,r=r+Math.imul(ye,he)|0,r=r+Math.imul(Me,ie)|0,h=h+Math.imul(Me,he)|0,o=o+Math.imul(me,ve)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(ce,ve)|0,h=h+Math.imul(ce,_e)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(pe,Ee)|0,h=h+Math.imul(pe,Pe)|0,o=o+Math.imul(D,Be)|0,r=r+Math.imul(D,Te)|0,r=r+Math.imul(X,Be)|0,h=h+Math.imul(X,Te)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(C,O)|0,r=r+Math.imul(N,K)|0,h=h+Math.imul(N,O)|0,o=o+Math.imul(J,te)|0,r=r+Math.imul(J,se)|0,r=r+Math.imul(x,te)|0,h=h+Math.imul(x,se)|0,o=o+Math.imul($,de)|0,r=r+Math.imul($,qe)|0,r=r+Math.imul(H,de)|0,h=h+Math.imul(H,qe)|0;var Qe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(Se,ee),r=Math.imul(Se,oe),r=r+Math.imul(Ie,ee)|0,h=Math.imul(Ie,oe),o=o+Math.imul(be,ie)|0,r=r+Math.imul(be,he)|0,r=r+Math.imul(Re,ie)|0,h=h+Math.imul(Re,he)|0,o=o+Math.imul(ye,ve)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(Me,ve)|0,h=h+Math.imul(Me,_e)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(ce,Ee)|0,h=h+Math.imul(ce,Pe)|0,o=o+Math.imul(ue,Be)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(pe,Be)|0,h=h+Math.imul(pe,Te)|0,o=o+Math.imul(D,K)|0,r=r+Math.imul(D,O)|0,r=r+Math.imul(X,K)|0,h=h+Math.imul(X,O)|0,o=o+Math.imul(C,te)|0,r=r+Math.imul(C,se)|0,r=r+Math.imul(N,te)|0,h=h+Math.imul(N,se)|0,o=o+Math.imul(J,de)|0,r=r+Math.imul(J,qe)|0,r=r+Math.imul(x,de)|0,h=h+Math.imul(x,qe)|0,o=o+Math.imul($,xe)|0,r=r+Math.imul($,Ae)|0,r=r+Math.imul(H,xe)|0,h=h+Math.imul(H,Ae)|0;var er=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(Z,ee),r=Math.imul(Z,oe),r=r+Math.imul(L,ee)|0,h=Math.imul(L,oe),o=o+Math.imul(Se,ie)|0,r=r+Math.imul(Se,he)|0,r=r+Math.imul(Ie,ie)|0,h=h+Math.imul(Ie,he)|0,o=o+Math.imul(be,ve)|0,r=r+Math.imul(be,_e)|0,r=r+Math.imul(Re,ve)|0,h=h+Math.imul(Re,_e)|0,o=o+Math.imul(ye,Ee)|0,r=r+Math.imul(ye,Pe)|0,r=r+Math.imul(Me,Ee)|0,h=h+Math.imul(Me,Pe)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(ce,Be)|0,h=h+Math.imul(ce,Te)|0,o=o+Math.imul(ue,K)|0,r=r+Math.imul(ue,O)|0,r=r+Math.imul(pe,K)|0,h=h+Math.imul(pe,O)|0,o=o+Math.imul(D,te)|0,r=r+Math.imul(D,se)|0,r=r+Math.imul(X,te)|0,h=h+Math.imul(X,se)|0,o=o+Math.imul(C,de)|0,r=r+Math.imul(C,qe)|0,r=r+Math.imul(N,de)|0,h=h+Math.imul(N,qe)|0,o=o+Math.imul(J,xe)|0,r=r+Math.imul(J,Ae)|0,r=r+Math.imul(x,xe)|0,h=h+Math.imul(x,Ae)|0,o=o+Math.imul($,$e)|0,r=r+Math.imul($,ke)|0,r=r+Math.imul(H,$e)|0,h=h+Math.imul(H,ke)|0;var rr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(Z,ie),r=Math.imul(Z,he),r=r+Math.imul(L,ie)|0,h=Math.imul(L,he),o=o+Math.imul(Se,ve)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ie,ve)|0,h=h+Math.imul(Ie,_e)|0,o=o+Math.imul(be,Ee)|0,r=r+Math.imul(be,Pe)|0,r=r+Math.imul(Re,Ee)|0,h=h+Math.imul(Re,Pe)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(Me,Be)|0,h=h+Math.imul(Me,Te)|0,o=o+Math.imul(me,K)|0,r=r+Math.imul(me,O)|0,r=r+Math.imul(ce,K)|0,h=h+Math.imul(ce,O)|0,o=o+Math.imul(ue,te)|0,r=r+Math.imul(ue,se)|0,r=r+Math.imul(pe,te)|0,h=h+Math.imul(pe,se)|0,o=o+Math.imul(D,de)|0,r=r+Math.imul(D,qe)|0,r=r+Math.imul(X,de)|0,h=h+Math.imul(X,qe)|0,o=o+Math.imul(C,xe)|0,r=r+Math.imul(C,Ae)|0,r=r+Math.imul(N,xe)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(J,$e)|0,r=r+Math.imul(J,ke)|0,r=r+Math.imul(x,$e)|0,h=h+Math.imul(x,ke)|0;var tr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(Z,ve),r=Math.imul(Z,_e),r=r+Math.imul(L,ve)|0,h=Math.imul(L,_e),o=o+Math.imul(Se,Ee)|0,r=r+Math.imul(Se,Pe)|0,r=r+Math.imul(Ie,Ee)|0,h=h+Math.imul(Ie,Pe)|0,o=o+Math.imul(be,Be)|0,r=r+Math.imul(be,Te)|0,r=r+Math.imul(Re,Be)|0,h=h+Math.imul(Re,Te)|0,o=o+Math.imul(ye,K)|0,r=r+Math.imul(ye,O)|0,r=r+Math.imul(Me,K)|0,h=h+Math.imul(Me,O)|0,o=o+Math.imul(me,te)|0,r=r+Math.imul(me,se)|0,r=r+Math.imul(ce,te)|0,h=h+Math.imul(ce,se)|0,o=o+Math.imul(ue,de)|0,r=r+Math.imul(ue,qe)|0,r=r+Math.imul(pe,de)|0,h=h+Math.imul(pe,qe)|0,o=o+Math.imul(D,xe)|0,r=r+Math.imul(D,Ae)|0,r=r+Math.imul(X,xe)|0,h=h+Math.imul(X,Ae)|0,o=o+Math.imul(C,$e)|0,r=r+Math.imul(C,ke)|0,r=r+Math.imul(N,$e)|0,h=h+Math.imul(N,ke)|0;var ir=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(Z,Ee),r=Math.imul(Z,Pe),r=r+Math.imul(L,Ee)|0,h=Math.imul(L,Pe),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ie,Be)|0,h=h+Math.imul(Ie,Te)|0,o=o+Math.imul(be,K)|0,r=r+Math.imul(be,O)|0,r=r+Math.imul(Re,K)|0,h=h+Math.imul(Re,O)|0,o=o+Math.imul(ye,te)|0,r=r+Math.imul(ye,se)|0,r=r+Math.imul(Me,te)|0,h=h+Math.imul(Me,se)|0,o=o+Math.imul(me,de)|0,r=r+Math.imul(me,qe)|0,r=r+Math.imul(ce,de)|0,h=h+Math.imul(ce,qe)|0,o=o+Math.imul(ue,xe)|0,r=r+Math.imul(ue,Ae)|0,r=r+Math.imul(pe,xe)|0,h=h+Math.imul(pe,Ae)|0,o=o+Math.imul(D,$e)|0,r=r+Math.imul(D,ke)|0,r=r+Math.imul(X,$e)|0,h=h+Math.imul(X,ke)|0;var nr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(Z,Be),r=Math.imul(Z,Te),r=r+Math.imul(L,Be)|0,h=Math.imul(L,Te),o=o+Math.imul(Se,K)|0,r=r+Math.imul(Se,O)|0,r=r+Math.imul(Ie,K)|0,h=h+Math.imul(Ie,O)|0,o=o+Math.imul(be,te)|0,r=r+Math.imul(be,se)|0,r=r+Math.imul(Re,te)|0,h=h+Math.imul(Re,se)|0,o=o+Math.imul(ye,de)|0,r=r+Math.imul(ye,qe)|0,r=r+Math.imul(Me,de)|0,h=h+Math.imul(Me,qe)|0,o=o+Math.imul(me,xe)|0,r=r+Math.imul(me,Ae)|0,r=r+Math.imul(ce,xe)|0,h=h+Math.imul(ce,Ae)|0,o=o+Math.imul(ue,$e)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(pe,$e)|0,h=h+Math.imul(pe,ke)|0;var ar=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(Z,K),r=Math.imul(Z,O),r=r+Math.imul(L,K)|0,h=Math.imul(L,O),o=o+Math.imul(Se,te)|0,r=r+Math.imul(Se,se)|0,r=r+Math.imul(Ie,te)|0,h=h+Math.imul(Ie,se)|0,o=o+Math.imul(be,de)|0,r=r+Math.imul(be,qe)|0,r=r+Math.imul(Re,de)|0,h=h+Math.imul(Re,qe)|0,o=o+Math.imul(ye,xe)|0,r=r+Math.imul(ye,Ae)|0,r=r+Math.imul(Me,xe)|0,h=h+Math.imul(Me,Ae)|0,o=o+Math.imul(me,$e)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(ce,$e)|0,h=h+Math.imul(ce,ke)|0;var fr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(Z,te),r=Math.imul(Z,se),r=r+Math.imul(L,te)|0,h=Math.imul(L,se),o=o+Math.imul(Se,de)|0,r=r+Math.imul(Se,qe)|0,r=r+Math.imul(Ie,de)|0,h=h+Math.imul(Ie,qe)|0,o=o+Math.imul(be,xe)|0,r=r+Math.imul(be,Ae)|0,r=r+Math.imul(Re,xe)|0,h=h+Math.imul(Re,Ae)|0,o=o+Math.imul(ye,$e)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(Me,$e)|0,h=h+Math.imul(Me,ke)|0;var or=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(Z,de),r=Math.imul(Z,qe),r=r+Math.imul(L,de)|0,h=Math.imul(L,qe),o=o+Math.imul(Se,xe)|0,r=r+Math.imul(Se,Ae)|0,r=r+Math.imul(Ie,xe)|0,h=h+Math.imul(Ie,Ae)|0,o=o+Math.imul(be,$e)|0,r=r+Math.imul(be,ke)|0,r=r+Math.imul(Re,$e)|0,h=h+Math.imul(Re,ke)|0;var sr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(Z,xe),r=Math.imul(Z,Ae),r=r+Math.imul(L,xe)|0,h=Math.imul(L,Ae),o=o+Math.imul(Se,$e)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ie,$e)|0,h=h+Math.imul(Ie,ke)|0;var hr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,o=Math.imul(Z,$e),r=Math.imul(Z,ke),r=r+Math.imul(L,$e)|0,h=Math.imul(L,ke);var ur=(c+o|0)+((r&8191)<<13)|0;return c=(h+(r>>>13)|0)+(ur>>>26)|0,ur&=67108863,u[0]=We,u[1]=Ke,u[2]=Xe,u[3]=Ze,u[4]=Ve,u[5]=Ye,u[6]=Je,u[7]=Qe,u[8]=er,u[9]=rr,u[10]=tr,u[11]=ir,u[12]=nr,u[13]=ar,u[14]=fr,u[15]=or,u[16]=sr,u[17]=hr,u[18]=ur,c!==0&&(u[19]=c,n.length++),n};Math.imul||(S=R);function P(p,e,t){t.negative=e.negative^p.negative,t.length=p.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var c=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-p.length+1);r<=o;r++){var h=s-r,q=p.words[h]|0,$=e.words[r]|0,H=q*$,Y=H&67108863;u=u+(H/67108864|0)|0,Y=Y+c|0,c=Y&67108863,u=u+(Y>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=c,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function T(p,e,t){var n=new k;return n.mulp(p,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=S(this,e,t):f<63?n=R(this,e,t):f<1024?n=P(this,e,t):n=T(this,e,t),n};function k(p,e){this.x=p,this.y=e}k.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},k.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},k.prototype.permute=function(e,t,n,f,s,u){for(var c=0;c<u;c++)f[c]=t[e[c]],s[c]=n[e[c]]},k.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var c=1;c<s;c<<=1)for(var o=c<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),q=0;q<s;q+=o)for(var $=r,H=h,Y=0;Y<c;Y++){var J=n[q+Y],x=f[q+Y],I=n[q+Y+c],C=f[q+Y+c],N=$*I-H*C;C=$*C+H*I,I=N,n[q+Y]=J+I,f[q+Y]=x+C,n[q+Y+c]=J-I,f[q+Y+c]=x-C,Y!==o&&(N=r*$-h*H,H=r*H+h*$,$=N)}},k.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},k.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}},k.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},k.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;m(s===0),m((s&-8192)===0)},k.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},k.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),c=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),q=new Array(f),$=new Array(f),H=n.words;H.length=f,this.convert13b(e.words,e.length,c,f),this.convert13b(t.words,t.length,h,f),this.transform(c,u,o,r,f,s),this.transform(h,u,q,$,f,s);for(var Y=0;Y<f;Y++){var J=o[Y]*q[Y]-r[Y]*$[Y];r[Y]=o[Y]*$[Y]+r[Y]*q[Y],o[Y]=J}return this.conjugate(o,r,f),this.transform(o,r,H,u,f,s),this.conjugate(H,u,f),this.normalize13b(H,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),T(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){m(typeof e=="number"),m(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=B(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){m(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 c=this.words[s]&f,o=(this.words[s]|0)-c<<t;this.words[s]=o|u,u=c>>>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 m(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){m(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),c=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 q=this.words[r]|0;this.words[r]=h<<26-s|q>>>s,h=q&c}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 m(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){m(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){m(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(m(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 m(typeof e=="number"),m(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(m(typeof e=="number"),m(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,c=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+c;var o=(e.words[s]|0)*t;u-=o&67108863,c=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+c,c=u>>26,this.words[s+n]=u&67108863;if(c===0)return this.strip();for(m(c===-1),c=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+c,c=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,c=this._countBits(u);n=26-c,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 q=f.clone()._ishlnsubmul(s,1,o);q.negative===0&&(f=q,r&&(r.words[o]=1));for(var $=o-1;$>=0;$--){var H=(f.words[s.length+$]|0)*67108864+(f.words[s.length+$-1]|0);for(H=Math.min(H/u|0,67108863),f._ishlnsubmul(s,H,$);f.negative!==0;)H--,f.negative=0,f._ishlnsubmul(s,1,$),f.isZero()||(f.negative^=1);r&&(r.words[$]=H)}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(m(!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){m(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){m(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){m(e.negative===0),m(!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),c=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 q=0,$=1;(t.words[0]&$)===0&&q<26;++q,$<<=1);if(q>0)for(t.iushrn(q);q-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var H=0,Y=1;(n.words[0]&Y)===0&&H<26;++H,Y<<=1);if(H>0)for(n.iushrn(H);H-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(r),c.isub(h)),u.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(c)):(n.isub(t),u.isub(f),c.isub(s))}return{a:u,b:c,gcd:n.iushln(o)}},a.prototype._invmp=function(e){m(e.negative===0),m(!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 c=0,o=1;(t.words[0]&o)===0&&c<26;++c,o<<=1);if(c>0)for(t.iushrn(c);c-- >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 q;return t.cmpn(1)===0?q=f:q=s,q.cmpn(0)<0&&q.iadd(e),q},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){m(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 c=this.words[u]|0;c+=s,s=c>>>26,c&=67108863,this.words[u]=c}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),m(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 U(e)},a.prototype.toRed=function(e){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return m(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 m(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return m(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var z={k256:null,p224:null,p192:null,p25519:null};function j(p,e){this.name=p,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()}j.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},j.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},j.prototype.split=function(e,t){e.iushrn(this.n,0,t)},j.prototype.imulK=function(e){return e.imul(this.k)};function V(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}A(V,j),V.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 c=e.words[s]|0;e.words[s-10]=(c&n)<<4|u>>>22,u=c}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 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 Q(){j.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}A(Q,j);function ne(){j.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}A(ne,j);function ae(){j.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}A(ae,j),ae.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(z[e])return z[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 z[e]=t,t};function U(p){if(typeof p=="string"){var e=a._prime(p);this.m=e.p,this.prime=e}else m(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}U.prototype._verify1=function(e){m(e.negative===0,"red works only with positives"),m(e.red,"red works only with red numbers")},U.prototype._verify2=function(e,t){m((e.negative|t.negative)===0,"red works only with positives"),m(e.red&&e.red===t.red,"red works only with red numbers")},U.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},U.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},U.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)},U.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},U.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)},U.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},U.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},U.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},U.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},U.prototype.isqr=function(e){return this.imul(e,e.clone())},U.prototype.sqr=function(e){return this.mul(e,e)},U.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(m(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);m(!f.isZero());var u=new a(1).toRed(this),c=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(c)!==0;)r.redIAdd(c);for(var h=this.pow(r,f),q=this.pow(e,f.addn(1).iushrn(1)),$=this.pow(e,f),H=s;$.cmp(u)!==0;){for(var Y=$,J=0;Y.cmp(u)!==0;J++)Y=Y.redSqr();m(J<H);var x=this.pow(h,new a(1).iushln(H-J-1));q=q.redMul(x),h=x.redSqr(),$=$.redMul(h),H=J}return q},U.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},U.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],c=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],q=r-1;q>=0;q--){var $=h>>q&1;if(u!==f[0]&&(u=this.sqr(u)),$===0&&c===0){o=0;continue}c<<=1,c|=$,o++,!(o!==n&&(s!==0||q!==0))&&(u=this.mul(u,f[c]),o=0,c=0)}r=26}return u},U.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},U.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new fe(e)};function fe(p){U.call(this,p),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)}A(fe,U),fe.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},fe.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},fe.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)},fe.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)},fe.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(d,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(d){(function(v,E){function m(p,e){if(!p)throw new Error(e||"Assertion failed")}function A(p,e){p.super_=e;var t=function(){};t.prototype=e.prototype,p.prototype=new t,p.prototype.constructor=p}function a(p,e,t){if(a.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(p||0,e||10,t||"be"))}typeof v=="object"?v.exports=a:E.BN=a,a.BN=a,a.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=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),m(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):(m(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(m(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,c=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=26,s++);return this.strip()};function g(p,e){var t=p.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function b(p,e,t){var n=g(p,t);return t-1>=e&&(n|=g(p,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,c;if(n==="be")for(f=e.length-1;f>=t;f-=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8}this.strip()};function w(p,e,t,n){for(var f=0,s=Math.min(p.length,t),u=e;u<s;u++){var c=p.charCodeAt(u)-48;f*=n,c>=49?f+=c-49+10:c>=17?f+=c-17+10:f+=c}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,c=u%f,o=Math.min(u,u-c)+n,r=0,h=n;h<o;h+=f)r=w(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(c!==0){var q=1;for(r=w(e,h,e.length,t),h=0;h<c;h++)q*=t;this.imuln(q),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 l=["","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"],M=[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],y=[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 c=this.words[u],o=((c<<f|s)&16777215).toString(16);s=c>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=l[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=M[e],h=y[e];n="";var q=this.clone();for(q.negative=0;!q.isZero();){var $=q.modn(h).toString(e);q=q.idivn(h),q.isZero()?n=$+n:n=l[r-$.length]+$+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}m(!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&&m(!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 m(typeof _<"u"),this.toArrayLike(_,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);m(f<=s,"byte array longer than desired length"),m(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",c=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[r]=o;for(;r<s;r++)c[r]=0}else{for(r=0;r<s-f;r++)c[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[s-r-1]=o}return c},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 B(p){for(var e=new Array(p.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(p.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 m((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 m((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 m((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){m(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){m(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,c=0;c<s.length;c++)t=(f.words[c]|0)-(s.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;for(;u!==0&&c<f.length;c++)t=(f.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;if(u===0&&c<f.length&&f!==this)for(;c<f.length;c++)this.words[c]=f.words[c];return this.length=Math.max(this.length,c),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function R(p,e,t){t.negative=e.negative^p.negative;var n=p.length+e.length|0;t.length=n,n=n-1|0;var f=p.words[0]|0,s=e.words[0]|0,u=f*s,c=u&67108863,o=u/67108864|0;t.words[0]=c;for(var r=1;r<n;r++){for(var h=o>>>26,q=o&67108863,$=Math.min(r,e.length-1),H=Math.max(0,r-p.length+1);H<=$;H++){var Y=r-H|0;f=p.words[Y]|0,s=e.words[H]|0,u=f*s+q,h+=u/67108864|0,q=u&67108863}t.words[r]=q|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var S=function(e,t,n){var f=e.words,s=t.words,u=n.words,c=0,o,r,h,q=f[0]|0,$=q&8191,H=q>>>13,Y=f[1]|0,J=Y&8191,x=Y>>>13,I=f[2]|0,C=I&8191,N=I>>>13,F=f[3]|0,D=F&8191,X=F>>>13,le=f[4]|0,ue=le&8191,pe=le>>>13,Ce=f[5]|0,me=Ce&8191,ce=Ce>>>13,Ne=f[6]|0,ye=Ne&8191,Me=Ne>>>13,De=f[7]|0,be=De&8191,Re=De>>>13,je=f[8]|0,Se=je&8191,Ie=je>>>13,ze=f[9]|0,Z=ze&8191,L=ze>>>13,G=s[0]|0,ee=G&8191,oe=G>>>13,ge=s[1]|0,ie=ge&8191,he=ge>>>13,Oe=s[2]|0,ve=Oe&8191,_e=Oe>>>13,Le=s[3]|0,Ee=Le&8191,Pe=Le>>>13,He=s[4]|0,Be=He&8191,Te=He>>>13,Ge=s[5]|0,K=Ge&8191,O=Ge>>>13,W=s[6]|0,te=W&8191,se=W>>>13,we=s[7]|0,de=we&8191,qe=we>>>13,Ue=s[8]|0,xe=Ue&8191,Ae=Ue>>>13,Fe=s[9]|0,$e=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul($,ee),r=Math.imul($,oe),r=r+Math.imul(H,ee)|0,h=Math.imul(H,oe);var We=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(J,ee),r=Math.imul(J,oe),r=r+Math.imul(x,ee)|0,h=Math.imul(x,oe),o=o+Math.imul($,ie)|0,r=r+Math.imul($,he)|0,r=r+Math.imul(H,ie)|0,h=h+Math.imul(H,he)|0;var Ke=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(C,ee),r=Math.imul(C,oe),r=r+Math.imul(N,ee)|0,h=Math.imul(N,oe),o=o+Math.imul(J,ie)|0,r=r+Math.imul(J,he)|0,r=r+Math.imul(x,ie)|0,h=h+Math.imul(x,he)|0,o=o+Math.imul($,ve)|0,r=r+Math.imul($,_e)|0,r=r+Math.imul(H,ve)|0,h=h+Math.imul(H,_e)|0;var Xe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(D,ee),r=Math.imul(D,oe),r=r+Math.imul(X,ee)|0,h=Math.imul(X,oe),o=o+Math.imul(C,ie)|0,r=r+Math.imul(C,he)|0,r=r+Math.imul(N,ie)|0,h=h+Math.imul(N,he)|0,o=o+Math.imul(J,ve)|0,r=r+Math.imul(J,_e)|0,r=r+Math.imul(x,ve)|0,h=h+Math.imul(x,_e)|0,o=o+Math.imul($,Ee)|0,r=r+Math.imul($,Pe)|0,r=r+Math.imul(H,Ee)|0,h=h+Math.imul(H,Pe)|0;var Ze=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,ee),r=Math.imul(ue,oe),r=r+Math.imul(pe,ee)|0,h=Math.imul(pe,oe),o=o+Math.imul(D,ie)|0,r=r+Math.imul(D,he)|0,r=r+Math.imul(X,ie)|0,h=h+Math.imul(X,he)|0,o=o+Math.imul(C,ve)|0,r=r+Math.imul(C,_e)|0,r=r+Math.imul(N,ve)|0,h=h+Math.imul(N,_e)|0,o=o+Math.imul(J,Ee)|0,r=r+Math.imul(J,Pe)|0,r=r+Math.imul(x,Ee)|0,h=h+Math.imul(x,Pe)|0,o=o+Math.imul($,Be)|0,r=r+Math.imul($,Te)|0,r=r+Math.imul(H,Be)|0,h=h+Math.imul(H,Te)|0;var Ve=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,ee),r=Math.imul(me,oe),r=r+Math.imul(ce,ee)|0,h=Math.imul(ce,oe),o=o+Math.imul(ue,ie)|0,r=r+Math.imul(ue,he)|0,r=r+Math.imul(pe,ie)|0,h=h+Math.imul(pe,he)|0,o=o+Math.imul(D,ve)|0,r=r+Math.imul(D,_e)|0,r=r+Math.imul(X,ve)|0,h=h+Math.imul(X,_e)|0,o=o+Math.imul(C,Ee)|0,r=r+Math.imul(C,Pe)|0,r=r+Math.imul(N,Ee)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(J,Be)|0,r=r+Math.imul(J,Te)|0,r=r+Math.imul(x,Be)|0,h=h+Math.imul(x,Te)|0,o=o+Math.imul($,K)|0,r=r+Math.imul($,O)|0,r=r+Math.imul(H,K)|0,h=h+Math.imul(H,O)|0;var Ye=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ye,ee),r=Math.imul(ye,oe),r=r+Math.imul(Me,ee)|0,h=Math.imul(Me,oe),o=o+Math.imul(me,ie)|0,r=r+Math.imul(me,he)|0,r=r+Math.imul(ce,ie)|0,h=h+Math.imul(ce,he)|0,o=o+Math.imul(ue,ve)|0,r=r+Math.imul(ue,_e)|0,r=r+Math.imul(pe,ve)|0,h=h+Math.imul(pe,_e)|0,o=o+Math.imul(D,Ee)|0,r=r+Math.imul(D,Pe)|0,r=r+Math.imul(X,Ee)|0,h=h+Math.imul(X,Pe)|0,o=o+Math.imul(C,Be)|0,r=r+Math.imul(C,Te)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,Te)|0,o=o+Math.imul(J,K)|0,r=r+Math.imul(J,O)|0,r=r+Math.imul(x,K)|0,h=h+Math.imul(x,O)|0,o=o+Math.imul($,te)|0,r=r+Math.imul($,se)|0,r=r+Math.imul(H,te)|0,h=h+Math.imul(H,se)|0;var Je=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(be,ee),r=Math.imul(be,oe),r=r+Math.imul(Re,ee)|0,h=Math.imul(Re,oe),o=o+Math.imul(ye,ie)|0,r=r+Math.imul(ye,he)|0,r=r+Math.imul(Me,ie)|0,h=h+Math.imul(Me,he)|0,o=o+Math.imul(me,ve)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(ce,ve)|0,h=h+Math.imul(ce,_e)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(pe,Ee)|0,h=h+Math.imul(pe,Pe)|0,o=o+Math.imul(D,Be)|0,r=r+Math.imul(D,Te)|0,r=r+Math.imul(X,Be)|0,h=h+Math.imul(X,Te)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(C,O)|0,r=r+Math.imul(N,K)|0,h=h+Math.imul(N,O)|0,o=o+Math.imul(J,te)|0,r=r+Math.imul(J,se)|0,r=r+Math.imul(x,te)|0,h=h+Math.imul(x,se)|0,o=o+Math.imul($,de)|0,r=r+Math.imul($,qe)|0,r=r+Math.imul(H,de)|0,h=h+Math.imul(H,qe)|0;var Qe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(Se,ee),r=Math.imul(Se,oe),r=r+Math.imul(Ie,ee)|0,h=Math.imul(Ie,oe),o=o+Math.imul(be,ie)|0,r=r+Math.imul(be,he)|0,r=r+Math.imul(Re,ie)|0,h=h+Math.imul(Re,he)|0,o=o+Math.imul(ye,ve)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(Me,ve)|0,h=h+Math.imul(Me,_e)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(ce,Ee)|0,h=h+Math.imul(ce,Pe)|0,o=o+Math.imul(ue,Be)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(pe,Be)|0,h=h+Math.imul(pe,Te)|0,o=o+Math.imul(D,K)|0,r=r+Math.imul(D,O)|0,r=r+Math.imul(X,K)|0,h=h+Math.imul(X,O)|0,o=o+Math.imul(C,te)|0,r=r+Math.imul(C,se)|0,r=r+Math.imul(N,te)|0,h=h+Math.imul(N,se)|0,o=o+Math.imul(J,de)|0,r=r+Math.imul(J,qe)|0,r=r+Math.imul(x,de)|0,h=h+Math.imul(x,qe)|0,o=o+Math.imul($,xe)|0,r=r+Math.imul($,Ae)|0,r=r+Math.imul(H,xe)|0,h=h+Math.imul(H,Ae)|0;var er=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(Z,ee),r=Math.imul(Z,oe),r=r+Math.imul(L,ee)|0,h=Math.imul(L,oe),o=o+Math.imul(Se,ie)|0,r=r+Math.imul(Se,he)|0,r=r+Math.imul(Ie,ie)|0,h=h+Math.imul(Ie,he)|0,o=o+Math.imul(be,ve)|0,r=r+Math.imul(be,_e)|0,r=r+Math.imul(Re,ve)|0,h=h+Math.imul(Re,_e)|0,o=o+Math.imul(ye,Ee)|0,r=r+Math.imul(ye,Pe)|0,r=r+Math.imul(Me,Ee)|0,h=h+Math.imul(Me,Pe)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(ce,Be)|0,h=h+Math.imul(ce,Te)|0,o=o+Math.imul(ue,K)|0,r=r+Math.imul(ue,O)|0,r=r+Math.imul(pe,K)|0,h=h+Math.imul(pe,O)|0,o=o+Math.imul(D,te)|0,r=r+Math.imul(D,se)|0,r=r+Math.imul(X,te)|0,h=h+Math.imul(X,se)|0,o=o+Math.imul(C,de)|0,r=r+Math.imul(C,qe)|0,r=r+Math.imul(N,de)|0,h=h+Math.imul(N,qe)|0,o=o+Math.imul(J,xe)|0,r=r+Math.imul(J,Ae)|0,r=r+Math.imul(x,xe)|0,h=h+Math.imul(x,Ae)|0,o=o+Math.imul($,$e)|0,r=r+Math.imul($,ke)|0,r=r+Math.imul(H,$e)|0,h=h+Math.imul(H,ke)|0;var rr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(Z,ie),r=Math.imul(Z,he),r=r+Math.imul(L,ie)|0,h=Math.imul(L,he),o=o+Math.imul(Se,ve)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ie,ve)|0,h=h+Math.imul(Ie,_e)|0,o=o+Math.imul(be,Ee)|0,r=r+Math.imul(be,Pe)|0,r=r+Math.imul(Re,Ee)|0,h=h+Math.imul(Re,Pe)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(Me,Be)|0,h=h+Math.imul(Me,Te)|0,o=o+Math.imul(me,K)|0,r=r+Math.imul(me,O)|0,r=r+Math.imul(ce,K)|0,h=h+Math.imul(ce,O)|0,o=o+Math.imul(ue,te)|0,r=r+Math.imul(ue,se)|0,r=r+Math.imul(pe,te)|0,h=h+Math.imul(pe,se)|0,o=o+Math.imul(D,de)|0,r=r+Math.imul(D,qe)|0,r=r+Math.imul(X,de)|0,h=h+Math.imul(X,qe)|0,o=o+Math.imul(C,xe)|0,r=r+Math.imul(C,Ae)|0,r=r+Math.imul(N,xe)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(J,$e)|0,r=r+Math.imul(J,ke)|0,r=r+Math.imul(x,$e)|0,h=h+Math.imul(x,ke)|0;var tr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(Z,ve),r=Math.imul(Z,_e),r=r+Math.imul(L,ve)|0,h=Math.imul(L,_e),o=o+Math.imul(Se,Ee)|0,r=r+Math.imul(Se,Pe)|0,r=r+Math.imul(Ie,Ee)|0,h=h+Math.imul(Ie,Pe)|0,o=o+Math.imul(be,Be)|0,r=r+Math.imul(be,Te)|0,r=r+Math.imul(Re,Be)|0,h=h+Math.imul(Re,Te)|0,o=o+Math.imul(ye,K)|0,r=r+Math.imul(ye,O)|0,r=r+Math.imul(Me,K)|0,h=h+Math.imul(Me,O)|0,o=o+Math.imul(me,te)|0,r=r+Math.imul(me,se)|0,r=r+Math.imul(ce,te)|0,h=h+Math.imul(ce,se)|0,o=o+Math.imul(ue,de)|0,r=r+Math.imul(ue,qe)|0,r=r+Math.imul(pe,de)|0,h=h+Math.imul(pe,qe)|0,o=o+Math.imul(D,xe)|0,r=r+Math.imul(D,Ae)|0,r=r+Math.imul(X,xe)|0,h=h+Math.imul(X,Ae)|0,o=o+Math.imul(C,$e)|0,r=r+Math.imul(C,ke)|0,r=r+Math.imul(N,$e)|0,h=h+Math.imul(N,ke)|0;var ir=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(Z,Ee),r=Math.imul(Z,Pe),r=r+Math.imul(L,Ee)|0,h=Math.imul(L,Pe),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ie,Be)|0,h=h+Math.imul(Ie,Te)|0,o=o+Math.imul(be,K)|0,r=r+Math.imul(be,O)|0,r=r+Math.imul(Re,K)|0,h=h+Math.imul(Re,O)|0,o=o+Math.imul(ye,te)|0,r=r+Math.imul(ye,se)|0,r=r+Math.imul(Me,te)|0,h=h+Math.imul(Me,se)|0,o=o+Math.imul(me,de)|0,r=r+Math.imul(me,qe)|0,r=r+Math.imul(ce,de)|0,h=h+Math.imul(ce,qe)|0,o=o+Math.imul(ue,xe)|0,r=r+Math.imul(ue,Ae)|0,r=r+Math.imul(pe,xe)|0,h=h+Math.imul(pe,Ae)|0,o=o+Math.imul(D,$e)|0,r=r+Math.imul(D,ke)|0,r=r+Math.imul(X,$e)|0,h=h+Math.imul(X,ke)|0;var nr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(Z,Be),r=Math.imul(Z,Te),r=r+Math.imul(L,Be)|0,h=Math.imul(L,Te),o=o+Math.imul(Se,K)|0,r=r+Math.imul(Se,O)|0,r=r+Math.imul(Ie,K)|0,h=h+Math.imul(Ie,O)|0,o=o+Math.imul(be,te)|0,r=r+Math.imul(be,se)|0,r=r+Math.imul(Re,te)|0,h=h+Math.imul(Re,se)|0,o=o+Math.imul(ye,de)|0,r=r+Math.imul(ye,qe)|0,r=r+Math.imul(Me,de)|0,h=h+Math.imul(Me,qe)|0,o=o+Math.imul(me,xe)|0,r=r+Math.imul(me,Ae)|0,r=r+Math.imul(ce,xe)|0,h=h+Math.imul(ce,Ae)|0,o=o+Math.imul(ue,$e)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(pe,$e)|0,h=h+Math.imul(pe,ke)|0;var ar=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(Z,K),r=Math.imul(Z,O),r=r+Math.imul(L,K)|0,h=Math.imul(L,O),o=o+Math.imul(Se,te)|0,r=r+Math.imul(Se,se)|0,r=r+Math.imul(Ie,te)|0,h=h+Math.imul(Ie,se)|0,o=o+Math.imul(be,de)|0,r=r+Math.imul(be,qe)|0,r=r+Math.imul(Re,de)|0,h=h+Math.imul(Re,qe)|0,o=o+Math.imul(ye,xe)|0,r=r+Math.imul(ye,Ae)|0,r=r+Math.imul(Me,xe)|0,h=h+Math.imul(Me,Ae)|0,o=o+Math.imul(me,$e)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(ce,$e)|0,h=h+Math.imul(ce,ke)|0;var fr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(Z,te),r=Math.imul(Z,se),r=r+Math.imul(L,te)|0,h=Math.imul(L,se),o=o+Math.imul(Se,de)|0,r=r+Math.imul(Se,qe)|0,r=r+Math.imul(Ie,de)|0,h=h+Math.imul(Ie,qe)|0,o=o+Math.imul(be,xe)|0,r=r+Math.imul(be,Ae)|0,r=r+Math.imul(Re,xe)|0,h=h+Math.imul(Re,Ae)|0,o=o+Math.imul(ye,$e)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(Me,$e)|0,h=h+Math.imul(Me,ke)|0;var or=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(Z,de),r=Math.imul(Z,qe),r=r+Math.imul(L,de)|0,h=Math.imul(L,qe),o=o+Math.imul(Se,xe)|0,r=r+Math.imul(Se,Ae)|0,r=r+Math.imul(Ie,xe)|0,h=h+Math.imul(Ie,Ae)|0,o=o+Math.imul(be,$e)|0,r=r+Math.imul(be,ke)|0,r=r+Math.imul(Re,$e)|0,h=h+Math.imul(Re,ke)|0;var sr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(Z,xe),r=Math.imul(Z,Ae),r=r+Math.imul(L,xe)|0,h=Math.imul(L,Ae),o=o+Math.imul(Se,$e)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ie,$e)|0,h=h+Math.imul(Ie,ke)|0;var hr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,o=Math.imul(Z,$e),r=Math.imul(Z,ke),r=r+Math.imul(L,$e)|0,h=Math.imul(L,ke);var ur=(c+o|0)+((r&8191)<<13)|0;return c=(h+(r>>>13)|0)+(ur>>>26)|0,ur&=67108863,u[0]=We,u[1]=Ke,u[2]=Xe,u[3]=Ze,u[4]=Ve,u[5]=Ye,u[6]=Je,u[7]=Qe,u[8]=er,u[9]=rr,u[10]=tr,u[11]=ir,u[12]=nr,u[13]=ar,u[14]=fr,u[15]=or,u[16]=sr,u[17]=hr,u[18]=ur,c!==0&&(u[19]=c,n.length++),n};Math.imul||(S=R);function P(p,e,t){t.negative=e.negative^p.negative,t.length=p.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var c=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-p.length+1);r<=o;r++){var h=s-r,q=p.words[h]|0,$=e.words[r]|0,H=q*$,Y=H&67108863;u=u+(H/67108864|0)|0,Y=Y+c|0,c=Y&67108863,u=u+(Y>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=c,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function T(p,e,t){var n=new k;return n.mulp(p,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=S(this,e,t):f<63?n=R(this,e,t):f<1024?n=P(this,e,t):n=T(this,e,t),n};function k(p,e){this.x=p,this.y=e}k.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},k.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},k.prototype.permute=function(e,t,n,f,s,u){for(var c=0;c<u;c++)f[c]=t[e[c]],s[c]=n[e[c]]},k.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var c=1;c<s;c<<=1)for(var o=c<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),q=0;q<s;q+=o)for(var $=r,H=h,Y=0;Y<c;Y++){var J=n[q+Y],x=f[q+Y],I=n[q+Y+c],C=f[q+Y+c],N=$*I-H*C;C=$*C+H*I,I=N,n[q+Y]=J+I,f[q+Y]=x+C,n[q+Y+c]=J-I,f[q+Y+c]=x-C,Y!==o&&(N=r*$-h*H,H=r*H+h*$,$=N)}},k.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},k.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}},k.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},k.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;m(s===0),m((s&-8192)===0)},k.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},k.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),c=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),q=new Array(f),$=new Array(f),H=n.words;H.length=f,this.convert13b(e.words,e.length,c,f),this.convert13b(t.words,t.length,h,f),this.transform(c,u,o,r,f,s),this.transform(h,u,q,$,f,s);for(var Y=0;Y<f;Y++){var J=o[Y]*q[Y]-r[Y]*$[Y];r[Y]=o[Y]*$[Y]+r[Y]*q[Y],o[Y]=J}return this.conjugate(o,r,f),this.transform(o,r,H,u,f,s),this.conjugate(H,u,f),this.normalize13b(H,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),T(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){m(typeof e=="number"),m(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=B(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){m(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 c=this.words[s]&f,o=(this.words[s]|0)-c<<t;this.words[s]=o|u,u=c>>>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 m(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){m(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),c=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 q=this.words[r]|0;this.words[r]=h<<26-s|q>>>s,h=q&c}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 m(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){m(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){m(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(m(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 m(typeof e=="number"),m(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(m(typeof e=="number"),m(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,c=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+c;var o=(e.words[s]|0)*t;u-=o&67108863,c=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+c,c=u>>26,this.words[s+n]=u&67108863;if(c===0)return this.strip();for(m(c===-1),c=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+c,c=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,c=this._countBits(u);n=26-c,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 q=f.clone()._ishlnsubmul(s,1,o);q.negative===0&&(f=q,r&&(r.words[o]=1));for(var $=o-1;$>=0;$--){var H=(f.words[s.length+$]|0)*67108864+(f.words[s.length+$-1]|0);for(H=Math.min(H/u|0,67108863),f._ishlnsubmul(s,H,$);f.negative!==0;)H--,f.negative=0,f._ishlnsubmul(s,1,$),f.isZero()||(f.negative^=1);r&&(r.words[$]=H)}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(m(!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){m(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){m(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){m(e.negative===0),m(!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),c=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 q=0,$=1;(t.words[0]&$)===0&&q<26;++q,$<<=1);if(q>0)for(t.iushrn(q);q-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var H=0,Y=1;(n.words[0]&Y)===0&&H<26;++H,Y<<=1);if(H>0)for(n.iushrn(H);H-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(r),c.isub(h)),u.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(c)):(n.isub(t),u.isub(f),c.isub(s))}return{a:u,b:c,gcd:n.iushln(o)}},a.prototype._invmp=function(e){m(e.negative===0),m(!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 c=0,o=1;(t.words[0]&o)===0&&c<26;++c,o<<=1);if(c>0)for(t.iushrn(c);c-- >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 q;return t.cmpn(1)===0?q=f:q=s,q.cmpn(0)<0&&q.iadd(e),q},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){m(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 c=this.words[u]|0;c+=s,s=c>>>26,c&=67108863,this.words[u]=c}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),m(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 U(e)},a.prototype.toRed=function(e){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return m(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 m(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return m(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var z={k256:null,p224:null,p192:null,p25519:null};function j(p,e){this.name=p,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()}j.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},j.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},j.prototype.split=function(e,t){e.iushrn(this.n,0,t)},j.prototype.imulK=function(e){return e.imul(this.k)};function V(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}A(V,j),V.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 c=e.words[s]|0;e.words[s-10]=(c&n)<<4|u>>>22,u=c}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 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 Q(){j.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}A(Q,j);function ne(){j.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}A(ne,j);function ae(){j.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}A(ae,j),ae.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(z[e])return z[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 z[e]=t,t};function U(p){if(typeof p=="string"){var e=a._prime(p);this.m=e.p,this.prime=e}else m(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}U.prototype._verify1=function(e){m(e.negative===0,"red works only with positives"),m(e.red,"red works only with red numbers")},U.prototype._verify2=function(e,t){m((e.negative|t.negative)===0,"red works only with positives"),m(e.red&&e.red===t.red,"red works only with red numbers")},U.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},U.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},U.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)},U.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},U.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)},U.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},U.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},U.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},U.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},U.prototype.isqr=function(e){return this.imul(e,e.clone())},U.prototype.sqr=function(e){return this.mul(e,e)},U.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(m(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);m(!f.isZero());var u=new a(1).toRed(this),c=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(c)!==0;)r.redIAdd(c);for(var h=this.pow(r,f),q=this.pow(e,f.addn(1).iushrn(1)),$=this.pow(e,f),H=s;$.cmp(u)!==0;){for(var Y=$,J=0;Y.cmp(u)!==0;J++)Y=Y.redSqr();m(J<H);var x=this.pow(h,new a(1).iushln(H-J-1));q=q.redMul(x),h=x.redSqr(),$=$.redMul(h),H=J}return q},U.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},U.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],c=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],q=r-1;q>=0;q--){var $=h>>q&1;if(u!==f[0]&&(u=this.sqr(u)),$===0&&c===0){o=0;continue}c<<=1,c|=$,o++,!(o!==n&&(s!==0||q!==0))&&(u=this.mul(u,f[c]),o=0,c=0)}r=26}return u},U.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},U.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new fe(e)};function fe(p){U.call(this,p),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)}A(fe,U),fe.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},fe.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},fe.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)},fe.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)},fe.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(d,bn$a)})(bn$b)),bn$b.exports}var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var d;brorand.exports=function(A){return d||(d=new v(null)),d.generate(A)};function v(m){this.rand=m}if(brorand.exports.Rand=v,v.prototype.generate=function(A){return this._rand(A)},v.prototype._rand=function(A){if(this.rand.getBytes)return this.rand.getBytes(A);for(var a=new Uint8Array(A),_=0;_<a.length;_++)a[_]=this.rand.getByte();return a},typeof self=="object")self.crypto&&self.crypto.getRandomValues?v.prototype._rand=function(A){var a=new Uint8Array(A);return self.crypto.getRandomValues(a),a}:self.msCrypto&&self.msCrypto.getRandomValues?v.prototype._rand=function(A){var a=new Uint8Array(A);return self.msCrypto.getRandomValues(a),a}:typeof window=="object"&&(v.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var E=requireCryptoBrowserify();if(typeof E.randomBytes!="function")throw new Error("Not supported");v.prototype._rand=function(A){return E.randomBytes(A)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var d=requireBn$5(),v=requireBrorand();function E(m){this.rand=m||new v.Rand}return mr=E,E.create=function(A){return new E(A)},E.prototype._randbelow=function(A){var a=A.bitLength(),_=Math.ceil(a/8);do var g=new d(this.rand.generate(_));while(g.cmp(A)>=0);return g},E.prototype._randrange=function(A,a){var _=a.sub(A);return A.add(this._randbelow(_))},E.prototype.test=function(A,a,_){var g=A.bitLength(),b=d.mont(A),w=new d(1).toRed(b);a||(a=Math.max(1,g/48|0));for(var l=A.subn(1),M=0;!l.testn(M);M++);for(var y=A.shrn(M),B=l.toRed(b),R=!0;a>0;a--){var S=this._randrange(new d(2),l);_&&_(S);var P=S.toRed(b).redPow(y);if(!(P.cmp(w)===0||P.cmp(B)===0)){for(var T=1;T<M;T++){if(P=P.redSqr(),P.cmp(w)===0)return!1;if(P.cmp(B)===0)break}if(T===M)return!1}}return R},E.prototype.getDivisor=function(A,a){var _=A.bitLength(),g=d.mont(A),b=new d(1).toRed(g);a||(a=Math.max(1,_/48|0));for(var w=A.subn(1),l=0;!w.testn(l);l++);for(var M=A.shrn(l),y=w.toRed(g);a>0;a--){var B=this._randrange(new d(2),w),R=A.gcd(B);if(R.cmpn(1)!==0)return R;var S=B.toRed(g).redPow(M);if(!(S.cmp(b)===0||S.cmp(y)===0)){for(var P=1;P<l;P++){if(S=S.redSqr(),S.cmp(b)===0)return S.fromRed().subn(1).gcd(A);if(S.cmp(y)===0)break}if(P===l)return S=S.redSqr(),S.fromRed().subn(1).gcd(A)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var d=requireBrowser$d();generatePrime=P,P.simpleSieve=R,P.fermatTest=S;var v=requireBn$6(),E=new v(24),m=requireMr(),A=new m,a=new v(1),_=new v(2),g=new v(5);new v(16),new v(8);var b=new v(10),w=new v(3);new v(7);var l=new v(11),M=new v(4);new v(12);var y=null;function B(){if(y!==null)return y;var T=1048576,k=[];k[0]=2;for(var z=1,j=3;j<T;j+=2){for(var V=Math.ceil(Math.sqrt(j)),Q=0;Q<z&&k[Q]<=V&&j%k[Q]!==0;Q++);z!==Q&&k[Q]<=V||(k[z++]=j)}return y=k,k}function R(T){for(var k=B(),z=0;z<k.length;z++)if(T.modn(k[z])===0)return T.cmpn(k[z])===0;return!0}function S(T){var k=v.mont(T);return _.toRed(k).redPow(T.subn(1)).fromRed().cmpn(1)===0}function P(T,k){if(T<16)return k===2||k===5?new v([140,123]):new v([140,39]);k=new v(k);for(var z,j;;){for(z=new v(d(Math.ceil(T/8)));z.bitLength()>T;)z.ishrn(1);if(z.isEven()&&z.iadd(a),z.testn(1)||z.iadd(_),k.cmp(_)){if(!k.cmp(g))for(;z.mod(b).cmp(w);)z.iadd(M)}else for(;z.mod(E).cmp(l);)z.iadd(M);if(j=z.shrn(1),R(j)&&R(z)&&S(j)&&S(z)&&A.test(j)&&A.test(z))return z}}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 d=requireBn$6(),v=requireMr(),E=new v,m=new d(24),A=new d(11),a=new d(10),_=new d(3),g=new d(7),b=requireGeneratePrime(),w=requireBrowser$d();dh=R;function l(P,T){return T=T||"utf8",Buffer.isBuffer(P)||(P=new Buffer(P,T)),this._pub=new d(P),this}function M(P,T){return T=T||"utf8",Buffer.isBuffer(P)||(P=new Buffer(P,T)),this._priv=new d(P),this}var y={};function B(P,T){var k=T.toString("hex"),z=[k,P.toString(16)].join("_");if(z in y)return y[z];var j=0;if(P.isEven()||!b.simpleSieve||!b.fermatTest(P)||!E.test(P))return j+=1,k==="02"||k==="05"?j+=8:j+=4,y[z]=j,j;E.test(P.shrn(1))||(j+=2);var V;switch(k){case"02":P.mod(m).cmp(A)&&(j+=8);break;case"05":V=P.mod(a),V.cmp(_)&&V.cmp(g)&&(j+=8);break;default:j+=4}return y[z]=j,j}function R(P,T,k){this.setGenerator(T),this.__prime=new d(P),this._prime=d.mont(this.__prime),this._primeLen=P.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,k?(this.setPublicKey=l,this.setPrivateKey=M):this._primeCode=8}Object.defineProperty(R.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=B(this.__prime,this.__gen)),this._primeCode}}),R.prototype.generateKeys=function(){return this._priv||(this._priv=new d(w(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},R.prototype.computeSecret=function(P){P=new d(P),P=P.toRed(this._prime);var T=P.redPow(this._priv).fromRed(),k=new Buffer(T.toArray()),z=this.getPrime();if(k.length<z.length){var j=new Buffer(z.length-k.length);j.fill(0),k=Buffer.concat([j,k])}return k},R.prototype.getPublicKey=function(T){return S(this._pub,T)},R.prototype.getPrivateKey=function(T){return S(this._priv,T)},R.prototype.getPrime=function(P){return S(this.__prime,P)},R.prototype.getGenerator=function(P){return S(this._gen,P)},R.prototype.setGenerator=function(P,T){return T=T||"utf8",Buffer.isBuffer(P)||(P=new Buffer(P,T)),this.__gen=P,this._gen=new d(P),this};function S(P,T){var k=new Buffer(P.toArray());return T?k.toString(T):k}return dh}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$6;hasRequiredBrowser$6=1;var d=requireGeneratePrime(),v=require$$1$3,E=requireDh();function m(_){var g=new Buffer(v[_].prime,"hex"),b=new Buffer(v[_].gen,"hex");return new E(g,b)}var A={binary:!0,hex:!0,base64:!0};function a(_,g,b,w){return Buffer.isBuffer(g)||A[g]===void 0?a(_,"binary",g,b):(g=g||"binary",w=w||"binary",b=b||new Buffer([2]),Buffer.isBuffer(b)||(b=new Buffer(b,w)),typeof _=="number"?new E(d(_,b),b,!0):(Buffer.isBuffer(_)||(_=new Buffer(_,g)),new E(_,b,!0)))}return browser$6.DiffieHellmanGroup=browser$6.createDiffieHellmanGroup=browser$6.getDiffieHellman=m,browser$6.createDiffieHellman=browser$6.DiffieHellman=a,browser$6}var readableBrowser$1={exports:{}},isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var d={}.toString;return isarray=Array.isArray||function(v){return d.call(v)=="[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(d,v){var E=requireDist(),m=E.Buffer;function A(_,g){for(var b in _)g[b]=_[b]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?d.exports=E:(A(E,v),v.Buffer=a);function a(_,g,b){return m(_,g,b)}A(m,a),a.from=function(_,g,b){if(typeof _=="number")throw new TypeError("Argument must not be a number");return m(_,g,b)},a.alloc=function(_,g,b){if(typeof _!="number")throw new TypeError("Argument must be a number");var w=m(_);return g!==void 0?typeof b=="string"?w.fill(g,b):w.fill(g):w.fill(0),w},a.allocUnsafe=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return m(_)},a.allocUnsafeSlow=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return E.SlowBuffer(_)}})(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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$2.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),inherits_browser$2.exports}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,(function(d){function v(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}var E=requireSafeBuffer().Buffer,m=requireUtil$1();function A(a,_,g){a.copy(_,g)}d.exports=(function(){function a(){v(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(g){var b={data:g,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},a.prototype.unshift=function(g){var b={data:g,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},a.prototype.shift=function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(g){if(this.length===0)return"";for(var b=this.head,w=""+b.data;b=b.next;)w+=g+b.data;return w},a.prototype.concat=function(g){if(this.length===0)return E.alloc(0);for(var b=E.allocUnsafe(g>>>0),w=this.head,l=0;w;)A(w.data,b,l),l+=w.data.length,w=w.next;return b},a})(),m&&m.inspect&&m.inspect.custom&&(d.exports.prototype[m.inspect.custom]=function(){var a=m.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 d=requireProcessNextickArgs();function v(A,a){var _=this,g=this._readableState&&this._readableState.destroyed,b=this._writableState&&this._writableState.destroyed;return g||b?(a?a(A):A&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(m,this,A)):d.nextTick(m,this,A)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(A||null,function(w){!a&&w?_._writableState?_._writableState.errorEmitted||(_._writableState.errorEmitted=!0,d.nextTick(m,_,w)):d.nextTick(m,_,w):a&&a(w)}),this)}function E(){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 m(A,a){A.emit("error",a)}return destroy_1={destroy:v,undestroy:E},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var d=requireProcessNextickArgs();_stream_writable=S;function v(u){var c=this;this.next=null,this.entry=null,this.finish=function(){s(c,u)}}var E=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:d.nextTick,m;S.WritableState=B;var A=Object.create(requireUtil());A.inherits=requireInherits_browser$2();var a={deprecate:requireBrowser$c()},_=requireStreamBrowser(),g=requireSafeBuffer().Buffer,b=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function w(u){return g.from(u)}function l(u){return g.isBuffer(u)||u instanceof b}var M=requireDestroy();A.inherits(S,_);function y(){}function B(u,c){m=m||require_stream_duplex(),u=u||{};var o=c instanceof m;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,q=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=q,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 $=u.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){ne(c,H)},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 v(this)}B.prototype.getBuffer=function(){for(var c=this.bufferedRequest,o=[];c;)o.push(c),c=c.next;return o},(function(){try{Object.defineProperty(B.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var R;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(u){return R.call(this,u)?!0:this!==S?!1:u&&u._writableState instanceof B}})):R=function(u){return u instanceof this};function S(u){if(m=m||require_stream_duplex(),!R.call(S,this)&&!(this instanceof m))return new S(u);this._writableState=new B(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)),_.call(this)}S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function P(u,c){var o=new Error("write after end");u.emit("error",o),d.nextTick(c,o)}function T(u,c,o,r){var h=!0,q=!1;return o===null?q=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!c.objectMode&&(q=new TypeError("Invalid non-string/buffer chunk")),q&&(u.emit("error",q),d.nextTick(r,q),h=!1),h}S.prototype.write=function(u,c,o){var r=this._writableState,h=!1,q=!r.objectMode&&l(u);return q&&!g.isBuffer(u)&&(u=w(u)),typeof c=="function"&&(o=c,c=null),q?c="buffer":c||(c=r.defaultEncoding),typeof o!="function"&&(o=y),r.ended?P(this,o):(q||T(this,r,u,o))&&(r.pendingcb++,h=z(this,r,q,u,c,o)),h},S.prototype.cork=function(){var u=this._writableState;u.corked++},S.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&fe(this,u))},S.prototype.setDefaultEncoding=function(c){if(typeof c=="string"&&(c=c.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((c+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+c);return this._writableState.defaultEncoding=c,this};function k(u,c,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof c=="string"&&(c=g.from(c,o)),c}Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(u,c,o,r,h,q){if(!o){var $=k(c,r,h);r!==$&&(o=!0,h="buffer",r=$)}var H=c.objectMode?1:r.length;c.length+=H;var Y=c.length<c.highWaterMark;if(Y||(c.needDrain=!0),c.writing||c.corked){var J=c.lastBufferedRequest;c.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:q,next:null},J?J.next=c.lastBufferedRequest:c.bufferedRequest=c.lastBufferedRequest,c.bufferedRequestCount+=1}else j(u,c,!1,H,r,h,q);return Y}function j(u,c,o,r,h,q,$){c.writelen=r,c.writecb=$,c.writing=!0,c.sync=!0,o?u._writev(h,c.onwrite):u._write(h,q,c.onwrite),c.sync=!1}function V(u,c,o,r,h){--c.pendingcb,o?(d.nextTick(h,r),d.nextTick(n,u,c),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,c))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,c){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),c)V(u,o,r,c,h);else{var q=p(o);!q&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&fe(u,o),r?E(ae,u,o,q,h):ae(u,o,q,h)}}function ae(u,c,o,r){o||U(u,c),c.pendingcb--,r(),n(u,c)}function U(u,c){c.length===0&&c.needDrain&&(c.needDrain=!1,u.emit("drain"))}function fe(u,c){c.bufferProcessing=!0;var o=c.bufferedRequest;if(u._writev&&o&&o.next){var r=c.bufferedRequestCount,h=new Array(r),q=c.corkedRequestsFree;q.entry=o;for(var $=0,H=!0;o;)h[$]=o,o.isBuf||(H=!1),o=o.next,$+=1;h.allBuffers=H,j(u,c,!0,c.length,h,"",q.finish),c.pendingcb++,c.lastBufferedRequest=null,q.next?(c.corkedRequestsFree=q.next,q.next=null):c.corkedRequestsFree=new v(c),c.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,J=o.encoding,x=o.callback,I=c.objectMode?1:Y.length;if(j(u,c,!1,I,Y,J,x),o=o.next,c.bufferedRequestCount--,c.writing)break}o===null&&(c.lastBufferedRequest=null)}c.bufferedRequest=o,c.bufferProcessing=!1}S.prototype._write=function(u,c,o){o(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(u,c,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,c=null):typeof c=="function"&&(o=c,c=null),u!=null&&this.write(u,c),r.corked&&(r.corked=1,this.uncork()),r.ending||f(this,r,o)};function p(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,c){u._final(function(o){c.pendingcb--,o&&u.emit("error",o),c.prefinished=!0,u.emit("prefinish"),n(u,c)})}function t(u,c){!c.prefinished&&!c.finalCalled&&(typeof u._final=="function"?(c.pendingcb++,c.finalCalled=!0,d.nextTick(e,u,c)):(c.prefinished=!0,u.emit("prefinish")))}function n(u,c){var o=p(c);return o&&(t(u,c),c.pendingcb===0&&(c.finished=!0,u.emit("finish"))),o}function f(u,c,o){c.ending=!0,n(u,c),o&&(c.finished?d.nextTick(o):u.once("finish",o)),c.ended=!0,u.writable=!1}function s(u,c,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;c.pendingcb--,h(o),r=r.next}c.corkedRequestsFree.next=u}return Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),S.prototype.destroy=M.destroy,S.prototype._undestroy=M.undestroy,S.prototype._destroy=function(u,c){this.end(),c(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 d=requireProcessNextickArgs(),v=Object.keys||function(M){var y=[];for(var B in M)y.push(B);return y};_stream_duplex=b;var E=Object.create(requireUtil());E.inherits=requireInherits_browser$2();var m=require_stream_readable(),A=require_stream_writable();E.inherits(b,m);for(var a=v(A.prototype),_=0;_<a.length;_++){var g=a[_];b.prototype[g]||(b.prototype[g]=A.prototype[g])}function b(M){if(!(this instanceof b))return new b(M);m.call(this,M),A.call(this,M),M&&M.readable===!1&&(this.readable=!1),M&&M.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,M&&M.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function w(){this.allowHalfOpen||this._writableState.ended||d.nextTick(l,this)}function l(M){M.end()}return Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(M){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=M,this._writableState.destroyed=M)}}),b.prototype._destroy=function(M,y){this.push(null),this.end(),d.nextTick(y,M)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var d=requireProcessNextickArgs();_stream_readable=k;var v=requireIsarray(),E;k.ReadableState=T,requireEvents().EventEmitter;var m=function(x,I){return x.listeners(I).length},A=requireStreamBrowser(),a=requireSafeBuffer().Buffer,_=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function g(x){return a.from(x)}function b(x){return a.isBuffer(x)||x instanceof _}var w=Object.create(requireUtil());w.inherits=requireInherits_browser$2();var l=requireUtil$1(),M=void 0;l&&l.debuglog?M=l.debuglog("stream"):M=function(){};var y=requireBufferList(),B=requireDestroy(),R;w.inherits(k,A);var S=["error","close","destroy","pause","resume"];function P(x,I,C){if(typeof x.prependListener=="function")return x.prependListener(I,C);!x._events||!x._events[I]?x.on(I,C):v(x._events[I])?x._events[I].unshift(C):x._events[I]=[C,x._events[I]]}function T(x,I){E=E||require_stream_duplex(),x=x||{};var C=I instanceof E;this.objectMode=!!x.objectMode,C&&(this.objectMode=this.objectMode||!!x.readableObjectMode);var N=x.highWaterMark,F=x.readableHighWaterMark,D=this.objectMode?16:16*1024;N||N===0?this.highWaterMark=N:C&&(F||F===0)?this.highWaterMark=F:this.highWaterMark=D,this.highWaterMark=Math.floor(this.highWaterMark),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.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(R||(R=requireString_decoder().StringDecoder),this.decoder=new R(x.encoding),this.encoding=x.encoding)}function k(x){if(E=E||require_stream_duplex(),!(this instanceof k))return new k(x);this._readableState=new T(x,this),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),A.call(this)}Object.defineProperty(k.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),k.prototype.destroy=B.destroy,k.prototype._undestroy=B.undestroy,k.prototype._destroy=function(x,I){this.push(null),I(x)},k.prototype.push=function(x,I){var C=this._readableState,N;return C.objectMode?N=!0:typeof x=="string"&&(I=I||C.defaultEncoding,I!==C.encoding&&(x=a.from(x,I),I=""),N=!0),z(this,x,I,!1,N)},k.prototype.unshift=function(x){return z(this,x,null,!0,!1)};function z(x,I,C,N,F){var D=x._readableState;if(I===null)D.reading=!1,fe(x,D);else{var X;F||(X=V(D,I)),X?x.emit("error",X):D.objectMode||I&&I.length>0?(typeof I!="string"&&!D.objectMode&&Object.getPrototypeOf(I)!==a.prototype&&(I=g(I)),N?D.endEmitted?x.emit("error",new Error("stream.unshift() after end event")):j(x,D,I,!0):D.ended?x.emit("error",new Error("stream.push() after EOF")):(D.reading=!1,D.decoder&&!C?(I=D.decoder.write(I),D.objectMode||I.length!==0?j(x,D,I,!1):t(x,D)):j(x,D,I,!1))):N||(D.reading=!1)}return Q(D)}function j(x,I,C,N){I.flowing&&I.length===0&&!I.sync?(x.emit("data",C),x.read(0)):(I.length+=I.objectMode?1:C.length,N?I.buffer.unshift(C):I.buffer.push(C),I.needReadable&&p(x)),t(x,I)}function V(x,I){var C;return!b(I)&&typeof I!="string"&&I!==void 0&&!x.objectMode&&(C=new TypeError("Invalid non-string/buffer chunk")),C}function Q(x){return!x.ended&&(x.needReadable||x.length<x.highWaterMark||x.length===0)}k.prototype.isPaused=function(){return this._readableState.flowing===!1},k.prototype.setEncoding=function(x){return R||(R=requireString_decoder().StringDecoder),this._readableState.decoder=new R(x),this._readableState.encoding=x,this};var ne=8388608;function ae(x){return x>=ne?x=ne:(x--,x|=x>>>1,x|=x>>>2,x|=x>>>4,x|=x>>>8,x|=x>>>16,x++),x}function U(x,I){return x<=0||I.length===0&&I.ended?0:I.objectMode?1:x!==x?I.flowing&&I.length?I.buffer.head.data.length:I.length:(x>I.highWaterMark&&(I.highWaterMark=ae(x)),x<=I.length?x:I.ended?I.length:(I.needReadable=!0,0))}k.prototype.read=function(x){M("read",x),x=parseInt(x,10);var I=this._readableState,C=x;if(x!==0&&(I.emittedReadable=!1),x===0&&I.needReadable&&(I.length>=I.highWaterMark||I.ended))return M("read: emitReadable",I.length,I.ended),I.length===0&&I.ended?H(this):p(this),null;if(x=U(x,I),x===0&&I.ended)return I.length===0&&H(this),null;var N=I.needReadable;M("need readable",N),(I.length===0||I.length-x<I.highWaterMark)&&(N=!0,M("length less than watermark",N)),I.ended||I.reading?(N=!1,M("reading or ended",N)):N&&(M("do read"),I.reading=!0,I.sync=!0,I.length===0&&(I.needReadable=!0),this._read(I.highWaterMark),I.sync=!1,I.reading||(x=U(C,I)));var F;return x>0?F=r(x,I):F=null,F===null?(I.needReadable=!0,x=0):I.length-=x,I.length===0&&(I.ended||(I.needReadable=!0),C!==x&&I.ended&&H(this)),F!==null&&this.emit("data",F),F};function fe(x,I){if(!I.ended){if(I.decoder){var C=I.decoder.end();C&&C.length&&(I.buffer.push(C),I.length+=I.objectMode?1:C.length)}I.ended=!0,p(x)}}function p(x){var I=x._readableState;I.needReadable=!1,I.emittedReadable||(M("emitReadable",I.flowing),I.emittedReadable=!0,I.sync?d.nextTick(e,x):e(x))}function e(x){M("emit readable"),x.emit("readable"),o(x)}function t(x,I){I.readingMore||(I.readingMore=!0,d.nextTick(n,x,I))}function n(x,I){for(var C=I.length;!I.reading&&!I.flowing&&!I.ended&&I.length<I.highWaterMark&&(M("maybeReadMore read 0"),x.read(0),C!==I.length);)C=I.length;I.readingMore=!1}k.prototype._read=function(x){this.emit("error",new Error("_read() is not implemented"))},k.prototype.pipe=function(x,I){var C=this,N=this._readableState;switch(N.pipesCount){case 0:N.pipes=x;break;case 1:N.pipes=[N.pipes,x];break;default:N.pipes.push(x);break}N.pipesCount+=1,M("pipe count=%d opts=%j",N.pipesCount,I);var F=(!I||I.end!==!1)&&x!==process$1.stdout&&x!==process$1.stderr,D=F?le:De;N.endEmitted?d.nextTick(D):C.once("end",D),x.on("unpipe",X);function X(be,Re){M("onunpipe"),be===C&&Re&&Re.hasUnpiped===!1&&(Re.hasUnpiped=!0,Ce())}function le(){M("onend"),x.end()}var ue=f(C);x.on("drain",ue);var pe=!1;function Ce(){M("cleanup"),x.removeListener("close",ye),x.removeListener("finish",Me),x.removeListener("drain",ue),x.removeListener("error",Ne),x.removeListener("unpipe",X),C.removeListener("end",le),C.removeListener("end",De),C.removeListener("data",ce),pe=!0,N.awaitDrain&&(!x._writableState||x._writableState.needDrain)&&ue()}var me=!1;C.on("data",ce);function ce(be){M("ondata"),me=!1;var Re=x.write(be);Re===!1&&!me&&((N.pipesCount===1&&N.pipes===x||N.pipesCount>1&&J(N.pipes,x)!==-1)&&!pe&&(M("false write response, pause",N.awaitDrain),N.awaitDrain++,me=!0),C.pause())}function Ne(be){M("onerror",be),De(),x.removeListener("error",Ne),m(x,"error")===0&&x.emit("error",be)}P(x,"error",Ne);function ye(){x.removeListener("finish",Me),De()}x.once("close",ye);function Me(){M("onfinish"),x.removeListener("close",ye),De()}x.once("finish",Me);function De(){M("unpipe"),C.unpipe(x)}return x.emit("pipe",C),N.flowing||(M("pipe resume"),C.resume()),x};function f(x){return function(){var I=x._readableState;M("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&m(x,"data")&&(I.flowing=!0,o(x))}}k.prototype.unpipe=function(x){var I=this._readableState,C={hasUnpiped:!1};if(I.pipesCount===0)return this;if(I.pipesCount===1)return x&&x!==I.pipes?this:(x||(x=I.pipes),I.pipes=null,I.pipesCount=0,I.flowing=!1,x&&x.emit("unpipe",this,C),this);if(!x){var N=I.pipes,F=I.pipesCount;I.pipes=null,I.pipesCount=0,I.flowing=!1;for(var D=0;D<F;D++)N[D].emit("unpipe",this,{hasUnpiped:!1});return this}var X=J(I.pipes,x);return X===-1?this:(I.pipes.splice(X,1),I.pipesCount-=1,I.pipesCount===1&&(I.pipes=I.pipes[0]),x.emit("unpipe",this,C),this)},k.prototype.on=function(x,I){var C=A.prototype.on.call(this,x,I);if(x==="data")this._readableState.flowing!==!1&&this.resume();else if(x==="readable"){var N=this._readableState;!N.endEmitted&&!N.readableListening&&(N.readableListening=N.needReadable=!0,N.emittedReadable=!1,N.reading?N.length&&p(this):d.nextTick(s,this))}return C},k.prototype.addListener=k.prototype.on;function s(x){M("readable nexttick read 0"),x.read(0)}k.prototype.resume=function(){var x=this._readableState;return x.flowing||(M("resume"),x.flowing=!0,u(this,x)),this};function u(x,I){I.resumeScheduled||(I.resumeScheduled=!0,d.nextTick(c,x,I))}function c(x,I){I.reading||(M("resume read 0"),x.read(0)),I.resumeScheduled=!1,I.awaitDrain=0,x.emit("resume"),o(x),I.flowing&&!I.reading&&x.read(0)}k.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(x){var I=x._readableState;for(M("flow",I.flowing);I.flowing&&x.read()!==null;);}k.prototype.wrap=function(x){var I=this,C=this._readableState,N=!1;x.on("end",function(){if(M("wrapped end"),C.decoder&&!C.ended){var X=C.decoder.end();X&&X.length&&I.push(X)}I.push(null)}),x.on("data",function(X){if(M("wrapped data"),C.decoder&&(X=C.decoder.write(X)),!(C.objectMode&&X==null)&&!(!C.objectMode&&(!X||!X.length))){var le=I.push(X);le||(N=!0,x.pause())}});for(var F in x)this[F]===void 0&&typeof x[F]=="function"&&(this[F]=(function(X){return function(){return x[X].apply(x,arguments)}})(F));for(var D=0;D<S.length;D++)x.on(S[D],this.emit.bind(this,S[D]));return this._read=function(X){M("wrapped _read",X),N&&(N=!1,x.resume())},this},Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),k._fromList=r;function r(x,I){if(I.length===0)return null;var C;return I.objectMode?C=I.buffer.shift():!x||x>=I.length?(I.decoder?C=I.buffer.join(""):I.buffer.length===1?C=I.buffer.head.data:C=I.buffer.concat(I.length),I.buffer.clear()):C=h(x,I.buffer,I.decoder),C}function h(x,I,C){var N;return x<I.head.data.length?(N=I.head.data.slice(0,x),I.head.data=I.head.data.slice(x)):x===I.head.data.length?N=I.shift():N=C?q(x,I):$(x,I),N}function q(x,I){var C=I.head,N=1,F=C.data;for(x-=F.length;C=C.next;){var D=C.data,X=x>D.length?D.length:x;if(X===D.length?F+=D:F+=D.slice(0,x),x-=X,x===0){X===D.length?(++N,C.next?I.head=C.next:I.head=I.tail=null):(I.head=C,C.data=D.slice(X));break}++N}return I.length-=N,F}function $(x,I){var C=a.allocUnsafe(x),N=I.head,F=1;for(N.data.copy(C),x-=N.data.length;N=N.next;){var D=N.data,X=x>D.length?D.length:x;if(D.copy(C,C.length-x,0,X),x-=X,x===0){X===D.length?(++F,N.next?I.head=N.next:I.head=I.tail=null):(I.head=N,N.data=D.slice(X));break}++F}return I.length-=F,C}function H(x){var I=x._readableState;if(I.length>0)throw new Error('"endReadable()" called on non-empty stream');I.endEmitted||(I.ended=!0,d.nextTick(Y,I,x))}function Y(x,I){!x.endEmitted&&x.length===0&&(x.endEmitted=!0,I.readable=!1,I.emit("end"))}function J(x,I){for(var C=0,N=x.length;C<N;C++)if(x[C]===I)return C;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=m;var d=require_stream_duplex(),v=Object.create(requireUtil());v.inherits=requireInherits_browser$2(),v.inherits(m,d);function E(_,g){var b=this._transformState;b.transforming=!1;var w=b.writecb;if(!w)return this.emit("error",new Error("write callback called multiple times"));b.writechunk=null,b.writecb=null,g!=null&&this.push(g),w(_);var l=this._readableState;l.reading=!1,(l.needReadable||l.length<l.highWaterMark)&&this._read(l.highWaterMark)}function m(_){if(!(this instanceof m))return new m(_);d.call(this,_),this._transformState={afterTransform:E.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,_&&(typeof _.transform=="function"&&(this._transform=_.transform),typeof _.flush=="function"&&(this._flush=_.flush)),this.on("prefinish",A)}function A(){var _=this;typeof this._flush=="function"?this._flush(function(g,b){a(_,g,b)}):a(this,null,null)}m.prototype.push=function(_,g){return this._transformState.needTransform=!1,d.prototype.push.call(this,_,g)},m.prototype._transform=function(_,g,b){throw new Error("_transform() is not implemented")},m.prototype._write=function(_,g,b){var w=this._transformState;if(w.writecb=b,w.writechunk=_,w.writeencoding=g,!w.transforming){var l=this._readableState;(w.needTransform||l.needReadable||l.length<l.highWaterMark)&&this._read(l.highWaterMark)}},m.prototype._read=function(_){var g=this._transformState;g.writechunk!==null&&g.writecb&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},m.prototype._destroy=function(_,g){var b=this;d.prototype._destroy.call(this,_,function(w){g(w),b.emit("close")})};function a(_,g,b){if(g)return _.emit("error",g);if(b!=null&&_.push(b),_._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(_._transformState.transforming)throw new Error("Calling transform done when still transforming");return _.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=E;var d=require_stream_transform(),v=Object.create(requireUtil());v.inherits=requireInherits_browser$2(),v.inherits(E,d);function E(m){if(!(this instanceof E))return new E(m);d.call(this,m)}return E.prototype._transform=function(m,A,a){a(null,m)},_stream_passthrough}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,(function(d,v){v=d.exports=require_stream_readable(),v.Stream=v,v.Readable=v,v.Writable=require_stream_writable(),v.Duplex=require_stream_duplex(),v.Transform=require_stream_transform(),v.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(d){(function(v,E){function m(t,n){if(!t)throw new Error(n||"Assertion failed")}function A(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 v=="object"?v.exports=a:E.BN=a,a.BN=a,a.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=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),m(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):(m(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(m(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 c,o,r=0;if(s==="be")for(u=n.length-1,c=0;u>=0;u-=3)o=n[u]|n[u-1]<<8|n[u-2]<<16,this.words[c]|=o<<r&67108863,this.words[c+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,c++);else if(s==="le")for(u=0,c=0;u<n.length;u+=3)o=n[u]|n[u+1]<<8|n[u+2]<<16,this.words[c]|=o<<r&67108863,this.words[c+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,c++);return this._strip()};function g(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;m(!1,"Invalid character in "+t)}function b(t,n,f){var s=g(t,f);return f-1>=n&&(s|=g(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 c=0,o=0,r;if(s==="be")for(u=n.length-1;u>=f;u-=2)r=b(n,f,u)<<c,this.words[o]|=r&67108863,c>=18?(c-=18,o+=1,this.words[o]|=r>>>26):c+=8;else{var h=n.length-f;for(u=h%2===0?f+1:f;u<n.length;u+=2)r=b(n,f,u)<<c,this.words[o]|=r&67108863,c>=18?(c-=18,o+=1,this.words[o]|=r>>>26):c+=8}this._strip()};function w(t,n,f,s){for(var u=0,c=0,o=Math.min(t.length,f),r=n;r<o;r++){var h=t.charCodeAt(r)-48;u*=s,h>=49?c=h-49+10:h>=17?c=h-17+10:c=h,m(h>=0&&c<s,"Invalid character"),u+=c}return u}a.prototype._parseBase=function(n,f,s){this.words=[0],this.length=1;for(var u=0,c=1;c<=67108863;c*=f)u++;u--,c=c/f|0;for(var o=n.length-s,r=o%u,h=Math.min(o,o-r)+s,q=0,$=s;$<h;$+=u)q=w(n,$,$+u,f),this.imuln(c),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q);if(r!==0){var H=1;for(q=w(n,$,n.length,f),$=0;$<r;$++)H*=f;this.imuln(H),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q)}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 l(t,n){t.words=n.words,t.length=n.length,t.negative=n.negative,t.red=n.red}if(a.prototype._move=function(n){l(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")]=M}catch{a.prototype.inspect=M}else a.prototype.inspect=M;function M(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var y=["","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"],B=[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],R=[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,c=0,o=0;o<this.length;o++){var r=this.words[o],h=((r<<u|c)&16777215).toString(16);c=r>>>24-u&16777215,u+=2,u>=26&&(u-=26,o--),c!==0||o!==this.length-1?s=y[6-h.length]+h+s:s=h+s}for(c!==0&&(s=c.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 q=B[n],$=R[n];s="";var H=this.clone();for(H.negative=0;!H.isZero();){var Y=H.modrn($).toString(n);H=H.idivn($),H.isZero()?s=Y+s:s=y[q-Y.length]+Y+s}for(this.isZero()&&(s="0"+s);s.length%f!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}m(!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&&m(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-n:n},a.prototype.toJSON=function(){return this.toString(16,2)},_&&(a.prototype.toBuffer=function(n,f){return this.toArrayLike(_,n,f)}),a.prototype.toArray=function(n,f){return this.toArrayLike(Array,n,f)};var S=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(),c=s||Math.max(1,u);m(u<=c,"byte array longer than desired length"),m(c>0,"Requested array length <= 0");var o=S(n,c),r=f==="le"?"LE":"BE";return this["_toArrayLike"+r](o,u),o},a.prototype._toArrayLikeLE=function(n,f){for(var s=0,u=0,c=0,o=0;c<this.length;c++){var r=this.words[c]<<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,c=0,o=0;c<this.length;c++){var r=this.words[c]<<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 P(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 m((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 m((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 m((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){m(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){m(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 c=0,o=0;o<u.length;o++)f=(s.words[o]|0)+(u.words[o]|0)+c,this.words[o]=f&67108863,c=f>>>26;for(;c!==0&&o<s.length;o++)f=(s.words[o]|0)+c,this.words[o]=f&67108863,c=f>>>26;if(this.length=s.length,c!==0)this.words[this.length]=c,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,c;s>0?(u=this,c=n):(u=n,c=this);for(var o=0,r=0;r<c.length;r++)f=(u.words[r]|0)-(c.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 T(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,c=n.words[0]|0,o=u*c,r=o&67108863,h=o/67108864|0;f.words[0]=r;for(var q=1;q<s;q++){for(var $=h>>>26,H=h&67108863,Y=Math.min(q,n.length-1),J=Math.max(0,q-t.length+1);J<=Y;J++){var x=q-J|0;u=t.words[x]|0,c=n.words[J]|0,o=u*c+H,$+=o/67108864|0,H=o&67108863}f.words[q]=H|0,h=$|0}return h!==0?f.words[q]=h|0:f.length--,f._strip()}var k=function(n,f,s){var u=n.words,c=f.words,o=s.words,r=0,h,q,$,H=u[0]|0,Y=H&8191,J=H>>>13,x=u[1]|0,I=x&8191,C=x>>>13,N=u[2]|0,F=N&8191,D=N>>>13,X=u[3]|0,le=X&8191,ue=X>>>13,pe=u[4]|0,Ce=pe&8191,me=pe>>>13,ce=u[5]|0,Ne=ce&8191,ye=ce>>>13,Me=u[6]|0,De=Me&8191,be=Me>>>13,Re=u[7]|0,je=Re&8191,Se=Re>>>13,Ie=u[8]|0,ze=Ie&8191,Z=Ie>>>13,L=u[9]|0,G=L&8191,ee=L>>>13,oe=c[0]|0,ge=oe&8191,ie=oe>>>13,he=c[1]|0,Oe=he&8191,ve=he>>>13,_e=c[2]|0,Le=_e&8191,Ee=_e>>>13,Pe=c[3]|0,He=Pe&8191,Be=Pe>>>13,Te=c[4]|0,Ge=Te&8191,K=Te>>>13,O=c[5]|0,W=O&8191,te=O>>>13,se=c[6]|0,we=se&8191,de=se>>>13,qe=c[7]|0,Ue=qe&8191,xe=qe>>>13,Ae=c[8]|0,Fe=Ae&8191,$e=Ae>>>13,ke=c[9]|0,We=ke&8191,Ke=ke>>>13;s.negative=n.negative^f.negative,s.length=19,h=Math.imul(Y,ge),q=Math.imul(Y,ie),q=q+Math.imul(J,ge)|0,$=Math.imul(J,ie);var Xe=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,h=Math.imul(I,ge),q=Math.imul(I,ie),q=q+Math.imul(C,ge)|0,$=Math.imul(C,ie),h=h+Math.imul(Y,Oe)|0,q=q+Math.imul(Y,ve)|0,q=q+Math.imul(J,Oe)|0,$=$+Math.imul(J,ve)|0;var Ze=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,h=Math.imul(F,ge),q=Math.imul(F,ie),q=q+Math.imul(D,ge)|0,$=Math.imul(D,ie),h=h+Math.imul(I,Oe)|0,q=q+Math.imul(I,ve)|0,q=q+Math.imul(C,Oe)|0,$=$+Math.imul(C,ve)|0,h=h+Math.imul(Y,Le)|0,q=q+Math.imul(Y,Ee)|0,q=q+Math.imul(J,Le)|0,$=$+Math.imul(J,Ee)|0;var Ve=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,h=Math.imul(le,ge),q=Math.imul(le,ie),q=q+Math.imul(ue,ge)|0,$=Math.imul(ue,ie),h=h+Math.imul(F,Oe)|0,q=q+Math.imul(F,ve)|0,q=q+Math.imul(D,Oe)|0,$=$+Math.imul(D,ve)|0,h=h+Math.imul(I,Le)|0,q=q+Math.imul(I,Ee)|0,q=q+Math.imul(C,Le)|0,$=$+Math.imul(C,Ee)|0,h=h+Math.imul(Y,He)|0,q=q+Math.imul(Y,Be)|0,q=q+Math.imul(J,He)|0,$=$+Math.imul(J,Be)|0;var Ye=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,h=Math.imul(Ce,ge),q=Math.imul(Ce,ie),q=q+Math.imul(me,ge)|0,$=Math.imul(me,ie),h=h+Math.imul(le,Oe)|0,q=q+Math.imul(le,ve)|0,q=q+Math.imul(ue,Oe)|0,$=$+Math.imul(ue,ve)|0,h=h+Math.imul(F,Le)|0,q=q+Math.imul(F,Ee)|0,q=q+Math.imul(D,Le)|0,$=$+Math.imul(D,Ee)|0,h=h+Math.imul(I,He)|0,q=q+Math.imul(I,Be)|0,q=q+Math.imul(C,He)|0,$=$+Math.imul(C,Be)|0,h=h+Math.imul(Y,Ge)|0,q=q+Math.imul(Y,K)|0,q=q+Math.imul(J,Ge)|0,$=$+Math.imul(J,K)|0;var Je=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(Je>>>26)|0,Je&=67108863,h=Math.imul(Ne,ge),q=Math.imul(Ne,ie),q=q+Math.imul(ye,ge)|0,$=Math.imul(ye,ie),h=h+Math.imul(Ce,Oe)|0,q=q+Math.imul(Ce,ve)|0,q=q+Math.imul(me,Oe)|0,$=$+Math.imul(me,ve)|0,h=h+Math.imul(le,Le)|0,q=q+Math.imul(le,Ee)|0,q=q+Math.imul(ue,Le)|0,$=$+Math.imul(ue,Ee)|0,h=h+Math.imul(F,He)|0,q=q+Math.imul(F,Be)|0,q=q+Math.imul(D,He)|0,$=$+Math.imul(D,Be)|0,h=h+Math.imul(I,Ge)|0,q=q+Math.imul(I,K)|0,q=q+Math.imul(C,Ge)|0,$=$+Math.imul(C,K)|0,h=h+Math.imul(Y,W)|0,q=q+Math.imul(Y,te)|0,q=q+Math.imul(J,W)|0,$=$+Math.imul(J,te)|0;var Qe=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,h=Math.imul(De,ge),q=Math.imul(De,ie),q=q+Math.imul(be,ge)|0,$=Math.imul(be,ie),h=h+Math.imul(Ne,Oe)|0,q=q+Math.imul(Ne,ve)|0,q=q+Math.imul(ye,Oe)|0,$=$+Math.imul(ye,ve)|0,h=h+Math.imul(Ce,Le)|0,q=q+Math.imul(Ce,Ee)|0,q=q+Math.imul(me,Le)|0,$=$+Math.imul(me,Ee)|0,h=h+Math.imul(le,He)|0,q=q+Math.imul(le,Be)|0,q=q+Math.imul(ue,He)|0,$=$+Math.imul(ue,Be)|0,h=h+Math.imul(F,Ge)|0,q=q+Math.imul(F,K)|0,q=q+Math.imul(D,Ge)|0,$=$+Math.imul(D,K)|0,h=h+Math.imul(I,W)|0,q=q+Math.imul(I,te)|0,q=q+Math.imul(C,W)|0,$=$+Math.imul(C,te)|0,h=h+Math.imul(Y,we)|0,q=q+Math.imul(Y,de)|0,q=q+Math.imul(J,we)|0,$=$+Math.imul(J,de)|0;var er=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(er>>>26)|0,er&=67108863,h=Math.imul(je,ge),q=Math.imul(je,ie),q=q+Math.imul(Se,ge)|0,$=Math.imul(Se,ie),h=h+Math.imul(De,Oe)|0,q=q+Math.imul(De,ve)|0,q=q+Math.imul(be,Oe)|0,$=$+Math.imul(be,ve)|0,h=h+Math.imul(Ne,Le)|0,q=q+Math.imul(Ne,Ee)|0,q=q+Math.imul(ye,Le)|0,$=$+Math.imul(ye,Ee)|0,h=h+Math.imul(Ce,He)|0,q=q+Math.imul(Ce,Be)|0,q=q+Math.imul(me,He)|0,$=$+Math.imul(me,Be)|0,h=h+Math.imul(le,Ge)|0,q=q+Math.imul(le,K)|0,q=q+Math.imul(ue,Ge)|0,$=$+Math.imul(ue,K)|0,h=h+Math.imul(F,W)|0,q=q+Math.imul(F,te)|0,q=q+Math.imul(D,W)|0,$=$+Math.imul(D,te)|0,h=h+Math.imul(I,we)|0,q=q+Math.imul(I,de)|0,q=q+Math.imul(C,we)|0,$=$+Math.imul(C,de)|0,h=h+Math.imul(Y,Ue)|0,q=q+Math.imul(Y,xe)|0,q=q+Math.imul(J,Ue)|0,$=$+Math.imul(J,xe)|0;var rr=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(rr>>>26)|0,rr&=67108863,h=Math.imul(ze,ge),q=Math.imul(ze,ie),q=q+Math.imul(Z,ge)|0,$=Math.imul(Z,ie),h=h+Math.imul(je,Oe)|0,q=q+Math.imul(je,ve)|0,q=q+Math.imul(Se,Oe)|0,$=$+Math.imul(Se,ve)|0,h=h+Math.imul(De,Le)|0,q=q+Math.imul(De,Ee)|0,q=q+Math.imul(be,Le)|0,$=$+Math.imul(be,Ee)|0,h=h+Math.imul(Ne,He)|0,q=q+Math.imul(Ne,Be)|0,q=q+Math.imul(ye,He)|0,$=$+Math.imul(ye,Be)|0,h=h+Math.imul(Ce,Ge)|0,q=q+Math.imul(Ce,K)|0,q=q+Math.imul(me,Ge)|0,$=$+Math.imul(me,K)|0,h=h+Math.imul(le,W)|0,q=q+Math.imul(le,te)|0,q=q+Math.imul(ue,W)|0,$=$+Math.imul(ue,te)|0,h=h+Math.imul(F,we)|0,q=q+Math.imul(F,de)|0,q=q+Math.imul(D,we)|0,$=$+Math.imul(D,de)|0,h=h+Math.imul(I,Ue)|0,q=q+Math.imul(I,xe)|0,q=q+Math.imul(C,Ue)|0,$=$+Math.imul(C,xe)|0,h=h+Math.imul(Y,Fe)|0,q=q+Math.imul(Y,$e)|0,q=q+Math.imul(J,Fe)|0,$=$+Math.imul(J,$e)|0;var tr=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(tr>>>26)|0,tr&=67108863,h=Math.imul(G,ge),q=Math.imul(G,ie),q=q+Math.imul(ee,ge)|0,$=Math.imul(ee,ie),h=h+Math.imul(ze,Oe)|0,q=q+Math.imul(ze,ve)|0,q=q+Math.imul(Z,Oe)|0,$=$+Math.imul(Z,ve)|0,h=h+Math.imul(je,Le)|0,q=q+Math.imul(je,Ee)|0,q=q+Math.imul(Se,Le)|0,$=$+Math.imul(Se,Ee)|0,h=h+Math.imul(De,He)|0,q=q+Math.imul(De,Be)|0,q=q+Math.imul(be,He)|0,$=$+Math.imul(be,Be)|0,h=h+Math.imul(Ne,Ge)|0,q=q+Math.imul(Ne,K)|0,q=q+Math.imul(ye,Ge)|0,$=$+Math.imul(ye,K)|0,h=h+Math.imul(Ce,W)|0,q=q+Math.imul(Ce,te)|0,q=q+Math.imul(me,W)|0,$=$+Math.imul(me,te)|0,h=h+Math.imul(le,we)|0,q=q+Math.imul(le,de)|0,q=q+Math.imul(ue,we)|0,$=$+Math.imul(ue,de)|0,h=h+Math.imul(F,Ue)|0,q=q+Math.imul(F,xe)|0,q=q+Math.imul(D,Ue)|0,$=$+Math.imul(D,xe)|0,h=h+Math.imul(I,Fe)|0,q=q+Math.imul(I,$e)|0,q=q+Math.imul(C,Fe)|0,$=$+Math.imul(C,$e)|0,h=h+Math.imul(Y,We)|0,q=q+Math.imul(Y,Ke)|0,q=q+Math.imul(J,We)|0,$=$+Math.imul(J,Ke)|0;var ir=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(ir>>>26)|0,ir&=67108863,h=Math.imul(G,Oe),q=Math.imul(G,ve),q=q+Math.imul(ee,Oe)|0,$=Math.imul(ee,ve),h=h+Math.imul(ze,Le)|0,q=q+Math.imul(ze,Ee)|0,q=q+Math.imul(Z,Le)|0,$=$+Math.imul(Z,Ee)|0,h=h+Math.imul(je,He)|0,q=q+Math.imul(je,Be)|0,q=q+Math.imul(Se,He)|0,$=$+Math.imul(Se,Be)|0,h=h+Math.imul(De,Ge)|0,q=q+Math.imul(De,K)|0,q=q+Math.imul(be,Ge)|0,$=$+Math.imul(be,K)|0,h=h+Math.imul(Ne,W)|0,q=q+Math.imul(Ne,te)|0,q=q+Math.imul(ye,W)|0,$=$+Math.imul(ye,te)|0,h=h+Math.imul(Ce,we)|0,q=q+Math.imul(Ce,de)|0,q=q+Math.imul(me,we)|0,$=$+Math.imul(me,de)|0,h=h+Math.imul(le,Ue)|0,q=q+Math.imul(le,xe)|0,q=q+Math.imul(ue,Ue)|0,$=$+Math.imul(ue,xe)|0,h=h+Math.imul(F,Fe)|0,q=q+Math.imul(F,$e)|0,q=q+Math.imul(D,Fe)|0,$=$+Math.imul(D,$e)|0,h=h+Math.imul(I,We)|0,q=q+Math.imul(I,Ke)|0,q=q+Math.imul(C,We)|0,$=$+Math.imul(C,Ke)|0;var nr=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(nr>>>26)|0,nr&=67108863,h=Math.imul(G,Le),q=Math.imul(G,Ee),q=q+Math.imul(ee,Le)|0,$=Math.imul(ee,Ee),h=h+Math.imul(ze,He)|0,q=q+Math.imul(ze,Be)|0,q=q+Math.imul(Z,He)|0,$=$+Math.imul(Z,Be)|0,h=h+Math.imul(je,Ge)|0,q=q+Math.imul(je,K)|0,q=q+Math.imul(Se,Ge)|0,$=$+Math.imul(Se,K)|0,h=h+Math.imul(De,W)|0,q=q+Math.imul(De,te)|0,q=q+Math.imul(be,W)|0,$=$+Math.imul(be,te)|0,h=h+Math.imul(Ne,we)|0,q=q+Math.imul(Ne,de)|0,q=q+Math.imul(ye,we)|0,$=$+Math.imul(ye,de)|0,h=h+Math.imul(Ce,Ue)|0,q=q+Math.imul(Ce,xe)|0,q=q+Math.imul(me,Ue)|0,$=$+Math.imul(me,xe)|0,h=h+Math.imul(le,Fe)|0,q=q+Math.imul(le,$e)|0,q=q+Math.imul(ue,Fe)|0,$=$+Math.imul(ue,$e)|0,h=h+Math.imul(F,We)|0,q=q+Math.imul(F,Ke)|0,q=q+Math.imul(D,We)|0,$=$+Math.imul(D,Ke)|0;var ar=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(ar>>>26)|0,ar&=67108863,h=Math.imul(G,He),q=Math.imul(G,Be),q=q+Math.imul(ee,He)|0,$=Math.imul(ee,Be),h=h+Math.imul(ze,Ge)|0,q=q+Math.imul(ze,K)|0,q=q+Math.imul(Z,Ge)|0,$=$+Math.imul(Z,K)|0,h=h+Math.imul(je,W)|0,q=q+Math.imul(je,te)|0,q=q+Math.imul(Se,W)|0,$=$+Math.imul(Se,te)|0,h=h+Math.imul(De,we)|0,q=q+Math.imul(De,de)|0,q=q+Math.imul(be,we)|0,$=$+Math.imul(be,de)|0,h=h+Math.imul(Ne,Ue)|0,q=q+Math.imul(Ne,xe)|0,q=q+Math.imul(ye,Ue)|0,$=$+Math.imul(ye,xe)|0,h=h+Math.imul(Ce,Fe)|0,q=q+Math.imul(Ce,$e)|0,q=q+Math.imul(me,Fe)|0,$=$+Math.imul(me,$e)|0,h=h+Math.imul(le,We)|0,q=q+Math.imul(le,Ke)|0,q=q+Math.imul(ue,We)|0,$=$+Math.imul(ue,Ke)|0;var fr=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(fr>>>26)|0,fr&=67108863,h=Math.imul(G,Ge),q=Math.imul(G,K),q=q+Math.imul(ee,Ge)|0,$=Math.imul(ee,K),h=h+Math.imul(ze,W)|0,q=q+Math.imul(ze,te)|0,q=q+Math.imul(Z,W)|0,$=$+Math.imul(Z,te)|0,h=h+Math.imul(je,we)|0,q=q+Math.imul(je,de)|0,q=q+Math.imul(Se,we)|0,$=$+Math.imul(Se,de)|0,h=h+Math.imul(De,Ue)|0,q=q+Math.imul(De,xe)|0,q=q+Math.imul(be,Ue)|0,$=$+Math.imul(be,xe)|0,h=h+Math.imul(Ne,Fe)|0,q=q+Math.imul(Ne,$e)|0,q=q+Math.imul(ye,Fe)|0,$=$+Math.imul(ye,$e)|0,h=h+Math.imul(Ce,We)|0,q=q+Math.imul(Ce,Ke)|0,q=q+Math.imul(me,We)|0,$=$+Math.imul(me,Ke)|0;var or=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(or>>>26)|0,or&=67108863,h=Math.imul(G,W),q=Math.imul(G,te),q=q+Math.imul(ee,W)|0,$=Math.imul(ee,te),h=h+Math.imul(ze,we)|0,q=q+Math.imul(ze,de)|0,q=q+Math.imul(Z,we)|0,$=$+Math.imul(Z,de)|0,h=h+Math.imul(je,Ue)|0,q=q+Math.imul(je,xe)|0,q=q+Math.imul(Se,Ue)|0,$=$+Math.imul(Se,xe)|0,h=h+Math.imul(De,Fe)|0,q=q+Math.imul(De,$e)|0,q=q+Math.imul(be,Fe)|0,$=$+Math.imul(be,$e)|0,h=h+Math.imul(Ne,We)|0,q=q+Math.imul(Ne,Ke)|0,q=q+Math.imul(ye,We)|0,$=$+Math.imul(ye,Ke)|0;var sr=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(sr>>>26)|0,sr&=67108863,h=Math.imul(G,we),q=Math.imul(G,de),q=q+Math.imul(ee,we)|0,$=Math.imul(ee,de),h=h+Math.imul(ze,Ue)|0,q=q+Math.imul(ze,xe)|0,q=q+Math.imul(Z,Ue)|0,$=$+Math.imul(Z,xe)|0,h=h+Math.imul(je,Fe)|0,q=q+Math.imul(je,$e)|0,q=q+Math.imul(Se,Fe)|0,$=$+Math.imul(Se,$e)|0,h=h+Math.imul(De,We)|0,q=q+Math.imul(De,Ke)|0,q=q+Math.imul(be,We)|0,$=$+Math.imul(be,Ke)|0;var hr=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(hr>>>26)|0,hr&=67108863,h=Math.imul(G,Ue),q=Math.imul(G,xe),q=q+Math.imul(ee,Ue)|0,$=Math.imul(ee,xe),h=h+Math.imul(ze,Fe)|0,q=q+Math.imul(ze,$e)|0,q=q+Math.imul(Z,Fe)|0,$=$+Math.imul(Z,$e)|0,h=h+Math.imul(je,We)|0,q=q+Math.imul(je,Ke)|0,q=q+Math.imul(Se,We)|0,$=$+Math.imul(Se,Ke)|0;var ur=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(ur>>>26)|0,ur&=67108863,h=Math.imul(G,Fe),q=Math.imul(G,$e),q=q+Math.imul(ee,Fe)|0,$=Math.imul(ee,$e),h=h+Math.imul(ze,We)|0,q=q+Math.imul(ze,Ke)|0,q=q+Math.imul(Z,We)|0,$=$+Math.imul(Z,Ke)|0;var lr=(r+h|0)+((q&8191)<<13)|0;r=($+(q>>>13)|0)+(lr>>>26)|0,lr&=67108863,h=Math.imul(G,We),q=Math.imul(G,Ke),q=q+Math.imul(ee,We)|0,$=Math.imul(ee,Ke);var dr=(r+h|0)+((q&8191)<<13)|0;return r=($+(q>>>13)|0)+(dr>>>26)|0,dr&=67108863,o[0]=Xe,o[1]=Ze,o[2]=Ve,o[3]=Ye,o[4]=Je,o[5]=Qe,o[6]=er,o[7]=rr,o[8]=tr,o[9]=ir,o[10]=nr,o[11]=ar,o[12]=fr,o[13]=or,o[14]=sr,o[15]=hr,o[16]=ur,o[17]=lr,o[18]=dr,r!==0&&(o[19]=r,s.length++),s};Math.imul||(k=T);function z(t,n,f){f.negative=n.negative^t.negative,f.length=t.length+n.length;for(var s=0,u=0,c=0;c<f.length-1;c++){var o=u;u=0;for(var r=s&67108863,h=Math.min(c,n.length-1),q=Math.max(0,c-t.length+1);q<=h;q++){var $=c-q,H=t.words[$]|0,Y=n.words[q]|0,J=H*Y,x=J&67108863;o=o+(J/67108864|0)|0,x=x+r|0,r=x&67108863,o=o+(x>>>26)|0,u+=o>>>26,o&=67108863}f.words[c]=r,s=o,o=u}return s!==0?f.words[c]=s:f.length--,f._strip()}function j(t,n,f){return z(t,n,f)}a.prototype.mulTo=function(n,f){var s,u=this.length+n.length;return this.length===10&&n.length===10?s=k(this,n,f):u<63?s=T(this,n,f):u<1024?s=z(this,n,f):s=j(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),j(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),m(typeof n=="number"),m(n<67108864);for(var s=0,u=0;u<this.length;u++){var c=(this.words[u]|0)*n,o=(c&67108863)+(s&67108863);s>>=26,s+=c/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=P(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 c=s.sqr();u<f.length;u++,c=c.sqr())f[u]!==0&&(s=s.mul(c));return s},a.prototype.iushln=function(n){m(typeof n=="number"&&n>=0);var f=n%26,s=(n-f)/26,u=67108863>>>26-f<<26-f,c;if(f!==0){var o=0;for(c=0;c<this.length;c++){var r=this.words[c]&u,h=(this.words[c]|0)-r<<f;this.words[c]=h|o,o=r>>>26-f}o&&(this.words[c]=o,this.length++)}if(s!==0){for(c=this.length-1;c>=0;c--)this.words[c+s]=this.words[c];for(c=0;c<s;c++)this.words[c]=0;this.length+=s}return this._strip()},a.prototype.ishln=function(n){return m(this.negative===0),this.iushln(n)},a.prototype.iushrn=function(n,f,s){m(typeof n=="number"&&n>=0);var u;f?u=(f-f%26)/26:u=0;var c=n%26,o=Math.min((n-c)/26,this.length),r=67108863^67108863>>>c<<c,h=s;if(u-=o,u=Math.max(0,u),h){for(var q=0;q<o;q++)h.words[q]=this.words[q];h.length=o}if(o!==0)if(this.length>o)for(this.length-=o,q=0;q<this.length;q++)this.words[q]=this.words[q+o];else this.words[0]=0,this.length=1;var $=0;for(q=this.length-1;q>=0&&($!==0||q>=u);q--){var H=this.words[q]|0;this.words[q]=$<<26-c|H>>>c,$=H&r}return h&&$!==0&&(h.words[h.length++]=$),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(n,f,s){return m(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){m(typeof n=="number"&&n>=0);var f=n%26,s=(n-f)/26,u=1<<f;if(this.length<=s)return!1;var c=this.words[s];return!!(c&u)},a.prototype.imaskn=function(n){m(typeof n=="number"&&n>=0);var f=n%26,s=(n-f)/26;if(m(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 m(typeof n=="number"),m(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(m(typeof n=="number"),m(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,c;this._expand(u);var o,r=0;for(c=0;c<n.length;c++){o=(this.words[c+s]|0)+r;var h=(n.words[c]|0)*f;o-=h&67108863,r=(o>>26)-(h/67108864|0),this.words[c+s]=o&67108863}for(;c<this.length-s;c++)o=(this.words[c+s]|0)+r,r=o>>26,this.words[c+s]=o&67108863;if(r===0)return this._strip();for(m(r===-1),r=0,c=0;c<this.length;c++)o=-(this.words[c]|0)+r,r=o>>26,this.words[c]=o&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(n,f){var s=this.length-n.length,u=this.clone(),c=n,o=c.words[c.length-1]|0,r=this._countBits(o);s=26-r,s!==0&&(c=c.ushln(s),u.iushln(s),o=c.words[c.length-1]|0);var h=u.length-c.length,q;if(f!=="mod"){q=new a(null),q.length=h+1,q.words=new Array(q.length);for(var $=0;$<q.length;$++)q.words[$]=0}var H=u.clone()._ishlnsubmul(c,1,h);H.negative===0&&(u=H,q&&(q.words[h]=1));for(var Y=h-1;Y>=0;Y--){var J=(u.words[c.length+Y]|0)*67108864+(u.words[c.length+Y-1]|0);for(J=Math.min(J/o|0,67108863),u._ishlnsubmul(c,J,Y);u.negative!==0;)J--,u.negative=0,u._ishlnsubmul(c,1,Y),u.isZero()||(u.negative^=1);q&&(q.words[Y]=J)}return q&&q._strip(),u._strip(),f!=="div"&&s!==0&&u.iushrn(s),{div:q||null,mod:u}},a.prototype.divmod=function(n,f,s){if(m(!n.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var u,c,o;return this.negative!==0&&n.negative===0?(o=this.neg().divmod(n,f),f!=="mod"&&(u=o.div.neg()),f!=="div"&&(c=o.mod.neg(),s&&c.negative!==0&&c.iadd(n)),{div:u,mod:c}):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"&&(c=o.mod.neg(),s&&c.negative!==0&&c.isub(n)),{div:o.div,mod:c}):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),c=n.andln(1),o=s.cmp(u);return o<0||c===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),m(n<=67108863);for(var s=(1<<26)%n,u=0,c=this.length-1;c>=0;c--)u=(s*u+(this.words[c]|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),m(n<=67108863);for(var s=0,u=this.length-1;u>=0;u--){var c=(this.words[u]|0)+s*67108864;this.words[u]=c/n|0,s=c%n}return this._strip(),f?this.ineg():this},a.prototype.divn=function(n){return this.clone().idivn(n)},a.prototype.egcd=function(n){m(n.negative===0),m(!n.isZero());var f=this,s=n.clone();f.negative!==0?f=f.umod(n):f=f.clone();for(var u=new a(1),c=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 q=s.clone(),$=f.clone();!f.isZero();){for(var H=0,Y=1;(f.words[0]&Y)===0&&H<26;++H,Y<<=1);if(H>0)for(f.iushrn(H);H-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(q),c.isub($)),u.iushrn(1),c.iushrn(1);for(var J=0,x=1;(s.words[0]&x)===0&&J<26;++J,x<<=1);if(J>0)for(s.iushrn(J);J-- >0;)(o.isOdd()||r.isOdd())&&(o.iadd(q),r.isub($)),o.iushrn(1),r.iushrn(1);f.cmp(s)>=0?(f.isub(s),u.isub(o),c.isub(r)):(s.isub(f),o.isub(u),r.isub(c))}return{a:o,b:r,gcd:s.iushln(h)}},a.prototype._invmp=function(n){m(n.negative===0),m(!n.isZero());var f=this,s=n.clone();f.negative!==0?f=f.umod(n):f=f.clone();for(var u=new a(1),c=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 q=0,$=1;(s.words[0]&$)===0&&q<26;++q,$<<=1);if(q>0)for(s.iushrn(q);q-- >0;)c.isOdd()&&c.iadd(o),c.iushrn(1);f.cmp(s)>=0?(f.isub(s),u.isub(c)):(s.isub(f),c.isub(u))}var H;return f.cmpn(1)===0?H=u:H=c,H.cmpn(0)<0&&H.iadd(n),H},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 c=f.cmp(s);if(c<0){var o=f;f=s,s=o}else if(c===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){m(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 c=u,o=s;c!==0&&o<this.length;o++){var r=this.words[o]|0;r+=c,c=r>>>26,r&=67108863,this.words[o]=r}return c!==0&&(this.words[o]=c,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),m(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,c=n.words[s]|0;if(u!==c){u<c?f=-1:u>c&&(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 p(n)},a.prototype.toRed=function(n){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),n.convertTo(this)._forceRed(n)},a.prototype.fromRed=function(){return m(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 m(!this.red,"Already a number in reduction context"),this._forceRed(n)},a.prototype.redAdd=function(n){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},a.prototype.redIAdd=function(n){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},a.prototype.redSub=function(n){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},a.prototype.redISub=function(n){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},a.prototype.redShl=function(n){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},a.prototype.redMul=function(n){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},a.prototype.redIMul=function(n){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},a.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(n){return m(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 a(n,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Q.prototype._tmp=function(){var n=new a(null);return n.words=new Array(Math.ceil(this.n/13)),n},Q.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},Q.prototype.split=function(n,f){n.iushrn(this.n,0,f)},Q.prototype.imulK=function(n){return n.imul(this.k)};function ne(){Q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}A(ne,Q),ne.prototype.split=function(n,f){for(var s=4194303,u=Math.min(n.length,9),c=0;c<u;c++)f.words[c]=n.words[c];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,c=10;c<n.length;c++){var r=n.words[c]|0;n.words[c-10]=(r&s)<<4|o>>>22,o=r}o>>>=22,n.words[c-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 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 ae(){Q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}A(ae,Q);function U(){Q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}A(U,Q);function fe(){Q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}A(fe,Q),fe.prototype.imulK=function(n){for(var f=0,s=0;s<n.length;s++){var u=(n.words[s]|0)*19+f,c=u&67108863;u>>>=26,n.words[s]=c,f=u}return f!==0&&(n.words[n.length++]=f),n},a._prime=function(n){if(V[n])return V[n];var f;if(n==="k256")f=new ne;else if(n==="p224")f=new ae;else if(n==="p192")f=new U;else if(n==="p25519")f=new fe;else throw new Error("Unknown prime "+n);return V[n]=f,f};function p(t){if(typeof t=="string"){var n=a._prime(t);this.m=n.p,this.prime=n}else m(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}p.prototype._verify1=function(n){m(n.negative===0,"red works only with positives"),m(n.red,"red works only with red numbers")},p.prototype._verify2=function(n,f){m((n.negative|f.negative)===0,"red works only with positives"),m(n.red&&n.red===f.red,"red works only with red numbers")},p.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):(l(n,n.umod(this.m)._forceRed(this)),n)},p.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},p.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)},p.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},p.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)},p.prototype.isub=function(n,f){this._verify2(n,f);var s=n.isub(f);return s.cmpn(0)<0&&s.iadd(this.m),s},p.prototype.shl=function(n,f){return this._verify1(n),this.imod(n.ushln(f))},p.prototype.imul=function(n,f){return this._verify2(n,f),this.imod(n.imul(f))},p.prototype.mul=function(n,f){return this._verify2(n,f),this.imod(n.mul(f))},p.prototype.isqr=function(n){return this.imul(n,n.clone())},p.prototype.sqr=function(n){return this.mul(n,n)},p.prototype.sqrt=function(n){if(n.isZero())return n.clone();var f=this.m.andln(3);if(m(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),c=0;!u.isZero()&&u.andln(1)===0;)c++,u.iushrn(1);m(!u.isZero());var o=new a(1).toRed(this),r=o.redNeg(),h=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new a(2*q*q).toRed(this);this.pow(q,h).cmp(r)!==0;)q.redIAdd(r);for(var $=this.pow(q,u),H=this.pow(n,u.addn(1).iushrn(1)),Y=this.pow(n,u),J=c;Y.cmp(o)!==0;){for(var x=Y,I=0;x.cmp(o)!==0;I++)x=x.redSqr();m(I<J);var C=this.pow($,new a(1).iushln(J-I-1));H=H.redMul(C),$=C.redSqr(),Y=Y.redMul($),J=I}return H},p.prototype.invm=function(n){var f=n._invmp(this.m);return f.negative!==0?(f.negative=0,this.imod(f).redNeg()):this.imod(f)},p.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 c=2;c<u.length;c++)u[c]=this.mul(u[c-1],n);var o=u[0],r=0,h=0,q=f.bitLength()%26;for(q===0&&(q=26),c=f.length-1;c>=0;c--){for(var $=f.words[c],H=q-1;H>=0;H--){var Y=$>>H&1;if(o!==u[0]&&(o=this.sqr(o)),Y===0&&r===0){h=0;continue}r<<=1,r|=Y,h++,!(h!==s&&(c!==0||H!==0))&&(o=this.mul(o,u[r]),h=0,r=0)}q=26}return o},p.prototype.convertTo=function(n){var f=n.umod(this.m);return f===n?f.clone():f},p.prototype.convertFrom=function(n){var f=n.clone();return f.red=null,f},a.mont=function(n){return new e(n)};function e(t){p.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)}A(e,p),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),c=s.isub(u).iushrn(this.shift),o=c;return c.cmp(this.m)>=0?o=c.isub(this.m):c.cmpn(0)<0&&(o=c.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),c=s.isub(u).iushrn(this.shift),o=c;return c.cmp(this.m)>=0?o=c.isub(this.m):c.cmpn(0)<0&&(o=c.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)}})(d,bn$8)})(bn$9)),bn$9.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var d=requireBn$4(),v=requireBrowser$d(),E=requireSafeBuffer$2().Buffer;function m(_){var g=_.modulus.byteLength(),b;do b=new d(v(g));while(b.cmp(_.modulus)>=0||!b.umod(_.prime1)||!b.umod(_.prime2));return b}function A(_){var g=m(_),b=g.toRed(d.mont(_.modulus)).redPow(new d(_.publicExponent)).fromRed();return{blinder:b,unblinder:g.invm(_.modulus)}}function a(_,g){var b=A(g),w=g.modulus.byteLength(),l=new d(_).mul(b.blinder).umod(g.modulus),M=l.toRed(d.mont(g.prime1)),y=l.toRed(d.mont(g.prime2)),B=g.coefficient,R=g.prime1,S=g.prime2,P=M.redPow(g.exponent1).fromRed(),T=y.redPow(g.exponent2).fromRed(),k=P.isub(T).imul(B).umod(R).imul(S);return T.iadd(k).imul(b.unblinder).umod(g.modulus).toArrayLike(E,"be",w)}return a.getr=m,browserifyRsa=a,browserifyRsa}var elliptic={};const version$1="6.6.1",require$$0$3={version:version$1};var utils$3={},bn$7={exports:{}},bn$6=bn$7.exports,hasRequiredBn$3;function requireBn$3(){return hasRequiredBn$3||(hasRequiredBn$3=1,(function(d){(function(v,E){function m(p,e){if(!p)throw new Error(e||"Assertion failed")}function A(p,e){p.super_=e;var t=function(){};t.prototype=e.prototype,p.prototype=new t,p.prototype.constructor=p}function a(p,e,t){if(a.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(p||0,e||10,t||"be"))}typeof v=="object"?v.exports=a:E.BN=a,a.BN=a,a.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=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),m(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):(m(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(m(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,c=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=26,s++);return this.strip()};function g(p,e){var t=p.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function b(p,e,t){var n=g(p,t);return t-1>=e&&(n|=g(p,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,c;if(n==="be")for(f=e.length-1;f>=t;f-=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8}this.strip()};function w(p,e,t,n){for(var f=0,s=Math.min(p.length,t),u=e;u<s;u++){var c=p.charCodeAt(u)-48;f*=n,c>=49?f+=c-49+10:c>=17?f+=c-17+10:f+=c}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,c=u%f,o=Math.min(u,u-c)+n,r=0,h=n;h<o;h+=f)r=w(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(c!==0){var q=1;for(r=w(e,h,e.length,t),h=0;h<c;h++)q*=t;this.imuln(q),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 l=["","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"],M=[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],y=[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 c=this.words[u],o=((c<<f|s)&16777215).toString(16);s=c>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=l[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=M[e],h=y[e];n="";var q=this.clone();for(q.negative=0;!q.isZero();){var $=q.modn(h).toString(e);q=q.idivn(h),q.isZero()?n=$+n:n=l[r-$.length]+$+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}m(!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&&m(!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 m(typeof _<"u"),this.toArrayLike(_,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);m(f<=s,"byte array longer than desired length"),m(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",c=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[r]=o;for(;r<s;r++)c[r]=0}else{for(r=0;r<s-f;r++)c[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[s-r-1]=o}return c},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 B(p){for(var e=new Array(p.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(p.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 m((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 m((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 m((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){m(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){m(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,c=0;c<s.length;c++)t=(f.words[c]|0)-(s.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;for(;u!==0&&c<f.length;c++)t=(f.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;if(u===0&&c<f.length&&f!==this)for(;c<f.length;c++)this.words[c]=f.words[c];return this.length=Math.max(this.length,c),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function R(p,e,t){t.negative=e.negative^p.negative;var n=p.length+e.length|0;t.length=n,n=n-1|0;var f=p.words[0]|0,s=e.words[0]|0,u=f*s,c=u&67108863,o=u/67108864|0;t.words[0]=c;for(var r=1;r<n;r++){for(var h=o>>>26,q=o&67108863,$=Math.min(r,e.length-1),H=Math.max(0,r-p.length+1);H<=$;H++){var Y=r-H|0;f=p.words[Y]|0,s=e.words[H]|0,u=f*s+q,h+=u/67108864|0,q=u&67108863}t.words[r]=q|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var S=function(e,t,n){var f=e.words,s=t.words,u=n.words,c=0,o,r,h,q=f[0]|0,$=q&8191,H=q>>>13,Y=f[1]|0,J=Y&8191,x=Y>>>13,I=f[2]|0,C=I&8191,N=I>>>13,F=f[3]|0,D=F&8191,X=F>>>13,le=f[4]|0,ue=le&8191,pe=le>>>13,Ce=f[5]|0,me=Ce&8191,ce=Ce>>>13,Ne=f[6]|0,ye=Ne&8191,Me=Ne>>>13,De=f[7]|0,be=De&8191,Re=De>>>13,je=f[8]|0,Se=je&8191,Ie=je>>>13,ze=f[9]|0,Z=ze&8191,L=ze>>>13,G=s[0]|0,ee=G&8191,oe=G>>>13,ge=s[1]|0,ie=ge&8191,he=ge>>>13,Oe=s[2]|0,ve=Oe&8191,_e=Oe>>>13,Le=s[3]|0,Ee=Le&8191,Pe=Le>>>13,He=s[4]|0,Be=He&8191,Te=He>>>13,Ge=s[5]|0,K=Ge&8191,O=Ge>>>13,W=s[6]|0,te=W&8191,se=W>>>13,we=s[7]|0,de=we&8191,qe=we>>>13,Ue=s[8]|0,xe=Ue&8191,Ae=Ue>>>13,Fe=s[9]|0,$e=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul($,ee),r=Math.imul($,oe),r=r+Math.imul(H,ee)|0,h=Math.imul(H,oe);var We=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(J,ee),r=Math.imul(J,oe),r=r+Math.imul(x,ee)|0,h=Math.imul(x,oe),o=o+Math.imul($,ie)|0,r=r+Math.imul($,he)|0,r=r+Math.imul(H,ie)|0,h=h+Math.imul(H,he)|0;var Ke=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(C,ee),r=Math.imul(C,oe),r=r+Math.imul(N,ee)|0,h=Math.imul(N,oe),o=o+Math.imul(J,ie)|0,r=r+Math.imul(J,he)|0,r=r+Math.imul(x,ie)|0,h=h+Math.imul(x,he)|0,o=o+Math.imul($,ve)|0,r=r+Math.imul($,_e)|0,r=r+Math.imul(H,ve)|0,h=h+Math.imul(H,_e)|0;var Xe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(D,ee),r=Math.imul(D,oe),r=r+Math.imul(X,ee)|0,h=Math.imul(X,oe),o=o+Math.imul(C,ie)|0,r=r+Math.imul(C,he)|0,r=r+Math.imul(N,ie)|0,h=h+Math.imul(N,he)|0,o=o+Math.imul(J,ve)|0,r=r+Math.imul(J,_e)|0,r=r+Math.imul(x,ve)|0,h=h+Math.imul(x,_e)|0,o=o+Math.imul($,Ee)|0,r=r+Math.imul($,Pe)|0,r=r+Math.imul(H,Ee)|0,h=h+Math.imul(H,Pe)|0;var Ze=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,ee),r=Math.imul(ue,oe),r=r+Math.imul(pe,ee)|0,h=Math.imul(pe,oe),o=o+Math.imul(D,ie)|0,r=r+Math.imul(D,he)|0,r=r+Math.imul(X,ie)|0,h=h+Math.imul(X,he)|0,o=o+Math.imul(C,ve)|0,r=r+Math.imul(C,_e)|0,r=r+Math.imul(N,ve)|0,h=h+Math.imul(N,_e)|0,o=o+Math.imul(J,Ee)|0,r=r+Math.imul(J,Pe)|0,r=r+Math.imul(x,Ee)|0,h=h+Math.imul(x,Pe)|0,o=o+Math.imul($,Be)|0,r=r+Math.imul($,Te)|0,r=r+Math.imul(H,Be)|0,h=h+Math.imul(H,Te)|0;var Ve=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,ee),r=Math.imul(me,oe),r=r+Math.imul(ce,ee)|0,h=Math.imul(ce,oe),o=o+Math.imul(ue,ie)|0,r=r+Math.imul(ue,he)|0,r=r+Math.imul(pe,ie)|0,h=h+Math.imul(pe,he)|0,o=o+Math.imul(D,ve)|0,r=r+Math.imul(D,_e)|0,r=r+Math.imul(X,ve)|0,h=h+Math.imul(X,_e)|0,o=o+Math.imul(C,Ee)|0,r=r+Math.imul(C,Pe)|0,r=r+Math.imul(N,Ee)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(J,Be)|0,r=r+Math.imul(J,Te)|0,r=r+Math.imul(x,Be)|0,h=h+Math.imul(x,Te)|0,o=o+Math.imul($,K)|0,r=r+Math.imul($,O)|0,r=r+Math.imul(H,K)|0,h=h+Math.imul(H,O)|0;var Ye=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ye,ee),r=Math.imul(ye,oe),r=r+Math.imul(Me,ee)|0,h=Math.imul(Me,oe),o=o+Math.imul(me,ie)|0,r=r+Math.imul(me,he)|0,r=r+Math.imul(ce,ie)|0,h=h+Math.imul(ce,he)|0,o=o+Math.imul(ue,ve)|0,r=r+Math.imul(ue,_e)|0,r=r+Math.imul(pe,ve)|0,h=h+Math.imul(pe,_e)|0,o=o+Math.imul(D,Ee)|0,r=r+Math.imul(D,Pe)|0,r=r+Math.imul(X,Ee)|0,h=h+Math.imul(X,Pe)|0,o=o+Math.imul(C,Be)|0,r=r+Math.imul(C,Te)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,Te)|0,o=o+Math.imul(J,K)|0,r=r+Math.imul(J,O)|0,r=r+Math.imul(x,K)|0,h=h+Math.imul(x,O)|0,o=o+Math.imul($,te)|0,r=r+Math.imul($,se)|0,r=r+Math.imul(H,te)|0,h=h+Math.imul(H,se)|0;var Je=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(be,ee),r=Math.imul(be,oe),r=r+Math.imul(Re,ee)|0,h=Math.imul(Re,oe),o=o+Math.imul(ye,ie)|0,r=r+Math.imul(ye,he)|0,r=r+Math.imul(Me,ie)|0,h=h+Math.imul(Me,he)|0,o=o+Math.imul(me,ve)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(ce,ve)|0,h=h+Math.imul(ce,_e)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(pe,Ee)|0,h=h+Math.imul(pe,Pe)|0,o=o+Math.imul(D,Be)|0,r=r+Math.imul(D,Te)|0,r=r+Math.imul(X,Be)|0,h=h+Math.imul(X,Te)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(C,O)|0,r=r+Math.imul(N,K)|0,h=h+Math.imul(N,O)|0,o=o+Math.imul(J,te)|0,r=r+Math.imul(J,se)|0,r=r+Math.imul(x,te)|0,h=h+Math.imul(x,se)|0,o=o+Math.imul($,de)|0,r=r+Math.imul($,qe)|0,r=r+Math.imul(H,de)|0,h=h+Math.imul(H,qe)|0;var Qe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(Se,ee),r=Math.imul(Se,oe),r=r+Math.imul(Ie,ee)|0,h=Math.imul(Ie,oe),o=o+Math.imul(be,ie)|0,r=r+Math.imul(be,he)|0,r=r+Math.imul(Re,ie)|0,h=h+Math.imul(Re,he)|0,o=o+Math.imul(ye,ve)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(Me,ve)|0,h=h+Math.imul(Me,_e)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(ce,Ee)|0,h=h+Math.imul(ce,Pe)|0,o=o+Math.imul(ue,Be)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(pe,Be)|0,h=h+Math.imul(pe,Te)|0,o=o+Math.imul(D,K)|0,r=r+Math.imul(D,O)|0,r=r+Math.imul(X,K)|0,h=h+Math.imul(X,O)|0,o=o+Math.imul(C,te)|0,r=r+Math.imul(C,se)|0,r=r+Math.imul(N,te)|0,h=h+Math.imul(N,se)|0,o=o+Math.imul(J,de)|0,r=r+Math.imul(J,qe)|0,r=r+Math.imul(x,de)|0,h=h+Math.imul(x,qe)|0,o=o+Math.imul($,xe)|0,r=r+Math.imul($,Ae)|0,r=r+Math.imul(H,xe)|0,h=h+Math.imul(H,Ae)|0;var er=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(Z,ee),r=Math.imul(Z,oe),r=r+Math.imul(L,ee)|0,h=Math.imul(L,oe),o=o+Math.imul(Se,ie)|0,r=r+Math.imul(Se,he)|0,r=r+Math.imul(Ie,ie)|0,h=h+Math.imul(Ie,he)|0,o=o+Math.imul(be,ve)|0,r=r+Math.imul(be,_e)|0,r=r+Math.imul(Re,ve)|0,h=h+Math.imul(Re,_e)|0,o=o+Math.imul(ye,Ee)|0,r=r+Math.imul(ye,Pe)|0,r=r+Math.imul(Me,Ee)|0,h=h+Math.imul(Me,Pe)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(ce,Be)|0,h=h+Math.imul(ce,Te)|0,o=o+Math.imul(ue,K)|0,r=r+Math.imul(ue,O)|0,r=r+Math.imul(pe,K)|0,h=h+Math.imul(pe,O)|0,o=o+Math.imul(D,te)|0,r=r+Math.imul(D,se)|0,r=r+Math.imul(X,te)|0,h=h+Math.imul(X,se)|0,o=o+Math.imul(C,de)|0,r=r+Math.imul(C,qe)|0,r=r+Math.imul(N,de)|0,h=h+Math.imul(N,qe)|0,o=o+Math.imul(J,xe)|0,r=r+Math.imul(J,Ae)|0,r=r+Math.imul(x,xe)|0,h=h+Math.imul(x,Ae)|0,o=o+Math.imul($,$e)|0,r=r+Math.imul($,ke)|0,r=r+Math.imul(H,$e)|0,h=h+Math.imul(H,ke)|0;var rr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(Z,ie),r=Math.imul(Z,he),r=r+Math.imul(L,ie)|0,h=Math.imul(L,he),o=o+Math.imul(Se,ve)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ie,ve)|0,h=h+Math.imul(Ie,_e)|0,o=o+Math.imul(be,Ee)|0,r=r+Math.imul(be,Pe)|0,r=r+Math.imul(Re,Ee)|0,h=h+Math.imul(Re,Pe)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(Me,Be)|0,h=h+Math.imul(Me,Te)|0,o=o+Math.imul(me,K)|0,r=r+Math.imul(me,O)|0,r=r+Math.imul(ce,K)|0,h=h+Math.imul(ce,O)|0,o=o+Math.imul(ue,te)|0,r=r+Math.imul(ue,se)|0,r=r+Math.imul(pe,te)|0,h=h+Math.imul(pe,se)|0,o=o+Math.imul(D,de)|0,r=r+Math.imul(D,qe)|0,r=r+Math.imul(X,de)|0,h=h+Math.imul(X,qe)|0,o=o+Math.imul(C,xe)|0,r=r+Math.imul(C,Ae)|0,r=r+Math.imul(N,xe)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(J,$e)|0,r=r+Math.imul(J,ke)|0,r=r+Math.imul(x,$e)|0,h=h+Math.imul(x,ke)|0;var tr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(Z,ve),r=Math.imul(Z,_e),r=r+Math.imul(L,ve)|0,h=Math.imul(L,_e),o=o+Math.imul(Se,Ee)|0,r=r+Math.imul(Se,Pe)|0,r=r+Math.imul(Ie,Ee)|0,h=h+Math.imul(Ie,Pe)|0,o=o+Math.imul(be,Be)|0,r=r+Math.imul(be,Te)|0,r=r+Math.imul(Re,Be)|0,h=h+Math.imul(Re,Te)|0,o=o+Math.imul(ye,K)|0,r=r+Math.imul(ye,O)|0,r=r+Math.imul(Me,K)|0,h=h+Math.imul(Me,O)|0,o=o+Math.imul(me,te)|0,r=r+Math.imul(me,se)|0,r=r+Math.imul(ce,te)|0,h=h+Math.imul(ce,se)|0,o=o+Math.imul(ue,de)|0,r=r+Math.imul(ue,qe)|0,r=r+Math.imul(pe,de)|0,h=h+Math.imul(pe,qe)|0,o=o+Math.imul(D,xe)|0,r=r+Math.imul(D,Ae)|0,r=r+Math.imul(X,xe)|0,h=h+Math.imul(X,Ae)|0,o=o+Math.imul(C,$e)|0,r=r+Math.imul(C,ke)|0,r=r+Math.imul(N,$e)|0,h=h+Math.imul(N,ke)|0;var ir=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(Z,Ee),r=Math.imul(Z,Pe),r=r+Math.imul(L,Ee)|0,h=Math.imul(L,Pe),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ie,Be)|0,h=h+Math.imul(Ie,Te)|0,o=o+Math.imul(be,K)|0,r=r+Math.imul(be,O)|0,r=r+Math.imul(Re,K)|0,h=h+Math.imul(Re,O)|0,o=o+Math.imul(ye,te)|0,r=r+Math.imul(ye,se)|0,r=r+Math.imul(Me,te)|0,h=h+Math.imul(Me,se)|0,o=o+Math.imul(me,de)|0,r=r+Math.imul(me,qe)|0,r=r+Math.imul(ce,de)|0,h=h+Math.imul(ce,qe)|0,o=o+Math.imul(ue,xe)|0,r=r+Math.imul(ue,Ae)|0,r=r+Math.imul(pe,xe)|0,h=h+Math.imul(pe,Ae)|0,o=o+Math.imul(D,$e)|0,r=r+Math.imul(D,ke)|0,r=r+Math.imul(X,$e)|0,h=h+Math.imul(X,ke)|0;var nr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(Z,Be),r=Math.imul(Z,Te),r=r+Math.imul(L,Be)|0,h=Math.imul(L,Te),o=o+Math.imul(Se,K)|0,r=r+Math.imul(Se,O)|0,r=r+Math.imul(Ie,K)|0,h=h+Math.imul(Ie,O)|0,o=o+Math.imul(be,te)|0,r=r+Math.imul(be,se)|0,r=r+Math.imul(Re,te)|0,h=h+Math.imul(Re,se)|0,o=o+Math.imul(ye,de)|0,r=r+Math.imul(ye,qe)|0,r=r+Math.imul(Me,de)|0,h=h+Math.imul(Me,qe)|0,o=o+Math.imul(me,xe)|0,r=r+Math.imul(me,Ae)|0,r=r+Math.imul(ce,xe)|0,h=h+Math.imul(ce,Ae)|0,o=o+Math.imul(ue,$e)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(pe,$e)|0,h=h+Math.imul(pe,ke)|0;var ar=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(Z,K),r=Math.imul(Z,O),r=r+Math.imul(L,K)|0,h=Math.imul(L,O),o=o+Math.imul(Se,te)|0,r=r+Math.imul(Se,se)|0,r=r+Math.imul(Ie,te)|0,h=h+Math.imul(Ie,se)|0,o=o+Math.imul(be,de)|0,r=r+Math.imul(be,qe)|0,r=r+Math.imul(Re,de)|0,h=h+Math.imul(Re,qe)|0,o=o+Math.imul(ye,xe)|0,r=r+Math.imul(ye,Ae)|0,r=r+Math.imul(Me,xe)|0,h=h+Math.imul(Me,Ae)|0,o=o+Math.imul(me,$e)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(ce,$e)|0,h=h+Math.imul(ce,ke)|0;var fr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(Z,te),r=Math.imul(Z,se),r=r+Math.imul(L,te)|0,h=Math.imul(L,se),o=o+Math.imul(Se,de)|0,r=r+Math.imul(Se,qe)|0,r=r+Math.imul(Ie,de)|0,h=h+Math.imul(Ie,qe)|0,o=o+Math.imul(be,xe)|0,r=r+Math.imul(be,Ae)|0,r=r+Math.imul(Re,xe)|0,h=h+Math.imul(Re,Ae)|0,o=o+Math.imul(ye,$e)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(Me,$e)|0,h=h+Math.imul(Me,ke)|0;var or=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(Z,de),r=Math.imul(Z,qe),r=r+Math.imul(L,de)|0,h=Math.imul(L,qe),o=o+Math.imul(Se,xe)|0,r=r+Math.imul(Se,Ae)|0,r=r+Math.imul(Ie,xe)|0,h=h+Math.imul(Ie,Ae)|0,o=o+Math.imul(be,$e)|0,r=r+Math.imul(be,ke)|0,r=r+Math.imul(Re,$e)|0,h=h+Math.imul(Re,ke)|0;var sr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(Z,xe),r=Math.imul(Z,Ae),r=r+Math.imul(L,xe)|0,h=Math.imul(L,Ae),o=o+Math.imul(Se,$e)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ie,$e)|0,h=h+Math.imul(Ie,ke)|0;var hr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,o=Math.imul(Z,$e),r=Math.imul(Z,ke),r=r+Math.imul(L,$e)|0,h=Math.imul(L,ke);var ur=(c+o|0)+((r&8191)<<13)|0;return c=(h+(r>>>13)|0)+(ur>>>26)|0,ur&=67108863,u[0]=We,u[1]=Ke,u[2]=Xe,u[3]=Ze,u[4]=Ve,u[5]=Ye,u[6]=Je,u[7]=Qe,u[8]=er,u[9]=rr,u[10]=tr,u[11]=ir,u[12]=nr,u[13]=ar,u[14]=fr,u[15]=or,u[16]=sr,u[17]=hr,u[18]=ur,c!==0&&(u[19]=c,n.length++),n};Math.imul||(S=R);function P(p,e,t){t.negative=e.negative^p.negative,t.length=p.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var c=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-p.length+1);r<=o;r++){var h=s-r,q=p.words[h]|0,$=e.words[r]|0,H=q*$,Y=H&67108863;u=u+(H/67108864|0)|0,Y=Y+c|0,c=Y&67108863,u=u+(Y>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=c,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function T(p,e,t){var n=new k;return n.mulp(p,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=S(this,e,t):f<63?n=R(this,e,t):f<1024?n=P(this,e,t):n=T(this,e,t),n};function k(p,e){this.x=p,this.y=e}k.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},k.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},k.prototype.permute=function(e,t,n,f,s,u){for(var c=0;c<u;c++)f[c]=t[e[c]],s[c]=n[e[c]]},k.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var c=1;c<s;c<<=1)for(var o=c<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),q=0;q<s;q+=o)for(var $=r,H=h,Y=0;Y<c;Y++){var J=n[q+Y],x=f[q+Y],I=n[q+Y+c],C=f[q+Y+c],N=$*I-H*C;C=$*C+H*I,I=N,n[q+Y]=J+I,f[q+Y]=x+C,n[q+Y+c]=J-I,f[q+Y+c]=x-C,Y!==o&&(N=r*$-h*H,H=r*H+h*$,$=N)}},k.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},k.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}},k.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},k.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;m(s===0),m((s&-8192)===0)},k.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},k.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),c=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),q=new Array(f),$=new Array(f),H=n.words;H.length=f,this.convert13b(e.words,e.length,c,f),this.convert13b(t.words,t.length,h,f),this.transform(c,u,o,r,f,s),this.transform(h,u,q,$,f,s);for(var Y=0;Y<f;Y++){var J=o[Y]*q[Y]-r[Y]*$[Y];r[Y]=o[Y]*$[Y]+r[Y]*q[Y],o[Y]=J}return this.conjugate(o,r,f),this.transform(o,r,H,u,f,s),this.conjugate(H,u,f),this.normalize13b(H,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),T(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){m(typeof e=="number"),m(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=B(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){m(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 c=this.words[s]&f,o=(this.words[s]|0)-c<<t;this.words[s]=o|u,u=c>>>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 m(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){m(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),c=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 q=this.words[r]|0;this.words[r]=h<<26-s|q>>>s,h=q&c}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 m(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){m(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){m(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(m(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 m(typeof e=="number"),m(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(m(typeof e=="number"),m(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,c=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+c;var o=(e.words[s]|0)*t;u-=o&67108863,c=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+c,c=u>>26,this.words[s+n]=u&67108863;if(c===0)return this.strip();for(m(c===-1),c=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+c,c=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,c=this._countBits(u);n=26-c,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 q=f.clone()._ishlnsubmul(s,1,o);q.negative===0&&(f=q,r&&(r.words[o]=1));for(var $=o-1;$>=0;$--){var H=(f.words[s.length+$]|0)*67108864+(f.words[s.length+$-1]|0);for(H=Math.min(H/u|0,67108863),f._ishlnsubmul(s,H,$);f.negative!==0;)H--,f.negative=0,f._ishlnsubmul(s,1,$),f.isZero()||(f.negative^=1);r&&(r.words[$]=H)}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(m(!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){m(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){m(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){m(e.negative===0),m(!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),c=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 q=0,$=1;(t.words[0]&$)===0&&q<26;++q,$<<=1);if(q>0)for(t.iushrn(q);q-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var H=0,Y=1;(n.words[0]&Y)===0&&H<26;++H,Y<<=1);if(H>0)for(n.iushrn(H);H-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(r),c.isub(h)),u.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(c)):(n.isub(t),u.isub(f),c.isub(s))}return{a:u,b:c,gcd:n.iushln(o)}},a.prototype._invmp=function(e){m(e.negative===0),m(!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 c=0,o=1;(t.words[0]&o)===0&&c<26;++c,o<<=1);if(c>0)for(t.iushrn(c);c-- >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 q;return t.cmpn(1)===0?q=f:q=s,q.cmpn(0)<0&&q.iadd(e),q},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){m(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 c=this.words[u]|0;c+=s,s=c>>>26,c&=67108863,this.words[u]=c}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),m(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 U(e)},a.prototype.toRed=function(e){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return m(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 m(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return m(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var z={k256:null,p224:null,p192:null,p25519:null};function j(p,e){this.name=p,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()}j.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},j.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},j.prototype.split=function(e,t){e.iushrn(this.n,0,t)},j.prototype.imulK=function(e){return e.imul(this.k)};function V(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}A(V,j),V.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 c=e.words[s]|0;e.words[s-10]=(c&n)<<4|u>>>22,u=c}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 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 Q(){j.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}A(Q,j);function ne(){j.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}A(ne,j);function ae(){j.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}A(ae,j),ae.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(z[e])return z[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 z[e]=t,t};function U(p){if(typeof p=="string"){var e=a._prime(p);this.m=e.p,this.prime=e}else m(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}U.prototype._verify1=function(e){m(e.negative===0,"red works only with positives"),m(e.red,"red works only with red numbers")},U.prototype._verify2=function(e,t){m((e.negative|t.negative)===0,"red works only with positives"),m(e.red&&e.red===t.red,"red works only with red numbers")},U.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},U.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},U.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)},U.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},U.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)},U.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},U.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},U.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},U.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},U.prototype.isqr=function(e){return this.imul(e,e.clone())},U.prototype.sqr=function(e){return this.mul(e,e)},U.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(m(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);m(!f.isZero());var u=new a(1).toRed(this),c=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(c)!==0;)r.redIAdd(c);for(var h=this.pow(r,f),q=this.pow(e,f.addn(1).iushrn(1)),$=this.pow(e,f),H=s;$.cmp(u)!==0;){for(var Y=$,J=0;Y.cmp(u)!==0;J++)Y=Y.redSqr();m(J<H);var x=this.pow(h,new a(1).iushln(H-J-1));q=q.redMul(x),h=x.redSqr(),$=$.redMul(h),H=J}return q},U.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},U.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],c=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],q=r-1;q>=0;q--){var $=h>>q&1;if(u!==f[0]&&(u=this.sqr(u)),$===0&&c===0){o=0;continue}c<<=1,c|=$,o++,!(o!==n&&(s!==0||q!==0))&&(u=this.mul(u,f[c]),o=0,c=0)}r=26}return u},U.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},U.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new fe(e)};function fe(p){U.call(this,p),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)}A(fe,U),fe.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},fe.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},fe.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)},fe.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)},fe.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(d,bn$6)})(bn$7)),bn$7.exports}var utils$2={},hasRequiredUtils$3;function requireUtils$3(){return hasRequiredUtils$3||(hasRequiredUtils$3=1,(function(d){var v=d;function E(a,_){if(Array.isArray(a))return a.slice();if(!a)return[];var g=[];if(typeof a!="string"){for(var b=0;b<a.length;b++)g[b]=a[b]|0;return g}if(_==="hex"){a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a);for(var b=0;b<a.length;b+=2)g.push(parseInt(a[b]+a[b+1],16))}else for(var b=0;b<a.length;b++){var w=a.charCodeAt(b),l=w>>8,M=w&255;l?g.push(l,M):g.push(M)}return g}v.toArray=E;function m(a){return a.length===1?"0"+a:a}v.zero2=m;function A(a){for(var _="",g=0;g<a.length;g++)_+=m(a[g].toString(16));return _}v.toHex=A,v.encode=function(_,g){return g==="hex"?A(_):_}})(utils$2)),utils$2}var hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,(function(d){var v=d,E=requireBn$3(),m=requireMinimalisticAssert(),A=requireUtils$3();v.assert=m,v.toArray=A.toArray,v.zero2=A.zero2,v.toHex=A.toHex,v.encode=A.encode;function a(l,M,y){var B=new Array(Math.max(l.bitLength(),y)+1),R;for(R=0;R<B.length;R+=1)B[R]=0;var S=1<<M+1,P=l.clone();for(R=0;R<B.length;R++){var T,k=P.andln(S-1);P.isOdd()?(k>(S>>1)-1?T=(S>>1)-k:T=k,P.isubn(T)):T=0,B[R]=T,P.iushrn(1)}return B}v.getNAF=a;function _(l,M){var y=[[],[]];l=l.clone(),M=M.clone();for(var B=0,R=0,S;l.cmpn(-B)>0||M.cmpn(-R)>0;){var P=l.andln(3)+B&3,T=M.andln(3)+R&3;P===3&&(P=-1),T===3&&(T=-1);var k;(P&1)===0?k=0:(S=l.andln(7)+B&7,(S===3||S===5)&&T===2?k=-P:k=P),y[0].push(k);var z;(T&1)===0?z=0:(S=M.andln(7)+R&7,(S===3||S===5)&&P===2?z=-T:z=T),y[1].push(z),2*B===k+1&&(B=1-B),2*R===z+1&&(R=1-R),l.iushrn(1),M.iushrn(1)}return y}v.getJSF=_;function g(l,M,y){var B="_"+M;l.prototype[M]=function(){return this[B]!==void 0?this[B]:this[B]=y.call(this)}}v.cachedProperty=g;function b(l){return typeof l=="string"?v.toArray(l,"hex"):l}v.parseBytes=b;function w(l){return new E(l,"hex","le")}v.intFromLE=w})(utils$3)),utils$3}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var d=requireBn$3(),v=requireUtils$2(),E=v.getNAF,m=v.getJSF,A=v.assert;function a(g,b){this.type=g,this.p=new d(b.p,16),this.red=b.prime?d.red(b.prime):d.mont(this.p),this.zero=new d(0).toRed(this.red),this.one=new d(1).toRed(this.red),this.two=new d(2).toRed(this.red),this.n=b.n&&new d(b.n,16),this.g=b.g&&this.pointFromJSON(b.g,b.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 w=this.n&&this.p.div(this.n);!w||w.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(b,w){A(b.precomputed);var l=b._getDoubles(),M=E(w,1,this._bitLength),y=(1<<l.step+1)-(l.step%2===0?2:1);y/=3;var B=[],R,S;for(R=0;R<M.length;R+=l.step){S=0;for(var P=R+l.step-1;P>=R;P--)S=(S<<1)+M[P];B.push(S)}for(var T=this.jpoint(null,null,null),k=this.jpoint(null,null,null),z=y;z>0;z--){for(R=0;R<B.length;R++)S=B[R],S===z?k=k.mixedAdd(l.points[R]):S===-z&&(k=k.mixedAdd(l.points[R].neg()));T=T.add(k)}return T.toP()},a.prototype._wnafMul=function(b,w){var l=4,M=b._getNAFPoints(l);l=M.wnd;for(var y=M.points,B=E(w,l,this._bitLength),R=this.jpoint(null,null,null),S=B.length-1;S>=0;S--){for(var P=0;S>=0&&B[S]===0;S--)P++;if(S>=0&&P++,R=R.dblp(P),S<0)break;var T=B[S];A(T!==0),b.type==="affine"?T>0?R=R.mixedAdd(y[T-1>>1]):R=R.mixedAdd(y[-T-1>>1].neg()):T>0?R=R.add(y[T-1>>1]):R=R.add(y[-T-1>>1].neg())}return b.type==="affine"?R.toP():R},a.prototype._wnafMulAdd=function(b,w,l,M,y){var B=this._wnafT1,R=this._wnafT2,S=this._wnafT3,P=0,T,k,z;for(T=0;T<M;T++){z=w[T];var j=z._getNAFPoints(b);B[T]=j.wnd,R[T]=j.points}for(T=M-1;T>=1;T-=2){var V=T-1,Q=T;if(B[V]!==1||B[Q]!==1){S[V]=E(l[V],B[V],this._bitLength),S[Q]=E(l[Q],B[Q],this._bitLength),P=Math.max(S[V].length,P),P=Math.max(S[Q].length,P);continue}var ne=[w[V],null,null,w[Q]];w[V].y.cmp(w[Q].y)===0?(ne[1]=w[V].add(w[Q]),ne[2]=w[V].toJ().mixedAdd(w[Q].neg())):w[V].y.cmp(w[Q].y.redNeg())===0?(ne[1]=w[V].toJ().mixedAdd(w[Q]),ne[2]=w[V].add(w[Q].neg())):(ne[1]=w[V].toJ().mixedAdd(w[Q]),ne[2]=w[V].toJ().mixedAdd(w[Q].neg()));var ae=[-3,-1,-5,-7,0,7,5,1,3],U=m(l[V],l[Q]);for(P=Math.max(U[0].length,P),S[V]=new Array(P),S[Q]=new Array(P),k=0;k<P;k++){var fe=U[0][k]|0,p=U[1][k]|0;S[V][k]=ae[(fe+1)*3+(p+1)],S[Q][k]=0,R[V]=ne}}var e=this.jpoint(null,null,null),t=this._wnafT4;for(T=P;T>=0;T--){for(var n=0;T>=0;){var f=!0;for(k=0;k<M;k++)t[k]=S[k][T]|0,t[k]!==0&&(f=!1);if(!f)break;n++,T--}if(T>=0&&n++,e=e.dblp(n),T<0)break;for(k=0;k<M;k++){var s=t[k];s!==0&&(s>0?z=R[k][s-1>>1]:s<0&&(z=R[k][-s-1>>1].neg()),z.type==="affine"?e=e.mixedAdd(z):e=e.add(z))}}for(T=0;T<M;T++)R[T]=null;return y?e:e.toP()};function _(g,b){this.curve=g,this.type=b,this.precomputed=null}return a.BasePoint=_,_.prototype.eq=function(){throw new Error("Not implemented")},_.prototype.validate=function(){return this.curve.validate(this)},a.prototype.decodePoint=function(b,w){b=v.toArray(b,w);var l=this.p.byteLength();if((b[0]===4||b[0]===6||b[0]===7)&&b.length-1===2*l){b[0]===6?A(b[b.length-1]%2===0):b[0]===7&&A(b[b.length-1]%2===1);var M=this.point(b.slice(1,1+l),b.slice(1+l,1+2*l));return M}else if((b[0]===2||b[0]===3)&&b.length-1===l)return this.pointFromX(b.slice(1,1+l),b[0]===3);throw new Error("Unknown point format")},_.prototype.encodeCompressed=function(b){return this.encode(b,!0)},_.prototype._encode=function(b){var w=this.curve.p.byteLength(),l=this.getX().toArray("be",w);return b?[this.getY().isEven()?2:3].concat(l):[4].concat(l,this.getY().toArray("be",w))},_.prototype.encode=function(b,w){return v.encode(this._encode(w),b)},_.prototype.precompute=function(b){if(this.precomputed)return this;var w={doubles:null,naf:null,beta:null};return w.naf=this._getNAFPoints(8),w.doubles=this._getDoubles(4,b),w.beta=this._getBeta(),this.precomputed=w,this},_.prototype._hasDoubles=function(b){if(!this.precomputed)return!1;var w=this.precomputed.doubles;return w?w.points.length>=Math.ceil((b.bitLength()+1)/w.step):!1},_.prototype._getDoubles=function(b,w){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var l=[this],M=this,y=0;y<w;y+=b){for(var B=0;B<b;B++)M=M.dbl();l.push(M)}return{step:b,points:l}},_.prototype._getNAFPoints=function(b){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var w=[this],l=(1<<b)-1,M=l===1?null:this.dbl(),y=1;y<l;y++)w[y]=w[y-1].add(M);return{wnd:b,points:w}},_.prototype._getBeta=function(){return null},_.prototype.dblp=function(b){for(var w=this,l=0;l<b;l++)w=w.dbl();return w},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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$1.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),inherits_browser$1.exports}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var d=requireUtils$2(),v=requireBn$3(),E=requireInherits_browser$1(),m=requireBase$1(),A=d.assert;function a(b){m.call(this,"short",b),this.a=new v(b.a,16).toRed(this.red),this.b=new v(b.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(b),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}E(a,m),short=a,a.prototype._getEndomorphism=function(w){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var l,M;if(w.beta)l=new v(w.beta,16).toRed(this.red);else{var y=this._getEndoRoots(this.p);l=y[0].cmp(y[1])<0?y[0]:y[1],l=l.toRed(this.red)}if(w.lambda)M=new v(w.lambda,16);else{var B=this._getEndoRoots(this.n);this.g.mul(B[0]).x.cmp(this.g.x.redMul(l))===0?M=B[0]:(M=B[1],A(this.g.mul(M).x.cmp(this.g.x.redMul(l))===0))}var R;return w.basis?R=w.basis.map(function(S){return{a:new v(S.a,16),b:new v(S.b,16)}}):R=this._getEndoBasis(M),{beta:l,lambda:M,basis:R}}},a.prototype._getEndoRoots=function(w){var l=w===this.p?this.red:v.mont(w),M=new v(2).toRed(l).redInvm(),y=M.redNeg(),B=new v(3).toRed(l).redNeg().redSqrt().redMul(M),R=y.redAdd(B).fromRed(),S=y.redSub(B).fromRed();return[R,S]},a.prototype._getEndoBasis=function(w){for(var l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),M=w,y=this.n.clone(),B=new v(1),R=new v(0),S=new v(0),P=new v(1),T,k,z,j,V,Q,ne,ae=0,U,fe;M.cmpn(0)!==0;){var p=y.div(M);U=y.sub(p.mul(M)),fe=S.sub(p.mul(B));var e=P.sub(p.mul(R));if(!z&&U.cmp(l)<0)T=ne.neg(),k=B,z=U.neg(),j=fe;else if(z&&++ae===2)break;ne=U,y=M,M=U,S=B,B=fe,P=R,R=e}V=U.neg(),Q=fe;var t=z.sqr().add(j.sqr()),n=V.sqr().add(Q.sqr());return n.cmp(t)>=0&&(V=T,Q=k),z.negative&&(z=z.neg(),j=j.neg()),V.negative&&(V=V.neg(),Q=Q.neg()),[{a:z,b:j},{a:V,b:Q}]},a.prototype._endoSplit=function(w){var l=this.endo.basis,M=l[0],y=l[1],B=y.b.mul(w).divRound(this.n),R=M.b.neg().mul(w).divRound(this.n),S=B.mul(M.a),P=R.mul(y.a),T=B.mul(M.b),k=R.mul(y.b),z=w.sub(S).sub(P),j=T.add(k).neg();return{k1:z,k2:j}},a.prototype.pointFromX=function(w,l){w=new v(w,16),w.red||(w=w.toRed(this.red));var M=w.redSqr().redMul(w).redIAdd(w.redMul(this.a)).redIAdd(this.b),y=M.redSqrt();if(y.redSqr().redSub(M).cmp(this.zero)!==0)throw new Error("invalid point");var B=y.fromRed().isOdd();return(l&&!B||!l&&B)&&(y=y.redNeg()),this.point(w,y)},a.prototype.validate=function(w){if(w.inf)return!0;var l=w.x,M=w.y,y=this.a.redMul(l),B=l.redSqr().redMul(l).redIAdd(y).redIAdd(this.b);return M.redSqr().redISub(B).cmpn(0)===0},a.prototype._endoWnafMulAdd=function(w,l,M){for(var y=this._endoWnafT1,B=this._endoWnafT2,R=0;R<w.length;R++){var S=this._endoSplit(l[R]),P=w[R],T=P._getBeta();S.k1.negative&&(S.k1.ineg(),P=P.neg(!0)),S.k2.negative&&(S.k2.ineg(),T=T.neg(!0)),y[R*2]=P,y[R*2+1]=T,B[R*2]=S.k1,B[R*2+1]=S.k2}for(var k=this._wnafMulAdd(1,y,B,R*2,M),z=0;z<R*2;z++)y[z]=null,B[z]=null;return k};function _(b,w,l,M){m.BasePoint.call(this,b,"affine"),w===null&&l===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new v(w,16),this.y=new v(l,16),M&&(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)}E(_,m.BasePoint),a.prototype.point=function(w,l,M){return new _(this,w,l,M)},a.prototype.pointFromJSON=function(w,l){return _.fromJSON(this,w,l)},_.prototype._getBeta=function(){if(this.curve.endo){var w=this.precomputed;if(w&&w.beta)return w.beta;var l=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(w){var M=this.curve,y=function(B){return M.point(B.x.redMul(M.endo.beta),B.y)};w.beta=l,l.precomputed={beta:null,naf:w.naf&&{wnd:w.naf.wnd,points:w.naf.points.map(y)},doubles:w.doubles&&{step:w.doubles.step,points:w.doubles.points.map(y)}}}return l}},_.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]},_.fromJSON=function(w,l,M){typeof l=="string"&&(l=JSON.parse(l));var y=w.point(l[0],l[1],M);if(!l[2])return y;function B(S){return w.point(S[0],S[1],M)}var R=l[2];return y.precomputed={beta:null,doubles:R.doubles&&{step:R.doubles.step,points:[y].concat(R.doubles.points.map(B))},naf:R.naf&&{wnd:R.naf.wnd,points:[y].concat(R.naf.points.map(B))}},y},_.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)+">"},_.prototype.isInfinity=function(){return this.inf},_.prototype.add=function(w){if(this.inf)return w;if(w.inf)return this;if(this.eq(w))return this.dbl();if(this.neg().eq(w))return this.curve.point(null,null);if(this.x.cmp(w.x)===0)return this.curve.point(null,null);var l=this.y.redSub(w.y);l.cmpn(0)!==0&&(l=l.redMul(this.x.redSub(w.x).redInvm()));var M=l.redSqr().redISub(this.x).redISub(w.x),y=l.redMul(this.x.redSub(M)).redISub(this.y);return this.curve.point(M,y)},_.prototype.dbl=function(){if(this.inf)return this;var w=this.y.redAdd(this.y);if(w.cmpn(0)===0)return this.curve.point(null,null);var l=this.curve.a,M=this.x.redSqr(),y=w.redInvm(),B=M.redAdd(M).redIAdd(M).redIAdd(l).redMul(y),R=B.redSqr().redISub(this.x.redAdd(this.x)),S=B.redMul(this.x.redSub(R)).redISub(this.y);return this.curve.point(R,S)},_.prototype.getX=function(){return this.x.fromRed()},_.prototype.getY=function(){return this.y.fromRed()},_.prototype.mul=function(w){return w=new v(w,16),this.isInfinity()?this:this._hasDoubles(w)?this.curve._fixedNafMul(this,w):this.curve.endo?this.curve._endoWnafMulAdd([this],[w]):this.curve._wnafMul(this,w)},_.prototype.mulAdd=function(w,l,M){var y=[this,l],B=[w,M];return this.curve.endo?this.curve._endoWnafMulAdd(y,B):this.curve._wnafMulAdd(1,y,B,2)},_.prototype.jmulAdd=function(w,l,M){var y=[this,l],B=[w,M];return this.curve.endo?this.curve._endoWnafMulAdd(y,B,!0):this.curve._wnafMulAdd(1,y,B,2,!0)},_.prototype.eq=function(w){return this===w||this.inf===w.inf&&(this.inf||this.x.cmp(w.x)===0&&this.y.cmp(w.y)===0)},_.prototype.neg=function(w){if(this.inf)return this;var l=this.curve.point(this.x,this.y.redNeg());if(w&&this.precomputed){var M=this.precomputed,y=function(B){return B.neg()};l.precomputed={naf:M.naf&&{wnd:M.naf.wnd,points:M.naf.points.map(y)},doubles:M.doubles&&{step:M.doubles.step,points:M.doubles.points.map(y)}}}return l},_.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var w=this.curve.jpoint(this.x,this.y,this.curve.one);return w};function g(b,w,l,M){m.BasePoint.call(this,b,"jacobian"),w===null&&l===null&&M===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new v(0)):(this.x=new v(w,16),this.y=new v(l,16),this.z=new v(M,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 E(g,m.BasePoint),a.prototype.jpoint=function(w,l,M){return new g(this,w,l,M)},g.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var w=this.z.redInvm(),l=w.redSqr(),M=this.x.redMul(l),y=this.y.redMul(l).redMul(w);return this.curve.point(M,y)},g.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},g.prototype.add=function(w){if(this.isInfinity())return w;if(w.isInfinity())return this;var l=w.z.redSqr(),M=this.z.redSqr(),y=this.x.redMul(l),B=w.x.redMul(M),R=this.y.redMul(l.redMul(w.z)),S=w.y.redMul(M.redMul(this.z)),P=y.redSub(B),T=R.redSub(S);if(P.cmpn(0)===0)return T.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var k=P.redSqr(),z=k.redMul(P),j=y.redMul(k),V=T.redSqr().redIAdd(z).redISub(j).redISub(j),Q=T.redMul(j.redISub(V)).redISub(R.redMul(z)),ne=this.z.redMul(w.z).redMul(P);return this.curve.jpoint(V,Q,ne)},g.prototype.mixedAdd=function(w){if(this.isInfinity())return w.toJ();if(w.isInfinity())return this;var l=this.z.redSqr(),M=this.x,y=w.x.redMul(l),B=this.y,R=w.y.redMul(l).redMul(this.z),S=M.redSub(y),P=B.redSub(R);if(S.cmpn(0)===0)return P.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var T=S.redSqr(),k=T.redMul(S),z=M.redMul(T),j=P.redSqr().redIAdd(k).redISub(z).redISub(z),V=P.redMul(z.redISub(j)).redISub(B.redMul(k)),Q=this.z.redMul(S);return this.curve.jpoint(j,V,Q)},g.prototype.dblp=function(w){if(w===0)return this;if(this.isInfinity())return this;if(!w)return this.dbl();var l;if(this.curve.zeroA||this.curve.threeA){var M=this;for(l=0;l<w;l++)M=M.dbl();return M}var y=this.curve.a,B=this.curve.tinv,R=this.x,S=this.y,P=this.z,T=P.redSqr().redSqr(),k=S.redAdd(S);for(l=0;l<w;l++){var z=R.redSqr(),j=k.redSqr(),V=j.redSqr(),Q=z.redAdd(z).redIAdd(z).redIAdd(y.redMul(T)),ne=R.redMul(j),ae=Q.redSqr().redISub(ne.redAdd(ne)),U=ne.redISub(ae),fe=Q.redMul(U);fe=fe.redIAdd(fe).redISub(V);var p=k.redMul(P);l+1<w&&(T=T.redMul(V)),R=ae,P=p,k=fe}return this.curve.jpoint(R,k.redMul(B),P)},g.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},g.prototype._zeroDbl=function(){var w,l,M;if(this.zOne){var y=this.x.redSqr(),B=this.y.redSqr(),R=B.redSqr(),S=this.x.redAdd(B).redSqr().redISub(y).redISub(R);S=S.redIAdd(S);var P=y.redAdd(y).redIAdd(y),T=P.redSqr().redISub(S).redISub(S),k=R.redIAdd(R);k=k.redIAdd(k),k=k.redIAdd(k),w=T,l=P.redMul(S.redISub(T)).redISub(k),M=this.y.redAdd(this.y)}else{var z=this.x.redSqr(),j=this.y.redSqr(),V=j.redSqr(),Q=this.x.redAdd(j).redSqr().redISub(z).redISub(V);Q=Q.redIAdd(Q);var ne=z.redAdd(z).redIAdd(z),ae=ne.redSqr(),U=V.redIAdd(V);U=U.redIAdd(U),U=U.redIAdd(U),w=ae.redISub(Q).redISub(Q),l=ne.redMul(Q.redISub(w)).redISub(U),M=this.y.redMul(this.z),M=M.redIAdd(M)}return this.curve.jpoint(w,l,M)},g.prototype._threeDbl=function(){var w,l,M;if(this.zOne){var y=this.x.redSqr(),B=this.y.redSqr(),R=B.redSqr(),S=this.x.redAdd(B).redSqr().redISub(y).redISub(R);S=S.redIAdd(S);var P=y.redAdd(y).redIAdd(y).redIAdd(this.curve.a),T=P.redSqr().redISub(S).redISub(S);w=T;var k=R.redIAdd(R);k=k.redIAdd(k),k=k.redIAdd(k),l=P.redMul(S.redISub(T)).redISub(k),M=this.y.redAdd(this.y)}else{var z=this.z.redSqr(),j=this.y.redSqr(),V=this.x.redMul(j),Q=this.x.redSub(z).redMul(this.x.redAdd(z));Q=Q.redAdd(Q).redIAdd(Q);var ne=V.redIAdd(V);ne=ne.redIAdd(ne);var ae=ne.redAdd(ne);w=Q.redSqr().redISub(ae),M=this.y.redAdd(this.z).redSqr().redISub(j).redISub(z);var U=j.redSqr();U=U.redIAdd(U),U=U.redIAdd(U),U=U.redIAdd(U),l=Q.redMul(ne.redISub(w)).redISub(U)}return this.curve.jpoint(w,l,M)},g.prototype._dbl=function(){var w=this.curve.a,l=this.x,M=this.y,y=this.z,B=y.redSqr().redSqr(),R=l.redSqr(),S=M.redSqr(),P=R.redAdd(R).redIAdd(R).redIAdd(w.redMul(B)),T=l.redAdd(l);T=T.redIAdd(T);var k=T.redMul(S),z=P.redSqr().redISub(k.redAdd(k)),j=k.redISub(z),V=S.redSqr();V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=P.redMul(j).redISub(V),ne=M.redAdd(M).redMul(y);return this.curve.jpoint(z,Q,ne)},g.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var w=this.x.redSqr(),l=this.y.redSqr(),M=this.z.redSqr(),y=l.redSqr(),B=w.redAdd(w).redIAdd(w),R=B.redSqr(),S=this.x.redAdd(l).redSqr().redISub(w).redISub(y);S=S.redIAdd(S),S=S.redAdd(S).redIAdd(S),S=S.redISub(R);var P=S.redSqr(),T=y.redIAdd(y);T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var k=B.redIAdd(S).redSqr().redISub(R).redISub(P).redISub(T),z=l.redMul(k);z=z.redIAdd(z),z=z.redIAdd(z);var j=this.x.redMul(P).redISub(z);j=j.redIAdd(j),j=j.redIAdd(j);var V=this.y.redMul(k.redMul(T.redISub(k)).redISub(S.redMul(P)));V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=this.z.redAdd(S).redSqr().redISub(M).redISub(P);return this.curve.jpoint(j,V,Q)},g.prototype.mul=function(w,l){return w=new v(w,l),this.curve._wnafMul(this,w)},g.prototype.eq=function(w){if(w.type==="affine")return this.eq(w.toJ());if(this===w)return!0;var l=this.z.redSqr(),M=w.z.redSqr();if(this.x.redMul(M).redISub(w.x.redMul(l)).cmpn(0)!==0)return!1;var y=l.redMul(this.z),B=M.redMul(w.z);return this.y.redMul(B).redISub(w.y.redMul(y)).cmpn(0)===0},g.prototype.eqXToP=function(w){var l=this.z.redSqr(),M=w.toRed(this.curve.red).redMul(l);if(this.x.cmp(M)===0)return!0;for(var y=w.clone(),B=this.curve.redN.redMul(l);;){if(y.iadd(this.curve.n),y.cmp(this.curve.p)>=0)return!1;if(M.redIAdd(B),this.x.cmp(M)===0)return!0}},g.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)+">"},g.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var d=requireBn$3(),v=requireInherits_browser$1(),E=requireBase$1(),m=requireUtils$2();function A(_){E.call(this,"mont",_),this.a=new d(_.a,16).toRed(this.red),this.b=new d(_.b,16).toRed(this.red),this.i4=new d(4).toRed(this.red).redInvm(),this.two=new d(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}v(A,E),mont=A,A.prototype.validate=function(g){var b=g.normalize().x,w=b.redSqr(),l=w.redMul(b).redAdd(w.redMul(this.a)).redAdd(b),M=l.redSqrt();return M.redSqr().cmp(l)===0};function a(_,g,b){E.BasePoint.call(this,_,"projective"),g===null&&b===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new d(g,16),this.z=new d(b,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return v(a,E.BasePoint),A.prototype.decodePoint=function(g,b){return this.point(m.toArray(g,b),1)},A.prototype.point=function(g,b){return new a(this,g,b)},A.prototype.pointFromJSON=function(g){return a.fromJSON(this,g)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(g,b){return new a(g,b[0],b[1]||g.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 g=this.x.redAdd(this.z),b=g.redSqr(),w=this.x.redSub(this.z),l=w.redSqr(),M=b.redSub(l),y=b.redMul(l),B=M.redMul(l.redAdd(this.curve.a24.redMul(M)));return this.curve.point(y,B)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(g,b){var w=this.x.redAdd(this.z),l=this.x.redSub(this.z),M=g.x.redAdd(g.z),y=g.x.redSub(g.z),B=y.redMul(w),R=M.redMul(l),S=b.z.redMul(B.redAdd(R).redSqr()),P=b.x.redMul(B.redISub(R).redSqr());return this.curve.point(S,P)},a.prototype.mul=function(g){for(var b=g.clone(),w=this,l=this.curve.point(null,null),M=this,y=[];b.cmpn(0)!==0;b.iushrn(1))y.push(b.andln(1));for(var B=y.length-1;B>=0;B--)y[B]===0?(w=w.diffAdd(l,M),l=l.dbl()):(l=w.diffAdd(l,M),w=w.dbl());return l},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(g){return this.getX().cmp(g.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 d=requireUtils$2(),v=requireBn$3(),E=requireInherits_browser$1(),m=requireBase$1(),A=d.assert;function a(g){this.twisted=(g.a|0)!==1,this.mOneA=this.twisted&&(g.a|0)===-1,this.extended=this.mOneA,m.call(this,"edwards",g),this.a=new v(g.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new v(g.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new v(g.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),A(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(g.c|0)===1}E(a,m),edwards=a,a.prototype._mulA=function(b){return this.mOneA?b.redNeg():this.a.redMul(b)},a.prototype._mulC=function(b){return this.oneC?b:this.c.redMul(b)},a.prototype.jpoint=function(b,w,l,M){return this.point(b,w,l,M)},a.prototype.pointFromX=function(b,w){b=new v(b,16),b.red||(b=b.toRed(this.red));var l=b.redSqr(),M=this.c2.redSub(this.a.redMul(l)),y=this.one.redSub(this.c2.redMul(this.d).redMul(l)),B=M.redMul(y.redInvm()),R=B.redSqrt();if(R.redSqr().redSub(B).cmp(this.zero)!==0)throw new Error("invalid point");var S=R.fromRed().isOdd();return(w&&!S||!w&&S)&&(R=R.redNeg()),this.point(b,R)},a.prototype.pointFromY=function(b,w){b=new v(b,16),b.red||(b=b.toRed(this.red));var l=b.redSqr(),M=l.redSub(this.c2),y=l.redMul(this.d).redMul(this.c2).redSub(this.a),B=M.redMul(y.redInvm());if(B.cmp(this.zero)===0){if(w)throw new Error("invalid point");return this.point(this.zero,b)}var R=B.redSqrt();if(R.redSqr().redSub(B).cmp(this.zero)!==0)throw new Error("invalid point");return R.fromRed().isOdd()!==w&&(R=R.redNeg()),this.point(R,b)},a.prototype.validate=function(b){if(b.isInfinity())return!0;b.normalize();var w=b.x.redSqr(),l=b.y.redSqr(),M=w.redMul(this.a).redAdd(l),y=this.c2.redMul(this.one.redAdd(this.d.redMul(w).redMul(l)));return M.cmp(y)===0};function _(g,b,w,l,M){m.BasePoint.call(this,g,"projective"),b===null&&w===null&&l===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 v(b,16),this.y=new v(w,16),this.z=l?new v(l,16):this.curve.one,this.t=M&&new v(M,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 E(_,m.BasePoint),a.prototype.pointFromJSON=function(b){return _.fromJSON(this,b)},a.prototype.point=function(b,w,l,M){return new _(this,b,w,l,M)},_.fromJSON=function(b,w){return new _(b,w[0],w[1],w[2])},_.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)+">"},_.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},_.prototype._extDbl=function(){var b=this.x.redSqr(),w=this.y.redSqr(),l=this.z.redSqr();l=l.redIAdd(l);var M=this.curve._mulA(b),y=this.x.redAdd(this.y).redSqr().redISub(b).redISub(w),B=M.redAdd(w),R=B.redSub(l),S=M.redSub(w),P=y.redMul(R),T=B.redMul(S),k=y.redMul(S),z=R.redMul(B);return this.curve.point(P,T,z,k)},_.prototype._projDbl=function(){var b=this.x.redAdd(this.y).redSqr(),w=this.x.redSqr(),l=this.y.redSqr(),M,y,B,R,S,P;if(this.curve.twisted){R=this.curve._mulA(w);var T=R.redAdd(l);this.zOne?(M=b.redSub(w).redSub(l).redMul(T.redSub(this.curve.two)),y=T.redMul(R.redSub(l)),B=T.redSqr().redSub(T).redSub(T)):(S=this.z.redSqr(),P=T.redSub(S).redISub(S),M=b.redSub(w).redISub(l).redMul(P),y=T.redMul(R.redSub(l)),B=T.redMul(P))}else R=w.redAdd(l),S=this.curve._mulC(this.z).redSqr(),P=R.redSub(S).redSub(S),M=this.curve._mulC(b.redISub(R)).redMul(P),y=this.curve._mulC(R).redMul(w.redISub(l)),B=R.redMul(P);return this.curve.point(M,y,B)},_.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},_.prototype._extAdd=function(b){var w=this.y.redSub(this.x).redMul(b.y.redSub(b.x)),l=this.y.redAdd(this.x).redMul(b.y.redAdd(b.x)),M=this.t.redMul(this.curve.dd).redMul(b.t),y=this.z.redMul(b.z.redAdd(b.z)),B=l.redSub(w),R=y.redSub(M),S=y.redAdd(M),P=l.redAdd(w),T=B.redMul(R),k=S.redMul(P),z=B.redMul(P),j=R.redMul(S);return this.curve.point(T,k,j,z)},_.prototype._projAdd=function(b){var w=this.z.redMul(b.z),l=w.redSqr(),M=this.x.redMul(b.x),y=this.y.redMul(b.y),B=this.curve.d.redMul(M).redMul(y),R=l.redSub(B),S=l.redAdd(B),P=this.x.redAdd(this.y).redMul(b.x.redAdd(b.y)).redISub(M).redISub(y),T=w.redMul(R).redMul(P),k,z;return this.curve.twisted?(k=w.redMul(S).redMul(y.redSub(this.curve._mulA(M))),z=R.redMul(S)):(k=w.redMul(S).redMul(y.redSub(M)),z=this.curve._mulC(R).redMul(S)),this.curve.point(T,k,z)},_.prototype.add=function(b){return this.isInfinity()?b:b.isInfinity()?this:this.curve.extended?this._extAdd(b):this._projAdd(b)},_.prototype.mul=function(b){return this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve._wnafMul(this,b)},_.prototype.mulAdd=function(b,w,l){return this.curve._wnafMulAdd(1,[this,w],[b,l],2,!1)},_.prototype.jmulAdd=function(b,w,l){return this.curve._wnafMulAdd(1,[this,w],[b,l],2,!0)},_.prototype.normalize=function(){if(this.zOne)return this;var b=this.z.redInvm();return this.x=this.x.redMul(b),this.y=this.y.redMul(b),this.t&&(this.t=this.t.redMul(b)),this.z=this.curve.one,this.zOne=!0,this},_.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},_.prototype.getX=function(){return this.normalize(),this.x.fromRed()},_.prototype.getY=function(){return this.normalize(),this.y.fromRed()},_.prototype.eq=function(b){return this===b||this.getX().cmp(b.getX())===0&&this.getY().cmp(b.getY())===0},_.prototype.eqXToP=function(b){var w=b.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(w)===0)return!0;for(var l=b.clone(),M=this.curve.redN.redMul(this.z);;){if(l.iadd(this.curve.n),l.cmp(this.curve.p)>=0)return!1;if(w.redIAdd(M),this.x.cmp(w)===0)return!0}},_.prototype.toP=_.prototype.normalize,_.prototype.mixedAdd=_.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,(function(d){var v=d;v.base=requireBase$1(),v.short=requireShort(),v.mont=requireMont(),v.edwards=requireEdwards()})(curve)),curve}var curves={},hash={},utils$1={},hasRequiredUtils$1;function requireUtils$1(){if(hasRequiredUtils$1)return utils$1;hasRequiredUtils$1=1;var d=requireMinimalisticAssert(),v=requireInherits_browser$8();utils$1.inherits=v;function E(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function m(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):E(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=m;function A(e){for(var t="",n=0;n<e.length;n++)t+=g(e[n].toString(16));return t}utils$1.toHex=A;function a(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}utils$1.htonl=a;function _(e,t){for(var n="",f=0;f<e.length;f++){var s=e[f];t==="little"&&(s=a(s)),n+=b(s.toString(16))}return n}utils$1.toHex32=_;function g(e){return e.length===1?"0"+e:e}utils$1.zero2=g;function b(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=b;function w(e,t,n,f){var s=n-t;d(s%4===0);for(var u=new Array(s/4),c=0,o=t;c<u.length;c++,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[c]=r>>>0}return u}utils$1.join32=w;function l(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=l;function M(e,t){return e>>>t|e<<32-t}utils$1.rotr32=M;function y(e,t){return e<<t|e>>>32-t}utils$1.rotl32=y;function B(e,t){return e+t>>>0}utils$1.sum32=B;function R(e,t,n){return e+t+n>>>0}utils$1.sum32_3=R;function S(e,t,n,f){return e+t+n+f>>>0}utils$1.sum32_4=S;function P(e,t,n,f,s){return e+t+n+f+s>>>0}utils$1.sum32_5=P;function T(e,t,n,f){var s=e[t],u=e[t+1],c=f+u>>>0,o=(c<f?1:0)+n+s;e[t]=o>>>0,e[t+1]=c}utils$1.sum64=T;function k(e,t,n,f){var s=t+f>>>0,u=(s<t?1:0)+e+n;return u>>>0}utils$1.sum64_hi=k;function z(e,t,n,f){var s=t+f;return s>>>0}utils$1.sum64_lo=z;function j(e,t,n,f,s,u,c,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 q=e+n+s+c+r;return q>>>0}utils$1.sum64_4_hi=j;function V(e,t,n,f,s,u,c,o){var r=t+f+u+o;return r>>>0}utils$1.sum64_4_lo=V;function Q(e,t,n,f,s,u,c,o,r,h){var q=0,$=t;$=$+f>>>0,q+=$<t?1:0,$=$+u>>>0,q+=$<u?1:0,$=$+o>>>0,q+=$<o?1:0,$=$+h>>>0,q+=$<h?1:0;var H=e+n+s+c+r+q;return H>>>0}utils$1.sum64_5_hi=Q;function ne(e,t,n,f,s,u,c,o,r,h){var q=t+f+u+o+h;return q>>>0}utils$1.sum64_5_lo=ne;function ae(e,t,n){var f=t<<32-n|e>>>n;return f>>>0}utils$1.rotr64_hi=ae;function U(e,t,n){var f=e<<32-n|t>>>n;return f>>>0}utils$1.rotr64_lo=U;function fe(e,t,n){return e>>>n}utils$1.shr64_hi=fe;function p(e,t,n){var f=e<<32-n|t>>>n;return f>>>0}return utils$1.shr64_lo=p,utils$1}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var d=requireUtils$1(),v=requireMinimalisticAssert();function E(){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=E,E.prototype.update=function(A,a){if(A=d.toArray(A,a),this.pending?this.pending=this.pending.concat(A):this.pending=A,this.pendingTotal+=A.length,this.pending.length>=this._delta8){A=this.pending;var _=A.length%this._delta8;this.pending=A.slice(A.length-_,A.length),this.pending.length===0&&(this.pending=null),A=d.join32(A,0,A.length-_,this.endian);for(var g=0;g<A.length;g+=this._delta32)this._update(A,g,g+this._delta32)}return this},E.prototype.digest=function(A){return this.update(this._pad()),v(this.pending===null),this._digest(A)},E.prototype._pad=function(){var A=this.pendingTotal,a=this._delta8,_=a-(A+this.padLength)%a,g=new Array(_+this.padLength);g[0]=128;for(var b=1;b<_;b++)g[b]=0;if(A<<=3,this.endian==="big"){for(var w=8;w<this.padLength;w++)g[b++]=0;g[b++]=0,g[b++]=0,g[b++]=0,g[b++]=0,g[b++]=A>>>24&255,g[b++]=A>>>16&255,g[b++]=A>>>8&255,g[b++]=A&255}else for(g[b++]=A&255,g[b++]=A>>>8&255,g[b++]=A>>>16&255,g[b++]=A>>>24&255,g[b++]=0,g[b++]=0,g[b++]=0,g[b++]=0,w=8;w<this.padLength;w++)g[b++]=0;return g},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var d=requireUtils$1(),v=d.rotr32;function E(l,M,y,B){if(l===0)return m(M,y,B);if(l===1||l===3)return a(M,y,B);if(l===2)return A(M,y,B)}common.ft_1=E;function m(l,M,y){return l&M^~l&y}common.ch32=m;function A(l,M,y){return l&M^l&y^M&y}common.maj32=A;function a(l,M,y){return l^M^y}common.p32=a;function _(l){return v(l,2)^v(l,13)^v(l,22)}common.s0_256=_;function g(l){return v(l,6)^v(l,11)^v(l,25)}common.s1_256=g;function b(l){return v(l,7)^v(l,18)^l>>>3}common.g0_256=b;function w(l){return v(l,17)^v(l,19)^l>>>10}return common.g1_256=w,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var d=requireUtils$1(),v=requireCommon$1(),E=requireCommon(),m=d.rotl32,A=d.sum32,a=d.sum32_5,_=E.ft_1,g=v.BlockHash,b=[1518500249,1859775393,2400959708,3395469782];function w(){if(!(this instanceof w))return new w;g.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return d.inherits(w,g),_1=w,w.blockSize=512,w.outSize=160,w.hmacStrength=80,w.padLength=64,w.prototype._update=function(M,y){for(var B=this.W,R=0;R<16;R++)B[R]=M[y+R];for(;R<B.length;R++)B[R]=m(B[R-3]^B[R-8]^B[R-14]^B[R-16],1);var S=this.h[0],P=this.h[1],T=this.h[2],k=this.h[3],z=this.h[4];for(R=0;R<B.length;R++){var j=~~(R/20),V=a(m(S,5),_(j,P,T,k),z,B[R],b[j]);z=k,k=T,T=m(P,30),P=S,S=V}this.h[0]=A(this.h[0],S),this.h[1]=A(this.h[1],P),this.h[2]=A(this.h[2],T),this.h[3]=A(this.h[3],k),this.h[4]=A(this.h[4],z)},w.prototype._digest=function(M){return M==="hex"?d.toHex32(this.h,"big"):d.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var d=requireUtils$1(),v=requireCommon$1(),E=requireCommon(),m=requireMinimalisticAssert(),A=d.sum32,a=d.sum32_4,_=d.sum32_5,g=E.ch32,b=E.maj32,w=E.s0_256,l=E.s1_256,M=E.g0_256,y=E.g1_256,B=v.BlockHash,R=[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 S(){if(!(this instanceof S))return new S;B.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=R,this.W=new Array(64)}return d.inherits(S,B),_256=S,S.blockSize=512,S.outSize=256,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(T,k){for(var z=this.W,j=0;j<16;j++)z[j]=T[k+j];for(;j<z.length;j++)z[j]=a(y(z[j-2]),z[j-7],M(z[j-15]),z[j-16]);var V=this.h[0],Q=this.h[1],ne=this.h[2],ae=this.h[3],U=this.h[4],fe=this.h[5],p=this.h[6],e=this.h[7];for(m(this.k.length===z.length),j=0;j<z.length;j++){var t=_(e,l(U),g(U,fe,p),this.k[j],z[j]),n=A(w(V),b(V,Q,ne));e=p,p=fe,fe=U,U=A(ae,t),ae=ne,ne=Q,Q=V,V=A(t,n)}this.h[0]=A(this.h[0],V),this.h[1]=A(this.h[1],Q),this.h[2]=A(this.h[2],ne),this.h[3]=A(this.h[3],ae),this.h[4]=A(this.h[4],U),this.h[5]=A(this.h[5],fe),this.h[6]=A(this.h[6],p),this.h[7]=A(this.h[7],e)},S.prototype._digest=function(T){return T==="hex"?d.toHex32(this.h,"big"):d.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var d=requireUtils$1(),v=require_256();function E(){if(!(this instanceof E))return new E;v.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return d.inherits(E,v),_224=E,E.blockSize=512,E.outSize=224,E.hmacStrength=192,E.padLength=64,E.prototype._digest=function(A){return A==="hex"?d.toHex32(this.h.slice(0,7),"big"):d.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var d=requireUtils$1(),v=requireCommon$1(),E=requireMinimalisticAssert(),m=d.rotr64_hi,A=d.rotr64_lo,a=d.shr64_hi,_=d.shr64_lo,g=d.sum64,b=d.sum64_hi,w=d.sum64_lo,l=d.sum64_4_hi,M=d.sum64_4_lo,y=d.sum64_5_hi,B=d.sum64_5_lo,R=v.BlockHash,S=[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 P(){if(!(this instanceof P))return new P;R.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=S,this.W=new Array(160)}d.inherits(P,R),_512=P,P.blockSize=1024,P.outSize=512,P.hmacStrength=192,P.padLength=128,P.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 c=p(s[u-4],s[u-3]),o=e(s[u-4],s[u-3]),r=s[u-14],h=s[u-13],q=U(s[u-30],s[u-29]),$=fe(s[u-30],s[u-29]),H=s[u-32],Y=s[u-31];s[u]=l(c,o,r,h,q,$,H,Y),s[u+1]=M(c,o,r,h,q,$,H,Y)}},P.prototype._update=function(n,f){this._prepareBlock(n,f);var s=this.W,u=this.h[0],c=this.h[1],o=this.h[2],r=this.h[3],h=this.h[4],q=this.h[5],$=this.h[6],H=this.h[7],Y=this.h[8],J=this.h[9],x=this.h[10],I=this.h[11],C=this.h[12],N=this.h[13],F=this.h[14],D=this.h[15];E(this.k.length===s.length);for(var X=0;X<s.length;X+=2){var le=F,ue=D,pe=ne(Y,J),Ce=ae(Y,J),me=T(Y,J,x,I,C),ce=k(Y,J,x,I,C,N),Ne=this.k[X],ye=this.k[X+1],Me=s[X],De=s[X+1],be=y(le,ue,pe,Ce,me,ce,Ne,ye,Me,De),Re=B(le,ue,pe,Ce,me,ce,Ne,ye,Me,De);le=V(u,c),ue=Q(u,c),pe=z(u,c,o,r,h),Ce=j(u,c,o,r,h,q);var je=b(le,ue,pe,Ce),Se=w(le,ue,pe,Ce);F=C,D=N,C=x,N=I,x=Y,I=J,Y=b($,H,be,Re),J=w(H,H,be,Re),$=h,H=q,h=o,q=r,o=u,r=c,u=b(be,Re,je,Se),c=w(be,Re,je,Se)}g(this.h,0,u,c),g(this.h,2,o,r),g(this.h,4,h,q),g(this.h,6,$,H),g(this.h,8,Y,J),g(this.h,10,x,I),g(this.h,12,C,N),g(this.h,14,F,D)},P.prototype._digest=function(n){return n==="hex"?d.toHex32(this.h,"big"):d.split32(this.h,"big")};function T(t,n,f,s,u){var c=t&f^~t&u;return c<0&&(c+=4294967296),c}function k(t,n,f,s,u,c){var o=n&s^~n&c;return o<0&&(o+=4294967296),o}function z(t,n,f,s,u){var c=t&f^t&u^f&u;return c<0&&(c+=4294967296),c}function j(t,n,f,s,u,c){var o=n&s^n&c^s&c;return o<0&&(o+=4294967296),o}function V(t,n){var f=m(t,n,28),s=m(n,t,2),u=m(n,t,7),c=f^s^u;return c<0&&(c+=4294967296),c}function Q(t,n){var f=A(t,n,28),s=A(n,t,2),u=A(n,t,7),c=f^s^u;return c<0&&(c+=4294967296),c}function ne(t,n){var f=m(t,n,14),s=m(t,n,18),u=m(n,t,9),c=f^s^u;return c<0&&(c+=4294967296),c}function ae(t,n){var f=A(t,n,14),s=A(t,n,18),u=A(n,t,9),c=f^s^u;return c<0&&(c+=4294967296),c}function U(t,n){var f=m(t,n,1),s=m(t,n,8),u=a(t,n,7),c=f^s^u;return c<0&&(c+=4294967296),c}function fe(t,n){var f=A(t,n,1),s=A(t,n,8),u=_(t,n,7),c=f^s^u;return c<0&&(c+=4294967296),c}function p(t,n){var f=m(t,n,19),s=m(n,t,29),u=a(t,n,6),c=f^s^u;return c<0&&(c+=4294967296),c}function e(t,n){var f=A(t,n,19),s=A(n,t,29),u=_(t,n,6),c=f^s^u;return c<0&&(c+=4294967296),c}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var d=requireUtils$1(),v=require_512();function E(){if(!(this instanceof E))return new E;v.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return d.inherits(E,v),_384=E,E.blockSize=1024,E.outSize=384,E.hmacStrength=192,E.padLength=128,E.prototype._digest=function(A){return A==="hex"?d.toHex32(this.h.slice(0,12),"big"):d.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 d=requireUtils$1(),v=requireCommon$1(),E=d.rotl32,m=d.sum32,A=d.sum32_3,a=d.sum32_4,_=v.BlockHash;function g(){if(!(this instanceof g))return new g;_.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}d.inherits(g,_),ripemd.ripemd160=g,g.blockSize=512,g.outSize=160,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(P,T){for(var k=this.h[0],z=this.h[1],j=this.h[2],V=this.h[3],Q=this.h[4],ne=k,ae=z,U=j,fe=V,p=Q,e=0;e<80;e++){var t=m(E(a(k,b(e,z,j,V),P[M[e]+T],w(e)),B[e]),Q);k=Q,Q=V,V=E(j,10),j=z,z=t,t=m(E(a(ne,b(79-e,ae,U,fe),P[y[e]+T],l(e)),R[e]),p),ne=p,p=fe,fe=E(U,10),U=ae,ae=t}t=A(this.h[1],j,fe),this.h[1]=A(this.h[2],V,p),this.h[2]=A(this.h[3],Q,ne),this.h[3]=A(this.h[4],k,ae),this.h[4]=A(this.h[0],z,U),this.h[0]=t},g.prototype._digest=function(P){return P==="hex"?d.toHex32(this.h,"little"):d.split32(this.h,"little")};function b(S,P,T,k){return S<=15?P^T^k:S<=31?P&T|~P&k:S<=47?(P|~T)^k:S<=63?P&k|T&~k:P^(T|~k)}function w(S){return S<=15?0:S<=31?1518500249:S<=47?1859775393:S<=63?2400959708:2840853838}function l(S){return S<=15?1352829926:S<=31?1548603684:S<=47?1836072691:S<=63?2053994217:0}var M=[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],y=[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],B=[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],R=[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 d=requireUtils$1(),v=requireMinimalisticAssert();function E(m,A,a){if(!(this instanceof E))return new E(m,A,a);this.Hash=m,this.blockSize=m.blockSize/8,this.outSize=m.outSize/8,this.inner=null,this.outer=null,this._init(d.toArray(A,a))}return hmac=E,E.prototype._init=function(A){A.length>this.blockSize&&(A=new this.Hash().update(A).digest()),v(A.length<=this.blockSize);for(var a=A.length;a<this.blockSize;a++)A.push(0);for(a=0;a<A.length;a++)A[a]^=54;for(this.inner=new this.Hash().update(A),a=0;a<A.length;a++)A[a]^=106;this.outer=new this.Hash().update(A)},E.prototype.update=function(A,a){return this.inner.update(A,a),this},E.prototype.digest=function(A){return this.outer.update(this.inner.digest()),this.outer.digest(A)},hmac}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,(function(d){var v=d;v.utils=requireUtils$1(),v.common=requireCommon$1(),v.sha=requireSha(),v.ripemd=requireRipemd(),v.hmac=requireHmac(),v.sha1=v.sha.sha1,v.sha256=v.sha.sha256,v.sha224=v.sha.sha224,v.sha384=v.sha.sha384,v.sha512=v.sha.sha512,v.ripemd160=v.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(d){var v=d,E=requireHash(),m=requireCurve(),A=requireUtils$2(),a=A.assert;function _(w){w.type==="short"?this.curve=new m.short(w):w.type==="edwards"?this.curve=new m.edwards(w):this.curve=new m.mont(w),this.g=this.curve.g,this.n=this.curve.n,this.hash=w.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}v.PresetCurve=_;function g(w,l){Object.defineProperty(v,w,{configurable:!0,enumerable:!0,get:function(){var M=new _(l);return Object.defineProperty(v,w,{configurable:!0,enumerable:!0,value:M}),M}})}g("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:E.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),g("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:E.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),g("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:E.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),g("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:E.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"]}),g("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:E.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"]}),g("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:E.sha256,gRed:!1,g:["9"]}),g("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:E.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var b;try{b=requireSecp256k1()}catch{b=void 0}g("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:E.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",b]})})(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var d=requireHash(),v=requireUtils$3(),E=requireMinimalisticAssert();function m(A){if(!(this instanceof m))return new m(A);this.hash=A.hash,this.predResist=!!A.predResist,this.outLen=this.hash.outSize,this.minEntropy=A.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var a=v.toArray(A.entropy,A.entropyEnc||"hex"),_=v.toArray(A.nonce,A.nonceEnc||"hex"),g=v.toArray(A.pers,A.persEnc||"hex");E(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(a,_,g)}return hmacDrbg=m,m.prototype._init=function(a,_,g){var b=a.concat(_).concat(g);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var w=0;w<this.V.length;w++)this.K[w]=0,this.V[w]=1;this._update(b),this._reseed=1,this.reseedInterval=281474976710656},m.prototype._hmac=function(){return new d.hmac(this.hash,this.K)},m.prototype._update=function(a){var _=this._hmac().update(this.V).update([0]);a&&(_=_.update(a)),this.K=_.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())},m.prototype.reseed=function(a,_,g,b){typeof _!="string"&&(b=g,g=_,_=null),a=v.toArray(a,_),g=v.toArray(g,b),E(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(a.concat(g||[])),this._reseed=1},m.prototype.generate=function(a,_,g,b){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof _!="string"&&(b=g,g=_,_=null),g&&(g=v.toArray(g,b||"hex"),this._update(g));for(var w=[];w.length<a;)this.V=this._hmac().update(this.V).digest(),w=w.concat(this.V);var l=w.slice(0,a);return this._update(g),this._reseed++,v.encode(l,_)},hmacDrbg}var key$1,hasRequiredKey$1;function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var d=requireBn$3(),v=requireUtils$2(),E=v.assert;function m(A,a){this.ec=A,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=m,m.fromPublic=function(a,_,g){return _ instanceof m?_:new m(a,{pub:_,pubEnc:g})},m.fromPrivate=function(a,_,g){return _ instanceof m?_:new m(a,{priv:_,privEnc:g})},m.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"}},m.prototype.getPublic=function(a,_){return typeof a=="string"&&(_=a,a=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),_?this.pub.encode(_,a):this.pub},m.prototype.getPrivate=function(a){return a==="hex"?this.priv.toString(16,2):this.priv},m.prototype._importPrivate=function(a,_){this.priv=new d(a,_||16),this.priv=this.priv.umod(this.ec.curve.n)},m.prototype._importPublic=function(a,_){if(a.x||a.y){this.ec.curve.type==="mont"?E(a.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&E(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,_)},m.prototype.derive=function(a){return a.validate()||E(a.validate(),"public point not validated"),a.mul(this.priv).getX()},m.prototype.sign=function(a,_,g){return this.ec.sign(a,this,_,g)},m.prototype.verify=function(a,_,g){return this.ec.verify(a,_,this,void 0,g)},m.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 d=requireBn$3(),v=requireUtils$2(),E=v.assert;function m(b,w){if(b instanceof m)return b;this._importDER(b,w)||(E(b.r&&b.s,"Signature without r or s"),this.r=new d(b.r,16),this.s=new d(b.s,16),b.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=b.recoveryParam)}signature$1=m;function A(){this.place=0}function a(b,w){var l=b[w.place++];if(!(l&128))return l;var M=l&15;if(M===0||M>4||b[w.place]===0)return!1;for(var y=0,B=0,R=w.place;B<M;B++,R++)y<<=8,y|=b[R],y>>>=0;return y<=127?!1:(w.place=R,y)}function _(b){for(var w=0,l=b.length-1;!b[w]&&!(b[w+1]&128)&&w<l;)w++;return w===0?b:b.slice(w)}m.prototype._importDER=function(w,l){w=v.toArray(w,l);var M=new A;if(w[M.place++]!==48)return!1;var y=a(w,M);if(y===!1||y+M.place!==w.length||w[M.place++]!==2)return!1;var B=a(w,M);if(B===!1||(w[M.place]&128)!==0)return!1;var R=w.slice(M.place,B+M.place);if(M.place+=B,w[M.place++]!==2)return!1;var S=a(w,M);if(S===!1||w.length!==S+M.place||(w[M.place]&128)!==0)return!1;var P=w.slice(M.place,S+M.place);if(R[0]===0)if(R[1]&128)R=R.slice(1);else return!1;if(P[0]===0)if(P[1]&128)P=P.slice(1);else return!1;return this.r=new d(R),this.s=new d(P),this.recoveryParam=null,!0};function g(b,w){if(w<128){b.push(w);return}var l=1+(Math.log(w)/Math.LN2>>>3);for(b.push(l|128);--l;)b.push(w>>>(l<<3)&255);b.push(w)}return m.prototype.toDER=function(w){var l=this.r.toArray(),M=this.s.toArray();for(l[0]&128&&(l=[0].concat(l)),M[0]&128&&(M=[0].concat(M)),l=_(l),M=_(M);!M[0]&&!(M[1]&128);)M=M.slice(1);var y=[2];g(y,l.length),y=y.concat(l),y.push(2),g(y,M.length);var B=y.concat(M),R=[48];return g(R,B.length),R=R.concat(B),v.encode(R,w)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var d=requireBn$3(),v=requireHmacDrbg(),E=requireUtils$2(),m=requireCurves(),A=requireBrorand(),a=E.assert,_=requireKey$1(),g=requireSignature$1();function b(w){if(!(this instanceof b))return new b(w);typeof w=="string"&&(a(Object.prototype.hasOwnProperty.call(m,w),"Unknown curve "+w),w=m[w]),w instanceof m.PresetCurve&&(w={curve:w}),this.curve=w.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=w.curve.g,this.g.precompute(w.curve.n.bitLength()+1),this.hash=w.hash||w.curve.hash}return ec=b,b.prototype.keyPair=function(l){return new _(this,l)},b.prototype.keyFromPrivate=function(l,M){return _.fromPrivate(this,l,M)},b.prototype.keyFromPublic=function(l,M){return _.fromPublic(this,l,M)},b.prototype.genKeyPair=function(l){l||(l={});for(var M=new v({hash:this.hash,pers:l.pers,persEnc:l.persEnc||"utf8",entropy:l.entropy||A(this.hash.hmacStrength),entropyEnc:l.entropy&&l.entropyEnc||"utf8",nonce:this.n.toArray()}),y=this.n.byteLength(),B=this.n.sub(new d(2));;){var R=new d(M.generate(y));if(!(R.cmp(B)>0))return R.iaddn(1),this.keyFromPrivate(R)}},b.prototype._truncateToN=function(l,M,y){var B;if(d.isBN(l)||typeof l=="number")l=new d(l,16),B=l.byteLength();else if(typeof l=="object")B=l.length,l=new d(l,16);else{var R=l.toString();B=R.length+1>>>1,l=new d(R,16)}typeof y!="number"&&(y=B*8);var S=y-this.n.bitLength();return S>0&&(l=l.ushrn(S)),!M&&l.cmp(this.n)>=0?l.sub(this.n):l},b.prototype.sign=function(l,M,y,B){if(typeof y=="object"&&(B=y,y=null),B||(B={}),typeof l!="string"&&typeof l!="number"&&!d.isBN(l)){a(typeof l=="object"&&l&&typeof l.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),a(l.length>>>0===l.length);for(var R=0;R<l.length;R++)a((l[R]&255)===l[R])}M=this.keyFromPrivate(M,y),l=this._truncateToN(l,!1,B.msgBitLength),a(!l.isNeg(),"Can not sign a negative message");var S=this.n.byteLength(),P=M.getPrivate().toArray("be",S),T=l.toArray("be",S);a(new d(T).eq(l),"Can not sign message");for(var k=new v({hash:this.hash,entropy:P,nonce:T,pers:B.pers,persEnc:B.persEnc||"utf8"}),z=this.n.sub(new d(1)),j=0;;j++){var V=B.k?B.k(j):new d(k.generate(this.n.byteLength()));if(V=this._truncateToN(V,!0),!(V.cmpn(1)<=0||V.cmp(z)>=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 U=V.invm(this.n).mul(ae.mul(M.getPrivate()).iadd(l));if(U=U.umod(this.n),U.cmpn(0)!==0){var fe=(Q.getY().isOdd()?1:0)|(ne.cmp(ae)!==0?2:0);return B.canonical&&U.cmp(this.nh)>0&&(U=this.n.sub(U),fe^=1),new g({r:ae,s:U,recoveryParam:fe})}}}}}},b.prototype.verify=function(l,M,y,B,R){R||(R={}),l=this._truncateToN(l,!1,R.msgBitLength),y=this.keyFromPublic(y,B),M=new g(M,"hex");var S=M.r,P=M.s;if(S.cmpn(1)<0||S.cmp(this.n)>=0||P.cmpn(1)<0||P.cmp(this.n)>=0)return!1;var T=P.invm(this.n),k=T.mul(l).umod(this.n),z=T.mul(S).umod(this.n),j;return this.curve._maxwellTrick?(j=this.g.jmulAdd(k,y.getPublic(),z),j.isInfinity()?!1:j.eqXToP(S)):(j=this.g.mulAdd(k,y.getPublic(),z),j.isInfinity()?!1:j.getX().umod(this.n).cmp(S)===0)},b.prototype.recoverPubKey=function(w,l,M,y){a((3&M)===M,"The recovery param is more than two bits"),l=new g(l,y);var B=this.n,R=new d(w),S=l.r,P=l.s,T=M&1,k=M>>1;if(S.cmp(this.curve.p.umod(this.curve.n))>=0&&k)throw new Error("Unable to find sencond key candinate");k?S=this.curve.pointFromX(S.add(this.curve.n),T):S=this.curve.pointFromX(S,T);var z=l.r.invm(B),j=B.sub(R).mul(z).umod(B),V=P.mul(z).umod(B);return this.g.mulAdd(j,S,V)},b.prototype.getKeyRecoveryParam=function(w,l,M,y){if(l=new g(l,y),l.recoveryParam!==null)return l.recoveryParam;for(var B=0;B<4;B++){var R;try{R=this.recoverPubKey(w,l,B)}catch{continue}if(R.eq(M))return B}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var d=requireUtils$2(),v=d.assert,E=d.parseBytes,m=d.cachedProperty;function A(a,_){this.eddsa=a,this._secret=E(_.secret),a.isPoint(_.pub)?this._pub=_.pub:this._pubBytes=E(_.pub)}return A.fromPublic=function(_,g){return g instanceof A?g:new A(_,{pub:g})},A.fromSecret=function(_,g){return g instanceof A?g:new A(_,{secret:g})},A.prototype.secret=function(){return this._secret},m(A,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),m(A,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),m(A,"privBytes",function(){var _=this.eddsa,g=this.hash(),b=_.encodingLength-1,w=g.slice(0,_.encodingLength);return w[0]&=248,w[b]&=127,w[b]|=64,w}),m(A,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),m(A,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),m(A,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),A.prototype.sign=function(_){return v(this._secret,"KeyPair can only verify"),this.eddsa.sign(_,this)},A.prototype.verify=function(_,g){return this.eddsa.verify(_,g,this)},A.prototype.getSecret=function(_){return v(this._secret,"KeyPair is public only"),d.encode(this.secret(),_)},A.prototype.getPublic=function(_){return d.encode(this.pubBytes(),_)},key=A,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var d=requireBn$3(),v=requireUtils$2(),E=v.assert,m=v.cachedProperty,A=v.parseBytes;function a(_,g){this.eddsa=_,typeof g!="object"&&(g=A(g)),Array.isArray(g)&&(E(g.length===_.encodingLength*2,"Signature has invalid size"),g={R:g.slice(0,_.encodingLength),S:g.slice(_.encodingLength)}),E(g.R&&g.S,"Signature without R or S"),_.isPoint(g.R)&&(this._R=g.R),g.S instanceof d&&(this._S=g.S),this._Rencoded=Array.isArray(g.R)?g.R:g.Rencoded,this._Sencoded=Array.isArray(g.S)?g.S:g.Sencoded}return m(a,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),m(a,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),m(a,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),m(a,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return v.encode(this.toBytes(),"hex").toUpperCase()},signature=a,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var d=requireHash(),v=requireCurves(),E=requireUtils$2(),m=E.assert,A=E.parseBytes,a=requireKey(),_=requireSignature();function g(b){if(m(b==="ed25519","only tested with ed25519 so far"),!(this instanceof g))return new g(b);b=v[b].curve,this.curve=b,this.g=b.g,this.g.precompute(b.n.bitLength()+1),this.pointClass=b.point().constructor,this.encodingLength=Math.ceil(b.n.bitLength()/8),this.hash=d.sha512}return eddsa=g,g.prototype.sign=function(w,l){w=A(w);var M=this.keyFromSecret(l),y=this.hashInt(M.messagePrefix(),w),B=this.g.mul(y),R=this.encodePoint(B),S=this.hashInt(R,M.pubBytes(),w).mul(M.priv()),P=y.add(S).umod(this.curve.n);return this.makeSignature({R:B,S:P,Rencoded:R})},g.prototype.verify=function(w,l,M){if(w=A(w),l=this.makeSignature(l),l.S().gte(l.eddsa.curve.n)||l.S().isNeg())return!1;var y=this.keyFromPublic(M),B=this.hashInt(l.Rencoded(),y.pubBytes(),w),R=this.g.mul(l.S()),S=l.R().add(y.pub().mul(B));return S.eq(R)},g.prototype.hashInt=function(){for(var w=this.hash(),l=0;l<arguments.length;l++)w.update(arguments[l]);return E.intFromLE(w.digest()).umod(this.curve.n)},g.prototype.keyFromPublic=function(w){return a.fromPublic(this,w)},g.prototype.keyFromSecret=function(w){return a.fromSecret(this,w)},g.prototype.makeSignature=function(w){return w instanceof _?w:new _(this,w)},g.prototype.encodePoint=function(w){var l=w.getY().toArray("le",this.encodingLength);return l[this.encodingLength-1]|=w.getX().isOdd()?128:0,l},g.prototype.decodePoint=function(w){w=E.parseBytes(w);var l=w.length-1,M=w.slice(0,l).concat(w[l]&-129),y=(w[l]&128)!==0,B=E.intFromLE(M);return this.curve.pointFromY(B,y)},g.prototype.encodeInt=function(w){return w.toArray("le",this.encodingLength)},g.prototype.decodeInt=function(w){return E.intFromLE(w)},g.prototype.isPoint=function(w){return w instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,(function(d){var v=d;v.version=require$$0$3.version,v.utils=requireUtils$2(),v.rand=requireBrorand(),v.curve=requireCurve(),v.curves=requireCurves(),v.ec=requireEc(),v.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(d){(function(v,E){function m(p,e){if(!p)throw new Error(e||"Assertion failed")}function A(p,e){p.super_=e;var t=function(){};t.prototype=e.prototype,p.prototype=new t,p.prototype.constructor=p}function a(p,e,t){if(a.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(p||0,e||10,t||"be"))}typeof v=="object"?v.exports=a:E.BN=a,a.BN=a,a.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=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),m(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):(m(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(m(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,c=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=26,s++);return this.strip()};function g(p,e){var t=p.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function b(p,e,t){var n=g(p,t);return t-1>=e&&(n|=g(p,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,c;if(n==="be")for(f=e.length-1;f>=t;f-=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8}this.strip()};function w(p,e,t,n){for(var f=0,s=Math.min(p.length,t),u=e;u<s;u++){var c=p.charCodeAt(u)-48;f*=n,c>=49?f+=c-49+10:c>=17?f+=c-17+10:f+=c}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,c=u%f,o=Math.min(u,u-c)+n,r=0,h=n;h<o;h+=f)r=w(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(c!==0){var q=1;for(r=w(e,h,e.length,t),h=0;h<c;h++)q*=t;this.imuln(q),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 l=["","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"],M=[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],y=[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 c=this.words[u],o=((c<<f|s)&16777215).toString(16);s=c>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=l[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=M[e],h=y[e];n="";var q=this.clone();for(q.negative=0;!q.isZero();){var $=q.modn(h).toString(e);q=q.idivn(h),q.isZero()?n=$+n:n=l[r-$.length]+$+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}m(!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&&m(!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 m(typeof _<"u"),this.toArrayLike(_,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);m(f<=s,"byte array longer than desired length"),m(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",c=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[r]=o;for(;r<s;r++)c[r]=0}else{for(r=0;r<s-f;r++)c[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[s-r-1]=o}return c},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 B(p){for(var e=new Array(p.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(p.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 m((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 m((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 m((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){m(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){m(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,c=0;c<s.length;c++)t=(f.words[c]|0)-(s.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;for(;u!==0&&c<f.length;c++)t=(f.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;if(u===0&&c<f.length&&f!==this)for(;c<f.length;c++)this.words[c]=f.words[c];return this.length=Math.max(this.length,c),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function R(p,e,t){t.negative=e.negative^p.negative;var n=p.length+e.length|0;t.length=n,n=n-1|0;var f=p.words[0]|0,s=e.words[0]|0,u=f*s,c=u&67108863,o=u/67108864|0;t.words[0]=c;for(var r=1;r<n;r++){for(var h=o>>>26,q=o&67108863,$=Math.min(r,e.length-1),H=Math.max(0,r-p.length+1);H<=$;H++){var Y=r-H|0;f=p.words[Y]|0,s=e.words[H]|0,u=f*s+q,h+=u/67108864|0,q=u&67108863}t.words[r]=q|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var S=function(e,t,n){var f=e.words,s=t.words,u=n.words,c=0,o,r,h,q=f[0]|0,$=q&8191,H=q>>>13,Y=f[1]|0,J=Y&8191,x=Y>>>13,I=f[2]|0,C=I&8191,N=I>>>13,F=f[3]|0,D=F&8191,X=F>>>13,le=f[4]|0,ue=le&8191,pe=le>>>13,Ce=f[5]|0,me=Ce&8191,ce=Ce>>>13,Ne=f[6]|0,ye=Ne&8191,Me=Ne>>>13,De=f[7]|0,be=De&8191,Re=De>>>13,je=f[8]|0,Se=je&8191,Ie=je>>>13,ze=f[9]|0,Z=ze&8191,L=ze>>>13,G=s[0]|0,ee=G&8191,oe=G>>>13,ge=s[1]|0,ie=ge&8191,he=ge>>>13,Oe=s[2]|0,ve=Oe&8191,_e=Oe>>>13,Le=s[3]|0,Ee=Le&8191,Pe=Le>>>13,He=s[4]|0,Be=He&8191,Te=He>>>13,Ge=s[5]|0,K=Ge&8191,O=Ge>>>13,W=s[6]|0,te=W&8191,se=W>>>13,we=s[7]|0,de=we&8191,qe=we>>>13,Ue=s[8]|0,xe=Ue&8191,Ae=Ue>>>13,Fe=s[9]|0,$e=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul($,ee),r=Math.imul($,oe),r=r+Math.imul(H,ee)|0,h=Math.imul(H,oe);var We=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(J,ee),r=Math.imul(J,oe),r=r+Math.imul(x,ee)|0,h=Math.imul(x,oe),o=o+Math.imul($,ie)|0,r=r+Math.imul($,he)|0,r=r+Math.imul(H,ie)|0,h=h+Math.imul(H,he)|0;var Ke=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(C,ee),r=Math.imul(C,oe),r=r+Math.imul(N,ee)|0,h=Math.imul(N,oe),o=o+Math.imul(J,ie)|0,r=r+Math.imul(J,he)|0,r=r+Math.imul(x,ie)|0,h=h+Math.imul(x,he)|0,o=o+Math.imul($,ve)|0,r=r+Math.imul($,_e)|0,r=r+Math.imul(H,ve)|0,h=h+Math.imul(H,_e)|0;var Xe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(D,ee),r=Math.imul(D,oe),r=r+Math.imul(X,ee)|0,h=Math.imul(X,oe),o=o+Math.imul(C,ie)|0,r=r+Math.imul(C,he)|0,r=r+Math.imul(N,ie)|0,h=h+Math.imul(N,he)|0,o=o+Math.imul(J,ve)|0,r=r+Math.imul(J,_e)|0,r=r+Math.imul(x,ve)|0,h=h+Math.imul(x,_e)|0,o=o+Math.imul($,Ee)|0,r=r+Math.imul($,Pe)|0,r=r+Math.imul(H,Ee)|0,h=h+Math.imul(H,Pe)|0;var Ze=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,ee),r=Math.imul(ue,oe),r=r+Math.imul(pe,ee)|0,h=Math.imul(pe,oe),o=o+Math.imul(D,ie)|0,r=r+Math.imul(D,he)|0,r=r+Math.imul(X,ie)|0,h=h+Math.imul(X,he)|0,o=o+Math.imul(C,ve)|0,r=r+Math.imul(C,_e)|0,r=r+Math.imul(N,ve)|0,h=h+Math.imul(N,_e)|0,o=o+Math.imul(J,Ee)|0,r=r+Math.imul(J,Pe)|0,r=r+Math.imul(x,Ee)|0,h=h+Math.imul(x,Pe)|0,o=o+Math.imul($,Be)|0,r=r+Math.imul($,Te)|0,r=r+Math.imul(H,Be)|0,h=h+Math.imul(H,Te)|0;var Ve=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,ee),r=Math.imul(me,oe),r=r+Math.imul(ce,ee)|0,h=Math.imul(ce,oe),o=o+Math.imul(ue,ie)|0,r=r+Math.imul(ue,he)|0,r=r+Math.imul(pe,ie)|0,h=h+Math.imul(pe,he)|0,o=o+Math.imul(D,ve)|0,r=r+Math.imul(D,_e)|0,r=r+Math.imul(X,ve)|0,h=h+Math.imul(X,_e)|0,o=o+Math.imul(C,Ee)|0,r=r+Math.imul(C,Pe)|0,r=r+Math.imul(N,Ee)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(J,Be)|0,r=r+Math.imul(J,Te)|0,r=r+Math.imul(x,Be)|0,h=h+Math.imul(x,Te)|0,o=o+Math.imul($,K)|0,r=r+Math.imul($,O)|0,r=r+Math.imul(H,K)|0,h=h+Math.imul(H,O)|0;var Ye=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ye,ee),r=Math.imul(ye,oe),r=r+Math.imul(Me,ee)|0,h=Math.imul(Me,oe),o=o+Math.imul(me,ie)|0,r=r+Math.imul(me,he)|0,r=r+Math.imul(ce,ie)|0,h=h+Math.imul(ce,he)|0,o=o+Math.imul(ue,ve)|0,r=r+Math.imul(ue,_e)|0,r=r+Math.imul(pe,ve)|0,h=h+Math.imul(pe,_e)|0,o=o+Math.imul(D,Ee)|0,r=r+Math.imul(D,Pe)|0,r=r+Math.imul(X,Ee)|0,h=h+Math.imul(X,Pe)|0,o=o+Math.imul(C,Be)|0,r=r+Math.imul(C,Te)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,Te)|0,o=o+Math.imul(J,K)|0,r=r+Math.imul(J,O)|0,r=r+Math.imul(x,K)|0,h=h+Math.imul(x,O)|0,o=o+Math.imul($,te)|0,r=r+Math.imul($,se)|0,r=r+Math.imul(H,te)|0,h=h+Math.imul(H,se)|0;var Je=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(be,ee),r=Math.imul(be,oe),r=r+Math.imul(Re,ee)|0,h=Math.imul(Re,oe),o=o+Math.imul(ye,ie)|0,r=r+Math.imul(ye,he)|0,r=r+Math.imul(Me,ie)|0,h=h+Math.imul(Me,he)|0,o=o+Math.imul(me,ve)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(ce,ve)|0,h=h+Math.imul(ce,_e)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(pe,Ee)|0,h=h+Math.imul(pe,Pe)|0,o=o+Math.imul(D,Be)|0,r=r+Math.imul(D,Te)|0,r=r+Math.imul(X,Be)|0,h=h+Math.imul(X,Te)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(C,O)|0,r=r+Math.imul(N,K)|0,h=h+Math.imul(N,O)|0,o=o+Math.imul(J,te)|0,r=r+Math.imul(J,se)|0,r=r+Math.imul(x,te)|0,h=h+Math.imul(x,se)|0,o=o+Math.imul($,de)|0,r=r+Math.imul($,qe)|0,r=r+Math.imul(H,de)|0,h=h+Math.imul(H,qe)|0;var Qe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(Se,ee),r=Math.imul(Se,oe),r=r+Math.imul(Ie,ee)|0,h=Math.imul(Ie,oe),o=o+Math.imul(be,ie)|0,r=r+Math.imul(be,he)|0,r=r+Math.imul(Re,ie)|0,h=h+Math.imul(Re,he)|0,o=o+Math.imul(ye,ve)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(Me,ve)|0,h=h+Math.imul(Me,_e)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(ce,Ee)|0,h=h+Math.imul(ce,Pe)|0,o=o+Math.imul(ue,Be)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(pe,Be)|0,h=h+Math.imul(pe,Te)|0,o=o+Math.imul(D,K)|0,r=r+Math.imul(D,O)|0,r=r+Math.imul(X,K)|0,h=h+Math.imul(X,O)|0,o=o+Math.imul(C,te)|0,r=r+Math.imul(C,se)|0,r=r+Math.imul(N,te)|0,h=h+Math.imul(N,se)|0,o=o+Math.imul(J,de)|0,r=r+Math.imul(J,qe)|0,r=r+Math.imul(x,de)|0,h=h+Math.imul(x,qe)|0,o=o+Math.imul($,xe)|0,r=r+Math.imul($,Ae)|0,r=r+Math.imul(H,xe)|0,h=h+Math.imul(H,Ae)|0;var er=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(Z,ee),r=Math.imul(Z,oe),r=r+Math.imul(L,ee)|0,h=Math.imul(L,oe),o=o+Math.imul(Se,ie)|0,r=r+Math.imul(Se,he)|0,r=r+Math.imul(Ie,ie)|0,h=h+Math.imul(Ie,he)|0,o=o+Math.imul(be,ve)|0,r=r+Math.imul(be,_e)|0,r=r+Math.imul(Re,ve)|0,h=h+Math.imul(Re,_e)|0,o=o+Math.imul(ye,Ee)|0,r=r+Math.imul(ye,Pe)|0,r=r+Math.imul(Me,Ee)|0,h=h+Math.imul(Me,Pe)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(ce,Be)|0,h=h+Math.imul(ce,Te)|0,o=o+Math.imul(ue,K)|0,r=r+Math.imul(ue,O)|0,r=r+Math.imul(pe,K)|0,h=h+Math.imul(pe,O)|0,o=o+Math.imul(D,te)|0,r=r+Math.imul(D,se)|0,r=r+Math.imul(X,te)|0,h=h+Math.imul(X,se)|0,o=o+Math.imul(C,de)|0,r=r+Math.imul(C,qe)|0,r=r+Math.imul(N,de)|0,h=h+Math.imul(N,qe)|0,o=o+Math.imul(J,xe)|0,r=r+Math.imul(J,Ae)|0,r=r+Math.imul(x,xe)|0,h=h+Math.imul(x,Ae)|0,o=o+Math.imul($,$e)|0,r=r+Math.imul($,ke)|0,r=r+Math.imul(H,$e)|0,h=h+Math.imul(H,ke)|0;var rr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(Z,ie),r=Math.imul(Z,he),r=r+Math.imul(L,ie)|0,h=Math.imul(L,he),o=o+Math.imul(Se,ve)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ie,ve)|0,h=h+Math.imul(Ie,_e)|0,o=o+Math.imul(be,Ee)|0,r=r+Math.imul(be,Pe)|0,r=r+Math.imul(Re,Ee)|0,h=h+Math.imul(Re,Pe)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(Me,Be)|0,h=h+Math.imul(Me,Te)|0,o=o+Math.imul(me,K)|0,r=r+Math.imul(me,O)|0,r=r+Math.imul(ce,K)|0,h=h+Math.imul(ce,O)|0,o=o+Math.imul(ue,te)|0,r=r+Math.imul(ue,se)|0,r=r+Math.imul(pe,te)|0,h=h+Math.imul(pe,se)|0,o=o+Math.imul(D,de)|0,r=r+Math.imul(D,qe)|0,r=r+Math.imul(X,de)|0,h=h+Math.imul(X,qe)|0,o=o+Math.imul(C,xe)|0,r=r+Math.imul(C,Ae)|0,r=r+Math.imul(N,xe)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(J,$e)|0,r=r+Math.imul(J,ke)|0,r=r+Math.imul(x,$e)|0,h=h+Math.imul(x,ke)|0;var tr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(Z,ve),r=Math.imul(Z,_e),r=r+Math.imul(L,ve)|0,h=Math.imul(L,_e),o=o+Math.imul(Se,Ee)|0,r=r+Math.imul(Se,Pe)|0,r=r+Math.imul(Ie,Ee)|0,h=h+Math.imul(Ie,Pe)|0,o=o+Math.imul(be,Be)|0,r=r+Math.imul(be,Te)|0,r=r+Math.imul(Re,Be)|0,h=h+Math.imul(Re,Te)|0,o=o+Math.imul(ye,K)|0,r=r+Math.imul(ye,O)|0,r=r+Math.imul(Me,K)|0,h=h+Math.imul(Me,O)|0,o=o+Math.imul(me,te)|0,r=r+Math.imul(me,se)|0,r=r+Math.imul(ce,te)|0,h=h+Math.imul(ce,se)|0,o=o+Math.imul(ue,de)|0,r=r+Math.imul(ue,qe)|0,r=r+Math.imul(pe,de)|0,h=h+Math.imul(pe,qe)|0,o=o+Math.imul(D,xe)|0,r=r+Math.imul(D,Ae)|0,r=r+Math.imul(X,xe)|0,h=h+Math.imul(X,Ae)|0,o=o+Math.imul(C,$e)|0,r=r+Math.imul(C,ke)|0,r=r+Math.imul(N,$e)|0,h=h+Math.imul(N,ke)|0;var ir=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(Z,Ee),r=Math.imul(Z,Pe),r=r+Math.imul(L,Ee)|0,h=Math.imul(L,Pe),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ie,Be)|0,h=h+Math.imul(Ie,Te)|0,o=o+Math.imul(be,K)|0,r=r+Math.imul(be,O)|0,r=r+Math.imul(Re,K)|0,h=h+Math.imul(Re,O)|0,o=o+Math.imul(ye,te)|0,r=r+Math.imul(ye,se)|0,r=r+Math.imul(Me,te)|0,h=h+Math.imul(Me,se)|0,o=o+Math.imul(me,de)|0,r=r+Math.imul(me,qe)|0,r=r+Math.imul(ce,de)|0,h=h+Math.imul(ce,qe)|0,o=o+Math.imul(ue,xe)|0,r=r+Math.imul(ue,Ae)|0,r=r+Math.imul(pe,xe)|0,h=h+Math.imul(pe,Ae)|0,o=o+Math.imul(D,$e)|0,r=r+Math.imul(D,ke)|0,r=r+Math.imul(X,$e)|0,h=h+Math.imul(X,ke)|0;var nr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(Z,Be),r=Math.imul(Z,Te),r=r+Math.imul(L,Be)|0,h=Math.imul(L,Te),o=o+Math.imul(Se,K)|0,r=r+Math.imul(Se,O)|0,r=r+Math.imul(Ie,K)|0,h=h+Math.imul(Ie,O)|0,o=o+Math.imul(be,te)|0,r=r+Math.imul(be,se)|0,r=r+Math.imul(Re,te)|0,h=h+Math.imul(Re,se)|0,o=o+Math.imul(ye,de)|0,r=r+Math.imul(ye,qe)|0,r=r+Math.imul(Me,de)|0,h=h+Math.imul(Me,qe)|0,o=o+Math.imul(me,xe)|0,r=r+Math.imul(me,Ae)|0,r=r+Math.imul(ce,xe)|0,h=h+Math.imul(ce,Ae)|0,o=o+Math.imul(ue,$e)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(pe,$e)|0,h=h+Math.imul(pe,ke)|0;var ar=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(Z,K),r=Math.imul(Z,O),r=r+Math.imul(L,K)|0,h=Math.imul(L,O),o=o+Math.imul(Se,te)|0,r=r+Math.imul(Se,se)|0,r=r+Math.imul(Ie,te)|0,h=h+Math.imul(Ie,se)|0,o=o+Math.imul(be,de)|0,r=r+Math.imul(be,qe)|0,r=r+Math.imul(Re,de)|0,h=h+Math.imul(Re,qe)|0,o=o+Math.imul(ye,xe)|0,r=r+Math.imul(ye,Ae)|0,r=r+Math.imul(Me,xe)|0,h=h+Math.imul(Me,Ae)|0,o=o+Math.imul(me,$e)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(ce,$e)|0,h=h+Math.imul(ce,ke)|0;var fr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(Z,te),r=Math.imul(Z,se),r=r+Math.imul(L,te)|0,h=Math.imul(L,se),o=o+Math.imul(Se,de)|0,r=r+Math.imul(Se,qe)|0,r=r+Math.imul(Ie,de)|0,h=h+Math.imul(Ie,qe)|0,o=o+Math.imul(be,xe)|0,r=r+Math.imul(be,Ae)|0,r=r+Math.imul(Re,xe)|0,h=h+Math.imul(Re,Ae)|0,o=o+Math.imul(ye,$e)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(Me,$e)|0,h=h+Math.imul(Me,ke)|0;var or=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(Z,de),r=Math.imul(Z,qe),r=r+Math.imul(L,de)|0,h=Math.imul(L,qe),o=o+Math.imul(Se,xe)|0,r=r+Math.imul(Se,Ae)|0,r=r+Math.imul(Ie,xe)|0,h=h+Math.imul(Ie,Ae)|0,o=o+Math.imul(be,$e)|0,r=r+Math.imul(be,ke)|0,r=r+Math.imul(Re,$e)|0,h=h+Math.imul(Re,ke)|0;var sr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(Z,xe),r=Math.imul(Z,Ae),r=r+Math.imul(L,xe)|0,h=Math.imul(L,Ae),o=o+Math.imul(Se,$e)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ie,$e)|0,h=h+Math.imul(Ie,ke)|0;var hr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,o=Math.imul(Z,$e),r=Math.imul(Z,ke),r=r+Math.imul(L,$e)|0,h=Math.imul(L,ke);var ur=(c+o|0)+((r&8191)<<13)|0;return c=(h+(r>>>13)|0)+(ur>>>26)|0,ur&=67108863,u[0]=We,u[1]=Ke,u[2]=Xe,u[3]=Ze,u[4]=Ve,u[5]=Ye,u[6]=Je,u[7]=Qe,u[8]=er,u[9]=rr,u[10]=tr,u[11]=ir,u[12]=nr,u[13]=ar,u[14]=fr,u[15]=or,u[16]=sr,u[17]=hr,u[18]=ur,c!==0&&(u[19]=c,n.length++),n};Math.imul||(S=R);function P(p,e,t){t.negative=e.negative^p.negative,t.length=p.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var c=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-p.length+1);r<=o;r++){var h=s-r,q=p.words[h]|0,$=e.words[r]|0,H=q*$,Y=H&67108863;u=u+(H/67108864|0)|0,Y=Y+c|0,c=Y&67108863,u=u+(Y>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=c,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function T(p,e,t){var n=new k;return n.mulp(p,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=S(this,e,t):f<63?n=R(this,e,t):f<1024?n=P(this,e,t):n=T(this,e,t),n};function k(p,e){this.x=p,this.y=e}k.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},k.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},k.prototype.permute=function(e,t,n,f,s,u){for(var c=0;c<u;c++)f[c]=t[e[c]],s[c]=n[e[c]]},k.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var c=1;c<s;c<<=1)for(var o=c<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),q=0;q<s;q+=o)for(var $=r,H=h,Y=0;Y<c;Y++){var J=n[q+Y],x=f[q+Y],I=n[q+Y+c],C=f[q+Y+c],N=$*I-H*C;C=$*C+H*I,I=N,n[q+Y]=J+I,f[q+Y]=x+C,n[q+Y+c]=J-I,f[q+Y+c]=x-C,Y!==o&&(N=r*$-h*H,H=r*H+h*$,$=N)}},k.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},k.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}},k.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},k.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;m(s===0),m((s&-8192)===0)},k.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},k.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),c=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),q=new Array(f),$=new Array(f),H=n.words;H.length=f,this.convert13b(e.words,e.length,c,f),this.convert13b(t.words,t.length,h,f),this.transform(c,u,o,r,f,s),this.transform(h,u,q,$,f,s);for(var Y=0;Y<f;Y++){var J=o[Y]*q[Y]-r[Y]*$[Y];r[Y]=o[Y]*$[Y]+r[Y]*q[Y],o[Y]=J}return this.conjugate(o,r,f),this.transform(o,r,H,u,f,s),this.conjugate(H,u,f),this.normalize13b(H,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),T(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){m(typeof e=="number"),m(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=B(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){m(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 c=this.words[s]&f,o=(this.words[s]|0)-c<<t;this.words[s]=o|u,u=c>>>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 m(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){m(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),c=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 q=this.words[r]|0;this.words[r]=h<<26-s|q>>>s,h=q&c}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 m(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){m(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){m(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(m(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 m(typeof e=="number"),m(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(m(typeof e=="number"),m(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,c=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+c;var o=(e.words[s]|0)*t;u-=o&67108863,c=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+c,c=u>>26,this.words[s+n]=u&67108863;if(c===0)return this.strip();for(m(c===-1),c=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+c,c=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,c=this._countBits(u);n=26-c,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 q=f.clone()._ishlnsubmul(s,1,o);q.negative===0&&(f=q,r&&(r.words[o]=1));for(var $=o-1;$>=0;$--){var H=(f.words[s.length+$]|0)*67108864+(f.words[s.length+$-1]|0);for(H=Math.min(H/u|0,67108863),f._ishlnsubmul(s,H,$);f.negative!==0;)H--,f.negative=0,f._ishlnsubmul(s,1,$),f.isZero()||(f.negative^=1);r&&(r.words[$]=H)}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(m(!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){m(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){m(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){m(e.negative===0),m(!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),c=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 q=0,$=1;(t.words[0]&$)===0&&q<26;++q,$<<=1);if(q>0)for(t.iushrn(q);q-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var H=0,Y=1;(n.words[0]&Y)===0&&H<26;++H,Y<<=1);if(H>0)for(n.iushrn(H);H-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(r),c.isub(h)),u.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(c)):(n.isub(t),u.isub(f),c.isub(s))}return{a:u,b:c,gcd:n.iushln(o)}},a.prototype._invmp=function(e){m(e.negative===0),m(!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 c=0,o=1;(t.words[0]&o)===0&&c<26;++c,o<<=1);if(c>0)for(t.iushrn(c);c-- >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 q;return t.cmpn(1)===0?q=f:q=s,q.cmpn(0)<0&&q.iadd(e),q},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){m(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 c=this.words[u]|0;c+=s,s=c>>>26,c&=67108863,this.words[u]=c}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),m(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 U(e)},a.prototype.toRed=function(e){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return m(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 m(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return m(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var z={k256:null,p224:null,p192:null,p25519:null};function j(p,e){this.name=p,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()}j.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},j.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},j.prototype.split=function(e,t){e.iushrn(this.n,0,t)},j.prototype.imulK=function(e){return e.imul(this.k)};function V(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}A(V,j),V.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 c=e.words[s]|0;e.words[s-10]=(c&n)<<4|u>>>22,u=c}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 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 Q(){j.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}A(Q,j);function ne(){j.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}A(ne,j);function ae(){j.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}A(ae,j),ae.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(z[e])return z[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 z[e]=t,t};function U(p){if(typeof p=="string"){var e=a._prime(p);this.m=e.p,this.prime=e}else m(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}U.prototype._verify1=function(e){m(e.negative===0,"red works only with positives"),m(e.red,"red works only with red numbers")},U.prototype._verify2=function(e,t){m((e.negative|t.negative)===0,"red works only with positives"),m(e.red&&e.red===t.red,"red works only with red numbers")},U.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},U.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},U.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)},U.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},U.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)},U.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},U.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},U.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},U.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},U.prototype.isqr=function(e){return this.imul(e,e.clone())},U.prototype.sqr=function(e){return this.mul(e,e)},U.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(m(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);m(!f.isZero());var u=new a(1).toRed(this),c=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(c)!==0;)r.redIAdd(c);for(var h=this.pow(r,f),q=this.pow(e,f.addn(1).iushrn(1)),$=this.pow(e,f),H=s;$.cmp(u)!==0;){for(var Y=$,J=0;Y.cmp(u)!==0;J++)Y=Y.redSqr();m(J<H);var x=this.pow(h,new a(1).iushln(H-J-1));q=q.redMul(x),h=x.redSqr(),$=$.redMul(h),H=J}return q},U.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},U.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],c=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],q=r-1;q>=0;q--){var $=h>>q&1;if(u!==f[0]&&(u=this.sqr(u)),$===0&&c===0){o=0;continue}c<<=1,c|=$,o++,!(o!==n&&(s!==0||q!==0))&&(u=this.mul(u,f[c]),o=0,c=0)}r=26}return u},U.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},U.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new fe(e)};function fe(p){U.call(this,p),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)}A(fe,U),fe.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},fe.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},fe.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)},fe.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)},fe.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(d,bn$4)})(bn$5)),bn$5.exports}var api$1={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,(function(exports$1){var indexOf=function(d,v){if(d.indexOf)return d.indexOf(v);for(var E=0;E<d.length;E++)if(d[E]===v)return E;return-1},Object_keys=function(d){if(Object.keys)return Object.keys(d);var v=[];for(var E in d)v.push(E);return v},forEach=function(d,v){if(d.forEach)return d.forEach(v);for(var E=0;E<d.length;E++)v(d[E],E,d)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(d,v,E){Object.defineProperty(d,v,{writable:!0,enumerable:!1,configurable:!0,value:E})}}catch{return function(v,E,m){v[E]=m}}})(),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(v){if(!(this instanceof Script))return new Script(v);this.code=v};Script.prototype.runInContext=function(d){if(!(d instanceof Context))throw new TypeError("needs a 'context' argument.");var v=document.createElement("iframe");v.style||(v.style={}),v.style.display="none",document.body.appendChild(v);var E=v.contentWindow,m=E.eval,A=E.execScript;!m&&A&&(A.call(E,"null"),m=E.eval),forEach(Object_keys(d),function(g){E[g]=d[g]}),forEach(globals,function(g){d[g]&&(E[g]=d[g])});var a=Object_keys(E),_=m.call(E,this.code);return forEach(Object_keys(E),function(g){(g in d||indexOf(a,g)===-1)&&(d[g]=E[g])}),forEach(globals,function(g){g in d||defineProp(d,g,E[g])}),document.body.removeChild(v),_},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(d){var v=Script.createContext(d),E=this.runInContext(v);return d&&forEach(Object_keys(v),function(m){d[m]=v[m]}),E},forEach(Object_keys(Script.prototype),function(d){exports$1[d]=Script[d]=function(v){var E=Script(v);return E[d].apply(E,[].slice.call(arguments,1))}}),exports$1.isContext=function(d){return d instanceof Context},exports$1.createScript=function(d){return exports$1.Script(d)},exports$1.createContext=Script.createContext=function(d){var v=new Context;return typeof d=="object"&&forEach(Object_keys(d),function(E){v[E]=d[E]}),v}})(vmBrowserify)),vmBrowserify}var hasRequiredApi;function requireApi(){return hasRequiredApi||(hasRequiredApi=1,(function(d){var v=requireAsn1$1(),E=requireInherits_browser$8(),m=d;m.define=function(_,g){return new A(_,g)};function A(a,_){this.name=a,this.body=_,this.decoders={},this.encoders={}}A.prototype._createNamed=function(_){var g;try{g=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) {
12
+ this._initNamed(entity);
13
+ })`)}catch{g=function(w){this._initNamed(w)}}return E(g,_),g.prototype._initNamed=function(w){_.call(this,w)},new g(this)},A.prototype._getDecoder=function(_){return _=_||"der",this.decoders.hasOwnProperty(_)||(this.decoders[_]=this._createNamed(v.decoders[_])),this.decoders[_]},A.prototype.decode=function(_,g,b){return this._getDecoder(g).decode(_,b)},A.prototype._getEncoder=function(_){return _=_||"der",this.encoders.hasOwnProperty(_)||(this.encoders[_]=this._createNamed(v.encoders[_])),this.encoders[_]},A.prototype.encode=function(_,g,b){return this._getEncoder(g).encode(_,b)}})(api$1)),api$1}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var d=requireInherits_browser$8();function v(m){this._reporterState={obj:null,path:[],options:m||{},errors:[]}}reporter.Reporter=v,v.prototype.isError=function(A){return A instanceof E},v.prototype.save=function(){var A=this._reporterState;return{obj:A.obj,pathLen:A.path.length}},v.prototype.restore=function(A){var a=this._reporterState;a.obj=A.obj,a.path=a.path.slice(0,A.pathLen)},v.prototype.enterKey=function(A){return this._reporterState.path.push(A)},v.prototype.exitKey=function(A){var a=this._reporterState;a.path=a.path.slice(0,A-1)},v.prototype.leaveKey=function(A,a,_){var g=this._reporterState;this.exitKey(A),g.obj!==null&&(g.obj[a]=_)},v.prototype.path=function(){return this._reporterState.path.join("/")},v.prototype.enterObject=function(){var A=this._reporterState,a=A.obj;return A.obj={},a},v.prototype.leaveObject=function(A){var a=this._reporterState,_=a.obj;return a.obj=A,_},v.prototype.error=function(A){var a,_=this._reporterState,g=A instanceof E;if(g?a=A:a=new E(_.path.map(function(b){return"["+JSON.stringify(b)+"]"}).join(""),A.message||A,A.stack),!_.options.partial)throw a;return g||_.errors.push(a),a},v.prototype.wrapResult=function(A){var a=this._reporterState;return a.options.partial?{result:this.isError(A)?null:A,errors:a.errors}:A};function E(m,A){this.path=m,this.rethrow(A)}return d(E,Error),E.prototype.rethrow=function(A){if(this.message=A+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,E),!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 d=requireInherits_browser$8(),v=requireBase().Reporter,E=requireDist().Buffer;function m(a,_){if(v.call(this,_),!E.isBuffer(a)){this.error("Input not Buffer");return}this.base=a,this.offset=0,this.length=a.length}d(m,v),buffer.DecoderBuffer=m,m.prototype.save=function(){return{offset:this.offset,reporter:v.prototype.save.call(this)}},m.prototype.restore=function(_){var g=new m(this.base);return g.offset=_.offset,g.length=this.offset,this.offset=_.offset,v.prototype.restore.call(this,_.reporter),g},m.prototype.isEmpty=function(){return this.offset===this.length},m.prototype.readUInt8=function(_){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(_||"DecoderBuffer overrun")},m.prototype.skip=function(_,g){if(!(this.offset+_<=this.length))return this.error(g||"DecoderBuffer overrun");var b=new m(this.base);return b._reporterState=this._reporterState,b.offset=this.offset,b.length=this.offset+_,this.offset+=_,b},m.prototype.raw=function(_){return this.base.slice(_?_.offset:this.offset,this.length)};function A(a,_){if(Array.isArray(a))this.length=0,this.value=a.map(function(g){return g instanceof A||(g=new A(g,_)),this.length+=g.length,g},this);else if(typeof a=="number"){if(!(0<=a&&a<=255))return _.error("non-byte EncoderBuffer value");this.value=a,this.length=1}else if(typeof a=="string")this.value=a,this.length=E.byteLength(a);else if(E.isBuffer(a))this.value=a,this.length=a.length;else return _.error("Unsupported type: "+typeof a)}return buffer.EncoderBuffer=A,A.prototype.join=function(_,g){return _||(_=new E(this.length)),g||(g=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(b){b.join(_,g),g+=b.length}):(typeof this.value=="number"?_[g]=this.value:typeof this.value=="string"?_.write(this.value,g):E.isBuffer(this.value)&&this.value.copy(_,g),g+=this.length)),_},buffer}var node,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node;hasRequiredNode=1;var d=requireBase().Reporter,v=requireBase().EncoderBuffer,E=requireBase().DecoderBuffer,m=requireMinimalisticAssert(),A=["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(A),_=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function g(w,l){var M={};this._baseState=M,M.enc=w,M.parent=l||null,M.children=null,M.tag=null,M.args=null,M.reverseArgs=null,M.choice=null,M.optional=!1,M.any=!1,M.obj=!1,M.use=null,M.useDecoder=null,M.key=null,M.default=null,M.explicit=null,M.implicit=null,M.contains=null,M.parent||(M.children=[],this._wrap())}node=g;var b=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return g.prototype.clone=function(){var l=this._baseState,M={};b.forEach(function(B){M[B]=l[B]});var y=new this.constructor(M.parent);return y._baseState=M,y},g.prototype._wrap=function(){var l=this._baseState;a.forEach(function(M){this[M]=function(){var B=new this.constructor(this);return l.children.push(B),B[M].apply(B,arguments)}},this)},g.prototype._init=function(l){var M=this._baseState;m(M.parent===null),l.call(this),M.children=M.children.filter(function(y){return y._baseState.parent===this},this),m.equal(M.children.length,1,"Root node can have only one child")},g.prototype._useArgs=function(l){var M=this._baseState,y=l.filter(function(B){return B instanceof this.constructor},this);l=l.filter(function(B){return!(B instanceof this.constructor)},this),y.length!==0&&(m(M.children===null),M.children=y,y.forEach(function(B){B._baseState.parent=this},this)),l.length!==0&&(m(M.args===null),M.args=l,M.reverseArgs=l.map(function(B){if(typeof B!="object"||B.constructor!==Object)return B;var R={};return Object.keys(B).forEach(function(S){S==(S|0)&&(S|=0);var P=B[S];R[P]=S}),R}))},_.forEach(function(w){g.prototype[w]=function(){var M=this._baseState;throw new Error(w+" not implemented for encoding: "+M.enc)}}),A.forEach(function(w){g.prototype[w]=function(){var M=this._baseState,y=Array.prototype.slice.call(arguments);return m(M.tag===null),M.tag=w,this._useArgs(y),this}}),g.prototype.use=function(l){m(l);var M=this._baseState;return m(M.use===null),M.use=l,this},g.prototype.optional=function(){var l=this._baseState;return l.optional=!0,this},g.prototype.def=function(l){var M=this._baseState;return m(M.default===null),M.default=l,M.optional=!0,this},g.prototype.explicit=function(l){var M=this._baseState;return m(M.explicit===null&&M.implicit===null),M.explicit=l,this},g.prototype.implicit=function(l){var M=this._baseState;return m(M.explicit===null&&M.implicit===null),M.implicit=l,this},g.prototype.obj=function(){var l=this._baseState,M=Array.prototype.slice.call(arguments);return l.obj=!0,M.length!==0&&this._useArgs(M),this},g.prototype.key=function(l){var M=this._baseState;return m(M.key===null),M.key=l,this},g.prototype.any=function(){var l=this._baseState;return l.any=!0,this},g.prototype.choice=function(l){var M=this._baseState;return m(M.choice===null),M.choice=l,this._useArgs(Object.keys(l).map(function(y){return l[y]})),this},g.prototype.contains=function(l){var M=this._baseState;return m(M.use===null),M.contains=l,this},g.prototype._decode=function(l,M){var y=this._baseState;if(y.parent===null)return l.wrapResult(y.children[0]._decode(l,M));var B=y.default,R=!0,S=null;if(y.key!==null&&(S=l.enterKey(y.key)),y.optional){var P=null;if(y.explicit!==null?P=y.explicit:y.implicit!==null?P=y.implicit:y.tag!==null&&(P=y.tag),P===null&&!y.any){var T=l.save();try{y.choice===null?this._decodeGeneric(y.tag,l,M):this._decodeChoice(l,M),R=!0}catch{R=!1}l.restore(T)}else if(R=this._peekTag(l,P,y.any),l.isError(R))return R}var k;if(y.obj&&R&&(k=l.enterObject()),R){if(y.explicit!==null){var z=this._decodeTag(l,y.explicit);if(l.isError(z))return z;l=z}var j=l.offset;if(y.use===null&&y.choice===null){if(y.any)var T=l.save();var V=this._decodeTag(l,y.implicit!==null?y.implicit:y.tag,y.any);if(l.isError(V))return V;y.any?B=l.raw(T):l=V}if(M&&M.track&&y.tag!==null&&M.track(l.path(),j,l.length,"tagged"),M&&M.track&&y.tag!==null&&M.track(l.path(),l.offset,l.length,"content"),y.any?B=B:y.choice===null?B=this._decodeGeneric(y.tag,l,M):B=this._decodeChoice(l,M),l.isError(B))return B;if(!y.any&&y.choice===null&&y.children!==null&&y.children.forEach(function(ae){ae._decode(l,M)}),y.contains&&(y.tag==="octstr"||y.tag==="bitstr")){var Q=new E(B);B=this._getUse(y.contains,l._reporterState.obj)._decode(Q,M)}}return y.obj&&R&&(B=l.leaveObject(k)),y.key!==null&&(B!==null||R===!0)?l.leaveKey(S,y.key,B):S!==null&&l.exitKey(S),B},g.prototype._decodeGeneric=function(l,M,y){var B=this._baseState;return l==="seq"||l==="set"?null:l==="seqof"||l==="setof"?this._decodeList(M,l,B.args[0],y):/str$/.test(l)?this._decodeStr(M,l,y):l==="objid"&&B.args?this._decodeObjid(M,B.args[0],B.args[1],y):l==="objid"?this._decodeObjid(M,null,null,y):l==="gentime"||l==="utctime"?this._decodeTime(M,l,y):l==="null_"?this._decodeNull(M,y):l==="bool"?this._decodeBool(M,y):l==="objDesc"?this._decodeStr(M,l,y):l==="int"||l==="enum"?this._decodeInt(M,B.args&&B.args[0],y):B.use!==null?this._getUse(B.use,M._reporterState.obj)._decode(M,y):M.error("unknown tag: "+l)},g.prototype._getUse=function(l,M){var y=this._baseState;return y.useDecoder=this._use(l,M),m(y.useDecoder._baseState.parent===null),y.useDecoder=y.useDecoder._baseState.children[0],y.implicit!==y.useDecoder._baseState.implicit&&(y.useDecoder=y.useDecoder.clone(),y.useDecoder._baseState.implicit=y.implicit),y.useDecoder},g.prototype._decodeChoice=function(l,M){var y=this._baseState,B=null,R=!1;return Object.keys(y.choice).some(function(S){var P=l.save(),T=y.choice[S];try{var k=T._decode(l,M);if(l.isError(k))return!1;B={type:S,value:k},R=!0}catch{return l.restore(P),!1}return!0},this),R?B:l.error("Choice not matched")},g.prototype._createEncoderBuffer=function(l){return new v(l,this.reporter)},g.prototype._encode=function(l,M,y){var B=this._baseState;if(!(B.default!==null&&B.default===l)){var R=this._encodeValue(l,M,y);if(R!==void 0&&!this._skipDefault(R,M,y))return R}},g.prototype._encodeValue=function(l,M,y){var B=this._baseState;if(B.parent===null)return B.children[0]._encode(l,M||new d);var T=null;if(this.reporter=M,B.optional&&l===void 0)if(B.default!==null)l=B.default;else return;var R=null,S=!1;if(B.any)T=this._createEncoderBuffer(l);else if(B.choice)T=this._encodeChoice(l,M);else if(B.contains)R=this._getUse(B.contains,y)._encode(l,M),S=!0;else if(B.children)R=B.children.map(function(j){if(j._baseState.tag==="null_")return j._encode(null,M,l);if(j._baseState.key===null)return M.error("Child should have a key");var V=M.enterKey(j._baseState.key);if(typeof l!="object")return M.error("Child expected, but input is not object");var Q=j._encode(l[j._baseState.key],M,l);return M.leaveKey(V),Q},this).filter(function(j){return j}),R=this._createEncoderBuffer(R);else if(B.tag==="seqof"||B.tag==="setof"){if(!(B.args&&B.args.length===1))return M.error("Too many args for : "+B.tag);if(!Array.isArray(l))return M.error("seqof/setof, but data is not Array");var P=this.clone();P._baseState.implicit=null,R=this._createEncoderBuffer(l.map(function(j){var V=this._baseState;return this._getUse(V.args[0],l)._encode(j,M)},P))}else B.use!==null?T=this._getUse(B.use,y)._encode(l,M):(R=this._encodePrimitive(B.tag,l),S=!0);var T;if(!B.any&&B.choice===null){var k=B.implicit!==null?B.implicit:B.tag,z=B.implicit===null?"universal":"context";k===null?B.use===null&&M.error("Tag could be omitted only for .use()"):B.use===null&&(T=this._encodeComposite(k,S,z,R))}return B.explicit!==null&&(T=this._encodeComposite(B.explicit,!1,"context",T)),T},g.prototype._encodeChoice=function(l,M){var y=this._baseState,B=y.choice[l.type];return B||m(!1,l.type+" not found in "+JSON.stringify(Object.keys(y.choice))),B._encode(l.value,M)},g.prototype._encodePrimitive=function(l,M){var y=this._baseState;if(/str$/.test(l))return this._encodeStr(M,l);if(l==="objid"&&y.args)return this._encodeObjid(M,y.reverseArgs[0],y.args[1]);if(l==="objid")return this._encodeObjid(M,null,null);if(l==="gentime"||l==="utctime")return this._encodeTime(M,l);if(l==="null_")return this._encodeNull();if(l==="int"||l==="enum")return this._encodeInt(M,y.args&&y.reverseArgs[0]);if(l==="bool")return this._encodeBool(M);if(l==="objDesc")return this._encodeStr(M,l);throw new Error("Unsupported tag: "+l)},g.prototype._isNumstr=function(l){return/^[0-9 ]*$/.test(l)},g.prototype._isPrintstr=function(l){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(l)},node}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,(function(d){var v=d;v.Reporter=requireReporter().Reporter,v.DecoderBuffer=requireBuffer().DecoderBuffer,v.EncoderBuffer=requireBuffer().EncoderBuffer,v.Node=requireNode()})(base)),base}var constants$1={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,(function(d){var v=requireConstants$1();d.tagClass={0:"universal",1:"application",2:"context",3:"private"},d.tagClassByName=v._reverse(d.tagClass),d.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"},d.tagByName=v._reverse(d.tag)})(der)),der}var hasRequiredConstants$1;function requireConstants$1(){return hasRequiredConstants$1||(hasRequiredConstants$1=1,(function(d){var v=d;v._reverse=function(m){var A={};return Object.keys(m).forEach(function(a){(a|0)==a&&(a=a|0);var _=m[a];A[_]=a}),A},v.der=requireDer$2()})(constants$1)),constants$1}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var d=requireInherits_browser$8(),v=requireAsn1$1(),E=v.base,m=v.bignum,A=v.constants.der;function a(w){this.enc="der",this.name=w.name,this.entity=w,this.tree=new _,this.tree._init(w.body)}der_1$1=a,a.prototype.decode=function(l,M){return l instanceof E.DecoderBuffer||(l=new E.DecoderBuffer(l,M)),this.tree._decode(l,M)};function _(w){E.Node.call(this,"der",w)}d(_,E.Node),_.prototype._peekTag=function(l,M,y){if(l.isEmpty())return!1;var B=l.save(),R=g(l,'Failed to peek tag: "'+M+'"');return l.isError(R)?R:(l.restore(B),R.tag===M||R.tagStr===M||R.tagStr+"of"===M||y)},_.prototype._decodeTag=function(l,M,y){var B=g(l,'Failed to decode tag of "'+M+'"');if(l.isError(B))return B;var R=b(l,B.primitive,'Failed to get length of "'+M+'"');if(l.isError(R))return R;if(!y&&B.tag!==M&&B.tagStr!==M&&B.tagStr+"of"!==M)return l.error('Failed to match tag: "'+M+'"');if(B.primitive||R!==null)return l.skip(R,'Failed to match body of: "'+M+'"');var S=l.save(),P=this._skipUntilEnd(l,'Failed to skip indefinite length body: "'+this.tag+'"');return l.isError(P)?P:(R=l.offset-S.offset,l.restore(S),l.skip(R,'Failed to match body of: "'+M+'"'))},_.prototype._skipUntilEnd=function(l,M){for(;;){var y=g(l,M);if(l.isError(y))return y;var B=b(l,y.primitive,M);if(l.isError(B))return B;var R;if(y.primitive||B!==null?R=l.skip(B):R=this._skipUntilEnd(l,M),l.isError(R))return R;if(y.tagStr==="end")break}},_.prototype._decodeList=function(l,M,y,B){for(var R=[];!l.isEmpty();){var S=this._peekTag(l,"end");if(l.isError(S))return S;var P=y.decode(l,"der",B);if(l.isError(P)&&S)break;R.push(P)}return R},_.prototype._decodeStr=function(l,M){if(M==="bitstr"){var y=l.readUInt8();return l.isError(y)?y:{unused:y,data:l.raw()}}else if(M==="bmpstr"){var B=l.raw();if(B.length%2===1)return l.error("Decoding of string type: bmpstr length mismatch");for(var R="",S=0;S<B.length/2;S++)R+=String.fromCharCode(B.readUInt16BE(S*2));return R}else if(M==="numstr"){var P=l.raw().toString("ascii");return this._isNumstr(P)?P:l.error("Decoding of string type: numstr unsupported characters")}else{if(M==="octstr")return l.raw();if(M==="objDesc")return l.raw();if(M==="printstr"){var T=l.raw().toString("ascii");return this._isPrintstr(T)?T:l.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(M)?l.raw().toString():l.error("Decoding of string type: "+M+" unsupported")}},_.prototype._decodeObjid=function(l,M,y){for(var B,R=[],S=0;!l.isEmpty();){var P=l.readUInt8();S<<=7,S|=P&127,(P&128)===0&&(R.push(S),S=0)}P&128&&R.push(S);var T=R[0]/40|0,k=R[0]%40;if(y?B=R:B=[T,k].concat(R.slice(1)),M){var z=M[B.join(" ")];z===void 0&&(z=M[B.join(".")]),z!==void 0&&(B=z)}return B},_.prototype._decodeTime=function(l,M){var y=l.raw().toString();if(M==="gentime")var B=y.slice(0,4)|0,R=y.slice(4,6)|0,S=y.slice(6,8)|0,P=y.slice(8,10)|0,T=y.slice(10,12)|0,k=y.slice(12,14)|0;else if(M==="utctime"){var B=y.slice(0,2)|0,R=y.slice(2,4)|0,S=y.slice(4,6)|0,P=y.slice(6,8)|0,T=y.slice(8,10)|0,k=y.slice(10,12)|0;B<70?B=2e3+B:B=1900+B}else return l.error("Decoding "+M+" time is not supported yet");return Date.UTC(B,R-1,S,P,T,k,0)},_.prototype._decodeNull=function(l){return null},_.prototype._decodeBool=function(l){var M=l.readUInt8();return l.isError(M)?M:M!==0},_.prototype._decodeInt=function(l,M){var y=l.raw(),B=new m(y);return M&&(B=M[B.toString(10)]||B),B},_.prototype._use=function(l,M){return typeof l=="function"&&(l=l(M)),l._getDecoder("der").tree};function g(w,l){var M=w.readUInt8(l);if(w.isError(M))return M;var y=A.tagClass[M>>6],B=(M&32)===0;if((M&31)===31){var R=M;for(M=0;(R&128)===128;){if(R=w.readUInt8(l),w.isError(R))return R;M<<=7,M|=R&127}}else M&=31;var S=A.tag[M];return{cls:y,primitive:B,tag:M,tagStr:S}}function b(w,l,M){var y=w.readUInt8(M);if(w.isError(y))return y;if(!l&&y===128)return null;if((y&128)===0)return y;var B=y&127;if(B>4)return w.error("length octect is too long");y=0;for(var R=0;R<B;R++){y<<=8;var S=w.readUInt8(M);if(w.isError(S))return S;y|=S}return y}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var d=requireInherits_browser$8(),v=requireDist().Buffer,E=requireDer$1();function m(A){E.call(this,A),this.enc="pem"}return d(m,E),pem$1=m,m.prototype.decode=function(a,_){for(var g=a.toString().split(/[\r\n]+/g),b=_.label.toUpperCase(),w=/^-----(BEGIN|END) ([^-]+)-----$/,l=-1,M=-1,y=0;y<g.length;y++){var B=g[y].match(w);if(B!==null&&B[2]===b)if(l===-1){if(B[1]!=="BEGIN")break;l=y}else{if(B[1]!=="END")break;M=y;break}}if(l===-1||M===-1)throw new Error("PEM section not found for: "+b);var R=g.slice(l+1,M).join("");R.replace(/[^a-z0-9\+\/=]+/gi,"");var S=new v(R,"base64");return E.prototype.decode.call(this,S,_)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,(function(d){var v=d;v.der=requireDer$1(),v.pem=requirePem$1()})(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var d=requireInherits_browser$8(),v=requireDist().Buffer,E=requireAsn1$1(),m=E.base,A=E.constants.der;function a(w){this.enc="der",this.name=w.name,this.entity=w,this.tree=new _,this.tree._init(w.body)}der_1=a,a.prototype.encode=function(l,M){return this.tree._encode(l,M).join()};function _(w){m.Node.call(this,"der",w)}d(_,m.Node),_.prototype._encodeComposite=function(l,M,y,B){var R=b(l,M,y,this.reporter);if(B.length<128){var T=new v(2);return T[0]=R,T[1]=B.length,this._createEncoderBuffer([T,B])}for(var S=1,P=B.length;P>=256;P>>=8)S++;var T=new v(2+S);T[0]=R,T[1]=128|S;for(var P=1+S,k=B.length;k>0;P--,k>>=8)T[P]=k&255;return this._createEncoderBuffer([T,B])},_.prototype._encodeStr=function(l,M){if(M==="bitstr")return this._createEncoderBuffer([l.unused|0,l.data]);if(M==="bmpstr"){for(var y=new v(l.length*2),B=0;B<l.length;B++)y.writeUInt16BE(l.charCodeAt(B),B*2);return this._createEncoderBuffer(y)}else return M==="numstr"?this._isNumstr(l)?this._createEncoderBuffer(l):this.reporter.error("Encoding of string type: numstr supports only digits and space"):M==="printstr"?this._isPrintstr(l)?this._createEncoderBuffer(l):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(M)?this._createEncoderBuffer(l):M==="objDesc"?this._createEncoderBuffer(l):this.reporter.error("Encoding of string type: "+M+" unsupported")},_.prototype._encodeObjid=function(l,M,y){if(typeof l=="string"){if(!M)return this.reporter.error("string objid given, but no values map found");if(!M.hasOwnProperty(l))return this.reporter.error("objid not found in values map");l=M[l].split(/[\s\.]+/g);for(var B=0;B<l.length;B++)l[B]|=0}else if(Array.isArray(l)){l=l.slice();for(var B=0;B<l.length;B++)l[B]|=0}if(!Array.isArray(l))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(l));if(!y){if(l[1]>=40)return this.reporter.error("Second objid identifier OOB");l.splice(0,2,l[0]*40+l[1])}for(var R=0,B=0;B<l.length;B++){var S=l[B];for(R++;S>=128;S>>=7)R++}for(var P=new v(R),T=P.length-1,B=l.length-1;B>=0;B--){var S=l[B];for(P[T--]=S&127;(S>>=7)>0;)P[T--]=128|S&127}return this._createEncoderBuffer(P)};function g(w){return w<10?"0"+w:w}_.prototype._encodeTime=function(l,M){var y,B=new Date(l);return M==="gentime"?y=[g(B.getFullYear()),g(B.getUTCMonth()+1),g(B.getUTCDate()),g(B.getUTCHours()),g(B.getUTCMinutes()),g(B.getUTCSeconds()),"Z"].join(""):M==="utctime"?y=[g(B.getFullYear()%100),g(B.getUTCMonth()+1),g(B.getUTCDate()),g(B.getUTCHours()),g(B.getUTCMinutes()),g(B.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+M+" time is not supported yet"),this._encodeStr(y,"octstr")},_.prototype._encodeNull=function(){return this._createEncoderBuffer("")},_.prototype._encodeInt=function(l,M){if(typeof l=="string"){if(!M)return this.reporter.error("String int or enum given, but no values map");if(!M.hasOwnProperty(l))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(l));l=M[l]}if(typeof l!="number"&&!v.isBuffer(l)){var y=l.toArray();!l.sign&&y[0]&128&&y.unshift(0),l=new v(y)}if(v.isBuffer(l)){var B=l.length;l.length===0&&B++;var S=new v(B);return l.copy(S),l.length===0&&(S[0]=0),this._createEncoderBuffer(S)}if(l<128)return this._createEncoderBuffer(l);if(l<256)return this._createEncoderBuffer([0,l]);for(var B=1,R=l;R>=256;R>>=8)B++;for(var S=new Array(B),R=S.length-1;R>=0;R--)S[R]=l&255,l>>=8;return S[0]&128&&S.unshift(0),this._createEncoderBuffer(new v(S))},_.prototype._encodeBool=function(l){return this._createEncoderBuffer(l?255:0)},_.prototype._use=function(l,M){return typeof l=="function"&&(l=l(M)),l._getEncoder("der").tree},_.prototype._skipDefault=function(l,M,y){var B=this._baseState,R;if(B.default===null)return!1;var S=l.join();if(B.defaultBuffer===void 0&&(B.defaultBuffer=this._encodeValue(B.default,M,y).join()),S.length!==B.defaultBuffer.length)return!1;for(R=0;R<S.length;R++)if(S[R]!==B.defaultBuffer[R])return!1;return!0};function b(w,l,M,y){var B;if(w==="seqof"?w="seq":w==="setof"&&(w="set"),A.tagByName.hasOwnProperty(w))B=A.tagByName[w];else if(typeof w=="number"&&(w|0)===w)B=w;else return y.error("Unknown tag: "+w);return B>=31?y.error("Multi-octet tag encoding unsupported"):(l||(B|=32),B|=A.tagClassByName[M||"universal"]<<6,B)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var d=requireInherits_browser$8(),v=requireDer();function E(m){v.call(this,m),this.enc="pem"}return d(E,v),pem=E,E.prototype.encode=function(A,a){for(var _=v.prototype.encode.call(this,A),g=_.toString("base64"),b=["-----BEGIN "+a.label+"-----"],w=0;w<g.length;w+=64)b.push(g.slice(w,w+64));return b.push("-----END "+a.label+"-----"),b.join(`
14
+ `)},pem}var hasRequiredEncoders;function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,(function(d){var v=d;v.der=requireDer(),v.pem=requirePem()})(encoders)),encoders}var hasRequiredAsn1$1;function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,(function(d){var v=d;v.bignum=requireBn$2(),v.define=requireApi().define,v.base=requireBase(),v.constants=requireConstants$1(),v.decoders=requireDecoders(),v.encoders=requireEncoders()})(asn1)),asn1}var certificate,hasRequiredCertificate;function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var d=requireAsn1$1(),v=d.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),E=d.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),m=d.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),A=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(m),this.key("subjectPublicKey").bitstr())}),a=d.define("RelativeDistinguishedName",function(){this.setof(E)}),_=d.define("RDNSequence",function(){this.seqof(a)}),g=d.define("Name",function(){this.choice({rdnSequence:this.use(_)})}),b=d.define("Validity",function(){this.seq().obj(this.key("notBefore").use(v),this.key("notAfter").use(v))}),w=d.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),l=d.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(m),this.key("issuer").use(g),this.key("validity").use(b),this.key("subject").use(g),this.key("subjectPublicKeyInfo").use(A),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(w).optional())}),M=d.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(m),this.key("signatureValue").bitstr())});return certificate=M,certificate}var hasRequiredAsn1;function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var d=requireAsn1$1();asn1$1.certificate=requireCertificate();var v=d.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=v;var E=d.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});asn1$1.RSAPublicKey=E;var m=d.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())}),A=d.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(m),this.key("subjectPublicKey").bitstr())});asn1$1.PublicKey=A;var a=d.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(m),this.key("subjectPrivateKey").octstr())});asn1$1.PrivateKey=a;var _=d.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=_;var g=d.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=g,asn1$1.DSAparam=d.define("DSAparam",function(){this.int()});var b=d.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),w=d.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(b),this.key("publicKey").optional().explicit(1).bitstr())});return asn1$1.ECPrivateKey=w,asn1$1.signature=d.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 d=/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,v=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,E=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,m=requireEvp_bytestokey(),A=requireBrowser$8(),a=requireSafeBuffer$2().Buffer;return fixProc=function(_,g){var b=_.toString(),w=b.match(d),l;if(w){var y="aes"+w[1],B=a.from(w[2],"hex"),R=a.from(w[3].replace(/[\r\n]/g,""),"base64"),S=m(g,B.slice(0,8),parseInt(w[1],10)).key,P=[],T=A.createDecipheriv(y,S,B);P.push(T.update(R)),P.push(T.final()),l=a.concat(P)}else{var M=b.match(E);l=a.from(M[2].replace(/[\r\n]/g,""),"base64")}var k=b.match(v)[1];return{tag:k,data:l}},fixProc}var parseAsn1,hasRequiredParseAsn1;function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var d=requireAsn1(),v=require$$1$2,E=requireFixProc(),m=requireBrowser$8(),A=requireBrowser$9().pbkdf2Sync,a=requireSafeBuffer$2().Buffer;function _(b,w){var l=b.algorithm.decrypt.kde.kdeparams.salt,M=parseInt(b.algorithm.decrypt.kde.kdeparams.iters.toString(),10),y=v[b.algorithm.decrypt.cipher.algo.join(".")],B=b.algorithm.decrypt.cipher.iv,R=b.subjectPrivateKey,S=parseInt(y.split("-")[1],10)/8,P=A(w,l,M,S,"sha1"),T=m.createDecipheriv(y,P,B),k=[];return k.push(T.update(R)),k.push(T.final()),a.concat(k)}function g(b){var w;typeof b=="object"&&!a.isBuffer(b)&&(w=b.passphrase,b=b.key),typeof b=="string"&&(b=a.from(b));var l=E(b,w),M=l.tag,y=l.data,B,R;switch(M){case"CERTIFICATE":R=d.certificate.decode(y,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(R||(R=d.PublicKey.decode(y,"der")),B=R.algorithm.algorithm.join("."),B){case"1.2.840.113549.1.1.1":return d.RSAPublicKey.decode(R.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return R.subjectPrivateKey=R.subjectPublicKey,{type:"ec",data:R};case"1.2.840.10040.4.1":return R.algorithm.params.pub_key=d.DSAparam.decode(R.subjectPublicKey.data,"der"),{type:"dsa",data:R.algorithm.params};default:throw new Error("unknown key id "+B)}case"ENCRYPTED PRIVATE KEY":y=d.EncryptedPrivateKey.decode(y,"der"),y=_(y,w);case"PRIVATE KEY":switch(R=d.PrivateKey.decode(y,"der"),B=R.algorithm.algorithm.join("."),B){case"1.2.840.113549.1.1.1":return d.RSAPrivateKey.decode(R.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:R.algorithm.curve,privateKey:d.ECPrivateKey.decode(R.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return R.algorithm.params.priv_key=d.DSAparam.decode(R.subjectPrivateKey,"der"),{type:"dsa",params:R.algorithm.params};default:throw new Error("unknown key id "+B)}case"RSA PUBLIC KEY":return d.RSAPublicKey.decode(y,"der");case"RSA PRIVATE KEY":return d.RSAPrivateKey.decode(y,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:d.DSAPrivateKey.decode(y,"der")};case"EC PRIVATE KEY":return y=d.ECPrivateKey.decode(y,"der"),{curve:y.parameters.value,privateKey:y.privateKey};default:throw new Error("unknown key type "+M)}}return g.signature=d.signature,parseAsn1=g,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 d=requireSafeBuffer$2().Buffer,v=requireBrowser$a(),E=requireBrowserifyRsa(),m=requireElliptic().ec,A=requireBn$4(),a=requireParseAsn1(),_=require$$4,g=1;function b(T,k,z,j,V){var Q=a(k);if(Q.curve){if(j!=="ecdsa"&&j!=="ecdsa/rsa")throw new Error("wrong private key type");return w(T,Q)}else if(Q.type==="dsa"){if(j!=="dsa")throw new Error("wrong private key type");return l(T,Q,z)}if(j!=="rsa"&&j!=="ecdsa/rsa")throw new Error("wrong private key type");if(k.padding!==void 0&&k.padding!==g)throw new Error("illegal or unsupported padding mode");T=d.concat([V,T]);for(var ne=Q.modulus.byteLength(),ae=[0,1];T.length+ae.length+1<ne;)ae.push(255);ae.push(0);for(var U=-1;++U<T.length;)ae.push(T[U]);var fe=E(ae,Q);return fe}function w(T,k){var z=_[k.curve.join(".")];if(!z)throw new Error("unknown curve "+k.curve.join("."));var j=new m(z),V=j.keyFromPrivate(k.privateKey),Q=V.sign(T);return d.from(Q.toDER())}function l(T,k,z){for(var j=k.params.priv_key,V=k.params.p,Q=k.params.q,ne=k.params.g,ae=new A(0),U,fe=B(T,Q).mod(Q),p=!1,e=y(j,Q,T,z);p===!1;)U=S(Q,e,z),ae=P(ne,U,V,Q),p=U.invm(Q).imul(fe.add(j.mul(ae))).mod(Q),p.cmpn(0)===0&&(p=!1,ae=new A(0));return M(ae,p)}function M(T,k){T=T.toArray(),k=k.toArray(),T[0]&128&&(T=[0].concat(T)),k[0]&128&&(k=[0].concat(k));var z=T.length+k.length+4,j=[48,z,2,T.length];return j=j.concat(T,[2,k.length],k),d.from(j)}function y(T,k,z,j){if(T=d.from(T.toArray()),T.length<k.byteLength()){var V=d.alloc(k.byteLength()-T.length);T=d.concat([V,T])}var Q=z.length,ne=R(z,k),ae=d.alloc(Q);ae.fill(1);var U=d.alloc(Q);return U=v(j,U).update(ae).update(d.from([0])).update(T).update(ne).digest(),ae=v(j,U).update(ae).digest(),U=v(j,U).update(ae).update(d.from([1])).update(T).update(ne).digest(),ae=v(j,U).update(ae).digest(),{k:U,v:ae}}function B(T,k){var z=new A(T),j=(T.length<<3)-k.bitLength();return j>0&&z.ishrn(j),z}function R(T,k){T=B(T,k),T=T.mod(k);var z=d.from(T.toArray());if(z.length<k.byteLength()){var j=d.alloc(k.byteLength()-z.length);z=d.concat([j,z])}return z}function S(T,k,z){var j,V;do{for(j=d.alloc(0);j.length*8<T.bitLength();)k.v=v(z,k.k).update(k.v).digest(),j=d.concat([j,k.v]);V=B(j,T),k.k=v(z,k.k).update(k.v).update(d.from([0])).digest(),k.v=v(z,k.k).update(k.v).digest()}while(V.cmp(T)!==-1);return V}function P(T,k,z,j){return T.toRed(A.mont(z)).redPow(k).fromRed().mod(j)}return sign.exports=b,sign.exports.getKey=y,sign.exports.makeKey=S,sign.exports}var verify_1,hasRequiredVerify;function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var d=requireSafeBuffer$2().Buffer,v=requireBn$4(),E=requireElliptic().ec,m=requireParseAsn1(),A=require$$4;function a(w,l,M,y,B){var R=m(M);if(R.type==="ec"){if(y!=="ecdsa"&&y!=="ecdsa/rsa")throw new Error("wrong public key type");return _(w,l,R)}else if(R.type==="dsa"){if(y!=="dsa")throw new Error("wrong public key type");return g(w,l,R)}if(y!=="rsa"&&y!=="ecdsa/rsa")throw new Error("wrong public key type");l=d.concat([B,l]);for(var S=R.modulus.byteLength(),P=[1],T=0;l.length+P.length+2<S;)P.push(255),T+=1;P.push(0);for(var k=-1;++k<l.length;)P.push(l[k]);P=d.from(P);var z=v.mont(R.modulus);w=new v(w).toRed(z),w=w.redPow(new v(R.publicExponent)),w=d.from(w.fromRed().toArray());var j=T<8?1:0;for(S=Math.min(w.length,P.length),w.length!==P.length&&(j=1),k=-1;++k<S;)j|=w[k]^P[k];return j===0}function _(w,l,M){var y=A[M.data.algorithm.curve.join(".")];if(!y)throw new Error("unknown curve "+M.data.algorithm.curve.join("."));var B=new E(y),R=M.data.subjectPrivateKey.data;return B.verify(l,w,R)}function g(w,l,M){var y=M.data.p,B=M.data.q,R=M.data.g,S=M.data.pub_key,P=m.signature.decode(w,"der"),T=P.s,k=P.r;b(T,B),b(k,B);var z=v.mont(y),j=T.invm(B),V=R.toRed(z).redPow(new v(l).mul(j).mod(B)).fromRed().mul(S.toRed(z).redPow(k.mul(j).mod(B)).fromRed()).mod(y).mod(B);return V.cmp(k)===0}function b(w,l){if(w.cmpn(0)<=0)throw new Error("invalid sig");if(w.cmp(l)>=0)throw new Error("invalid sig")}return verify_1=a,verify_1}var browser$5,hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$5;hasRequiredBrowser$5=1;var d=requireSafeBuffer$2().Buffer,v=requireBrowser$b(),E=requireReadableBrowser$1(),m=requireInherits_browser$2(),A=requireSign(),a=requireVerify(),_=require$$6$1;Object.keys(_).forEach(function(M){_[M].id=d.from(_[M].id,"hex"),_[M.toLowerCase()]=_[M]});function g(M){E.Writable.call(this);var y=_[M];if(!y)throw new Error("Unknown message digest");this._hashType=y.hash,this._hash=v(y.hash),this._tag=y.id,this._signType=y.sign}m(g,E.Writable),g.prototype._write=function(y,B,R){this._hash.update(y),R()},g.prototype.update=function(y,B){return this._hash.update(typeof y=="string"?d.from(y,B):y),this},g.prototype.sign=function(y,B){this.end();var R=this._hash.digest(),S=A(R,y,this._hashType,this._signType,this._tag);return B?S.toString(B):S};function b(M){E.Writable.call(this);var y=_[M];if(!y)throw new Error("Unknown message digest");this._hash=v(y.hash),this._tag=y.id,this._signType=y.sign}m(b,E.Writable),b.prototype._write=function(y,B,R){this._hash.update(y),R()},b.prototype.update=function(y,B){return this._hash.update(typeof y=="string"?d.from(y,B):y),this},b.prototype.verify=function(y,B,R){var S=typeof B=="string"?d.from(B,R):B;this.end();var P=this._hash.digest();return a(S,P,y,this._signType,this._tag)};function w(M){return new g(M)}function l(M){return new b(M)}return browser$5={Sign:w,Verify:l,createSign:w,createVerify:l},browser$5}var bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,(function(d){(function(v,E){function m(p,e){if(!p)throw new Error(e||"Assertion failed")}function A(p,e){p.super_=e;var t=function(){};t.prototype=e.prototype,p.prototype=new t,p.prototype.constructor=p}function a(p,e,t){if(a.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(p||0,e||10,t||"be"))}typeof v=="object"?v.exports=a:E.BN=a,a.BN=a,a.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=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),m(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):(m(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(m(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,c=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=26,s++);return this.strip()};function g(p,e){var t=p.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function b(p,e,t){var n=g(p,t);return t-1>=e&&(n|=g(p,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,c;if(n==="be")for(f=e.length-1;f>=t;f-=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8}this.strip()};function w(p,e,t,n){for(var f=0,s=Math.min(p.length,t),u=e;u<s;u++){var c=p.charCodeAt(u)-48;f*=n,c>=49?f+=c-49+10:c>=17?f+=c-17+10:f+=c}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,c=u%f,o=Math.min(u,u-c)+n,r=0,h=n;h<o;h+=f)r=w(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(c!==0){var q=1;for(r=w(e,h,e.length,t),h=0;h<c;h++)q*=t;this.imuln(q),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 l=["","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"],M=[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],y=[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 c=this.words[u],o=((c<<f|s)&16777215).toString(16);s=c>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=l[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=M[e],h=y[e];n="";var q=this.clone();for(q.negative=0;!q.isZero();){var $=q.modn(h).toString(e);q=q.idivn(h),q.isZero()?n=$+n:n=l[r-$.length]+$+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}m(!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&&m(!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 m(typeof _<"u"),this.toArrayLike(_,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);m(f<=s,"byte array longer than desired length"),m(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",c=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[r]=o;for(;r<s;r++)c[r]=0}else{for(r=0;r<s-f;r++)c[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[s-r-1]=o}return c},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 B(p){for(var e=new Array(p.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(p.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 m((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 m((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 m((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){m(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){m(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,c=0;c<s.length;c++)t=(f.words[c]|0)-(s.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;for(;u!==0&&c<f.length;c++)t=(f.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;if(u===0&&c<f.length&&f!==this)for(;c<f.length;c++)this.words[c]=f.words[c];return this.length=Math.max(this.length,c),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function R(p,e,t){t.negative=e.negative^p.negative;var n=p.length+e.length|0;t.length=n,n=n-1|0;var f=p.words[0]|0,s=e.words[0]|0,u=f*s,c=u&67108863,o=u/67108864|0;t.words[0]=c;for(var r=1;r<n;r++){for(var h=o>>>26,q=o&67108863,$=Math.min(r,e.length-1),H=Math.max(0,r-p.length+1);H<=$;H++){var Y=r-H|0;f=p.words[Y]|0,s=e.words[H]|0,u=f*s+q,h+=u/67108864|0,q=u&67108863}t.words[r]=q|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var S=function(e,t,n){var f=e.words,s=t.words,u=n.words,c=0,o,r,h,q=f[0]|0,$=q&8191,H=q>>>13,Y=f[1]|0,J=Y&8191,x=Y>>>13,I=f[2]|0,C=I&8191,N=I>>>13,F=f[3]|0,D=F&8191,X=F>>>13,le=f[4]|0,ue=le&8191,pe=le>>>13,Ce=f[5]|0,me=Ce&8191,ce=Ce>>>13,Ne=f[6]|0,ye=Ne&8191,Me=Ne>>>13,De=f[7]|0,be=De&8191,Re=De>>>13,je=f[8]|0,Se=je&8191,Ie=je>>>13,ze=f[9]|0,Z=ze&8191,L=ze>>>13,G=s[0]|0,ee=G&8191,oe=G>>>13,ge=s[1]|0,ie=ge&8191,he=ge>>>13,Oe=s[2]|0,ve=Oe&8191,_e=Oe>>>13,Le=s[3]|0,Ee=Le&8191,Pe=Le>>>13,He=s[4]|0,Be=He&8191,Te=He>>>13,Ge=s[5]|0,K=Ge&8191,O=Ge>>>13,W=s[6]|0,te=W&8191,se=W>>>13,we=s[7]|0,de=we&8191,qe=we>>>13,Ue=s[8]|0,xe=Ue&8191,Ae=Ue>>>13,Fe=s[9]|0,$e=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul($,ee),r=Math.imul($,oe),r=r+Math.imul(H,ee)|0,h=Math.imul(H,oe);var We=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(J,ee),r=Math.imul(J,oe),r=r+Math.imul(x,ee)|0,h=Math.imul(x,oe),o=o+Math.imul($,ie)|0,r=r+Math.imul($,he)|0,r=r+Math.imul(H,ie)|0,h=h+Math.imul(H,he)|0;var Ke=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(C,ee),r=Math.imul(C,oe),r=r+Math.imul(N,ee)|0,h=Math.imul(N,oe),o=o+Math.imul(J,ie)|0,r=r+Math.imul(J,he)|0,r=r+Math.imul(x,ie)|0,h=h+Math.imul(x,he)|0,o=o+Math.imul($,ve)|0,r=r+Math.imul($,_e)|0,r=r+Math.imul(H,ve)|0,h=h+Math.imul(H,_e)|0;var Xe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(D,ee),r=Math.imul(D,oe),r=r+Math.imul(X,ee)|0,h=Math.imul(X,oe),o=o+Math.imul(C,ie)|0,r=r+Math.imul(C,he)|0,r=r+Math.imul(N,ie)|0,h=h+Math.imul(N,he)|0,o=o+Math.imul(J,ve)|0,r=r+Math.imul(J,_e)|0,r=r+Math.imul(x,ve)|0,h=h+Math.imul(x,_e)|0,o=o+Math.imul($,Ee)|0,r=r+Math.imul($,Pe)|0,r=r+Math.imul(H,Ee)|0,h=h+Math.imul(H,Pe)|0;var Ze=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,ee),r=Math.imul(ue,oe),r=r+Math.imul(pe,ee)|0,h=Math.imul(pe,oe),o=o+Math.imul(D,ie)|0,r=r+Math.imul(D,he)|0,r=r+Math.imul(X,ie)|0,h=h+Math.imul(X,he)|0,o=o+Math.imul(C,ve)|0,r=r+Math.imul(C,_e)|0,r=r+Math.imul(N,ve)|0,h=h+Math.imul(N,_e)|0,o=o+Math.imul(J,Ee)|0,r=r+Math.imul(J,Pe)|0,r=r+Math.imul(x,Ee)|0,h=h+Math.imul(x,Pe)|0,o=o+Math.imul($,Be)|0,r=r+Math.imul($,Te)|0,r=r+Math.imul(H,Be)|0,h=h+Math.imul(H,Te)|0;var Ve=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,ee),r=Math.imul(me,oe),r=r+Math.imul(ce,ee)|0,h=Math.imul(ce,oe),o=o+Math.imul(ue,ie)|0,r=r+Math.imul(ue,he)|0,r=r+Math.imul(pe,ie)|0,h=h+Math.imul(pe,he)|0,o=o+Math.imul(D,ve)|0,r=r+Math.imul(D,_e)|0,r=r+Math.imul(X,ve)|0,h=h+Math.imul(X,_e)|0,o=o+Math.imul(C,Ee)|0,r=r+Math.imul(C,Pe)|0,r=r+Math.imul(N,Ee)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(J,Be)|0,r=r+Math.imul(J,Te)|0,r=r+Math.imul(x,Be)|0,h=h+Math.imul(x,Te)|0,o=o+Math.imul($,K)|0,r=r+Math.imul($,O)|0,r=r+Math.imul(H,K)|0,h=h+Math.imul(H,O)|0;var Ye=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ye,ee),r=Math.imul(ye,oe),r=r+Math.imul(Me,ee)|0,h=Math.imul(Me,oe),o=o+Math.imul(me,ie)|0,r=r+Math.imul(me,he)|0,r=r+Math.imul(ce,ie)|0,h=h+Math.imul(ce,he)|0,o=o+Math.imul(ue,ve)|0,r=r+Math.imul(ue,_e)|0,r=r+Math.imul(pe,ve)|0,h=h+Math.imul(pe,_e)|0,o=o+Math.imul(D,Ee)|0,r=r+Math.imul(D,Pe)|0,r=r+Math.imul(X,Ee)|0,h=h+Math.imul(X,Pe)|0,o=o+Math.imul(C,Be)|0,r=r+Math.imul(C,Te)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,Te)|0,o=o+Math.imul(J,K)|0,r=r+Math.imul(J,O)|0,r=r+Math.imul(x,K)|0,h=h+Math.imul(x,O)|0,o=o+Math.imul($,te)|0,r=r+Math.imul($,se)|0,r=r+Math.imul(H,te)|0,h=h+Math.imul(H,se)|0;var Je=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(be,ee),r=Math.imul(be,oe),r=r+Math.imul(Re,ee)|0,h=Math.imul(Re,oe),o=o+Math.imul(ye,ie)|0,r=r+Math.imul(ye,he)|0,r=r+Math.imul(Me,ie)|0,h=h+Math.imul(Me,he)|0,o=o+Math.imul(me,ve)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(ce,ve)|0,h=h+Math.imul(ce,_e)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(pe,Ee)|0,h=h+Math.imul(pe,Pe)|0,o=o+Math.imul(D,Be)|0,r=r+Math.imul(D,Te)|0,r=r+Math.imul(X,Be)|0,h=h+Math.imul(X,Te)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(C,O)|0,r=r+Math.imul(N,K)|0,h=h+Math.imul(N,O)|0,o=o+Math.imul(J,te)|0,r=r+Math.imul(J,se)|0,r=r+Math.imul(x,te)|0,h=h+Math.imul(x,se)|0,o=o+Math.imul($,de)|0,r=r+Math.imul($,qe)|0,r=r+Math.imul(H,de)|0,h=h+Math.imul(H,qe)|0;var Qe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(Se,ee),r=Math.imul(Se,oe),r=r+Math.imul(Ie,ee)|0,h=Math.imul(Ie,oe),o=o+Math.imul(be,ie)|0,r=r+Math.imul(be,he)|0,r=r+Math.imul(Re,ie)|0,h=h+Math.imul(Re,he)|0,o=o+Math.imul(ye,ve)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(Me,ve)|0,h=h+Math.imul(Me,_e)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(ce,Ee)|0,h=h+Math.imul(ce,Pe)|0,o=o+Math.imul(ue,Be)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(pe,Be)|0,h=h+Math.imul(pe,Te)|0,o=o+Math.imul(D,K)|0,r=r+Math.imul(D,O)|0,r=r+Math.imul(X,K)|0,h=h+Math.imul(X,O)|0,o=o+Math.imul(C,te)|0,r=r+Math.imul(C,se)|0,r=r+Math.imul(N,te)|0,h=h+Math.imul(N,se)|0,o=o+Math.imul(J,de)|0,r=r+Math.imul(J,qe)|0,r=r+Math.imul(x,de)|0,h=h+Math.imul(x,qe)|0,o=o+Math.imul($,xe)|0,r=r+Math.imul($,Ae)|0,r=r+Math.imul(H,xe)|0,h=h+Math.imul(H,Ae)|0;var er=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(Z,ee),r=Math.imul(Z,oe),r=r+Math.imul(L,ee)|0,h=Math.imul(L,oe),o=o+Math.imul(Se,ie)|0,r=r+Math.imul(Se,he)|0,r=r+Math.imul(Ie,ie)|0,h=h+Math.imul(Ie,he)|0,o=o+Math.imul(be,ve)|0,r=r+Math.imul(be,_e)|0,r=r+Math.imul(Re,ve)|0,h=h+Math.imul(Re,_e)|0,o=o+Math.imul(ye,Ee)|0,r=r+Math.imul(ye,Pe)|0,r=r+Math.imul(Me,Ee)|0,h=h+Math.imul(Me,Pe)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(ce,Be)|0,h=h+Math.imul(ce,Te)|0,o=o+Math.imul(ue,K)|0,r=r+Math.imul(ue,O)|0,r=r+Math.imul(pe,K)|0,h=h+Math.imul(pe,O)|0,o=o+Math.imul(D,te)|0,r=r+Math.imul(D,se)|0,r=r+Math.imul(X,te)|0,h=h+Math.imul(X,se)|0,o=o+Math.imul(C,de)|0,r=r+Math.imul(C,qe)|0,r=r+Math.imul(N,de)|0,h=h+Math.imul(N,qe)|0,o=o+Math.imul(J,xe)|0,r=r+Math.imul(J,Ae)|0,r=r+Math.imul(x,xe)|0,h=h+Math.imul(x,Ae)|0,o=o+Math.imul($,$e)|0,r=r+Math.imul($,ke)|0,r=r+Math.imul(H,$e)|0,h=h+Math.imul(H,ke)|0;var rr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(Z,ie),r=Math.imul(Z,he),r=r+Math.imul(L,ie)|0,h=Math.imul(L,he),o=o+Math.imul(Se,ve)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ie,ve)|0,h=h+Math.imul(Ie,_e)|0,o=o+Math.imul(be,Ee)|0,r=r+Math.imul(be,Pe)|0,r=r+Math.imul(Re,Ee)|0,h=h+Math.imul(Re,Pe)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(Me,Be)|0,h=h+Math.imul(Me,Te)|0,o=o+Math.imul(me,K)|0,r=r+Math.imul(me,O)|0,r=r+Math.imul(ce,K)|0,h=h+Math.imul(ce,O)|0,o=o+Math.imul(ue,te)|0,r=r+Math.imul(ue,se)|0,r=r+Math.imul(pe,te)|0,h=h+Math.imul(pe,se)|0,o=o+Math.imul(D,de)|0,r=r+Math.imul(D,qe)|0,r=r+Math.imul(X,de)|0,h=h+Math.imul(X,qe)|0,o=o+Math.imul(C,xe)|0,r=r+Math.imul(C,Ae)|0,r=r+Math.imul(N,xe)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(J,$e)|0,r=r+Math.imul(J,ke)|0,r=r+Math.imul(x,$e)|0,h=h+Math.imul(x,ke)|0;var tr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(Z,ve),r=Math.imul(Z,_e),r=r+Math.imul(L,ve)|0,h=Math.imul(L,_e),o=o+Math.imul(Se,Ee)|0,r=r+Math.imul(Se,Pe)|0,r=r+Math.imul(Ie,Ee)|0,h=h+Math.imul(Ie,Pe)|0,o=o+Math.imul(be,Be)|0,r=r+Math.imul(be,Te)|0,r=r+Math.imul(Re,Be)|0,h=h+Math.imul(Re,Te)|0,o=o+Math.imul(ye,K)|0,r=r+Math.imul(ye,O)|0,r=r+Math.imul(Me,K)|0,h=h+Math.imul(Me,O)|0,o=o+Math.imul(me,te)|0,r=r+Math.imul(me,se)|0,r=r+Math.imul(ce,te)|0,h=h+Math.imul(ce,se)|0,o=o+Math.imul(ue,de)|0,r=r+Math.imul(ue,qe)|0,r=r+Math.imul(pe,de)|0,h=h+Math.imul(pe,qe)|0,o=o+Math.imul(D,xe)|0,r=r+Math.imul(D,Ae)|0,r=r+Math.imul(X,xe)|0,h=h+Math.imul(X,Ae)|0,o=o+Math.imul(C,$e)|0,r=r+Math.imul(C,ke)|0,r=r+Math.imul(N,$e)|0,h=h+Math.imul(N,ke)|0;var ir=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(Z,Ee),r=Math.imul(Z,Pe),r=r+Math.imul(L,Ee)|0,h=Math.imul(L,Pe),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ie,Be)|0,h=h+Math.imul(Ie,Te)|0,o=o+Math.imul(be,K)|0,r=r+Math.imul(be,O)|0,r=r+Math.imul(Re,K)|0,h=h+Math.imul(Re,O)|0,o=o+Math.imul(ye,te)|0,r=r+Math.imul(ye,se)|0,r=r+Math.imul(Me,te)|0,h=h+Math.imul(Me,se)|0,o=o+Math.imul(me,de)|0,r=r+Math.imul(me,qe)|0,r=r+Math.imul(ce,de)|0,h=h+Math.imul(ce,qe)|0,o=o+Math.imul(ue,xe)|0,r=r+Math.imul(ue,Ae)|0,r=r+Math.imul(pe,xe)|0,h=h+Math.imul(pe,Ae)|0,o=o+Math.imul(D,$e)|0,r=r+Math.imul(D,ke)|0,r=r+Math.imul(X,$e)|0,h=h+Math.imul(X,ke)|0;var nr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(Z,Be),r=Math.imul(Z,Te),r=r+Math.imul(L,Be)|0,h=Math.imul(L,Te),o=o+Math.imul(Se,K)|0,r=r+Math.imul(Se,O)|0,r=r+Math.imul(Ie,K)|0,h=h+Math.imul(Ie,O)|0,o=o+Math.imul(be,te)|0,r=r+Math.imul(be,se)|0,r=r+Math.imul(Re,te)|0,h=h+Math.imul(Re,se)|0,o=o+Math.imul(ye,de)|0,r=r+Math.imul(ye,qe)|0,r=r+Math.imul(Me,de)|0,h=h+Math.imul(Me,qe)|0,o=o+Math.imul(me,xe)|0,r=r+Math.imul(me,Ae)|0,r=r+Math.imul(ce,xe)|0,h=h+Math.imul(ce,Ae)|0,o=o+Math.imul(ue,$e)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(pe,$e)|0,h=h+Math.imul(pe,ke)|0;var ar=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(Z,K),r=Math.imul(Z,O),r=r+Math.imul(L,K)|0,h=Math.imul(L,O),o=o+Math.imul(Se,te)|0,r=r+Math.imul(Se,se)|0,r=r+Math.imul(Ie,te)|0,h=h+Math.imul(Ie,se)|0,o=o+Math.imul(be,de)|0,r=r+Math.imul(be,qe)|0,r=r+Math.imul(Re,de)|0,h=h+Math.imul(Re,qe)|0,o=o+Math.imul(ye,xe)|0,r=r+Math.imul(ye,Ae)|0,r=r+Math.imul(Me,xe)|0,h=h+Math.imul(Me,Ae)|0,o=o+Math.imul(me,$e)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(ce,$e)|0,h=h+Math.imul(ce,ke)|0;var fr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(Z,te),r=Math.imul(Z,se),r=r+Math.imul(L,te)|0,h=Math.imul(L,se),o=o+Math.imul(Se,de)|0,r=r+Math.imul(Se,qe)|0,r=r+Math.imul(Ie,de)|0,h=h+Math.imul(Ie,qe)|0,o=o+Math.imul(be,xe)|0,r=r+Math.imul(be,Ae)|0,r=r+Math.imul(Re,xe)|0,h=h+Math.imul(Re,Ae)|0,o=o+Math.imul(ye,$e)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(Me,$e)|0,h=h+Math.imul(Me,ke)|0;var or=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(Z,de),r=Math.imul(Z,qe),r=r+Math.imul(L,de)|0,h=Math.imul(L,qe),o=o+Math.imul(Se,xe)|0,r=r+Math.imul(Se,Ae)|0,r=r+Math.imul(Ie,xe)|0,h=h+Math.imul(Ie,Ae)|0,o=o+Math.imul(be,$e)|0,r=r+Math.imul(be,ke)|0,r=r+Math.imul(Re,$e)|0,h=h+Math.imul(Re,ke)|0;var sr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(Z,xe),r=Math.imul(Z,Ae),r=r+Math.imul(L,xe)|0,h=Math.imul(L,Ae),o=o+Math.imul(Se,$e)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ie,$e)|0,h=h+Math.imul(Ie,ke)|0;var hr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,o=Math.imul(Z,$e),r=Math.imul(Z,ke),r=r+Math.imul(L,$e)|0,h=Math.imul(L,ke);var ur=(c+o|0)+((r&8191)<<13)|0;return c=(h+(r>>>13)|0)+(ur>>>26)|0,ur&=67108863,u[0]=We,u[1]=Ke,u[2]=Xe,u[3]=Ze,u[4]=Ve,u[5]=Ye,u[6]=Je,u[7]=Qe,u[8]=er,u[9]=rr,u[10]=tr,u[11]=ir,u[12]=nr,u[13]=ar,u[14]=fr,u[15]=or,u[16]=sr,u[17]=hr,u[18]=ur,c!==0&&(u[19]=c,n.length++),n};Math.imul||(S=R);function P(p,e,t){t.negative=e.negative^p.negative,t.length=p.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var c=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-p.length+1);r<=o;r++){var h=s-r,q=p.words[h]|0,$=e.words[r]|0,H=q*$,Y=H&67108863;u=u+(H/67108864|0)|0,Y=Y+c|0,c=Y&67108863,u=u+(Y>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=c,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function T(p,e,t){var n=new k;return n.mulp(p,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=S(this,e,t):f<63?n=R(this,e,t):f<1024?n=P(this,e,t):n=T(this,e,t),n};function k(p,e){this.x=p,this.y=e}k.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},k.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},k.prototype.permute=function(e,t,n,f,s,u){for(var c=0;c<u;c++)f[c]=t[e[c]],s[c]=n[e[c]]},k.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var c=1;c<s;c<<=1)for(var o=c<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),q=0;q<s;q+=o)for(var $=r,H=h,Y=0;Y<c;Y++){var J=n[q+Y],x=f[q+Y],I=n[q+Y+c],C=f[q+Y+c],N=$*I-H*C;C=$*C+H*I,I=N,n[q+Y]=J+I,f[q+Y]=x+C,n[q+Y+c]=J-I,f[q+Y+c]=x-C,Y!==o&&(N=r*$-h*H,H=r*H+h*$,$=N)}},k.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},k.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}},k.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},k.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;m(s===0),m((s&-8192)===0)},k.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},k.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),c=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),q=new Array(f),$=new Array(f),H=n.words;H.length=f,this.convert13b(e.words,e.length,c,f),this.convert13b(t.words,t.length,h,f),this.transform(c,u,o,r,f,s),this.transform(h,u,q,$,f,s);for(var Y=0;Y<f;Y++){var J=o[Y]*q[Y]-r[Y]*$[Y];r[Y]=o[Y]*$[Y]+r[Y]*q[Y],o[Y]=J}return this.conjugate(o,r,f),this.transform(o,r,H,u,f,s),this.conjugate(H,u,f),this.normalize13b(H,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),T(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){m(typeof e=="number"),m(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=B(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){m(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 c=this.words[s]&f,o=(this.words[s]|0)-c<<t;this.words[s]=o|u,u=c>>>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 m(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){m(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),c=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 q=this.words[r]|0;this.words[r]=h<<26-s|q>>>s,h=q&c}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 m(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){m(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){m(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(m(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 m(typeof e=="number"),m(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(m(typeof e=="number"),m(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,c=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+c;var o=(e.words[s]|0)*t;u-=o&67108863,c=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+c,c=u>>26,this.words[s+n]=u&67108863;if(c===0)return this.strip();for(m(c===-1),c=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+c,c=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,c=this._countBits(u);n=26-c,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 q=f.clone()._ishlnsubmul(s,1,o);q.negative===0&&(f=q,r&&(r.words[o]=1));for(var $=o-1;$>=0;$--){var H=(f.words[s.length+$]|0)*67108864+(f.words[s.length+$-1]|0);for(H=Math.min(H/u|0,67108863),f._ishlnsubmul(s,H,$);f.negative!==0;)H--,f.negative=0,f._ishlnsubmul(s,1,$),f.isZero()||(f.negative^=1);r&&(r.words[$]=H)}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(m(!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){m(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){m(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){m(e.negative===0),m(!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),c=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 q=0,$=1;(t.words[0]&$)===0&&q<26;++q,$<<=1);if(q>0)for(t.iushrn(q);q-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var H=0,Y=1;(n.words[0]&Y)===0&&H<26;++H,Y<<=1);if(H>0)for(n.iushrn(H);H-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(r),c.isub(h)),u.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(c)):(n.isub(t),u.isub(f),c.isub(s))}return{a:u,b:c,gcd:n.iushln(o)}},a.prototype._invmp=function(e){m(e.negative===0),m(!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 c=0,o=1;(t.words[0]&o)===0&&c<26;++c,o<<=1);if(c>0)for(t.iushrn(c);c-- >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 q;return t.cmpn(1)===0?q=f:q=s,q.cmpn(0)<0&&q.iadd(e),q},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){m(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 c=this.words[u]|0;c+=s,s=c>>>26,c&=67108863,this.words[u]=c}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),m(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 U(e)},a.prototype.toRed=function(e){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return m(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 m(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return m(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var z={k256:null,p224:null,p192:null,p25519:null};function j(p,e){this.name=p,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()}j.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},j.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},j.prototype.split=function(e,t){e.iushrn(this.n,0,t)},j.prototype.imulK=function(e){return e.imul(this.k)};function V(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}A(V,j),V.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 c=e.words[s]|0;e.words[s-10]=(c&n)<<4|u>>>22,u=c}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 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 Q(){j.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}A(Q,j);function ne(){j.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}A(ne,j);function ae(){j.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}A(ae,j),ae.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(z[e])return z[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 z[e]=t,t};function U(p){if(typeof p=="string"){var e=a._prime(p);this.m=e.p,this.prime=e}else m(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}U.prototype._verify1=function(e){m(e.negative===0,"red works only with positives"),m(e.red,"red works only with red numbers")},U.prototype._verify2=function(e,t){m((e.negative|t.negative)===0,"red works only with positives"),m(e.red&&e.red===t.red,"red works only with red numbers")},U.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},U.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},U.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)},U.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},U.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)},U.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},U.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},U.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},U.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},U.prototype.isqr=function(e){return this.imul(e,e.clone())},U.prototype.sqr=function(e){return this.mul(e,e)},U.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(m(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);m(!f.isZero());var u=new a(1).toRed(this),c=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(c)!==0;)r.redIAdd(c);for(var h=this.pow(r,f),q=this.pow(e,f.addn(1).iushrn(1)),$=this.pow(e,f),H=s;$.cmp(u)!==0;){for(var Y=$,J=0;Y.cmp(u)!==0;J++)Y=Y.redSqr();m(J<H);var x=this.pow(h,new a(1).iushln(H-J-1));q=q.redMul(x),h=x.redSqr(),$=$.redMul(h),H=J}return q},U.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},U.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],c=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],q=r-1;q>=0;q--){var $=h>>q&1;if(u!==f[0]&&(u=this.sqr(u)),$===0&&c===0){o=0;continue}c<<=1,c|=$,o++,!(o!==n&&(s!==0||q!==0))&&(u=this.mul(u,f[c]),o=0,c=0)}r=26}return u},U.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},U.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new fe(e)};function fe(p){U.call(this,p),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)}A(fe,U),fe.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},fe.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},fe.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)},fe.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)},fe.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(d,bn$2)})(bn$3)),bn$3.exports}var browser$4,hasRequiredBrowser$4;function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var d=requireElliptic(),v=requireBn$1();browser$4=function(_){return new m(_)};var E={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}};E.p224=E.secp224r1,E.p256=E.secp256r1=E.prime256v1,E.p192=E.secp192r1=E.prime192v1,E.p384=E.secp384r1,E.p521=E.secp521r1;function m(a){this.curveType=E[a],this.curveType||(this.curveType={name:a}),this.curve=new d.ec(this.curveType.name),this.keys=void 0}m.prototype.generateKeys=function(a,_){return this.keys=this.curve.genKeyPair(),this.getPublicKey(a,_)},m.prototype.computeSecret=function(a,_,g){_=_||"utf8",Buffer.isBuffer(a)||(a=new Buffer(a,_));var b=this.curve.keyFromPublic(a).getPublic(),w=b.mul(this.keys.getPrivate()).getX();return A(w,g,this.curveType.byteLength)},m.prototype.getPublicKey=function(a,_){var g=this.keys.getPublic(_==="compressed",!0);return _==="hybrid"&&(g[g.length-1]%2?g[0]=7:g[0]=6),A(g,a)},m.prototype.getPrivateKey=function(a){return A(this.keys.getPrivate(),a)},m.prototype.setPublicKey=function(a,_){return _=_||"utf8",Buffer.isBuffer(a)||(a=new Buffer(a,_)),this.keys._importPublic(a),this},m.prototype.setPrivateKey=function(a,_){_=_||"utf8",Buffer.isBuffer(a)||(a=new Buffer(a,_));var g=new v(a);return g=g.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(g),this};function A(a,_,g){Array.isArray(a)||(a=a.toArray());var b=new Buffer(a);if(g&&b.length<g){var w=new Buffer(g-b.length);w.fill(0),b=Buffer.concat([w,b])}return _?b.toString(_):b}return browser$4}var browser$3={},mgf,hasRequiredMgf;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var d=requireBrowser$b(),v=requireSafeBuffer$2().Buffer;mgf=function(m,A){for(var a=v.alloc(0),_=0,g;a.length<A;)g=E(_++),a=v.concat([a,d("sha1").update(m).update(g).digest()]);return a.slice(0,A)};function E(m){var A=v.allocUnsafe(4);return A.writeUInt32BE(m,0),A}return mgf}var xor,hasRequiredXor;function requireXor(){return hasRequiredXor||(hasRequiredXor=1,xor=function(v,E){for(var m=v.length,A=-1;++A<m;)v[A]^=E[A];return v}),xor}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,(function(d){(function(v,E){function m(p,e){if(!p)throw new Error(e||"Assertion failed")}function A(p,e){p.super_=e;var t=function(){};t.prototype=e.prototype,p.prototype=new t,p.prototype.constructor=p}function a(p,e,t){if(a.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(p||0,e||10,t||"be"))}typeof v=="object"?v.exports=a:E.BN=a,a.BN=a,a.wordSize=26;var _;try{typeof window<"u"&&typeof window.Buffer<"u"?_=window.Buffer:_=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),m(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):(m(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(m(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,c=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=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<<c&67108863,this.words[s+1]=u>>>26-c&67108863,c+=24,c>=26&&(c-=26,s++);return this.strip()};function g(p,e){var t=p.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function b(p,e,t){var n=g(p,t);return t-1>=e&&(n|=g(p,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,c;if(n==="be")for(f=e.length-1;f>=t;f-=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8;else{var o=e.length-t;for(f=o%2===0?t+1:t;f<e.length;f+=2)c=b(e,t,f)<<s,this.words[u]|=c&67108863,s>=18?(s-=18,u+=1,this.words[u]|=c>>>26):s+=8}this.strip()};function w(p,e,t,n){for(var f=0,s=Math.min(p.length,t),u=e;u<s;u++){var c=p.charCodeAt(u)-48;f*=n,c>=49?f+=c-49+10:c>=17?f+=c-17+10:f+=c}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,c=u%f,o=Math.min(u,u-c)+n,r=0,h=n;h<o;h+=f)r=w(e,h,h+f,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(c!==0){var q=1;for(r=w(e,h,e.length,t),h=0;h<c;h++)q*=t;this.imuln(q),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 l=["","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"],M=[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],y=[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 c=this.words[u],o=((c<<f|s)&16777215).toString(16);s=c>>>24-f&16777215,f+=2,f>=26&&(f-=26,u--),s!==0||u!==this.length-1?n=l[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=M[e],h=y[e];n="";var q=this.clone();for(q.negative=0;!q.isZero();){var $=q.modn(h).toString(e);q=q.idivn(h),q.isZero()?n=$+n:n=l[r-$.length]+$+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}m(!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&&m(!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 m(typeof _<"u"),this.toArrayLike(_,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);m(f<=s,"byte array longer than desired length"),m(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",c=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[r]=o;for(;r<s;r++)c[r]=0}else{for(r=0;r<s-f;r++)c[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),c[s-r-1]=o}return c},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 B(p){for(var e=new Array(p.bitLength()),t=0;t<e.length;t++){var n=t/26|0,f=t%26;e[t]=(p.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 m((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 m((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 m((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){m(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){m(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,c=0;c<s.length;c++)t=(f.words[c]|0)-(s.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;for(;u!==0&&c<f.length;c++)t=(f.words[c]|0)+u,u=t>>26,this.words[c]=t&67108863;if(u===0&&c<f.length&&f!==this)for(;c<f.length;c++)this.words[c]=f.words[c];return this.length=Math.max(this.length,c),f!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function R(p,e,t){t.negative=e.negative^p.negative;var n=p.length+e.length|0;t.length=n,n=n-1|0;var f=p.words[0]|0,s=e.words[0]|0,u=f*s,c=u&67108863,o=u/67108864|0;t.words[0]=c;for(var r=1;r<n;r++){for(var h=o>>>26,q=o&67108863,$=Math.min(r,e.length-1),H=Math.max(0,r-p.length+1);H<=$;H++){var Y=r-H|0;f=p.words[Y]|0,s=e.words[H]|0,u=f*s+q,h+=u/67108864|0,q=u&67108863}t.words[r]=q|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var S=function(e,t,n){var f=e.words,s=t.words,u=n.words,c=0,o,r,h,q=f[0]|0,$=q&8191,H=q>>>13,Y=f[1]|0,J=Y&8191,x=Y>>>13,I=f[2]|0,C=I&8191,N=I>>>13,F=f[3]|0,D=F&8191,X=F>>>13,le=f[4]|0,ue=le&8191,pe=le>>>13,Ce=f[5]|0,me=Ce&8191,ce=Ce>>>13,Ne=f[6]|0,ye=Ne&8191,Me=Ne>>>13,De=f[7]|0,be=De&8191,Re=De>>>13,je=f[8]|0,Se=je&8191,Ie=je>>>13,ze=f[9]|0,Z=ze&8191,L=ze>>>13,G=s[0]|0,ee=G&8191,oe=G>>>13,ge=s[1]|0,ie=ge&8191,he=ge>>>13,Oe=s[2]|0,ve=Oe&8191,_e=Oe>>>13,Le=s[3]|0,Ee=Le&8191,Pe=Le>>>13,He=s[4]|0,Be=He&8191,Te=He>>>13,Ge=s[5]|0,K=Ge&8191,O=Ge>>>13,W=s[6]|0,te=W&8191,se=W>>>13,we=s[7]|0,de=we&8191,qe=we>>>13,Ue=s[8]|0,xe=Ue&8191,Ae=Ue>>>13,Fe=s[9]|0,$e=Fe&8191,ke=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul($,ee),r=Math.imul($,oe),r=r+Math.imul(H,ee)|0,h=Math.imul(H,oe);var We=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(We>>>26)|0,We&=67108863,o=Math.imul(J,ee),r=Math.imul(J,oe),r=r+Math.imul(x,ee)|0,h=Math.imul(x,oe),o=o+Math.imul($,ie)|0,r=r+Math.imul($,he)|0,r=r+Math.imul(H,ie)|0,h=h+Math.imul(H,he)|0;var Ke=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,o=Math.imul(C,ee),r=Math.imul(C,oe),r=r+Math.imul(N,ee)|0,h=Math.imul(N,oe),o=o+Math.imul(J,ie)|0,r=r+Math.imul(J,he)|0,r=r+Math.imul(x,ie)|0,h=h+Math.imul(x,he)|0,o=o+Math.imul($,ve)|0,r=r+Math.imul($,_e)|0,r=r+Math.imul(H,ve)|0,h=h+Math.imul(H,_e)|0;var Xe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(D,ee),r=Math.imul(D,oe),r=r+Math.imul(X,ee)|0,h=Math.imul(X,oe),o=o+Math.imul(C,ie)|0,r=r+Math.imul(C,he)|0,r=r+Math.imul(N,ie)|0,h=h+Math.imul(N,he)|0,o=o+Math.imul(J,ve)|0,r=r+Math.imul(J,_e)|0,r=r+Math.imul(x,ve)|0,h=h+Math.imul(x,_e)|0,o=o+Math.imul($,Ee)|0,r=r+Math.imul($,Pe)|0,r=r+Math.imul(H,Ee)|0,h=h+Math.imul(H,Pe)|0;var Ze=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,ee),r=Math.imul(ue,oe),r=r+Math.imul(pe,ee)|0,h=Math.imul(pe,oe),o=o+Math.imul(D,ie)|0,r=r+Math.imul(D,he)|0,r=r+Math.imul(X,ie)|0,h=h+Math.imul(X,he)|0,o=o+Math.imul(C,ve)|0,r=r+Math.imul(C,_e)|0,r=r+Math.imul(N,ve)|0,h=h+Math.imul(N,_e)|0,o=o+Math.imul(J,Ee)|0,r=r+Math.imul(J,Pe)|0,r=r+Math.imul(x,Ee)|0,h=h+Math.imul(x,Pe)|0,o=o+Math.imul($,Be)|0,r=r+Math.imul($,Te)|0,r=r+Math.imul(H,Be)|0,h=h+Math.imul(H,Te)|0;var Ve=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,ee),r=Math.imul(me,oe),r=r+Math.imul(ce,ee)|0,h=Math.imul(ce,oe),o=o+Math.imul(ue,ie)|0,r=r+Math.imul(ue,he)|0,r=r+Math.imul(pe,ie)|0,h=h+Math.imul(pe,he)|0,o=o+Math.imul(D,ve)|0,r=r+Math.imul(D,_e)|0,r=r+Math.imul(X,ve)|0,h=h+Math.imul(X,_e)|0,o=o+Math.imul(C,Ee)|0,r=r+Math.imul(C,Pe)|0,r=r+Math.imul(N,Ee)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(J,Be)|0,r=r+Math.imul(J,Te)|0,r=r+Math.imul(x,Be)|0,h=h+Math.imul(x,Te)|0,o=o+Math.imul($,K)|0,r=r+Math.imul($,O)|0,r=r+Math.imul(H,K)|0,h=h+Math.imul(H,O)|0;var Ye=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(ye,ee),r=Math.imul(ye,oe),r=r+Math.imul(Me,ee)|0,h=Math.imul(Me,oe),o=o+Math.imul(me,ie)|0,r=r+Math.imul(me,he)|0,r=r+Math.imul(ce,ie)|0,h=h+Math.imul(ce,he)|0,o=o+Math.imul(ue,ve)|0,r=r+Math.imul(ue,_e)|0,r=r+Math.imul(pe,ve)|0,h=h+Math.imul(pe,_e)|0,o=o+Math.imul(D,Ee)|0,r=r+Math.imul(D,Pe)|0,r=r+Math.imul(X,Ee)|0,h=h+Math.imul(X,Pe)|0,o=o+Math.imul(C,Be)|0,r=r+Math.imul(C,Te)|0,r=r+Math.imul(N,Be)|0,h=h+Math.imul(N,Te)|0,o=o+Math.imul(J,K)|0,r=r+Math.imul(J,O)|0,r=r+Math.imul(x,K)|0,h=h+Math.imul(x,O)|0,o=o+Math.imul($,te)|0,r=r+Math.imul($,se)|0,r=r+Math.imul(H,te)|0,h=h+Math.imul(H,se)|0;var Je=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(be,ee),r=Math.imul(be,oe),r=r+Math.imul(Re,ee)|0,h=Math.imul(Re,oe),o=o+Math.imul(ye,ie)|0,r=r+Math.imul(ye,he)|0,r=r+Math.imul(Me,ie)|0,h=h+Math.imul(Me,he)|0,o=o+Math.imul(me,ve)|0,r=r+Math.imul(me,_e)|0,r=r+Math.imul(ce,ve)|0,h=h+Math.imul(ce,_e)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(pe,Ee)|0,h=h+Math.imul(pe,Pe)|0,o=o+Math.imul(D,Be)|0,r=r+Math.imul(D,Te)|0,r=r+Math.imul(X,Be)|0,h=h+Math.imul(X,Te)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(C,O)|0,r=r+Math.imul(N,K)|0,h=h+Math.imul(N,O)|0,o=o+Math.imul(J,te)|0,r=r+Math.imul(J,se)|0,r=r+Math.imul(x,te)|0,h=h+Math.imul(x,se)|0,o=o+Math.imul($,de)|0,r=r+Math.imul($,qe)|0,r=r+Math.imul(H,de)|0,h=h+Math.imul(H,qe)|0;var Qe=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(Se,ee),r=Math.imul(Se,oe),r=r+Math.imul(Ie,ee)|0,h=Math.imul(Ie,oe),o=o+Math.imul(be,ie)|0,r=r+Math.imul(be,he)|0,r=r+Math.imul(Re,ie)|0,h=h+Math.imul(Re,he)|0,o=o+Math.imul(ye,ve)|0,r=r+Math.imul(ye,_e)|0,r=r+Math.imul(Me,ve)|0,h=h+Math.imul(Me,_e)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(ce,Ee)|0,h=h+Math.imul(ce,Pe)|0,o=o+Math.imul(ue,Be)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(pe,Be)|0,h=h+Math.imul(pe,Te)|0,o=o+Math.imul(D,K)|0,r=r+Math.imul(D,O)|0,r=r+Math.imul(X,K)|0,h=h+Math.imul(X,O)|0,o=o+Math.imul(C,te)|0,r=r+Math.imul(C,se)|0,r=r+Math.imul(N,te)|0,h=h+Math.imul(N,se)|0,o=o+Math.imul(J,de)|0,r=r+Math.imul(J,qe)|0,r=r+Math.imul(x,de)|0,h=h+Math.imul(x,qe)|0,o=o+Math.imul($,xe)|0,r=r+Math.imul($,Ae)|0,r=r+Math.imul(H,xe)|0,h=h+Math.imul(H,Ae)|0;var er=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(Z,ee),r=Math.imul(Z,oe),r=r+Math.imul(L,ee)|0,h=Math.imul(L,oe),o=o+Math.imul(Se,ie)|0,r=r+Math.imul(Se,he)|0,r=r+Math.imul(Ie,ie)|0,h=h+Math.imul(Ie,he)|0,o=o+Math.imul(be,ve)|0,r=r+Math.imul(be,_e)|0,r=r+Math.imul(Re,ve)|0,h=h+Math.imul(Re,_e)|0,o=o+Math.imul(ye,Ee)|0,r=r+Math.imul(ye,Pe)|0,r=r+Math.imul(Me,Ee)|0,h=h+Math.imul(Me,Pe)|0,o=o+Math.imul(me,Be)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(ce,Be)|0,h=h+Math.imul(ce,Te)|0,o=o+Math.imul(ue,K)|0,r=r+Math.imul(ue,O)|0,r=r+Math.imul(pe,K)|0,h=h+Math.imul(pe,O)|0,o=o+Math.imul(D,te)|0,r=r+Math.imul(D,se)|0,r=r+Math.imul(X,te)|0,h=h+Math.imul(X,se)|0,o=o+Math.imul(C,de)|0,r=r+Math.imul(C,qe)|0,r=r+Math.imul(N,de)|0,h=h+Math.imul(N,qe)|0,o=o+Math.imul(J,xe)|0,r=r+Math.imul(J,Ae)|0,r=r+Math.imul(x,xe)|0,h=h+Math.imul(x,Ae)|0,o=o+Math.imul($,$e)|0,r=r+Math.imul($,ke)|0,r=r+Math.imul(H,$e)|0,h=h+Math.imul(H,ke)|0;var rr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(Z,ie),r=Math.imul(Z,he),r=r+Math.imul(L,ie)|0,h=Math.imul(L,he),o=o+Math.imul(Se,ve)|0,r=r+Math.imul(Se,_e)|0,r=r+Math.imul(Ie,ve)|0,h=h+Math.imul(Ie,_e)|0,o=o+Math.imul(be,Ee)|0,r=r+Math.imul(be,Pe)|0,r=r+Math.imul(Re,Ee)|0,h=h+Math.imul(Re,Pe)|0,o=o+Math.imul(ye,Be)|0,r=r+Math.imul(ye,Te)|0,r=r+Math.imul(Me,Be)|0,h=h+Math.imul(Me,Te)|0,o=o+Math.imul(me,K)|0,r=r+Math.imul(me,O)|0,r=r+Math.imul(ce,K)|0,h=h+Math.imul(ce,O)|0,o=o+Math.imul(ue,te)|0,r=r+Math.imul(ue,se)|0,r=r+Math.imul(pe,te)|0,h=h+Math.imul(pe,se)|0,o=o+Math.imul(D,de)|0,r=r+Math.imul(D,qe)|0,r=r+Math.imul(X,de)|0,h=h+Math.imul(X,qe)|0,o=o+Math.imul(C,xe)|0,r=r+Math.imul(C,Ae)|0,r=r+Math.imul(N,xe)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(J,$e)|0,r=r+Math.imul(J,ke)|0,r=r+Math.imul(x,$e)|0,h=h+Math.imul(x,ke)|0;var tr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(Z,ve),r=Math.imul(Z,_e),r=r+Math.imul(L,ve)|0,h=Math.imul(L,_e),o=o+Math.imul(Se,Ee)|0,r=r+Math.imul(Se,Pe)|0,r=r+Math.imul(Ie,Ee)|0,h=h+Math.imul(Ie,Pe)|0,o=o+Math.imul(be,Be)|0,r=r+Math.imul(be,Te)|0,r=r+Math.imul(Re,Be)|0,h=h+Math.imul(Re,Te)|0,o=o+Math.imul(ye,K)|0,r=r+Math.imul(ye,O)|0,r=r+Math.imul(Me,K)|0,h=h+Math.imul(Me,O)|0,o=o+Math.imul(me,te)|0,r=r+Math.imul(me,se)|0,r=r+Math.imul(ce,te)|0,h=h+Math.imul(ce,se)|0,o=o+Math.imul(ue,de)|0,r=r+Math.imul(ue,qe)|0,r=r+Math.imul(pe,de)|0,h=h+Math.imul(pe,qe)|0,o=o+Math.imul(D,xe)|0,r=r+Math.imul(D,Ae)|0,r=r+Math.imul(X,xe)|0,h=h+Math.imul(X,Ae)|0,o=o+Math.imul(C,$e)|0,r=r+Math.imul(C,ke)|0,r=r+Math.imul(N,$e)|0,h=h+Math.imul(N,ke)|0;var ir=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(Z,Ee),r=Math.imul(Z,Pe),r=r+Math.imul(L,Ee)|0,h=Math.imul(L,Pe),o=o+Math.imul(Se,Be)|0,r=r+Math.imul(Se,Te)|0,r=r+Math.imul(Ie,Be)|0,h=h+Math.imul(Ie,Te)|0,o=o+Math.imul(be,K)|0,r=r+Math.imul(be,O)|0,r=r+Math.imul(Re,K)|0,h=h+Math.imul(Re,O)|0,o=o+Math.imul(ye,te)|0,r=r+Math.imul(ye,se)|0,r=r+Math.imul(Me,te)|0,h=h+Math.imul(Me,se)|0,o=o+Math.imul(me,de)|0,r=r+Math.imul(me,qe)|0,r=r+Math.imul(ce,de)|0,h=h+Math.imul(ce,qe)|0,o=o+Math.imul(ue,xe)|0,r=r+Math.imul(ue,Ae)|0,r=r+Math.imul(pe,xe)|0,h=h+Math.imul(pe,Ae)|0,o=o+Math.imul(D,$e)|0,r=r+Math.imul(D,ke)|0,r=r+Math.imul(X,$e)|0,h=h+Math.imul(X,ke)|0;var nr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(Z,Be),r=Math.imul(Z,Te),r=r+Math.imul(L,Be)|0,h=Math.imul(L,Te),o=o+Math.imul(Se,K)|0,r=r+Math.imul(Se,O)|0,r=r+Math.imul(Ie,K)|0,h=h+Math.imul(Ie,O)|0,o=o+Math.imul(be,te)|0,r=r+Math.imul(be,se)|0,r=r+Math.imul(Re,te)|0,h=h+Math.imul(Re,se)|0,o=o+Math.imul(ye,de)|0,r=r+Math.imul(ye,qe)|0,r=r+Math.imul(Me,de)|0,h=h+Math.imul(Me,qe)|0,o=o+Math.imul(me,xe)|0,r=r+Math.imul(me,Ae)|0,r=r+Math.imul(ce,xe)|0,h=h+Math.imul(ce,Ae)|0,o=o+Math.imul(ue,$e)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(pe,$e)|0,h=h+Math.imul(pe,ke)|0;var ar=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(Z,K),r=Math.imul(Z,O),r=r+Math.imul(L,K)|0,h=Math.imul(L,O),o=o+Math.imul(Se,te)|0,r=r+Math.imul(Se,se)|0,r=r+Math.imul(Ie,te)|0,h=h+Math.imul(Ie,se)|0,o=o+Math.imul(be,de)|0,r=r+Math.imul(be,qe)|0,r=r+Math.imul(Re,de)|0,h=h+Math.imul(Re,qe)|0,o=o+Math.imul(ye,xe)|0,r=r+Math.imul(ye,Ae)|0,r=r+Math.imul(Me,xe)|0,h=h+Math.imul(Me,Ae)|0,o=o+Math.imul(me,$e)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(ce,$e)|0,h=h+Math.imul(ce,ke)|0;var fr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(Z,te),r=Math.imul(Z,se),r=r+Math.imul(L,te)|0,h=Math.imul(L,se),o=o+Math.imul(Se,de)|0,r=r+Math.imul(Se,qe)|0,r=r+Math.imul(Ie,de)|0,h=h+Math.imul(Ie,qe)|0,o=o+Math.imul(be,xe)|0,r=r+Math.imul(be,Ae)|0,r=r+Math.imul(Re,xe)|0,h=h+Math.imul(Re,Ae)|0,o=o+Math.imul(ye,$e)|0,r=r+Math.imul(ye,ke)|0,r=r+Math.imul(Me,$e)|0,h=h+Math.imul(Me,ke)|0;var or=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(Z,de),r=Math.imul(Z,qe),r=r+Math.imul(L,de)|0,h=Math.imul(L,qe),o=o+Math.imul(Se,xe)|0,r=r+Math.imul(Se,Ae)|0,r=r+Math.imul(Ie,xe)|0,h=h+Math.imul(Ie,Ae)|0,o=o+Math.imul(be,$e)|0,r=r+Math.imul(be,ke)|0,r=r+Math.imul(Re,$e)|0,h=h+Math.imul(Re,ke)|0;var sr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(Z,xe),r=Math.imul(Z,Ae),r=r+Math.imul(L,xe)|0,h=Math.imul(L,Ae),o=o+Math.imul(Se,$e)|0,r=r+Math.imul(Se,ke)|0,r=r+Math.imul(Ie,$e)|0,h=h+Math.imul(Ie,ke)|0;var hr=(c+o|0)+((r&8191)<<13)|0;c=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,o=Math.imul(Z,$e),r=Math.imul(Z,ke),r=r+Math.imul(L,$e)|0,h=Math.imul(L,ke);var ur=(c+o|0)+((r&8191)<<13)|0;return c=(h+(r>>>13)|0)+(ur>>>26)|0,ur&=67108863,u[0]=We,u[1]=Ke,u[2]=Xe,u[3]=Ze,u[4]=Ve,u[5]=Ye,u[6]=Je,u[7]=Qe,u[8]=er,u[9]=rr,u[10]=tr,u[11]=ir,u[12]=nr,u[13]=ar,u[14]=fr,u[15]=or,u[16]=sr,u[17]=hr,u[18]=ur,c!==0&&(u[19]=c,n.length++),n};Math.imul||(S=R);function P(p,e,t){t.negative=e.negative^p.negative,t.length=p.length+e.length;for(var n=0,f=0,s=0;s<t.length-1;s++){var u=f;f=0;for(var c=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-p.length+1);r<=o;r++){var h=s-r,q=p.words[h]|0,$=e.words[r]|0,H=q*$,Y=H&67108863;u=u+(H/67108864|0)|0,Y=Y+c|0,c=Y&67108863,u=u+(Y>>>26)|0,f+=u>>>26,u&=67108863}t.words[s]=c,n=u,u=f}return n!==0?t.words[s]=n:t.length--,t.strip()}function T(p,e,t){var n=new k;return n.mulp(p,e,t)}a.prototype.mulTo=function(e,t){var n,f=this.length+e.length;return this.length===10&&e.length===10?n=S(this,e,t):f<63?n=R(this,e,t):f<1024?n=P(this,e,t):n=T(this,e,t),n};function k(p,e){this.x=p,this.y=e}k.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},k.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},k.prototype.permute=function(e,t,n,f,s,u){for(var c=0;c<u;c++)f[c]=t[e[c]],s[c]=n[e[c]]},k.prototype.transform=function(e,t,n,f,s,u){this.permute(u,e,t,n,f,s);for(var c=1;c<s;c<<=1)for(var o=c<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),q=0;q<s;q+=o)for(var $=r,H=h,Y=0;Y<c;Y++){var J=n[q+Y],x=f[q+Y],I=n[q+Y+c],C=f[q+Y+c],N=$*I-H*C;C=$*C+H*I,I=N,n[q+Y]=J+I,f[q+Y]=x+C,n[q+Y+c]=J-I,f[q+Y+c]=x-C,Y!==o&&(N=r*$-h*H,H=r*H+h*$,$=N)}},k.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},k.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}},k.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},k.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;m(s===0),m((s&-8192)===0)},k.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},k.prototype.mulp=function(e,t,n){var f=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(f),u=this.stub(f),c=new Array(f),o=new Array(f),r=new Array(f),h=new Array(f),q=new Array(f),$=new Array(f),H=n.words;H.length=f,this.convert13b(e.words,e.length,c,f),this.convert13b(t.words,t.length,h,f),this.transform(c,u,o,r,f,s),this.transform(h,u,q,$,f,s);for(var Y=0;Y<f;Y++){var J=o[Y]*q[Y]-r[Y]*$[Y];r[Y]=o[Y]*$[Y]+r[Y]*q[Y],o[Y]=J}return this.conjugate(o,r,f),this.transform(o,r,H,u,f,s),this.conjugate(H,u,f),this.normalize13b(H,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),T(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){m(typeof e=="number"),m(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=B(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){m(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 c=this.words[s]&f,o=(this.words[s]|0)-c<<t;this.words[s]=o|u,u=c>>>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 m(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){m(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),c=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 q=this.words[r]|0;this.words[r]=h<<26-s|q>>>s,h=q&c}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 m(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){m(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){m(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(m(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 m(typeof e=="number"),m(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(m(typeof e=="number"),m(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,c=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+c;var o=(e.words[s]|0)*t;u-=o&67108863,c=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+c,c=u>>26,this.words[s+n]=u&67108863;if(c===0)return this.strip();for(m(c===-1),c=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+c,c=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,c=this._countBits(u);n=26-c,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 q=f.clone()._ishlnsubmul(s,1,o);q.negative===0&&(f=q,r&&(r.words[o]=1));for(var $=o-1;$>=0;$--){var H=(f.words[s.length+$]|0)*67108864+(f.words[s.length+$-1]|0);for(H=Math.min(H/u|0,67108863),f._ishlnsubmul(s,H,$);f.negative!==0;)H--,f.negative=0,f._ishlnsubmul(s,1,$),f.isZero()||(f.negative^=1);r&&(r.words[$]=H)}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(m(!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){m(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){m(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){m(e.negative===0),m(!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),c=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 q=0,$=1;(t.words[0]&$)===0&&q<26;++q,$<<=1);if(q>0)for(t.iushrn(q);q-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(r),s.isub(h)),f.iushrn(1),s.iushrn(1);for(var H=0,Y=1;(n.words[0]&Y)===0&&H<26;++H,Y<<=1);if(H>0)for(n.iushrn(H);H-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(r),c.isub(h)),u.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),f.isub(u),s.isub(c)):(n.isub(t),u.isub(f),c.isub(s))}return{a:u,b:c,gcd:n.iushln(o)}},a.prototype._invmp=function(e){m(e.negative===0),m(!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 c=0,o=1;(t.words[0]&o)===0&&c<26;++c,o<<=1);if(c>0)for(t.iushrn(c);c-- >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 q;return t.cmpn(1)===0?q=f:q=s,q.cmpn(0)<0&&q.iadd(e),q},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){m(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 c=this.words[u]|0;c+=s,s=c>>>26,c&=67108863,this.words[u]=c}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),m(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 U(e)},a.prototype.toRed=function(e){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return m(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 m(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return m(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var z={k256:null,p224:null,p192:null,p25519:null};function j(p,e){this.name=p,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()}j.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},j.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},j.prototype.split=function(e,t){e.iushrn(this.n,0,t)},j.prototype.imulK=function(e){return e.imul(this.k)};function V(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}A(V,j),V.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 c=e.words[s]|0;e.words[s-10]=(c&n)<<4|u>>>22,u=c}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 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 Q(){j.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}A(Q,j);function ne(){j.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}A(ne,j);function ae(){j.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}A(ae,j),ae.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(z[e])return z[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 z[e]=t,t};function U(p){if(typeof p=="string"){var e=a._prime(p);this.m=e.p,this.prime=e}else m(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}U.prototype._verify1=function(e){m(e.negative===0,"red works only with positives"),m(e.red,"red works only with red numbers")},U.prototype._verify2=function(e,t){m((e.negative|t.negative)===0,"red works only with positives"),m(e.red&&e.red===t.red,"red works only with red numbers")},U.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},U.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},U.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)},U.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},U.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)},U.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},U.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},U.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},U.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},U.prototype.isqr=function(e){return this.imul(e,e.clone())},U.prototype.sqr=function(e){return this.mul(e,e)},U.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(m(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);m(!f.isZero());var u=new a(1).toRed(this),c=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(c)!==0;)r.redIAdd(c);for(var h=this.pow(r,f),q=this.pow(e,f.addn(1).iushrn(1)),$=this.pow(e,f),H=s;$.cmp(u)!==0;){for(var Y=$,J=0;Y.cmp(u)!==0;J++)Y=Y.redSqr();m(J<H);var x=this.pow(h,new a(1).iushln(H-J-1));q=q.redMul(x),h=x.redSqr(),$=$.redMul(h),H=J}return q},U.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},U.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],c=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],q=r-1;q>=0;q--){var $=h>>q&1;if(u!==f[0]&&(u=this.sqr(u)),$===0&&c===0){o=0;continue}c<<=1,c|=$,o++,!(o!==n&&(s!==0||q!==0))&&(u=this.mul(u,f[c]),o=0,c=0)}r=26}return u},U.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},U.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new fe(e)};function fe(p){U.call(this,p),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)}A(fe,U),fe.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},fe.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},fe.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)},fe.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)},fe.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(d,bn)})(bn$1)),bn$1.exports}var withPublic_1,hasRequiredWithPublic;function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var d=requireBn(),v=requireSafeBuffer$2().Buffer;function E(m,A){return v.from(m.toRed(d.mont(A.modulus)).redPow(new d(A.publicExponent)).fromRed().toArray())}return withPublic_1=E,withPublic_1}var publicEncrypt,hasRequiredPublicEncrypt;function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var d=requireParseAsn1(),v=requireBrowser$d(),E=requireBrowser$b(),m=requireMgf(),A=requireXor(),a=requireBn(),_=requireWithPublic(),g=requireBrowserifyRsa(),b=requireSafeBuffer$2().Buffer;publicEncrypt=function(B,R,S){var P;B.padding?P=B.padding:S?P=1:P=4;var T=d(B),k;if(P===4)k=w(T,R);else if(P===1)k=l(T,R,S);else if(P===3){if(k=new a(R),k.cmp(T.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return S?g(k,T):_(k,T)};function w(y,B){var R=y.modulus.byteLength(),S=B.length,P=E("sha1").update(b.alloc(0)).digest(),T=P.length,k=2*T;if(S>R-k-2)throw new Error("message too long");var z=b.alloc(R-S-k-2),j=R-T-1,V=v(T),Q=A(b.concat([P,z,b.alloc(1,1),B],j),m(V,j)),ne=A(V,m(Q,T));return new a(b.concat([b.alloc(1),ne,Q],R))}function l(y,B,R){var S=B.length,P=y.modulus.byteLength();if(S>P-11)throw new Error("message too long");var T;return R?T=b.alloc(P-S-3,255):T=M(P-S-3),new a(b.concat([b.from([0,R?1:2]),T,b.alloc(1),B],P))}function M(y){for(var B=b.allocUnsafe(y),R=0,S=v(y*2),P=0,T;R<y;)P===S.length&&(S=v(y*2),P=0),T=S[P++],T&&(B[R++]=T);return B}return publicEncrypt}var privateDecrypt,hasRequiredPrivateDecrypt;function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var d=requireParseAsn1(),v=requireMgf(),E=requireXor(),m=requireBn(),A=requireBrowserifyRsa(),a=requireBrowser$b(),_=requireWithPublic(),g=requireSafeBuffer$2().Buffer;privateDecrypt=function(y,B,R){var S;y.padding?S=y.padding:R?S=1:S=4;var P=d(y),T=P.modulus.byteLength();if(B.length>T||new m(B).cmp(P.modulus)>=0)throw new Error("decryption error");var k;R?k=_(new m(B),P):k=A(B,P);var z=g.alloc(T-k.length);if(k=g.concat([z,k],T),S===4)return b(P,k);if(S===1)return w(P,k,R);if(S===3)return k;throw new Error("unknown padding")};function b(M,y){var B=M.modulus.byteLength(),R=a("sha1").update(g.alloc(0)).digest(),S=R.length;if(y[0]!==0)throw new Error("decryption error");var P=y.slice(1,S+1),T=y.slice(S+1),k=E(P,v(T,S)),z=E(T,v(k,B-S-1));if(l(R,z.slice(0,S)))throw new Error("decryption error");for(var j=S;z[j]===0;)j++;if(z[j++]!==1)throw new Error("decryption error");return z.slice(j)}function w(M,y,B){for(var R=y.slice(0,2),S=2,P=0;y[S++]!==0;)if(S>=y.length){P++;break}var T=y.slice(2,S-1);if((R.toString("hex")!=="0002"&&!B||R.toString("hex")!=="0001"&&B)&&P++,T.length<8&&P++,P)throw new Error("decryption error");return y.slice(S)}function l(M,y){M=g.from(M),y=g.from(y);var B=0,R=M.length;M.length!==y.length&&(B++,R=Math.min(M.length,y.length));for(var S=-1;++S<R;)B+=M[S]^y[S];return B}return privateDecrypt}var hasRequiredBrowser$3;function requireBrowser$3(){return hasRequiredBrowser$3||(hasRequiredBrowser$3=1,(function(d){d.publicEncrypt=requirePublicEncrypt(),d.privateDecrypt=requirePrivateDecrypt(),d.privateEncrypt=function(E,m){return d.publicEncrypt(E,m,!0)},d.publicDecrypt=function(E,m){return d.privateDecrypt(E,m,!0)}})(browser$3)),browser$3}var browser$2={},hasRequiredBrowser$2;function requireBrowser$2(){if(hasRequiredBrowser$2)return browser$2;hasRequiredBrowser$2=1;function d(){throw new Error(`secure random number generation not supported by this browser
15
+ use chrome, FireFox or Internet Explorer 11`)}var v=requireSafeBuffer$2(),E=requireBrowser$d(),m=v.Buffer,A=v.kMaxLength,a=commonjsGlobal.crypto||commonjsGlobal.msCrypto,_=Math.pow(2,32)-1;function g(y,B){if(typeof y!="number"||y!==y)throw new TypeError("offset must be a number");if(y>_||y<0)throw new TypeError("offset must be a uint32");if(y>A||y>B)throw new RangeError("offset out of range")}function b(y,B,R){if(typeof y!="number"||y!==y)throw new TypeError("size must be a number");if(y>_||y<0)throw new TypeError("size must be a uint32");if(y+B>R||y>A)throw new RangeError("buffer too small")}a&&a.getRandomValues||!process$1.browser?(browser$2.randomFill=w,browser$2.randomFillSync=M):(browser$2.randomFill=d,browser$2.randomFillSync=d);function w(y,B,R,S){if(!m.isBuffer(y)&&!(y instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof B=="function")S=B,B=0,R=y.length;else if(typeof R=="function")S=R,R=y.length-B;else if(typeof S!="function")throw new TypeError('"cb" argument must be a function');return g(B,y.length),b(R,B,y.length),l(y,B,R,S)}function l(y,B,R,S){if(process$1.browser){var P=y.buffer,T=new Uint8Array(P,B,R);if(a.getRandomValues(T),S){process$1.nextTick(function(){S(null,y)});return}return y}if(S){E(R,function(z,j){if(z)return S(z);j.copy(y,B),S(null,y)});return}var k=E(R);return k.copy(y,B),y}function M(y,B,R){if(typeof B>"u"&&(B=0),!m.isBuffer(y)&&!(y instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return g(B,y.length),R===void 0&&(R=y.length-B),b(R,B,y.length),l(y,B,R)}return browser$2}var hasRequiredCryptoBrowserify;function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=requireBrowser$d(),cryptoBrowserify.createHash=cryptoBrowserify.Hash=requireBrowser$b(),cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=requireBrowser$a();var d=requireAlgos(),v=Object.keys(d),E=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(v);cryptoBrowserify.getHashes=function(){return E};var m=requireBrowser$9();cryptoBrowserify.pbkdf2=m.pbkdf2,cryptoBrowserify.pbkdf2Sync=m.pbkdf2Sync;var A=requireBrowser$7();cryptoBrowserify.Cipher=A.Cipher,cryptoBrowserify.createCipher=A.createCipher,cryptoBrowserify.Cipheriv=A.Cipheriv,cryptoBrowserify.createCipheriv=A.createCipheriv,cryptoBrowserify.Decipher=A.Decipher,cryptoBrowserify.createDecipher=A.createDecipher,cryptoBrowserify.Decipheriv=A.Decipheriv,cryptoBrowserify.createDecipheriv=A.createDecipheriv,cryptoBrowserify.getCiphers=A.getCiphers,cryptoBrowserify.listCiphers=A.listCiphers;var a=requireBrowser$6();cryptoBrowserify.DiffieHellmanGroup=a.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=a.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=a.getDiffieHellman,cryptoBrowserify.createDiffieHellman=a.createDiffieHellman,cryptoBrowserify.DiffieHellman=a.DiffieHellman;var _=requireBrowser$5();cryptoBrowserify.createSign=_.createSign,cryptoBrowserify.Sign=_.Sign,cryptoBrowserify.createVerify=_.createVerify,cryptoBrowserify.Verify=_.Verify,cryptoBrowserify.createECDH=requireBrowser$4();var g=requireBrowser$3();cryptoBrowserify.publicEncrypt=g.publicEncrypt,cryptoBrowserify.privateEncrypt=g.privateEncrypt,cryptoBrowserify.publicDecrypt=g.publicDecrypt,cryptoBrowserify.privateDecrypt=g.privateDecrypt;var b=requireBrowser$2();return cryptoBrowserify.randomFill=b.randomFill,cryptoBrowserify.randomFillSync=b.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
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(d){d.fetch=A(commonjsGlobal.fetch)&&A(commonjsGlobal.ReadableStream),d.writableStream=A(commonjsGlobal.WritableStream),d.abortController=A(commonjsGlobal.AbortController);var v;function E(){if(v!==void 0)return v;if(commonjsGlobal.XMLHttpRequest){v=new commonjsGlobal.XMLHttpRequest;try{v.open("GET",commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{v=null}}else v=null;return v}function m(a){var _=E();if(!_)return!1;try{return _.responseType=a,_.responseType===a}catch{}return!1}d.arraybuffer=d.fetch||m("arraybuffer"),d.msstream=!d.fetch&&m("ms-stream"),d.mozchunkedarraybuffer=!d.fetch&&m("moz-chunked-arraybuffer"),d.overrideMimeType=d.fetch||(E()?A(E().overrideMimeType):!1);function A(a){return typeof a=="function"}v=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(v,E){E&&(v.super_=E,v.prototype=Object.create(E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(v,E){if(E){v.super_=E;var m=function(){};m.prototype=E.prototype,v.prototype=new m,v.prototype.constructor=v}}),inherits_browser.exports}var response={},readableBrowser={exports:{}},hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,(function(d,v){v=d.exports=require_stream_readable$2(),v.Stream=v,v.Readable=v,v.Writable=require_stream_writable$2(),v.Duplex=require_stream_duplex$2(),v.Transform=require_stream_transform$2(),v.PassThrough=require_stream_passthrough$2(),v.finished=requireEndOfStream(),v.pipeline=requirePipeline()})(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var hasRequiredResponse;function requireResponse(){if(hasRequiredResponse)return response;hasRequiredResponse=1;var d=requireCapability(),v=requireInherits_browser(),E=requireReadableBrowser(),m=response.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},A=response.IncomingMessage=function(a,_,g,b){var w=this;if(E.Readable.call(w),w._mode=g,w.headers={},w.rawHeaders=[],w.trailers={},w.rawTrailers=[],w.on("end",function(){process$1.nextTick(function(){w.emit("close")})}),g==="fetch"){let S=function(){M.read().then(function(P){if(!w._destroyed){if(b(P.done),P.done){w.push(null);return}w.push(Buffer.from(P.value)),S()}}).catch(function(P){b(!0),w._destroyed||w.emit("error",P)})};if(w._fetchResponse=_,w.url=_.url,w.statusCode=_.status,w.statusMessage=_.statusText,_.headers.forEach(function(P,T){w.headers[T.toLowerCase()]=P,w.rawHeaders.push(T,P)}),d.writableStream){var l=new WritableStream({write:function(P){return b(!1),new Promise(function(T,k){w._destroyed?k():w.push(Buffer.from(P))?T():w._resumeFetch=T})},close:function(){b(!0),w._destroyed||w.push(null)},abort:function(P){b(!0),w._destroyed||w.emit("error",P)}});try{_.body.pipeTo(l).catch(function(P){b(!0),w._destroyed||w.emit("error",P)});return}catch{}}var M=_.body.getReader();S()}else{w._xhr=a,w._pos=0,w.url=a.responseURL,w.statusCode=a.status,w.statusMessage=a.statusText;var y=a.getAllResponseHeaders().split(/\r?\n/);if(y.forEach(function(S){var P=S.match(/^([^:]+):\s*(.*)/);if(P){var T=P[1].toLowerCase();T==="set-cookie"?(w.headers[T]===void 0&&(w.headers[T]=[]),w.headers[T].push(P[2])):w.headers[T]!==void 0?w.headers[T]+=", "+P[2]:w.headers[T]=P[2],w.rawHeaders.push(P[1],P[2])}}),w._charset="x-user-defined",!d.overrideMimeType){var B=w.rawHeaders["mime-type"];if(B){var R=B.match(/;\s*charset=([^;])(;|$)/);R&&(w._charset=R[1].toLowerCase())}w._charset||(w._charset="utf-8")}}};return v(A,E.Readable),A.prototype._read=function(){var a=this,_=a._resumeFetch;_&&(a._resumeFetch=null,_())},A.prototype._onXHRProgress=function(a){var _=this,g=_._xhr,b=null;switch(_._mode){case"text":if(b=g.responseText,b.length>_._pos){var w=b.substr(_._pos);if(_._charset==="x-user-defined"){for(var l=Buffer.alloc(w.length),M=0;M<w.length;M++)l[M]=w.charCodeAt(M)&255;_.push(l)}else _.push(w,_._charset);_._pos=b.length}break;case"arraybuffer":if(g.readyState!==m.DONE||!g.response)break;b=g.response,_.push(Buffer.from(new Uint8Array(b)));break;case"moz-chunked-arraybuffer":if(b=g.response,g.readyState!==m.LOADING||!b)break;_.push(Buffer.from(new Uint8Array(b)));break;case"ms-stream":if(b=g.response,g.readyState!==m.LOADING)break;var y=new commonjsGlobal.MSStreamReader;y.onprogress=function(){y.result.byteLength>_._pos&&(_.push(Buffer.from(new Uint8Array(y.result.slice(_._pos)))),_._pos=y.result.byteLength)},y.onload=function(){a(!0),_.push(null)},y.readAsArrayBuffer(b);break}_._xhr.readyState===m.DONE&&_._mode!=="ms-stream"&&(a(!0),_.push(null))},response}var hasRequiredRequest;function requireRequest(){if(hasRequiredRequest)return request.exports;hasRequiredRequest=1;var d=requireCapability(),v=requireInherits_browser(),E=requireResponse(),m=requireReadableBrowser(),A=E.IncomingMessage,a=E.readyStates;function _(l,M){return d.fetch&&M?"fetch":d.mozchunkedarraybuffer?"moz-chunked-arraybuffer":d.msstream?"ms-stream":d.arraybuffer&&l?"arraybuffer":"text"}var g=request.exports=function(l){var M=this;m.Writable.call(M),M._opts=l,M._body=[],M._headers={},l.auth&&M.setHeader("Authorization","Basic "+Buffer.from(l.auth).toString("base64")),Object.keys(l.headers).forEach(function(R){M.setHeader(R,l.headers[R])});var y,B=!0;if(l.mode==="disable-fetch"||"requestTimeout"in l&&!d.abortController)B=!1,y=!0;else if(l.mode==="prefer-streaming")y=!1;else if(l.mode==="allow-wrong-content-type")y=!d.overrideMimeType;else if(!l.mode||l.mode==="default"||l.mode==="prefer-fast")y=!0;else throw new Error("Invalid value for opts.mode");M._mode=_(y,B),M._fetchTimer=null,M._socketTimeout=null,M._socketTimer=null,M.on("finish",function(){M._onFinish()})};v(g,m.Writable),g.prototype.setHeader=function(l,M){var y=this,B=l.toLowerCase();w.indexOf(B)===-1&&(y._headers[B]={name:l,value:M})},g.prototype.getHeader=function(l){var M=this._headers[l.toLowerCase()];return M?M.value:null},g.prototype.removeHeader=function(l){var M=this;delete M._headers[l.toLowerCase()]},g.prototype._onFinish=function(){var l=this;if(!l._destroyed){var M=l._opts;"timeout"in M&&M.timeout!==0&&l.setTimeout(M.timeout);var y=l._headers,B=null;M.method!=="GET"&&M.method!=="HEAD"&&(B=new Blob(l._body,{type:(y["content-type"]||{}).value||""}));var R=[];if(Object.keys(y).forEach(function(k){var z=y[k].name,j=y[k].value;Array.isArray(j)?j.forEach(function(V){R.push([z,V])}):R.push([z,j])}),l._mode==="fetch"){var S=null;if(d.abortController){var P=new AbortController;S=P.signal,l._fetchAbortController=P,"requestTimeout"in M&&M.requestTimeout!==0&&(l._fetchTimer=commonjsGlobal.setTimeout(function(){l.emit("requestTimeout"),l._fetchAbortController&&l._fetchAbortController.abort()},M.requestTimeout))}commonjsGlobal.fetch(l._opts.url,{method:l._opts.method,headers:R,body:B||void 0,mode:"cors",credentials:M.withCredentials?"include":"same-origin",signal:S}).then(function(k){l._fetchResponse=k,l._resetTimers(!1),l._connect()},function(k){l._resetTimers(!0),l._destroyed||l.emit("error",k)})}else{var T=l._xhr=new commonjsGlobal.XMLHttpRequest;try{T.open(l._opts.method,l._opts.url,!0)}catch(k){process$1.nextTick(function(){l.emit("error",k)});return}"responseType"in T&&(T.responseType=l._mode),"withCredentials"in T&&(T.withCredentials=!!M.withCredentials),l._mode==="text"&&"overrideMimeType"in T&&T.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in M&&(T.timeout=M.requestTimeout,T.ontimeout=function(){l.emit("requestTimeout")}),R.forEach(function(k){T.setRequestHeader(k[0],k[1])}),l._response=null,T.onreadystatechange=function(){switch(T.readyState){case a.LOADING:case a.DONE:l._onXHRProgress();break}},l._mode==="moz-chunked-arraybuffer"&&(T.onprogress=function(){l._onXHRProgress()}),T.onerror=function(){l._destroyed||(l._resetTimers(!0),l.emit("error",new Error("XHR error")))};try{T.send(B)}catch(k){process$1.nextTick(function(){l.emit("error",k)});return}}}};function b(l){try{var M=l.status;return M!==null&&M!==0}catch{return!1}}g.prototype._onXHRProgress=function(){var l=this;l._resetTimers(!1),!(!b(l._xhr)||l._destroyed)&&(l._response||l._connect(),l._response._onXHRProgress(l._resetTimers.bind(l)))},g.prototype._connect=function(){var l=this;l._destroyed||(l._response=new A(l._xhr,l._fetchResponse,l._mode,l._resetTimers.bind(l)),l._response.on("error",function(M){l.emit("error",M)}),l.emit("response",l._response))},g.prototype._write=function(l,M,y){var B=this;B._body.push(l),y()},g.prototype._resetTimers=function(l){var M=this;commonjsGlobal.clearTimeout(M._socketTimer),M._socketTimer=null,l?(commonjsGlobal.clearTimeout(M._fetchTimer),M._fetchTimer=null):M._socketTimeout&&(M._socketTimer=commonjsGlobal.setTimeout(function(){M.emit("timeout")},M._socketTimeout))},g.prototype.abort=g.prototype.destroy=function(l){var M=this;M._destroyed=!0,M._resetTimers(!0),M._response&&(M._response._destroyed=!0),M._xhr?M._xhr.abort():M._fetchAbortController&&M._fetchAbortController.abort(),l&&M.emit("error",l)},g.prototype.end=function(l,M,y){var B=this;typeof l=="function"&&(y=l,l=void 0),m.Writable.prototype.end.call(B,l,M,y)},g.prototype.setTimeout=function(l,M){var y=this;M&&y.once("timeout",M),y._socketTimeout=l,y._resetTimers(!1)},g.prototype.flushHeaders=function(){},g.prototype.setNoDelay=function(){},g.prototype.setSocketKeepAlive=function(){};var w=["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=v;var d=Object.prototype.hasOwnProperty;function v(){for(var E={},m=0;m<arguments.length;m++){var A=arguments[m];for(var a in A)d.call(A,a)&&(E[a]=A[a])}return E}return immutable}var browser$1,hasRequiredBrowser$1;function requireBrowser$1(){return hasRequiredBrowser$1||(hasRequiredBrowser$1=1,browser$1={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$1}var punycode$2={exports:{}};var punycode$1=punycode$2.exports,hasRequiredPunycode;function requirePunycode(){return hasRequiredPunycode||(hasRequiredPunycode=1,(function(d,v){(function(E){var m=v&&!v.nodeType&&v,A=d&&!d.nodeType&&d,a=typeof commonjsGlobal=="object"&&commonjsGlobal;(a.global===a||a.window===a||a.self===a)&&(E=a);var _,g=2147483647,b=36,w=1,l=26,M=38,y=700,B=72,R=128,S="-",P=/^xn--/,T=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=b-w,V=Math.floor,Q=String.fromCharCode,ne;function ae(r){throw new RangeError(z[r])}function U(r,h){for(var q=r.length,$=[];q--;)$[q]=h(r[q]);return $}function fe(r,h){var q=r.split("@"),$="";q.length>1&&($=q[0]+"@",r=q[1]),r=r.replace(k,".");var H=r.split("."),Y=U(H,h).join(".");return $+Y}function p(r){for(var h=[],q=0,$=r.length,H,Y;q<$;)H=r.charCodeAt(q++),H>=55296&&H<=56319&&q<$?(Y=r.charCodeAt(q++),(Y&64512)==56320?h.push(((H&1023)<<10)+(Y&1023)+65536):(h.push(H),q--)):h.push(H);return h}function e(r){return U(r,function(h){var q="";return h>65535&&(h-=65536,q+=Q(h>>>10&1023|55296),h=56320|h&1023),q+=Q(h),q}).join("")}function t(r){return r-48<10?r-22:r-65<26?r-65:r-97<26?r-97:b}function n(r,h){return r+22+75*(r<26)-((h!=0)<<5)}function f(r,h,q){var $=0;for(r=q?V(r/y):r>>1,r+=V(r/h);r>j*l>>1;$+=b)r=V(r/j);return V($+(j+1)*r/(r+M))}function s(r){var h=[],q=r.length,$,H=0,Y=R,J=B,x,I,C,N,F,D,X,le,ue;for(x=r.lastIndexOf(S),x<0&&(x=0),I=0;I<x;++I)r.charCodeAt(I)>=128&&ae("not-basic"),h.push(r.charCodeAt(I));for(C=x>0?x+1:0;C<q;){for(N=H,F=1,D=b;C>=q&&ae("invalid-input"),X=t(r.charCodeAt(C++)),(X>=b||X>V((g-H)/F))&&ae("overflow"),H+=X*F,le=D<=J?w:D>=J+l?l:D-J,!(X<le);D+=b)ue=b-le,F>V(g/ue)&&ae("overflow"),F*=ue;$=h.length+1,J=f(H-N,$,N==0),V(H/$)>g-Y&&ae("overflow"),Y+=V(H/$),H%=$,h.splice(H++,0,Y)}return e(h)}function u(r){var h,q,$,H,Y,J,x,I,C,N,F,D=[],X,le,ue,pe;for(r=p(r),X=r.length,h=R,q=0,Y=B,J=0;J<X;++J)F=r[J],F<128&&D.push(Q(F));for($=H=D.length,H&&D.push(S);$<X;){for(x=g,J=0;J<X;++J)F=r[J],F>=h&&F<x&&(x=F);for(le=$+1,x-h>V((g-q)/le)&&ae("overflow"),q+=(x-h)*le,h=x,J=0;J<X;++J)if(F=r[J],F<h&&++q>g&&ae("overflow"),F==h){for(I=q,C=b;N=C<=Y?w:C>=Y+l?l:C-Y,!(I<N);C+=b)pe=I-N,ue=b-N,D.push(Q(n(N+pe%ue,0))),I=V(pe/ue);D.push(Q(n(I,0))),Y=f(q,le,$==H),q=0,++$}++q,++h}return D.join("")}function c(r){return fe(r,function(h){return P.test(h)?s(h.slice(4).toLowerCase()):h})}function o(r){return fe(r,function(h){return T.test(h)?"xn--"+u(h):h})}if(_={version:"1.4.1",ucs2:{decode:p,encode:e},decode:s,encode:u,toASCII:o,toUnicode:c},m&&A)if(d.exports==m)A.exports=_;else for(ne in _)_.hasOwnProperty(ne)&&(m[ne]=_[ne]);else E.punycode=_})(punycode$1)})(punycode$2,punycode$2.exports)),punycode$2.exports}var punycodeExports=requirePunycode();const require$$0$2=getDefaultExportFromCjs$1(punycodeExports),__viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(__viteBrowserExternal$1);var objectInspect,hasRequiredObjectInspect;function requireObjectInspect(){if(hasRequiredObjectInspect)return objectInspect;hasRequiredObjectInspect=1;var d=typeof Map=="function"&&Map.prototype,v=Object.getOwnPropertyDescriptor&&d?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,E=d&&v&&typeof v.get=="function"?v.get:null,m=d&&Map.prototype.forEach,A=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&A?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_=A&&a&&typeof a.get=="function"?a.get:null,g=A&&Set.prototype.forEach,b=typeof WeakMap=="function"&&WeakMap.prototype,w=b?WeakMap.prototype.has:null,l=typeof WeakSet=="function"&&WeakSet.prototype,M=l?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,B=y?WeakRef.prototype.deref:null,R=Boolean.prototype.valueOf,S=Object.prototype.toString,P=Function.prototype.toString,T=String.prototype.match,k=String.prototype.slice,z=String.prototype.replace,j=String.prototype.toUpperCase,V=String.prototype.toLowerCase,Q=RegExp.prototype.test,ne=Array.prototype.concat,ae=Array.prototype.join,U=Array.prototype.slice,fe=Math.floor,p=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(ie){return ie.__proto__}:null);function c(ie,he){if(ie===1/0||ie===-1/0||ie!==ie||ie&&ie>-1e3&&ie<1e3||Q.call(/e/,he))return he;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ie=="number"){var ve=ie<0?-fe(-ie):fe(ie);if(ve!==ie){var _e=String(ve),Le=k.call(he,_e.length+1);return z.call(_e,Oe,"$&_")+"."+z.call(z.call(Le,/([0-9]{3})/g,"$&_"),/_$/,"")}}return z.call(he,Oe,"$&_")}var o=require$$0$1,r=o.custom,h=le(r)?r:null,q={__proto__:null,double:'"',single:"'"},$={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};objectInspect=function ie(he,Oe,ve,_e){var Le=Oe||{};if(Ce(Le,"quoteStyle")&&!Ce(q,Le.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ce(Le,"maxStringLength")&&(typeof Le.maxStringLength=="number"?Le.maxStringLength<0&&Le.maxStringLength!==1/0:Le.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ee=Ce(Le,"customInspect")?Le.customInspect:!0;if(typeof Ee!="boolean"&&Ee!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ce(Le,"indent")&&Le.indent!==null&&Le.indent!==" "&&!(parseInt(Le.indent,10)===Le.indent&&Le.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ce(Le,"numericSeparator")&&typeof Le.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Pe=Le.numericSeparator;if(typeof he>"u")return"undefined";if(he===null)return"null";if(typeof he=="boolean")return he?"true":"false";if(typeof he=="string")return Se(he,Le);if(typeof he=="number"){if(he===0)return 1/0/he>0?"0":"-0";var He=String(he);return Pe?c(he,He):He}if(typeof he=="bigint"){var Be=String(he)+"n";return Pe?c(he,Be):Be}var Te=typeof Le.depth>"u"?5:Le.depth;if(typeof ve>"u"&&(ve=0),ve>=Te&&Te>0&&typeof he=="object")return x(he)?"[Array]":"[Object]";var Ge=ee(Le,ve);if(typeof _e>"u")_e=[];else if(Ne(_e,he)>=0)return"[Circular]";function K(Ze,Ve,Ye){if(Ve&&(_e=U.call(_e),_e.push(Ve)),Ye){var Je={depth:Le.depth};return Ce(Le,"quoteStyle")&&(Je.quoteStyle=Le.quoteStyle),ie(Ze,Je,ve+1,_e)}return ie(Ze,Le,ve+1,_e)}if(typeof he=="function"&&!C(he)){var O=ce(he),W=ge(he,K);return"[Function"+(O?": "+O:" (anonymous)")+"]"+(W.length>0?" { "+ae.call(W,", ")+" }":"")}if(le(he)){var te=n?z.call(String(he),/^(Symbol\(.*\))_[^)]*$/,"$1"):t.call(he);return typeof he=="object"&&!n?ze(te):te}if(je(he)){for(var se="<"+V.call(String(he.nodeName)),we=he.attributes||[],de=0;de<we.length;de++)se+=" "+we[de].name+"="+H(Y(we[de].value),"double",Le);return se+=">",he.childNodes&&he.childNodes.length&&(se+="..."),se+="</"+V.call(String(he.nodeName))+">",se}if(x(he)){if(he.length===0)return"[]";var qe=ge(he,K);return Ge&&!G(qe)?"["+oe(qe,Ge)+"]":"[ "+ae.call(qe,", ")+" ]"}if(N(he)){var Ue=ge(he,K);return!("cause"in Error.prototype)&&"cause"in he&&!s.call(he,"cause")?"{ ["+String(he)+"] "+ae.call(ne.call("[cause]: "+K(he.cause),Ue),", ")+" }":Ue.length===0?"["+String(he)+"]":"{ ["+String(he)+"] "+ae.call(Ue,", ")+" }"}if(typeof he=="object"&&Ee){if(h&&typeof he[h]=="function"&&o)return o(he,{depth:Te-ve});if(Ee!=="symbol"&&typeof he.inspect=="function")return he.inspect()}if(ye(he)){var xe=[];return m&&m.call(he,function(Ze,Ve){xe.push(K(Ve,he,!0)+" => "+K(Ze,he))}),L("Map",E.call(he),xe,Ge)}if(be(he)){var Ae=[];return g&&g.call(he,function(Ze){Ae.push(K(Ze,he))}),L("Set",_.call(he),Ae,Ge)}if(Me(he))return Z("WeakMap");if(Re(he))return Z("WeakSet");if(De(he))return Z("WeakRef");if(D(he))return ze(K(Number(he)));if(ue(he))return ze(K(p.call(he)));if(X(he))return ze(R.call(he));if(F(he))return ze(K(String(he)));if(typeof window<"u"&&he===window)return"{ [object Window] }";if(typeof globalThis<"u"&&he===globalThis||typeof commonjsGlobal<"u"&&he===commonjsGlobal)return"{ [object globalThis] }";if(!I(he)&&!C(he)){var Fe=ge(he,K),$e=u?u(he)===Object.prototype:he instanceof Object||he.constructor===Object,ke=he instanceof Object?"":"null prototype",We=!$e&&f&&Object(he)===he&&f in he?k.call(me(he),8,-1):ke?"Object":"",Ke=$e||typeof he.constructor!="function"?"":he.constructor.name?he.constructor.name+" ":"",Xe=Ke+(We||ke?"["+ae.call(ne.call([],We||[],ke||[]),": ")+"] ":"");return Fe.length===0?Xe+"{}":Ge?Xe+"{"+oe(Fe,Ge)+"}":Xe+"{ "+ae.call(Fe,", ")+" }"}return String(he)};function H(ie,he,Oe){var ve=Oe.quoteStyle||he,_e=q[ve];return _e+ie+_e}function Y(ie){return z.call(String(ie),/"/g,"&quot;")}function J(ie){return!f||!(typeof ie=="object"&&(f in ie||typeof ie[f]<"u"))}function x(ie){return me(ie)==="[object Array]"&&J(ie)}function I(ie){return me(ie)==="[object Date]"&&J(ie)}function C(ie){return me(ie)==="[object RegExp]"&&J(ie)}function N(ie){return me(ie)==="[object Error]"&&J(ie)}function F(ie){return me(ie)==="[object String]"&&J(ie)}function D(ie){return me(ie)==="[object Number]"&&J(ie)}function X(ie){return me(ie)==="[object Boolean]"&&J(ie)}function le(ie){if(n)return ie&&typeof ie=="object"&&ie instanceof Symbol;if(typeof ie=="symbol")return!0;if(!ie||typeof ie!="object"||!t)return!1;try{return t.call(ie),!0}catch{}return!1}function ue(ie){if(!ie||typeof ie!="object"||!p)return!1;try{return p.call(ie),!0}catch{}return!1}var pe=Object.prototype.hasOwnProperty||function(ie){return ie in this};function Ce(ie,he){return pe.call(ie,he)}function me(ie){return S.call(ie)}function ce(ie){if(ie.name)return ie.name;var he=T.call(P.call(ie),/^function\s*([\w$]+)/);return he?he[1]:null}function Ne(ie,he){if(ie.indexOf)return ie.indexOf(he);for(var Oe=0,ve=ie.length;Oe<ve;Oe++)if(ie[Oe]===he)return Oe;return-1}function ye(ie){if(!E||!ie||typeof ie!="object")return!1;try{E.call(ie);try{_.call(ie)}catch{return!0}return ie instanceof Map}catch{}return!1}function Me(ie){if(!w||!ie||typeof ie!="object")return!1;try{w.call(ie,w);try{M.call(ie,M)}catch{return!0}return ie instanceof WeakMap}catch{}return!1}function De(ie){if(!B||!ie||typeof ie!="object")return!1;try{return B.call(ie),!0}catch{}return!1}function be(ie){if(!_||!ie||typeof ie!="object")return!1;try{_.call(ie);try{E.call(ie)}catch{return!0}return ie instanceof Set}catch{}return!1}function Re(ie){if(!M||!ie||typeof ie!="object")return!1;try{M.call(ie,M);try{w.call(ie,w)}catch{return!0}return ie instanceof WeakSet}catch{}return!1}function je(ie){return!ie||typeof ie!="object"?!1:typeof HTMLElement<"u"&&ie instanceof HTMLElement?!0:typeof ie.nodeName=="string"&&typeof ie.getAttribute=="function"}function Se(ie,he){if(ie.length>he.maxStringLength){var Oe=ie.length-he.maxStringLength,ve="... "+Oe+" more character"+(Oe>1?"s":"");return Se(k.call(ie,0,he.maxStringLength),he)+ve}var _e=$[he.quoteStyle||"single"];_e.lastIndex=0;var Le=z.call(z.call(ie,_e,"\\$1"),/[\x00-\x1f]/g,Ie);return H(Le,"single",he)}function Ie(ie){var he=ie.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[he];return Oe?"\\"+Oe:"\\x"+(he<16?"0":"")+j.call(he.toString(16))}function ze(ie){return"Object("+ie+")"}function Z(ie){return ie+" { ? }"}function L(ie,he,Oe,ve){var _e=ve?oe(Oe,ve):ae.call(Oe,", ");return ie+" ("+he+") {"+_e+"}"}function G(ie){for(var he=0;he<ie.length;he++)if(Ne(ie[he],`
18
+ `)>=0)return!1;return!0}function ee(ie,he){var Oe;if(ie.indent===" ")Oe=" ";else if(typeof ie.indent=="number"&&ie.indent>0)Oe=ae.call(Array(ie.indent+1)," ");else return null;return{base:Oe,prev:ae.call(Array(he+1),Oe)}}function oe(ie,he){if(ie.length===0)return"";var Oe=`
19
+ `+he.prev+he.base;return Oe+ae.call(ie,","+Oe)+`
20
+ `+he.prev}function ge(ie,he){var Oe=x(ie),ve=[];if(Oe){ve.length=ie.length;for(var _e=0;_e<ie.length;_e++)ve[_e]=Ce(ie,_e)?he(ie[_e],ie):""}var Le=typeof e=="function"?e(ie):[],Ee;if(n){Ee={};for(var Pe=0;Pe<Le.length;Pe++)Ee["$"+Le[Pe]]=Le[Pe]}for(var He in ie)Ce(ie,He)&&(Oe&&String(Number(He))===He&&He<ie.length||n&&Ee["$"+He]instanceof Symbol||(Q.call(/[^\w$]/,He)?ve.push(he(He,ie)+": "+he(ie[He],ie)):ve.push(He+": "+he(ie[He],ie))));if(typeof e=="function")for(var Be=0;Be<Le.length;Be++)s.call(ie,Le[Be])&&ve.push("["+he(Le[Be])+"]: "+he(ie[Le[Be]],ie));return ve}return objectInspect}var sideChannelList,hasRequiredSideChannelList;function requireSideChannelList(){if(hasRequiredSideChannelList)return sideChannelList;hasRequiredSideChannelList=1;var d=requireObjectInspect(),v=requireType(),E=function(g,b,w){for(var l=g,M;(M=l.next)!=null;l=M)if(M.key===b)return l.next=M.next,w||(M.next=g.next,g.next=M),M},m=function(g,b){if(g){var w=E(g,b);return w&&w.value}},A=function(g,b,w){var l=E(g,b);l?l.value=w:g.next={key:b,next:g.next,value:w}},a=function(g,b){return g?!!E(g,b):!1},_=function(g,b){if(g)return E(g,b,!0)};return sideChannelList=function(){var b,w={assert:function(l){if(!w.has(l))throw new v("Side channel does not contain "+d(l))},delete:function(l){var M=b&&b.next,y=_(b,l);return y&&M&&M===y&&(b=void 0),!!y},get:function(l){return m(b,l)},has:function(l){return a(b,l)},set:function(l,M){b||(b={next:void 0}),A(b,l,M)}};return w},sideChannelList}var sideChannelMap,hasRequiredSideChannelMap;function requireSideChannelMap(){if(hasRequiredSideChannelMap)return sideChannelMap;hasRequiredSideChannelMap=1;var d=requireGetIntrinsic(),v=requireCallBound(),E=requireObjectInspect(),m=requireType(),A=d("%Map%",!0),a=v("Map.prototype.get",!0),_=v("Map.prototype.set",!0),g=v("Map.prototype.has",!0),b=v("Map.prototype.delete",!0),w=v("Map.prototype.size",!0);return sideChannelMap=!!A&&function(){var M,y={assert:function(B){if(!y.has(B))throw new m("Side channel does not contain "+E(B))},delete:function(B){if(M){var R=b(M,B);return w(M)===0&&(M=void 0),R}return!1},get:function(B){if(M)return a(M,B)},has:function(B){return M?g(M,B):!1},set:function(B,R){M||(M=new A),_(M,B,R)}};return y},sideChannelMap}var sideChannelWeakmap,hasRequiredSideChannelWeakmap;function requireSideChannelWeakmap(){if(hasRequiredSideChannelWeakmap)return sideChannelWeakmap;hasRequiredSideChannelWeakmap=1;var d=requireGetIntrinsic(),v=requireCallBound(),E=requireObjectInspect(),m=requireSideChannelMap(),A=requireType(),a=d("%WeakMap%",!0),_=v("WeakMap.prototype.get",!0),g=v("WeakMap.prototype.set",!0),b=v("WeakMap.prototype.has",!0),w=v("WeakMap.prototype.delete",!0);return sideChannelWeakmap=a?function(){var M,y,B={assert:function(R){if(!B.has(R))throw new A("Side channel does not contain "+E(R))},delete:function(R){if(a&&R&&(typeof R=="object"||typeof R=="function")){if(M)return w(M,R)}else if(m&&y)return y.delete(R);return!1},get:function(R){return a&&R&&(typeof R=="object"||typeof R=="function")&&M?_(M,R):y&&y.get(R)},has:function(R){return a&&R&&(typeof R=="object"||typeof R=="function")&&M?b(M,R):!!y&&y.has(R)},set:function(R,S){a&&R&&(typeof R=="object"||typeof R=="function")?(M||(M=new a),g(M,R,S)):m&&(y||(y=m()),y.set(R,S))}};return B}:m,sideChannelWeakmap}var sideChannel,hasRequiredSideChannel;function requireSideChannel(){if(hasRequiredSideChannel)return sideChannel;hasRequiredSideChannel=1;var d=requireType(),v=requireObjectInspect(),E=requireSideChannelList(),m=requireSideChannelMap(),A=requireSideChannelWeakmap(),a=A||m||E;return sideChannel=function(){var g,b={assert:function(w){if(!b.has(w))throw new d("Side channel does not contain "+v(w))},delete:function(w){return!!g&&g.delete(w)},get:function(w){return g&&g.get(w)},has:function(w){return!!g&&g.has(w)},set:function(w,l){g||(g=a()),g.set(w,l)}};return b},sideChannel}var formats,hasRequiredFormats;function requireFormats(){if(hasRequiredFormats)return formats;hasRequiredFormats=1;var d=String.prototype.replace,v=/%20/g,E={RFC1738:"RFC1738",RFC3986:"RFC3986"};return formats={default:E.RFC3986,formatters:{RFC1738:function(m){return d.call(m,v,"+")},RFC3986:function(m){return String(m)}},RFC1738:E.RFC1738,RFC3986:E.RFC3986},formats}var utils,hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var d=requireFormats(),v=requireSideChannel(),E=Object.prototype.hasOwnProperty,m=Array.isArray,A=v(),a=function(ne,ae){return A.set(ne,ae),ne},_=function(ne){return A.has(ne)},g=function(ne){return A.get(ne)},b=function(ne,ae){A.set(ne,ae)},w=(function(){for(var Q=[],ne=0;ne<256;++ne)Q.push("%"+((ne<16?"0":"")+ne.toString(16)).toUpperCase());return Q})(),l=function(ne){for(;ne.length>1;){var ae=ne.pop(),U=ae.obj[ae.prop];if(m(U)){for(var fe=[],p=0;p<U.length;++p)typeof U[p]<"u"&&fe.push(U[p]);ae.obj[ae.prop]=fe}}},M=function(ne,ae){for(var U=ae&&ae.plainObjects?{__proto__:null}:{},fe=0;fe<ne.length;++fe)typeof ne[fe]<"u"&&(U[fe]=ne[fe]);return U},y=function Q(ne,ae,U){if(!ae)return ne;if(typeof ae!="object"&&typeof ae!="function"){if(m(ne))ne.push(ae);else if(ne&&typeof ne=="object")if(_(ne)){var fe=g(ne)+1;ne[fe]=ae,b(ne,fe)}else(U&&(U.plainObjects||U.allowPrototypes)||!E.call(Object.prototype,ae))&&(ne[ae]=!0);else return[ne,ae];return ne}if(!ne||typeof ne!="object"){if(_(ae)){for(var p=Object.keys(ae),e=U&&U.plainObjects?{__proto__:null,0:ne}:{0:ne},t=0;t<p.length;t++){var n=parseInt(p[t],10);e[n+1]=ae[p[t]]}return a(e,g(ae)+1)}return[ne].concat(ae)}var f=ne;return m(ne)&&!m(ae)&&(f=M(ne,U)),m(ne)&&m(ae)?(ae.forEach(function(s,u){if(E.call(ne,u)){var c=ne[u];c&&typeof c=="object"&&s&&typeof s=="object"?ne[u]=Q(c,s,U):ne.push(s)}else ne[u]=s}),ne):Object.keys(ae).reduce(function(s,u){var c=ae[u];return E.call(s,u)?s[u]=Q(s[u],c,U):s[u]=c,s},f)},B=function(ne,ae){return Object.keys(ae).reduce(function(U,fe){return U[fe]=ae[fe],U},ne)},R=function(Q,ne,ae){var U=Q.replace(/\+/g," ");if(ae==="iso-8859-1")return U.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(U)}catch{return U}},S=1024,P=function(ne,ae,U,fe,p){if(ne.length===0)return ne;var e=ne;if(typeof ne=="symbol"?e=Symbol.prototype.toString.call(ne):typeof ne!="string"&&(e=String(ne)),U==="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+=S){for(var f=e.length>=S?e.slice(n,n+S):e,s=[],u=0;u<f.length;++u){var c=f.charCodeAt(u);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||p===d.RFC1738&&(c===40||c===41)){s[s.length]=f.charAt(u);continue}if(c<128){s[s.length]=w[c];continue}if(c<2048){s[s.length]=w[192|c>>6]+w[128|c&63];continue}if(c<55296||c>=57344){s[s.length]=w[224|c>>12]+w[128|c>>6&63]+w[128|c&63];continue}u+=1,c=65536+((c&1023)<<10|f.charCodeAt(u)&1023),s[s.length]=w[240|c>>18]+w[128|c>>12&63]+w[128|c>>6&63]+w[128|c&63]}t+=s.join("")}return t},T=function(ne){for(var ae=[{obj:{o:ne},prop:"o"}],U=[],fe=0;fe<ae.length;++fe)for(var p=ae[fe],e=p.obj[p.prop],t=Object.keys(e),n=0;n<t.length;++n){var f=t[n],s=e[f];typeof s=="object"&&s!==null&&U.indexOf(s)===-1&&(ae.push({obj:e,prop:f}),U.push(s))}return l(ae),ne},k=function(ne){return Object.prototype.toString.call(ne)==="[object RegExp]"},z=function(ne){return!ne||typeof ne!="object"?!1:!!(ne.constructor&&ne.constructor.isBuffer&&ne.constructor.isBuffer(ne))},j=function(ne,ae,U,fe){if(_(ne)){var p=g(ne)+1;return ne[p]=ae,b(ne,p),ne}var e=[].concat(ne,ae);return e.length>U?a(M(e,{plainObjects:fe}),e.length-1):e},V=function(ne,ae){if(m(ne)){for(var U=[],fe=0;fe<ne.length;fe+=1)U.push(ae(ne[fe]));return U}return ae(ne)};return utils={arrayToObject:M,assign:B,combine:j,compact:T,decode:R,encode:P,isBuffer:z,isOverflow:_,isRegExp:k,maybeMap:V,merge:y},utils}var stringify_1,hasRequiredStringify;function requireStringify(){if(hasRequiredStringify)return stringify_1;hasRequiredStringify=1;var d=requireSideChannel(),v=requireUtils(),E=requireFormats(),m=Object.prototype.hasOwnProperty,A={brackets:function(P){return P+"[]"},comma:"comma",indices:function(P,T){return P+"["+T+"]"},repeat:function(P){return P}},a=Array.isArray,_=Array.prototype.push,g=function(S,P){_.apply(S,a(P)?P:[P])},b=Date.prototype.toISOString,w=E.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:v.encode,encodeValuesOnly:!1,filter:void 0,format:w,formatter:E.formatters[w],indices:!1,serializeDate:function(P){return b.call(P)},skipNulls:!1,strictNullHandling:!1},M=function(P){return typeof P=="string"||typeof P=="number"||typeof P=="boolean"||typeof P=="symbol"||typeof P=="bigint"},y={},B=function S(P,T,k,z,j,V,Q,ne,ae,U,fe,p,e,t,n,f,s,u){for(var c=P,o=u,r=0,h=!1;(o=o.get(y))!==void 0&&!h;){var q=o.get(P);if(r+=1,typeof q<"u"){if(q===r)throw new RangeError("Cyclic object value");h=!0}typeof o.get(y)>"u"&&(r=0)}if(typeof U=="function"?c=U(T,c):c instanceof Date?c=e(c):k==="comma"&&a(c)&&(c=v.maybeMap(c,function(ue){return ue instanceof Date?e(ue):ue})),c===null){if(V)return ae&&!f?ae(T,l.encoder,s,"key",t):T;c=""}if(M(c)||v.isBuffer(c)){if(ae){var $=f?T:ae(T,l.encoder,s,"key",t);return[n($)+"="+n(ae(c,l.encoder,s,"value",t))]}return[n(T)+"="+n(String(c))]}var H=[];if(typeof c>"u")return H;var Y;if(k==="comma"&&a(c))f&&ae&&(c=v.maybeMap(c,ae)),Y=[{value:c.length>0?c.join(",")||null:void 0}];else if(a(U))Y=U;else{var J=Object.keys(c);Y=fe?J.sort(fe):J}var x=ne?String(T).replace(/\./g,"%2E"):String(T),I=z&&a(c)&&c.length===1?x+"[]":x;if(j&&a(c)&&c.length===0)return I+"[]";for(var C=0;C<Y.length;++C){var N=Y[C],F=typeof N=="object"&&N&&typeof N.value<"u"?N.value:c[N];if(!(Q&&F===null)){var D=p&&ne?String(N).replace(/\./g,"%2E"):String(N),X=a(c)?typeof k=="function"?k(I,D):I:I+(p?"."+D:"["+D+"]");u.set(P,r);var le=d();le.set(y,u),g(H,S(F,X,k,z,j,V,Q,ne,k==="comma"&&f&&a(c)?null:ae,U,fe,p,e,t,n,f,s,le))}}return H},R=function(P){if(!P)return l;if(typeof P.allowEmptyArrays<"u"&&typeof P.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof P.encodeDotInKeys<"u"&&typeof P.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(P.encoder!==null&&typeof P.encoder<"u"&&typeof P.encoder!="function")throw new TypeError("Encoder has to be a function.");var T=P.charset||l.charset;if(typeof P.charset<"u"&&P.charset!=="utf-8"&&P.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var k=E.default;if(typeof P.format<"u"){if(!m.call(E.formatters,P.format))throw new TypeError("Unknown format option provided.");k=P.format}var z=E.formatters[k],j=l.filter;(typeof P.filter=="function"||a(P.filter))&&(j=P.filter);var V;if(P.arrayFormat in A?V=P.arrayFormat:"indices"in P?V=P.indices?"indices":"repeat":V=l.arrayFormat,"commaRoundTrip"in P&&typeof P.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var Q=typeof P.allowDots>"u"?P.encodeDotInKeys===!0?!0:l.allowDots:!!P.allowDots;return{addQueryPrefix:typeof P.addQueryPrefix=="boolean"?P.addQueryPrefix:l.addQueryPrefix,allowDots:Q,allowEmptyArrays:typeof P.allowEmptyArrays=="boolean"?!!P.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:V,charset:T,charsetSentinel:typeof P.charsetSentinel=="boolean"?P.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!P.commaRoundTrip,delimiter:typeof P.delimiter>"u"?l.delimiter:P.delimiter,encode:typeof P.encode=="boolean"?P.encode:l.encode,encodeDotInKeys:typeof P.encodeDotInKeys=="boolean"?P.encodeDotInKeys:l.encodeDotInKeys,encoder:typeof P.encoder=="function"?P.encoder:l.encoder,encodeValuesOnly:typeof P.encodeValuesOnly=="boolean"?P.encodeValuesOnly:l.encodeValuesOnly,filter:j,format:k,formatter:z,serializeDate:typeof P.serializeDate=="function"?P.serializeDate:l.serializeDate,skipNulls:typeof P.skipNulls=="boolean"?P.skipNulls:l.skipNulls,sort:typeof P.sort=="function"?P.sort:null,strictNullHandling:typeof P.strictNullHandling=="boolean"?P.strictNullHandling:l.strictNullHandling}};return stringify_1=function(S,P){var T=S,k=R(P),z,j;typeof k.filter=="function"?(j=k.filter,T=j("",T)):a(k.filter)&&(j=k.filter,z=j);var V=[];if(typeof T!="object"||T===null)return"";var Q=A[k.arrayFormat],ne=Q==="comma"&&k.commaRoundTrip;z||(z=Object.keys(T)),k.sort&&z.sort(k.sort);for(var ae=d(),U=0;U<z.length;++U){var fe=z[U],p=T[fe];k.skipNulls&&p===null||g(V,B(p,fe,Q,ne,k.allowEmptyArrays,k.strictNullHandling,k.skipNulls,k.encodeDotInKeys,k.encode?k.encoder:null,k.filter,k.sort,k.allowDots,k.serializeDate,k.format,k.formatter,k.encodeValuesOnly,k.charset,ae))}var e=V.join(k.delimiter),t=k.addQueryPrefix===!0?"?":"";return k.charsetSentinel&&(k.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$1;function requireParse$1(){if(hasRequiredParse$1)return parse$1;hasRequiredParse$1=1;var d=requireUtils(),v=Object.prototype.hasOwnProperty,E=Array.isArray,m={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:d.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},A=function(B){return B.replace(/&#(\d+);/g,function(R,S){return String.fromCharCode(parseInt(S,10))})},a=function(B,R,S){if(B&&typeof B=="string"&&R.comma&&B.indexOf(",")>-1)return B.split(",");if(R.throwOnLimitExceeded&&S>=R.arrayLimit)throw new RangeError("Array limit exceeded. Only "+R.arrayLimit+" element"+(R.arrayLimit===1?"":"s")+" allowed in an array.");return B},_="utf8=%26%2310003%3B",g="utf8=%E2%9C%93",b=function(R,S){var P={__proto__:null},T=S.ignoreQueryPrefix?R.replace(/^\?/,""):R;T=T.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var k=S.parameterLimit===1/0?void 0:S.parameterLimit,z=T.split(S.delimiter,S.throwOnLimitExceeded?k+1:k);if(S.throwOnLimitExceeded&&z.length>k)throw new RangeError("Parameter limit exceeded. Only "+k+" parameter"+(k===1?"":"s")+" allowed.");var j=-1,V,Q=S.charset;if(S.charsetSentinel)for(V=0;V<z.length;++V)z[V].indexOf("utf8=")===0&&(z[V]===g?Q="utf-8":z[V]===_&&(Q="iso-8859-1"),j=V,V=z.length);for(V=0;V<z.length;++V)if(V!==j){var ne=z[V],ae=ne.indexOf("]="),U=ae===-1?ne.indexOf("="):ae+1,fe,p;if(U===-1?(fe=S.decoder(ne,m.decoder,Q,"key"),p=S.strictNullHandling?null:""):(fe=S.decoder(ne.slice(0,U),m.decoder,Q,"key"),fe!==null&&(p=d.maybeMap(a(ne.slice(U+1),S,E(P[fe])?P[fe].length:0),function(t){return S.decoder(t,m.decoder,Q,"value")}))),p&&S.interpretNumericEntities&&Q==="iso-8859-1"&&(p=A(String(p))),ne.indexOf("[]=")>-1&&(p=E(p)?[p]:p),fe!==null){var e=v.call(P,fe);e&&S.duplicates==="combine"?P[fe]=d.combine(P[fe],p,S.arrayLimit,S.plainObjects):(!e||S.duplicates==="last")&&(P[fe]=p)}}return P},w=function(B,R,S,P){var T=0;if(B.length>0&&B[B.length-1]==="[]"){var k=B.slice(0,-1).join("");T=Array.isArray(R)&&R[k]?R[k].length:0}for(var z=P?R:a(R,S,T),j=B.length-1;j>=0;--j){var V,Q=B[j];if(Q==="[]"&&S.parseArrays)d.isOverflow(z)?V=z:V=S.allowEmptyArrays&&(z===""||S.strictNullHandling&&z===null)?[]:d.combine([],z,S.arrayLimit,S.plainObjects);else{V=S.plainObjects?{__proto__:null}:{};var ne=Q.charAt(0)==="["&&Q.charAt(Q.length-1)==="]"?Q.slice(1,-1):Q,ae=S.decodeDotInKeys?ne.replace(/%2E/g,"."):ne,U=parseInt(ae,10);!S.parseArrays&&ae===""?V={0:z}:!isNaN(U)&&Q!==ae&&String(U)===ae&&U>=0&&S.parseArrays&&U<=S.arrayLimit?(V=[],V[U]=z):ae!=="__proto__"&&(V[ae]=z)}z=V}return z},l=function(R,S){var P=S.allowDots?R.replace(/\.([^.[]+)/g,"[$1]"):R;if(S.depth<=0)return!S.plainObjects&&v.call(Object.prototype,P)&&!S.allowPrototypes?void 0:[P];var T=/(\[[^[\]]*])/,k=/(\[[^[\]]*])/g,z=T.exec(P),j=z?P.slice(0,z.index):P,V=[];if(j){if(!S.plainObjects&&v.call(Object.prototype,j)&&!S.allowPrototypes)return;V.push(j)}for(var Q=0;(z=k.exec(P))!==null&&Q<S.depth;){Q+=1;var ne=z[1].slice(1,-1);if(!S.plainObjects&&v.call(Object.prototype,ne)&&!S.allowPrototypes)return;V.push(z[1])}if(z){if(S.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+S.depth+" and strictDepth is true");V.push("["+P.slice(z.index)+"]")}return V},M=function(R,S,P,T){if(R){var k=l(R,P);if(k)return w(k,S,P,T)}},y=function(R){if(!R)return m;if(typeof R.allowEmptyArrays<"u"&&typeof R.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof R.decodeDotInKeys<"u"&&typeof R.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(R.decoder!==null&&typeof R.decoder<"u"&&typeof R.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof R.charset<"u"&&R.charset!=="utf-8"&&R.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof R.throwOnLimitExceeded<"u"&&typeof R.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var S=typeof R.charset>"u"?m.charset:R.charset,P=typeof R.duplicates>"u"?m.duplicates:R.duplicates;if(P!=="combine"&&P!=="first"&&P!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var T=typeof R.allowDots>"u"?R.decodeDotInKeys===!0?!0:m.allowDots:!!R.allowDots;return{allowDots:T,allowEmptyArrays:typeof R.allowEmptyArrays=="boolean"?!!R.allowEmptyArrays:m.allowEmptyArrays,allowPrototypes:typeof R.allowPrototypes=="boolean"?R.allowPrototypes:m.allowPrototypes,allowSparse:typeof R.allowSparse=="boolean"?R.allowSparse:m.allowSparse,arrayLimit:typeof R.arrayLimit=="number"?R.arrayLimit:m.arrayLimit,charset:S,charsetSentinel:typeof R.charsetSentinel=="boolean"?R.charsetSentinel:m.charsetSentinel,comma:typeof R.comma=="boolean"?R.comma:m.comma,decodeDotInKeys:typeof R.decodeDotInKeys=="boolean"?R.decodeDotInKeys:m.decodeDotInKeys,decoder:typeof R.decoder=="function"?R.decoder:m.decoder,delimiter:typeof R.delimiter=="string"||d.isRegExp(R.delimiter)?R.delimiter:m.delimiter,depth:typeof R.depth=="number"||R.depth===!1?+R.depth:m.depth,duplicates:P,ignoreQueryPrefix:R.ignoreQueryPrefix===!0,interpretNumericEntities:typeof R.interpretNumericEntities=="boolean"?R.interpretNumericEntities:m.interpretNumericEntities,parameterLimit:typeof R.parameterLimit=="number"?R.parameterLimit:m.parameterLimit,parseArrays:R.parseArrays!==!1,plainObjects:typeof R.plainObjects=="boolean"?R.plainObjects:m.plainObjects,strictDepth:typeof R.strictDepth=="boolean"?!!R.strictDepth:m.strictDepth,strictNullHandling:typeof R.strictNullHandling=="boolean"?R.strictNullHandling:m.strictNullHandling,throwOnLimitExceeded:typeof R.throwOnLimitExceeded=="boolean"?R.throwOnLimitExceeded:!1}};return parse$1=function(B,R){var S=y(R);if(B===""||B===null||typeof B>"u")return S.plainObjects?{__proto__:null}:{};for(var P=typeof B=="string"?b(B,S):B,T=S.plainObjects?{__proto__:null}:{},k=Object.keys(P),z=0;z<k.length;++z){var j=k[z],V=M(j,P[j],S,typeof B=="string");T=d.merge(T,V,S)}return S.allowSparse===!0?T:d.compact(T)},parse$1}var lib$1,hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1;hasRequiredLib$1=1;var d=requireStringify(),v=requireParse$1(),E=requireFormats();return lib$1={formats:E,parse:v,stringify:d},lib$1}var libExports$1=requireLib$1();const require$$1$1=getDefaultExportFromCjs$1(libExports$1);var punycode=require$$0$2;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(d,v,E){if(d&&typeof d=="object"&&d instanceof Url)return d;var m=new Url;return m.parse(d,v,E),m}Url.prototype.parse=function(d,v,E){if(typeof d!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof d);var m=d.indexOf("?"),A=m!==-1&&m<d.indexOf("#")?"?":"#",a=d.split(A),_=/\\/g;a[0]=a[0].replace(_,"/"),d=a.join(A);var g=d;if(g=g.trim(),!E&&d.split("#").length===1){var b=simplePathPattern.exec(g);if(b)return this.path=g,this.href=g,this.pathname=b[1],b[2]?(this.search=b[2],v?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):v&&(this.search="",this.query={}),this}var w=protocolPattern.exec(g);if(w){w=w[0];var l=w.toLowerCase();this.protocol=l,g=g.substr(w.length)}if(E||w||g.match(/^\/\/[^@/]+@[^@/]+/)){var M=g.substr(0,2)==="//";M&&!(w&&hostlessProtocol[w])&&(g=g.substr(2),this.slashes=!0)}if(!hostlessProtocol[w]&&(M||w&&!slashedProtocol[w])){for(var y=-1,B=0;B<hostEndingChars.length;B++){var R=g.indexOf(hostEndingChars[B]);R!==-1&&(y===-1||R<y)&&(y=R)}var S,P;y===-1?P=g.lastIndexOf("@"):P=g.lastIndexOf("@",y),P!==-1&&(S=g.slice(0,P),g=g.slice(P+1),this.auth=decodeURIComponent(S)),y=-1;for(var B=0;B<nonHostChars.length;B++){var R=g.indexOf(nonHostChars[B]);R!==-1&&(y===-1||R<y)&&(y=R)}y===-1&&(y=g.length),this.host=g.slice(0,y),g=g.slice(y),this.parseHost(),this.hostname=this.hostname||"";var T=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!T)for(var k=this.hostname.split(/\./),B=0,z=k.length;B<z;B++){var j=k[B];if(j&&!j.match(hostnamePartPattern)){for(var V="",Q=0,ne=j.length;Q<ne;Q++)j.charCodeAt(Q)>127?V+="x":V+=j[Q];if(!V.match(hostnamePartPattern)){var ae=k.slice(0,B),U=k.slice(B+1),fe=j.match(hostnamePartStart);fe&&(ae.push(fe[1]),U.unshift(fe[2])),U.length&&(g="/"+U.join(".")+g),this.hostname=ae.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",e=this.hostname||"";this.host=e+p,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),g[0]!=="/"&&(g="/"+g))}if(!unsafeProtocol[l])for(var B=0,z=autoEscape.length;B<z;B++){var t=autoEscape[B];if(g.indexOf(t)!==-1){var n=encodeURIComponent(t);n===t&&(n=escape(t)),g=g.split(t).join(n)}}var f=g.indexOf("#");f!==-1&&(this.hash=g.substr(f),g=g.slice(0,f));var s=g.indexOf("?");if(s!==-1?(this.search=g.substr(s),this.query=g.substr(s+1),v&&(this.query=querystring.parse(this.query)),g=g.slice(0,s)):v&&(this.search="",this.query={}),g&&(this.pathname=g),slashedProtocol[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var p=this.pathname||"",u=this.search||"";this.path=p+u}return this.href=this.format(),this};function urlFormat(d){return typeof d=="string"&&(d=urlParse(d)),d instanceof Url?d.format():Url.prototype.format.call(d)}Url.prototype.format=function(){var d=this.auth||"";d&&(d=encodeURIComponent(d),d=d.replace(/%3A/i,":"),d+="@");var v=this.protocol||"",E=this.pathname||"",m=this.hash||"",A=!1,a="";this.host?A=d+this.host:this.hostname&&(A=d+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(A+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=querystring.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var _=this.search||a&&"?"+a||"";return v&&v.substr(-1)!==":"&&(v+=":"),this.slashes||(!v||slashedProtocol[v])&&A!==!1?(A="//"+(A||""),E&&E.charAt(0)!=="/"&&(E="/"+E)):A||(A=""),m&&m.charAt(0)!=="#"&&(m="#"+m),_&&_.charAt(0)!=="?"&&(_="?"+_),E=E.replace(/[?#]/g,function(g){return encodeURIComponent(g)}),_=_.replace("#","%23"),v+A+E+_+m};function urlResolve(d,v){return urlParse(d,!1,!0).resolve(v)}Url.prototype.resolve=function(d){return this.resolveObject(urlParse(d,!1,!0)).format()};function urlResolveObject(d,v){return d?urlParse(d,!1,!0).resolveObject(v):v}Url.prototype.resolveObject=function(d){if(typeof d=="string"){var v=new Url;v.parse(d,!1,!0),d=v}for(var E=new Url,m=Object.keys(this),A=0;A<m.length;A++){var a=m[A];E[a]=this[a]}if(E.hash=d.hash,d.href==="")return E.href=E.format(),E;if(d.slashes&&!d.protocol){for(var _=Object.keys(d),g=0;g<_.length;g++){var b=_[g];b!=="protocol"&&(E[b]=d[b])}return slashedProtocol[E.protocol]&&E.hostname&&!E.pathname&&(E.pathname="/",E.path=E.pathname),E.href=E.format(),E}if(d.protocol&&d.protocol!==E.protocol){if(!slashedProtocol[d.protocol]){for(var w=Object.keys(d),l=0;l<w.length;l++){var M=w[l];E[M]=d[M]}return E.href=E.format(),E}if(E.protocol=d.protocol,!d.host&&!hostlessProtocol[d.protocol]){for(var z=(d.pathname||"").split("/");z.length&&!(d.host=z.shift()););d.host||(d.host=""),d.hostname||(d.hostname=""),z[0]!==""&&z.unshift(""),z.length<2&&z.unshift(""),E.pathname=z.join("/")}else E.pathname=d.pathname;if(E.search=d.search,E.query=d.query,E.host=d.host||"",E.auth=d.auth,E.hostname=d.hostname||d.host,E.port=d.port,E.pathname||E.search){var y=E.pathname||"",B=E.search||"";E.path=y+B}return E.slashes=E.slashes||d.slashes,E.href=E.format(),E}var R=E.pathname&&E.pathname.charAt(0)==="/",S=d.host||d.pathname&&d.pathname.charAt(0)==="/",P=S||R||E.host&&d.pathname,T=P,k=E.pathname&&E.pathname.split("/")||[],z=d.pathname&&d.pathname.split("/")||[],j=E.protocol&&!slashedProtocol[E.protocol];if(j&&(E.hostname="",E.port=null,E.host&&(k[0]===""?k[0]=E.host:k.unshift(E.host)),E.host="",d.protocol&&(d.hostname=null,d.port=null,d.host&&(z[0]===""?z[0]=d.host:z.unshift(d.host)),d.host=null),P=P&&(z[0]===""||k[0]==="")),S)E.host=d.host||d.host===""?d.host:E.host,E.hostname=d.hostname||d.hostname===""?d.hostname:E.hostname,E.search=d.search,E.query=d.query,k=z;else if(z.length)k||(k=[]),k.pop(),k=k.concat(z),E.search=d.search,E.query=d.query;else if(d.search!=null){if(j){E.host=k.shift(),E.hostname=E.host;var V=E.host&&E.host.indexOf("@")>0?E.host.split("@"):!1;V&&(E.auth=V.shift(),E.hostname=V.shift(),E.host=E.hostname)}return E.search=d.search,E.query=d.query,(E.pathname!==null||E.search!==null)&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.href=E.format(),E}if(!k.length)return E.pathname=null,E.search?E.path="/"+E.search:E.path=null,E.href=E.format(),E;for(var Q=k.slice(-1)[0],ne=(E.host||d.host||k.length>1)&&(Q==="."||Q==="..")||Q==="",ae=0,U=k.length;U>=0;U--)Q=k[U],Q==="."?k.splice(U,1):Q===".."?(k.splice(U,1),ae++):ae&&(k.splice(U,1),ae--);if(!P&&!T)for(;ae--;ae)k.unshift("..");P&&k[0]!==""&&(!k[0]||k[0].charAt(0)!=="/")&&k.unshift(""),ne&&k.join("/").substr(-1)!=="/"&&k.push("");var fe=k[0]===""||k[0]&&k[0].charAt(0)==="/";if(j){E.hostname=fe?"":k.length?k.shift():"",E.host=E.hostname;var V=E.host&&E.host.indexOf("@")>0?E.host.split("@"):!1;V&&(E.auth=V.shift(),E.hostname=V.shift(),E.host=E.hostname)}return P=P||E.host&&k.length,P&&!fe&&k.unshift(""),k.length>0?E.pathname=k.join("/"):(E.pathname=null,E.path=null),(E.pathname!==null||E.search!==null)&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.auth=d.auth||E.auth,E.slashes=E.slashes||d.slashes,E.href=E.format(),E};Url.prototype.parseHost=function(){var d=this.host,v=portPattern.exec(d);v&&(v=v[0],v!==":"&&(this.port=v.substr(1)),d=d.substr(0,d.length-v.length)),d&&(this.hostname=d)};var parse=urlParse,resolve$1=urlResolve,resolveObject=urlResolveObject,format=urlFormat,Url_1=Url;function normalizeArray(d,v){for(var E=0,m=d.length-1;m>=0;m--){var A=d[m];A==="."?d.splice(m,1):A===".."?(d.splice(m,1),E++):E&&(d.splice(m,1),E--)}if(v)for(;E--;E)d.unshift("..");return d}function resolve(){for(var d="",v=!1,E=arguments.length-1;E>=-1&&!v;E--){var m=E>=0?arguments[E]:"/";if(typeof m!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!m)continue;d=m+"/"+d,v=m.charAt(0)==="/"}return d=normalizeArray(filter(d.split("/"),function(A){return!!A}),!v).join("/"),(v?"/":"")+d||"."}function filter(d,v){if(d.filter)return d.filter(v);for(var E=[],m=0;m<d.length;m++)v(d[m],m,d)&&E.push(d[m]);return E}var _globalThis=(function(d){function v(){var m=this||self;return delete d.prototype.__magic__,m}if(typeof globalThis=="object")return globalThis;if(this)return v();d.defineProperty(d.prototype,"__magic__",{configurable:!0,get:v});var E=__magic__;return E})(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(d){var v=d??null;return!!(v!==null&&v?.href&&v?.origin)}function getPathFromURLPosix(d){if(d.hostname!=="")throw new TypeError('File URL host must be "localhost" or empty on browser');for(var v=d.pathname,E=0;E<v.length;E++)if(v[E]==="%"){var m=v.codePointAt(E+2)|32;if(v[E+1]==="2"&&m===102)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(v)}function encodePathChars(d){return d.includes("%")&&(d=d.replace(percentRegEx,"%25")),d.includes("\\")&&(d=d.replace(backslashRegEx,"%5C")),d.includes(`
22
+ `)&&(d=d.replace(newlineRegEx,"%0A")),d.includes("\r")&&(d=d.replace(carriageReturnRegEx,"%0D")),d.includes(" ")&&(d=d.replace(tabRegEx,"%09")),d}var domainToASCII=function d(v){if(typeof v>"u")throw new TypeError('The "domain" argument must be specified');return new URL("http://"+v).hostname},domainToUnicode=function d(v){if(typeof v>"u")throw new TypeError('The "domain" argument must be specified');return new URL("http://"+v).hostname},pathToFileURL=function d(v){var E=new URL("file://"),m=resolve(v),A=v.charCodeAt(v.length-1);return A===CHAR_FORWARD_SLASH&&m[m.length-1]!=="/"&&(m+="/"),E.pathname=encodePathChars(m),E},fileURLToPath=function d(v){if(!isURLInstance(v)&&typeof v!="string")throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof v+" ("+v+")");var E=new URL(v);if(E.protocol!=="file:")throw new TypeError("The URL must be of scheme file");return getPathFromURLPosix(E)},formatImportWithOverloads=function d(v,E){var m,A,a,_;if(E===void 0&&(E={}),!(v instanceof URL))return formatImport(v);if(typeof E!="object"||E===null)throw new TypeError('The "options" argument must be of type object.');var g=(m=E.auth)!=null?m:!0,b=(A=E.fragment)!=null?A:!0,w=(a=E.search)!=null?a:!0;(_=E.unicode)!=null;var l=new URL(v.toString());return g||(l.username="",l.password=""),b||(l.hash=""),w||(l.search=""),l.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(d){var v=requireRequest(),E=requireResponse(),m=requireImmutable(),A=requireBrowser$1(),a=require$$1,_=d;_.request=function(g,b){typeof g=="string"?g=a.parse(g):g=m(g);var w=commonjsGlobal.location.protocol.search(/^https?:$/)===-1?"http:":"",l=g.protocol||w,M=g.hostname||g.host,y=g.port,B=g.path||"/";M&&M.indexOf(":")!==-1&&(M="["+M+"]"),g.url=(M?l+"//"+M:"")+(y?":"+y:"")+B,g.method=(g.method||"GET").toUpperCase(),g.headers=g.headers||{};var R=new v(g);return b&&R.on("response",b),R},_.get=function(b,w){var l=_.request(b,w);return l.end(),l},_.ClientRequest=v,_.IncomingMessage=E.IncomingMessage,_.Agent=function(){},_.Agent.defaultMaxSockets=4,_.globalAgent=new _.Agent,_.STATUS_CODES=A,_.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(d){var v=requireStreamHttp(),E=require$$1,m=d.exports;for(var A in v)v.hasOwnProperty(A)&&(m[A]=v[A]);m.request=function(_,g){return _=a(_),v.request.call(this,_,g)},m.get=function(_,g){return _=a(_),v.get.call(this,_,g)};function a(_){if(typeof _=="string"&&(_=E.parse(_)),_.protocol||(_.protocol="https:"),_.protocol!=="https:")throw new Error('Protocol "'+_.protocol+'" not supported. Expected "https:"');return _}})(httpsBrowserify)),httpsBrowserify.exports}var httpsBrowserifyExports=requireHttpsBrowserify();const https=getDefaultExportFromCjs$1(httpsBrowserifyExports);var is,hasRequiredIs;function requireIs(){if(hasRequiredIs)return is;hasRequiredIs=1;const d=S=>typeof S<"u"&&S!==null;return is={defined:d,object:S=>typeof S=="object",plainObject:S=>Object.prototype.toString.call(S)==="[object Object]",fn:S=>typeof S=="function",bool:S=>typeof S=="boolean",buffer:S=>S instanceof Buffer,typedArray:S=>{if(d(S))switch(S.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},arrayBuffer:S=>S instanceof ArrayBuffer,string:S=>typeof S=="string"&&S.length>0,number:S=>typeof S=="number"&&!Number.isNaN(S),integer:S=>Number.isInteger(S),inRange:(S,P,T)=>S>=P&&S<=T,inArray:(S,P)=>P.includes(S),invalidParameterError:(S,P,T)=>new Error(`Expected ${P} for ${S} but received ${T} of type ${typeof T}`),nativeError:(S,P)=>(P.message=S.message,P)},is}function commonjsRequire(d){throw new Error('Could not dynamically require "'+d+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sharp$1={exports:{}},empty=null;const empty$1=Object.freeze(Object.defineProperty({__proto__:null,default:empty},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(empty$1);var process_1,hasRequiredProcess;function requireProcess(){if(hasRequiredProcess)return process_1;hasRequiredProcess=1;const d=()=>process$1.platform==="linux";let v=null;return process_1={isLinux:d,getReport:()=>{if(!v)if(d()&&process$1.report){const m=process$1.report.excludeNetwork;process$1.report.excludeNetwork=!0,v=process$1.report.getReport(),process$1.report.excludeNetwork=m}else v={};return v}},process_1}var filesystem,hasRequiredFilesystem;function requireFilesystem(){if(hasRequiredFilesystem)return filesystem;hasRequiredFilesystem=1;const d=require$$0,v="/usr/bin/ldd",E="/proc/self/exe",m=2048;return filesystem={LDD_PATH:v,SELF_PATH:E,readFileSync:_=>{const g=d.openSync(_,"r"),b=Buffer.alloc(m),w=d.readSync(g,b,0,m,0);return d.close(g,()=>{}),b.subarray(0,w)},readFile:_=>new Promise((g,b)=>{d.open(_,"r",(w,l)=>{if(w)b(w);else{const M=Buffer.alloc(m);d.read(l,M,0,m,0,(y,B)=>{g(M.subarray(0,B)),d.close(l,()=>{})})}})})},filesystem}var elf,hasRequiredElf;function requireElf(){return hasRequiredElf||(hasRequiredElf=1,elf={interpreterPath:v=>{if(v.length<64||v.readUInt32BE(0)!==2135247942||v.readUInt8(4)!==2||v.readUInt8(5)!==1)return null;const E=v.readUInt32LE(32),m=v.readUInt16LE(54),A=v.readUInt16LE(56);for(let a=0;a<A;a++){const _=E+a*m;if(v.readUInt32LE(_)===3){const b=v.readUInt32LE(_+8),w=v.readUInt32LE(_+32);return v.subarray(b,b+w).toString().replace(/\0.*$/g,"")}}return null}}),elf}var detectLibc,hasRequiredDetectLibc;function requireDetectLibc(){if(hasRequiredDetectLibc)return detectLibc;hasRequiredDetectLibc=1;const d=require$$0,{isLinux:v,getReport:E}=requireProcess(),{LDD_PATH:m,SELF_PATH:A,readFile:a,readFileSync:_}=requireFilesystem(),{interpreterPath:g}=requireElf();let b,w,l;const M="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";let y="";const B=()=>y||new Promise(q=>{d.exec(M,($,H)=>{y=$?" ":H,q(y)})}),R=()=>{if(!y)try{y=d.execSync(M,{encoding:"utf8"})}catch{y=" "}return y},S="glibc",P=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,T="musl",k=q=>q.includes("libc.musl-")||q.includes("ld-musl-"),z=()=>{const q=E();return q.header&&q.header.glibcVersionRuntime?S:Array.isArray(q.sharedObjects)&&q.sharedObjects.some(k)?T:null},j=q=>{const[$,H]=q.split(/[\r\n]+/);return $&&$.includes(S)?S:H&&H.includes(T)?T:null},V=q=>{if(q){if(q.includes("/ld-musl-"))return T;if(q.includes("/ld-linux-"))return S}return null},Q=q=>(q=q.toString(),q.includes("musl")?T:q.includes("GNU C Library")?S:null),ne=async()=>{if(w!==void 0)return w;w=null;try{const q=await a(m);w=Q(q)}catch{}return w},ae=()=>{if(w!==void 0)return w;w=null;try{const q=_(m);w=Q(q)}catch{}return w},U=async()=>{if(b!==void 0)return b;b=null;try{const q=await a(A),$=g(q);b=V($)}catch{}return b},fe=()=>{if(b!==void 0)return b;b=null;try{const q=_(A),$=g(q);b=V($)}catch{}return b},p=async()=>{let q=null;if(v()&&(q=await U(),!q&&(q=await ne(),q||(q=z()),!q))){const $=await B();q=j($)}return q},e=()=>{let q=null;if(v()&&(q=fe(),!q&&(q=ae(),q||(q=z()),!q))){const $=R();q=j($)}return q},t=async()=>v()&&await p()!==S,n=()=>v()&&e()!==S,f=async()=>{if(l!==void 0)return l;l=null;try{const $=(await a(m)).match(P);$&&(l=$[1])}catch{}return l},s=()=>{if(l!==void 0)return l;l=null;try{const $=_(m).match(P);$&&(l=$[1])}catch{}return l},u=()=>{const q=E();return q.header&&q.header.glibcVersionRuntime?q.header.glibcVersionRuntime:null},c=q=>q.trim().split(/\s+/)[1],o=q=>{const[$,H,Y]=q.split(/[\r\n]+/);return $&&$.includes(S)?c($):H&&Y&&H.includes(T)?c(Y):null};return detectLibc={GLIBC:S,MUSL:T,family:p,familySync:e,isNonGlibcLinux:t,isNonGlibcLinuxSync:n,version:async()=>{let q=null;if(v()&&(q=await f(),q||(q=u()),!q)){const $=await B();q=o($)}return q},versionSync:()=>{let q=null;if(v()&&(q=s(),q||(q=u()),!q)){const $=R();q=o($)}return q}},detectLibc}var debug_1,hasRequiredDebug;function requireDebug(){return hasRequiredDebug||(hasRequiredDebug=1,debug_1=typeof process$1=="object"&&process$1.env&&process$1.env.NODE_DEBUG&&/\bsemver\b/i.test(process$1.env.NODE_DEBUG)?(...v)=>console.error("SEMVER",...v):()=>{}),debug_1}var constants,hasRequiredConstants;function requireConstants(){if(hasRequiredConstants)return constants;hasRequiredConstants=1;const d="2.0.0",v=256,E=Number.MAX_SAFE_INTEGER||9007199254740991,m=16,A=v-6;return constants={MAX_LENGTH:v,MAX_SAFE_COMPONENT_LENGTH:m,MAX_SAFE_BUILD_LENGTH:A,MAX_SAFE_INTEGER:E,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:d,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},constants}var re={exports:{}},hasRequiredRe;function requireRe(){return hasRequiredRe||(hasRequiredRe=1,(function(d,v){const{MAX_SAFE_COMPONENT_LENGTH:E,MAX_SAFE_BUILD_LENGTH:m,MAX_LENGTH:A}=requireConstants(),a=requireDebug();v=d.exports={};const _=v.re=[],g=v.safeRe=[],b=v.src=[],w=v.safeSrc=[],l=v.t={};let M=0;const y="[a-zA-Z0-9-]",B=[["\\s",1],["\\d",A],[y,m]],R=P=>{for(const[T,k]of B)P=P.split(`${T}*`).join(`${T}{0,${k}}`).split(`${T}+`).join(`${T}{1,${k}}`);return P},S=(P,T,k)=>{const z=R(T),j=M++;a(P,j,T),l[P]=j,b[j]=T,w[j]=z,_[j]=new RegExp(T,k?"g":void 0),g[j]=new RegExp(z,k?"g":void 0)};S("NUMERICIDENTIFIER","0|[1-9]\\d*"),S("NUMERICIDENTIFIERLOOSE","\\d+"),S("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),S("MAINVERSION",`(${b[l.NUMERICIDENTIFIER]})\\.(${b[l.NUMERICIDENTIFIER]})\\.(${b[l.NUMERICIDENTIFIER]})`),S("MAINVERSIONLOOSE",`(${b[l.NUMERICIDENTIFIERLOOSE]})\\.(${b[l.NUMERICIDENTIFIERLOOSE]})\\.(${b[l.NUMERICIDENTIFIERLOOSE]})`),S("PRERELEASEIDENTIFIER",`(?:${b[l.NONNUMERICIDENTIFIER]}|${b[l.NUMERICIDENTIFIER]})`),S("PRERELEASEIDENTIFIERLOOSE",`(?:${b[l.NONNUMERICIDENTIFIER]}|${b[l.NUMERICIDENTIFIERLOOSE]})`),S("PRERELEASE",`(?:-(${b[l.PRERELEASEIDENTIFIER]}(?:\\.${b[l.PRERELEASEIDENTIFIER]})*))`),S("PRERELEASELOOSE",`(?:-?(${b[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[l.PRERELEASEIDENTIFIERLOOSE]})*))`),S("BUILDIDENTIFIER",`${y}+`),S("BUILD",`(?:\\+(${b[l.BUILDIDENTIFIER]}(?:\\.${b[l.BUILDIDENTIFIER]})*))`),S("FULLPLAIN",`v?${b[l.MAINVERSION]}${b[l.PRERELEASE]}?${b[l.BUILD]}?`),S("FULL",`^${b[l.FULLPLAIN]}$`),S("LOOSEPLAIN",`[v=\\s]*${b[l.MAINVERSIONLOOSE]}${b[l.PRERELEASELOOSE]}?${b[l.BUILD]}?`),S("LOOSE",`^${b[l.LOOSEPLAIN]}$`),S("GTLT","((?:<|>)?=?)"),S("XRANGEIDENTIFIERLOOSE",`${b[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),S("XRANGEIDENTIFIER",`${b[l.NUMERICIDENTIFIER]}|x|X|\\*`),S("XRANGEPLAIN",`[v=\\s]*(${b[l.XRANGEIDENTIFIER]})(?:\\.(${b[l.XRANGEIDENTIFIER]})(?:\\.(${b[l.XRANGEIDENTIFIER]})(?:${b[l.PRERELEASE]})?${b[l.BUILD]}?)?)?`),S("XRANGEPLAINLOOSE",`[v=\\s]*(${b[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[l.XRANGEIDENTIFIERLOOSE]})(?:${b[l.PRERELEASELOOSE]})?${b[l.BUILD]}?)?)?`),S("XRANGE",`^${b[l.GTLT]}\\s*${b[l.XRANGEPLAIN]}$`),S("XRANGELOOSE",`^${b[l.GTLT]}\\s*${b[l.XRANGEPLAINLOOSE]}$`),S("COERCEPLAIN",`(^|[^\\d])(\\d{1,${E}})(?:\\.(\\d{1,${E}}))?(?:\\.(\\d{1,${E}}))?`),S("COERCE",`${b[l.COERCEPLAIN]}(?:$|[^\\d])`),S("COERCEFULL",b[l.COERCEPLAIN]+`(?:${b[l.PRERELEASE]})?(?:${b[l.BUILD]})?(?:$|[^\\d])`),S("COERCERTL",b[l.COERCE],!0),S("COERCERTLFULL",b[l.COERCEFULL],!0),S("LONETILDE","(?:~>?)"),S("TILDETRIM",`(\\s*)${b[l.LONETILDE]}\\s+`,!0),v.tildeTrimReplace="$1~",S("TILDE",`^${b[l.LONETILDE]}${b[l.XRANGEPLAIN]}$`),S("TILDELOOSE",`^${b[l.LONETILDE]}${b[l.XRANGEPLAINLOOSE]}$`),S("LONECARET","(?:\\^)"),S("CARETTRIM",`(\\s*)${b[l.LONECARET]}\\s+`,!0),v.caretTrimReplace="$1^",S("CARET",`^${b[l.LONECARET]}${b[l.XRANGEPLAIN]}$`),S("CARETLOOSE",`^${b[l.LONECARET]}${b[l.XRANGEPLAINLOOSE]}$`),S("COMPARATORLOOSE",`^${b[l.GTLT]}\\s*(${b[l.LOOSEPLAIN]})$|^$`),S("COMPARATOR",`^${b[l.GTLT]}\\s*(${b[l.FULLPLAIN]})$|^$`),S("COMPARATORTRIM",`(\\s*)${b[l.GTLT]}\\s*(${b[l.LOOSEPLAIN]}|${b[l.XRANGEPLAIN]})`,!0),v.comparatorTrimReplace="$1$2$3",S("HYPHENRANGE",`^\\s*(${b[l.XRANGEPLAIN]})\\s+-\\s+(${b[l.XRANGEPLAIN]})\\s*$`),S("HYPHENRANGELOOSE",`^\\s*(${b[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[l.XRANGEPLAINLOOSE]})\\s*$`),S("STAR","(<|>)?=?\\s*\\*"),S("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),S("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(re,re.exports)),re.exports}var parseOptions_1,hasRequiredParseOptions;function requireParseOptions(){if(hasRequiredParseOptions)return parseOptions_1;hasRequiredParseOptions=1;const d=Object.freeze({loose:!0}),v=Object.freeze({});return parseOptions_1=m=>m?typeof m!="object"?d:m:v,parseOptions_1}var identifiers,hasRequiredIdentifiers;function requireIdentifiers(){if(hasRequiredIdentifiers)return identifiers;hasRequiredIdentifiers=1;const d=/^[0-9]+$/,v=(m,A)=>{if(typeof m=="number"&&typeof A=="number")return m===A?0:m<A?-1:1;const a=d.test(m),_=d.test(A);return a&&_&&(m=+m,A=+A),m===A?0:a&&!_?-1:_&&!a?1:m<A?-1:1};return identifiers={compareIdentifiers:v,rcompareIdentifiers:(m,A)=>v(A,m)},identifiers}var semver,hasRequiredSemver;function requireSemver(){if(hasRequiredSemver)return semver;hasRequiredSemver=1;const d=requireDebug(),{MAX_LENGTH:v,MAX_SAFE_INTEGER:E}=requireConstants(),{safeRe:m,t:A}=requireRe(),a=requireParseOptions(),{compareIdentifiers:_}=requireIdentifiers();class g{constructor(w,l){if(l=a(l),w instanceof g){if(w.loose===!!l.loose&&w.includePrerelease===!!l.includePrerelease)return w;w=w.version}else if(typeof w!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof w}".`);if(w.length>v)throw new TypeError(`version is longer than ${v} characters`);d("SemVer",w,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const M=w.trim().match(l.loose?m[A.LOOSE]:m[A.FULL]);if(!M)throw new TypeError(`Invalid Version: ${w}`);if(this.raw=w,this.major=+M[1],this.minor=+M[2],this.patch=+M[3],this.major>E||this.major<0)throw new TypeError("Invalid major version");if(this.minor>E||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>E||this.patch<0)throw new TypeError("Invalid patch version");M[4]?this.prerelease=M[4].split(".").map(y=>{if(/^[0-9]+$/.test(y)){const B=+y;if(B>=0&&B<E)return B}return y}):this.prerelease=[],this.build=M[5]?M[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(w){if(d("SemVer.compare",this.version,this.options,w),!(w instanceof g)){if(typeof w=="string"&&w===this.version)return 0;w=new g(w,this.options)}return w.version===this.version?0:this.compareMain(w)||this.comparePre(w)}compareMain(w){return w instanceof g||(w=new g(w,this.options)),this.major<w.major?-1:this.major>w.major?1:this.minor<w.minor?-1:this.minor>w.minor?1:this.patch<w.patch?-1:this.patch>w.patch?1:0}comparePre(w){if(w instanceof g||(w=new g(w,this.options)),this.prerelease.length&&!w.prerelease.length)return-1;if(!this.prerelease.length&&w.prerelease.length)return 1;if(!this.prerelease.length&&!w.prerelease.length)return 0;let l=0;do{const M=this.prerelease[l],y=w.prerelease[l];if(d("prerelease compare",l,M,y),M===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(M===void 0)return-1;if(M===y)continue;return _(M,y)}while(++l)}compareBuild(w){w instanceof g||(w=new g(w,this.options));let l=0;do{const M=this.build[l],y=w.build[l];if(d("build compare",l,M,y),M===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(M===void 0)return-1;if(M===y)continue;return _(M,y)}while(++l)}inc(w,l,M){if(w.startsWith("pre")){if(!l&&M===!1)throw new Error("invalid increment argument: identifier is empty");if(l){const y=`-${l}`.match(this.options.loose?m[A.PRERELEASELOOSE]:m[A.PRERELEASE]);if(!y||y[1]!==l)throw new Error(`invalid identifier: ${l}`)}}switch(w){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l,M);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l,M);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l,M),this.inc("pre",l,M);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l,M),this.inc("pre",l,M);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const y=Number(M)?1:0;if(this.prerelease.length===0)this.prerelease=[y];else{let B=this.prerelease.length;for(;--B>=0;)typeof this.prerelease[B]=="number"&&(this.prerelease[B]++,B=-2);if(B===-1){if(l===this.prerelease.join(".")&&M===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(y)}}if(l){let B=[l,y];M===!1&&(B=[l]),_(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=B):this.prerelease=B}break}default:throw new Error(`invalid increment argument: ${w}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return semver=g,semver}var parse_1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse_1;hasRequiredParse=1;const d=requireSemver();return parse_1=(E,m,A=!1)=>{if(E instanceof d)return E;try{return new d(E,m)}catch(a){if(!A)return null;throw a}},parse_1}var coerce_1,hasRequiredCoerce;function requireCoerce(){if(hasRequiredCoerce)return coerce_1;hasRequiredCoerce=1;const d=requireSemver(),v=requireParse(),{safeRe:E,t:m}=requireRe();return coerce_1=(a,_)=>{if(a instanceof d)return a;if(typeof a=="number"&&(a=String(a)),typeof a!="string")return null;_=_||{};let g=null;if(!_.rtl)g=a.match(_.includePrerelease?E[m.COERCEFULL]:E[m.COERCE]);else{const B=_.includePrerelease?E[m.COERCERTLFULL]:E[m.COERCERTL];let R;for(;(R=B.exec(a))&&(!g||g.index+g[0].length!==a.length);)(!g||R.index+R[0].length!==g.index+g[0].length)&&(g=R),B.lastIndex=R.index+R[1].length+R[2].length;B.lastIndex=-1}if(g===null)return null;const b=g[2],w=g[3]||"0",l=g[4]||"0",M=_.includePrerelease&&g[5]?`-${g[5]}`:"",y=_.includePrerelease&&g[6]?`+${g[6]}`:"";return v(`${b}.${w}.${l}${M}${y}`,_)},coerce_1}var compare_1,hasRequiredCompare;function requireCompare(){if(hasRequiredCompare)return compare_1;hasRequiredCompare=1;const d=requireSemver();return compare_1=(E,m,A)=>new d(E,A).compare(new d(m,A)),compare_1}var gte_1,hasRequiredGte;function requireGte(){if(hasRequiredGte)return gte_1;hasRequiredGte=1;const d=requireCompare();return gte_1=(E,m,A)=>d(E,m,A)>=0,gte_1}var lrucache,hasRequiredLrucache;function requireLrucache(){if(hasRequiredLrucache)return lrucache;hasRequiredLrucache=1;class d{constructor(){this.max=1e3,this.map=new Map}get(E){const m=this.map.get(E);if(m!==void 0)return this.map.delete(E),this.map.set(E,m),m}delete(E){return this.map.delete(E)}set(E,m){if(!this.delete(E)&&m!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(E,m)}return this}}return lrucache=d,lrucache}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;const d=requireCompare();return eq_1=(E,m,A)=>d(E,m,A)===0,eq_1}var neq_1,hasRequiredNeq;function requireNeq(){if(hasRequiredNeq)return neq_1;hasRequiredNeq=1;const d=requireCompare();return neq_1=(E,m,A)=>d(E,m,A)!==0,neq_1}var gt_1,hasRequiredGt;function requireGt(){if(hasRequiredGt)return gt_1;hasRequiredGt=1;const d=requireCompare();return gt_1=(E,m,A)=>d(E,m,A)>0,gt_1}var lt_1,hasRequiredLt;function requireLt(){if(hasRequiredLt)return lt_1;hasRequiredLt=1;const d=requireCompare();return lt_1=(E,m,A)=>d(E,m,A)<0,lt_1}var lte_1,hasRequiredLte;function requireLte(){if(hasRequiredLte)return lte_1;hasRequiredLte=1;const d=requireCompare();return lte_1=(E,m,A)=>d(E,m,A)<=0,lte_1}var cmp_1,hasRequiredCmp;function requireCmp(){if(hasRequiredCmp)return cmp_1;hasRequiredCmp=1;const d=requireEq(),v=requireNeq(),E=requireGt(),m=requireGte(),A=requireLt(),a=requireLte();return cmp_1=(g,b,w,l)=>{switch(b){case"===":return typeof g=="object"&&(g=g.version),typeof w=="object"&&(w=w.version),g===w;case"!==":return typeof g=="object"&&(g=g.version),typeof w=="object"&&(w=w.version),g!==w;case"":case"=":case"==":return d(g,w,l);case"!=":return v(g,w,l);case">":return E(g,w,l);case">=":return m(g,w,l);case"<":return A(g,w,l);case"<=":return a(g,w,l);default:throw new TypeError(`Invalid operator: ${b}`)}},cmp_1}var comparator,hasRequiredComparator;function requireComparator(){if(hasRequiredComparator)return comparator;hasRequiredComparator=1;const d=Symbol("SemVer ANY");class v{static get ANY(){return d}constructor(l,M){if(M=E(M),l instanceof v){if(l.loose===!!M.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),_("comparator",l,M),this.options=M,this.loose=!!M.loose,this.parse(l),this.semver===d?this.value="":this.value=this.operator+this.semver.version,_("comp",this)}parse(l){const M=this.options.loose?m[A.COMPARATORLOOSE]:m[A.COMPARATOR],y=l.match(M);if(!y)throw new TypeError(`Invalid comparator: ${l}`);this.operator=y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new g(y[2],this.options.loose):this.semver=d}toString(){return this.value}test(l){if(_("Comparator.test",l,this.options.loose),this.semver===d||l===d)return!0;if(typeof l=="string")try{l=new g(l,this.options)}catch{return!1}return a(l,this.operator,this.semver,this.options)}intersects(l,M){if(!(l instanceof v))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new b(l.value,M).test(this.value):l.operator===""?l.value===""?!0:new b(this.value,M).test(l.semver):(M=E(M),M.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!M.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||a(this.semver,"<",l.semver,M)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||a(this.semver,">",l.semver,M)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}comparator=v;const E=requireParseOptions(),{safeRe:m,t:A}=requireRe(),a=requireCmp(),_=requireDebug(),g=requireSemver(),b=requireRange();return comparator}var range,hasRequiredRange;function requireRange(){if(hasRequiredRange)return range;hasRequiredRange=1;const d=/\s+/g;class v{constructor(f,s){if(s=A(s),f instanceof v)return f.loose===!!s.loose&&f.includePrerelease===!!s.includePrerelease?f:new v(f.raw,s);if(f instanceof a)return this.raw=f.value,this.set=[[f]],this.formatted=void 0,this;if(this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease,this.raw=f.trim().replace(d," "),this.set=this.raw.split("||").map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const u=this.set[0];if(this.set=this.set.filter(c=>!S(c[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(const c of this.set)if(c.length===1&&P(c[0])){this.set=[c];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let f=0;f<this.set.length;f++){f>0&&(this.formatted+="||");const s=this.set[f];for(let u=0;u<s.length;u++)u>0&&(this.formatted+=" "),this.formatted+=s[u].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(f){const u=((this.options.includePrerelease&&B)|(this.options.loose&&R))+":"+f,c=m.get(u);if(c)return c;const o=this.options.loose,r=o?b[w.HYPHENRANGELOOSE]:b[w.HYPHENRANGE];f=f.replace(r,e(this.options.includePrerelease)),_("hyphen replace",f),f=f.replace(b[w.COMPARATORTRIM],l),_("comparator trim",f),f=f.replace(b[w.TILDETRIM],M),_("tilde trim",f),f=f.replace(b[w.CARETTRIM],y),_("caret trim",f);let h=f.split(" ").map(Y=>k(Y,this.options)).join(" ").split(/\s+/).map(Y=>p(Y,this.options));o&&(h=h.filter(Y=>(_("loose invalid filter",Y,this.options),!!Y.match(b[w.COMPARATORLOOSE])))),_("range list",h);const q=new Map,$=h.map(Y=>new a(Y,this.options));for(const Y of $){if(S(Y))return[Y];q.set(Y.value,Y)}q.size>1&&q.has("")&&q.delete("");const H=[...q.values()];return m.set(u,H),H}intersects(f,s){if(!(f instanceof v))throw new TypeError("a Range is required");return this.set.some(u=>T(u,s)&&f.set.some(c=>T(c,s)&&u.every(o=>c.every(r=>o.intersects(r,s)))))}test(f){if(!f)return!1;if(typeof f=="string")try{f=new g(f,this.options)}catch{return!1}for(let s=0;s<this.set.length;s++)if(t(this.set[s],f,this.options))return!0;return!1}}range=v;const E=requireLrucache(),m=new E,A=requireParseOptions(),a=requireComparator(),_=requireDebug(),g=requireSemver(),{safeRe:b,t:w,comparatorTrimReplace:l,tildeTrimReplace:M,caretTrimReplace:y}=requireRe(),{FLAG_INCLUDE_PRERELEASE:B,FLAG_LOOSE:R}=requireConstants(),S=n=>n.value==="<0.0.0-0",P=n=>n.value==="",T=(n,f)=>{let s=!0;const u=n.slice();let c=u.pop();for(;s&&u.length;)s=u.every(o=>c.intersects(o,f)),c=u.pop();return s},k=(n,f)=>(n=n.replace(b[w.BUILD],""),_("comp",n,f),n=Q(n,f),_("caret",n),n=j(n,f),_("tildes",n),n=ae(n,f),_("xrange",n),n=fe(n,f),_("stars",n),n),z=n=>!n||n.toLowerCase()==="x"||n==="*",j=(n,f)=>n.trim().split(/\s+/).map(s=>V(s,f)).join(" "),V=(n,f)=>{const s=f.loose?b[w.TILDELOOSE]:b[w.TILDE];return n.replace(s,(u,c,o,r,h)=>{_("tilde",n,u,c,o,r,h);let q;return z(c)?q="":z(o)?q=`>=${c}.0.0 <${+c+1}.0.0-0`:z(r)?q=`>=${c}.${o}.0 <${c}.${+o+1}.0-0`:h?(_("replaceTilde pr",h),q=`>=${c}.${o}.${r}-${h} <${c}.${+o+1}.0-0`):q=`>=${c}.${o}.${r} <${c}.${+o+1}.0-0`,_("tilde return",q),q})},Q=(n,f)=>n.trim().split(/\s+/).map(s=>ne(s,f)).join(" "),ne=(n,f)=>{_("caret",n,f);const s=f.loose?b[w.CARETLOOSE]:b[w.CARET],u=f.includePrerelease?"-0":"";return n.replace(s,(c,o,r,h,q)=>{_("caret",n,c,o,r,h,q);let $;return z(o)?$="":z(r)?$=`>=${o}.0.0${u} <${+o+1}.0.0-0`:z(h)?o==="0"?$=`>=${o}.${r}.0${u} <${o}.${+r+1}.0-0`:$=`>=${o}.${r}.0${u} <${+o+1}.0.0-0`:q?(_("replaceCaret pr",q),o==="0"?r==="0"?$=`>=${o}.${r}.${h}-${q} <${o}.${r}.${+h+1}-0`:$=`>=${o}.${r}.${h}-${q} <${o}.${+r+1}.0-0`:$=`>=${o}.${r}.${h}-${q} <${+o+1}.0.0-0`):(_("no pr"),o==="0"?r==="0"?$=`>=${o}.${r}.${h}${u} <${o}.${r}.${+h+1}-0`:$=`>=${o}.${r}.${h}${u} <${o}.${+r+1}.0-0`:$=`>=${o}.${r}.${h} <${+o+1}.0.0-0`),_("caret return",$),$})},ae=(n,f)=>(_("replaceXRanges",n,f),n.split(/\s+/).map(s=>U(s,f)).join(" ")),U=(n,f)=>{n=n.trim();const s=f.loose?b[w.XRANGELOOSE]:b[w.XRANGE];return n.replace(s,(u,c,o,r,h,q)=>{_("xRange",n,u,c,o,r,h,q);const $=z(o),H=$||z(r),Y=H||z(h),J=Y;return c==="="&&J&&(c=""),q=f.includePrerelease?"-0":"",$?c===">"||c==="<"?u="<0.0.0-0":u="*":c&&J?(H&&(r=0),h=0,c===">"?(c=">=",H?(o=+o+1,r=0,h=0):(r=+r+1,h=0)):c==="<="&&(c="<",H?o=+o+1:r=+r+1),c==="<"&&(q="-0"),u=`${c+o}.${r}.${h}${q}`):H?u=`>=${o}.0.0${q} <${+o+1}.0.0-0`:Y&&(u=`>=${o}.${r}.0${q} <${o}.${+r+1}.0-0`),_("xRange return",u),u})},fe=(n,f)=>(_("replaceStars",n,f),n.trim().replace(b[w.STAR],"")),p=(n,f)=>(_("replaceGTE0",n,f),n.trim().replace(b[f.includePrerelease?w.GTE0PRE:w.GTE0],"")),e=n=>(f,s,u,c,o,r,h,q,$,H,Y,J)=>(z(u)?s="":z(c)?s=`>=${u}.0.0${n?"-0":""}`:z(o)?s=`>=${u}.${c}.0${n?"-0":""}`:r?s=`>=${s}`:s=`>=${s}${n?"-0":""}`,z($)?q="":z(H)?q=`<${+$+1}.0.0-0`:z(Y)?q=`<${$}.${+H+1}.0-0`:J?q=`<=${$}.${H}.${Y}-${J}`:n?q=`<${$}.${H}.${+Y+1}-0`:q=`<=${q}`,`${s} ${q}`.trim()),t=(n,f,s)=>{for(let u=0;u<n.length;u++)if(!n[u].test(f))return!1;if(f.prerelease.length&&!s.includePrerelease){for(let u=0;u<n.length;u++)if(_(n[u].semver),n[u].semver!==a.ANY&&n[u].semver.prerelease.length>0){const c=n[u].semver;if(c.major===f.major&&c.minor===f.minor&&c.patch===f.patch)return!0}return!1}return!0};return range}var satisfies_1,hasRequiredSatisfies;function requireSatisfies(){if(hasRequiredSatisfies)return satisfies_1;hasRequiredSatisfies=1;const d=requireRange();return satisfies_1=(E,m,A)=>{try{m=new d(m,A)}catch{return!1}return m.test(E)},satisfies_1}const version="0.34.5",optionalDependencies={"@img/sharp-darwin-arm64":"0.34.5","@img/sharp-darwin-x64":"0.34.5","@img/sharp-libvips-darwin-arm64":"1.2.4","@img/sharp-libvips-darwin-x64":"1.2.4","@img/sharp-libvips-linux-arm":"1.2.4","@img/sharp-libvips-linux-arm64":"1.2.4","@img/sharp-libvips-linux-ppc64":"1.2.4","@img/sharp-libvips-linux-riscv64":"1.2.4","@img/sharp-libvips-linux-s390x":"1.2.4","@img/sharp-libvips-linux-x64":"1.2.4","@img/sharp-libvips-linuxmusl-arm64":"1.2.4","@img/sharp-libvips-linuxmusl-x64":"1.2.4","@img/sharp-linux-arm":"0.34.5","@img/sharp-linux-arm64":"0.34.5","@img/sharp-linux-ppc64":"0.34.5","@img/sharp-linux-riscv64":"0.34.5","@img/sharp-linux-s390x":"0.34.5","@img/sharp-linux-x64":"0.34.5","@img/sharp-linuxmusl-arm64":"0.34.5","@img/sharp-linuxmusl-x64":"0.34.5","@img/sharp-wasm32":"0.34.5","@img/sharp-win32-arm64":"0.34.5","@img/sharp-win32-ia32":"0.34.5","@img/sharp-win32-x64":"0.34.5"},engines={node:"^18.17.0 || ^20.3.0 || >=21.0.0"},config$1={libvips:">=8.17.3"},require$$6={version,optionalDependencies,engines,config:config$1};var libvips,hasRequiredLibvips;function requireLibvips(){if(hasRequiredLibvips)return libvips;hasRequiredLibvips=1;const{spawnSync:d}=require$$0,{createHash:v}=requireCryptoBrowserify(),E=requireCoerce(),m=requireGte(),A=requireSatisfies(),a=requireDetectLibc(),{config:_,engines:g,optionalDependencies:b}=require$$6,w=process$1.env.npm_package_config_libvips||_.libvips,l=E(w).version,M=["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],y={encoding:"utf8",shell:!0},B=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},R=()=>a.isNonGlibcLinuxSync()?a.familySync():"",S=()=>`${process$1.platform}${R()}-${process$1.arch}`,P=()=>{if(V())return"wasm32";const{npm_config_arch:n,npm_config_platform:f,npm_config_libc:s}=process$1.env,u=typeof s=="string"?s:R();return`${f||process$1.platform}${u}-${n||process$1.arch}`},T=()=>{try{return commonjsRequire(`@img/sharp-libvips-dev-${P()}/include`)}catch{try{return require("@img/sharp-libvips-dev/include")}catch{}}return""},k=()=>{try{return require("@img/sharp-libvips-dev/cplusplus")}catch{}return""},z=()=>{try{return commonjsRequire(`@img/sharp-libvips-dev-${P()}/lib`)}catch{try{return commonjsRequire(`@img/sharp-libvips-${P()}/lib`)}catch{}}return""},j=()=>{if(process$1.release?.name==="node"&&process$1.versions&&!A(process$1.versions.node,g.node))return{found:process$1.versions.node,expected:g.node}},V=()=>{const{CC:n}=process$1.env;return!!n?.endsWith("/emcc")},Q=()=>process$1.platform==="darwin"&&process$1.arch==="x64"?(d("sysctl sysctl.proc_translated",y).stdout||"").trim()==="sysctl.proc_translated: 1":!1,ne=n=>v("sha512").update(n).digest("hex"),ae=()=>{try{const n=ne(`imgsharp-libvips-${P()}`),f=E(b[`@img/sharp-libvips-${P()}`],{includePrerelease:!0}).version;return ne(`${n}npm:${f}`).slice(0,10)}catch{}return""},U=()=>d(`node-gyp rebuild --directory=src ${V()?"--nodedir=emscripten":""}`,{...y,stdio:"inherit"}).status,fe=()=>process$1.platform!=="win32"?(d("pkg-config --modversion vips-cpp",{...y,env:{...process$1.env,PKG_CONFIG_PATH:p()}}).stdout||"").trim():"",p=()=>process$1.platform!=="win32"?[(d('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',y).stdout||"").trim(),process$1.env.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":"):"",e=(n,f,s)=>(s&&s(`Detected ${f}, skipping search for globally-installed libvips`),n);return libvips={minimumLibvipsVersion:l,prebuiltPlatforms:M,buildPlatformArch:P,buildSharpLibvipsIncludeDir:T,buildSharpLibvipsCPlusPlusDir:k,buildSharpLibvipsLibDir:z,isUnsupportedNodeRuntime:j,runtimePlatformArch:S,log:B,yarnLocator:ae,spawnRebuild:U,globalLibvipsVersion:fe,pkgConfigPath:p,useGlobalLibvips:n=>{if(process$1.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return e(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process$1.env.SHARP_FORCE_GLOBAL_LIBVIPS)return e(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(Q())return e(!1,"Rosetta",n);const f=fe();return!!f&&m(f,l)}},libvips}var hasRequiredSharp;function requireSharp(){if(hasRequiredSharp)return sharp$1.exports;hasRequiredSharp=1;const{familySync:d,versionSync:v}=requireDetectLibc(),{runtimePlatformArch:E,isUnsupportedNodeRuntime:m,prebuiltPlatforms:A,minimumLibvipsVersion:a}=requireLibvips(),_=E(),g=[`../src/build/Release/sharp-${_}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${_}/sharp.node`,"@img/sharp-wasm32/sharp.node"];let b,w;const l=[];for(b of g)try{w=commonjsRequire(b);break}catch(M){l.push(M)}if(w&&b.startsWith("@img/sharp-linux-x64")&&!w._isUsingX64V2()){const M=new Error("Prebuilt binaries for linux-x64 require v2 microarchitecture");M.code="Unsupported CPU",l.push(M),w=null}if(w)sharp$1.exports=w;else{const[M,y,B]=["linux","darwin","win32"].map(P=>_.startsWith(P)),R=[`Could not load the "sharp" module using the ${_} runtime`];l.forEach(P=>{P.code!=="MODULE_NOT_FOUND"&&R.push(`${P.code}: ${P.message}`)});const S=l.map(P=>P.message).join(" ");if(R.push("Possible solutions:"),m()){const{found:P,expected:T}=m();R.push("- Please upgrade Node.js:",` Found ${P}`,` Requires ${T}`)}else if(A.includes(_)){const[P,T]=_.split("-"),k=P.endsWith("musl")?" --libc=musl":"";R.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${P.replace("musl","")}${k} --cpu=${T} sharp`)}else R.push(`- Manually install libvips >= ${a}`,"- Add experimental WebAssembly-based dependencies:"," npm install --cpu=wasm32 sharp"," npm install @img/sharp-wasm32");if(M&&/(symbol not found|CXXABI_)/i.test(S))try{const{config:P}=commonjsRequire(`@img/sharp-libvips-${_}/package`),T=`${d()} ${v()}`,k=`${P.musl?"musl":"glibc"} ${P.musl||P.glibc}`;R.push("- Update your OS:",` Found ${T}`,` Requires ${k}`)}catch{}throw M&&/\/snap\/core[0-9]{2}/.test(S)&&R.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),y&&/Incompatible library version/.test(S)&&R.push("- Update Homebrew:"," brew update && brew upgrade vips"),l.some(P=>P.code==="ERR_DLOPEN_DISABLED")&&R.push("- Run Node.js without using the --no-addons flag"),B&&/The specified procedure could not be found/.test(S)&&R.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),R.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(R.join(`
23
+ `))}return sharp$1.exports}var constructor,hasRequiredConstructor;function requireConstructor(){if(hasRequiredConstructor)return constructor;hasRequiredConstructor=1;const d=requireUtil$1(),v=requireStreamBrowserify(),E=requireIs();requireSharp();const m=d.debuglog("sharp"),A=g=>{a.queue.emit("change",g)},a=function(g,b){if(arguments.length===1&&!E.defined(g))throw new Error("Invalid input");return this instanceof a?(v.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:w=>{this.emit("warning",w),m(w)},queueListener:A},this.options.input=this._createInputDescriptor(g,b,{allowStream:!0}),this):new a(g,b)};Object.setPrototypeOf(a.prototype,v.Duplex.prototype),Object.setPrototypeOf(a,v.Duplex);function _(){const g=this.constructor.call(),{debuglog:b,queueListener:w,...l}=this.options;return g.options=structuredClone(l),g.options.debuglog=b,g.options.queueListener=w,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),g.options.input.buffer=this.options.input.buffer,g.emit("finish")}),g}return Object.assign(a.prototype,{clone:_}),constructor=a,constructor}var input,hasRequiredInput;function requireInput(){if(hasRequiredInput)return input;hasRequiredInput=1;const d=requireIs(),v=requireSharp(),E={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},m=["failOn","limitInputPixels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","failOnError","openSlideLevel","pdfBackground","tiffSubifd"];function A(M){const y=m.filter(B=>d.defined(M[B])).map(B=>[B,M[B]]);return y.length?Object.fromEntries(y):void 0}function a(M,y,B){const R={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(d.string(M))R.file=M;else if(d.buffer(M)){if(M.length===0)throw Error("Input Buffer is empty");R.buffer=M}else if(d.arrayBuffer(M)){if(M.byteLength===0)throw Error("Input bit Array is empty");R.buffer=Buffer.from(M,0,M.byteLength)}else if(d.typedArray(M)){if(M.length===0)throw Error("Input Bit Array is empty");R.buffer=Buffer.from(M.buffer,M.byteOffset,M.byteLength)}else if(d.plainObject(M)&&!d.defined(y))y=M,A(y)&&(R.buffer=[]);else if(!d.defined(M)&&!d.defined(y)&&d.object(B)&&B.allowStream)R.buffer=[];else if(Array.isArray(M))if(M.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=M.map(S=>this._createInputDescriptor(S));else throw new Error("Recursive join is unsupported");else throw new Error("Expected at least two images to join");else throw new Error(`Unsupported input '${M}' of type ${typeof M}${d.defined(y)?` when also providing options of type ${typeof y}`:""}`);if(d.object(y)){if(d.defined(y.failOnError))if(d.bool(y.failOnError))R.failOn=y.failOnError?"warning":"none";else throw d.invalidParameterError("failOnError","boolean",y.failOnError);if(d.defined(y.failOn))if(d.string(y.failOn)&&d.inArray(y.failOn,["none","truncated","error","warning"]))R.failOn=y.failOn;else throw d.invalidParameterError("failOn","one of: none, truncated, error, warning",y.failOn);if(d.defined(y.autoOrient))if(d.bool(y.autoOrient))R.autoOrient=y.autoOrient;else throw d.invalidParameterError("autoOrient","boolean",y.autoOrient);if(d.defined(y.density))if(d.inRange(y.density,1,1e5))R.density=y.density;else throw d.invalidParameterError("density","number between 1 and 100000",y.density);if(d.defined(y.ignoreIcc))if(d.bool(y.ignoreIcc))R.ignoreIcc=y.ignoreIcc;else throw d.invalidParameterError("ignoreIcc","boolean",y.ignoreIcc);if(d.defined(y.limitInputPixels))if(d.bool(y.limitInputPixels))R.limitInputPixels=y.limitInputPixels?16383**2:0;else if(d.integer(y.limitInputPixels)&&d.inRange(y.limitInputPixels,0,Number.MAX_SAFE_INTEGER))R.limitInputPixels=y.limitInputPixels;else throw d.invalidParameterError("limitInputPixels","positive integer",y.limitInputPixels);if(d.defined(y.unlimited))if(d.bool(y.unlimited))R.unlimited=y.unlimited;else throw d.invalidParameterError("unlimited","boolean",y.unlimited);if(d.defined(y.sequentialRead))if(d.bool(y.sequentialRead))R.sequentialRead=y.sequentialRead;else throw d.invalidParameterError("sequentialRead","boolean",y.sequentialRead);if(d.defined(y.raw)){if(d.object(y.raw)&&d.integer(y.raw.width)&&y.raw.width>0&&d.integer(y.raw.height)&&y.raw.height>0&&d.integer(y.raw.channels)&&d.inRange(y.raw.channels,1,4))switch(R.rawWidth=y.raw.width,R.rawHeight=y.raw.height,R.rawChannels=y.raw.channels,M.constructor){case Uint8Array:case Uint8ClampedArray:R.rawDepth="uchar";break;case Int8Array:R.rawDepth="char";break;case Uint16Array:R.rawDepth="ushort";break;case Int16Array:R.rawDepth="short";break;case Uint32Array:R.rawDepth="uint";break;case Int32Array:R.rawDepth="int";break;case Float32Array:R.rawDepth="float";break;case Float64Array:R.rawDepth="double";break;default:R.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(R.rawPremultiplied=!1,d.defined(y.raw.premultiplied))if(d.bool(y.raw.premultiplied))R.rawPremultiplied=y.raw.premultiplied;else throw d.invalidParameterError("raw.premultiplied","boolean",y.raw.premultiplied);if(R.rawPageHeight=0,d.defined(y.raw.pageHeight))if(d.integer(y.raw.pageHeight)&&y.raw.pageHeight>0&&y.raw.pageHeight<=y.raw.height){if(y.raw.height%y.raw.pageHeight!==0)throw new Error(`Expected raw.height ${y.raw.height} to be a multiple of raw.pageHeight ${y.raw.pageHeight}`);R.rawPageHeight=y.raw.pageHeight}else throw d.invalidParameterError("raw.pageHeight","positive integer",y.raw.pageHeight)}if(d.defined(y.animated))if(d.bool(y.animated))R.pages=y.animated?-1:1;else throw d.invalidParameterError("animated","boolean",y.animated);if(d.defined(y.pages))if(d.integer(y.pages)&&d.inRange(y.pages,-1,1e5))R.pages=y.pages;else throw d.invalidParameterError("pages","integer between -1 and 100000",y.pages);if(d.defined(y.page))if(d.integer(y.page)&&d.inRange(y.page,0,1e5))R.page=y.page;else throw d.invalidParameterError("page","integer between 0 and 100000",y.page);if(d.object(y.openSlide)&&d.defined(y.openSlide.level))if(d.integer(y.openSlide.level)&&d.inRange(y.openSlide.level,0,256))R.openSlideLevel=y.openSlide.level;else throw d.invalidParameterError("openSlide.level","integer between 0 and 256",y.openSlide.level);else if(d.defined(y.level))if(d.integer(y.level)&&d.inRange(y.level,0,256))R.openSlideLevel=y.level;else throw d.invalidParameterError("level","integer between 0 and 256",y.level);if(d.object(y.tiff)&&d.defined(y.tiff.subifd))if(d.integer(y.tiff.subifd)&&d.inRange(y.tiff.subifd,-1,1e5))R.tiffSubifd=y.tiff.subifd;else throw d.invalidParameterError("tiff.subifd","integer between -1 and 100000",y.tiff.subifd);else if(d.defined(y.subifd))if(d.integer(y.subifd)&&d.inRange(y.subifd,-1,1e5))R.tiffSubifd=y.subifd;else throw d.invalidParameterError("subifd","integer between -1 and 100000",y.subifd);if(d.object(y.svg)){if(d.defined(y.svg.stylesheet))if(d.string(y.svg.stylesheet))R.svgStylesheet=y.svg.stylesheet;else throw d.invalidParameterError("svg.stylesheet","string",y.svg.stylesheet);if(d.defined(y.svg.highBitdepth))if(d.bool(y.svg.highBitdepth))R.svgHighBitdepth=y.svg.highBitdepth;else throw d.invalidParameterError("svg.highBitdepth","boolean",y.svg.highBitdepth)}if(d.object(y.pdf)&&d.defined(y.pdf.background)?R.pdfBackground=this._getBackgroundColourOption(y.pdf.background):d.defined(y.pdfBackground)&&(R.pdfBackground=this._getBackgroundColourOption(y.pdfBackground)),d.object(y.jp2)&&d.defined(y.jp2.oneshot))if(d.bool(y.jp2.oneshot))R.jp2Oneshot=y.jp2.oneshot;else throw d.invalidParameterError("jp2.oneshot","boolean",y.jp2.oneshot);if(d.defined(y.create))if(d.object(y.create)&&d.integer(y.create.width)&&y.create.width>0&&d.integer(y.create.height)&&y.create.height>0&&d.integer(y.create.channels)){if(R.createWidth=y.create.width,R.createHeight=y.create.height,R.createChannels=y.create.channels,R.createPageHeight=0,d.defined(y.create.pageHeight))if(d.integer(y.create.pageHeight)&&y.create.pageHeight>0&&y.create.pageHeight<=y.create.height){if(y.create.height%y.create.pageHeight!==0)throw new Error(`Expected create.height ${y.create.height} to be a multiple of create.pageHeight ${y.create.pageHeight}`);R.createPageHeight=y.create.pageHeight}else throw d.invalidParameterError("create.pageHeight","positive integer",y.create.pageHeight);if(d.defined(y.create.noise)){if(!d.object(y.create.noise))throw new Error("Expected noise to be an object");if(y.create.noise.type!=="gaussian")throw new Error("Only gaussian noise is supported at the moment");if(R.createNoiseType=y.create.noise.type,!d.inRange(y.create.channels,1,4))throw d.invalidParameterError("create.channels","number between 1 and 4",y.create.channels);if(R.createNoiseMean=128,d.defined(y.create.noise.mean))if(d.number(y.create.noise.mean)&&d.inRange(y.create.noise.mean,0,1e4))R.createNoiseMean=y.create.noise.mean;else throw d.invalidParameterError("create.noise.mean","number between 0 and 10000",y.create.noise.mean);if(R.createNoiseSigma=30,d.defined(y.create.noise.sigma))if(d.number(y.create.noise.sigma)&&d.inRange(y.create.noise.sigma,0,1e4))R.createNoiseSigma=y.create.noise.sigma;else throw d.invalidParameterError("create.noise.sigma","number between 0 and 10000",y.create.noise.sigma)}else if(d.defined(y.create.background)){if(!d.inRange(y.create.channels,3,4))throw d.invalidParameterError("create.channels","number between 3 and 4",y.create.channels);R.createBackground=this._getBackgroundColourOption(y.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete R.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(d.defined(y.text))if(d.object(y.text)&&d.string(y.text.text)){if(R.textValue=y.text.text,d.defined(y.text.height)&&d.defined(y.text.dpi))throw new Error("Expected only one of dpi or height");if(d.defined(y.text.font))if(d.string(y.text.font))R.textFont=y.text.font;else throw d.invalidParameterError("text.font","string",y.text.font);if(d.defined(y.text.fontfile))if(d.string(y.text.fontfile))R.textFontfile=y.text.fontfile;else throw d.invalidParameterError("text.fontfile","string",y.text.fontfile);if(d.defined(y.text.width))if(d.integer(y.text.width)&&y.text.width>0)R.textWidth=y.text.width;else throw d.invalidParameterError("text.width","positive integer",y.text.width);if(d.defined(y.text.height))if(d.integer(y.text.height)&&y.text.height>0)R.textHeight=y.text.height;else throw d.invalidParameterError("text.height","positive integer",y.text.height);if(d.defined(y.text.align))if(d.string(y.text.align)&&d.string(this.constructor.align[y.text.align]))R.textAlign=this.constructor.align[y.text.align];else throw d.invalidParameterError("text.align","valid alignment",y.text.align);if(d.defined(y.text.justify))if(d.bool(y.text.justify))R.textJustify=y.text.justify;else throw d.invalidParameterError("text.justify","boolean",y.text.justify);if(d.defined(y.text.dpi))if(d.integer(y.text.dpi)&&d.inRange(y.text.dpi,1,1e6))R.textDpi=y.text.dpi;else throw d.invalidParameterError("text.dpi","integer between 1 and 1000000",y.text.dpi);if(d.defined(y.text.rgba))if(d.bool(y.text.rgba))R.textRgba=y.text.rgba;else throw d.invalidParameterError("text.rgba","bool",y.text.rgba);if(d.defined(y.text.spacing))if(d.integer(y.text.spacing)&&d.inRange(y.text.spacing,-1e6,1e6))R.textSpacing=y.text.spacing;else throw d.invalidParameterError("text.spacing","integer between -1000000 and 1000000",y.text.spacing);if(d.defined(y.text.wrap))if(d.string(y.text.wrap)&&d.inArray(y.text.wrap,["word","char","word-char","none"]))R.textWrap=y.text.wrap;else throw d.invalidParameterError("text.wrap","one of: word, char, word-char, none",y.text.wrap);delete R.buffer}else throw new Error("Expected a valid string to create an image with text.");if(d.defined(y.join))if(d.defined(this.options.join)){if(d.defined(y.join.animated))if(d.bool(y.join.animated))R.joinAnimated=y.join.animated;else throw d.invalidParameterError("join.animated","boolean",y.join.animated);if(d.defined(y.join.across))if(d.integer(y.join.across)&&d.inRange(y.join.across,1,1e6))R.joinAcross=y.join.across;else throw d.invalidParameterError("join.across","integer between 1 and 100000",y.join.across);if(d.defined(y.join.shim))if(d.integer(y.join.shim)&&d.inRange(y.join.shim,0,1e6))R.joinShim=y.join.shim;else throw d.invalidParameterError("join.shim","integer between 0 and 100000",y.join.shim);if(d.defined(y.join.background)&&(R.joinBackground=this._getBackgroundColourOption(y.join.background)),d.defined(y.join.halign))if(d.string(y.join.halign)&&d.string(this.constructor.align[y.join.halign]))R.joinHalign=this.constructor.align[y.join.halign];else throw d.invalidParameterError("join.halign","valid alignment",y.join.halign);if(d.defined(y.join.valign))if(d.string(y.join.valign)&&d.string(this.constructor.align[y.join.valign]))R.joinValign=this.constructor.align[y.join.valign];else throw d.invalidParameterError("join.valign","valid alignment",y.join.valign)}else throw new Error("Expected input to be an array of images to join")}else if(d.defined(y))throw new Error(`Invalid input options ${y}`);return R}function _(M,y,B){Array.isArray(this.options.input.buffer)?d.buffer(M)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(M),B()):B(new Error("Non-Buffer data on Writable Stream")):B(new Error("Unexpected data on Writable Stream"))}function g(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function b(){return Array.isArray(this.options.input.buffer)}function w(M){const y=Error();return d.fn(M)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),v.metadata(this.options,(B,R)=>{B?M(d.nativeError(B,y)):M(null,R)})}):v.metadata(this.options,(B,R)=>{B?M(d.nativeError(B,y)):M(null,R)}),this):this._isStreamInput()?new Promise((B,R)=>{const S=()=>{this._flattenBufferIn(),v.metadata(this.options,(P,T)=>{P?R(d.nativeError(P,y)):B(T)})};this.writableFinished?S():this.once("finish",S)}):new Promise((B,R)=>{v.metadata(this.options,(S,P)=>{S?R(d.nativeError(S,y)):B(P)})})}function l(M){const y=Error();return d.fn(M)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),v.stats(this.options,(B,R)=>{B?M(d.nativeError(B,y)):M(null,R)})}):v.stats(this.options,(B,R)=>{B?M(d.nativeError(B,y)):M(null,R)}),this):this._isStreamInput()?new Promise((B,R)=>{this.on("finish",function(){this._flattenBufferIn(),v.stats(this.options,(S,P)=>{S?R(d.nativeError(S,y)):B(P)})})}):new Promise((B,R)=>{v.stats(this.options,(S,P)=>{S?R(d.nativeError(S,y)):B(P)})})}return input=M=>{Object.assign(M.prototype,{_inputOptionsFromObject:A,_createInputDescriptor:a,_write:_,_flattenBufferIn:g,_isStreamInput:b,metadata:w,stats:l}),M.align=E},input}var resize_1,hasRequiredResize;function requireResize(){if(hasRequiredResize)return resize_1;hasRequiredResize=1;const d=requireIs(),v={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},E={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},m={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},A={entropy:16,attention:17},a={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},_={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},g={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};function b(R){return R.angle%360!==0||R.rotationAngle!==0}function w(R){return R.width!==-1||R.height!==-1}function l(R,S,P){if(w(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),d.defined(R))if(d.object(R)&&!d.defined(P))P=R;else if(d.integer(R)&&R>0)this.options.width=R;else throw d.invalidParameterError("width","positive integer",R);else this.options.width=-1;if(d.defined(S))if(d.integer(S)&&S>0)this.options.height=S;else throw d.invalidParameterError("height","positive integer",S);else this.options.height=-1;if(d.object(P)){if(d.defined(P.width))if(d.integer(P.width)&&P.width>0)this.options.width=P.width;else throw d.invalidParameterError("width","positive integer",P.width);if(d.defined(P.height))if(d.integer(P.height)&&P.height>0)this.options.height=P.height;else throw d.invalidParameterError("height","positive integer",P.height);if(d.defined(P.fit)){const T=g[P.fit];if(d.string(T))this.options.canvas=T;else throw d.invalidParameterError("fit","valid fit",P.fit)}if(d.defined(P.position)){const T=d.integer(P.position)?P.position:A[P.position]||E[P.position]||v[P.position];if(d.integer(T)&&(d.inRange(T,0,8)||d.inRange(T,16,17)))this.options.position=T;else throw d.invalidParameterError("position","valid position/gravity/strategy",P.position)}if(this._setBackgroundColourOption("resizeBackground",P.background),d.defined(P.kernel))if(d.string(a[P.kernel]))this.options.kernel=a[P.kernel];else throw d.invalidParameterError("kernel","valid kernel name",P.kernel);d.defined(P.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",P.withoutEnlargement),d.defined(P.withoutReduction)&&this._setBooleanOption("withoutReduction",P.withoutReduction),d.defined(P.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",P.fastShrinkOnLoad)}return b(this.options)&&w(this.options)&&(this.options.rotateBefore=!0),this}function M(R){if(d.integer(R)&&R>0)this.options.extendTop=R,this.options.extendBottom=R,this.options.extendLeft=R,this.options.extendRight=R;else if(d.object(R)){if(d.defined(R.top))if(d.integer(R.top)&&R.top>=0)this.options.extendTop=R.top;else throw d.invalidParameterError("top","positive integer",R.top);if(d.defined(R.bottom))if(d.integer(R.bottom)&&R.bottom>=0)this.options.extendBottom=R.bottom;else throw d.invalidParameterError("bottom","positive integer",R.bottom);if(d.defined(R.left))if(d.integer(R.left)&&R.left>=0)this.options.extendLeft=R.left;else throw d.invalidParameterError("left","positive integer",R.left);if(d.defined(R.right))if(d.integer(R.right)&&R.right>=0)this.options.extendRight=R.right;else throw d.invalidParameterError("right","positive integer",R.right);if(this._setBackgroundColourOption("extendBackground",R.background),d.defined(R.extendWith))if(d.string(m[R.extendWith]))this.options.extendWith=m[R.extendWith];else throw d.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",R.extendWith)}else throw d.invalidParameterError("extend","integer or object",R);return this}function y(R){const S=w(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${S}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(P){const T=R[P];if(d.integer(T)&&T>=0)this.options[P+(P==="left"||P==="top"?"Offset":"")+S]=T;else throw d.invalidParameterError(P,"integer",T)},this),b(this.options)&&!w(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function B(R){if(this.options.trimThreshold=10,d.defined(R))if(d.object(R)){if(d.defined(R.background)&&this._setBackgroundColourOption("trimBackground",R.background),d.defined(R.threshold))if(d.number(R.threshold)&&R.threshold>=0)this.options.trimThreshold=R.threshold;else throw d.invalidParameterError("threshold","positive number",R.threshold);d.defined(R.lineArt)&&this._setBooleanOption("trimLineArt",R.lineArt)}else throw d.invalidParameterError("trim","object",R);return b(this.options)&&(this.options.rotateBefore=!0),this}return resize_1=R=>{Object.assign(R.prototype,{resize:l,extend:M,extract:y,trim:B}),R.gravity=v,R.strategy=A,R.kernel=a,R.fit=_,R.position=E},resize_1}var composite_1,hasRequiredComposite;function requireComposite(){if(hasRequiredComposite)return composite_1;hasRequiredComposite=1;const d=requireIs(),v={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};function E(m){if(!Array.isArray(m))throw d.invalidParameterError("images to composite","array",m);return this.options.composite=m.map(A=>{if(!d.object(A))throw d.invalidParameterError("image to composite","object",A);const a=this._inputOptionsFromObject(A),_={input:this._createInputDescriptor(A.input,a,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(d.defined(A.blend))if(d.string(v[A.blend]))_.blend=v[A.blend];else throw d.invalidParameterError("blend","valid blend name",A.blend);if(d.defined(A.tile))if(d.bool(A.tile))_.tile=A.tile;else throw d.invalidParameterError("tile","boolean",A.tile);if(d.defined(A.left))if(d.integer(A.left))_.left=A.left;else throw d.invalidParameterError("left","integer",A.left);if(d.defined(A.top))if(d.integer(A.top))_.top=A.top;else throw d.invalidParameterError("top","integer",A.top);if(d.defined(A.top)!==d.defined(A.left))throw new Error("Expected both left and top to be set");if(_.hasOffset=d.integer(A.top)&&d.integer(A.left),d.defined(A.gravity))if(d.integer(A.gravity)&&d.inRange(A.gravity,0,8))_.gravity=A.gravity;else if(d.string(A.gravity)&&d.integer(this.constructor.gravity[A.gravity]))_.gravity=this.constructor.gravity[A.gravity];else throw d.invalidParameterError("gravity","valid gravity",A.gravity);if(d.defined(A.premultiplied))if(d.bool(A.premultiplied))_.premultiplied=A.premultiplied;else throw d.invalidParameterError("premultiplied","boolean",A.premultiplied);return _}),this}return composite_1=m=>{m.prototype.composite=E,m.blend=v},composite_1}var operation,hasRequiredOperation;function requireOperation(){if(hasRequiredOperation)return operation;hasRequiredOperation=1;const d=requireIs(),v={integer:"integer",float:"float",approximate:"approximate"};function E(U,fe){if(!d.defined(U))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),d.integer(U)&&!(U%90))this.options.angle=U;else if(d.number(U))this.options.rotationAngle=U,d.object(fe)&&fe.background&&this._setBackgroundColourOption("rotationBackground",fe.background);else throw d.invalidParameterError("angle","numeric",U);return this}function m(){return this.options.input.autoOrient=!0,this}function A(U){return this.options.flip=d.bool(U)?U:!0,this}function a(U){return this.options.flop=d.bool(U)?U:!0,this}function _(U,fe){const p=[].concat(...U);if(p.length===4&&p.every(d.number))this.options.affineMatrix=p;else throw d.invalidParameterError("matrix","1x4 or 2x2 array",U);if(d.defined(fe))if(d.object(fe)){if(this._setBackgroundColourOption("affineBackground",fe.background),d.defined(fe.idx))if(d.number(fe.idx))this.options.affineIdx=fe.idx;else throw d.invalidParameterError("options.idx","number",fe.idx);if(d.defined(fe.idy))if(d.number(fe.idy))this.options.affineIdy=fe.idy;else throw d.invalidParameterError("options.idy","number",fe.idy);if(d.defined(fe.odx))if(d.number(fe.odx))this.options.affineOdx=fe.odx;else throw d.invalidParameterError("options.odx","number",fe.odx);if(d.defined(fe.ody))if(d.number(fe.ody))this.options.affineOdy=fe.ody;else throw d.invalidParameterError("options.ody","number",fe.ody);if(d.defined(fe.interpolator))if(d.inArray(fe.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=fe.interpolator;else throw d.invalidParameterError("options.interpolator","valid interpolator name",fe.interpolator)}else throw d.invalidParameterError("options","object",fe);return this}function g(U,fe,p){if(!d.defined(U))this.options.sharpenSigma=-1;else if(d.bool(U))this.options.sharpenSigma=U?-1:0;else if(d.number(U)&&d.inRange(U,.01,1e4)){if(this.options.sharpenSigma=U,d.defined(fe))if(d.number(fe)&&d.inRange(fe,0,1e4))this.options.sharpenM1=fe;else throw d.invalidParameterError("flat","number between 0 and 10000",fe);if(d.defined(p))if(d.number(p)&&d.inRange(p,0,1e4))this.options.sharpenM2=p;else throw d.invalidParameterError("jagged","number between 0 and 10000",p)}else if(d.plainObject(U)){if(d.number(U.sigma)&&d.inRange(U.sigma,1e-6,10))this.options.sharpenSigma=U.sigma;else throw d.invalidParameterError("options.sigma","number between 0.000001 and 10",U.sigma);if(d.defined(U.m1))if(d.number(U.m1)&&d.inRange(U.m1,0,1e6))this.options.sharpenM1=U.m1;else throw d.invalidParameterError("options.m1","number between 0 and 1000000",U.m1);if(d.defined(U.m2))if(d.number(U.m2)&&d.inRange(U.m2,0,1e6))this.options.sharpenM2=U.m2;else throw d.invalidParameterError("options.m2","number between 0 and 1000000",U.m2);if(d.defined(U.x1))if(d.number(U.x1)&&d.inRange(U.x1,0,1e6))this.options.sharpenX1=U.x1;else throw d.invalidParameterError("options.x1","number between 0 and 1000000",U.x1);if(d.defined(U.y2))if(d.number(U.y2)&&d.inRange(U.y2,0,1e6))this.options.sharpenY2=U.y2;else throw d.invalidParameterError("options.y2","number between 0 and 1000000",U.y2);if(d.defined(U.y3))if(d.number(U.y3)&&d.inRange(U.y3,0,1e6))this.options.sharpenY3=U.y3;else throw d.invalidParameterError("options.y3","number between 0 and 1000000",U.y3)}else throw d.invalidParameterError("sigma","number between 0.01 and 10000",U);return this}function b(U){if(!d.defined(U))this.options.medianSize=3;else if(d.integer(U)&&d.inRange(U,1,1e3))this.options.medianSize=U;else throw d.invalidParameterError("size","integer between 1 and 1000",U);return this}function w(U){let fe;if(d.number(U))fe=U;else if(d.plainObject(U)){if(!d.number(U.sigma))throw d.invalidParameterError("options.sigma","number between 0.3 and 1000",fe);if(fe=U.sigma,"precision"in U)if(d.string(v[U.precision]))this.options.precision=v[U.precision];else throw d.invalidParameterError("precision","one of: integer, float, approximate",U.precision);if("minAmplitude"in U)if(d.number(U.minAmplitude)&&d.inRange(U.minAmplitude,.001,1))this.options.minAmpl=U.minAmplitude;else throw d.invalidParameterError("minAmplitude","number between 0.001 and 1",U.minAmplitude)}if(!d.defined(U))this.options.blurSigma=-1;else if(d.bool(U))this.options.blurSigma=U?-1:0;else if(d.number(fe)&&d.inRange(fe,.3,1e3))this.options.blurSigma=fe;else throw d.invalidParameterError("sigma","number between 0.3 and 1000",fe);return this}function l(U){if(!d.defined(U))this.options.dilateWidth=1;else if(d.integer(U)&&U>0)this.options.dilateWidth=U;else throw d.invalidParameterError("dilate","positive integer",l);return this}function M(U){if(!d.defined(U))this.options.erodeWidth=1;else if(d.integer(U)&&U>0)this.options.erodeWidth=U;else throw d.invalidParameterError("erode","positive integer",M);return this}function y(U){return this.options.flatten=d.bool(U)?U:!0,d.object(U)&&this._setBackgroundColourOption("flattenBackground",U.background),this}function B(){return this.options.unflatten=!0,this}function R(U,fe){if(!d.defined(U))this.options.gamma=2.2;else if(d.number(U)&&d.inRange(U,1,3))this.options.gamma=U;else throw d.invalidParameterError("gamma","number between 1.0 and 3.0",U);if(!d.defined(fe))this.options.gammaOut=this.options.gamma;else if(d.number(fe)&&d.inRange(fe,1,3))this.options.gammaOut=fe;else throw d.invalidParameterError("gammaOut","number between 1.0 and 3.0",fe);return this}function S(U){if(this.options.negate=d.bool(U)?U:!0,d.plainObject(U)&&"alpha"in U)if(d.bool(U.alpha))this.options.negateAlpha=U.alpha;else throw d.invalidParameterError("alpha","should be boolean value",U.alpha);return this}function P(U){if(d.plainObject(U)){if(d.defined(U.lower))if(d.number(U.lower)&&d.inRange(U.lower,0,99))this.options.normaliseLower=U.lower;else throw d.invalidParameterError("lower","number between 0 and 99",U.lower);if(d.defined(U.upper))if(d.number(U.upper)&&d.inRange(U.upper,1,100))this.options.normaliseUpper=U.upper;else throw d.invalidParameterError("upper","number between 1 and 100",U.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw d.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function T(U){return this.normalise(U)}function k(U){if(d.plainObject(U)){if(d.integer(U.width)&&U.width>0)this.options.claheWidth=U.width;else throw d.invalidParameterError("width","integer greater than zero",U.width);if(d.integer(U.height)&&U.height>0)this.options.claheHeight=U.height;else throw d.invalidParameterError("height","integer greater than zero",U.height);if(d.defined(U.maxSlope))if(d.integer(U.maxSlope)&&d.inRange(U.maxSlope,0,100))this.options.claheMaxSlope=U.maxSlope;else throw d.invalidParameterError("maxSlope","integer between 0 and 100",U.maxSlope)}else throw d.invalidParameterError("options","plain object",U);return this}function z(U){if(!d.object(U)||!Array.isArray(U.kernel)||!d.integer(U.width)||!d.integer(U.height)||!d.inRange(U.width,3,1001)||!d.inRange(U.height,3,1001)||U.height*U.width!==U.kernel.length)throw new Error("Invalid convolution kernel");return d.integer(U.scale)||(U.scale=U.kernel.reduce((fe,p)=>fe+p,0)),U.scale<1&&(U.scale=1),d.integer(U.offset)||(U.offset=0),this.options.convKernel=U,this}function j(U,fe){if(!d.defined(U))this.options.threshold=128;else if(d.bool(U))this.options.threshold=U?128:0;else if(d.integer(U)&&d.inRange(U,0,255))this.options.threshold=U;else throw d.invalidParameterError("threshold","integer between 0 and 255",U);return!d.object(fe)||fe.greyscale===!0||fe.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function V(U,fe,p){if(this.options.boolean=this._createInputDescriptor(U,p),d.string(fe)&&d.inArray(fe,["and","or","eor"]))this.options.booleanOp=fe;else throw d.invalidParameterError("operator","one of: and, or, eor",fe);return this}function Q(U,fe){if(!d.defined(U)&&d.number(fe)?U=1:d.number(U)&&!d.defined(fe)&&(fe=0),!d.defined(U))this.options.linearA=[];else if(d.number(U))this.options.linearA=[U];else if(Array.isArray(U)&&U.length&&U.every(d.number))this.options.linearA=U;else throw d.invalidParameterError("a","number or array of numbers",U);if(!d.defined(fe))this.options.linearB=[];else if(d.number(fe))this.options.linearB=[fe];else if(Array.isArray(fe)&&fe.length&&fe.every(d.number))this.options.linearB=fe;else throw d.invalidParameterError("b","number or array of numbers",fe);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function ne(U){if(!Array.isArray(U))throw d.invalidParameterError("inputMatrix","array",U);if(U.length!==3&&U.length!==4)throw d.invalidParameterError("inputMatrix","3x3 or 4x4 array",U.length);const fe=U.flat().map(Number);if(fe.length!==9&&fe.length!==16)throw d.invalidParameterError("inputMatrix","cardinality of 9 or 16",fe.length);return this.options.recombMatrix=fe,this}function ae(U){if(!d.plainObject(U))throw d.invalidParameterError("options","plain object",U);if("brightness"in U)if(d.number(U.brightness)&&U.brightness>=0)this.options.brightness=U.brightness;else throw d.invalidParameterError("brightness","number above zero",U.brightness);if("saturation"in U)if(d.number(U.saturation)&&U.saturation>=0)this.options.saturation=U.saturation;else throw d.invalidParameterError("saturation","number above zero",U.saturation);if("hue"in U)if(d.integer(U.hue))this.options.hue=U.hue%360;else throw d.invalidParameterError("hue","number",U.hue);if("lightness"in U)if(d.number(U.lightness))this.options.lightness=U.lightness;else throw d.invalidParameterError("lightness","number",U.lightness);return this}return operation=U=>{Object.assign(U.prototype,{autoOrient:m,rotate:E,flip:A,flop:a,affine:_,sharpen:g,erode:M,dilate:l,median:b,blur:w,flatten:y,unflatten:B,gamma:R,negate:S,normalise:P,normalize:T,clahe:k,convolve:z,threshold:j,boolean:V,linear:Q,recomb:ne,modulate:ae})},operation}var color,hasRequiredColor;function requireColor(){if(hasRequiredColor)return color;hasRequiredColor=1;var d=Object.defineProperty,v=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,m=Object.prototype.hasOwnProperty,A=(x,I)=>{for(var C in I)d(x,C,{get:I[C],enumerable:!0})},a=(x,I,C,N)=>{if(I&&typeof I=="object"||typeof I=="function")for(let F of E(I))!m.call(x,F)&&F!==C&&d(x,F,{get:()=>I[F],enumerable:!(N=v(I,F))||N.enumerable});return x},_=x=>a(d({},"__esModule",{value:!0}),x),g={};A(g,{default:()=>J}),color=_(g);var b={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},w=Object.create(null);for(const x in b)Object.hasOwn(b,x)&&(w[b[x]]=x);var l={to:{},get:{}};l.get=function(x){const I=x.slice(0,3).toLowerCase();let C,N;switch(I){case"hsl":{C=l.get.hsl(x),N="hsl";break}case"hwb":{C=l.get.hwb(x),N="hwb";break}default:{C=l.get.rgb(x),N="rgb";break}}return C?{model:N,value:C}:null},l.get.rgb=function(x){if(!x)return null;const I=/^#([a-f\d]{3,4})$/i,C=/^#([a-f\d]{6})([a-f\d]{2})?$/i,N=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,F=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,D=/^(\w+)$/;let X=[0,0,0,1],le,ue,pe;if(le=x.match(C)){for(pe=le[2],le=le[1],ue=0;ue<3;ue++){const Ce=ue*2;X[ue]=Number.parseInt(le.slice(Ce,Ce+2),16)}pe&&(X[3]=Number.parseInt(pe,16)/255)}else if(le=x.match(I)){for(le=le[1],pe=le[3],ue=0;ue<3;ue++)X[ue]=Number.parseInt(le[ue]+le[ue],16);pe&&(X[3]=Number.parseInt(pe+pe,16)/255)}else if(le=x.match(N)){for(ue=0;ue<3;ue++)X[ue]=Number.parseInt(le[ue+1],10);le[4]&&(X[3]=le[5]?Number.parseFloat(le[4])*.01:Number.parseFloat(le[4]))}else if(le=x.match(F)){for(ue=0;ue<3;ue++)X[ue]=Math.round(Number.parseFloat(le[ue+1])*2.55);le[4]&&(X[3]=le[5]?Number.parseFloat(le[4])*.01:Number.parseFloat(le[4]))}else return(le=x.match(D))?le[1]==="transparent"?[0,0,0,0]:Object.hasOwn(b,le[1])?(X=b[le[1]],X[3]=1,X):null:null;for(ue=0;ue<3;ue++)X[ue]=M(X[ue],0,255);return X[3]=M(X[3],0,1),X},l.get.hsl=function(x){if(!x)return null;const I=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,C=x.match(I);if(C){const N=Number.parseFloat(C[4]),F=(Number.parseFloat(C[1])%360+360)%360,D=M(Number.parseFloat(C[2]),0,100),X=M(Number.parseFloat(C[3]),0,100),le=M(Number.isNaN(N)?1:N,0,1);return[F,D,X,le]}return null},l.get.hwb=function(x){if(!x)return null;const I=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,C=x.match(I);if(C){const N=Number.parseFloat(C[4]),F=(Number.parseFloat(C[1])%360+360)%360,D=M(Number.parseFloat(C[2]),0,100),X=M(Number.parseFloat(C[3]),0,100),le=M(Number.isNaN(N)?1:N,0,1);return[F,D,X,le]}return null},l.to.hex=function(...x){return"#"+y(x[0])+y(x[1])+y(x[2])+(x[3]<1?y(Math.round(x[3]*255)):"")},l.to.rgb=function(...x){return x.length<4||x[3]===1?"rgb("+Math.round(x[0])+", "+Math.round(x[1])+", "+Math.round(x[2])+")":"rgba("+Math.round(x[0])+", "+Math.round(x[1])+", "+Math.round(x[2])+", "+x[3]+")"},l.to.rgb.percent=function(...x){const I=Math.round(x[0]/255*100),C=Math.round(x[1]/255*100),N=Math.round(x[2]/255*100);return x.length<4||x[3]===1?"rgb("+I+"%, "+C+"%, "+N+"%)":"rgba("+I+"%, "+C+"%, "+N+"%, "+x[3]+")"},l.to.hsl=function(...x){return x.length<4||x[3]===1?"hsl("+x[0]+", "+x[1]+"%, "+x[2]+"%)":"hsla("+x[0]+", "+x[1]+"%, "+x[2]+"%, "+x[3]+")"},l.to.hwb=function(...x){let I="";return x.length>=4&&x[3]!==1&&(I=", "+x[3]),"hwb("+x[0]+", "+x[1]+"%, "+x[2]+"%"+I+")"},l.to.keyword=function(...x){return w[x.slice(0,3)]};function M(x,I,C){return Math.min(Math.max(I,x),C)}function y(x){const I=Math.round(x).toString(16).toUpperCase();return I.length<2?"0"+I:I}var B=l,R={};for(const x of Object.keys(b))R[b[x]]=x;var S={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},P=S,T=(6/29)**3;function k(x){const I=x>.0031308?1.055*x**.4166666666666667-.055:x*12.92;return Math.min(Math.max(0,I),1)}function z(x){return x>.04045?((x+.055)/1.055)**2.4:x/12.92}for(const x of Object.keys(S)){if(!("channels"in S[x]))throw new Error("missing channels property: "+x);if(!("labels"in S[x]))throw new Error("missing channel labels property: "+x);if(S[x].labels.length!==S[x].channels)throw new Error("channel and label counts mismatch: "+x);const{channels:I,labels:C}=S[x];delete S[x].channels,delete S[x].labels,Object.defineProperty(S[x],"channels",{value:I}),Object.defineProperty(S[x],"labels",{value:C})}S.rgb.hsl=function(x){const I=x[0]/255,C=x[1]/255,N=x[2]/255,F=Math.min(I,C,N),D=Math.max(I,C,N),X=D-F;let le,ue;switch(D){case F:{le=0;break}case I:{le=(C-N)/X;break}case C:{le=2+(N-I)/X;break}case N:{le=4+(I-C)/X;break}}le=Math.min(le*60,360),le<0&&(le+=360);const pe=(F+D)/2;return D===F?ue=0:pe<=.5?ue=X/(D+F):ue=X/(2-D-F),[le,ue*100,pe*100]},S.rgb.hsv=function(x){let I,C,N,F,D;const X=x[0]/255,le=x[1]/255,ue=x[2]/255,pe=Math.max(X,le,ue),Ce=pe-Math.min(X,le,ue),me=function(ce){return(pe-ce)/6/Ce+1/2};if(Ce===0)F=0,D=0;else{switch(D=Ce/pe,I=me(X),C=me(le),N=me(ue),pe){case X:{F=N-C;break}case le:{F=1/3+I-N;break}case ue:{F=2/3+C-I;break}}F<0?F+=1:F>1&&(F-=1)}return[F*360,D*100,pe*100]},S.rgb.hwb=function(x){const I=x[0],C=x[1];let N=x[2];const F=S.rgb.hsl(x)[0],D=1/255*Math.min(I,Math.min(C,N));return N=1-1/255*Math.max(I,Math.max(C,N)),[F,D*100,N*100]},S.rgb.oklab=function(x){const I=z(x[0]/255),C=z(x[1]/255),N=z(x[2]/255),F=Math.cbrt(.4122214708*I+.5363325363*C+.0514459929*N),D=Math.cbrt(.2119034982*I+.6806995451*C+.1073969566*N),X=Math.cbrt(.0883024619*I+.2817188376*C+.6299787005*N),le=.2104542553*F+.793617785*D-.0040720468*X,ue=1.9779984951*F-2.428592205*D+.4505937099*X,pe=.0259040371*F+.7827717662*D-.808675766*X;return[le*100,ue*100,pe*100]},S.rgb.cmyk=function(x){const I=x[0]/255,C=x[1]/255,N=x[2]/255,F=Math.min(1-I,1-C,1-N),D=(1-I-F)/(1-F)||0,X=(1-C-F)/(1-F)||0,le=(1-N-F)/(1-F)||0;return[D*100,X*100,le*100,F*100]};function j(x,I){return(x[0]-I[0])**2+(x[1]-I[1])**2+(x[2]-I[2])**2}S.rgb.keyword=function(x){const I=R[x];if(I)return I;let C=Number.POSITIVE_INFINITY,N;for(const F of Object.keys(b)){const D=b[F],X=j(x,D);X<C&&(C=X,N=F)}return N},S.keyword.rgb=function(x){return b[x]},S.rgb.xyz=function(x){const I=z(x[0]/255),C=z(x[1]/255),N=z(x[2]/255),F=I*.4124564+C*.3575761+N*.1804375,D=I*.2126729+C*.7151522+N*.072175,X=I*.0193339+C*.119192+N*.9503041;return[F*100,D*100,X*100]},S.rgb.lab=function(x){const I=S.rgb.xyz(x);let C=I[0],N=I[1],F=I[2];C/=95.047,N/=100,F/=108.883,C=C>T?C**(1/3):7.787*C+16/116,N=N>T?N**(1/3):7.787*N+16/116,F=F>T?F**(1/3):7.787*F+16/116;const D=116*N-16,X=500*(C-N),le=200*(N-F);return[D,X,le]},S.hsl.rgb=function(x){const I=x[0]/360,C=x[1]/100,N=x[2]/100;let F,D;if(C===0)return D=N*255,[D,D,D];const X=N<.5?N*(1+C):N+C-N*C,le=2*N-X,ue=[0,0,0];for(let pe=0;pe<3;pe++)F=I+1/3*-(pe-1),F<0&&F++,F>1&&F--,6*F<1?D=le+(X-le)*6*F:2*F<1?D=X:3*F<2?D=le+(X-le)*(2/3-F)*6:D=le,ue[pe]=D*255;return ue},S.hsl.hsv=function(x){const I=x[0];let C=x[1]/100,N=x[2]/100,F=C;const D=Math.max(N,.01);N*=2,C*=N<=1?N:2-N,F*=D<=1?D:2-D;const X=(N+C)/2,le=N===0?2*F/(D+F):2*C/(N+C);return[I,le*100,X*100]},S.hsv.rgb=function(x){const I=x[0]/60,C=x[1]/100;let N=x[2]/100;const F=Math.floor(I)%6,D=I-Math.floor(I),X=255*N*(1-C),le=255*N*(1-C*D),ue=255*N*(1-C*(1-D));switch(N*=255,F){case 0:return[N,ue,X];case 1:return[le,N,X];case 2:return[X,N,ue];case 3:return[X,le,N];case 4:return[ue,X,N];case 5:return[N,X,le]}},S.hsv.hsl=function(x){const I=x[0],C=x[1]/100,N=x[2]/100,F=Math.max(N,.01);let D,X;X=(2-C)*N;const le=(2-C)*F;return D=C*F,D/=le<=1?le:2-le,D=D||0,X/=2,[I,D*100,X*100]},S.hwb.rgb=function(x){const I=x[0]/360;let C=x[1]/100,N=x[2]/100;const F=C+N;let D;F>1&&(C/=F,N/=F);const X=Math.floor(6*I),le=1-N;D=6*I-X,(X&1)!==0&&(D=1-D);const ue=C+D*(le-C);let pe,Ce,me;switch(X){default:case 6:case 0:{pe=le,Ce=ue,me=C;break}case 1:{pe=ue,Ce=le,me=C;break}case 2:{pe=C,Ce=le,me=ue;break}case 3:{pe=C,Ce=ue,me=le;break}case 4:{pe=ue,Ce=C,me=le;break}case 5:{pe=le,Ce=C,me=ue;break}}return[pe*255,Ce*255,me*255]},S.cmyk.rgb=function(x){const I=x[0]/100,C=x[1]/100,N=x[2]/100,F=x[3]/100,D=1-Math.min(1,I*(1-F)+F),X=1-Math.min(1,C*(1-F)+F),le=1-Math.min(1,N*(1-F)+F);return[D*255,X*255,le*255]},S.xyz.rgb=function(x){const I=x[0]/100,C=x[1]/100,N=x[2]/100;let F,D,X;return F=I*3.2404542+C*-1.5371385+N*-.4985314,D=I*-.969266+C*1.8760108+N*.041556,X=I*.0556434+C*-.2040259+N*1.0572252,F=k(F),D=k(D),X=k(X),[F*255,D*255,X*255]},S.xyz.lab=function(x){let I=x[0],C=x[1],N=x[2];I/=95.047,C/=100,N/=108.883,I=I>T?I**(1/3):7.787*I+16/116,C=C>T?C**(1/3):7.787*C+16/116,N=N>T?N**(1/3):7.787*N+16/116;const F=116*C-16,D=500*(I-C),X=200*(C-N);return[F,D,X]},S.xyz.oklab=function(x){const I=x[0]/100,C=x[1]/100,N=x[2]/100,F=Math.cbrt(.8189330101*I+.3618667424*C-.1288597137*N),D=Math.cbrt(.0329845436*I+.9293118715*C+.0361456387*N),X=Math.cbrt(.0482003018*I+.2643662691*C+.633851707*N),le=.2104542553*F+.793617785*D-.0040720468*X,ue=1.9779984951*F-2.428592205*D+.4505937099*X,pe=.0259040371*F+.7827717662*D-.808675766*X;return[le*100,ue*100,pe*100]},S.oklab.oklch=function(x){return S.lab.lch(x)},S.oklab.xyz=function(x){const I=x[0]/100,C=x[1]/100,N=x[2]/100,F=(.999999998*I+.396337792*C+.215803758*N)**3,D=(1.000000008*I-.105561342*C-.063854175*N)**3,X=(1.000000055*I-.089484182*C-1.291485538*N)**3,le=1.227013851*F-.55779998*D+.281256149*X,ue=-.040580178*F+1.11225687*D-.071676679*X,pe=-.076381285*F-.421481978*D+1.58616322*X;return[le*100,ue*100,pe*100]},S.oklab.rgb=function(x){const I=x[0]/100,C=x[1]/100,N=x[2]/100,F=(I+.3963377774*C+.2158037573*N)**3,D=(I-.1055613458*C-.0638541728*N)**3,X=(I-.0894841775*C-1.291485548*N)**3,le=k(4.0767416621*F-3.3077115913*D+.2309699292*X),ue=k(-1.2684380046*F+2.6097574011*D-.3413193965*X),pe=k(-.0041960863*F-.7034186147*D+1.707614701*X);return[le*255,ue*255,pe*255]},S.oklch.oklab=function(x){return S.lch.lab(x)},S.lab.xyz=function(x){const I=x[0],C=x[1],N=x[2];let F,D,X;D=(I+16)/116,F=C/500+D,X=D-N/200;const le=D**3,ue=F**3,pe=X**3;return D=le>T?le:(D-16/116)/7.787,F=ue>T?ue:(F-16/116)/7.787,X=pe>T?pe:(X-16/116)/7.787,F*=95.047,D*=100,X*=108.883,[F,D,X]},S.lab.lch=function(x){const I=x[0],C=x[1],N=x[2];let F;F=Math.atan2(N,C)*360/2/Math.PI,F<0&&(F+=360);const X=Math.sqrt(C*C+N*N);return[I,X,F]},S.lch.lab=function(x){const I=x[0],C=x[1],F=x[2]/360*2*Math.PI,D=C*Math.cos(F),X=C*Math.sin(F);return[I,D,X]},S.rgb.ansi16=function(x,I=null){const[C,N,F]=x;let D=I===null?S.rgb.hsv(x)[2]:I;if(D=Math.round(D/50),D===0)return 30;let X=30+(Math.round(F/255)<<2|Math.round(N/255)<<1|Math.round(C/255));return D===2&&(X+=60),X},S.hsv.ansi16=function(x){return S.rgb.ansi16(S.hsv.rgb(x),x[2])},S.rgb.ansi256=function(x){const I=x[0],C=x[1],N=x[2];return I>>4===C>>4&&C>>4===N>>4?I<8?16:I>248?231:Math.round((I-8)/247*24)+232:16+36*Math.round(I/255*5)+6*Math.round(C/255*5)+Math.round(N/255*5)},S.ansi16.rgb=function(x){x=x[0];let I=x%10;if(I===0||I===7)return x>50&&(I+=3.5),I=I/10.5*255,[I,I,I];const C=(Math.trunc(x>50)+1)*.5,N=(I&1)*C*255,F=(I>>1&1)*C*255,D=(I>>2&1)*C*255;return[N,F,D]},S.ansi256.rgb=function(x){if(x=x[0],x>=232){const D=(x-232)*10+8;return[D,D,D]}x-=16;let I;const C=Math.floor(x/36)/5*255,N=Math.floor((I=x%36)/6)/5*255,F=I%6/5*255;return[C,N,F]},S.rgb.hex=function(x){const C=(((Math.round(x[0])&255)<<16)+((Math.round(x[1])&255)<<8)+(Math.round(x[2])&255)).toString(16).toUpperCase();return"000000".slice(C.length)+C},S.hex.rgb=function(x){const I=x.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!I)return[0,0,0];let C=I[0];I[0].length===3&&(C=[...C].map(le=>le+le).join(""));const N=Number.parseInt(C,16),F=N>>16&255,D=N>>8&255,X=N&255;return[F,D,X]},S.rgb.hcg=function(x){const I=x[0]/255,C=x[1]/255,N=x[2]/255,F=Math.max(Math.max(I,C),N),D=Math.min(Math.min(I,C),N),X=F-D;let le;const ue=X<1?D/(1-X):0;return X<=0?le=0:F===I?le=(C-N)/X%6:F===C?le=2+(N-I)/X:le=4+(I-C)/X,le/=6,le%=1,[le*360,X*100,ue*100]},S.hsl.hcg=function(x){const I=x[1]/100,C=x[2]/100,N=C<.5?2*I*C:2*I*(1-C);let F=0;return N<1&&(F=(C-.5*N)/(1-N)),[x[0],N*100,F*100]},S.hsv.hcg=function(x){const I=x[1]/100,C=x[2]/100,N=I*C;let F=0;return N<1&&(F=(C-N)/(1-N)),[x[0],N*100,F*100]},S.hcg.rgb=function(x){const I=x[0]/360,C=x[1]/100,N=x[2]/100;if(C===0)return[N*255,N*255,N*255];const F=[0,0,0],D=I%1*6,X=D%1,le=1-X;let ue=0;switch(Math.floor(D)){case 0:{F[0]=1,F[1]=X,F[2]=0;break}case 1:{F[0]=le,F[1]=1,F[2]=0;break}case 2:{F[0]=0,F[1]=1,F[2]=X;break}case 3:{F[0]=0,F[1]=le,F[2]=1;break}case 4:{F[0]=X,F[1]=0,F[2]=1;break}default:F[0]=1,F[1]=0,F[2]=le}return ue=(1-C)*N,[(C*F[0]+ue)*255,(C*F[1]+ue)*255,(C*F[2]+ue)*255]},S.hcg.hsv=function(x){const I=x[1]/100,C=x[2]/100,N=I+C*(1-I);let F=0;return N>0&&(F=I/N),[x[0],F*100,N*100]},S.hcg.hsl=function(x){const I=x[1]/100,N=x[2]/100*(1-I)+.5*I;let F=0;return N>0&&N<.5?F=I/(2*N):N>=.5&&N<1&&(F=I/(2*(1-N))),[x[0],F*100,N*100]},S.hcg.hwb=function(x){const I=x[1]/100,C=x[2]/100,N=I+C*(1-I);return[x[0],(N-I)*100,(1-N)*100]},S.hwb.hcg=function(x){const I=x[1]/100,N=1-x[2]/100,F=N-I;let D=0;return F<1&&(D=(N-F)/(1-F)),[x[0],F*100,D*100]},S.apple.rgb=function(x){return[x[0]/65535*255,x[1]/65535*255,x[2]/65535*255]},S.rgb.apple=function(x){return[x[0]/255*65535,x[1]/255*65535,x[2]/255*65535]},S.gray.rgb=function(x){return[x[0]/100*255,x[0]/100*255,x[0]/100*255]},S.gray.hsl=function(x){return[0,0,x[0]]},S.gray.hsv=S.gray.hsl,S.gray.hwb=function(x){return[0,100,x[0]]},S.gray.cmyk=function(x){return[0,0,0,x[0]]},S.gray.lab=function(x){return[x[0],0,0]},S.gray.hex=function(x){const I=Math.round(x[0]/100*255)&255,N=((I<<16)+(I<<8)+I).toString(16).toUpperCase();return"000000".slice(N.length)+N},S.rgb.gray=function(x){return[(x[0]+x[1]+x[2])/3/255*100]};function V(){const x={},I=Object.keys(P);for(let{length:C}=I,N=0;N<C;N++)x[I[N]]={distance:-1,parent:null};return x}function Q(x){const I=V(),C=[x];for(I[x].distance=0;C.length>0;){const N=C.pop(),F=Object.keys(P[N]);for(let{length:D}=F,X=0;X<D;X++){const le=F[X],ue=I[le];ue.distance===-1&&(ue.distance=I[N].distance+1,ue.parent=N,C.unshift(le))}}return I}function ne(x,I){return function(C){return I(x(C))}}function ae(x,I){const C=[I[x].parent,x];let N=P[I[x].parent][x],F=I[x].parent;for(;I[F].parent;)C.unshift(I[F].parent),N=ne(P[I[F].parent][F],N),F=I[F].parent;return N.conversion=C,N}function U(x){const I=Q(x),C={},N=Object.keys(I);for(let{length:F}=N,D=0;D<F;D++){const X=N[D];I[X].parent!==null&&(C[X]=ae(X,I))}return C}var fe=U,p={},e=Object.keys(P);function t(x){const I=function(...C){const N=C[0];return N==null?N:(N.length>1&&(C=N),x(C))};return"conversion"in x&&(I.conversion=x.conversion),I}function n(x){const I=function(...C){const N=C[0];if(N==null)return N;N.length>1&&(C=N);const F=x(C);if(typeof F=="object")for(let{length:D}=F,X=0;X<D;X++)F[X]=Math.round(F[X]);return F};return"conversion"in x&&(I.conversion=x.conversion),I}for(const x of e){p[x]={},Object.defineProperty(p[x],"channels",{value:P[x].channels}),Object.defineProperty(p[x],"labels",{value:P[x].labels});const I=fe(x),C=Object.keys(I);for(const N of C){const F=I[N];p[x][N]=n(F),p[x][N].raw=t(F)}}var f=p,s=["keyword","gray","hex"],u={};for(const x of Object.keys(f))u[[...f[x].labels].sort().join("")]=x;var c={};function o(x,I){if(!(this instanceof o))return new o(x,I);if(I&&I in s&&(I=null),I&&!(I in f))throw new Error("Unknown model: "+I);let C,N;if(x==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(x instanceof o)this.model=x.model,this.color=[...x.color],this.valpha=x.valpha;else if(typeof x=="string"){const F=B.get(x);if(F===null)throw new Error("Unable to parse color from string: "+x);this.model=F.model,N=f[this.model].channels,this.color=F.value.slice(0,N),this.valpha=typeof F.value[N]=="number"?F.value[N]:1}else if(x.length>0){this.model=I||"rgb",N=f[this.model].channels;const F=Array.prototype.slice.call(x,0,N);this.color=Y(F,N),this.valpha=typeof x[N]=="number"?x[N]:1}else if(typeof x=="number")this.model="rgb",this.color=[x>>16&255,x>>8&255,x&255],this.valpha=1;else{this.valpha=1;const F=Object.keys(x);"alpha"in x&&(F.splice(F.indexOf("alpha"),1),this.valpha=typeof x.alpha=="number"?x.alpha:0);const D=F.sort().join("");if(!(D in u))throw new Error("Unable to parse color from object: "+JSON.stringify(x));this.model=u[D];const{labels:X}=f[this.model],le=[];for(C=0;C<X.length;C++)le.push(x[X[C]]);this.color=Y(le)}if(c[this.model])for(N=f[this.model].channels,C=0;C<N;C++){const F=c[this.model][C];F&&(this.color[C]=F(this.color[C]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(x){let I=this.model in B.to?this:this.rgb();I=I.round(typeof x=="number"?x:1);const C=I.valpha===1?I.color:[...I.color,this.valpha];return B.to[I.model](...C)},percentString(x){const I=this.rgb().round(typeof x=="number"?x:1),C=I.valpha===1?I.color:[...I.color,this.valpha];return B.to.rgb.percent(...C)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const x={},{channels:I}=f[this.model],{labels:C}=f[this.model];for(let N=0;N<I;N++)x[C[N]]=this.color[N];return this.valpha!==1&&(x.alpha=this.valpha),x},unitArray(){const x=this.rgb().color;return x[0]/=255,x[1]/=255,x[2]/=255,this.valpha!==1&&x.push(this.valpha),x},unitObject(){const x=this.rgb().object();return x.r/=255,x.g/=255,x.b/=255,this.valpha!==1&&(x.alpha=this.valpha),x},round(x){return x=Math.max(x||0,0),new o([...this.color.map(h(x)),this.valpha],this.model)},alpha(x){return x!==void 0?new o([...this.color,Math.max(0,Math.min(1,x))],this.model):this.valpha},red:q("rgb",0,$(255)),green:q("rgb",1,$(255)),blue:q("rgb",2,$(255)),hue:q(["hsl","hsv","hsl","hwb","hcg"],0,x=>(x%360+360)%360),saturationl:q("hsl",1,$(100)),lightness:q("hsl",2,$(100)),saturationv:q("hsv",1,$(100)),value:q("hsv",2,$(100)),chroma:q("hcg",1,$(100)),gray:q("hcg",2,$(100)),white:q("hwb",1,$(100)),wblack:q("hwb",2,$(100)),cyan:q("cmyk",0,$(100)),magenta:q("cmyk",1,$(100)),yellow:q("cmyk",2,$(100)),black:q("cmyk",3,$(100)),x:q("xyz",0,$(95.047)),y:q("xyz",1,$(100)),z:q("xyz",2,$(108.833)),l:q("lab",0,$(100)),a:q("lab",1),b:q("lab",2),keyword(x){return x!==void 0?new o(x):f[this.model].keyword(this.color)},hex(x){return x!==void 0?new o(x):B.to.hex(...this.rgb().round().color)},hexa(x){if(x!==void 0)return new o(x);const I=this.rgb().round().color;let C=Math.round(this.valpha*255).toString(16).toUpperCase();return C.length===1&&(C="0"+C),B.to.hex(...I)+C},rgbNumber(){const x=this.rgb().color;return(x[0]&255)<<16|(x[1]&255)<<8|x[2]&255},luminosity(){const x=this.rgb().color,I=[];for(const[C,N]of x.entries()){const F=N/255;I[C]=F<=.04045?F/12.92:((F+.055)/1.055)**2.4}return .2126*I[0]+.7152*I[1]+.0722*I[2]},contrast(x){const I=this.luminosity(),C=x.luminosity();return I>C?(I+.05)/(C+.05):(C+.05)/(I+.05)},level(x){const I=this.contrast(x);return I>=7?"AAA":I>=4.5?"AA":""},isDark(){const x=this.rgb().color;return(x[0]*2126+x[1]*7152+x[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const x=this.rgb();for(let I=0;I<3;I++)x.color[I]=255-x.color[I];return x},lighten(x){const I=this.hsl();return I.color[2]+=I.color[2]*x,I},darken(x){const I=this.hsl();return I.color[2]-=I.color[2]*x,I},saturate(x){const I=this.hsl();return I.color[1]+=I.color[1]*x,I},desaturate(x){const I=this.hsl();return I.color[1]-=I.color[1]*x,I},whiten(x){const I=this.hwb();return I.color[1]+=I.color[1]*x,I},blacken(x){const I=this.hwb();return I.color[2]+=I.color[2]*x,I},grayscale(){const x=this.rgb().color,I=x[0]*.3+x[1]*.59+x[2]*.11;return o.rgb(I,I,I)},fade(x){return this.alpha(this.valpha-this.valpha*x)},opaquer(x){return this.alpha(this.valpha+this.valpha*x)},rotate(x){const I=this.hsl();let C=I.color[0];return C=(C+x)%360,C=C<0?360+C:C,I.color[0]=C,I},mix(x,I){if(!x||!x.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof x);const C=x.rgb(),N=this.rgb(),F=I===void 0?.5:I,D=2*F-1,X=C.alpha()-N.alpha(),le=((D*X===-1?D:(D+X)/(1+D*X))+1)/2,ue=1-le;return o.rgb(le*C.red()+ue*N.red(),le*C.green()+ue*N.green(),le*C.blue()+ue*N.blue(),C.alpha()*F+N.alpha()*(1-F))}};for(const x of Object.keys(f)){if(s.includes(x))continue;const{channels:I}=f[x];o.prototype[x]=function(...C){return this.model===x?new o(this):C.length>0?new o(C,x):new o([...H(f[this.model][x].raw(this.color)),this.valpha],x)},o[x]=function(...C){let N=C[0];return typeof N=="number"&&(N=Y(C,I)),new o(N,x)}}function r(x,I){return Number(x.toFixed(I))}function h(x){return function(I){return r(I,x)}}function q(x,I,C){x=Array.isArray(x)?x:[x];for(const N of x)(c[N]||=[])[I]=C;return x=x[0],function(N){let F;return N!==void 0?(C&&(N=C(N)),F=this[x](),F.color[I]=N,F):(F=this[x]().color[I],C&&(F=C(F)),F)}}function $(x){return function(I){return Math.max(0,Math.min(x,I))}}function H(x){return Array.isArray(x)?x:[x]}function Y(x,I){for(let C=0;C<I;C++)typeof x[C]!="number"&&(x[C]=0);return x}var J=o;return color}var colour$1,hasRequiredColour$1;function requireColour$1(){return hasRequiredColour$1||(hasRequiredColour$1=1,colour$1=requireColor().default),colour$1}var colour,hasRequiredColour;function requireColour(){if(hasRequiredColour)return colour;hasRequiredColour=1;const d=requireColour$1(),v=requireIs(),E={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};function m(y){return this._setBackgroundColourOption("tint",y),this}function A(y){return this.options.greyscale=v.bool(y)?y:!0,this}function a(y){return this.greyscale(y)}function _(y){if(!v.string(y))throw v.invalidParameterError("colourspace","string",y);return this.options.colourspacePipeline=y,this}function g(y){return this.pipelineColourspace(y)}function b(y){if(!v.string(y))throw v.invalidParameterError("colourspace","string",y);return this.options.colourspace=y,this}function w(y){return this.toColourspace(y)}function l(y){if(v.object(y)||v.string(y)&&y.length>=3&&y.length<=200){const B=d(y);return[B.red(),B.green(),B.blue(),Math.round(B.alpha()*255)]}else throw v.invalidParameterError("background","object or string",y)}function M(y,B){v.defined(B)&&(this.options[y]=l(B))}return colour=y=>{Object.assign(y.prototype,{tint:m,greyscale:A,grayscale:a,pipelineColourspace:_,pipelineColorspace:g,toColourspace:b,toColorspace:w,_getBackgroundColourOption:l,_setBackgroundColourOption:M}),y.colourspace=E,y.colorspace=E},colour}var channel,hasRequiredChannel;function requireChannel(){if(hasRequiredChannel)return channel;hasRequiredChannel=1;const d=requireIs(),v={and:"and",or:"or",eor:"eor"};function E(){return this.options.removeAlpha=!0,this}function m(g){if(d.defined(g))if(d.number(g)&&d.inRange(g,0,1))this.options.ensureAlpha=g;else throw d.invalidParameterError("alpha","number between 0 and 1",g);else this.options.ensureAlpha=1;return this}function A(g){const b={red:0,green:1,blue:2,alpha:3};if(Object.keys(b).includes(g)&&(g=b[g]),d.integer(g)&&d.inRange(g,0,4))this.options.extractChannel=g;else throw d.invalidParameterError("channel","integer or one of: red, green, blue, alpha",g);return this}function a(g,b){return Array.isArray(g)?g.forEach(function(w){this.options.joinChannelIn.push(this._createInputDescriptor(w,b))},this):this.options.joinChannelIn.push(this._createInputDescriptor(g,b)),this}function _(g){if(d.string(g)&&d.inArray(g,["and","or","eor"]))this.options.bandBoolOp=g;else throw d.invalidParameterError("boolOp","one of: and, or, eor",g);return this}return channel=g=>{Object.assign(g.prototype,{removeAlpha:E,ensureAlpha:m,extractChannel:A,joinChannel:a,bandbool:_}),g.bool=v},channel}var pathBrowserify,hasRequiredPathBrowserify;function requirePathBrowserify(){if(hasRequiredPathBrowserify)return pathBrowserify;hasRequiredPathBrowserify=1;function d(A){if(typeof A!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(A))}function v(A,a){for(var _="",g=0,b=-1,w=0,l,M=0;M<=A.length;++M){if(M<A.length)l=A.charCodeAt(M);else{if(l===47)break;l=47}if(l===47){if(!(b===M-1||w===1))if(b!==M-1&&w===2){if(_.length<2||g!==2||_.charCodeAt(_.length-1)!==46||_.charCodeAt(_.length-2)!==46){if(_.length>2){var y=_.lastIndexOf("/");if(y!==_.length-1){y===-1?(_="",g=0):(_=_.slice(0,y),g=_.length-1-_.lastIndexOf("/")),b=M,w=0;continue}}else if(_.length===2||_.length===1){_="",g=0,b=M,w=0;continue}}a&&(_.length>0?_+="/..":_="..",g=2)}else _.length>0?_+="/"+A.slice(b+1,M):_=A.slice(b+1,M),g=M-b-1;b=M,w=0}else l===46&&w!==-1?++w:w=-1}return _}function E(A,a){var _=a.dir||a.root,g=a.base||(a.name||"")+(a.ext||"");return _?_===a.root?_+g:_+A+g:g}var m={resolve:function(){for(var a="",_=!1,g,b=arguments.length-1;b>=-1&&!_;b--){var w;b>=0?w=arguments[b]:(g===void 0&&(g=process$1.cwd()),w=g),d(w),w.length!==0&&(a=w+"/"+a,_=w.charCodeAt(0)===47)}return a=v(a,!_),_?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(a){if(d(a),a.length===0)return".";var _=a.charCodeAt(0)===47,g=a.charCodeAt(a.length-1)===47;return a=v(a,!_),a.length===0&&!_&&(a="."),a.length>0&&g&&(a+="/"),_?"/"+a:a},isAbsolute:function(a){return d(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,_=0;_<arguments.length;++_){var g=arguments[_];d(g),g.length>0&&(a===void 0?a=g:a+="/"+g)}return a===void 0?".":m.normalize(a)},relative:function(a,_){if(d(a),d(_),a===_||(a=m.resolve(a),_=m.resolve(_),a===_))return"";for(var g=1;g<a.length&&a.charCodeAt(g)===47;++g);for(var b=a.length,w=b-g,l=1;l<_.length&&_.charCodeAt(l)===47;++l);for(var M=_.length,y=M-l,B=w<y?w:y,R=-1,S=0;S<=B;++S){if(S===B){if(y>B){if(_.charCodeAt(l+S)===47)return _.slice(l+S+1);if(S===0)return _.slice(l+S)}else w>B&&(a.charCodeAt(g+S)===47?R=S:S===0&&(R=0));break}var P=a.charCodeAt(g+S),T=_.charCodeAt(l+S);if(P!==T)break;P===47&&(R=S)}var k="";for(S=g+R+1;S<=b;++S)(S===b||a.charCodeAt(S)===47)&&(k.length===0?k+="..":k+="/..");return k.length>0?k+_.slice(l+R):(l+=R,_.charCodeAt(l)===47&&++l,_.slice(l))},_makeLong:function(a){return a},dirname:function(a){if(d(a),a.length===0)return".";for(var _=a.charCodeAt(0),g=_===47,b=-1,w=!0,l=a.length-1;l>=1;--l)if(_=a.charCodeAt(l),_===47){if(!w){b=l;break}}else w=!1;return b===-1?g?"/":".":g&&b===1?"//":a.slice(0,b)},basename:function(a,_){if(_!==void 0&&typeof _!="string")throw new TypeError('"ext" argument must be a string');d(a);var g=0,b=-1,w=!0,l;if(_!==void 0&&_.length>0&&_.length<=a.length){if(_.length===a.length&&_===a)return"";var M=_.length-1,y=-1;for(l=a.length-1;l>=0;--l){var B=a.charCodeAt(l);if(B===47){if(!w){g=l+1;break}}else y===-1&&(w=!1,y=l+1),M>=0&&(B===_.charCodeAt(M)?--M===-1&&(b=l):(M=-1,b=y))}return g===b?b=y:b===-1&&(b=a.length),a.slice(g,b)}else{for(l=a.length-1;l>=0;--l)if(a.charCodeAt(l)===47){if(!w){g=l+1;break}}else b===-1&&(w=!1,b=l+1);return b===-1?"":a.slice(g,b)}},extname:function(a){d(a);for(var _=-1,g=0,b=-1,w=!0,l=0,M=a.length-1;M>=0;--M){var y=a.charCodeAt(M);if(y===47){if(!w){g=M+1;break}continue}b===-1&&(w=!1,b=M+1),y===46?_===-1?_=M:l!==1&&(l=1):_!==-1&&(l=-1)}return _===-1||b===-1||l===0||l===1&&_===b-1&&_===g+1?"":a.slice(_,b)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return E("/",a)},parse:function(a){d(a);var _={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return _;var g=a.charCodeAt(0),b=g===47,w;b?(_.root="/",w=1):w=0;for(var l=-1,M=0,y=-1,B=!0,R=a.length-1,S=0;R>=w;--R){if(g=a.charCodeAt(R),g===47){if(!B){M=R+1;break}continue}y===-1&&(B=!1,y=R+1),g===46?l===-1?l=R:S!==1&&(S=1):l!==-1&&(S=-1)}return l===-1||y===-1||S===0||S===1&&l===y-1&&l===M+1?y!==-1&&(M===0&&b?_.base=_.name=a.slice(1,y):_.base=_.name=a.slice(M,y)):(M===0&&b?(_.name=a.slice(1,l),_.base=a.slice(1,y)):(_.name=a.slice(M,l),_.base=a.slice(M,y)),_.ext=a.slice(l,y)),M>0?_.dir=a.slice(0,M-1):b&&(_.dir="/"),_},sep:"/",delimiter:":",win32:null,posix:null};return m.posix=m,pathBrowserify=m,pathBrowserify}var output,hasRequiredOutput;function requireOutput(){if(hasRequiredOutput)return output;hasRequiredOutput=1;const d=requirePathBrowserify(),v=requireIs(),E=requireSharp(),m=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),A=/\.(jp[2x]|j2[kc])$/i,a=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),_=r=>1<<31-Math.clz32(Math.ceil(Math.log2(r)));function g(r,h){let q;if(v.string(r)?v.string(this.options.input.file)&&d.resolve(this.options.input.file)===d.resolve(r)?q=new Error("Cannot use same file for input and output"):A.test(d.extname(r))&&!this.constructor.format.jp2k.output.file&&(q=a()):q=new Error("Missing output file path"),q)if(v.fn(h))h(q);else return Promise.reject(q);else{this.options.fileOut=r;const $=Error();return this._pipeline(h,$)}return this}function b(r,h){v.object(r)?this._setBooleanOption("resolveWithObject",r.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";const q=Error();return this._pipeline(v.fn(r)?r:h,q)}function w(){return this.options.keepMetadata|=1,this}function l(r){if(v.object(r))for(const[h,q]of Object.entries(r))if(v.object(q))for(const[$,H]of Object.entries(q))if(v.string(H))this.options.withExif[`exif-${h.toLowerCase()}-${$}`]=H;else throw v.invalidParameterError(`${h}.${$}`,"string",H);else throw v.invalidParameterError(h,"object",q);else throw v.invalidParameterError("exif","object",r);return this.options.withExifMerge=!1,this.keepExif()}function M(r){return this.withExif(r),this.options.withExifMerge=!0,this}function y(){return this.options.keepMetadata|=8,this}function B(r,h){if(v.string(r))this.options.withIccProfile=r;else throw v.invalidParameterError("icc","string",r);if(this.keepIccProfile(),v.object(h)&&v.defined(h.attach))if(v.bool(h.attach))h.attach||(this.options.keepMetadata&=-9);else throw v.invalidParameterError("attach","boolean",h.attach);return this}function R(){return this.options.keepMetadata|=2,this}function S(r){if(v.string(r)&&r.length>0)this.options.withXmp=r,this.options.keepMetadata|=2;else throw v.invalidParameterError("xmp","non-empty string",r);return this}function P(){return this.options.keepMetadata=31,this}function T(r){if(this.keepMetadata(),this.withIccProfile("srgb"),v.object(r)){if(v.defined(r.orientation))if(v.integer(r.orientation)&&v.inRange(r.orientation,1,8))this.options.withMetadataOrientation=r.orientation;else throw v.invalidParameterError("orientation","integer between 1 and 8",r.orientation);if(v.defined(r.density))if(v.number(r.density)&&r.density>0)this.options.withMetadataDensity=r.density;else throw v.invalidParameterError("density","positive number",r.density);v.defined(r.icc)&&this.withIccProfile(r.icc),v.defined(r.exif)&&this.withExifMerge(r.exif)}return this}function k(r,h){const q=m.get((v.object(r)&&v.string(r.id)?r.id:r).toLowerCase());if(!q)throw v.invalidParameterError("format",`one of: ${[...m.keys()].join(", ")}`,r);return this[q](h)}function z(r){if(v.object(r)){if(v.defined(r.quality))if(v.integer(r.quality)&&v.inRange(r.quality,1,100))this.options.jpegQuality=r.quality;else throw v.invalidParameterError("quality","integer between 1 and 100",r.quality);if(v.defined(r.progressive)&&this._setBooleanOption("jpegProgressive",r.progressive),v.defined(r.chromaSubsampling))if(v.string(r.chromaSubsampling)&&v.inArray(r.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=r.chromaSubsampling;else throw v.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",r.chromaSubsampling);const h=v.bool(r.optimizeCoding)?r.optimizeCoding:r.optimiseCoding;if(v.defined(h)&&this._setBooleanOption("jpegOptimiseCoding",h),v.defined(r.mozjpeg))if(v.bool(r.mozjpeg))r.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw v.invalidParameterError("mozjpeg","boolean",r.mozjpeg);const q=v.bool(r.trellisQuantization)?r.trellisQuantization:r.trellisQuantisation;v.defined(q)&&this._setBooleanOption("jpegTrellisQuantisation",q),v.defined(r.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",r.overshootDeringing);const $=v.bool(r.optimizeScans)?r.optimizeScans:r.optimiseScans;v.defined($)&&(this._setBooleanOption("jpegOptimiseScans",$),$&&(this.options.jpegProgressive=!0));const H=v.number(r.quantizationTable)?r.quantizationTable:r.quantisationTable;if(v.defined(H))if(v.integer(H)&&v.inRange(H,0,8))this.options.jpegQuantisationTable=H;else throw v.invalidParameterError("quantisationTable","integer between 0 and 8",H)}return this._updateFormatOut("jpeg",r)}function j(r){if(v.object(r)){if(v.defined(r.progressive)&&this._setBooleanOption("pngProgressive",r.progressive),v.defined(r.compressionLevel))if(v.integer(r.compressionLevel)&&v.inRange(r.compressionLevel,0,9))this.options.pngCompressionLevel=r.compressionLevel;else throw v.invalidParameterError("compressionLevel","integer between 0 and 9",r.compressionLevel);v.defined(r.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",r.adaptiveFiltering);const h=r.colours||r.colors;if(v.defined(h))if(v.integer(h)&&v.inRange(h,2,256))this.options.pngBitdepth=_(h);else throw v.invalidParameterError("colours","integer between 2 and 256",h);if(v.defined(r.palette)?this._setBooleanOption("pngPalette",r.palette):[r.quality,r.effort,r.colours,r.colors,r.dither].some(v.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(v.defined(r.quality))if(v.integer(r.quality)&&v.inRange(r.quality,0,100))this.options.pngQuality=r.quality;else throw v.invalidParameterError("quality","integer between 0 and 100",r.quality);if(v.defined(r.effort))if(v.integer(r.effort)&&v.inRange(r.effort,1,10))this.options.pngEffort=r.effort;else throw v.invalidParameterError("effort","integer between 1 and 10",r.effort);if(v.defined(r.dither))if(v.number(r.dither)&&v.inRange(r.dither,0,1))this.options.pngDither=r.dither;else throw v.invalidParameterError("dither","number between 0.0 and 1.0",r.dither)}}return this._updateFormatOut("png",r)}function V(r){if(v.object(r)){if(v.defined(r.quality))if(v.integer(r.quality)&&v.inRange(r.quality,1,100))this.options.webpQuality=r.quality;else throw v.invalidParameterError("quality","integer between 1 and 100",r.quality);if(v.defined(r.alphaQuality))if(v.integer(r.alphaQuality)&&v.inRange(r.alphaQuality,0,100))this.options.webpAlphaQuality=r.alphaQuality;else throw v.invalidParameterError("alphaQuality","integer between 0 and 100",r.alphaQuality);if(v.defined(r.lossless)&&this._setBooleanOption("webpLossless",r.lossless),v.defined(r.nearLossless)&&this._setBooleanOption("webpNearLossless",r.nearLossless),v.defined(r.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",r.smartSubsample),v.defined(r.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",r.smartDeblock),v.defined(r.preset))if(v.string(r.preset)&&v.inArray(r.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=r.preset;else throw v.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",r.preset);if(v.defined(r.effort))if(v.integer(r.effort)&&v.inRange(r.effort,0,6))this.options.webpEffort=r.effort;else throw v.invalidParameterError("effort","integer between 0 and 6",r.effort);v.defined(r.minSize)&&this._setBooleanOption("webpMinSize",r.minSize),v.defined(r.mixed)&&this._setBooleanOption("webpMixed",r.mixed)}return ae(r,this.options),this._updateFormatOut("webp",r)}function Q(r){if(v.object(r)){v.defined(r.reuse)&&this._setBooleanOption("gifReuse",r.reuse),v.defined(r.progressive)&&this._setBooleanOption("gifProgressive",r.progressive);const h=r.colours||r.colors;if(v.defined(h))if(v.integer(h)&&v.inRange(h,2,256))this.options.gifBitdepth=_(h);else throw v.invalidParameterError("colours","integer between 2 and 256",h);if(v.defined(r.effort))if(v.number(r.effort)&&v.inRange(r.effort,1,10))this.options.gifEffort=r.effort;else throw v.invalidParameterError("effort","integer between 1 and 10",r.effort);if(v.defined(r.dither))if(v.number(r.dither)&&v.inRange(r.dither,0,1))this.options.gifDither=r.dither;else throw v.invalidParameterError("dither","number between 0.0 and 1.0",r.dither);if(v.defined(r.interFrameMaxError))if(v.number(r.interFrameMaxError)&&v.inRange(r.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=r.interFrameMaxError;else throw v.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",r.interFrameMaxError);if(v.defined(r.interPaletteMaxError))if(v.number(r.interPaletteMaxError)&&v.inRange(r.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=r.interPaletteMaxError;else throw v.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",r.interPaletteMaxError);if(v.defined(r.keepDuplicateFrames))if(v.bool(r.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",r.keepDuplicateFrames);else throw v.invalidParameterError("keepDuplicateFrames","boolean",r.keepDuplicateFrames)}return ae(r,this.options),this._updateFormatOut("gif",r)}function ne(r){if(!this.constructor.format.jp2k.output.buffer)throw a();if(v.object(r)){if(v.defined(r.quality))if(v.integer(r.quality)&&v.inRange(r.quality,1,100))this.options.jp2Quality=r.quality;else throw v.invalidParameterError("quality","integer between 1 and 100",r.quality);if(v.defined(r.lossless))if(v.bool(r.lossless))this.options.jp2Lossless=r.lossless;else throw v.invalidParameterError("lossless","boolean",r.lossless);if(v.defined(r.tileWidth))if(v.integer(r.tileWidth)&&v.inRange(r.tileWidth,1,32768))this.options.jp2TileWidth=r.tileWidth;else throw v.invalidParameterError("tileWidth","integer between 1 and 32768",r.tileWidth);if(v.defined(r.tileHeight))if(v.integer(r.tileHeight)&&v.inRange(r.tileHeight,1,32768))this.options.jp2TileHeight=r.tileHeight;else throw v.invalidParameterError("tileHeight","integer between 1 and 32768",r.tileHeight);if(v.defined(r.chromaSubsampling))if(v.string(r.chromaSubsampling)&&v.inArray(r.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=r.chromaSubsampling;else throw v.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",r.chromaSubsampling)}return this._updateFormatOut("jp2",r)}function ae(r,h){if(v.object(r)&&v.defined(r.loop))if(v.integer(r.loop)&&v.inRange(r.loop,0,65535))h.loop=r.loop;else throw v.invalidParameterError("loop","integer between 0 and 65535",r.loop);if(v.object(r)&&v.defined(r.delay))if(v.integer(r.delay)&&v.inRange(r.delay,0,65535))h.delay=[r.delay];else if(Array.isArray(r.delay)&&r.delay.every(v.integer)&&r.delay.every(q=>v.inRange(q,0,65535)))h.delay=r.delay;else throw v.invalidParameterError("delay","integer or an array of integers between 0 and 65535",r.delay)}function U(r){if(v.object(r)){if(v.defined(r.quality))if(v.integer(r.quality)&&v.inRange(r.quality,1,100))this.options.tiffQuality=r.quality;else throw v.invalidParameterError("quality","integer between 1 and 100",r.quality);if(v.defined(r.bitdepth))if(v.integer(r.bitdepth)&&v.inArray(r.bitdepth,[1,2,4,8]))this.options.tiffBitdepth=r.bitdepth;else throw v.invalidParameterError("bitdepth","1, 2, 4 or 8",r.bitdepth);if(v.defined(r.tile)&&this._setBooleanOption("tiffTile",r.tile),v.defined(r.tileWidth))if(v.integer(r.tileWidth)&&r.tileWidth>0)this.options.tiffTileWidth=r.tileWidth;else throw v.invalidParameterError("tileWidth","integer greater than zero",r.tileWidth);if(v.defined(r.tileHeight))if(v.integer(r.tileHeight)&&r.tileHeight>0)this.options.tiffTileHeight=r.tileHeight;else throw v.invalidParameterError("tileHeight","integer greater than zero",r.tileHeight);if(v.defined(r.miniswhite)&&this._setBooleanOption("tiffMiniswhite",r.miniswhite),v.defined(r.pyramid)&&this._setBooleanOption("tiffPyramid",r.pyramid),v.defined(r.xres))if(v.number(r.xres)&&r.xres>0)this.options.tiffXres=r.xres;else throw v.invalidParameterError("xres","number greater than zero",r.xres);if(v.defined(r.yres))if(v.number(r.yres)&&r.yres>0)this.options.tiffYres=r.yres;else throw v.invalidParameterError("yres","number greater than zero",r.yres);if(v.defined(r.compression))if(v.string(r.compression)&&v.inArray(r.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=r.compression;else throw v.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",r.compression);if(v.defined(r.bigtiff)&&this._setBooleanOption("tiffBigtiff",r.bigtiff),v.defined(r.predictor))if(v.string(r.predictor)&&v.inArray(r.predictor,["none","horizontal","float"]))this.options.tiffPredictor=r.predictor;else throw v.invalidParameterError("predictor","one of: none, horizontal, float",r.predictor);if(v.defined(r.resolutionUnit))if(v.string(r.resolutionUnit)&&v.inArray(r.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=r.resolutionUnit;else throw v.invalidParameterError("resolutionUnit","one of: inch, cm",r.resolutionUnit)}return this._updateFormatOut("tiff",r)}function fe(r){return this.heif({...r,compression:"av1"})}function p(r){if(v.object(r)){if(v.string(r.compression)&&v.inArray(r.compression,["av1","hevc"]))this.options.heifCompression=r.compression;else throw v.invalidParameterError("compression","one of: av1, hevc",r.compression);if(v.defined(r.quality))if(v.integer(r.quality)&&v.inRange(r.quality,1,100))this.options.heifQuality=r.quality;else throw v.invalidParameterError("quality","integer between 1 and 100",r.quality);if(v.defined(r.lossless))if(v.bool(r.lossless))this.options.heifLossless=r.lossless;else throw v.invalidParameterError("lossless","boolean",r.lossless);if(v.defined(r.effort))if(v.integer(r.effort)&&v.inRange(r.effort,0,9))this.options.heifEffort=r.effort;else throw v.invalidParameterError("effort","integer between 0 and 9",r.effort);if(v.defined(r.chromaSubsampling))if(v.string(r.chromaSubsampling)&&v.inArray(r.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=r.chromaSubsampling;else throw v.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",r.chromaSubsampling);if(v.defined(r.bitdepth))if(v.integer(r.bitdepth)&&v.inArray(r.bitdepth,[8,10,12])){if(r.bitdepth!==8&&this.constructor.versions.heif)throw v.invalidParameterError("bitdepth when using prebuilt binaries",8,r.bitdepth);this.options.heifBitdepth=r.bitdepth}else throw v.invalidParameterError("bitdepth","8, 10 or 12",r.bitdepth)}else throw v.invalidParameterError("options","Object",r);return this._updateFormatOut("heif",r)}function e(r){if(v.object(r)){if(v.defined(r.quality))if(v.integer(r.quality)&&v.inRange(r.quality,1,100))this.options.jxlDistance=r.quality>=30?.1+(100-r.quality)*.09:53/3e3*r.quality*r.quality-23/20*r.quality+25;else throw v.invalidParameterError("quality","integer between 1 and 100",r.quality);else if(v.defined(r.distance))if(v.number(r.distance)&&v.inRange(r.distance,0,15))this.options.jxlDistance=r.distance;else throw v.invalidParameterError("distance","number between 0.0 and 15.0",r.distance);if(v.defined(r.decodingTier))if(v.integer(r.decodingTier)&&v.inRange(r.decodingTier,0,4))this.options.jxlDecodingTier=r.decodingTier;else throw v.invalidParameterError("decodingTier","integer between 0 and 4",r.decodingTier);if(v.defined(r.lossless))if(v.bool(r.lossless))this.options.jxlLossless=r.lossless;else throw v.invalidParameterError("lossless","boolean",r.lossless);if(v.defined(r.effort))if(v.integer(r.effort)&&v.inRange(r.effort,1,9))this.options.jxlEffort=r.effort;else throw v.invalidParameterError("effort","integer between 1 and 9",r.effort)}return ae(r,this.options),this._updateFormatOut("jxl",r)}function t(r){if(v.object(r)&&v.defined(r.depth))if(v.string(r.depth)&&v.inArray(r.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=r.depth;else throw v.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",r.depth);return this._updateFormatOut("raw")}function n(r){if(v.object(r)){if(v.defined(r.size))if(v.integer(r.size)&&v.inRange(r.size,1,8192))this.options.tileSize=r.size;else throw v.invalidParameterError("size","integer between 1 and 8192",r.size);if(v.defined(r.overlap))if(v.integer(r.overlap)&&v.inRange(r.overlap,0,8192)){if(r.overlap>this.options.tileSize)throw v.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,r.overlap);this.options.tileOverlap=r.overlap}else throw v.invalidParameterError("overlap","integer between 0 and 8192",r.overlap);if(v.defined(r.container))if(v.string(r.container)&&v.inArray(r.container,["fs","zip"]))this.options.tileContainer=r.container;else throw v.invalidParameterError("container","one of: fs, zip",r.container);if(v.defined(r.layout))if(v.string(r.layout)&&v.inArray(r.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=r.layout;else throw v.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",r.layout);if(v.defined(r.angle))if(v.integer(r.angle)&&!(r.angle%90))this.options.tileAngle=r.angle;else throw v.invalidParameterError("angle","positive/negative multiple of 90",r.angle);if(this._setBackgroundColourOption("tileBackground",r.background),v.defined(r.depth))if(v.string(r.depth)&&v.inArray(r.depth,["onepixel","onetile","one"]))this.options.tileDepth=r.depth;else throw v.invalidParameterError("depth","one of: onepixel, onetile, one",r.depth);if(v.defined(r.skipBlanks))if(v.integer(r.skipBlanks)&&v.inRange(r.skipBlanks,-1,65535))this.options.tileSkipBlanks=r.skipBlanks;else throw v.invalidParameterError("skipBlanks","integer between -1 and 255/65535",r.skipBlanks);else v.defined(r.layout)&&r.layout==="google"&&(this.options.tileSkipBlanks=5);const h=v.bool(r.center)?r.center:r.centre;if(v.defined(h)&&this._setBooleanOption("tileCentre",h),v.defined(r.id))if(v.string(r.id))this.options.tileId=r.id;else throw v.invalidParameterError("id","string",r.id);if(v.defined(r.basename))if(v.string(r.basename))this.options.tileBasename=r.basename;else throw v.invalidParameterError("basename","string",r.basename)}if(v.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw v.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function f(r){if(!v.plainObject(r))throw v.invalidParameterError("options","object",r);if(v.integer(r.seconds)&&v.inRange(r.seconds,0,3600))this.options.timeoutSeconds=r.seconds;else throw v.invalidParameterError("seconds","integer between 0 and 3600",r.seconds);return this}function s(r,h){return v.object(h)&&h.force===!1||(this.options.formatOut=r),this}function u(r,h){if(v.bool(h))this.options[r]=h;else throw v.invalidParameterError(r,"boolean",h)}function c(){if(!this.options.streamOut){this.options.streamOut=!0;const r=Error();this._pipeline(void 0,r)}}function o(r,h){return typeof r=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),E.pipeline(this.options,(q,$,H)=>{q?r(v.nativeError(q,h)):r(null,$,H)})}):E.pipeline(this.options,(q,$,H)=>{q?r(v.nativeError(q,h)):r(null,$,H)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),E.pipeline(this.options,(q,$,H)=>{q?this.emit("error",v.nativeError(q,h)):(this.emit("info",H),this.push($)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):E.pipeline(this.options,(q,$,H)=>{q?this.emit("error",v.nativeError(q,h)):(this.emit("info",H),this.push($)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((q,$)=>{this.once("finish",()=>{this._flattenBufferIn(),E.pipeline(this.options,(H,Y,J)=>{H?$(v.nativeError(H,h)):this.options.resolveWithObject?q({data:Y,info:J}):q(Y)})})}):new Promise((q,$)=>{E.pipeline(this.options,(H,Y,J)=>{H?$(v.nativeError(H,h)):this.options.resolveWithObject?q({data:Y,info:J}):q(Y)})})}return output=r=>{Object.assign(r.prototype,{toFile:g,toBuffer:b,keepExif:w,withExif:l,withExifMerge:M,keepIccProfile:y,withIccProfile:B,keepXmp:R,withXmp:S,keepMetadata:P,withMetadata:T,toFormat:k,jpeg:z,jp2:ne,png:j,webp:V,tiff:U,avif:fe,heif:p,jxl:e,gif:Q,raw:t,tile:n,timeout:f,_updateFormatOut:s,_setBooleanOption:u,_read:c,_pipeline:o})},output}var browser={},hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser.endianness=function(){return"LE"},browser.hostname=function(){return typeof location<"u"?location.hostname:""},browser.loadavg=function(){return[]},browser.uptime=function(){return 0},browser.freemem=function(){return Number.MAX_VALUE},browser.totalmem=function(){return Number.MAX_VALUE},browser.cpus=function(){return[]},browser.type=function(){return"Browser"},browser.release=function(){return typeof navigator<"u"?navigator.appVersion:""},browser.networkInterfaces=browser.getNetworkInterfaces=function(){return{}},browser.arch=function(){return"javascript"},browser.platform=function(){return"browser"},browser.tmpdir=browser.tmpDir=function(){return"/tmp"},browser.EOL=`
24
+ `,browser.homedir=function(){return"/"}),browser}var utility,hasRequiredUtility;function requireUtility(){if(hasRequiredUtility)return utility;hasRequiredUtility=1;const d=requireEvents(),v=requireDetectLibc(),E=requireIs(),{runtimePlatformArch:m}=requireLibvips(),A=requireSharp(),a=m(),_=A.libvipsVersion(),g=A.format();g.heif.output.alias=["avif","heic"],g.jpeg.output.alias=["jpe","jpg"],g.tiff.output.alias=["tif"],g.jp2k.output.alias=["j2c","j2k","jp2","jpx"];const b={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"};let w={vips:_.semver};if(!_.isGlobal)if(_.isWasm)try{w=require("@img/sharp-wasm32/versions")}catch{}else try{w=commonjsRequire(`@img/sharp-${a}/versions`)}catch{try{w=commonjsRequire(`@img/sharp-libvips-${a}/versions`)}catch{}}w.sharp=require$$6.version,w.heif&&g.heif&&(g.heif.input.fileSuffix=[".avif"],g.heif.output.alias=["avif"]);function l(T){return E.bool(T)?T?A.cache(50,20,100):A.cache(0,0,0):E.object(T)?A.cache(T.memory,T.files,T.items):A.cache()}l(!0);function M(T){return A.concurrency(E.integer(T)?T:null)}v.familySync()===v.GLIBC&&!A._isUsingJemalloc()?A.concurrency(1):v.familySync()===v.MUSL&&A.concurrency()===1024&&A.concurrency(requireBrowser().availableParallelism());const y=new d.EventEmitter;function B(){return A.counters()}function R(T){return A.simd(E.bool(T)?T:null)}function S(T){if(E.object(T))if(Array.isArray(T.operation)&&T.operation.every(E.string))A.block(T.operation,!0);else throw E.invalidParameterError("operation","Array<string>",T.operation);else throw E.invalidParameterError("options","object",T)}function P(T){if(E.object(T))if(Array.isArray(T.operation)&&T.operation.every(E.string))A.block(T.operation,!1);else throw E.invalidParameterError("operation","Array<string>",T.operation);else throw E.invalidParameterError("options","object",T)}return utility=T=>{T.cache=l,T.concurrency=M,T.counters=B,T.simd=R,T.format=g,T.interpolators=b,T.versions=w,T.queue=y,T.block=S,T.unblock=P},utility}var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;const d=requireConstructor();return requireInput()(d),requireResize()(d),requireComposite()(d),requireOperation()(d),requireColour()(d),requireChannel()(d),requireOutput()(d),requireUtility()(d),lib=d,lib}var libExports=requireLib();const sharp=getDefaultExportFromCjs$1(libExports),config={region:"SG",baseHostName:"storage.bunnycdn.com",folderName:"",storageZone:"unset",password:"unset"},install=({storageZone:d,password:v,region:E,folderName:m})=>{config.region=E||config.region,config.folderName=m||config.folderName,config.storageZone=d||config.storageZone,config.password=v},upload=async({file:d,sharpConfig:v})=>new Promise(async(E,m)=>{try{d||m({res:!1,message:"No file uploaded"});const A=await sharp(d?.buffer).resize({width:v.width,height:v.height,withoutEnlargement:!0}).toFormat(v.format||"webp",{quality:v.quality||80}).toBuffer(),a=`${cryptoBrowserifyExports.randomUUID()}.${v.format||"webp"}`,_={method:"PUT",hostname:config.region?`${config.region}.${config.baseHostName}`:config.baseHostName,port:443,path:`/${config.storageZone}/${config.folderName}/${a}`,headers:{AccessKey:config.password,"Content-Type":"application/octet-stream","Content-Length":A.length}},g=https.request(_,b=>{if(b.statusCode===201){const w=`https://${config.storageZone}.b-cdn.net/${config.folderName}/${a}`;E({res:!0,message:"upload success",url:w})}else m({res:!1,message:"Upload failed"})});g.on("error",b=>{m({res:!1,message:"Upload failed",error:b})}),g.write(A),g.end()}catch{m({res:!1,message:"Server error"})}}),list=async()=>new Promise((d,v)=>{try{const E=config.region?`${config.region}.${config.baseHostName}`:config.baseHostName,m=config.folderName===""?"":`${config.folderName}/`,A=`https://${E}/${config.storageZone}/${m}`,a={AccessKey:config.password};https.get(A,{headers:a},_=>{let g="";_.on("data",b=>{g+=b}),_.on("end",()=>{try{const w=JSON.parse(g).map(l=>{const M=`https://${config.storageZone}.b-cdn.net/${config.folderName}/${l.ObjectName}`;return{...l,Url:M}});d({res:!0,message:"List retrieved successfully",files:w})}catch{v({res:!1,message:"Failed to parse response"})}})}).on("error",_=>{v({res:!1,message:"Network error",error:_})})}catch{v({res:!1,message:"Server error"})}}),deleteFile=({ObjectName:d,href:v})=>new Promise((E,m)=>{if(!d&&!v){m({res:!1,message:"No file specified for deletion"});return}try{const A=config.region?`${config.region}.${config.baseHostName}`:config.baseHostName,a=v?decodeURIComponent(v.split("/")[v.split("/").length-1]):d;https.request({method:"DELETE",hostname:A,path:`/${config.storageZone}/${config.folderName}/${a}`,headers:{AccessKey:config.password}},_=>{_.statusCode===200?E({res:!0,message:"File deleted successfully"}):E({res:!1,message:"Failed to delete file"})}).end()}catch{m({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;