(()=>{var Re="287e54be97747d4091077eb5ab1a14ca8af9a3788e97d4ab4368891347ee9a97",Lt=`.culqi_checkout[data-v-e7c57070]{overflow:hidden auto;margin:0;z-index:99999;visibility:visible;height:100%;width:100%;left:0;top:0;display:block}#culqi-js{width:100%;height:100%;z-index:999999999999;position:fixed;top:0;left:0;background-color:#0000009e;border:0px none transparent;margin:0}
`,ke="style_287e54be97747d4091077eb5ab1a14ca8af9a3788e97d4ab4368891347ee9a97";if(!document.getElementById(ke)){let ki=document.createElement("style");ki.id=ke,ki.textContent=".culqi_checkout[data-v-e7c57070]{overflow:hidden auto;margin:0;z-index:99999;visibility:visible;height:100%;width:100%;left:0;top:0;display:block}#culqi-js{width:100%;height:100%;z-index:999999999999;position:fixed;top:0;left:0;background-color:#0000009e;border:0px none transparent;margin:0}",document.head.appendChild(ki)}var Ut={culqiCheckout:"culqi_checkout",culqiJs:"culqi-js"}})();var Q_=Object.defineProperty,X_=(Re,Lt,ke)=>Lt in Re?Q_(Re,Lt,{enumerable:!0,configurable:!0,writable:!0,value:ke}):Re[Lt]=ke,G_=(Re,Lt)=>()=>(Lt||Re((Lt={exports:{}}).exports,Lt),Lt.exports),se=(Re,Lt,ke)=>(X_(Re,typeof Lt!="symbol"?Lt+"":Lt,ke),ke),P0=(Re,Lt,ke)=>{if(!Lt.has(Re))throw TypeError("Cannot "+ke)},Fi=(Re,Lt,ke)=>(P0(Re,Lt,"read from private field"),ke?ke.call(Re):Lt.get(Re)),yo=(Re,Lt,ke)=>{if(Lt.has(Re))throw TypeError("Cannot add the same private member more than once");Lt instanceof WeakSet?Lt.add(Re):Lt.set(Re,ke)},vo=(Re,Lt,ke,Ut)=>(P0(Re,Lt,"write to private field"),Ut?Ut.call(Re,ke):Lt.set(Re,ke),ke),Y_=(Re,Lt,ke)=>(P0(Re,Lt,"access private method"),ke),tS=G_(qi=>{(function(){let t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(let a of document.querySelectorAll('link[rel="modulepreload"]'))h(a);new MutationObserver(a=>{for(let d of a)if(d.type==="childList")for(let s of d.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&h(s)}).observe(document,{childList:!0,subtree:!0});function r(a){let d={};return a.integrity&&(d.integrity=a.integrity),a.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?d.credentials="include":a.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function h(a){if(a.ep)return;a.ep=!0;let d=r(a);fetch(a.href,d)}})();var Lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ut={},ki={};ki.byteLength=Og,ki.toByteArray=Cg,ki.fromByteArray=Lg;for(var zr=[],dr=[],Eg=typeof Uint8Array<"u"?Uint8Array:Array,mh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vn=0,Rg=mh.length;vn<Rg;++vn)zr[vn]=mh[vn],dr[mh.charCodeAt(vn)]=vn;dr["-".charCodeAt(0)]=62,dr["_".charCodeAt(0)]=63;function N0(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.indexOf("=");h===-1&&(h=r);var a=h===r?0:4-h%4;return[h,a]}function Og(t){var r=N0(t),h=r[0],a=r[1];return(h+a)*3/4-a}function jg(t,r,h){return(r+h)*3/4-h}function Cg(t){var r,h=N0(t),a=h[0],d=h[1],s=new Eg(jg(t,a,d)),m=0,p=d>0?a-4:a,w;for(w=0;w<p;w+=4)r=dr[t.charCodeAt(w)]<<18|dr[t.charCodeAt(w+1)]<<12|dr[t.charCodeAt(w+2)]<<6|dr[t.charCodeAt(w+3)],s[m++]=r>>16&255,s[m++]=r>>8&255,s[m++]=r&255;return d===2&&(r=dr[t.charCodeAt(w)]<<2|dr[t.charCodeAt(w+1)]>>4,s[m++]=r&255),d===1&&(r=dr[t.charCodeAt(w)]<<10|dr[t.charCodeAt(w+1)]<<4|dr[t.charCodeAt(w+2)]>>2,s[m++]=r>>8&255,s[m++]=r&255),s}function Ig(t){return zr[t>>18&63]+zr[t>>12&63]+zr[t>>6&63]+zr[t&63]}function Bg(t,r,h){for(var a,d=[],s=r;s<h;s+=3)a=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),d.push(Ig(a));return d.join("")}function Lg(t){for(var r,h=t.length,a=h%3,d=[],s=16383,m=0,p=h-a;m<p;m+=s)d.push(Bg(t,m,m+s>p?p:m+s));return a===1?(r=t[h-1],d.push(zr[r>>2]+zr[r<<4&63]+"==")):a===2&&(r=(t[h-2]<<8)+t[h-1],d.push(zr[r>>10]+zr[r>>4&63]+zr[r<<2&63]+"=")),d.join("")}var gh={};gh.read=function(t,r,h,a,d){var s,m,p=d*8-a-1,w=(1<<p)-1,S=w>>1,A=-7,v=h?d-1:0,_=h?-1:1,x=t[r+v];for(v+=_,s=x&(1<<-A)-1,x>>=-A,A+=p;A>0;s=s*256+t[r+v],v+=_,A-=8);for(m=s&(1<<-A)-1,s>>=-A,A+=a;A>0;m=m*256+t[r+v],v+=_,A-=8);if(s===0)s=1-S;else{if(s===w)return m?NaN:(x?-1:1)*(1/0);m=m+Math.pow(2,a),s=s-S}return(x?-1:1)*m*Math.pow(2,s-a)},gh.write=function(t,r,h,a,d,s){var m,p,w,S=s*8-d-1,A=(1<<S)-1,v=A>>1,_=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=a?0:s-1,b=a?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,m=A):(m=Math.floor(Math.log(r)/Math.LN2),r*(w=Math.pow(2,-m))<1&&(m--,w*=2),m+v>=1?r+=_/w:r+=_*Math.pow(2,1-v),r*w>=2&&(m++,w/=2),m+v>=A?(p=0,m=A):m+v>=1?(p=(r*w-1)*Math.pow(2,d),m=m+v):(p=r*Math.pow(2,v-1)*Math.pow(2,d),m=0));d>=8;t[h+x]=p&255,x+=b,p/=256,d-=8);for(m=m<<d|p,S+=d;S>0;t[h+x]=m&255,x+=b,m/=256,S-=8);t[h+x-b]|=M*128};(function(t){var r=ki,h=gh,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=p,t.SlowBuffer=R,t.INSPECT_MAX_BYTES=50;var d=2147483647;t.kMaxLength=d,p.TYPED_ARRAY_SUPPORT=s(),!p.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 s(){try{var C=new Uint8Array(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,Uint8Array.prototype),Object.setPrototypeOf(C,B),C.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function m(C){if(C>d)throw new RangeError('The value "'+C+'" is invalid for option "size"');var B=new Uint8Array(C);return Object.setPrototypeOf(B,p.prototype),B}function p(C,B,T){if(typeof C=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(C)}return w(C,B,T)}p.poolSize=8192;function w(C,B,T){if(typeof C=="string")return _(C,B);if(ArrayBuffer.isView(C))return b(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(G(C,ArrayBuffer)||C&&G(C.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(G(C,SharedArrayBuffer)||C&&G(C.buffer,SharedArrayBuffer)))return M(C,B,T);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var F=C.valueOf&&C.valueOf();if(F!=null&&F!==C)return p.from(F,B,T);var K=O(C);if(K)return K;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return p.from(C[Symbol.toPrimitive]("string"),B,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}p.from=function(C,B,T){return w(C,B,T)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function S(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function A(C,B,T){return S(C),C<=0?m(C):B!==void 0?typeof T=="string"?m(C).fill(B,T):m(C).fill(B):m(C)}p.alloc=function(C,B,T){return A(C,B,T)};function v(C){return S(C),m(C<0?0:k(C)|0)}p.allocUnsafe=function(C){return v(C)},p.allocUnsafeSlow=function(C){return v(C)};function _(C,B){if((typeof B!="string"||B==="")&&(B="utf8"),!p.isEncoding(B))throw new TypeError("Unknown encoding: "+B);var T=I(C,B)|0,F=m(T),K=F.write(C,B);return K!==T&&(F=F.slice(0,K)),F}function x(C){for(var B=C.length<0?0:k(C.length)|0,T=m(B),F=0;F<B;F+=1)T[F]=C[F]&255;return T}function b(C){if(G(C,Uint8Array)){var B=new Uint8Array(C);return M(B.buffer,B.byteOffset,B.byteLength)}return x(C)}function M(C,B,T){if(B<0||C.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(C.byteLength<B+(T||0))throw new RangeError('"length" is outside of buffer bounds');var F;return B===void 0&&T===void 0?F=new Uint8Array(C):T===void 0?F=new Uint8Array(C,B):F=new Uint8Array(C,B,T),Object.setPrototypeOf(F,p.prototype),F}function O(C){if(p.isBuffer(C)){var B=k(C.length)|0,T=m(B);return T.length===0||C.copy(T,0,0,B),T}if(C.length!==void 0)return typeof C.length!="number"||J(C.length)?m(0):x(C);if(C.type==="Buffer"&&Array.isArray(C.data))return x(C.data)}function k(C){if(C>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return C|0}function R(C){return+C!=C&&(C=0),p.alloc(+C)}p.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==p.prototype},p.compare=function(C,B){if(G(C,Uint8Array)&&(C=p.from(C,C.offset,C.byteLength)),G(B,Uint8Array)&&(B=p.from(B,B.offset,B.byteLength)),!p.isBuffer(C)||!p.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===B)return 0;for(var T=C.length,F=B.length,K=0,X=Math.min(T,F);K<X;++K)if(C[K]!==B[K]){T=C[K],F=B[K];break}return T<F?-1:F<T?1:0},p.isEncoding=function(C){switch(String(C).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(C,B){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return p.alloc(0);var T;if(B===void 0)for(B=0,T=0;T<C.length;++T)B+=C[T].length;var F=p.allocUnsafe(B),K=0;for(T=0;T<C.length;++T){var X=C[T];if(G(X,Uint8Array))K+X.length>F.length?p.from(X).copy(F,K):Uint8Array.prototype.set.call(F,X,K);else if(p.isBuffer(X))X.copy(F,K);else throw new TypeError('"list" argument must be an Array of Buffers');K+=X.length}return F};function I(C,B){if(p.isBuffer(C))return C.length;if(ArrayBuffer.isView(C)||G(C,ArrayBuffer))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);var T=C.length,F=arguments.length>2&&arguments[2]===!0;if(!F&&T===0)return 0;for(var K=!1;;)switch(B){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Y(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return z(C).length;default:if(K)return F?-1:Y(C).length;B=(""+B).toLowerCase(),K=!0}}p.byteLength=I;function L(C,B,T){var F=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,B>>>=0,T<=B))return"";for(C||(C="utf8");;)switch(C){case"hex":return i(this,B,T);case"utf8":case"utf-8":return u(this,B,T);case"ascii":return y(this,B,T);case"latin1":case"binary":return c(this,B,T);case"base64":return n(this,B,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,B,T);default:if(F)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),F=!0}}p.prototype._isBuffer=!0;function P(C,B,T){var F=C[B];C[B]=C[T],C[T]=F}p.prototype.swap16=function(){var C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var B=0;B<C;B+=2)P(this,B,B+1);return this},p.prototype.swap32=function(){var C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var B=0;B<C;B+=4)P(this,B,B+3),P(this,B+1,B+2);return this},p.prototype.swap64=function(){var C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var B=0;B<C;B+=8)P(this,B,B+7),P(this,B+1,B+6),P(this,B+2,B+5),P(this,B+3,B+4);return this},p.prototype.toString=function(){var C=this.length;return C===0?"":arguments.length===0?u(this,0,C):L.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(C){if(!p.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:p.compare(this,C)===0},p.prototype.inspect=function(){var C="",B=t.INSPECT_MAX_BYTES;return C=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(C+=" ... "),"<Buffer "+C+">"},a&&(p.prototype[a]=p.prototype.inspect),p.prototype.compare=function(C,B,T,F,K){if(G(C,Uint8Array)&&(C=p.from(C,C.offset,C.byteLength)),!p.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(B===void 0&&(B=0),T===void 0&&(T=C?C.length:0),F===void 0&&(F=0),K===void 0&&(K=this.length),B<0||T>C.length||F<0||K>this.length)throw new RangeError("out of range index");if(F>=K&&B>=T)return 0;if(F>=K)return-1;if(B>=T)return 1;if(B>>>=0,T>>>=0,F>>>=0,K>>>=0,this===C)return 0;for(var X=K-F,ut=T-B,it=Math.min(X,ut),ot=this.slice(F,K),Ct=C.slice(B,T),nt=0;nt<it;++nt)if(ot[nt]!==Ct[nt]){X=ot[nt],ut=Ct[nt];break}return X<ut?-1:ut<X?1:0};function H(C,B,T,F,K){if(C.length===0)return-1;if(typeof T=="string"?(F=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,J(T)&&(T=K?0:C.length-1),T<0&&(T=C.length+T),T>=C.length){if(K)return-1;T=C.length-1}else if(T<0)if(K)T=0;else return-1;if(typeof B=="string"&&(B=p.from(B,F)),p.isBuffer(B))return B.length===0?-1:W(C,B,T,F,K);if(typeof B=="number")return B=B&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(C,B,T):Uint8Array.prototype.lastIndexOf.call(C,B,T):W(C,[B],T,F,K);throw new TypeError("val must be string, number or Buffer")}function W(C,B,T,F,K){var X=1,ut=C.length,it=B.length;if(F!==void 0&&(F=String(F).toLowerCase(),F==="ucs2"||F==="ucs-2"||F==="utf16le"||F==="utf-16le")){if(C.length<2||B.length<2)return-1;X=2,ut/=2,it/=2,T/=2}function ot(at,bt){return X===1?at[bt]:at.readUInt16BE(bt*X)}var Ct;if(K){var nt=-1;for(Ct=T;Ct<ut;Ct++)if(ot(C,Ct)===ot(B,nt===-1?0:Ct-nt)){if(nt===-1&&(nt=Ct),Ct-nt+1===it)return nt*X}else nt!==-1&&(Ct-=Ct-nt),nt=-1}else for(T+it>ut&&(T=ut-it),Ct=T;Ct>=0;Ct--){for(var st=!0,Bt=0;Bt<it;Bt++)if(ot(C,Ct+Bt)!==ot(B,Bt)){st=!1;break}if(st)return Ct}return-1}p.prototype.includes=function(C,B,T){return this.indexOf(C,B,T)!==-1},p.prototype.indexOf=function(C,B,T){return H(this,C,B,T,!0)},p.prototype.lastIndexOf=function(C,B,T){return H(this,C,B,T,!1)};function q(C,B,T,F){T=Number(T)||0;var K=C.length-T;F?(F=Number(F),F>K&&(F=K)):F=K;var X=B.length;F>X/2&&(F=X/2);for(var ut=0;ut<F;++ut){var it=parseInt(B.substr(ut*2,2),16);if(J(it))return ut;C[T+ut]=it}return ut}function $(C,B,T,F){return U(Y(B,C.length-T),C,T,F)}function N(C,B,T,F){return U(rt(B),C,T,F)}function e(C,B,T,F){return U(z(B),C,T,F)}function o(C,B,T,F){return U(It(B,C.length-T),C,T,F)}p.prototype.write=function(C,B,T,F){if(B===void 0)F="utf8",T=this.length,B=0;else if(T===void 0&&typeof B=="string")F=B,T=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(T)?(T=T>>>0,F===void 0&&(F="utf8")):(F=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-B;if((T===void 0||T>K)&&(T=K),C.length>0&&(T<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");for(var X=!1;;)switch(F){case"hex":return q(this,C,B,T);case"utf8":case"utf-8":return $(this,C,B,T);case"ascii":case"latin1":case"binary":return N(this,C,B,T);case"base64":return e(this,C,B,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,C,B,T);default:if(X)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),X=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function n(C,B,T){return B===0&&T===C.length?r.fromByteArray(C):r.fromByteArray(C.slice(B,T))}function u(C,B,T){T=Math.min(C.length,T);for(var F=[],K=B;K<T;){var X=C[K],ut=null,it=X>239?4:X>223?3:X>191?2:1;if(K+it<=T){var ot,Ct,nt,st;switch(it){case 1:X<128&&(ut=X);break;case 2:ot=C[K+1],(ot&192)===128&&(st=(X&31)<<6|ot&63,st>127&&(ut=st));break;case 3:ot=C[K+1],Ct=C[K+2],(ot&192)===128&&(Ct&192)===128&&(st=(X&15)<<12|(ot&63)<<6|Ct&63,st>2047&&(st<55296||st>57343)&&(ut=st));break;case 4:ot=C[K+1],Ct=C[K+2],nt=C[K+3],(ot&192)===128&&(Ct&192)===128&&(nt&192)===128&&(st=(X&15)<<18|(ot&63)<<12|(Ct&63)<<6|nt&63,st>65535&&st<1114112&&(ut=st))}}ut===null?(ut=65533,it=1):ut>65535&&(ut-=65536,F.push(ut>>>10&1023|55296),ut=56320|ut&1023),F.push(ut),K+=it}return g(F)}var l=4096;function g(C){var B=C.length;if(B<=l)return String.fromCharCode.apply(String,C);for(var T="",F=0;F<B;)T+=String.fromCharCode.apply(String,C.slice(F,F+=l));return T}function y(C,B,T){var F="";T=Math.min(C.length,T);for(var K=B;K<T;++K)F+=String.fromCharCode(C[K]&127);return F}function c(C,B,T){var F="";T=Math.min(C.length,T);for(var K=B;K<T;++K)F+=String.fromCharCode(C[K]);return F}function i(C,B,T){var F=C.length;(!B||B<0)&&(B=0),(!T||T<0||T>F)&&(T=F);for(var K="",X=B;X<T;++X)K+=et[C[X]];return K}function f(C,B,T){for(var F=C.slice(B,T),K="",X=0;X<F.length-1;X+=2)K+=String.fromCharCode(F[X]+F[X+1]*256);return K}p.prototype.slice=function(C,B){var T=this.length;C=~~C,B=B===void 0?T:~~B,C<0?(C+=T,C<0&&(C=0)):C>T&&(C=T),B<0?(B+=T,B<0&&(B=0)):B>T&&(B=T),B<C&&(B=C);var F=this.subarray(C,B);return Object.setPrototypeOf(F,p.prototype),F};function E(C,B,T){if(C%1!==0||C<0)throw new RangeError("offset is not uint");if(C+B>T)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(C,B,T){C=C>>>0,B=B>>>0,T||E(C,B,this.length);for(var F=this[C],K=1,X=0;++X<B&&(K*=256);)F+=this[C+X]*K;return F},p.prototype.readUintBE=p.prototype.readUIntBE=function(C,B,T){C=C>>>0,B=B>>>0,T||E(C,B,this.length);for(var F=this[C+--B],K=1;B>0&&(K*=256);)F+=this[C+--B]*K;return F},p.prototype.readUint8=p.prototype.readUInt8=function(C,B){return C=C>>>0,B||E(C,1,this.length),this[C]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(C,B){return C=C>>>0,B||E(C,2,this.length),this[C]|this[C+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(C,B){return C=C>>>0,B||E(C,2,this.length),this[C]<<8|this[C+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(C,B){return C=C>>>0,B||E(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(C,B){return C=C>>>0,B||E(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},p.prototype.readIntLE=function(C,B,T){C=C>>>0,B=B>>>0,T||E(C,B,this.length);for(var F=this[C],K=1,X=0;++X<B&&(K*=256);)F+=this[C+X]*K;return K*=128,F>=K&&(F-=Math.pow(2,8*B)),F},p.prototype.readIntBE=function(C,B,T){C=C>>>0,B=B>>>0,T||E(C,B,this.length);for(var F=B,K=1,X=this[C+--F];F>0&&(K*=256);)X+=this[C+--F]*K;return K*=128,X>=K&&(X-=Math.pow(2,8*B)),X},p.prototype.readInt8=function(C,B){return C=C>>>0,B||E(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},p.prototype.readInt16LE=function(C,B){C=C>>>0,B||E(C,2,this.length);var T=this[C]|this[C+1]<<8;return T&32768?T|4294901760:T},p.prototype.readInt16BE=function(C,B){C=C>>>0,B||E(C,2,this.length);var T=this[C+1]|this[C]<<8;return T&32768?T|4294901760:T},p.prototype.readInt32LE=function(C,B){return C=C>>>0,B||E(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},p.prototype.readInt32BE=function(C,B){return C=C>>>0,B||E(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},p.prototype.readFloatLE=function(C,B){return C=C>>>0,B||E(C,4,this.length),h.read(this,C,!0,23,4)},p.prototype.readFloatBE=function(C,B){return C=C>>>0,B||E(C,4,this.length),h.read(this,C,!1,23,4)},p.prototype.readDoubleLE=function(C,B){return C=C>>>0,B||E(C,8,this.length),h.read(this,C,!0,52,8)},p.prototype.readDoubleBE=function(C,B){return C=C>>>0,B||E(C,8,this.length),h.read(this,C,!1,52,8)};function j(C,B,T,F,K,X){if(!p.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>K||B<X)throw new RangeError('"value" argument is out of bounds');if(T+F>C.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(C,B,T,F){if(C=+C,B=B>>>0,T=T>>>0,!F){var K=Math.pow(2,8*T)-1;j(this,C,B,T,K,0)}var X=1,ut=0;for(this[B]=C&255;++ut<T&&(X*=256);)this[B+ut]=C/X&255;return B+T},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(C,B,T,F){if(C=+C,B=B>>>0,T=T>>>0,!F){var K=Math.pow(2,8*T)-1;j(this,C,B,T,K,0)}var X=T-1,ut=1;for(this[B+X]=C&255;--X>=0&&(ut*=256);)this[B+X]=C/ut&255;return B+T},p.prototype.writeUint8=p.prototype.writeUInt8=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,1,255,0),this[B]=C&255,B+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,2,65535,0),this[B]=C&255,this[B+1]=C>>>8,B+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,2,65535,0),this[B]=C>>>8,this[B+1]=C&255,B+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,4,4294967295,0),this[B+3]=C>>>24,this[B+2]=C>>>16,this[B+1]=C>>>8,this[B]=C&255,B+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,4,4294967295,0),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4},p.prototype.writeIntLE=function(C,B,T,F){if(C=+C,B=B>>>0,!F){var K=Math.pow(2,8*T-1);j(this,C,B,T,K-1,-K)}var X=0,ut=1,it=0;for(this[B]=C&255;++X<T&&(ut*=256);)C<0&&it===0&&this[B+X-1]!==0&&(it=1),this[B+X]=(C/ut>>0)-it&255;return B+T},p.prototype.writeIntBE=function(C,B,T,F){if(C=+C,B=B>>>0,!F){var K=Math.pow(2,8*T-1);j(this,C,B,T,K-1,-K)}var X=T-1,ut=1,it=0;for(this[B+X]=C&255;--X>=0&&(ut*=256);)C<0&&it===0&&this[B+X+1]!==0&&(it=1),this[B+X]=(C/ut>>0)-it&255;return B+T},p.prototype.writeInt8=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,1,127,-128),C<0&&(C=255+C+1),this[B]=C&255,B+1},p.prototype.writeInt16LE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,2,32767,-32768),this[B]=C&255,this[B+1]=C>>>8,B+2},p.prototype.writeInt16BE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,2,32767,-32768),this[B]=C>>>8,this[B+1]=C&255,B+2},p.prototype.writeInt32LE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,4,2147483647,-2147483648),this[B]=C&255,this[B+1]=C>>>8,this[B+2]=C>>>16,this[B+3]=C>>>24,B+4},p.prototype.writeInt32BE=function(C,B,T){return C=+C,B=B>>>0,T||j(this,C,B,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4};function D(C,B,T,F,K,X){if(T+F>C.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function V(C,B,T,F,K){return B=+B,T=T>>>0,K||D(C,B,T,4),h.write(C,B,T,F,23,4),T+4}p.prototype.writeFloatLE=function(C,B,T){return V(this,C,B,!0,T)},p.prototype.writeFloatBE=function(C,B,T){return V(this,C,B,!1,T)};function Q(C,B,T,F,K){return B=+B,T=T>>>0,K||D(C,B,T,8),h.write(C,B,T,F,52,8),T+8}p.prototype.writeDoubleLE=function(C,B,T){return Q(this,C,B,!0,T)},p.prototype.writeDoubleBE=function(C,B,T){return Q(this,C,B,!1,T)},p.prototype.copy=function(C,B,T,F){if(!p.isBuffer(C))throw new TypeError("argument should be a Buffer");if(T||(T=0),!F&&F!==0&&(F=this.length),B>=C.length&&(B=C.length),B||(B=0),F>0&&F<T&&(F=T),F===T||C.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),C.length-B<F-T&&(F=C.length-B+T);var K=F-T;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,T,F):Uint8Array.prototype.set.call(C,this.subarray(T,F),B),K},p.prototype.fill=function(C,B,T,F){if(typeof C=="string"){if(typeof B=="string"?(F=B,B=0,T=this.length):typeof T=="string"&&(F=T,T=this.length),F!==void 0&&typeof F!="string")throw new TypeError("encoding must be a string");if(typeof F=="string"&&!p.isEncoding(F))throw new TypeError("Unknown encoding: "+F);if(C.length===1){var K=C.charCodeAt(0);(F==="utf8"&&K<128||F==="latin1")&&(C=K)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(B<0||this.length<B||this.length<T)throw new RangeError("Out of range index");if(T<=B)return this;B=B>>>0,T=T===void 0?this.length:T>>>0,C||(C=0);var X;if(typeof C=="number")for(X=B;X<T;++X)this[X]=C;else{var ut=p.isBuffer(C)?C:p.from(C,F),it=ut.length;if(it===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(X=0;X<T-B;++X)this[X+B]=ut[X%it]}return this};var Z=/[^+/0-9A-Za-z-_]/g;function tt(C){if(C=C.split("=")[0],C=C.trim().replace(Z,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function Y(C,B){B=B||1/0;for(var T,F=C.length,K=null,X=[],ut=0;ut<F;++ut){if(T=C.charCodeAt(ut),T>55295&&T<57344){if(!K){if(T>56319){(B-=3)>-1&&X.push(239,191,189);continue}else if(ut+1===F){(B-=3)>-1&&X.push(239,191,189);continue}K=T;continue}if(T<56320){(B-=3)>-1&&X.push(239,191,189),K=T;continue}T=(K-55296<<10|T-56320)+65536}else K&&(B-=3)>-1&&X.push(239,191,189);if(K=null,T<128){if((B-=1)<0)break;X.push(T)}else if(T<2048){if((B-=2)<0)break;X.push(T>>6|192,T&63|128)}else if(T<65536){if((B-=3)<0)break;X.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((B-=4)<0)break;X.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return X}function rt(C){for(var B=[],T=0;T<C.length;++T)B.push(C.charCodeAt(T)&255);return B}function It(C,B){for(var T,F,K,X=[],ut=0;ut<C.length&&!((B-=2)<0);++ut)T=C.charCodeAt(ut),F=T>>8,K=T%256,X.push(K),X.push(F);return X}function z(C){return r.toByteArray(tt(C))}function U(C,B,T,F){for(var K=0;K<F&&!(K+T>=B.length||K>=C.length);++K)B[K+T]=C[K];return K}function G(C,B){return C instanceof B||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===B.name}function J(C){return C!==C}var et=function(){for(var C="0123456789abcdef",B=new Array(256),T=0;T<16;++T)for(var F=T*16,K=0;K<16;++K)B[F+K]=C[T]+C[K];return B}()})(Ut);var z0={exports:{}},Be=z0.exports={},Fr,Vr;function yh(){throw new Error("setTimeout has not been defined")}function vh(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Fr=setTimeout:Fr=yh}catch{Fr=yh}try{typeof clearTimeout=="function"?Vr=clearTimeout:Vr=vh}catch{Vr=vh}})();function F0(t){if(Fr===setTimeout)return setTimeout(t,0);if((Fr===yh||!Fr)&&setTimeout)return Fr=setTimeout,setTimeout(t,0);try{return Fr(t,0)}catch{try{return Fr.call(null,t,0)}catch{return Fr.call(this,t,0)}}}function Ug(t){if(Vr===clearTimeout)return clearTimeout(t);if((Vr===vh||!Vr)&&clearTimeout)return Vr=clearTimeout,clearTimeout(t);try{return Vr(t)}catch{try{return Vr.call(null,t)}catch{return Vr.call(this,t)}}}var si=[],bn=!1,Vi,bs=-1;function qg(){!bn||!Vi||(bn=!1,Vi.length?si=Vi.concat(si):bs=-1,si.length&&V0())}function V0(){if(!bn){var t=F0(qg);bn=!0;for(var r=si.length;r;){for(Vi=si,si=[];++bs<r;)Vi&&Vi[bs].run();bs=-1,r=si.length}Vi=null,bn=!1,Ug(t)}}Be.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var h=1;h<arguments.length;h++)r[h-1]=arguments[h];si.push(new H0(t,r)),si.length===1&&!bn&&F0(V0)};function H0(t,r){this.fun=t,this.array=r}H0.prototype.run=function(){this.fun.apply(null,this.array)},Be.title="browser",Be.browser=!0,Be.env={},Be.argv=[],Be.version="",Be.versions={};function ai(){}Be.on=ai,Be.addListener=ai,Be.once=ai,Be.off=ai,Be.removeListener=ai,Be.removeAllListeners=ai,Be.emit=ai,Be.prependListener=ai,Be.prependOnceListener=ai,Be.listeners=function(t){return[]},Be.binding=function(t){throw new Error("process.binding is not supported")},Be.cwd=function(){return"/"},Be.chdir=function(t){throw new Error("process.chdir is not supported")},Be.umask=function(){return 0};var $g=z0.exports;let Dt=ke($g);var Tg=function(t){function r(){var a=this||self;return delete t.prototype.__magic__,a}if(typeof globalThis=="object")return globalThis;if(this)return r();t.defineProperty(t.prototype,"__magic__",{configurable:!0,get:r});var h=__magic__;return h}(Object),bh=Tg;function wh(t,r){let h=Object.create(null),a=t.split(",");for(let d=0;d<a.length;d++)h[a[d]]=!0;return r?d=>!!h[d.toLowerCase()]:d=>!!h[d]}let Oe={},wn=[],Rr=()=>{},Dg=()=>!1,Pg=/^on[^a-z]/,ws=t=>Pg.test(t),Mh=t=>t.startsWith("onUpdate:"),Fe=Object.assign,_h=(t,r)=>{let h=t.indexOf(r);h>-1&&t.splice(h,1)},Ng=Object.prototype.hasOwnProperty,ne=(t,r)=>Ng.call(t,r),Pt=Array.isArray,bo=t=>_s(t)==="[object Map]",zg=t=>_s(t)==="[object Set]",Wt=t=>typeof t=="function",Ve=t=>typeof t=="string",Ms=t=>typeof t=="symbol",Le=t=>t!==null&&typeof t=="object",W0=t=>(Le(t)||Wt(t))&&Wt(t.then)&&Wt(t.catch),Fg=Object.prototype.toString,_s=t=>Fg.call(t),Vg=t=>_s(t).slice(8,-1),Hg=t=>_s(t)==="[object Object]",Sh=t=>Ve(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ss=wh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),As=t=>{let r=Object.create(null);return h=>r[h]||(r[h]=t(h))},Wg=/-(\w)/g,Mn=As(t=>t.replace(Wg,(r,h)=>h?h.toUpperCase():"")),Zg=/\B([A-Z])/g,_n=As(t=>t.replace(Zg,"-$1").toLowerCase()),Z0=As(t=>t.charAt(0).toUpperCase()+t.slice(1)),Ah=As(t=>t?`on${Z0(t)}`:""),Hi=(t,r)=>!Object.is(t,r),xh=(t,r)=>{for(let h=0;h<t.length;h++)t[h](r)},xs=(t,r,h)=>{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:h})},Kg=t=>{let r=parseFloat(t);return isNaN(r)?t:r},K0,kh=()=>K0||(K0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof bh<"u"?bh:{});function Eh(t){if(Pt(t)){let r={};for(let h=0;h<t.length;h++){let a=t[h],d=Ve(a)?Gg(a):Eh(a);if(d)for(let s in d)r[s]=d[s]}return r}else if(Ve(t)||Le(t))return t}let Jg=/;(?![^(]*\))/g,Qg=/:([^]+)/,Xg=/\/\*[^]*?\*\//g;function Gg(t){let r={};return t.replace(Xg,"").split(Jg).forEach(h=>{if(h){let a=h.split(Qg);a.length>1&&(r[a[0].trim()]=a[1].trim())}}),r}function Rh(t){let r="";if(Ve(t))r=t;else if(Pt(t))for(let h=0;h<t.length;h++){let a=Rh(t[h]);a&&(r+=a+" ")}else if(Le(t))for(let h in t)t[h]&&(r+=h+" ");return r.trim()}let Yg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ty=wh(Yg);function J0(t){return!!t||t===""}let Or;class ey{constructor(r=!1){this.detached=r,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Or,!r&&Or&&(this.index=(Or.scopes||(Or.scopes=[])).push(this)-1)}get active(){return this._active}run(r){if(this._active){let h=Or;try{return Or=this,r()}finally{Or=h}}}on(){Or=this}off(){Or=this.parent}stop(r){if(this._active){let h,a;for(h=0,a=this.effects.length;h<a;h++)this.effects[h].stop();for(h=0,a=this.cleanups.length;h<a;h++)this.cleanups[h]();if(this.scopes)for(h=0,a=this.scopes.length;h<a;h++)this.scopes[h].stop(!0);if(!this.detached&&this.parent&&!r){let d=this.parent.scopes.pop();d&&d!==this&&(this.parent.scopes[this.index]=d,d.index=this.index)}this.parent=void 0,this._active=!1}}}function ry(t,r=Or){r&&r.active&&r.effects.push(t)}function iy(){return Or}let Oh=t=>{let r=new Set(t);return r.w=0,r.n=0,r},Q0=t=>(t.w&Ei)>0,X0=t=>(t.n&Ei)>0,ny=({deps:t})=>{if(t.length)for(let r=0;r<t.length;r++)t[r].w|=Ei},oy=t=>{let{deps:r}=t;if(r.length){let h=0;for(let a=0;a<r.length;a++){let d=r[a];Q0(d)&&!X0(d)?d.delete(t):r[h++]=d,d.w&=~Ei,d.n&=~Ei}r.length=h}},jh=new WeakMap,wo=0,Ei=1,Ch=30,jr,Wi=Symbol(""),Ih=Symbol("");class Bh{constructor(r,h=null,a){this.fn=r,this.scheduler=h,this.active=!0,this.deps=[],this.parent=void 0,ry(this,a)}run(){if(!this.active)return this.fn();let r=jr,h=Ri;for(;r;){if(r===this)return;r=r.parent}try{return this.parent=jr,jr=this,Ri=!0,Ei=1<<++wo,wo<=Ch?ny(this):G0(this),this.fn()}finally{wo<=Ch&&oy(this),Ei=1<<--wo,jr=this.parent,Ri=h,this.parent=void 0,this.deferStop&&this.stop()}}stop(){jr===this?this.deferStop=!0:this.active&&(G0(this),this.onStop&&this.onStop(),this.active=!1)}}function G0(t){let{deps:r}=t;if(r.length){for(let h=0;h<r.length;h++)r[h].delete(t);r.length=0}}let Ri=!0,Y0=[];function Sn(){Y0.push(Ri),Ri=!1}function An(){let t=Y0.pop();Ri=t===void 0?!0:t}function rr(t,r,h){if(Ri&&jr){let a=jh.get(t);a||jh.set(t,a=new Map);let d=a.get(h);d||a.set(h,d=Oh()),tf(d)}}function tf(t,r){let h=!1;wo<=Ch?X0(t)||(t.n|=Ei,h=!Q0(t)):h=!t.has(jr),h&&(t.add(jr),jr.deps.push(t))}function hi(t,r,h,a,d,s){let m=jh.get(t);if(!m)return;let p=[];if(r==="clear")p=[...m.values()];else if(h==="length"&&Pt(t)){let w=Number(a);m.forEach((S,A)=>{(A==="length"||!Ms(A)&&A>=w)&&p.push(S)})}else switch(h!==void 0&&p.push(m.get(h)),r){case"add":Pt(t)?Sh(h)&&p.push(m.get("length")):(p.push(m.get(Wi)),bo(t)&&p.push(m.get(Ih)));break;case"delete":Pt(t)||(p.push(m.get(Wi)),bo(t)&&p.push(m.get(Ih)));break;case"set":bo(t)&&p.push(m.get(Wi));break}if(p.length===1)p[0]&&Lh(p[0]);else{let w=[];for(let S of p)S&&w.push(...S);Lh(Oh(w))}}function Lh(t,r){let h=Pt(t)?t:[...t];for(let a of h)a.computed&&ef(a);for(let a of h)a.computed||ef(a)}function ef(t,r){(t!==jr||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}let sy=wh("__proto__,__v_isRef,__isVue"),rf=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Ms)),nf=ay();function ay(){let t={};return["includes","indexOf","lastIndexOf"].forEach(r=>{t[r]=function(...h){let a=oe(this);for(let s=0,m=this.length;s<m;s++)rr(a,"get",s+"");let d=a[r](...h);return d===-1||d===!1?a[r](...h.map(oe)):d}}),["push","pop","shift","unshift","splice"].forEach(r=>{t[r]=function(...h){Sn();let a=oe(this)[r].apply(this,h);return An(),a}}),t}function hy(t){let r=oe(this);return rr(r,"has",t),r.hasOwnProperty(t)}class of{constructor(r=!1,h=!1){this._isReadonly=r,this._shallow=h}get(r,h,a){let d=this._isReadonly,s=this._shallow;if(h==="__v_isReactive")return!d;if(h==="__v_isReadonly")return d;if(h==="__v_isShallow")return s;if(h==="__v_raw"&&a===(d?s?My:df:s?cf:ff).get(r))return r;let m=Pt(r);if(!d){if(m&&ne(nf,h))return Reflect.get(nf,h,a);if(h==="hasOwnProperty")return hy}let p=Reflect.get(r,h,a);return(Ms(h)?rf.has(h):sy(h))||(d||rr(r,"get",h),s)?p:We(p)?m&&Sh(h)?p:p.value:Le(p)?d?pf(p):xn(p):p}}class sf extends of{constructor(r=!1){super(!1,r)}set(r,h,a,d){let s=r[h];if(En(s)&&We(s)&&!We(a))return!1;if(!this._shallow&&(!Is(a)&&!En(a)&&(s=oe(s),a=oe(a)),!Pt(r)&&We(s)&&!We(a)))return s.value=a,!0;let m=Pt(r)&&Sh(h)?Number(h)<r.length:ne(r,h),p=Reflect.set(r,h,a,d);return r===oe(d)&&(m?Hi(a,s)&&hi(r,"set",h,a):hi(r,"add",h,a)),p}deleteProperty(r,h){let a=ne(r,h);r[h];let d=Reflect.deleteProperty(r,h);return d&&a&&hi(r,"delete",h,void 0),d}has(r,h){let a=Reflect.has(r,h);return(!Ms(h)||!rf.has(h))&&rr(r,"has",h),a}ownKeys(r){return rr(r,"iterate",Pt(r)?"length":Wi),Reflect.ownKeys(r)}}class uy extends of{constructor(r=!1){super(!0,r)}set(r,h){return!0}deleteProperty(r,h){return!0}}let ly=new sf,fy=new uy,cy=new sf(!0),Uh=t=>t,ks=t=>Reflect.getPrototypeOf(t);function Es(t,r,h=!1,a=!1){t=t.__v_raw;let d=oe(t),s=oe(r);h||(Hi(r,s)&&rr(d,"get",r),rr(d,"get",s));let{has:m}=ks(d),p=a?Uh:h?Th:Mo;if(m.call(d,r))return p(t.get(r));if(m.call(d,s))return p(t.get(s));t!==d&&t.get(r)}function Rs(t,r=!1){let h=this.__v_raw,a=oe(h),d=oe(t);return r||(Hi(t,d)&&rr(a,"has",t),rr(a,"has",d)),t===d?h.has(t):h.has(t)||h.has(d)}function Os(t,r=!1){return t=t.__v_raw,!r&&rr(oe(t),"iterate",Wi),Reflect.get(t,"size",t)}function af(t){t=oe(t);let r=oe(this);return ks(r).has.call(r,t)||(r.add(t),hi(r,"add",t,t)),this}function hf(t,r){r=oe(r);let h=oe(this),{has:a,get:d}=ks(h),s=a.call(h,t);s||(t=oe(t),s=a.call(h,t));let m=d.call(h,t);return h.set(t,r),s?Hi(r,m)&&hi(h,"set",t,r):hi(h,"add",t,r),this}function uf(t){let r=oe(this),{has:h,get:a}=ks(r),d=h.call(r,t);d||(t=oe(t),d=h.call(r,t)),a&&a.call(r,t);let s=r.delete(t);return d&&hi(r,"delete",t,void 0),s}function lf(){let t=oe(this),r=t.size!==0,h=t.clear();return r&&hi(t,"clear",void 0,void 0),h}function js(t,r){return function(h,a){let d=this,s=d.__v_raw,m=oe(s),p=r?Uh:t?Th:Mo;return!t&&rr(m,"iterate",Wi),s.forEach((w,S)=>h.call(a,p(w),p(S),d))}}function Cs(t,r,h){return function(...a){let d=this.__v_raw,s=oe(d),m=bo(s),p=t==="entries"||t===Symbol.iterator&&m,w=t==="keys"&&m,S=d[t](...a),A=h?Uh:r?Th:Mo;return!r&&rr(s,"iterate",w?Ih:Wi),{next(){let{value:v,done:_}=S.next();return _?{value:v,done:_}:{value:p?[A(v[0]),A(v[1])]:A(v),done:_}},[Symbol.iterator](){return this}}}}function Oi(t){return function(...r){return t==="delete"?!1:this}}function dy(){let t={get(d){return Es(this,d)},get size(){return Os(this)},has:Rs,add:af,set:hf,delete:uf,clear:lf,forEach:js(!1,!1)},r={get(d){return Es(this,d,!1,!0)},get size(){return Os(this)},has:Rs,add:af,set:hf,delete:uf,clear:lf,forEach:js(!1,!0)},h={get(d){return Es(this,d,!0)},get size(){return Os(this,!0)},has(d){return Rs.call(this,d,!0)},add:Oi("add"),set:Oi("set"),delete:Oi("delete"),clear:Oi("clear"),forEach:js(!0,!1)},a={get(d){return Es(this,d,!0,!0)},get size(){return Os(this,!0)},has(d){return Rs.call(this,d,!0)},add:Oi("add"),set:Oi("set"),delete:Oi("delete"),clear:Oi("clear"),forEach:js(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{t[d]=Cs(d,!1,!1),h[d]=Cs(d,!0,!1),r[d]=Cs(d,!1,!0),a[d]=Cs(d,!0,!0)}),[t,h,r,a]}let[py,my,gy,yy]=dy();function qh(t,r){let h=r?t?yy:gy:t?my:py;return(a,d,s)=>d==="__v_isReactive"?!t:d==="__v_isReadonly"?t:d==="__v_raw"?a:Reflect.get(ne(h,d)&&d in a?h:a,d,s)}let vy={get:qh(!1,!1)},by={get:qh(!1,!0)},wy={get:qh(!0,!1)},ff=new WeakMap,cf=new WeakMap,df=new WeakMap,My=new WeakMap;function _y(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Sy(t){return t.__v_skip||!Object.isExtensible(t)?0:_y(Vg(t))}function xn(t){return En(t)?t:$h(t,!1,ly,vy,ff)}function Ay(t){return $h(t,!1,cy,by,cf)}function pf(t){return $h(t,!0,fy,wy,df)}function $h(t,r,h,a,d){if(!Le(t)||t.__v_raw&&!(r&&t.__v_isReactive))return t;let s=d.get(t);if(s)return s;let m=Sy(t);if(m===0)return t;let p=new Proxy(t,m===2?a:h);return d.set(t,p),p}function kn(t){return En(t)?kn(t.__v_raw):!!(t&&t.__v_isReactive)}function En(t){return!!(t&&t.__v_isReadonly)}function Is(t){return!!(t&&t.__v_isShallow)}function mf(t){return kn(t)||En(t)}function oe(t){let r=t&&t.__v_raw;return r?oe(r):t}function gf(t){return xs(t,"__v_skip",!0),t}let Mo=t=>Le(t)?xn(t):t,Th=t=>Le(t)?pf(t):t;function yf(t){Ri&&jr&&(t=oe(t),tf(t.dep||(t.dep=Oh())))}function vf(t,r){t=oe(t);let h=t.dep;h&&Lh(h)}function We(t){return!!(t&&t.__v_isRef===!0)}function Rn(t){return xy(t,!1)}function xy(t,r){return We(t)?t:new ky(t,r)}class ky{constructor(r,h){this.__v_isShallow=h,this.dep=void 0,this.__v_isRef=!0,this._rawValue=h?r:oe(r),this._value=h?r:Mo(r)}get value(){return yf(this),this._value}set value(r){let h=this.__v_isShallow||Is(r)||En(r);r=h?r:oe(r),Hi(r,this._rawValue)&&(this._rawValue=r,this._value=h?r:Mo(r),vf(this))}}function bf(t){return We(t)?t.value:t}let Ey={get:(t,r,h)=>bf(Reflect.get(t,r,h)),set:(t,r,h,a)=>{let d=t[r];return We(d)&&!We(h)?(d.value=h,!0):Reflect.set(t,r,h,a)}};function wf(t){return kn(t)?t:new Proxy(t,Ey)}class Ry{constructor(r,h,a,d){this._setter=h,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new Bh(r,()=>{this._dirty||(this._dirty=!0,vf(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!d,this.__v_isReadonly=a}get value(){let r=oe(this);return yf(r),(r._dirty||!r._cacheable)&&(r._dirty=!1,r._value=r.effect.run()),r._value}set value(r){this._setter(r)}}function Oy(t,r,h=!1){let a,d,s=Wt(t);return s?(a=t,d=Rr):(a=t.get,d=t.set),new Ry(a,d,s||!d,h)}function ji(t,r,h,a){let d;try{d=a?t(...a):t()}catch(s){Bs(s,r,h)}return d}function Cr(t,r,h,a){if(Wt(t)){let s=ji(t,r,h,a);return s&&W0(s)&&s.catch(m=>{Bs(m,r,h)}),s}let d=[];for(let s=0;s<t.length;s++)d.push(Cr(t[s],r,h,a));return d}function Bs(t,r,h,a=!0){let d=r?r.vnode:null;if(r){let s=r.parent,m=r.proxy,p=h;for(;s;){let S=s.ec;if(S){for(let A=0;A<S.length;A++)if(S[A](t,m,p)===!1)return}s=s.parent}let w=r.appContext.config.errorHandler;if(w){ji(w,null,10,[t,m,p]);return}}jy(t,h,d,a)}function jy(t,r,h,a=!0){console.error(t)}let _o=!1,Dh=!1,Ze=[],Hr=0,On=[],ui=null,Zi=0,Mf=Promise.resolve(),Ph=null;function Cy(t){let r=Ph||Mf;return t?r.then(this?t.bind(this):t):r}function Iy(t){let r=Hr+1,h=Ze.length;for(;r<h;){let a=r+h>>>1,d=Ze[a],s=So(d);s<t||s===t&&d.pre?r=a+1:h=a}return r}function Nh(t){(!Ze.length||!Ze.includes(t,_o&&t.allowRecurse?Hr+1:Hr))&&(t.id==null?Ze.push(t):Ze.splice(Iy(t.id),0,t),_f())}function _f(){!_o&&!Dh&&(Dh=!0,Ph=Mf.then(xf))}function By(t){let r=Ze.indexOf(t);r>Hr&&Ze.splice(r,1)}function Ly(t){Pt(t)?On.push(...t):(!ui||!ui.includes(t,t.allowRecurse?Zi+1:Zi))&&On.push(t),_f()}function Sf(t,r=_o?Hr+1:0){for(;r<Ze.length;r++){let h=Ze[r];h&&h.pre&&(Ze.splice(r,1),r--,h())}}function Af(t){if(On.length){let r=[...new Set(On)];if(On.length=0,ui){ui.push(...r);return}for(ui=r,ui.sort((h,a)=>So(h)-So(a)),Zi=0;Zi<ui.length;Zi++)ui[Zi]();ui=null,Zi=0}}let So=t=>t.id==null?1/0:t.id,Uy=(t,r)=>{let h=So(t)-So(r);if(h===0){if(t.pre&&!r.pre)return-1;if(r.pre&&!t.pre)return 1}return h};function xf(t){Dh=!1,_o=!0,Ze.sort(Uy);let r=Rr;try{for(Hr=0;Hr<Ze.length;Hr++){let h=Ze[Hr];h&&h.active!==!1&&ji(h,null,14)}}finally{Hr=0,Ze.length=0,Af(),_o=!1,Ph=null,(Ze.length||On.length)&&xf()}}function qy(t,r,...h){if(t.isUnmounted)return;let a=t.vnode.props||Oe,d=h,s=r.startsWith("update:"),m=s&&r.slice(7);if(m&&m in a){let A=`${m==="modelValue"?"model":m}Modifiers`,{number:v,trim:_}=a[A]||Oe;_&&(d=h.map(x=>Ve(x)?x.trim():x)),v&&(d=h.map(Kg))}let p,w=a[p=Ah(r)]||a[p=Ah(Mn(r))];!w&&s&&(w=a[p=Ah(_n(r))]),w&&Cr(w,t,6,d);let S=a[p+"Once"];if(S){if(!t.emitted)t.emitted={};else if(t.emitted[p])return;t.emitted[p]=!0,Cr(S,t,6,d)}}function kf(t,r,h=!1){let a=r.emitsCache,d=a.get(t);if(d!==void 0)return d;let s=t.emits,m={},p=!1;if(!Wt(t)){let w=S=>{let A=kf(S,r,!0);A&&(p=!0,Fe(m,A))};!h&&r.mixins.length&&r.mixins.forEach(w),t.extends&&w(t.extends),t.mixins&&t.mixins.forEach(w)}return!s&&!p?(Le(t)&&a.set(t,null),null):(Pt(s)?s.forEach(w=>m[w]=null):Fe(m,s),Le(t)&&a.set(t,m),m)}function Ls(t,r){return!t||!ws(r)?!1:(r=r.slice(2).replace(/Once$/,""),ne(t,r[0].toLowerCase()+r.slice(1))||ne(t,_n(r))||ne(t,r))}let Wr=null,Ef=null;function Us(t){let r=Wr;return Wr=t,Ef=t&&t.type.__scopeId||null,r}function $y(t,r=Wr,h){if(!r||t._n)return t;let a=(...d)=>{a._d&&Qf(-1);let s=Us(r),m;try{m=t(...d)}finally{Us(s),a._d&&Qf(1)}return m};return a._n=!0,a._c=!0,a._d=!0,a}function zh(t){let{type:r,vnode:h,proxy:a,withProxy:d,props:s,propsOptions:[m],slots:p,attrs:w,emit:S,render:A,renderCache:v,data:_,setupState:x,ctx:b,inheritAttrs:M}=t,O,k,R=Us(t);try{if(h.shapeFlag&4){let L=d||a;O=Zr(A.call(L,L,v,s,x,_,b)),k=w}else{let L=r;O=Zr(L.length>1?L(s,{attrs:w,slots:p,emit:S}):L(s,null)),k=r.props?w:Ty(w)}}catch(L){ko.length=0,Bs(L,t,1),O=ci(Qi)}let I=O;if(k&&M!==!1){let L=Object.keys(k),{shapeFlag:P}=I;L.length&&P&7&&(m&&L.some(Mh)&&(k=Dy(k,m)),I=Cn(I,k))}return h.dirs&&(I=Cn(I),I.dirs=I.dirs?I.dirs.concat(h.dirs):h.dirs),h.transition&&(I.transition=h.transition),O=I,Us(R),O}let Ty=t=>{let r;for(let h in t)(h==="class"||h==="style"||ws(h))&&((r||(r={}))[h]=t[h]);return r},Dy=(t,r)=>{let h={};for(let a in t)(!Mh(a)||!(a.slice(9)in r))&&(h[a]=t[a]);return h};function Py(t,r,h){let{props:a,children:d,component:s}=t,{props:m,children:p,patchFlag:w}=r,S=s.emitsOptions;if(r.dirs||r.transition)return!0;if(h&&w>=0){if(w&1024)return!0;if(w&16)return a?Rf(a,m,S):!!m;if(w&8){let A=r.dynamicProps;for(let v=0;v<A.length;v++){let _=A[v];if(m[_]!==a[_]&&!Ls(S,_))return!0}}}else return(d||p)&&(!p||!p.$stable)?!0:a===m?!1:a?m?Rf(a,m,S):!0:!!m;return!1}function Rf(t,r,h){let a=Object.keys(r);if(a.length!==Object.keys(t).length)return!0;for(let d=0;d<a.length;d++){let s=a[d];if(r[s]!==t[s]&&!Ls(h,s))return!0}return!1}function Ny({vnode:t,parent:r},h){for(;r&&r.subTree===t;)(t=r.vnode).el=h,r=r.parent}let zy=Symbol.for("v-ndc"),Fy=t=>t.__isSuspense;function Vy(t,r){r&&r.pendingBranch?Pt(t)?r.effects.push(...t):r.effects.push(t):Ly(t)}function Hy(t,r){return Fh(t,null,r)}let qs={};function $s(t,r,h){return Fh(t,r,h)}function Fh(t,r,{immediate:h,deep:a,flush:d,onTrack:s,onTrigger:m}=Oe){var p;let w=iy()===((p=Ke)==null?void 0:p.scope)?Ke:null,S,A=!1,v=!1;if(We(t)?(S=()=>t.value,A=Is(t)):kn(t)?(S=()=>t,a=!0):Pt(t)?(v=!0,A=t.some(L=>kn(L)||Is(L)),S=()=>t.map(L=>{if(We(L))return L.value;if(kn(L))return jn(L);if(Wt(L))return ji(L,w,2)})):Wt(t)?r?S=()=>ji(t,w,2):S=()=>{if(!(w&&w.isUnmounted))return _&&_(),Cr(t,w,3,[x])}:S=Rr,r&&a){let L=S;S=()=>jn(L())}let _,x=L=>{_=R.onStop=()=>{ji(L,w,4)}},b;if(Oo)if(x=Rr,r?h&&Cr(r,w,3,[S(),v?[]:void 0,x]):S(),d==="sync"){let L=Vv();b=L.__watcherHandles||(L.__watcherHandles=[])}else return Rr;let M=v?new Array(t.length).fill(qs):qs,O=()=>{if(R.active)if(r){let L=R.run();(a||A||(v?L.some((P,H)=>Hi(P,M[H])):Hi(L,M)))&&(_&&_(),Cr(r,w,3,[L,M===qs?void 0:v&&M[0]===qs?[]:M,x]),M=L)}else R.run()};O.allowRecurse=!!r;let k;d==="sync"?k=O:d==="post"?k=()=>ir(O,w&&w.suspense):(O.pre=!0,w&&(O.id=w.uid),k=()=>Nh(O));let R=new Bh(S,k);r?h?O():M=R.run():d==="post"?ir(R.run.bind(R),w&&w.suspense):R.run();let I=()=>{R.stop(),w&&w.scope&&_h(w.scope.effects,R)};return b&&b.push(I),I}function Wy(t,r,h){let a=this.proxy,d=Ve(t)?t.includes(".")?Of(a,t):()=>a[t]:t.bind(a,a),s;Wt(r)?s=r:(s=r.handler,h=r);let m=Ke;Bn(this);let p=Fh(d,s.bind(a),h);return m?Bn(m):Xi(),p}function Of(t,r){let h=r.split(".");return()=>{let a=t;for(let d=0;d<h.length&&a;d++)a=a[h[d]];return a}}function jn(t,r){if(!Le(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),We(t))jn(t.value,r);else if(Pt(t))for(let h=0;h<t.length;h++)jn(t[h],r);else if(zg(t)||bo(t))t.forEach(h=>{jn(h,r)});else if(Hg(t))for(let h in t)jn(t[h],r);return t}function Ki(t,r,h,a){let d=t.dirs,s=r&&r.dirs;for(let m=0;m<d.length;m++){let p=d[m];s&&(p.oldValue=s[m].value);let w=p.dir[a];w&&(Sn(),Cr(w,h,8,[t.el,p,t,r]),An())}}function Zy(t,r){return Wt(t)?(()=>Fe({name:t.name},r,{setup:t}))():t}let Ts=t=>!!t.type.__asyncLoader,jf=t=>t.type.__isKeepAlive;function Ky(t,r){Cf(t,"a",r)}function Jy(t,r){Cf(t,"da",r)}function Cf(t,r,h=Ke){let a=t.__wdc||(t.__wdc=()=>{let d=h;for(;d;){if(d.isDeactivated)return;d=d.parent}return t()});if(Ds(r,a,h),h){let d=h.parent;for(;d&&d.parent;)jf(d.parent.vnode)&&Qy(a,r,h,d),d=d.parent}}function Qy(t,r,h,a){let d=Ds(r,t,a,!0);If(()=>{_h(a[r],d)},h)}function Ds(t,r,h=Ke,a=!1){if(h){let d=h[t]||(h[t]=[]),s=r.__weh||(r.__weh=(...m)=>{if(h.isUnmounted)return;Sn(),Bn(h);let p=Cr(r,h,t,m);return Xi(),An(),p});return a?d.unshift(s):d.push(s),s}}let li=t=>(r,h=Ke)=>(!Oo||t==="sp")&&Ds(t,(...a)=>r(...a),h),Xy=li("bm"),Gy=li("m"),Yy=li("bu"),tv=li("u"),ev=li("bum"),If=li("um"),rv=li("sp"),iv=li("rtg"),nv=li("rtc");function ov(t,r=Ke){Ds("ec",t,r)}let Vh=t=>t?ec(t)?eu(t)||t.proxy:Vh(t.parent):null,Ao=Fe(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Vh(t.parent),$root:t=>Vh(t.root),$emit:t=>t.emit,$options:t=>Zh(t),$forceUpdate:t=>t.f||(t.f=()=>Nh(t.update)),$nextTick:t=>t.n||(t.n=Cy.bind(t.proxy)),$watch:t=>Wy.bind(t)}),Hh=(t,r)=>t!==Oe&&!t.__isScriptSetup&&ne(t,r),sv={get({_:t},r){let{ctx:h,setupState:a,data:d,props:s,accessCache:m,type:p,appContext:w}=t,S;if(r[0]!=="$"){let x=m[r];if(x!==void 0)switch(x){case 1:return a[r];case 2:return d[r];case 4:return h[r];case 3:return s[r]}else{if(Hh(a,r))return m[r]=1,a[r];if(d!==Oe&&ne(d,r))return m[r]=2,d[r];if((S=t.propsOptions[0])&&ne(S,r))return m[r]=3,s[r];if(h!==Oe&&ne(h,r))return m[r]=4,h[r];Wh&&(m[r]=0)}}let A=Ao[r],v,_;if(A)return r==="$attrs"&&rr(t,"get",r),A(t);if((v=p.__cssModules)&&(v=v[r]))return v;if(h!==Oe&&ne(h,r))return m[r]=4,h[r];if(_=w.config.globalProperties,ne(_,r))return _[r]},set({_:t},r,h){let{data:a,setupState:d,ctx:s}=t;return Hh(d,r)?(d[r]=h,!0):a!==Oe&&ne(a,r)?(a[r]=h,!0):ne(t.props,r)||r[0]==="$"&&r.slice(1)in t?!1:(s[r]=h,!0)},has({_:{data:t,setupState:r,accessCache:h,ctx:a,appContext:d,propsOptions:s}},m){let p;return!!h[m]||t!==Oe&&ne(t,m)||Hh(r,m)||(p=s[0])&&ne(p,m)||ne(a,m)||ne(Ao,m)||ne(d.config.globalProperties,m)},defineProperty(t,r,h){return h.get!=null?t._.accessCache[r]=0:ne(h,"value")&&this.set(t,r,h.value,null),Reflect.defineProperty(t,r,h)}};function Bf(t){return Pt(t)?t.reduce((r,h)=>(r[h]=null,r),{}):t}let Wh=!0;function av(t){let r=Zh(t),h=t.proxy,a=t.ctx;Wh=!1,r.beforeCreate&&Lf(r.beforeCreate,t,"bc");let{data:d,computed:s,methods:m,watch:p,provide:w,inject:S,created:A,beforeMount:v,mounted:_,beforeUpdate:x,updated:b,activated:M,deactivated:O,beforeDestroy:k,beforeUnmount:R,destroyed:I,unmounted:L,render:P,renderTracked:H,renderTriggered:W,errorCaptured:q,serverPrefetch:$,expose:N,inheritAttrs:e,components:o,directives:n,filters:u}=r;if(S&&hv(S,a,null),m)for(let g in m){let y=m[g];Wt(y)&&(a[g]=y.bind(h))}if(d){let g=d.call(h,h);Le(g)&&(t.data=xn(g))}if(Wh=!0,s)for(let g in s){let y=s[g],c=Wt(y)?y.bind(h,h):Wt(y.get)?y.get.bind(h,h):Rr,i=!Wt(y)&&Wt(y.set)?y.set.bind(h):Rr,f=zv({get:c,set:i});Object.defineProperty(a,g,{enumerable:!0,configurable:!0,get:()=>f.value,set:E=>f.value=E})}if(p)for(let g in p)Uf(p[g],a,h,g);if(w){let g=Wt(w)?w.call(h):w;Reflect.ownKeys(g).forEach(y=>{pv(y,g[y])})}A&&Lf(A,t,"c");function l(g,y){Pt(y)?y.forEach(c=>g(c.bind(h))):y&&g(y.bind(h))}if(l(Xy,v),l(Gy,_),l(Yy,x),l(tv,b),l(Ky,M),l(Jy,O),l(ov,q),l(nv,H),l(iv,W),l(ev,R),l(If,L),l(rv,$),Pt(N))if(N.length){let g=t.exposed||(t.exposed={});N.forEach(y=>{Object.defineProperty(g,y,{get:()=>h[y],set:c=>h[y]=c})})}else t.exposed||(t.exposed={});P&&t.render===Rr&&(t.render=P),e!=null&&(t.inheritAttrs=e),o&&(t.components=o),n&&(t.directives=n)}function hv(t,r,h=Rr){Pt(t)&&(t=Kh(t));for(let a in t){let d=t[a],s;Le(d)?"default"in d?s=zs(d.from||a,d.default,!0):s=zs(d.from||a):s=zs(d),We(s)?Object.defineProperty(r,a,{enumerable:!0,configurable:!0,get:()=>s.value,set:m=>s.value=m}):r[a]=s}}function Lf(t,r,h){Cr(Pt(t)?t.map(a=>a.bind(r.proxy)):t.bind(r.proxy),r,h)}function Uf(t,r,h,a){let d=a.includes(".")?Of(h,a):()=>h[a];if(Ve(t)){let s=r[t];Wt(s)&&$s(d,s)}else if(Wt(t))$s(d,t.bind(h));else if(Le(t))if(Pt(t))t.forEach(s=>Uf(s,r,h,a));else{let s=Wt(t.handler)?t.handler.bind(h):r[t.handler];Wt(s)&&$s(d,s,t)}}function Zh(t){let r=t.type,{mixins:h,extends:a}=r,{mixins:d,optionsCache:s,config:{optionMergeStrategies:m}}=t.appContext,p=s.get(r),w;return p?w=p:!d.length&&!h&&!a?w=r:(w={},d.length&&d.forEach(S=>Ps(w,S,m,!0)),Ps(w,r,m)),Le(r)&&s.set(r,w),w}function Ps(t,r,h,a=!1){let{mixins:d,extends:s}=r;s&&Ps(t,s,h,!0),d&&d.forEach(m=>Ps(t,m,h,!0));for(let m in r)if(!(a&&m==="expose")){let p=uv[m]||h&&h[m];t[m]=p?p(t[m],r[m]):r[m]}return t}let uv={data:qf,props:$f,emits:$f,methods:xo,computed:xo,beforeCreate:tr,created:tr,beforeMount:tr,mounted:tr,beforeUpdate:tr,updated:tr,beforeDestroy:tr,beforeUnmount:tr,destroyed:tr,unmounted:tr,activated:tr,deactivated:tr,errorCaptured:tr,serverPrefetch:tr,components:xo,directives:xo,watch:fv,provide:qf,inject:lv};function qf(t,r){return r?t?function(){return Fe(Wt(t)?t.call(this,this):t,Wt(r)?r.call(this,this):r)}:r:t}function lv(t,r){return xo(Kh(t),Kh(r))}function Kh(t){if(Pt(t)){let r={};for(let h=0;h<t.length;h++)r[t[h]]=t[h];return r}return t}function tr(t,r){return t?[...new Set([].concat(t,r))]:r}function xo(t,r){return t?Fe(Object.create(null),t,r):r}function $f(t,r){return t?Pt(t)&&Pt(r)?[...new Set([...t,...r])]:Fe(Object.create(null),Bf(t),Bf(r??{})):r}function fv(t,r){if(!t)return r;if(!r)return t;let h=Fe(Object.create(null),t);for(let a in r)h[a]=tr(t[a],r[a]);return h}function Tf(){return{app:null,config:{isNativeTag:Dg,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cv=0;function dv(t,r){return function(h,a=null){Wt(h)||(h=Fe({},h)),a!=null&&!Le(a)&&(a=null);let d=Tf(),s=new WeakSet,m=!1,p=d.app={_uid:cv++,_component:h,_props:a,_container:null,_context:d,_instance:null,version:Hv,get config(){return d.config},set config(w){},use(w,...S){return s.has(w)||(w&&Wt(w.install)?(s.add(w),w.install(p,...S)):Wt(w)&&(s.add(w),w(p,...S))),p},mixin(w){return d.mixins.includes(w)||d.mixins.push(w),p},component(w,S){return S?(d.components[w]=S,p):d.components[w]},directive(w,S){return S?(d.directives[w]=S,p):d.directives[w]},mount(w,S,A){if(!m){let v=ci(h,a);return v.appContext=d,S&&r?r(v,w):t(v,w,A),m=!0,p._container=w,w.__vue_app__=p,eu(v.component)||v.component.proxy}},unmount(){m&&(t(null,p._container),delete p._container.__vue_app__)},provide(w,S){return d.provides[w]=S,p},runWithContext(w){Ns=p;try{return w()}finally{Ns=null}}};return p}}let Ns=null;function pv(t,r){if(Ke){let h=Ke.provides,a=Ke.parent&&Ke.parent.provides;a===h&&(h=Ke.provides=Object.create(a)),h[t]=r}}function zs(t,r,h=!1){let a=Ke||Wr;if(a||Ns){let d=a?a.parent==null?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides:Ns._context.provides;if(d&&t in d)return d[t];if(arguments.length>1)return h&&Wt(r)?r.call(a&&a.proxy):r}}function mv(t,r,h,a=!1){let d={},s={};xs(s,Vs,1),t.propsDefaults=Object.create(null),Df(t,r,d,s);for(let m in t.propsOptions[0])m in d||(d[m]=void 0);h?t.props=a?d:Ay(d):t.type.props?t.props=d:t.props=s,t.attrs=s}function gv(t,r,h,a){let{props:d,attrs:s,vnode:{patchFlag:m}}=t,p=oe(d),[w]=t.propsOptions,S=!1;if((a||m>0)&&!(m&16)){if(m&8){let A=t.vnode.dynamicProps;for(let v=0;v<A.length;v++){let _=A[v];if(Ls(t.emitsOptions,_))continue;let x=r[_];if(w)if(ne(s,_))x!==s[_]&&(s[_]=x,S=!0);else{let b=Mn(_);d[b]=Jh(w,p,b,x,t,!1)}else x!==s[_]&&(s[_]=x,S=!0)}}}else{Df(t,r,d,s)&&(S=!0);let A;for(let v in p)(!r||!ne(r,v)&&((A=_n(v))===v||!ne(r,A)))&&(w?h&&(h[v]!==void 0||h[A]!==void 0)&&(d[v]=Jh(w,p,v,void 0,t,!0)):delete d[v]);if(s!==p)for(let v in s)(!r||!ne(r,v))&&(delete s[v],S=!0)}S&&hi(t,"set","$attrs")}function Df(t,r,h,a){let[d,s]=t.propsOptions,m=!1,p;if(r)for(let w in r){if(Ss(w))continue;let S=r[w],A;d&&ne(d,A=Mn(w))?!s||!s.includes(A)?h[A]=S:(p||(p={}))[A]=S:Ls(t.emitsOptions,w)||(!(w in a)||S!==a[w])&&(a[w]=S,m=!0)}if(s){let w=oe(h),S=p||Oe;for(let A=0;A<s.length;A++){let v=s[A];h[v]=Jh(d,w,v,S[v],t,!ne(S,v))}}return m}function Jh(t,r,h,a,d,s){let m=t[h];if(m!=null){let p=ne(m,"default");if(p&&a===void 0){let w=m.default;if(m.type!==Function&&!m.skipFactory&&Wt(w)){let{propsDefaults:S}=d;h in S?a=S[h]:(Bn(d),a=S[h]=w.call(null,r),Xi())}else a=w}m[0]&&(s&&!p?a=!1:m[1]&&(a===""||a===_n(h))&&(a=!0))}return a}function Pf(t,r,h=!1){let a=r.propsCache,d=a.get(t);if(d)return d;let s=t.props,m={},p=[],w=!1;if(!Wt(t)){let A=v=>{w=!0;let[_,x]=Pf(v,r,!0);Fe(m,_),x&&p.push(...x)};!h&&r.mixins.length&&r.mixins.forEach(A),t.extends&&A(t.extends),t.mixins&&t.mixins.forEach(A)}if(!s&&!w)return Le(t)&&a.set(t,wn),wn;if(Pt(s))for(let A=0;A<s.length;A++){let v=Mn(s[A]);Nf(v)&&(m[v]=Oe)}else if(s)for(let A in s){let v=Mn(A);if(Nf(v)){let _=s[A],x=m[v]=Pt(_)||Wt(_)?{type:_}:Fe({},_);if(x){let b=Vf(Boolean,x.type),M=Vf(String,x.type);x[0]=b>-1,x[1]=M<0||b<M,(b>-1||ne(x,"default"))&&p.push(v)}}}let S=[m,p];return Le(t)&&a.set(t,S),S}function Nf(t){return t[0]!=="$"}function zf(t){let r=t&&t.toString().match(/^\s*(function|class) (\w+)/);return r?r[2]:t===null?"null":""}function Ff(t,r){return zf(t)===zf(r)}function Vf(t,r){return Pt(r)?r.findIndex(h=>Ff(h,t)):Wt(r)&&Ff(r,t)?0:-1}let Hf=t=>t[0]==="_"||t==="$stable",Qh=t=>Pt(t)?t.map(Zr):[Zr(t)],yv=(t,r,h)=>{if(r._n)return r;let a=$y((...d)=>Qh(r(...d)),h);return a._c=!1,a},Wf=(t,r,h)=>{let a=t._ctx;for(let d in t){if(Hf(d))continue;let s=t[d];if(Wt(s))r[d]=yv(d,s,a);else if(s!=null){let m=Qh(s);r[d]=()=>m}}},Zf=(t,r)=>{let h=Qh(r);t.slots.default=()=>h},vv=(t,r)=>{if(t.vnode.shapeFlag&32){let h=r._;h?(t.slots=oe(r),xs(r,"_",h)):Wf(r,t.slots={})}else t.slots={},r&&Zf(t,r);xs(t.slots,Vs,1)},bv=(t,r,h)=>{let{vnode:a,slots:d}=t,s=!0,m=Oe;if(a.shapeFlag&32){let p=r._;p?h&&p===1?s=!1:(Fe(d,r),!h&&p===1&&delete d._):(s=!r.$stable,Wf(r,d)),m=r}else r&&(Zf(t,r),m={default:1});if(s)for(let p in d)!Hf(p)&&m[p]==null&&delete d[p]};function Xh(t,r,h,a,d=!1){if(Pt(t)){t.forEach((_,x)=>Xh(_,r&&(Pt(r)?r[x]:r),h,a,d));return}if(Ts(a)&&!d)return;let s=a.shapeFlag&4?eu(a.component)||a.component.proxy:a.el,m=d?null:s,{i:p,r:w}=t,S=r&&r.r,A=p.refs===Oe?p.refs={}:p.refs,v=p.setupState;if(S!=null&&S!==w&&(Ve(S)?(A[S]=null,ne(v,S)&&(v[S]=null)):We(S)&&(S.value=null)),Wt(w))ji(w,p,12,[m,A]);else{let _=Ve(w),x=We(w);if(_||x){let b=()=>{if(t.f){let M=_?ne(v,w)?v[w]:A[w]:w.value;d?Pt(M)&&_h(M,s):Pt(M)?M.includes(s)||M.push(s):_?(A[w]=[s],ne(v,w)&&(v[w]=A[w])):(w.value=[s],t.k&&(A[t.k]=w.value))}else _?(A[w]=m,ne(v,w)&&(v[w]=m)):x&&(w.value=m,t.k&&(A[t.k]=m))};m?(b.id=-1,ir(b,h)):b()}}}let ir=Vy;function wv(t){return Mv(t)}function Mv(t,r){let h=kh();h.__VUE__=!0;let{insert:a,remove:d,patchProp:s,createElement:m,createText:p,createComment:w,setText:S,setElementText:A,parentNode:v,nextSibling:_,setScopeId:x=Rr,insertStaticContent:b}=t,M=(U,G,J,et=null,C=null,B=null,T=!1,F=null,K=!!G.dynamicChildren)=>{if(U===G)return;U&&!Ro(U,G)&&(et=tt(U),j(U,C,B,!0),U=null),G.patchFlag===-2&&(K=!1,G.dynamicChildren=null);let{type:X,ref:ut,shapeFlag:it}=G;switch(X){case Fs:O(U,G,J,et);break;case Qi:k(U,G,J,et);break;case Gh:U==null&&R(G,J,et,T);break;case fi:o(U,G,J,et,C,B,T,F,K);break;default:it&1?P(U,G,J,et,C,B,T,F,K):it&6?n(U,G,J,et,C,B,T,F,K):(it&64||it&128)&&X.process(U,G,J,et,C,B,T,F,K,rt)}ut!=null&&C&&Xh(ut,U&&U.ref,B,G||U,!G)},O=(U,G,J,et)=>{if(U==null)a(G.el=p(G.children),J,et);else{let C=G.el=U.el;G.children!==U.children&&S(C,G.children)}},k=(U,G,J,et)=>{U==null?a(G.el=w(G.children||""),J,et):G.el=U.el},R=(U,G,J,et)=>{[U.el,U.anchor]=b(U.children,G,J,et,U.el,U.anchor)},I=({el:U,anchor:G},J,et)=>{let C;for(;U&&U!==G;)C=_(U),a(U,J,et),U=C;a(G,J,et)},L=({el:U,anchor:G})=>{let J;for(;U&&U!==G;)J=_(U),d(U),U=J;d(G)},P=(U,G,J,et,C,B,T,F,K)=>{T=T||G.type==="svg",U==null?H(G,J,et,C,B,T,F,K):$(U,G,C,B,T,F,K)},H=(U,G,J,et,C,B,T,F)=>{let K,X,{type:ut,props:it,shapeFlag:ot,transition:Ct,dirs:nt}=U;if(K=U.el=m(U.type,B,it&&it.is,it),ot&8?A(K,U.children):ot&16&&q(U.children,K,null,et,C,B&&ut!=="foreignObject",T,F),nt&&Ki(U,null,et,"created"),W(K,U,U.scopeId,T,et),it){for(let Bt in it)Bt!=="value"&&!Ss(Bt)&&s(K,Bt,null,it[Bt],B,U.children,et,C,Z);"value"in it&&s(K,"value",null,it.value),(X=it.onVnodeBeforeMount)&&Kr(X,et,U)}nt&&Ki(U,null,et,"beforeMount");let st=_v(C,Ct);st&&Ct.beforeEnter(K),a(K,G,J),((X=it&&it.onVnodeMounted)||st||nt)&&ir(()=>{X&&Kr(X,et,U),st&&Ct.enter(K),nt&&Ki(U,null,et,"mounted")},C)},W=(U,G,J,et,C)=>{if(J&&x(U,J),et)for(let B=0;B<et.length;B++)x(U,et[B]);if(C){let B=C.subTree;if(G===B){let T=C.vnode;W(U,T,T.scopeId,T.slotScopeIds,C.parent)}}},q=(U,G,J,et,C,B,T,F,K=0)=>{for(let X=K;X<U.length;X++){let ut=U[X]=F?Ci(U[X]):Zr(U[X]);M(null,ut,G,J,et,C,B,T,F)}},$=(U,G,J,et,C,B,T)=>{let F=G.el=U.el,{patchFlag:K,dynamicChildren:X,dirs:ut}=G;K|=U.patchFlag&16;let it=U.props||Oe,ot=G.props||Oe,Ct;J&&Ji(J,!1),(Ct=ot.onVnodeBeforeUpdate)&&Kr(Ct,J,G,U),ut&&Ki(G,U,J,"beforeUpdate"),J&&Ji(J,!0);let nt=C&&G.type!=="foreignObject";if(X?N(U.dynamicChildren,X,F,J,et,nt,B):T||c(U,G,F,null,J,et,nt,B,!1),K>0){if(K&16)e(F,G,it,ot,J,et,C);else if(K&2&&it.class!==ot.class&&s(F,"class",null,ot.class,C),K&4&&s(F,"style",it.style,ot.style,C),K&8){let st=G.dynamicProps;for(let Bt=0;Bt<st.length;Bt++){let at=st[Bt],bt=it[at],qt=ot[at];(qt!==bt||at==="value")&&s(F,at,bt,qt,C,U.children,J,et,Z)}}K&1&&U.children!==G.children&&A(F,G.children)}else!T&&X==null&&e(F,G,it,ot,J,et,C);((Ct=ot.onVnodeUpdated)||ut)&&ir(()=>{Ct&&Kr(Ct,J,G,U),ut&&Ki(G,U,J,"updated")},et)},N=(U,G,J,et,C,B,T)=>{for(let F=0;F<G.length;F++){let K=U[F],X=G[F],ut=K.el&&(K.type===fi||!Ro(K,X)||K.shapeFlag&70)?v(K.el):J;M(K,X,ut,null,et,C,B,T,!0)}},e=(U,G,J,et,C,B,T)=>{if(J!==et){if(J!==Oe)for(let F in J)!Ss(F)&&!(F in et)&&s(U,F,J[F],null,T,G.children,C,B,Z);for(let F in et){if(Ss(F))continue;let K=et[F],X=J[F];K!==X&&F!=="value"&&s(U,F,X,K,T,G.children,C,B,Z)}"value"in et&&s(U,"value",J.value,et.value)}},o=(U,G,J,et,C,B,T,F,K)=>{let X=G.el=U?U.el:p(""),ut=G.anchor=U?U.anchor:p(""),{patchFlag:it,dynamicChildren:ot,slotScopeIds:Ct}=G;Ct&&(F=F?F.concat(Ct):Ct),U==null?(a(X,J,et),a(ut,J,et),q(G.children,J,ut,C,B,T,F,K)):it>0&&it&64&&ot&&U.dynamicChildren?(N(U.dynamicChildren,ot,J,C,B,T,F),(G.key!=null||C&&G===C.subTree)&&Kf(U,G,!0)):c(U,G,J,ut,C,B,T,F,K)},n=(U,G,J,et,C,B,T,F,K)=>{G.slotScopeIds=F,U==null?G.shapeFlag&512?C.ctx.activate(G,J,et,T,K):u(G,J,et,C,B,T,K):l(U,G,K)},u=(U,G,J,et,C,B,T)=>{let F=U.component=qv(U,et,C);if(jf(U)&&(F.ctx.renderer=rt),$v(F),F.asyncDep){if(C&&C.registerDep(F,g),!U.el){let K=F.subTree=ci(Qi);k(null,K,G,J)}return}g(F,U,G,J,C,B,T)},l=(U,G,J)=>{let et=G.component=U.component;if(Py(U,G,J))if(et.asyncDep&&!et.asyncResolved){y(et,G,J);return}else et.next=G,By(et.update),et.update();else G.el=U.el,et.vnode=G},g=(U,G,J,et,C,B,T)=>{let F=()=>{if(U.isMounted){let{next:ut,bu:it,u:ot,parent:Ct,vnode:nt}=U,st=ut,Bt;Ji(U,!1),ut?(ut.el=nt.el,y(U,ut,T)):ut=nt,it&&xh(it),(Bt=ut.props&&ut.props.onVnodeBeforeUpdate)&&Kr(Bt,Ct,ut,nt),Ji(U,!0);let at=zh(U),bt=U.subTree;U.subTree=at,M(bt,at,v(bt.el),tt(bt),U,C,B),ut.el=at.el,st===null&&Ny(U,at.el),ot&&ir(ot,C),(Bt=ut.props&&ut.props.onVnodeUpdated)&&ir(()=>Kr(Bt,Ct,ut,nt),C)}else{let ut,{el:it,props:ot}=G,{bm:Ct,m:nt,parent:st}=U,Bt=Ts(G);if(Ji(U,!1),Ct&&xh(Ct),!Bt&&(ut=ot&&ot.onVnodeBeforeMount)&&Kr(ut,st,G),Ji(U,!0),it&&z){let at=()=>{U.subTree=zh(U),z(it,U.subTree,U,C,null)};Bt?G.type.__asyncLoader().then(()=>!U.isUnmounted&&at()):at()}else{let at=U.subTree=zh(U);M(null,at,J,et,U,C,B),G.el=at.el}if(nt&&ir(nt,C),!Bt&&(ut=ot&&ot.onVnodeMounted)){let at=G;ir(()=>Kr(ut,st,at),C)}(G.shapeFlag&256||st&&Ts(st.vnode)&&st.vnode.shapeFlag&256)&&U.a&&ir(U.a,C),U.isMounted=!0,G=J=et=null}},K=U.effect=new Bh(F,()=>Nh(X),U.scope),X=U.update=()=>K.run();X.id=U.uid,Ji(U,!0),X()},y=(U,G,J)=>{G.component=U;let et=U.vnode.props;U.vnode=G,U.next=null,gv(U,G.props,et,J),bv(U,G.children,J),Sn(),Sf(),An()},c=(U,G,J,et,C,B,T,F,K=!1)=>{let X=U&&U.children,ut=U?U.shapeFlag:0,it=G.children,{patchFlag:ot,shapeFlag:Ct}=G;if(ot>0){if(ot&128){f(X,it,J,et,C,B,T,F,K);return}else if(ot&256){i(X,it,J,et,C,B,T,F,K);return}}Ct&8?(ut&16&&Z(X,C,B),it!==X&&A(J,it)):ut&16?Ct&16?f(X,it,J,et,C,B,T,F,K):Z(X,C,B,!0):(ut&8&&A(J,""),Ct&16&&q(it,J,et,C,B,T,F,K))},i=(U,G,J,et,C,B,T,F,K)=>{U=U||wn,G=G||wn;let X=U.length,ut=G.length,it=Math.min(X,ut),ot;for(ot=0;ot<it;ot++){let Ct=G[ot]=K?Ci(G[ot]):Zr(G[ot]);M(U[ot],Ct,J,null,C,B,T,F,K)}X>ut?Z(U,C,B,!0,!1,it):q(G,J,et,C,B,T,F,K,it)},f=(U,G,J,et,C,B,T,F,K)=>{let X=0,ut=G.length,it=U.length-1,ot=ut-1;for(;X<=it&&X<=ot;){let Ct=U[X],nt=G[X]=K?Ci(G[X]):Zr(G[X]);if(Ro(Ct,nt))M(Ct,nt,J,null,C,B,T,F,K);else break;X++}for(;X<=it&&X<=ot;){let Ct=U[it],nt=G[ot]=K?Ci(G[ot]):Zr(G[ot]);if(Ro(Ct,nt))M(Ct,nt,J,null,C,B,T,F,K);else break;it--,ot--}if(X>it){if(X<=ot){let Ct=ot+1,nt=Ct<ut?G[Ct].el:et;for(;X<=ot;)M(null,G[X]=K?Ci(G[X]):Zr(G[X]),J,nt,C,B,T,F,K),X++}}else if(X>ot)for(;X<=it;)j(U[X],C,B,!0),X++;else{let Ct=X,nt=X,st=new Map;for(X=nt;X<=ot;X++){let ht=G[X]=K?Ci(G[X]):Zr(G[X]);ht.key!=null&&st.set(ht.key,X)}let Bt,at=0,bt=ot-nt+1,qt=!1,lt=0,Mt=new Array(bt);for(X=0;X<bt;X++)Mt[X]=0;for(X=Ct;X<=it;X++){let ht=U[X];if(at>=bt){j(ht,C,B,!0);continue}let wt;if(ht.key!=null)wt=st.get(ht.key);else for(Bt=nt;Bt<=ot;Bt++)if(Mt[Bt-nt]===0&&Ro(ht,G[Bt])){wt=Bt;break}wt===void 0?j(ht,C,B,!0):(Mt[wt-nt]=X+1,wt>=lt?lt=wt:qt=!0,M(ht,G[wt],J,null,C,B,T,F,K),at++)}let Ft=qt?Sv(Mt):wn;for(Bt=Ft.length-1,X=bt-1;X>=0;X--){let ht=nt+X,wt=G[ht],Vt=ht+1<ut?G[ht+1].el:et;Mt[X]===0?M(null,wt,J,Vt,C,B,T,F,K):qt&&(Bt<0||X!==Ft[Bt]?E(wt,J,Vt,2):Bt--)}}},E=(U,G,J,et,C=null)=>{let{el:B,type:T,transition:F,children:K,shapeFlag:X}=U;if(X&6){E(U.component.subTree,G,J,et);return}if(X&128){U.suspense.move(G,J,et);return}if(X&64){T.move(U,G,J,rt);return}if(T===fi){a(B,G,J);for(let ut=0;ut<K.length;ut++)E(K[ut],G,J,et);a(U.anchor,G,J);return}if(T===Gh){I(U,G,J);return}if(et!==2&&X&1&&F)if(et===0)F.beforeEnter(B),a(B,G,J),ir(()=>F.enter(B),C);else{let{leave:ut,delayLeave:it,afterLeave:ot}=F,Ct=()=>a(B,G,J),nt=()=>{ut(B,()=>{Ct(),ot&&ot()})};it?it(B,Ct,nt):nt()}else a(B,G,J)},j=(U,G,J,et=!1,C=!1)=>{let{type:B,props:T,ref:F,children:K,dynamicChildren:X,shapeFlag:ut,patchFlag:it,dirs:ot}=U;if(F!=null&&Xh(F,null,J,U,!0),ut&256){G.ctx.deactivate(U);return}let Ct=ut&1&&ot,nt=!Ts(U),st;if(nt&&(st=T&&T.onVnodeBeforeUnmount)&&Kr(st,G,U),ut&6)Q(U.component,J,et);else{if(ut&128){U.suspense.unmount(J,et);return}Ct&&Ki(U,null,G,"beforeUnmount"),ut&64?U.type.remove(U,G,J,C,rt,et):X&&(B!==fi||it>0&&it&64)?Z(X,G,J,!1,!0):(B===fi&&it&384||!C&&ut&16)&&Z(K,G,J),et&&D(U)}(nt&&(st=T&&T.onVnodeUnmounted)||Ct)&&ir(()=>{st&&Kr(st,G,U),Ct&&Ki(U,null,G,"unmounted")},J)},D=U=>{let{type:G,el:J,anchor:et,transition:C}=U;if(G===fi){V(J,et);return}if(G===Gh){L(U);return}let B=()=>{d(J),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(U.shapeFlag&1&&C&&!C.persisted){let{leave:T,delayLeave:F}=C,K=()=>T(J,B);F?F(U.el,B,K):K()}else B()},V=(U,G)=>{let J;for(;U!==G;)J=_(U),d(U),U=J;d(G)},Q=(U,G,J)=>{let{bum:et,scope:C,update:B,subTree:T,um:F}=U;et&&xh(et),C.stop(),B&&(B.active=!1,j(T,U,G,J)),F&&ir(F,G),ir(()=>{U.isUnmounted=!0},G),G&&G.pendingBranch&&!G.isUnmounted&&U.asyncDep&&!U.asyncResolved&&U.suspenseId===G.pendingId&&(G.deps--,G.deps===0&&G.resolve())},Z=(U,G,J,et=!1,C=!1,B=0)=>{for(let T=B;T<U.length;T++)j(U[T],G,J,et,C)},tt=U=>U.shapeFlag&6?tt(U.component.subTree):U.shapeFlag&128?U.suspense.next():_(U.anchor||U.el),Y=(U,G,J)=>{U==null?G._vnode&&j(G._vnode,null,null,!0):M(G._vnode||null,U,G,null,null,null,J),Sf(),Af(),G._vnode=U},rt={p:M,um:j,m:E,r:D,mt:u,mc:q,pc:c,pbc:N,n:tt,o:t},It,z;return r&&([It,z]=r(rt)),{render:Y,hydrate:It,createApp:dv(Y,It)}}function Ji({effect:t,update:r},h){t.allowRecurse=r.allowRecurse=h}function _v(t,r){return(!t||t&&!t.pendingBranch)&&r&&!r.persisted}function Kf(t,r,h=!1){let a=t.children,d=r.children;if(Pt(a)&&Pt(d))for(let s=0;s<a.length;s++){let m=a[s],p=d[s];p.shapeFlag&1&&!p.dynamicChildren&&((p.patchFlag<=0||p.patchFlag===32)&&(p=d[s]=Ci(d[s]),p.el=m.el),h||Kf(m,p)),p.type===Fs&&(p.el=m.el)}}function Sv(t){let r=t.slice(),h=[0],a,d,s,m,p,w=t.length;for(a=0;a<w;a++){let S=t[a];if(S!==0){if(d=h[h.length-1],t[d]<S){r[a]=d,h.push(a);continue}for(s=0,m=h.length-1;s<m;)p=s+m>>1,t[h[p]]<S?s=p+1:m=p;S<t[h[s]]&&(s>0&&(r[a]=h[s-1]),h[s]=a)}}for(s=h.length,m=h[s-1];s-- >0;)h[s]=m,m=r[m];return h}let Av=t=>t.__isTeleport,fi=Symbol.for("v-fgt"),Fs=Symbol.for("v-txt"),Qi=Symbol.for("v-cmt"),Gh=Symbol.for("v-stc"),ko=[],Ir=null;function Jf(t=!1){ko.push(Ir=t?null:[])}function xv(){ko.pop(),Ir=ko[ko.length-1]||null}let Eo=1;function Qf(t){Eo+=t}function Xf(t){return t.dynamicChildren=Eo>0?Ir||wn:null,xv(),Eo>0&&Ir&&Ir.push(t),t}function kv(t,r,h,a,d,s){return Xf(Yf(t,r,h,a,d,s,!0))}function Ev(t,r,h,a,d){return Xf(ci(t,r,h,a,d,!0))}function Rv(t){return t?t.__v_isVNode===!0:!1}function Ro(t,r){return t.type===r.type&&t.key===r.key}let Vs="__vInternal",Gf=({key:t})=>t??null,Hs=({ref:t,ref_key:r,ref_for:h})=>(typeof t=="number"&&(t=""+t),t!=null?Ve(t)||We(t)||Wt(t)?{i:Wr,r:t,k:r,f:!!h}:t:null);function Yf(t,r=null,h=null,a=0,d=null,s=t===fi?0:1,m=!1,p=!1){let w={__v_isVNode:!0,__v_skip:!0,type:t,props:r,key:r&&Gf(r),ref:r&&Hs(r),scopeId:Ef,slotScopeIds:null,children:h,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:a,dynamicProps:d,dynamicChildren:null,appContext:null,ctx:Wr};return p?(Yh(w,h),s&128&&t.normalize(w)):h&&(w.shapeFlag|=Ve(h)?8:16),Eo>0&&!m&&Ir&&(w.patchFlag>0||s&6)&&w.patchFlag!==32&&Ir.push(w),w}let ci=Ov;function Ov(t,r=null,h=null,a=0,d=null,s=!1){if((!t||t===zy)&&(t=Qi),Rv(t)){let p=Cn(t,r,!0);return h&&Yh(p,h),Eo>0&&!s&&Ir&&(p.shapeFlag&6?Ir[Ir.indexOf(t)]=p:Ir.push(p)),p.patchFlag|=-2,p}if(Nv(t)&&(t=t.__vccOpts),r){r=jv(r);let{class:p,style:w}=r;p&&!Ve(p)&&(r.class=Rh(p)),Le(w)&&(mf(w)&&!Pt(w)&&(w=Fe({},w)),r.style=Eh(w))}let m=Ve(t)?1:Fy(t)?128:Av(t)?64:Le(t)?4:Wt(t)?2:0;return Yf(t,r,h,a,d,m,s,!0)}function jv(t){return t?mf(t)||Vs in t?Fe({},t):t:null}function Cn(t,r,h=!1){let{props:a,ref:d,patchFlag:s,children:m}=t,p=r?Bv(a||{},r):a;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:p,key:p&&Gf(p),ref:r&&r.ref?h&&d?Pt(d)?d.concat(Hs(r)):[d,Hs(r)]:Hs(r):d,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:m,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:r&&t.type!==fi?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Cn(t.ssContent),ssFallback:t.ssFallback&&Cn(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function Cv(t=" ",r=0){return ci(Fs,null,t,r)}function Iv(t="",r=!1){return r?(Jf(),Ev(Qi,null,t)):ci(Qi,null,t)}function Zr(t){return t==null||typeof t=="boolean"?ci(Qi):Pt(t)?ci(fi,null,t.slice()):typeof t=="object"?Ci(t):ci(Fs,null,String(t))}function Ci(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Cn(t)}function Yh(t,r){let h=0,{shapeFlag:a}=t;if(r==null)r=null;else if(Pt(r))h=16;else if(typeof r=="object")if(a&65){let d=r.default;d&&(d._c&&(d._d=!1),Yh(t,d()),d._c&&(d._d=!0));return}else{h=32;let d=r._;!d&&!(Vs in r)?r._ctx=Wr:d===3&&Wr&&(Wr.slots._===1?r._=1:(r._=2,t.patchFlag|=1024))}else Wt(r)?(r={default:r,_ctx:Wr},h=32):(r=String(r),a&64?(h=16,r=[Cv(r)]):h=8);t.children=r,t.shapeFlag|=h}function Bv(...t){let r={};for(let h=0;h<t.length;h++){let a=t[h];for(let d in a)if(d==="class")r.class!==a.class&&(r.class=Rh([r.class,a.class]));else if(d==="style")r.style=Eh([r.style,a.style]);else if(ws(d)){let s=r[d],m=a[d];m&&s!==m&&!(Pt(s)&&s.includes(m))&&(r[d]=s?[].concat(s,m):m)}else d!==""&&(r[d]=a[d])}return r}function Kr(t,r,h,a=null){Cr(t,r,7,[h,a])}let Lv=Tf(),Uv=0;function qv(t,r,h){let a=t.type,d=(r?r.appContext:t.appContext)||Lv,s={uid:Uv++,vnode:t,type:a,parent:r,appContext:d,root:null,next:null,subTree:null,effect:null,update:null,scope:new ey(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:r?r.provides:Object.create(d.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Pf(a,d),emitsOptions:kf(a,d),emit:null,emitted:null,propsDefaults:Oe,inheritAttrs:a.inheritAttrs,ctx:Oe,data:Oe,props:Oe,attrs:Oe,slots:Oe,refs:Oe,setupState:Oe,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:h,suspenseId:h?h.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=r?r.root:s,s.emit=qy.bind(null,s),t.ce&&t.ce(s),s}let Ke=null,tu,In,tc="__VUE_INSTANCE_SETTERS__";(In=kh()[tc])||(In=kh()[tc]=[]),In.push(t=>Ke=t),tu=t=>{In.length>1?In.forEach(r=>r(t)):In[0](t)};let Bn=t=>{tu(t),t.scope.on()},Xi=()=>{Ke&&Ke.scope.off(),tu(null)};function ec(t){return t.vnode.shapeFlag&4}let Oo=!1;function $v(t,r=!1){Oo=r;let{props:h,children:a}=t.vnode,d=ec(t);mv(t,h,d,r),vv(t,a);let s=d?Tv(t,r):void 0;return Oo=!1,s}function Tv(t,r){let h=t.type;t.accessCache=Object.create(null),t.proxy=gf(new Proxy(t.ctx,sv));let{setup:a}=h;if(a){let d=t.setupContext=a.length>1?Pv(t):null;Bn(t),Sn();let s=ji(a,t,0,[t.props,d]);if(An(),Xi(),W0(s)){if(s.then(Xi,Xi),r)return s.then(m=>{rc(t,m,r)}).catch(m=>{Bs(m,t,0)});t.asyncDep=s}else rc(t,s,r)}else nc(t,r)}function rc(t,r,h){Wt(r)?t.type.__ssrInlineRender?t.ssrRender=r:t.render=r:Le(r)&&(t.setupState=wf(r)),nc(t,h)}let ic;function nc(t,r,h){let a=t.type;if(!t.render){if(!r&&ic&&!a.render){let d=a.template||Zh(t).template;if(d){let{isCustomElement:s,compilerOptions:m}=t.appContext.config,{delimiters:p,compilerOptions:w}=a,S=Fe(Fe({isCustomElement:s,delimiters:p},m),w);a.render=ic(d,S)}}t.render=a.render||Rr}{Bn(t),Sn();try{av(t)}finally{An(),Xi()}}}function Dv(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(r,h){return rr(t,"get","$attrs"),r[h]}}))}function Pv(t){let r=h=>{t.exposed=h||{}};return{get attrs(){return Dv(t)},slots:t.slots,emit:t.emit,expose:r}}function eu(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(wf(gf(t.exposed)),{get(r,h){if(h in r)return r[h];if(h in Ao)return Ao[h](t)},has(r,h){return h in r||h in Ao}}))}function Nv(t){return Wt(t)&&"__vccOpts"in t}let zv=(t,r)=>Oy(t,r,Oo),Fv=Symbol.for("v-scx"),Vv=()=>zs(Fv),Hv="3.3.8",Wv="http://www.w3.org/2000/svg",Gi=typeof document<"u"?document:null,oc=Gi&&Gi.createElement("template"),Zv={insert:(t,r,h)=>{r.insertBefore(t,h||null)},remove:t=>{let r=t.parentNode;r&&r.removeChild(t)},createElement:(t,r,h,a)=>{let d=r?Gi.createElementNS(Wv,t):Gi.createElement(t,h?{is:h}:void 0);return t==="select"&&a&&a.multiple!=null&&d.setAttribute("multiple",a.multiple),d},createText:t=>Gi.createTextNode(t),createComment:t=>Gi.createComment(t),setText:(t,r)=>{t.nodeValue=r},setElementText:(t,r)=>{t.textContent=r},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Gi.querySelector(t),setScopeId(t,r){t.setAttribute(r,"")},insertStaticContent(t,r,h,a,d,s){let m=h?h.previousSibling:r.lastChild;if(d&&(d===s||d.nextSibling))for(;r.insertBefore(d.cloneNode(!0),h),!(d===s||!(d=d.nextSibling)););else{oc.innerHTML=a?`<svg>${t}</svg>`:t;let p=oc.content;if(a){let w=p.firstChild;for(;w.firstChild;)p.appendChild(w.firstChild);p.removeChild(w)}r.insertBefore(p,h)}return[m?m.nextSibling:r.firstChild,h?h.previousSibling:r.lastChild]}},Kv=Symbol("_vtc");function Jv(t,r,h){let a=t[Kv];a&&(r=(r?[r,...a]:[...a]).join(" ")),r==null?t.removeAttribute("class"):h?t.setAttribute("class",r):t.className=r}let Qv=Symbol("_vod");function Xv(t,r,h){let a=t.style,d=Ve(h);if(h&&!d){if(r&&!Ve(r))for(let s in r)h[s]==null&&ru(a,s,"");for(let s in h)ru(a,s,h[s])}else{let s=a.display;d?r!==h&&(a.cssText=h):r&&t.removeAttribute("style"),Qv in t&&(a.display=s)}}let sc=/\s*!important$/;function ru(t,r,h){if(Pt(h))h.forEach(a=>ru(t,r,a));else if(h==null&&(h=""),r.startsWith("--"))t.setProperty(r,h);else{let a=Gv(t,r);sc.test(h)?t.setProperty(_n(a),h.replace(sc,""),"important"):t[a]=h}}let ac=["Webkit","Moz","ms"],iu={};function Gv(t,r){let h=iu[r];if(h)return h;let a=Mn(r);if(a!=="filter"&&a in t)return iu[r]=a;a=Z0(a);for(let d=0;d<ac.length;d++){let s=ac[d]+a;if(s in t)return iu[r]=s}return r}let hc="http://www.w3.org/1999/xlink";function Yv(t,r,h,a,d){if(a&&r.startsWith("xlink:"))h==null?t.removeAttributeNS(hc,r.slice(6,r.length)):t.setAttributeNS(hc,r,h);else{let s=ty(r);h==null||s&&!J0(h)?t.removeAttribute(r):t.setAttribute(r,s?"":h)}}function tb(t,r,h,a,d,s,m){if(r==="innerHTML"||r==="textContent"){a&&m(a,d,s),t[r]=h??"";return}let p=t.tagName;if(r==="value"&&p!=="PROGRESS"&&!p.includes("-")){t._value=h;let S=p==="OPTION"?t.getAttribute("value"):t.value,A=h??"";S!==A&&(t.value=A),h==null&&t.removeAttribute(r);return}let w=!1;if(h===""||h==null){let S=typeof t[r];S==="boolean"?h=J0(h):h==null&&S==="string"?(h="",w=!0):S==="number"&&(h=0,w=!0)}try{t[r]=h}catch{}w&&t.removeAttribute(r)}function eb(t,r,h,a){t.addEventListener(r,h,a)}function rb(t,r,h,a){t.removeEventListener(r,h,a)}let uc=Symbol("_vei");function ib(t,r,h,a,d=null){let s=t[uc]||(t[uc]={}),m=s[r];if(a&&m)m.value=a;else{let[p,w]=nb(r);if(a){let S=s[r]=ab(a,d);eb(t,p,S,w)}else m&&(rb(t,p,m,w),s[r]=void 0)}}let lc=/(?:Once|Passive|Capture)$/;function nb(t){let r;if(lc.test(t)){r={};let h;for(;h=t.match(lc);)t=t.slice(0,t.length-h[0].length),r[h[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):_n(t.slice(2)),r]}let nu=0,ob=Promise.resolve(),sb=()=>nu||(ob.then(()=>nu=0),nu=Date.now());function ab(t,r){let h=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=h.attached)return;Cr(hb(a,h.value),r,5,[a])};return h.value=t,h.attached=sb(),h}function hb(t,r){if(Pt(r)){let h=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{h.call(t),t._stopped=!0},r.map(a=>d=>!d._stopped&&a&&a(d))}else return r}let fc=/^on[a-z]/,ub=(t,r,h,a,d=!1,s,m,p,w)=>{r==="class"?Jv(t,a,d):r==="style"?Xv(t,h,a):ws(r)?Mh(r)||ib(t,r,h,a,m):(r[0]==="."?(r=r.slice(1),!0):r[0]==="^"?(r=r.slice(1),!1):lb(t,r,a,d))?tb(t,r,a,s,m,p,w):(r==="true-value"?t._trueValue=a:r==="false-value"&&(t._falseValue=a),Yv(t,r,a,d))};function lb(t,r,h,a){return a?!!(r==="innerHTML"||r==="textContent"||r in t&&fc.test(r)&&Wt(h)):r==="spellcheck"||r==="draggable"||r==="translate"||r==="form"||r==="list"&&t.tagName==="INPUT"||r==="type"&&t.tagName==="TEXTAREA"||fc.test(r)&&Ve(h)?!1:r in t}let fb=Fe({patchProp:ub},Zv),cc;function cb(){return cc||(cc=wv(fb))}let dc=(...t)=>{let r=cb().createApp(...t),{mount:h}=r;return r.mount=a=>{let d=db(a);if(!d)return;let s=r._component;!Wt(s)&&!s.render&&!s.template&&(s.template=d.innerHTML),d.innerHTML="";let m=h(d,!1,d instanceof SVGElement);return d instanceof Element&&(d.removeAttribute("v-cloak"),d.setAttribute("data-v-app","")),m},r};function db(t){return Ve(t)?document.querySelector(t):t}var Ws={exports:{}};function pb(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}var mb=gb;function gb(t,r,h){var a=h&&h.stringify||pb,d=1;if(typeof t=="object"&&t!==null){var s=r.length+d;if(s===1)return t;var m=new Array(s);m[0]=a(t);for(var p=1;p<s;p++)m[p]=a(r[p]);return m.join(" ")}if(typeof t!="string")return t;var w=r.length;if(w===0)return t;for(var S="",A=1-d,v=-1,_=t&&t.length||0,x=0;x<_;){if(t.charCodeAt(x)===37&&x+1<_){switch(v=v>-1?v:0,t.charCodeAt(x+1)){case 100:case 102:if(A>=w||r[A]==null)break;v<x&&(S+=t.slice(v,x)),S+=Number(r[A]),v=x+2,x++;break;case 105:if(A>=w||r[A]==null)break;v<x&&(S+=t.slice(v,x)),S+=Math.floor(Number(r[A])),v=x+2,x++;break;case 79:case 111:case 106:if(A>=w||r[A]===void 0)break;v<x&&(S+=t.slice(v,x));var b=typeof r[A];if(b==="string"){S+="'"+r[A]+"'",v=x+2,x++;break}if(b==="function"){S+=r[A].name||"<anonymous>",v=x+2,x++;break}S+=a(r[A]),v=x+2,x++;break;case 115:if(A>=w)break;v<x&&(S+=t.slice(v,x)),S+=String(r[A]),v=x+2,x++;break;case 37:v<x&&(S+=t.slice(v,x)),S+="%",v=x+2,x++,A--;break}++A}++x}return v===-1?t:(v<_&&(S+=t.slice(v)),S)}let pc=mb;Ws.exports=di;let jo=Cb().console||{},yb={mapHttpRequest:Js,mapHttpResponse:Js,wrapRequestSerializer:hu,wrapResponseSerializer:hu,wrapErrorSerializer:hu,req:Js,res:Js,err:gc,errWithCause:gc};function Zs(t,r){return t==="silent"?1/0:r.levels.values[t]}let ou=Symbol("pino.logFuncs"),su=Symbol("pino.hierarchy"),vb={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function mc(t,r){let h={logger:r,parent:t[su]};r[su]=h}function bb(t,r,h){let a={};r.forEach(d=>{a[d]=h[d]?h[d]:jo[d]||jo[vb[d]||"log"]||Co}),t[ou]=a}function wb(t,r){return Array.isArray(t)?t.filter(function(h){return h!=="!stdSerializers.err"}):t===!0?Object.keys(r):!1}function di(t){t=t||{},t.browser=t.browser||{};let r=t.browser.transmit;if(r&&typeof r.send!="function")throw Error("pino: transmit option must have a send function");let h=t.browser.write||jo;t.browser.write&&(t.browser.asObject=!0);let a=t.serializers||{},d=wb(t.browser.serialize,a),s=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);let m=Object.keys(t.customLevels||{}),p=["error","fatal","warn","info","debug","trace"].concat(m);typeof h=="function"&&p.forEach(function(M){h[M]=h}),(t.enabled===!1||t.browser.disabled)&&(t.level="silent");let w=t.level||"info",S=Object.create(h);S.log||(S.log=Co),bb(S,p,h),mc({},S),Object.defineProperty(S,"levelVal",{get:v}),Object.defineProperty(S,"level",{get:_,set:x});let A={transmit:r,serialize:d,asObject:t.browser.asObject,levels:p,timestamp:Rb(t)};S.levels=Mb(t),S.level=w,S.setMaxListeners=S.getMaxListeners=S.emit=S.addListener=S.on=S.prependListener=S.once=S.prependOnceListener=S.removeListener=S.removeAllListeners=S.listeners=S.listenerCount=S.eventNames=S.write=S.flush=Co,S.serializers=a,S._serialize=d,S._stdErrSerialize=s,S.child=b,r&&(S._logEvent=au());function v(){return Zs(this.level,this)}function _(){return this._level}function x(M){if(M!=="silent"&&!this.levels.values[M])throw Error("unknown level "+M);this._level=M,Yi(this,A,S,"error"),Yi(this,A,S,"fatal"),Yi(this,A,S,"warn"),Yi(this,A,S,"info"),Yi(this,A,S,"debug"),Yi(this,A,S,"trace"),m.forEach(O=>{Yi(this,A,S,O)})}function b(M,O){if(!M)throw new Error("missing bindings for child Pino");O=O||{},d&&M.serializers&&(O.serializers=M.serializers);let k=O.serializers;if(d&&k){var R=Object.assign({},a,k),I=t.browser.serialize===!0?Object.keys(R):d;delete M.serializers,Ks([M],I,R,this._stdErrSerialize)}function L(H){this._childLevel=(H._childLevel|0)+1,this.bindings=M,R&&(this.serializers=R,this._serialize=I),r&&(this._logEvent=au([].concat(H._logEvent.bindings,M)))}L.prototype=this;let P=new L(this);return mc(this,P),P.level=this.level,P}return S}function Mb(t){let r=t.customLevels||{},h=Object.assign({},di.levels.values,r),a=Object.assign({},di.levels.labels,_b(r));return{values:h,labels:a}}function _b(t){let r={};return Object.keys(t).forEach(function(h){r[t[h]]=h}),r}di.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},di.stdSerializers=yb,di.stdTimeFunctions=Object.assign({},{nullTime:yc,epochTime:vc,unixTime:Ob,isoTime:jb});function Sb(t){let r=[];t.bindings&&r.push(t.bindings);let h=t[su];for(;h.parent;)h=h.parent,h.logger.bindings&&r.push(h.logger.bindings);return r.reverse()}function Yi(t,r,h,a){if(t[a]=Zs(t.level,h)>Zs(a,h)?Co:h[ou][a],!r.transmit&&t[a]===Co)return;t[a]=xb(t,r,h,a);let d=Sb(t);d.length!==0&&(t[a]=Ab(d,t[a]))}function Ab(t,r){return function(){return r.apply(this,[...t,...arguments])}}function xb(t,r,h,a){return function(d){return function(){let s=r.timestamp(),m=new Array(arguments.length),p=Object.getPrototypeOf&&Object.getPrototypeOf(this)===jo?jo:this;for(var w=0;w<m.length;w++)m[w]=arguments[w];if(r.serialize&&!r.asObject&&Ks(m,this._serialize,this.serializers,this._stdErrSerialize),r.asObject?d.call(p,kb(this,a,m,s)):d.apply(p,m),r.transmit){let S=r.transmit.level||t._level,A=h.levels.values[S],v=h.levels.values[a];if(v<A)return;Eb(this,{ts:s,methodLevel:a,methodValue:v,transmitLevel:S,transmitValue:h.levels.values[r.transmit.level||t._level],send:r.transmit.send,val:Zs(t._level,h)},m)}}}(t[ou][a])}function kb(t,r,h,a){t._serialize&&Ks(h,t._serialize,t.serializers,t._stdErrSerialize);let d=h.slice(),s=d[0],m={};a&&(m.time=a),m.level=t.levels.values[r];let p=(t._childLevel|0)+1;if(p<1&&(p=1),s!==null&&typeof s=="object"){for(;p--&&typeof d[0]=="object";)Object.assign(m,d.shift());s=d.length?pc(d.shift(),d):void 0}else typeof s=="string"&&(s=pc(d.shift(),d));return s!==void 0&&(m.msg=s),m}function Ks(t,r,h,a){for(let d in t)if(a&&t[d]instanceof Error)t[d]=di.stdSerializers.err(t[d]);else if(typeof t[d]=="object"&&!Array.isArray(t[d]))for(let s in t[d])r&&r.indexOf(s)>-1&&s in h&&(t[d][s]=h[s](t[d][s]))}function Eb(t,r,h){let a=r.send,d=r.ts,s=r.methodLevel,m=r.methodValue,p=r.val,w=t._logEvent.bindings;Ks(h,t._serialize||Object.keys(t.serializers),t.serializers,t._stdErrSerialize===void 0?!0:t._stdErrSerialize),t._logEvent.ts=d,t._logEvent.messages=h.filter(function(S){return w.indexOf(S)===-1}),t._logEvent.level.label=s,t._logEvent.level.value=m,a(s,t._logEvent,p),t._logEvent=au(w)}function au(t){return{ts:0,messages:[],bindings:t||[],level:{label:"",value:0}}}function gc(t){let r={type:t.constructor.name,msg:t.message,stack:t.stack};for(let h in t)r[h]===void 0&&(r[h]=t[h]);return r}function Rb(t){return typeof t.timestamp=="function"?t.timestamp:t.timestamp===!1?yc:vc}function Js(){return{}}function hu(t){return t}function Co(){}function yc(){return!1}function vc(){return Date.now()}function Ob(){return Math.round(Date.now()/1e3)}function jb(){return new Date(Date.now()).toISOString()}function Cb(){function t(r){return typeof r<"u"&&r}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return t(self)||t(window)||t(this)||{}}}Ws.exports.default=di,Ws.exports.pino=di;var Ib=Ws.exports;let Bb=ke(Ib),Lb=Bb({}),uu=(t,r,h)=>{let a=h||"";Lb.info(`%c${t}`,`color:${r};font-weight:semibold;`,a)},lu={error:{color:"red"},info:{color:"white"},warning:{color:"orange"}},nr={error:(t,r)=>{let{color:h}=lu.error;uu(t,h,r)},info:(t,r)=>{let{color:h}=lu.info;uu(t,h,r)},warning:(t,r)=>{let{color:h}=lu.warning;uu(t,h,r)}},Ii=t=>{let r=encodeURIComponent(String(t));return btoa(r)},Ub=t=>typeof t<"u"&&Object.keys(t).length>0,qb=(t,r)=>r!==""?`&${t}=${r}`:"",$b=t=>{let r=t.publicKey,h=Ii(t.title),a=Ii(t.currency),d=Ii(t.description),s=Ii(t.amount),m=Ii(t.logo),p=Ii(t.installments),w=t.order!==void 0?Ii(t.orders):"",S=isNaN(t.amount)?!1:t.amount>0,A="4",v=Ub(t?.client)?Ii(t.client.email):"";return`?publicKey=${r}&title=${h}&currency=${a}&description=${d}&amount=${s}&logo=${m}&installments=${p}&orders=${w}&monto=${S}&version=${A}${qb("clientEmail",v)}`},Tb=t=>typeof t=="boolean",fu=t=>{if(typeof t=="number")return Number.isInteger(t);if(typeof t!="string")return!1;let r=t.replace(/,/g,"").replace(/\./g,"");return/^\d+$/.test(r)},cu=t=>t!=null&&(t!==""||t!==0),Db=t=>{if(t===0)return 0;let r=t.toString(),h=r.slice(-2),a=r.slice(0,-2).replace(/\B(?=(\d{3})+(?!\d))/g,"");return parseInt(`${a}.${h}`,10)},bc=(t,r)=>{let h=new Intl.NumberFormat("en-US",{style:"currency",currency:r}),a=Db(t);return h.format(a)},wc=(t,r)=>{if(!t)return t;let h=r?t.length-2:t.length-1,a="*".repeat(h);return r?t.substring(0,8)+a+t.substring(t.length-2):a+t.substring(t.length-2)},Qs=(t,r)=>{let h=document.querySelector(`.culqi-${r}`)||document.querySelector(`[data-culqi="${t}[${r}]"]`)||document.getElementById(`${t}[${r}]`);return h instanceof HTMLElement?h:null},Bi=(t,r)=>{let h=Qs(t,r);return h instanceof HTMLInputElement||h instanceof HTMLSelectElement?h:null},Pb=t=>{let r=Qs("card","installments");if(r.innerHTML="",t.length<=0){let h=document.createElement("option");h.value="1",h.text="selecciona...",r.appendChild(h),r.disabled=!0;return}t.forEach(h=>{let a=h.csi?" sin intereses":"",d=`${h.cuota} ${h.cuota===1?"cuota":"cuotas"}${a}`,s=document.createElement("option");s.value=h.cuota.toString(),s.text=d,r.appendChild(s)}),r.disabled=!1},Nb=async t=>{let r=Qs("card","installments"),h=Bi("card","number");r&&h&&h.addEventListener("input",async a=>{let d=a.target.value;if(d.trim().length>=14){let s=await t(d);if(s.object==="error"){r.ariaDisabled="true",nr.warning("Error al obtener iins");return}Pb(s.installments_allowed)}})},zb=(t,r)=>t!==""&&r!=="",Mc=t=>{let r=Object.entries(t).filter(([h,a])=>a==null||a==="").map(([h])=>h);return{isValid:r.length===0,emptyFields:r}},Fb=t=>{let r=t.type?t.type.replace(/_/g," "):"Error",h=t.param||"",a=t.merchant_message||"",d=t.user_message||"";console.log(`%cJS%c${r}%c${h}%c${a}: ${d}`,"padding: 5px; border-radius: 4px 0 0 4px; background-color: #38d9a9; color: #222b31; text-transform: uppercase; font-size: 10px; font-family: sans-serif","padding: 5px; background-color: #222b31; color: #ff4f4f; text-transform: uppercase; font-size: 10px; font-family: sans-serif; border-left: 5px solid #ff4f4f;","padding: 5px; border-radius: 0 4px 4px 0; background-color: #08696b; color: #fff; text-transform: uppercase; font-size: 10px; font-family: sans-serif; font-weight: bold; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3)","color: #FFF; font-family: sans-serif"),window.Culqi.error=t,window.Culqi.token=null,window.Culqi.order=null,culqi()},_c=t=>Number.isInteger(t)?t*100:typeof t=="number"&&!isNaN(t)?Math.floor(t*100):(console.warn("Por favor, ingrese un n\xFAmero v\xE1lido."),null),Vb=t=>{let r={};for(let h in t){r[h]={};for(let a in t[h]){let{min:d,max:s}=t[h][a];r[h][a]={min:_c(d),max:_c(s)}}}return r},Ce=t=>{let r=t.toString();if(t===0)return 0;let h=r.substring(r.length-2,r.length);return`${r.substring(0,r.length-2).replace(/\B(?=(\d{3})+(?!\d))/g,",")}.${h}`},Hb=t=>{let{data:r}=t;if(typeof r=="string")try{window.Culqi.error=JSON.parse(r)}catch{switch(r){case"culqi_destroy_checkout":setTimeout(()=>{window.Culqi.close()},500);break;case"checkout_cerrado":window.Culqi.closeEvent=r,window.Culqi.token=null,window.Culqi.close();break;case"checkout_cargando_recupera":window.Culqi.closeEvent=r,window.Culqi.token=null,culqi();break;default:r!==""&&console.log(`%cJS%cNo se reconoce Instrucci\xF3n%c${r}`,"padding: 5px; border-radius: 4px 0 0 4px; background-color: #38d9a9; color: #222b31; text-transform: uppercase; font-size: 10px; font-family: sans-serif","padding: 5px; background-color: #222b31; color: #ff8f00; text-transform: uppercase; font-size: 10px; font-family: sans-serif; border-left: 5px solid #ff8f00;","padding: 5px; border-radius: 0 4px 4px 0; background-color: #08696b; color: #fff; text-transform: uppercase; font-size: 10px; font-family: sans-serif; font-weight: bold; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3)")}}else if(typeof r<"u"&&typeof r.object=="string")switch(r.object){case"error":Fb(r);break;case"order":window.Culqi.order=r,window.Culqi.error=null,window.Culqi.token=null,culqi(),typeof methodActive=="function"&&methodActive();break;case"token":window.Culqi.token=r,window.Culqi.error=null,window.Culqi.order=null,culqi(),window.Culqi.methodValue=r.type,typeof methodActive=="function"&&methodActive();break;case"paymentMethod":window.Culqi.methodValue=r.type,typeof methodActive=="function"&&methodActive();break;case"closeCheckout":window.Culqi.methodValue=r.type,window.Culqi.wasObjectCreated=r.wasObjectCreated,typeof closeCheckout=="function"&&closeCheckout();break}},Wb=Zy({name:"App",props:{culqiInstance:{type:Object,required:!0},mdIsOpen:{type:Boolean,required:!0},mdIsCheckoutEnabled:{type:Boolean,required:!0},mdUrlCheckout:{type:Object,required:!0}},setup(t){let r=Rn(""),h=Rn(null),a=()=>{t.mdIsOpen&&(t.culqiInstance.urlParameters(),r.value=t.culqiInstance.getUrlParameters())},d=()=>{let s=bf(h);if(s){let m=s;m.setAttribute("allowfullscreen","true"),m.setAttribute("frameborder","0"),m.style.backgroundPosition="initial initial",m.style.backgroundRepeat="initial initial",m?.addEventListener("load",()=>{let p={_settings:t.culqiInstance._settings,_options:t.culqiInstance.getOptions,_publicKey:t.culqiInstance._publickey,_client:t.culqiInstance._client};m.contentWindow.postMessage(p,"*"),m.contentWindow.postMessage({type:"handleModal",value:!0},"*")})}};return Hy(()=>{window.addEventListener("message",Hb,!1),a(),d()}),{urlCheckout:r,checkoutIsOpen:()=>t.mdIsOpen,checkoutIframe:h,reloadIframe:d}}}),Zb=(t,r)=>{let h=t.__vccOpts||t;for(let[a,d]of r)h[a]=d;return h},Kb=["src"];function Jb(t,r,h,a,d,s){return t.checkoutIsOpen()?(Jf(),kv("iframe",{key:0,ref:"checkoutIframe",id:"culqi_checkout_frame",name:"checkout_frame",class:"culqi_checkout",allowtransparency:"true",src:t.urlCheckout},null,8,Kb)):Iv("",!0)}let Sc=Zb(Wb,[["render",Jb],["__scopeId","data-v-e7c57070"]]);var Ln=(t=>(t.USD="USD",t.PEN="PEN",t))(Ln||{}),pi=(t=>(t.TARJETA="tarjeta",t.YAPE="yape",t.CIP="cip",t.CUOTEALO="cuotealo",t.BILLETERA="billetera",t.BANCAMOVIL="bancaMovil",t.AGENTE="agente",t))(pi||{}),Io=(t=>(t.ES="ES",t.EN="EN",t.PT="PT",t.DEFAULT="AUTO",t))(Io||{}),Xs=(t=>(t.LIVE="pk_live_",t.TEST="pk_test_",t))(Xs||{}),du=(t=>(t.LIVE="ord_live_",t.TEST="ord_test_",t))(du||{}),pu=(t=>(t.ORDER="confirm_order",t.TOKEN="token",t.YAPE="yape",t))(pu||{}),Ac=(t=>(t.PUBLIC_KEY="La llave p\xFAblica del comercio ingresado es incorrecta",t.ORDER="El c\xF3digo de orden ingresado es incorrecto",t))(Ac||{});let Qb={PEN:{tarjeta:{min:3,max:2e5},yape:{min:3,max:950},cip:{min:6,max:2e4},cuotealo:{min:70,max:1e4}},USD:{tarjeta:{min:3,max:2e3},cip:{min:6,max:2e4},cuotealo:{min:30,max:2e3}}},je=Vb(Qb),pr={keyUsasge:["encrypt"],algorithm:"aes-256-gcm",inputEncoding:"utf8",outputEncoding:"base64",format:"spki",name:"RSA-OAEP",hash:"SHA-256",pem:{header:"-----BEGIN PUBLIC KEY-----",footer:"-----END PUBLIC KEY-----"}};var xc={exports:{}};(function(t,r){(function(h,a){t.exports=a()})(self,()=>{return h={7629:(d,s,m)=>{let p=m(375),w=m(8571),S=m(9474),A=m(1687),v=m(8652),_=m(8160),x=m(3292),b=m(6354),M=m(8901),O=m(9708),k=m(6914),R=m(2294),I=m(6133),L=m(1152),P=m(8863),H=m(2036),W={Base:class{constructor(q){this.type=q,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new R.Ids,this._preferences=null,this._refs=new I.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return p(typeof O.describe=="function","Manifest functionality disabled"),O.describe(this)}allow(){for(var q=arguments.length,$=new Array(q),N=0;N<q;N++)$[N]=arguments[N];return _.verifyFlat($,"allow"),this._values($,"_valids")}alter(q){p(q&&typeof q=="object"&&!Array.isArray(q),"Invalid targets argument"),p(!this._inRuleset(),"Cannot set alterations inside a ruleset");let $=this.clone();$.$_terms.alterations=$.$_terms.alterations||[];for(let N in q){let e=q[N];p(typeof e=="function","Alteration adjuster for",N,"must be a function"),$.$_terms.alterations.push({target:N,adjuster:e})}return $.$_temp.ruleset=!1,$}artifact(q){return p(q!==void 0,"Artifact cannot be undefined"),p(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",q)}cast(q){return p(q===!1||typeof q=="string","Invalid to value"),p(q===!1||this._definition.cast[q],"Type",this.type,"does not support casting to",q),this.$_setFlag("cast",q===!1?void 0:q)}default(q,$){return this._default("default",q,$)}description(q){return p(q&&typeof q=="string","Description must be a non-empty string"),this.$_setFlag("description",q)}empty(q){let $=this.clone();return q!==void 0&&(q=$.$_compile(q,{override:!1})),$.$_setFlag("empty",q,{clone:!1})}error(q){return p(q,"Missing error"),p(q instanceof Error||typeof q=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",q)}example(q){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return p(q!==void 0,"Missing example"),_.assertOptions($,["override"]),this._inner("examples",q,{single:!0,override:$.override})}external(q,$){return typeof q=="object"&&(p(!$,"Cannot combine options with description"),$=q.description,q=q.method),p(typeof q=="function","Method must be a function"),p($===void 0||$&&typeof $=="string","Description must be a non-empty string"),this._inner("externals",{method:q,description:$},{single:!0})}failover(q,$){return this._default("failover",q,$)}forbidden(){return this.presence("forbidden")}id(q){return q?(p(typeof q=="string","id must be a non-empty string"),p(/^[^\.]+$/.test(q),"id cannot contain period character"),this.$_setFlag("id",q)):this.$_setFlag("id",void 0)}invalid(){for(var q=arguments.length,$=new Array(q),N=0;N<q;N++)$[N]=arguments[N];return this._values($,"_invalids")}label(q){return p(q&&typeof q=="string","Label name must be a non-empty string"),this.$_setFlag("label",q)}meta(q){return p(q!==void 0,"Meta cannot be undefined"),this._inner("metas",q,{single:!0})}note(){for(var q=arguments.length,$=new Array(q),N=0;N<q;N++)$[N]=arguments[N];p($.length,"Missing notes");for(let e of $)p(e&&typeof e=="string","Notes must be non-empty strings");return this._inner("notes",$)}only(){let q=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return p(typeof q=="boolean","Invalid mode:",q),this.$_setFlag("only",q)}optional(){return this.presence("optional")}prefs(q){p(q,"Missing preferences"),p(q.context===void 0,"Cannot override context"),p(q.externals===void 0,"Cannot override externals"),p(q.warnings===void 0,"Cannot override warnings"),p(q.debug===void 0,"Cannot override debug"),_.checkPreferences(q);let $=this.clone();return $._preferences=_.preferences($._preferences,q),$}presence(q){return p(["optional","required","forbidden"].includes(q),"Unknown presence mode",q),this.$_setFlag("presence",q)}raw(){let q=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",q?"raw":void 0)}result(q){return p(["raw","strip"].includes(q),"Unknown result mode",q),this.$_setFlag("result",q)}required(){return this.presence("required")}strict(q){let $=this.clone(),N=q!==void 0&&!q;return $._preferences=_.preferences($._preferences,{convert:N}),$}strip(){let q=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",q?"strip":void 0)}tag(){for(var q=arguments.length,$=new Array(q),N=0;N<q;N++)$[N]=arguments[N];p($.length,"Missing tags");for(let e of $)p(e&&typeof e=="string","Tags must be non-empty strings");return this._inner("tags",$)}unit(q){return p(q&&typeof q=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",q)}valid(){for(var q=arguments.length,$=new Array(q),N=0;N<q;N++)$[N]=arguments[N];_.verifyFlat($,"valid");let e=this.allow(...$);return e.$_setFlag("only",!!e._valids,{clone:!1}),e}when(q,$){let N=this.clone();N.$_terms.whens||(N.$_terms.whens=[]);let e=x.when(N,q,$);if(!["any","link"].includes(N.type)){let o=e.is?[e]:e.switch;for(let n of o)p(!n.then||n.then.type==="any"||n.then.type===N.type,"Cannot combine",N.type,"with",n.then&&n.then.type),p(!n.otherwise||n.otherwise.type==="any"||n.otherwise.type===N.type,"Cannot combine",N.type,"with",n.otherwise&&n.otherwise.type)}return N.$_terms.whens.push(e),N.$_mutateRebuild()}cache(q){p(!this._inRuleset(),"Cannot set caching inside a ruleset"),p(!this._cache,"Cannot override schema cache"),p(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");let $=this.clone();return $._cache=q||v.provider.provision(),$.$_temp.ruleset=!1,$}clone(){let q=Object.create(Object.getPrototypeOf(this));return this._assign(q)}concat(q){p(_.isSchema(q),"Invalid schema object"),p(this.type==="any"||q.type==="any"||q.type===this.type,"Cannot merge type",this.type,"with another type:",q.type),p(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),p(!q._inRuleset(),"Cannot concatenate a schema with open ruleset");let $=this.clone();if(this.type==="any"&&q.type!=="any"){let N=q.clone();for(let e of Object.keys($))e!=="type"&&(N[e]=$[e]);$=N}$._ids.concat(q._ids),$._refs.register(q,I.toSibling),$._preferences=$._preferences?_.preferences($._preferences,q._preferences):q._preferences,$._valids=H.merge($._valids,q._valids,q._invalids),$._invalids=H.merge($._invalids,q._invalids,q._valids);for(let N of q._singleRules.keys())$._singleRules.has(N)&&($._rules=$._rules.filter(e=>e.keep||e.name!==N),$._singleRules.delete(N));for(let N of q._rules)q._definition.rules[N.method].multi||$._singleRules.set(N.name,N),$._rules.push(N);if($._flags.empty&&q._flags.empty){$._flags.empty=$._flags.empty.concat(q._flags.empty);let N=Object.assign({},q._flags);delete N.empty,A($._flags,N)}else if(q._flags.empty){$._flags.empty=q._flags.empty;let N=Object.assign({},q._flags);delete N.empty,A($._flags,N)}else A($._flags,q._flags);for(let N in q.$_terms){let e=q.$_terms[N];e?$.$_terms[N]?$.$_terms[N]=$.$_terms[N].concat(e):$.$_terms[N]=e.slice():$.$_terms[N]||($.$_terms[N]=e)}return this.$_root._tracer&&this.$_root._tracer._combine($,[this,q]),$.$_mutateRebuild()}extend(q){return p(!q.base,"Cannot extend type with another base"),M.type(this,q)}extract(q){return q=Array.isArray(q)?q:q.split("."),this._ids.reach(q)}fork(q,$){p(!this._inRuleset(),"Cannot fork inside a ruleset");let N=this;for(let e of[].concat(q))e=Array.isArray(e)?e:e.split("."),N=N._ids.fork(e,$,N);return N.$_temp.ruleset=!1,N}rule(q){let $=this._definition;_.assertOptions(q,Object.keys($.modifiers)),p(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");let N=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;p(N>=0&&N<this._rules.length,"Cannot apply rules to empty ruleset");let e=this.clone();for(let o=N;o<e._rules.length;++o){let n=e._rules[o],u=w(n);for(let l in q)$.modifiers[l](u,q[l]),p(u.name===n.name,"Cannot change rule name");e._rules[o]=u,e._singleRules.get(u.name)===n&&e._singleRules.set(u.name,u)}return e.$_temp.ruleset=!1,e.$_mutateRebuild()}get ruleset(){p(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");let q=this.clone();return q.$_temp.ruleset=q._rules.length,q}get $(){return this.ruleset}tailor(q){q=[].concat(q),p(!this._inRuleset(),"Cannot tailor inside a ruleset");let $=this;if(this.$_terms.alterations)for(let{target:N,adjuster:e}of this.$_terms.alterations)q.includes(N)&&($=e($),p(_.isSchema($),"Alteration adjuster for",N,"failed to return a schema object"));return $=$.$_modify({each:N=>N.tailor(q),ref:!1}),$.$_temp.ruleset=!1,$.$_mutateRebuild()}tracer(){return L.location?L.location(this):this}validate(q,$){return P.entry(q,this,$)}validateAsync(q,$){return P.entryAsync(q,this,$)}$_addRule(q){typeof q=="string"&&(q={name:q}),p(q&&typeof q=="object","Invalid options"),p(q.name&&typeof q.name=="string","Invalid rule name");for(let n in q)p(n[0]!=="_","Cannot set private rule properties");let $=Object.assign({},q);$._resolve=[],$.method=$.method||$.name;let N=this._definition.rules[$.method],e=$.args;p(N,"Unknown rule",$.method);let o=this.clone();if(e){p(Object.keys(e).length===1||Object.keys(e).length===this._definition.rules[$.name].args.length,"Invalid rule definition for",this.type,$.name);for(let n in e){let u=e[n];if(N.argsByName){let l=N.argsByName.get(n);if(l.ref&&_.isResolvable(u))$._resolve.push(n),o.$_mutateRegister(u);else if(l.normalize&&(u=l.normalize(u),e[n]=u),l.assert){let g=_.validateArg(u,n,l);p(!g,g,"or reference")}}u!==void 0?e[n]=u:delete e[n]}}return N.multi||(o._ruleRemove($.name,{clone:!1}),o._singleRules.set($.name,$)),o.$_temp.ruleset===!1&&(o.$_temp.ruleset=null),N.priority?o._rules.unshift($):o._rules.push($),o}$_compile(q,$){return x.schema(this.$_root,q,$)}$_createError(q,$,N,e,o){let n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=n.flags!==!1?this._flags:{},l=n.messages?k.merge(this._definition.messages,n.messages):this._definition.messages;return new b.Report(q,$,N,u,l,e,o)}$_getFlag(q){return this._flags[q]}$_getRule(q){return this._singleRules.get(q)}$_mapLabels(q){return q=Array.isArray(q)?q:q.split("."),this._ids.labels(q)}$_match(q,$,N,e){(N=Object.assign({},N)).abortEarly=!0,N._externals=!1,$.snapshot();let o=!P.validate(q,this,$,N,e).errors;return $.restore(),o}$_modify(q){return _.assertOptions(q,["each","once","ref","schema"]),R.schema(this,q)||this}$_mutateRebuild(){return p(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(q,$)=>{let{source:N,name:e,path:o,key:n}=$,u=this._definition[N][e]&&this._definition[N][e].register;u!==!1&&this.$_mutateRegister(q,{family:u,key:n})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(q){let{family:$,key:N}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(q,$),this._ids.register(q,{key:N})}$_property(q){return this._definition.properties[q]}$_reach(q){return this._ids.reach(q)}$_rootReferences(){return this._refs.roots()}$_setFlag(q,$){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};p(q[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");let e=this._definition.flags[q]||{};if(S($,e.default)&&($=void 0),S($,this._flags[q]))return this;let o=N.clone!==!1?this.clone():this;return $!==void 0?(o._flags[q]=$,o.$_mutateRegister($)):delete o._flags[q],q[0]!=="_"&&(o.$_temp.ruleset=!1),o}$_parent(q){for(var $=arguments.length,N=new Array($>1?$-1:0),e=1;e<$;e++)N[e-1]=arguments[e];return this[q][_.symbols.parent].call(this,...N)}$_validate(q,$,N){return P.validate(q,this,$,N)}_assign(q){q.type=this.type,q.$_root=this.$_root,q.$_temp=Object.assign({},this.$_temp),q.$_temp.whens={},q._ids=this._ids.clone(),q._preferences=this._preferences,q._valids=this._valids&&this._valids.clone(),q._invalids=this._invalids&&this._invalids.clone(),q._rules=this._rules.slice(),q._singleRules=w(this._singleRules,{shallow:!0}),q._refs=this._refs.clone(),q._flags=Object.assign({},this._flags),q._cache=null,q.$_terms={};for(let $ in this.$_terms)q.$_terms[$]=this.$_terms[$]?this.$_terms[$].slice():null;q.$_super={};for(let $ in this.$_super)q.$_super[$]=this._super[$].bind(q);return q}_bare(){let q=this.clone();q._reset();let $=q._definition.terms;for(let N in $){let e=$[N];q.$_terms[N]=e.init}return q.$_mutateRebuild()}_default(q,$){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return _.assertOptions(N,"literal"),p($!==void 0,"Missing",q,"value"),p(typeof $=="function"||!N.literal,"Only function value supports literal option"),typeof $=="function"&&N.literal&&($={[_.symbols.literal]:!0,literal:$}),this.$_setFlag(q,$)}_generate(q,$,N){if(!this.$_terms.whens)return{schema:this};let e=[],o=[];for(let l=0;l<this.$_terms.whens.length;++l){let g=this.$_terms.whens[l];if(g.concat){e.push(g.concat),o.push(`${l}.concat`);continue}let y=g.ref?g.ref.resolve(q,$,N):q,c=g.is?[g]:g.switch,i=o.length;for(let f=0;f<c.length;++f){let{is:E,then:j,otherwise:D}=c[f],V=`${l}${g.switch?"."+f:""}`;if(E.$_match(y,$.nest(E,`${V}.is`),N)){if(j){let Q=$.localize([...$.path,`${V}.then`],$.ancestors,$.schemas),{schema:Z,id:tt}=j._generate(q,Q,N);e.push(Z),o.push(`${V}.then${tt?`(${tt})`:""}`);break}}else if(D){let Q=$.localize([...$.path,`${V}.otherwise`],$.ancestors,$.schemas),{schema:Z,id:tt}=D._generate(q,Q,N);e.push(Z),o.push(`${V}.otherwise${tt?`(${tt})`:""}`);break}}if(g.break&&o.length>i)break}let n=o.join(", ");if($.mainstay.tracer.debug($,"rule","when",n),!n)return{schema:this};if(!$.mainstay.tracer.active&&this.$_temp.whens[n])return{schema:this.$_temp.whens[n],id:n};let u=this;this._definition.generate&&(u=this._definition.generate(this,q,$,N));for(let l of e)u=u.concat(l);return this.$_root._tracer&&this.$_root._tracer._combine(u,[this,...e]),this.$_temp.whens[n]=u,{schema:u,id:n}}_inner(q,$){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};p(!this._inRuleset(),`Cannot set ${q} inside a ruleset`);let e=this.clone();return e.$_terms[q]&&!N.override||(e.$_terms[q]=[]),N.single?e.$_terms[q].push($):e.$_terms[q].push(...$),e.$_temp.ruleset=!1,e}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(q){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(q))return this;let N=$.clone!==!1?this.clone():this;N._singleRules.delete(q);let e=[];for(let o=0;o<N._rules.length;++o){let n=N._rules[o];n.name!==q||n.keep?e.push(n):N._inRuleset()&&o<N.$_temp.ruleset&&--N.$_temp.ruleset}return N._rules=e,N}_values(q,$){_.verifyFlat(q,$.slice(1,-1));let N=this.clone(),e=q[0]===_.symbols.override;if(e&&(q=q.slice(1)),!N[$]&&q.length?N[$]=new H:e&&(N[$]=q.length?new H:null,N.$_mutateRebuild()),!N[$])return N;e&&N[$].override();for(let o of q){p(o!==void 0,"Cannot call allow/valid/invalid with undefined"),p(o!==_.symbols.override,"Override must be the first value");let n=$==="_invalids"?"_valids":"_invalids";N[n]&&(N[n].remove(o),N[n].length||(p($==="_valids"||!N._flags.only,"Setting invalid value",o,"leaves schema rejecting all values due to previous valid rule"),N[n]=null)),N[$].add(o,N._refs)}return N}}};W.Base.prototype[_.symbols.any]={version:_.version,compile:x.compile,root:"$_root"},W.Base.prototype.isImmutable=!0,W.Base.prototype.deny=W.Base.prototype.invalid,W.Base.prototype.disallow=W.Base.prototype.invalid,W.Base.prototype.equal=W.Base.prototype.valid,W.Base.prototype.exist=W.Base.prototype.required,W.Base.prototype.not=W.Base.prototype.invalid,W.Base.prototype.options=W.Base.prototype.prefs,W.Base.prototype.preferences=W.Base.prototype.prefs,d.exports=new W.Base},8652:(d,s,m)=>{let p=m(375),w=m(8571),S=m(8160),A={max:1e3,supported:new Set(["undefined","boolean","number","string"])};s.provider={provision:v=>new A.Cache(v)},A.Cache=class{constructor(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.assertOptions(v,["max"]),p(v.max===void 0||v.max&&v.max>0&&isFinite(v.max),"Invalid max cache size"),this._max=v.max||A.max,this._map=new Map,this._list=new A.List}get length(){return this._map.size}set(v,_){if(v!==null&&!A.supported.has(typeof v))return;let x=this._map.get(v);if(x)return x.value=_,void this._list.first(x);x=this._list.unshift({key:v,value:_}),this._map.set(v,x),this._compact()}get(v){let _=this._map.get(v);if(_)return this._list.first(_),w(_.value)}_compact(){if(this._map.size>this._max){let v=this._list.pop();this._map.delete(v.key)}}},A.List=class{constructor(){this.tail=null,this.head=null}unshift(v){return v.next=null,v.prev=this.head,this.head&&(this.head.next=v),this.head=v,this.tail||(this.tail=v),v}first(v){v!==this.head&&(this._remove(v),this.unshift(v))}pop(){return this._remove(this.tail)}_remove(v){let{next:_,prev:x}=v;return _.prev=x,x&&(x.next=_),v===this.tail&&(this.tail=_),v.prev=null,v.next=null,v}}},8160:(d,s,m)=>{let p=m(375),w=m(7916),S=m(5934),A,v,_={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};s.version=S.version,s.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},s.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},s.assertOptions=function(x,b){let M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";p(x&&typeof x=="object"&&!Array.isArray(x),"Options must be of type object");let O=Object.keys(x).filter(k=>!b.includes(k));p(O.length===0,`${M} contain unknown keys: ${O}`)},s.checkPreferences=function(x){v=v||m(3378);let b=v.preferences.validate(x);if(b.error)throw new w([b.error.details[0].message])},s.compare=function(x,b,M){switch(M){case"=":return x===b;case">":return x>b;case"<":return x<b;case">=":return x>=b;case"<=":return x<=b}},s.default=function(x,b){return x===void 0?b:x},s.isIsoDate=function(x){return _.isoDate.test(x)},s.isNumber=function(x){return typeof x=="number"&&!isNaN(x)},s.isResolvable=function(x){return!!x&&(x[s.symbols.ref]||x[s.symbols.template])},s.isSchema=function(x){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=x&&x[s.symbols.any];return!!M&&(p(b.legacy||M.version===s.version,"Cannot mix different versions of joi schemas"),!0)},s.isValues=function(x){return x[s.symbols.values]},s.limit=function(x){return Number.isSafeInteger(x)&&x>=0},s.preferences=function(x,b){A=A||m(6914),x=x||{},b=b||{};let M=Object.assign({},x,b);return b.errors&&x.errors&&(M.errors=Object.assign({},x.errors,b.errors),M.errors.wrap=Object.assign({},x.errors.wrap,b.errors.wrap)),b.messages&&(M.messages=A.compile(b.messages,x.messages)),delete M[s.symbols.prefs],M},s.tryWithPath=function(x,b){let M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return x()}catch(O){throw O.path!==void 0?O.path=b+"."+O.path:O.path=b,M.append&&(O.message=`${O.message} (${O.path})`),O}},s.validateArg=function(x,b,M){let{assert:O,message:k}=M;if(s.isSchema(O)){let R=O.validate(x);return R.error?R.error.message:void 0}if(!O(x))return b?`${b} ${k}`:k},s.verifyFlat=function(x,b){for(let M of x)p(!Array.isArray(M),"Method no longer accepts array arguments:",b)}},3292:(d,s,m)=>{let p=m(375),w=m(8160),S=m(6133),A={};s.schema=function(v,_){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w.assertOptions(x,["appendPath","override"]);try{return A.schema(v,_,x)}catch(b){throw x.appendPath&&b.path!==void 0&&(b.message=`${b.message} (${b.path})`),b}},A.schema=function(v,_,x){p(_!==void 0,"Invalid undefined schema"),Array.isArray(_)&&(p(_.length,"Invalid empty array schema"),_.length===1&&(_=_[0]));let b=function(M){for(var O=arguments.length,k=new Array(O>1?O-1:0),R=1;R<O;R++)k[R-1]=arguments[R];return x.override!==!1?M.valid(v.override,...k):M.valid(...k)};if(A.simple(_))return b(v,_);if(typeof _=="function")return v.custom(_);if(p(typeof _=="object","Invalid schema content:",typeof _),w.isResolvable(_))return b(v,_);if(w.isSchema(_))return _;if(Array.isArray(_)){for(let M of _)if(!A.simple(M))return v.alternatives().try(..._);return b(v,..._)}return _ instanceof RegExp?v.string().regex(_):_ instanceof Date?b(v.date(),_):(p(Object.getPrototypeOf(_)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),v.object().keys(_))},s.ref=function(v,_){return S.isRef(v)?v:S.create(v,_)},s.compile=function(v,_){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w.assertOptions(x,["legacy"]);let b=_&&_[w.symbols.any];if(b)return p(x.legacy||b.version===w.version,"Cannot mix different versions of joi schemas:",b.version,w.version),_;if(typeof _!="object"||!x.legacy)return s.schema(v,_,{appendPath:!0});let M=A.walk(_);return M?M.compile(M.root,_):s.schema(v,_,{appendPath:!0})},A.walk=function(v){if(typeof v!="object")return null;if(Array.isArray(v)){for(let x of v){let b=A.walk(x);if(b)return b}return null}let _=v[w.symbols.any];if(_)return{root:v[_.root],compile:_.compile};p(Object.getPrototypeOf(v)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(let x in v){let b=A.walk(v[x]);if(b)return b}return null},A.simple=function(v){return v===null||["boolean","string","number"].includes(typeof v)},s.when=function(v,_,x){if(x===void 0&&(p(_&&typeof _=="object","Missing options"),x=_,_=S.create(".")),Array.isArray(x)&&(x={switch:x}),w.assertOptions(x,["is","not","then","otherwise","switch","break"]),w.isSchema(_))return p(x.is===void 0,'"is" can not be used with a schema condition'),p(x.not===void 0,'"not" can not be used with a schema condition'),p(x.switch===void 0,'"switch" can not be used with a schema condition'),A.condition(v,{is:_,then:x.then,otherwise:x.otherwise,break:x.break});if(p(S.isRef(_)||typeof _=="string","Invalid condition:",_),p(x.not===void 0||x.is===void 0,'Cannot combine "is" with "not"'),x.switch===void 0){let M=x;x.not!==void 0&&(M={is:x.not,then:x.otherwise,otherwise:x.then,break:x.break});let O=M.is!==void 0?v.$_compile(M.is):v.$_root.invalid(null,!1,0,"").required();return p(M.then!==void 0||M.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),p(M.break===void 0||M.then===void 0||M.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),x.is===void 0||S.isRef(x.is)||w.isSchema(x.is)||(O=O.required()),A.condition(v,{ref:s.ref(_),is:O,then:M.then,otherwise:M.otherwise,break:M.break})}p(Array.isArray(x.switch),'"switch" must be an array'),p(x.is===void 0,'Cannot combine "switch" with "is"'),p(x.not===void 0,'Cannot combine "switch" with "not"'),p(x.then===void 0,'Cannot combine "switch" with "then"');let b={ref:s.ref(_),switch:[],break:x.break};for(let M=0;M<x.switch.length;++M){let O=x.switch[M],k=M===x.switch.length-1;w.assertOptions(O,k?["is","then","otherwise"]:["is","then"]),p(O.is!==void 0,'Switch statement missing "is"'),p(O.then!==void 0,'Switch statement missing "then"');let R={is:v.$_compile(O.is),then:v.$_compile(O.then)};if(S.isRef(O.is)||w.isSchema(O.is)||(R.is=R.is.required()),k){p(x.otherwise===void 0||O.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');let I=x.otherwise!==void 0?x.otherwise:O.otherwise;I!==void 0&&(p(b.break===void 0,"Cannot specify both otherwise and break"),R.otherwise=v.$_compile(I))}b.switch.push(R)}return b},A.condition=function(v,_){for(let x of["then","otherwise"])_[x]===void 0?delete _[x]:_[x]=v.$_compile(_[x]);return _}},6354:(d,s,m)=>{let p=m(5688),w=m(8160),S=m(3328);s.Report=class{constructor(A,v,_,x,b,M,O){if(this.code=A,this.flags=x,this.messages=b,this.path=M.path,this.prefs=O,this.state=M,this.value=v,this.message=null,this.template=null,this.local=_||{},this.local.label=s.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){let k=this.path[this.path.length-1];typeof k!="object"&&(this.local.key=k)}}_setTemplate(A){if(this.template=A,!this.flags.label&&this.path.length===0){let v=this._template(this.template,"root");v&&(this.local.label=v)}}toString(){if(this.message)return this.message;let A=this.code;if(!this.prefs.errors.render)return this.code;let v=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return v===void 0?`Error code "${A}" is not defined, your custom type is missing the correct messages definition`:(this.message=v.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(A,v){return s.template(this.value,A,v||this.code,this.state,this.prefs)}},s.path=function(A){let v="";for(let _ of A)typeof _!="object"&&(typeof _=="string"?(v&&(v+="."),v+=_):v+=`[${_}]`);return v},s.template=function(A,v,_,x,b){if(!v)return;if(S.isTemplate(v))return _!=="root"?v:null;let M=b.errors.language;if(w.isResolvable(M)&&(M=M.resolve(A,x,b)),M&&v[M]){if(v[M][_]!==void 0)return v[M][_];if(v[M]["*"]!==void 0)return v[M]["*"]}return v[_]?v[_]:v["*"]},s.label=function(A,v,_,x){if(A.label)return A.label;if(!_.errors.label)return"";let b=v.path;return _.errors.label==="key"&&v.path.length>1&&(b=v.path.slice(-1)),s.path(b)||s.template(null,_.messages,"root",v,_)||x&&s.template(null,x,"root",v,_)||"value"},s.process=function(A,v,_){if(!A)return null;let{override:x,message:b,details:M}=s.details(A);if(x)return x;if(_.errors.stack)return new s.ValidationError(b,M,v);let O=Error.stackTraceLimit;Error.stackTraceLimit=0;let k=new s.ValidationError(b,M,v);return Error.stackTraceLimit=O,k},s.details=function(A){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=[],x=[];for(let b of A){if(b instanceof Error){if(v.override!==!1)return{override:b};let O=b.toString();_.push(O),x.push({message:O,type:"override",context:{error:b}});continue}let M=b.toString();_.push(M),x.push({message:M,path:b.path.filter(O=>typeof O!="object"),type:b.code,context:b.local})}return _.length>1&&(_=[...new Set(_)]),{message:_.join(". "),details:x}},s.ValidationError=class extends Error{constructor(A,v,_){super(A),this._original=_,this.details=v}static isError(A){return A instanceof s.ValidationError}},s.ValidationError.prototype.isJoi=!0,s.ValidationError.prototype.name="ValidationError",s.ValidationError.prototype.annotate=p.error},8901:(d,s,m)=>{let p=m(375),w=m(8571),S=m(8160),A=m(6914),v={};s.type=function(_,x){let b=Object.getPrototypeOf(_),M=w(b),O=_._assign(Object.create(M)),k=Object.assign({},x);delete k.base,M._definition=k;let R=b._definition||{};k.messages=A.merge(R.messages,k.messages),k.properties=Object.assign({},R.properties,k.properties),O.type=k.type,k.flags=Object.assign({},R.flags,k.flags);let I=Object.assign({},R.terms);if(k.terms)for(let W in k.terms){let q=k.terms[W];p(O.$_terms[W]===void 0,"Invalid term override for",k.type,W),O.$_terms[W]=q.init,I[W]=q}k.terms=I,k.args||(k.args=R.args),k.prepare=v.prepare(k.prepare,R.prepare),k.coerce&&(typeof k.coerce=="function"&&(k.coerce={method:k.coerce}),k.coerce.from&&!Array.isArray(k.coerce.from)&&(k.coerce={method:k.coerce.method,from:[].concat(k.coerce.from)})),k.coerce=v.coerce(k.coerce,R.coerce),k.validate=v.validate(k.validate,R.validate);let L=Object.assign({},R.rules);if(k.rules)for(let W in k.rules){let q=k.rules[W];p(typeof q=="object","Invalid rule definition for",k.type,W);let $=q.method;if($===void 0&&($=function(){return this.$_addRule(W)}),$&&(p(!M[W],"Rule conflict in",k.type,W),M[W]=$),p(!L[W],"Rule conflict in",k.type,W),L[W]=q,q.alias){let N=[].concat(q.alias);for(let e of N)M[e]=q.method}q.args&&(q.argsByName=new Map,q.args=q.args.map(N=>(typeof N=="string"&&(N={name:N}),p(!q.argsByName.has(N.name),"Duplicated argument name",N.name),S.isSchema(N.assert)&&(N.assert=N.assert.strict().label(N.name)),q.argsByName.set(N.name,N),N)))}k.rules=L;let P=Object.assign({},R.modifiers);if(k.modifiers)for(let W in k.modifiers){p(!M[W],"Rule conflict in",k.type,W);let q=k.modifiers[W];p(typeof q=="function","Invalid modifier definition for",k.type,W);let $=function(N){return this.rule({[W]:N})};M[W]=$,P[W]=q}if(k.modifiers=P,k.overrides){M._super=b,O.$_super={};for(let W in k.overrides)p(b[W],"Cannot override missing",W),k.overrides[W][S.symbols.parent]=b[W],O.$_super[W]=b[W].bind(O);Object.assign(M,k.overrides)}k.cast=Object.assign({},R.cast,k.cast);let H=Object.assign({},R.manifest,k.manifest);return H.build=v.build(k.manifest&&k.manifest.build,R.manifest&&R.manifest.build),k.manifest=H,k.rebuild=v.rebuild(k.rebuild,R.rebuild),O},v.build=function(_,x){return _&&x?function(b,M){return x(_(b,M),M)}:_||x},v.coerce=function(_,x){return _&&x?{from:_.from&&x.from?[...new Set([..._.from,...x.from])]:null,method(b,M){let O;if((!x.from||x.from.includes(typeof b))&&(O=x.method(b,M),O)){if(O.errors||O.value===void 0)return O;b=O.value}if(!_.from||_.from.includes(typeof b)){let k=_.method(b,M);if(k)return k}return O}}:_||x},v.prepare=function(_,x){return _&&x?function(b,M){let O=_(b,M);if(O){if(O.errors||O.value===void 0)return O;b=O.value}return x(b,M)||O}:_||x},v.rebuild=function(_,x){return _&&x?function(b){x(b),_(b)}:_||x},v.validate=function(_,x){return _&&x?function(b,M){let O=x(b,M);if(O){if(O.errors&&(!Array.isArray(O.errors)||O.errors.length))return O;b=O.value}return _(b,M)||O}:_||x}},5107:(d,s,m)=>{let p=m(375),w=m(8571),S=m(8652),A=m(8160),v=m(3292),_=m(6354),x=m(8901),b=m(9708),M=m(6133),O=m(3328),k=m(1152),R,I={types:{alternatives:m(4946),any:m(8068),array:m(546),boolean:m(4937),date:m(7500),function:m(390),link:m(8785),number:m(3832),object:m(8966),string:m(7417),symbol:m(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){let L={_types:new Set(Object.keys(I.types))};for(let P of L._types)L[P]=function(){for(var H=arguments.length,W=new Array(H),q=0;q<H;q++)W[q]=arguments[q];return p(!W.length||["alternatives","link","object"].includes(P),"The",P,"type does not allow arguments"),I.generate(this,I.types[P],W)};for(let P of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])L[P]=function(){return this.any()[P](...arguments)};Object.assign(L,I.methods);for(let P in I.aliases){let H=I.aliases[P];L[P]=L[H]}return L.x=L.expression,k.setup&&k.setup(L),L}};I.methods={ValidationError:_.ValidationError,version:A.version,cache:S.provider,assert(L,P){for(var H=arguments.length,W=new Array(H>2?H-2:0),q=2;q<H;q++)W[q-2]=arguments[q];I.assert(L,P,!0,W)},attempt(L,P){for(var H=arguments.length,W=new Array(H>2?H-2:0),q=2;q<H;q++)W[q-2]=arguments[q];return I.assert(L,P,!1,W)},build(L){return p(typeof b.build=="function","Manifest functionality disabled"),b.build(this,L)},checkPreferences(L){A.checkPreferences(L)},compile(L,P){return v.compile(this,L,P)},defaults(L){p(typeof L=="function","modifier must be a function");let P=Object.assign({},this);for(let H of P._types){let W=L(P[H]());p(A.isSchema(W),"modifier must return a valid schema object"),P[H]=function(){for(var q=arguments.length,$=new Array(q),N=0;N<q;N++)$[N]=arguments[N];return I.generate(this,W,$)}}return P},expression(){for(var L=arguments.length,P=new Array(L),H=0;H<L;H++)P[H]=arguments[H];return new O(...P)},extend(){for(var L=arguments.length,P=new Array(L),H=0;H<L;H++)P[H]=arguments[H];A.verifyFlat(P,"extend"),R=R||m(3378),p(P.length,"You need to provide at least one extension"),this.assert(P,R.extensions);let W=Object.assign({},this);W._types=new Set(W._types);for(let q of P){typeof q=="function"&&(q=q(W)),this.assert(q,R.extension);let $=I.expandExtension(q,W);for(let N of $){p(W[N.type]===void 0||W._types.has(N.type),"Cannot override name",N.type);let e=N.base||this.any(),o=x.type(e,N);W._types.add(N.type),W[N.type]=function(){for(var n=arguments.length,u=new Array(n),l=0;l<n;l++)u[l]=arguments[l];return I.generate(this,o,u)}}}return W},isError:_.ValidationError.isError,isExpression:O.isTemplate,isRef:M.isRef,isSchema:A.isSchema,in(){return M.in(...arguments)},override:A.symbols.override,ref(){return M.create(...arguments)},types(){let L={};for(let P of this._types)L[P]=this[P]();for(let P in I.aliases)L[P]=this[P]();return L}},I.assert=function(L,P,H,W){let q=W[0]instanceof Error||typeof W[0]=="string"?W[0]:null,$=q!==null?W[1]:W[0],N=P.validate(L,A.preferences({errors:{stack:!0}},$||{})),e=N.error;if(!e)return N.value;if(q instanceof Error)throw q;let o=H&&typeof e.annotate=="function"?e.annotate():e.message;throw e instanceof _.ValidationError==0&&(e=w(e)),e.message=q?`${q} ${o}`:o,e},I.generate=function(L,P,H){return p(L,"Must be invoked on a Joi instance."),P.$_root=L,P._definition.args&&H.length?P._definition.args(P,...H):P},I.expandExtension=function(L,P){if(typeof L.type=="string")return[L];let H=[];for(let W of P._types)if(L.type.test(W)){let q=Object.assign({},L);q.type=W,q.base=P[W](),H.push(q)}return H},d.exports=I.root()},6914:(d,s,m)=>{let p=m(375),w=m(8571),S=m(3328);s.compile=function(A,v){if(typeof A=="string")return p(!v,"Cannot set single message string"),new S(A);if(S.isTemplate(A))return p(!v,"Cannot set single message template"),A;p(typeof A=="object"&&!Array.isArray(A),"Invalid message options"),v=v?w(v):{};for(let _ in A){let x=A[_];if(_==="root"||S.isTemplate(x)){v[_]=x;continue}if(typeof x=="string"){v[_]=new S(x);continue}p(typeof x=="object"&&!Array.isArray(x),"Invalid message for",_);let b=_;for(_ in v[b]=v[b]||{},x){let M=x[_];_==="root"||S.isTemplate(M)?v[b][_]=M:(p(typeof M=="string","Invalid message for",_,"in",b),v[b][_]=new S(M))}}return v},s.decompile=function(A){let v={};for(let _ in A){let x=A[_];if(_==="root"){v.root=x;continue}if(S.isTemplate(x)){v[_]=x.describe({compact:!0});continue}let b=_;for(_ in v[b]={},x){let M=x[_];_!=="root"?v[b][_]=M.describe({compact:!0}):v[b].root=M}}return v},s.merge=function(A,v){if(!A)return s.compile(v);if(!v)return A;if(typeof v=="string")return new S(v);if(S.isTemplate(v))return v;let _=w(A);for(let x in v){let b=v[x];if(x==="root"||S.isTemplate(b)){_[x]=b;continue}if(typeof b=="string"){_[x]=new S(b);continue}p(typeof b=="object"&&!Array.isArray(b),"Invalid message for",x);let M=x;for(x in _[M]=_[M]||{},b){let O=b[x];x==="root"||S.isTemplate(O)?_[M][x]=O:(p(typeof O=="string","Invalid message for",x,"in",M),_[M][x]=new S(O))}}return _}},2294:(d,s,m)=>{let p=m(375),w=m(8160),S=m(6133),A={};s.Ids=A.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){let v=new A.Ids;return v._byId=new Map(this._byId),v._byKey=new Map(this._byKey),v._schemaChain=this._schemaChain,v}concat(v){v._schemaChain&&(this._schemaChain=!0);for(let[_,x]of v._byId.entries())p(!this._byKey.has(_),"Schema id conflicts with existing key:",_),this._byId.set(_,x);for(let[_,x]of v._byKey.entries())p(!this._byId.has(_),"Schema key conflicts with existing id:",_),this._byKey.set(_,x)}fork(v,_,x){let b=this._collect(v);b.push({schema:x});let M=b.shift(),O={id:M.id,schema:_(M.schema)};p(w.isSchema(O.schema),"adjuster function failed to return a joi schema type");for(let k of b)O={id:k.id,schema:A.fork(k.schema,O.id,O.schema)};return O.schema}labels(v){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=v[0],b=this._get(x);if(!b)return[..._,...v].join(".");let M=v.slice(1);return _=[..._,b.schema._flags.label||x],M.length?b.schema._ids.labels(M,_):_.join(".")}reach(v){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=v[0],b=this._get(x);p(b,"Schema does not contain path",[..._,...v].join("."));let M=v.slice(1);return M.length?b.schema._ids.reach(M,[..._,x]):b.schema}register(v){let{key:_}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!v||!w.isSchema(v))return;(v.$_property("schemaChain")||v._ids._schemaChain)&&(this._schemaChain=!0);let x=v._flags.id;if(x){let b=this._byId.get(x);p(!b||b.schema===v,"Cannot add different schemas with the same id:",x),p(!this._byKey.has(x),"Schema id conflicts with existing key:",x),this._byId.set(x,{schema:v,id:x})}_&&(p(!this._byKey.has(_),"Schema already contains key:",_),p(!this._byId.has(_),"Schema key conflicts with existing id:",_),this._byKey.set(_,{schema:v,id:_}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(v){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],b=v[0],M=this._get(b);p(M,"Schema does not contain path",[..._,...v].join(".")),x=[M,...x];let O=v.slice(1);return O.length?M.schema._ids._collect(O,[..._,b],x):x}_get(v){return this._byId.get(v)||this._byKey.get(v)}},A.fork=function(v,_,x){let b=s.schema(v,{each:(M,O)=>{let{key:k}=O;if(_===(M._flags.id||k))return x},ref:!1});return b?b.$_mutateRebuild():v},s.schema=function(v,_){let x;for(let b in v._flags){if(b[0]==="_")continue;let M=A.scan(v._flags[b],{source:"flags",name:b},_);M!==void 0&&(x=x||v.clone(),x._flags[b]=M)}for(let b=0;b<v._rules.length;++b){let M=v._rules[b],O=A.scan(M.args,{source:"rules",name:M.name},_);if(O!==void 0){x=x||v.clone();let k=Object.assign({},M);k.args=O,x._rules[b]=k,x._singleRules.get(M.name)===M&&x._singleRules.set(M.name,k)}}for(let b in v.$_terms){if(b[0]==="_")continue;let M=A.scan(v.$_terms[b],{source:"terms",name:b},_);M!==void 0&&(x=x||v.clone(),x.$_terms[b]=M)}return x},A.scan=function(v,_,x,b,M){let O=b||[];if(v===null||typeof v!="object")return;let k;if(Array.isArray(v)){for(let R=0;R<v.length;++R){let I=_.source==="terms"&&_.name==="keys"&&v[R].key,L=A.scan(v[R],_,x,[R,...O],I);L!==void 0&&(k=k||v.slice(),k[R]=L)}return k}if(x.schema!==!1&&w.isSchema(v)||x.ref!==!1&&S.isRef(v)){let R=x.each(v,{..._,path:O,key:M});return R===v?void 0:R}for(let R in v){if(R[0]==="_")continue;let I=A.scan(v[R],_,x,[R,...O],M);I!==void 0&&(k=k||Object.assign({},v),k[R]=I)}return k}},6133:(d,s,m)=>{let p=m(375),w=m(8571),S=m(9621),A=m(8160),v,_={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};s.create=function(x){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};p(typeof x=="string","Invalid reference key:",x),A.assertOptions(b,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),p(!b.prefix||typeof b.prefix=="object","options.prefix must be of type object");let M=Object.assign({},_.defaults,b);delete M.prefix;let O=M.separator,k=_.context(x,O,b.prefix);if(M.type=k.type,x=k.key,M.type==="value")if(k.root&&(p(!O||x[0]!==O,"Cannot specify relative path with root prefix"),M.ancestor="root",x||(x=null)),O&&O===x)x=null,M.ancestor=0;else if(M.ancestor!==void 0)p(!O||!x||x[0]!==O,"Cannot combine prefix with ancestor option");else{let[R,I]=_.ancestor(x,O);I&&(x=x.slice(I))===""&&(x=null),M.ancestor=R}return M.path=O?x===null?[]:x.split(O):[x],new _.Ref(M)},s.in=function(x){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.create(x,{...b,in:!0})},s.isRef=function(x){return!!x&&!!x[A.symbols.ref]},_.Ref=class{constructor(x){p(typeof x=="object","Invalid reference construction"),A.assertOptions(x,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),p([!1,void 0].includes(x.separator)||typeof x.separator=="string"&&x.separator.length===1,"Invalid separator"),p(!x.adjust||typeof x.adjust=="function","options.adjust must be a function"),p(!x.map||Array.isArray(x.map),"options.map must be an array"),p(!x.map||!x.adjust,"Cannot set both map and adjust options"),Object.assign(this,_.defaults,x),p(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(x,b,M,O){let k=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return p(!this.in||k.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(M.context,b,k):this.type==="local"?this._resolve(O,b,k):this.ancestor?this.ancestor==="root"?this._resolve(b.ancestors[b.ancestors.length-1],b,k):(p(this.ancestor<=b.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(b.ancestors[this.ancestor-1],b,k)):this._resolve(x,b,k)}_resolve(x,b,M){let O;if(this.type==="value"&&b.mainstay.shadow&&M.shadow!==!1&&(O=b.mainstay.shadow.get(this.absolute(b))),O===void 0&&(O=S(x,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(O=this.adjust(O)),this.map){let k=this.map.get(O);k!==void 0&&(O=k)}return b.mainstay&&b.mainstay.tracer.resolve(b,this,O),O}toString(){return this.display}absolute(x){return[...x.path.slice(0,-this.ancestor),...this.path]}clone(){return new _.Ref(this)}describe(){let x={path:this.path};this.type!=="value"&&(x.type=this.type),this.separator!=="."&&(x.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(x.ancestor=this.ancestor),this.map&&(x.map=[...this.map]);for(let b of["adjust","iterables","render"])this[b]!==null&&this[b]!==void 0&&(x[b]=this[b]);return this.in!==!1&&(x.in=!0),{ref:x}}updateDisplay(){let x=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${x}`);if(!this.separator)return void(this.display=`ref:${x}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${x}`);if(this.ancestor==="root")return void(this.display=`ref:root:${x}`);if(this.ancestor===1)return void(this.display=`ref:${x||".."}`);let b=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${b}${x||""}`}},_.Ref.prototype[A.symbols.ref]=!0,s.build=function(x){return(x=Object.assign({},_.defaults,x)).type==="value"&&x.ancestor===void 0&&(x.ancestor=1),new _.Ref(x)},_.context=function(x,b){let M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(x=x.trim(),M){let O=M.global===void 0?"$":M.global;if(O!==b&&x.startsWith(O))return{key:x.slice(O.length),type:"global"};let k=M.local===void 0?"#":M.local;if(k!==b&&x.startsWith(k))return{key:x.slice(k.length),type:"local"};let R=M.root===void 0?"/":M.root;if(R!==b&&x.startsWith(R))return{key:x.slice(R.length),type:"value",root:!0}}return{key:x,type:"value"}},_.ancestor=function(x,b){if(!b)return[1,0];if(x[0]!==b)return[1,0];if(x[1]!==b)return[0,1];let M=2;for(;x[M]===b;)++M;return[M-1,M]},s.toSibling=0,s.toParent=1,s.Manager=class{constructor(){this.refs=[]}register(x,b){if(x)if(b=b===void 0?s.toParent:b,Array.isArray(x))for(let M of x)this.register(M,b);else if(A.isSchema(x))for(let M of x._refs.refs)M.ancestor-b>=0&&this.refs.push({ancestor:M.ancestor-b,root:M.root});else s.isRef(x)&&x.type==="value"&&x.ancestor-b>=0&&this.refs.push({ancestor:x.ancestor-b,root:x.root}),v=v||m(3328),v.isTemplate(x)&&this.register(x.refs(),b)}get length(){return this.refs.length}clone(){let x=new s.Manager;return x.refs=w(this.refs),x}reset(){this.refs=[]}roots(){return this.refs.filter(x=>!x.ancestor).map(x=>x.root)}}},3378:(d,s,m)=>{let p=m(5107),w={};w.wrap=p.string().min(1).max(2).allow(!1),s.preferences=p.object({allowUnknown:p.boolean(),abortEarly:p.boolean(),artifacts:p.boolean(),cache:p.boolean(),context:p.object(),convert:p.boolean(),dateFormat:p.valid("date","iso","string","time","utc"),debug:p.boolean(),errors:{escapeHtml:p.boolean(),label:p.valid("path","key",!1),language:[p.string(),p.object().ref()],render:p.boolean(),stack:p.boolean(),wrap:{label:w.wrap,array:w.wrap,string:w.wrap}},externals:p.boolean(),messages:p.object(),noDefaults:p.boolean(),nonEnumerables:p.boolean(),presence:p.valid("required","optional","forbidden"),skipFunctions:p.boolean(),stripUnknown:p.object({arrays:p.boolean(),objects:p.boolean()}).or("arrays","objects").allow(!0,!1),warnings:p.boolean()}).strict(),w.nameRx=/^[a-zA-Z0-9]\w*$/,w.rule=p.object({alias:p.array().items(p.string().pattern(w.nameRx)).single(),args:p.array().items(p.string(),p.object({name:p.string().pattern(w.nameRx).required(),ref:p.boolean(),assert:p.alternatives([p.function(),p.object().schema()]).conditional("ref",{is:!0,then:p.required()}),normalize:p.function(),message:p.string().when("assert",{is:p.function(),then:p.required()})})),convert:p.boolean(),manifest:p.boolean(),method:p.function().allow(!1),multi:p.boolean(),validate:p.function()}),s.extension=p.object({type:p.alternatives([p.string(),p.object().regex()]).required(),args:p.function(),cast:p.object().pattern(w.nameRx,p.object({from:p.function().maxArity(1).required(),to:p.function().minArity(1).maxArity(2).required()})),base:p.object().schema().when("type",{is:p.object().regex(),then:p.forbidden()}),coerce:[p.function().maxArity(3),p.object({method:p.function().maxArity(3).required(),from:p.array().items(p.string()).single()})],flags:p.object().pattern(w.nameRx,p.object({setter:p.string(),default:p.any()})),manifest:{build:p.function().arity(2)},messages:[p.object(),p.string()],modifiers:p.object().pattern(w.nameRx,p.function().minArity(1).maxArity(2)),overrides:p.object().pattern(w.nameRx,p.function()),prepare:p.function().maxArity(3),rebuild:p.function().arity(1),rules:p.object().pattern(w.nameRx,w.rule),terms:p.object().pattern(w.nameRx,p.object({init:p.array().allow(null).required(),manifest:p.object().pattern(/.+/,[p.valid("schema","single"),p.object({mapped:p.object({from:p.string().required(),to:p.string().required()}).required()})])})),validate:p.function().maxArity(3)}).strict(),s.extensions=p.array().items(p.object(),p.function().arity(1)).strict(),w.desc={buffer:p.object({buffer:p.string()}),func:p.object({function:p.function().required(),options:{literal:!0}}),override:p.object({override:!0}),ref:p.object({ref:p.object({type:p.valid("value","global","local"),path:p.array().required(),separator:p.string().length(1).allow(!1),ancestor:p.number().min(0).integer().allow("root"),map:p.array().items(p.array().length(2)).min(1),adjust:p.function(),iterables:p.boolean(),in:p.boolean(),render:p.boolean()}).required()}),regex:p.object({regex:p.string().min(3)}),special:p.object({special:p.valid("deep").required()}),template:p.object({template:p.string().required(),options:p.object()}),value:p.object({value:p.alternatives([p.object(),p.array()]).required()})},w.desc.entity=p.alternatives([p.array().items(p.link("...")),p.boolean(),p.function(),p.number(),p.string(),w.desc.buffer,w.desc.func,w.desc.ref,w.desc.regex,w.desc.special,w.desc.template,w.desc.value,p.link("/")]),w.desc.values=p.array().items(null,p.boolean(),p.function(),p.number().allow(1/0,-1/0),p.string().allow(""),p.symbol(),w.desc.buffer,w.desc.func,w.desc.override,w.desc.ref,w.desc.regex,w.desc.template,w.desc.value),w.desc.messages=p.object().pattern(/.+/,[p.string(),w.desc.template,p.object().pattern(/.+/,[p.string(),w.desc.template])]),s.description=p.object({type:p.string().required(),flags:p.object({cast:p.string(),default:p.any(),description:p.string(),empty:p.link("/"),failover:w.desc.entity,id:p.string(),label:p.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:p.boolean(),unit:p.string()}).unknown(),preferences:{allowUnknown:p.boolean(),abortEarly:p.boolean(),artifacts:p.boolean(),cache:p.boolean(),convert:p.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:p.boolean(),label:["path","key"],language:[p.string(),w.desc.ref],wrap:{label:w.wrap,array:w.wrap}},externals:p.boolean(),messages:w.desc.messages,noDefaults:p.boolean(),nonEnumerables:p.boolean(),presence:["required","optional","forbidden"],skipFunctions:p.boolean(),stripUnknown:p.object({arrays:p.boolean(),objects:p.boolean()}).or("arrays","objects").allow(!0,!1),warnings:p.boolean()},allow:w.desc.values,invalid:w.desc.values,rules:p.array().min(1).items({name:p.string().required(),args:p.object().min(1),keep:p.boolean(),message:[p.string(),w.desc.messages],warn:p.boolean()}),keys:p.object().pattern(/.*/,p.link("/")),link:w.desc.ref}).pattern(/^[a-z]\w*$/,p.any())},493:(d,s,m)=>{let p=m(8571),w=m(9621),S=m(8160),A={value:Symbol("value")};d.exports=A.State=class{constructor(v,_,x){this.path=v,this.ancestors=_,this.mainstay=x.mainstay,this.schemas=x.schemas,this.debug=null}localize(v){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,b=new A.State(v,_,this);return x&&b.schemas&&(b.schemas=[A.schemas(x),...b.schemas]),b}nest(v,_){let x=new A.State(this.path,this.ancestors,this);return x.schemas=x.schemas&&[A.schemas(v),...x.schemas],x.debug=_,x}shadow(v,_){this.mainstay.shadow=this.mainstay.shadow||new A.Shadow,this.mainstay.shadow.set(this.path,v,_)}snapshot(){this.mainstay.shadow&&(this._snapshot=p(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},A.schemas=function(v){return S.isSchema(v)?{schema:v}:v},A.Shadow=class{constructor(){this._values=null}set(v,_,x){if(!v.length||x==="strip"&&typeof v[v.length-1]=="number")return;this._values=this._values||new Map;let b=this._values;for(let M=0;M<v.length;++M){let O=v[M],k=b.get(O);k||(k=new Map,b.set(O,k)),b=k}b[A.value]=_}get(v){let _=this.node(v);if(_)return _[A.value]}node(v){if(this._values)return w(this._values,v,{iterables:!0})}override(v,_){if(!this._values)return;let x=v.slice(0,-1),b=v[v.length-1],M=w(this._values,x,{iterables:!0});_?M.set(b,_):M&&M.delete(b)}}},3328:(d,s,m)=>{let p=m(375),w=m(8571),S=m(5277),A=m(1447),v=m(8160),_=m(6354),x=m(6133),b={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};d.exports=b.Template=class{constructor(M,O){if(p(typeof M=="string","Template source must be a string"),p(!M.includes("\0")&&!M.includes(""),"Template source cannot contain reserved control characters"),this.source=M,this.rendered=M,this._template=null,O){let{functions:k,...R}=O;this._settings=Object.keys(R).length?w(R):void 0,this._functions=k,this._functions&&(p(Object.keys(this._functions).every(I=>typeof I=="string"),"Functions keys must be strings"),p(Object.values(this._functions).every(I=>typeof I=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;let M=b.encode(this.source),O=b.split(M),k=!1,R=[],I=O.shift();I&&R.push(I);for(let L of O){let P=L[0]!=="{",H=P?"}":"}}",W=L.indexOf(H);if(W===-1||L[1]==="{"){R.push(`{${b.decode(L)}`);continue}let q=L.slice(P?0:1,W),$=q[0]===":";$&&(q=q.slice(1));let N=this._ref(b.decode(q),{raw:P,wrapped:$});R.push(N),typeof N!="string"&&(k=!0);let e=L.slice(W+H.length);e&&R.push(b.decode(e))}k?this._template=R:this.rendered=R.join("")}static date(M,O){return b.dateFormat[O.dateFormat].call(M)}describe(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&M.compact)return this.source;let O={template:this.source};return this._settings&&(O.options=this._settings),this._functions&&(O.functions=this._functions),O}static build(M){return new b.Template(M.template,M.options||M.functions?{...M.options,functions:M.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(M){return!!M&&!!M[v.symbols.template]}refs(){if(!this._template)return;let M=[];for(let O of this._template)typeof O!="string"&&M.push(...O.refs);return M}resolve(M,O,k,R){return this._template&&this._template.length===1?this._part(this._template[0],M,O,k,R,{}):this.render(M,O,k,R)}_part(M){for(var O=arguments.length,k=new Array(O>1?O-1:0),R=1;R<O;R++)k[R-1]=arguments[R];return M.ref?M.ref.resolve(...k):M.formula.evaluate(k)}render(M,O,k,R){let I=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;let L=[];for(let P of this._template)if(typeof P=="string")L.push(P);else{let H=this._part(P,M,O,k,R,I),W=b.stringify(H,M,O,k,R,I);if(W!==void 0){let q=P.raw||(I.errors&&I.errors.escapeHtml)===!1?W:S(W);L.push(b.wrap(q,P.wrapped&&k.errors.wrap.label))}}return L.join("")}_ref(M,O){let{raw:k,wrapped:R}=O,I=[],L=H=>{let W=x.create(H,this._settings);return I.push(W),q=>{let $=W.resolve(...q);return $!==void 0?$:null}};try{let H=this._functions?{...b.functions,...this._functions}:b.functions;var P=new A.Parser(M,{reference:L,functions:H,constants:b.constants})}catch(H){throw H.message=`Invalid template variable "${M}" fails due to: ${H.message}`,H}if(P.single){if(P.single.type==="reference"){let H=I[0];return{ref:H,raw:k,refs:I,wrapped:R||H.type==="local"&&H.key==="label"}}return b.stringify(P.single.value)}return{formula:P,raw:k,refs:I}}toString(){return this.source}},b.Template.prototype[v.symbols.template]=!0,b.Template.prototype.isImmutable=!0,b.encode=function(M){return M.replace(/\\(\{+)/g,(O,k)=>b.opens.slice(0,k.length)).replace(/\\(\}+)/g,(O,k)=>b.closes.slice(0,k.length))},b.decode=function(M){return M.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},b.split=function(M){let O=[],k="";for(let R=0;R<M.length;++R){let I=M[R];if(I==="{"){let L="";for(;R+1<M.length&&M[R+1]==="{";)L+="{",++R;O.push(k),k=L}else k+=I}return O.push(k),O},b.wrap=function(M,O){return O?O.length===1?`${O}${M}${O}`:`${O[0]}${M}${O[1]}`:M},b.stringify=function(M,O,k,R,I){let L=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},P=typeof M,H=R&&R.errors&&R.errors.wrap||{},W=!1;if(x.isRef(M)&&M.render&&(W=M.in,M=M.resolve(O,k,R,I,{in:M.in,...L})),M===null)return"null";if(P==="string")return b.wrap(M,L.arrayItems&&H.string);if(P==="number"||P==="function"||P==="symbol")return M.toString();if(P!=="object")return JSON.stringify(M);if(M instanceof Date)return b.Template.date(M,R);if(M instanceof Map){let $=[];for(let[N,e]of M.entries())$.push(`${N.toString()} -> ${e.toString()}`);M=$}if(!Array.isArray(M))return M.toString();let q=[];for(let $ of M)q.push(b.stringify($,O,k,R,I,{arrayItems:!0,...L}));return b.wrap(q.join(", "),!W&&H.array)},b.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},b.functions={if:(M,O,k)=>M?O:k,length:M=>typeof M=="string"?M.length:M&&typeof M=="object"?Array.isArray(M)?M.length:Object.keys(M).length:null,msg(M){let[O,k,R,I,L]=this,P=L.messages;if(!P)return"";let H=_.template(O,P[0],M,k,R)||_.template(O,P[1],M,k,R);return H?H.render(O,k,R,I,L):""},number:M=>typeof M=="number"?M:typeof M=="string"?parseFloat(M):typeof M=="boolean"?M?1:0:M instanceof Date?M.getTime():null}},4946:(d,s,m)=>{let p=m(375),w=m(1687),S=m(8068),A=m(8160),v=m(3292),_=m(6354),x=m(6133),b={};d.exports=S.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:x.toSibling}},args(M){for(var O=arguments.length,k=new Array(O>1?O-1:0),R=1;R<O;R++)k[R-1]=arguments[R];return k.length===1&&Array.isArray(k[0])?M.try(...k[0]):M.try(...k)},validate(M,O){let{schema:k,error:R,state:I,prefs:L}=O;if(k._flags.match){let H=[],W=[];for(let $=0;$<k.$_terms.matches.length;++$){let N=k.$_terms.matches[$],e=I.nest(N.schema,`match.${$}`);e.snapshot();let o=N.schema.$_validate(M,e,L);o.errors?(W.push(o.errors),e.restore()):(H.push(o.value),e.commit())}if(H.length===0)return{errors:R("alternatives.any",{details:W.map($=>_.details($,{override:!1}))})};if(k._flags.match==="one")return H.length===1?{value:H[0]}:{errors:R("alternatives.one")};if(H.length!==k.$_terms.matches.length)return{errors:R("alternatives.all",{details:W.map($=>_.details($,{override:!1}))})};let q=$=>$.$_terms.matches.some(N=>N.schema.type==="object"||N.schema.type==="alternatives"&&q(N.schema));return q(k)?{value:H.reduce(($,N)=>w($,N,{mergeArrays:!1}))}:{value:H[H.length-1]}}let P=[];for(let H=0;H<k.$_terms.matches.length;++H){let W=k.$_terms.matches[H];if(W.schema){let N=I.nest(W.schema,`match.${H}`);N.snapshot();let e=W.schema.$_validate(M,N,L);if(!e.errors)return N.commit(),e;N.restore(),P.push({schema:W.schema,reports:e.errors});continue}let q=W.ref?W.ref.resolve(M,I,L):M,$=W.is?[W]:W.switch;for(let N=0;N<$.length;++N){let e=$[N],{is:o,then:n,otherwise:u}=e,l=`match.${H}${W.switch?"."+N:""}`;if(o.$_match(q,I.nest(o,`${l}.is`),L)){if(n)return n.$_validate(M,I.nest(n,`${l}.then`),L)}else if(u)return u.$_validate(M,I.nest(u,`${l}.otherwise`),L)}}return b.errors(P,O)},rules:{conditional:{method(M,O){p(!this._flags._endedSwitch,"Unreachable condition"),p(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),p(O.break===void 0,"Cannot use break option with alternatives conditional");let k=this.clone(),R=v.when(k,M,O),I=R.is?[R]:R.switch;for(let L of I)if(L.then&&L.otherwise){k.$_setFlag("_endedSwitch",!0,{clone:!1});break}return k.$_terms.matches.push(R),k.$_mutateRebuild()}},match:{method(M){if(p(["any","one","all"].includes(M),"Invalid alternatives match mode",M),M!=="any")for(let O of this.$_terms.matches)p(O.schema,"Cannot combine match mode",M,"with conditional rules");return this.$_setFlag("match",M)}},try:{method(){for(var M=arguments.length,O=new Array(M),k=0;k<M;k++)O[k]=arguments[k];p(O.length,"Missing alternative schemas"),A.verifyFlat(O,"try"),p(!this._flags._endedSwitch,"Unreachable condition");let R=this.clone();for(let I of O)R.$_terms.matches.push({schema:R.$_compile(I)});return R.$_mutateRebuild()}}},overrides:{label(M){return this.$_parent("label",M).$_modify({each:(O,k)=>k.path[0]!=="is"?O.label(M):void 0,ref:!1})}},rebuild(M){M.$_modify({each:O=>{A.isSchema(O)&&O.type==="array"&&M.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(M,O){if(O.matches)for(let k of O.matches){let{schema:R,ref:I,is:L,not:P,then:H,otherwise:W}=k;M=R?M.try(R):I?M.conditional(I,{is:L,then:H,not:P,otherwise:W,switch:k.switch}):M.conditional(L,{then:H,otherwise:W})}return M}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),b.errors=function(M,O){let{error:k,state:R}=O;if(!M.length)return{errors:k("alternatives.any")};if(M.length===1)return{errors:M[0].reports};let I=new Set,L=[];for(let{reports:P,schema:H}of M){if(P.length>1)return b.unmatched(M,k);let W=P[0];if(W instanceof _.Report==0)return b.unmatched(M,k);if(W.state.path.length!==R.path.length){L.push({type:H.type,report:W});continue}if(W.code==="any.only"){for(let N of W.local.valids)I.add(N);continue}let[q,$]=W.code.split(".");$==="base"?I.add(q):L.push({type:H.type,report:W})}return L.length?L.length===1?{errors:L[0].report}:b.unmatched(M,k):{errors:k("alternatives.types",{types:[...I]})}},b.unmatched=function(M,O){let k=[];for(let R of M)k.push(...R.reports);return{errors:O("alternatives.match",_.details(k,{override:!1}))}}},8068:(d,s,m)=>{let p=m(375),w=m(7629),S=m(8160),A=m(6914);d.exports=w.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(v,_){return p(typeof v=="function","Method must be a function"),p(_===void 0||_&&typeof _=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:v,description:_}})},validate(v,_,x){let{method:b}=x;try{return b(v,_)}catch(M){return _.error("any.custom",{error:M})}},args:["method","description"],multi:!0},messages:{method(v){return this.prefs({messages:v})}},shared:{method(v){p(S.isSchema(v)&&v._flags.id,"Schema must be a schema with an id");let _=this.clone();return _.$_terms.shared=_.$_terms.shared||[],_.$_terms.shared.push(v),_.$_mutateRegister(v),_}},warning:{method(v,_){return p(v&&typeof v=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:v,local:_},warn:!0})},validate(v,_,x){let{code:b,local:M}=x;return _.error(b,M)},args:["code","local"],multi:!0}},modifiers:{keep(v){let _=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];v.keep=_},message(v,_){v.message=A.compile(_)},warn(v){let _=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];v.warn=_}},manifest:{build(v,_){for(let x in _){let b=_[x];if(["examples","externals","metas","notes","tags"].includes(x))for(let M of b)v=v[x.slice(0,-1)](M);else if(x!=="alterations")if(x!=="whens"){if(x==="shared")for(let M of b)v=v.shared(M)}else for(let M of b){let{ref:O,is:k,not:R,then:I,otherwise:L,concat:P}=M;v=P?v.concat(P):O?v.when(O,{is:k,not:R,then:I,otherwise:L,switch:M.switch,break:M.break}):v.when(k,{then:I,otherwise:L,break:M.break})}else{let M={};for(let{target:O,adjuster:k}of b)M[O]=k;v=v.alter(M)}}return v}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(d,s,m)=>{let p=m(375),w=m(9474),S=m(9621),A=m(8068),v=m(8160),_=m(3292),x={};d.exports=A.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(b,M){let{schema:O,state:k,prefs:R}=M;if(!Array.isArray(b))return;let I=O.$_getRule("sort");return I?x.sort(O,b,I.args.options,k,R):void 0}},validate(b,M){let{schema:O,error:k}=M;if(!Array.isArray(b)){if(O._flags.single){let R=[b];return R[v.symbols.arraySingle]=!0,{value:R}}return{errors:k("array.base")}}if(O.$_getRule("items")||O.$_terms.externals)return{value:b.slice()}},rules:{has:{method(b){b=this.$_compile(b,{appendPath:!0});let M=this.$_addRule({name:"has",args:{schema:b}});return M.$_mutateRegister(b),M},validate(b,M,O){let{state:k,prefs:R,error:I}=M,{schema:L}=O,P=[b,...k.ancestors];for(let W=0;W<b.length;++W){let q=k.localize([...k.path,W],P,L);if(L.$_match(b[W],q,R))return b}let H=L._flags.label;return H?I("array.hasKnown",{patternLabel:H}):I("array.hasUnknown",null)},multi:!0},items:{method(){for(var b=arguments.length,M=new Array(b),O=0;O<b;O++)M[O]=arguments[O];v.verifyFlat(M,"items");let k=this.$_addRule("items");for(let R=0;R<M.length;++R){let I=v.tryWithPath(()=>this.$_compile(M[R]),R,{append:!0});k.$_terms.items.push(I)}return k.$_mutateRebuild()},validate(b,M){let{schema:O,error:k,state:R,prefs:I,errorsArray:L}=M,P=O.$_terms._requireds.slice(),H=O.$_terms.ordered.slice(),W=[...O.$_terms._inclusions,...P],q=!b[v.symbols.arraySingle];delete b[v.symbols.arraySingle];let $=L(),N=b.length;for(let e=0;e<N;++e){let o=b[e],n=!1,u=!1,l=q?e:new Number(e),g=[...R.path,l];if(!O._flags.sparse&&o===void 0){if($.push(k("array.sparse",{key:l,path:g,pos:e,value:void 0},R.localize(g))),I.abortEarly)return $;H.shift();continue}let y=[b,...R.ancestors];for(let E of O.$_terms._exclusions)if(E.$_match(o,R.localize(g,y,E),I,{presence:"ignore"})){if($.push(k("array.excludes",{pos:e,value:o},R.localize(g))),I.abortEarly)return $;n=!0,H.shift();break}if(n)continue;if(O.$_terms.ordered.length){if(H.length){let E=H.shift(),j=E.$_validate(o,R.localize(g,y,E),I);if(j.errors){if($.push(...j.errors),I.abortEarly)return $}else if(E._flags.result==="strip")x.fastSplice(b,e),--e,--N;else{if(!O._flags.sparse&&j.value===void 0){if($.push(k("array.sparse",{key:l,path:g,pos:e,value:void 0},R.localize(g))),I.abortEarly)return $;continue}b[e]=j.value}continue}if(!O.$_terms.items.length){if($.push(k("array.orderedLength",{pos:e,limit:O.$_terms.ordered.length})),I.abortEarly)return $;break}}let c=[],i=P.length;for(let E=0;E<i;++E){let j=R.localize(g,y,P[E]);j.snapshot();let D=P[E].$_validate(o,j,I);if(c[E]=D,!D.errors){if(j.commit(),b[e]=D.value,u=!0,x.fastSplice(P,E),--E,--i,!O._flags.sparse&&D.value===void 0&&($.push(k("array.sparse",{key:l,path:g,pos:e,value:void 0},R.localize(g))),I.abortEarly))return $;break}j.restore()}if(u)continue;let f=I.stripUnknown&&!!I.stripUnknown.arrays||!1;i=W.length;for(let E of W){let j,D=P.indexOf(E);if(D!==-1)j=c[D];else{let V=R.localize(g,y,E);if(V.snapshot(),j=E.$_validate(o,V,I),!j.errors){V.commit(),E._flags.result==="strip"?(x.fastSplice(b,e),--e,--N):O._flags.sparse||j.value!==void 0?b[e]=j.value:($.push(k("array.sparse",{key:l,path:g,pos:e,value:void 0},R.localize(g))),n=!0),u=!0;break}V.restore()}if(i===1){if(f){x.fastSplice(b,e),--e,--N,u=!0;break}if($.push(...j.errors),I.abortEarly)return $;n=!0;break}}if(!n&&(O.$_terms._inclusions.length||O.$_terms._requireds.length)&&!u){if(f){x.fastSplice(b,e),--e,--N;continue}if($.push(k("array.includes",{pos:e,value:o},R.localize(g))),I.abortEarly)return $}}return P.length&&x.fillMissedErrors(O,$,P,b,R,I),H.length&&(x.fillOrderedErrors(O,$,H,b,R,I),$.length||x.fillDefault(H,b,R,I)),$.length?$:b},priority:!0,manifest:!1},length:{method(b){return this.$_addRule({name:"length",args:{limit:b},operator:"="})},validate(b,M,O,k){let{limit:R}=O,{name:I,operator:L,args:P}=k;return v.compare(b.length,R,L)?b:M.error("array."+I,{limit:P.limit,value:b})},args:[{name:"limit",ref:!0,assert:v.limit,message:"must be a positive integer"}]},max:{method(b){return this.$_addRule({name:"max",method:"length",args:{limit:b},operator:"<="})}},min:{method(b){return this.$_addRule({name:"min",method:"length",args:{limit:b},operator:">="})}},ordered:{method(){for(var b=arguments.length,M=new Array(b),O=0;O<b;O++)M[O]=arguments[O];v.verifyFlat(M,"ordered");let k=this.$_addRule("items");for(let R=0;R<M.length;++R){let I=v.tryWithPath(()=>this.$_compile(M[R]),R,{append:!0});x.validateSingle(I,k),k.$_mutateRegister(I),k.$_terms.ordered.push(I)}return k.$_mutateRebuild()}},single:{method(b){let M=b===void 0||!!b;return p(!M||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",M)}},sort:{method(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};v.assertOptions(b,["by","order"]);let M={order:b.order||"ascending"};return b.by&&(M.by=_.ref(b.by,{ancestor:0}),p(!M.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:M}})},validate(b,M,O){let{error:k,state:R,prefs:I,schema:L}=M,{options:P}=O,{value:H,errors:W}=x.sort(L,b,P,R,I);if(W)return W;for(let q=0;q<b.length;++q)if(b[q]!==H[q])return k("array.sort",{order:P.order,by:P.by?P.by.key:"value"});return b},convert:!0},sparse:{method(b){let M=b===void 0||!!b;return this._flags.sparse===M?this:(M?this.clone():this.$_addRule("items")).$_setFlag("sparse",M,{clone:!1})}},unique:{method(b){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};p(!b||typeof b=="function"||typeof b=="string","comparator must be a function or a string"),v.assertOptions(M,["ignoreUndefined","separator"]);let O={name:"unique",args:{options:M,comparator:b}};if(b)if(typeof b=="string"){let k=v.default(M.separator,".");O.path=k?b.split(k):[b]}else O.comparator=b;return this.$_addRule(O)},validate(b,M,O,k){let{state:R,error:I,schema:L}=M,{comparator:P,options:H}=O,{comparator:W,path:q}=k,$={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},N=W||w,e=H.ignoreUndefined;for(let o=0;o<b.length;++o){let n=q?S(b[o],q):b[o],u=W?$.custom:$[typeof n];if(p(u,"Failed to find unique map container for type",typeof n),u instanceof Map){let l=u.entries(),g;for(;!(g=l.next()).done;)if(N(g.value[0],n)){let y=R.localize([...R.path,o],[b,...R.ancestors]),c={pos:o,value:b[o],dupePos:g.value[1],dupeValue:b[g.value[1]]};return q&&(c.path=P),I("array.unique",c,y)}u.set(n,o)}else{if((!e||n!==void 0)&&u[n]!==void 0){let l={pos:o,value:b[o],dupePos:u[n],dupeValue:b[u[n]]};return q&&(l.path=P),I("array.unique",l,R.localize([...R.path,o],[b,...R.ancestors]))}u[n]=o}}return b},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(b,M)=>new Set(b)}},rebuild(b){b.$_terms._inclusions=[],b.$_terms._exclusions=[],b.$_terms._requireds=[];for(let M of b.$_terms.items)x.validateSingle(M,b),M._flags.presence==="required"?b.$_terms._requireds.push(M):M._flags.presence==="forbidden"?b.$_terms._exclusions.push(M):b.$_terms._inclusions.push(M);for(let M of b.$_terms.ordered)x.validateSingle(M,b)},manifest:{build:(b,M)=>(M.items&&(b=b.items(...M.items)),M.ordered&&(b=b.ordered(...M.ordered)),b)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),x.fillMissedErrors=function(b,M,O,k,R,I){let L=[],P=0;for(let H of O){let W=H._flags.label;W?L.push(W):++P}L.length?P?M.push(b.$_createError("array.includesRequiredBoth",k,{knownMisses:L,unknownMisses:P},R,I)):M.push(b.$_createError("array.includesRequiredKnowns",k,{knownMisses:L},R,I)):M.push(b.$_createError("array.includesRequiredUnknowns",k,{unknownMisses:P},R,I))},x.fillOrderedErrors=function(b,M,O,k,R,I){let L=[];for(let P of O)P._flags.presence==="required"&&L.push(P);L.length&&x.fillMissedErrors(b,M,L,k,R,I)},x.fillDefault=function(b,M,O,k){let R=[],I=!0;for(let L=b.length-1;L>=0;--L){let P=b[L],H=[M,...O.ancestors],W=P.$_validate(void 0,O.localize(O.path,H,P),k).value;if(I){if(W===void 0)continue;I=!1}R.unshift(W)}R.length&&M.push(...R)},x.fastSplice=function(b,M){let O=M;for(;O<b.length;)b[O++]=b[O];--b.length},x.validateSingle=function(b,M){(b.type==="array"||b._flags._arrayItems)&&(p(!M._flags.single,"Cannot specify array item with single rule enabled"),M.$_setFlag("_arrayItems",!0,{clone:!1}))},x.sort=function(b,M,O,k,R){let I=O.order==="ascending"?1:-1,L=-1*I,P=I,H=(W,q)=>{let $=x.compare(W,q,L,P);if($!==null||(O.by&&(W=O.by.resolve(W,k,R),q=O.by.resolve(q,k,R)),$=x.compare(W,q,L,P),$!==null))return $;let N=typeof W;if(N!==typeof q)throw b.$_createError("array.sort.mismatching",M,null,k,R);if(N!=="number"&&N!=="string")throw b.$_createError("array.sort.unsupported",M,{type:N},k,R);return N==="number"?(W-q)*I:W<q?L:P};try{return{value:M.slice().sort(H)}}catch(W){return{errors:W}}},x.compare=function(b,M,O,k){return b===M?0:b===void 0?1:M===void 0?-1:b===null?k:M===null?O:null}},4937:(d,s,m)=>{let p=m(375),w=m(8068),S=m(8160),A=m(2036),v={isBool:function(_){return typeof _=="boolean"}};d.exports=w.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(_,x){let{schema:b}=x;if(typeof _!="boolean"){if(typeof _=="string"){let M=b._flags.sensitive?_:_.toLowerCase();_=M==="true"||M!=="false"&&_}return typeof _!="boolean"&&(_=b.$_terms.truthy&&b.$_terms.truthy.has(_,null,null,!b._flags.sensitive)||(!b.$_terms.falsy||!b.$_terms.falsy.has(_,null,null,!b._flags.sensitive))&&_),{value:_}}},validate(_,x){let{error:b}=x;if(typeof _!="boolean")return{value:_,errors:b("boolean.base")}},rules:{truthy:{method(){for(var _=arguments.length,x=new Array(_),b=0;b<_;b++)x[b]=arguments[b];S.verifyFlat(x,"truthy");let M=this.clone();M.$_terms.truthy=M.$_terms.truthy||new A;for(let O=0;O<x.length;++O){let k=x[O];p(k!==void 0,"Cannot call truthy with undefined"),M.$_terms.truthy.add(k)}return M}},falsy:{method(){for(var _=arguments.length,x=new Array(_),b=0;b<_;b++)x[b]=arguments[b];S.verifyFlat(x,"falsy");let M=this.clone();M.$_terms.falsy=M.$_terms.falsy||new A;for(let O=0;O<x.length;++O){let k=x[O];p(k!==void 0,"Cannot call falsy with undefined"),M.$_terms.falsy.add(k)}return M}},sensitive:{method(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",_)}}},cast:{number:{from:v.isBool,to:(_,x)=>_?1:0},string:{from:v.isBool,to:(_,x)=>_?"true":"false"}},manifest:{build:(_,x)=>(x.truthy&&(_=_.truthy(...x.truthy)),x.falsy&&(_=_.falsy(...x.falsy)),_)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(d,s,m)=>{let p=m(375),w=m(8068),S=m(8160),A=m(3328),v={isDate:function(_){return _ instanceof Date}};d.exports=w.extend({type:"date",coerce:{from:["number","string"],method(_,x){let{schema:b}=x;return{value:v.parse(_,b._flags.format)||_}}},validate(_,x){let{schema:b,error:M,prefs:O}=x;if(_ instanceof Date&&!isNaN(_.getTime()))return;let k=b._flags.format;return O.convert&&k&&typeof _=="string"?{value:_,errors:M("date.format",{format:k})}:{value:_,errors:M("date.base")}},rules:{compare:{method:!1,validate(_,x,b,M){let{date:O}=b,{name:k,operator:R,args:I}=M,L=O==="now"?Date.now():O.getTime();return S.compare(_.getTime(),L,R)?_:x.error("date."+k,{limit:I.date,value:_})},args:[{name:"date",ref:!0,normalize:_=>_==="now"?_:v.parse(_),assert:_=>_!==null,message:"must have a valid date format"}]},format:{method(_){return p(["iso","javascript","unix"].includes(_),"Unknown date format",_),this.$_setFlag("format",_)}},greater:{method(_){return this.$_addRule({name:"greater",method:"compare",args:{date:_},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(_){return this.$_addRule({name:"less",method:"compare",args:{date:_},operator:"<"})}},max:{method(_){return this.$_addRule({name:"max",method:"compare",args:{date:_},operator:"<="})}},min:{method(_){return this.$_addRule({name:"min",method:"compare",args:{date:_},operator:">="})}},timestamp:{method(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return p(["javascript","unix"].includes(_),'"type" must be one of "javascript, unix"'),this.format(_)}}},cast:{number:{from:v.isDate,to:(_,x)=>_.getTime()},string:{from:v.isDate,to(_,x){let{prefs:b}=x;return A.date(_,b)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),v.parse=function(_,x){if(_ instanceof Date)return _;if(typeof _!="string"&&(isNaN(_)||!isFinite(_))||/^\s*$/.test(_))return null;if(x==="iso")return S.isIsoDate(_)?v.date(_.toString()):null;let b=_;if(typeof _=="string"&&/^[+-]?\d+(\.\d+)?$/.test(_)&&(_=parseFloat(_)),x){if(x==="javascript")return v.date(1*_);if(x==="unix")return v.date(1e3*_);if(typeof b=="string")return null}return v.date(_)},v.date=function(_){let x=new Date(_);return isNaN(x.getTime())?null:x}},390:(d,s,m)=>{let p=m(375),w=m(7824);d.exports=w.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(S){return p(Number.isSafeInteger(S)&&S>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:S}})},validate(S,A,v){let{n:_}=v;return S.length===_?S:A.error("function.arity",{n:_})}},class:{method(){return this.$_addRule("class")},validate:(S,A)=>/^\s*class\s/.test(S.toString())?S:A.error("function.class",{value:S})},minArity:{method(S){return p(Number.isSafeInteger(S)&&S>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:S}})},validate(S,A,v){let{n:_}=v;return S.length>=_?S:A.error("function.minArity",{n:_})}},maxArity:{method(S){return p(Number.isSafeInteger(S)&&S>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:S}})},validate(S,A,v){let{n:_}=v;return S.length<=_?S:A.error("function.maxArity",{n:_})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(d,s,m)=>{let p=m(978),w=m(375),S=m(8571),A=m(3652),v=m(8068),_=m(8160),x=m(3292),b=m(6354),M=m(6133),O=m(3328),k={renameDefaults:{alias:!1,multiple:!1,override:!1}};d.exports=v.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(R,I)=>R.keys(I),validate(R,I){let{schema:L,error:P,state:H,prefs:W}=I;if(!R||typeof R!==L.$_property("typeof")||Array.isArray(R))return{value:R,errors:P("object.base",{type:L.$_property("typeof")})};if(!(L.$_terms.renames||L.$_terms.dependencies||L.$_terms.keys||L.$_terms.patterns||L.$_terms.externals))return;R=k.clone(R,W);let q=[];if(L.$_terms.renames&&!k.rename(L,R,H,W,q))return{value:R,errors:q};if(!L.$_terms.keys&&!L.$_terms.patterns&&!L.$_terms.dependencies)return{value:R,errors:q};let $=new Set(Object.keys(R));if(L.$_terms.keys){let N=[R,...H.ancestors];for(let e of L.$_terms.keys){let o=e.key,n=R[o];$.delete(o);let u=H.localize([...H.path,o],N,e),l=e.schema.$_validate(n,u,W);if(l.errors){if(W.abortEarly)return{value:R,errors:l.errors};l.value!==void 0&&(R[o]=l.value),q.push(...l.errors)}else e.schema._flags.result==="strip"||l.value===void 0&&n!==void 0?delete R[o]:l.value!==void 0&&(R[o]=l.value)}}if($.size||L._flags._hasPatternMatch){let N=k.unknown(L,R,$,q,H,W);if(N)return N}if(L.$_terms.dependencies)for(let N of L.$_terms.dependencies){if(N.key!==null&&k.isPresent(N.options)(N.key.resolve(R,H,W,null,{shadow:!1}))===!1)continue;let e=k.dependencies[N.rel](L,N,R,H,W);if(e){let o=L.$_createError(e.code,R,e.context,H,W);if(W.abortEarly)return{value:R,errors:o};q.push(o)}}return{value:R,errors:q}},rules:{and:{method(){for(var R=arguments.length,I=new Array(R),L=0;L<R;L++)I[L]=arguments[L];return _.verifyFlat(I,"and"),k.dependency(this,"and",null,I)}},append:{method(R){return R==null||Object.keys(R).length===0?this:this.keys(R)}},assert:{method(R,I,L){O.isTemplate(R)||(R=x.ref(R)),w(L===void 0||typeof L=="string","Message must be a string"),I=this.$_compile(I,{appendPath:!0});let P=this.$_addRule({name:"assert",args:{subject:R,schema:I,message:L}});return P.$_mutateRegister(R),P.$_mutateRegister(I),P},validate(R,I,L){let{error:P,prefs:H,state:W}=I,{subject:q,schema:$,message:N}=L,e=q.resolve(R,W,H),o=M.isRef(q)?q.absolute(W):[];return $.$_match(e,W.localize(o,[R,...W.ancestors],$),H)?R:P("object.assert",{subject:q,message:N})},args:["subject","schema","message"],multi:!0},instance:{method(R,I){return w(typeof R=="function","constructor must be a function"),I=I||R.name,this.$_addRule({name:"instance",args:{constructor:R,name:I}})},validate(R,I,L){let{constructor:P,name:H}=L;return R instanceof P?R:I.error("object.instance",{type:H,value:R})},args:["constructor","name"]},keys:{method(R){w(R===void 0||typeof R=="object","Object schema must be a valid object"),w(!_.isSchema(R),"Object schema cannot be a joi schema");let I=this.clone();if(R)if(Object.keys(R).length){I.$_terms.keys=I.$_terms.keys?I.$_terms.keys.filter(L=>!R.hasOwnProperty(L.key)):new k.Keys;for(let L in R)_.tryWithPath(()=>I.$_terms.keys.push({key:L,schema:this.$_compile(R[L])}),L)}else I.$_terms.keys=new k.Keys;else I.$_terms.keys=null;return I.$_mutateRebuild()}},length:{method(R){return this.$_addRule({name:"length",args:{limit:R},operator:"="})},validate(R,I,L,P){let{limit:H}=L,{name:W,operator:q,args:$}=P;return _.compare(Object.keys(R).length,H,q)?R:I.error("object."+W,{limit:$.limit,value:R})},args:[{name:"limit",ref:!0,assert:_.limit,message:"must be a positive integer"}]},max:{method(R){return this.$_addRule({name:"max",method:"length",args:{limit:R},operator:"<="})}},min:{method(R){return this.$_addRule({name:"min",method:"length",args:{limit:R},operator:">="})}},nand:{method(){for(var R=arguments.length,I=new Array(R),L=0;L<R;L++)I[L]=arguments[L];return _.verifyFlat(I,"nand"),k.dependency(this,"nand",null,I)}},or:{method(){for(var R=arguments.length,I=new Array(R),L=0;L<R;L++)I[L]=arguments[L];return _.verifyFlat(I,"or"),k.dependency(this,"or",null,I)}},oxor:{method(){for(var R=arguments.length,I=new Array(R),L=0;L<R;L++)I[L]=arguments[L];return k.dependency(this,"oxor",null,I)}},pattern:{method(R,I){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=R instanceof RegExp;P||(R=this.$_compile(R,{appendPath:!0})),w(I!==void 0,"Invalid rule"),_.assertOptions(L,["fallthrough","matches"]),P&&w(!R.flags.includes("g")&&!R.flags.includes("y"),"pattern should not use global or sticky mode"),I=this.$_compile(I,{appendPath:!0});let H=this.clone();H.$_terms.patterns=H.$_terms.patterns||[];let W={[P?"regex":"schema"]:R,rule:I};return L.matches&&(W.matches=this.$_compile(L.matches),W.matches.type!=="array"&&(W.matches=W.matches.$_root.array().items(W.matches)),H.$_mutateRegister(W.matches),H.$_setFlag("_hasPatternMatch",!0,{clone:!1})),L.fallthrough&&(W.fallthrough=!0),H.$_terms.patterns.push(W),H.$_mutateRegister(I),H}},ref:{method(){return this.$_addRule("ref")},validate:(R,I)=>M.isRef(R)?R:I.error("object.refType",{value:R})},regex:{method(){return this.$_addRule("regex")},validate:(R,I)=>R instanceof RegExp?R:I.error("object.regex",{value:R})},rename:{method(R,I){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w(typeof R=="string"||R instanceof RegExp,"Rename missing the from argument"),w(typeof I=="string"||I instanceof O,"Invalid rename to argument"),w(I!==R,"Cannot rename key to same name:",R),_.assertOptions(L,["alias","ignoreUndefined","override","multiple"]);let P=this.clone();P.$_terms.renames=P.$_terms.renames||[];for(let H of P.$_terms.renames)w(H.from!==R,"Cannot rename the same key multiple times");return I instanceof O&&P.$_mutateRegister(I),P.$_terms.renames.push({from:R,to:I,options:p(k.renameDefaults,L)}),P}},schema:{method(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:R}})},validate(R,I,L){let{type:P}=L;return!_.isSchema(R)||P!=="any"&&R.type!==P?I.error("object.schema",{type:P}):R}},unknown:{method(R){return this.$_setFlag("unknown",R!==!1)}},with:{method(R,I){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return k.dependency(this,"with",R,I,L)}},without:{method(R,I){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return k.dependency(this,"without",R,I,L)}},xor:{method(){for(var R=arguments.length,I=new Array(R),L=0;L<R;L++)I[L]=arguments[L];return _.verifyFlat(I,"xor"),k.dependency(this,"xor",null,I)}}},overrides:{default(R,I){return R===void 0&&(R=_.symbols.deepDefault),this.$_parent("default",R,I)}},rebuild(R){if(R.$_terms.keys){let I=new A.Sorter;for(let L of R.$_terms.keys)_.tryWithPath(()=>I.add(L,{after:L.schema.$_rootReferences(),group:L.key}),L.key);R.$_terms.keys=new k.Keys(...I.nodes)}},manifest:{build(R,I){if(I.keys&&(R=R.keys(I.keys)),I.dependencies)for(let{rel:L,key:P=null,peers:H,options:W}of I.dependencies)R=k.dependency(R,L,P,H,W);if(I.patterns)for(let{regex:L,schema:P,rule:H,fallthrough:W,matches:q}of I.patterns)R=R.pattern(L||P,H,{fallthrough:W,matches:q});if(I.renames)for(let{from:L,to:P,options:H}of I.renames)R=R.rename(L,P,H);return R}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),k.clone=function(R,I){if(typeof R=="object"){if(I.nonEnumerables)return S(R,{shallow:!0});let P=Object.create(Object.getPrototypeOf(R));return Object.assign(P,R),P}let L=function(){for(var P=arguments.length,H=new Array(P),W=0;W<P;W++)H[W]=arguments[W];return R.apply(this,H)};return L.prototype=S(R.prototype),Object.defineProperty(L,"name",{value:R.name,writable:!1}),Object.defineProperty(L,"length",{value:R.length,writable:!1}),Object.assign(L,R),L},k.dependency=function(R,I,L,P,H){w(L===null||typeof L=="string",I,"key must be a strings"),H||(H=P.length>1&&typeof P[P.length-1]=="object"?P.pop():{}),_.assertOptions(H,["separator","isPresent"]),P=[].concat(P);let W=_.default(H.separator,"."),q=[];for(let N of P)w(typeof N=="string",I,"peers must be strings"),q.push(x.ref(N,{separator:W,ancestor:0,prefix:!1}));L!==null&&(L=x.ref(L,{separator:W,ancestor:0,prefix:!1}));let $=R.clone();return $.$_terms.dependencies=$.$_terms.dependencies||[],$.$_terms.dependencies.push(new k.Dependency(I,L,q,P,H)),$},k.dependencies={and(R,I,L,P,H){let W=[],q=[],$=I.peers.length,N=k.isPresent(I.options);for(let e of I.peers)N(e.resolve(L,P,H,null,{shadow:!1}))===!1?W.push(e.key):q.push(e.key);if(W.length!==$&&q.length!==$)return{code:"object.and",context:{present:q,presentWithLabels:k.keysToLabels(R,q),missing:W,missingWithLabels:k.keysToLabels(R,W)}}},nand(R,I,L,P,H){let W=[],q=k.isPresent(I.options);for(let e of I.peers)q(e.resolve(L,P,H,null,{shadow:!1}))&&W.push(e.key);if(W.length!==I.peers.length)return;let $=I.paths[0],N=I.paths.slice(1);return{code:"object.nand",context:{main:$,mainWithLabel:k.keysToLabels(R,$),peers:N,peersWithLabels:k.keysToLabels(R,N)}}},or(R,I,L,P,H){let W=k.isPresent(I.options);for(let q of I.peers)if(W(q.resolve(L,P,H,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:I.paths,peersWithLabels:k.keysToLabels(R,I.paths)}}},oxor(R,I,L,P,H){let W=[],q=k.isPresent(I.options);for(let N of I.peers)q(N.resolve(L,P,H,null,{shadow:!1}))&&W.push(N.key);if(!W.length||W.length===1)return;let $={peers:I.paths,peersWithLabels:k.keysToLabels(R,I.paths)};return $.present=W,$.presentWithLabels=k.keysToLabels(R,W),{code:"object.oxor",context:$}},with(R,I,L,P,H){let W=k.isPresent(I.options);for(let q of I.peers)if(W(q.resolve(L,P,H,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:I.key.key,mainWithLabel:k.keysToLabels(R,I.key.key),peer:q.key,peerWithLabel:k.keysToLabels(R,q.key)}}},without(R,I,L,P,H){let W=k.isPresent(I.options);for(let q of I.peers)if(W(q.resolve(L,P,H,null,{shadow:!1})))return{code:"object.without",context:{main:I.key.key,mainWithLabel:k.keysToLabels(R,I.key.key),peer:q.key,peerWithLabel:k.keysToLabels(R,q.key)}}},xor(R,I,L,P,H){let W=[],q=k.isPresent(I.options);for(let N of I.peers)q(N.resolve(L,P,H,null,{shadow:!1}))&&W.push(N.key);if(W.length===1)return;let $={peers:I.paths,peersWithLabels:k.keysToLabels(R,I.paths)};return W.length===0?{code:"object.missing",context:$}:($.present=W,$.presentWithLabels=k.keysToLabels(R,W),{code:"object.xor",context:$})}},k.keysToLabels=function(R,I){return Array.isArray(I)?I.map(L=>R.$_mapLabels(L)):R.$_mapLabels(I)},k.isPresent=function(R){return typeof R.isPresent=="function"?R.isPresent:I=>I!==void 0},k.rename=function(R,I,L,P,H){let W={};for(let q of R.$_terms.renames){let $=[],N=typeof q.from!="string";if(N)for(let e in I){if(I[e]===void 0&&q.options.ignoreUndefined||e===q.to)continue;let o=q.from.exec(e);o&&$.push({from:e,to:q.to,match:o})}else!Object.prototype.hasOwnProperty.call(I,q.from)||I[q.from]===void 0&&q.options.ignoreUndefined||$.push(q);for(let e of $){let o=e.from,n=e.to;if(n instanceof O&&(n=n.render(I,L,P,e.match)),o!==n){if(!q.options.multiple&&W[n]&&(H.push(R.$_createError("object.rename.multiple",I,{from:o,to:n,pattern:N},L,P)),P.abortEarly)||Object.prototype.hasOwnProperty.call(I,n)&&!q.options.override&&!W[n]&&(H.push(R.$_createError("object.rename.override",I,{from:o,to:n,pattern:N},L,P)),P.abortEarly))return!1;I[o]===void 0?delete I[n]:I[n]=I[o],W[n]=!0,q.options.alias||delete I[o]}}}return!0},k.unknown=function(R,I,L,P,H,W){if(R.$_terms.patterns){let q=!1,$=R.$_terms.patterns.map(e=>{if(e.matches)return q=!0,[]}),N=[I,...H.ancestors];for(let e of L){let o=I[e],n=[...H.path,e];for(let u=0;u<R.$_terms.patterns.length;++u){let l=R.$_terms.patterns[u];if(l.regex){let c=l.regex.test(e);if(H.mainstay.tracer.debug(H,"rule",`pattern.${u}`,c?"pass":"error"),!c)continue}else if(!l.schema.$_match(e,H.nest(l.schema,`pattern.${u}`),W))continue;L.delete(e);let g=H.localize(n,N,{schema:l.rule,key:e}),y=l.rule.$_validate(o,g,W);if(y.errors){if(W.abortEarly)return{value:I,errors:y.errors};P.push(...y.errors)}if(l.matches&&$[u].push(e),I[e]=y.value,!l.fallthrough)break}}if(q)for(let e=0;e<$.length;++e){let o=$[e];if(!o)continue;let n=R.$_terms.patterns[e].matches,u=H.localize(H.path,N,n),l=n.$_validate(o,u,W);if(l.errors){let g=b.details(l.errors,{override:!1});g.matches=o;let y=R.$_createError("object.pattern.match",I,g,H,W);if(W.abortEarly)return{value:I,errors:y};P.push(y)}}}if(L.size&&(R.$_terms.keys||R.$_terms.patterns)){if(W.stripUnknown&&!R._flags.unknown||W.skipFunctions){let q=!(!W.stripUnknown||W.stripUnknown!==!0&&!W.stripUnknown.objects);for(let $ of L)q?(delete I[$],L.delete($)):typeof I[$]=="function"&&L.delete($)}if(!_.default(R._flags.unknown,W.allowUnknown))for(let q of L){let $=H.localize([...H.path,q],[]),N=R.$_createError("object.unknown",I[q],{child:q},$,W,{flags:!1});if(W.abortEarly)return{value:I,errors:N};P.push(N)}}},k.Dependency=class{constructor(R,I,L,P,H){this.rel=R,this.key=I,this.peers=L,this.paths=P,this.options=H}describe(){let R={rel:this.rel,peers:this.paths};return this.key!==null&&(R.key=this.key.key),this.peers[0].separator!=="."&&(R.options={...R.options,separator:this.peers[0].separator}),this.options.isPresent&&(R.options={...R.options,isPresent:this.options.isPresent}),R}},k.Keys=class extends Array{concat(R){let I=this.slice(),L=new Map;for(let P=0;P<I.length;++P)L.set(I[P].key,P);for(let P of R){let H=P.key,W=L.get(H);W!==void 0?I[W]={key:H,schema:I[W].schema.concat(P.schema)}:I.push(P)}return I}}},8785:(d,s,m)=>{let p=m(375),w=m(8068),S=m(8160),A=m(3292),v=m(6354),_={};d.exports=w.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(x,b)=>x.ref(b),validate(x,b){let{schema:M,state:O,prefs:k}=b;p(M.$_terms.link,"Uninitialized link schema");let R=_.generate(M,x,O,k),I=M.$_terms.link[0].ref;return R.$_validate(x,O.nest(R,`link:${I.display}:${R.type}`),k)},generate:(x,b,M,O)=>_.generate(x,b,M,O),rules:{ref:{method(x){p(!this.$_terms.link,"Cannot reinitialize schema"),x=A.ref(x),p(x.type==="value"||x.type==="local","Invalid reference type:",x.type),p(x.type==="local"||x.ancestor==="root"||x.ancestor>0,"Link cannot reference itself");let b=this.clone();return b.$_terms.link=[{ref:x}],b}},relative:{method(){let x=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",x)}}},overrides:{concat(x){p(this.$_terms.link,"Uninitialized link schema"),p(S.isSchema(x),"Invalid schema object"),p(x.type!=="link","Cannot merge type link with another link");let b=this.clone();return b.$_terms.whens||(b.$_terms.whens=[]),b.$_terms.whens.push({concat:x}),b.$_mutateRebuild()}},manifest:{build:(x,b)=>(p(b.link,"Invalid link description missing link"),x.ref(b.link))}}),_.generate=function(x,b,M,O){let k=M.mainstay.links.get(x);if(k)return k._generate(b,M,O).schema;let R=x.$_terms.link[0].ref,{perspective:I,path:L}=_.perspective(R,M);_.assert(I,"which is outside of schema boundaries",R,x,M,O);try{k=L.length?I.$_reach(L):I}catch{_.assert(!1,"to non-existing schema",R,x,M,O)}return _.assert(k.type!=="link","which is another link",R,x,M,O),x._flags.relative||M.mainstay.links.set(x,k),k._generate(b,M,O).schema},_.perspective=function(x,b){if(x.type==="local"){for(let{schema:M,key:O}of b.schemas){if((M._flags.id||O)===x.path[0])return{perspective:M,path:x.path.slice(1)};if(M.$_terms.shared){for(let k of M.$_terms.shared)if(k._flags.id===x.path[0])return{perspective:k,path:x.path.slice(1)}}}return{perspective:null,path:null}}return x.ancestor==="root"?{perspective:b.schemas[b.schemas.length-1].schema,path:x.path}:{perspective:b.schemas[x.ancestor]&&b.schemas[x.ancestor].schema,path:x.path}},_.assert=function(x,b,M,O,k,R){x||p(!1,`"${v.label(O._flags,k,R)}" contains link reference "${M.display}" ${b}`)}},3832:(d,s,m)=>{let p=m(375),w=m(8068),S=m(8160),A={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};d.exports=w.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(v,_){let{schema:x,error:b}=_;if(!v.match(A.numberRx))return;v=v.trim();let M={value:parseFloat(v)};if(M.value===0&&(M.value=0),!x._flags.unsafe)if(v.match(/e/i)){if(A.extractSignificantDigits(v)!==A.extractSignificantDigits(String(M.value)))return M.errors=b("number.unsafe"),M}else{let O=M.value.toString();if(O.match(/e/i))return M;if(O!==A.normalizeDecimal(v))return M.errors=b("number.unsafe"),M}return M}},validate(v,_){let{schema:x,error:b,prefs:M}=_;if(v===1/0||v===-1/0)return{value:v,errors:b("number.infinity")};if(!S.isNumber(v))return{value:v,errors:b("number.base")};let O={value:v};if(M.convert){let k=x.$_getRule("precision");if(k){let R=Math.pow(10,k.args.limit);O.value=Math.round(O.value*R)/R}}return O.value===0&&(O.value=0),!x._flags.unsafe&&(v>Number.MAX_SAFE_INTEGER||v<Number.MIN_SAFE_INTEGER)&&(O.errors=b("number.unsafe")),O},rules:{compare:{method:!1,validate(v,_,x,b){let{limit:M}=x,{name:O,operator:k,args:R}=b;return S.compare(v,M,k)?v:_.error("number."+O,{limit:R.limit,value:v})},args:[{name:"limit",ref:!0,assert:S.isNumber,message:"must be a number"}]},greater:{method(v){return this.$_addRule({name:"greater",method:"compare",args:{limit:v},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(v,_)=>Math.trunc(v)-v==0?v:_.error("number.integer")},less:{method(v){return this.$_addRule({name:"less",method:"compare",args:{limit:v},operator:"<"})}},max:{method(v){return this.$_addRule({name:"max",method:"compare",args:{limit:v},operator:"<="})}},min:{method(v){return this.$_addRule({name:"min",method:"compare",args:{limit:v},operator:">="})}},multiple:{method(v){return this.$_addRule({name:"multiple",args:{base:v}})},validate(v,_,x,b){let{base:M}=x;return v*(1/M)%1==0?v:_.error("number.multiple",{multiple:b.args.base,value:v})},args:[{name:"base",ref:!0,assert:v=>typeof v=="number"&&isFinite(v)&&v>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(v,_)=>Number.isSafeInteger(v)&&v>=0&&v<=65535?v:_.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(v){return p(Number.isSafeInteger(v),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:v}})},validate(v,_,x){let{limit:b}=x,M=v.toString().match(A.precisionRx);return Math.max((M[1]?M[1].length:0)-(M[2]?parseInt(M[2],10):0),0)<=b?v:_.error("number.precision",{limit:b,value:v})},convert:!0},sign:{method(v){return p(["negative","positive"].includes(v),"Invalid sign",v),this.$_addRule({name:"sign",args:{sign:v}})},validate(v,_,x){let{sign:b}=x;return b==="negative"&&v<0||b==="positive"&&v>0?v:_.error(`number.${b}`)}},unsafe:{method(){let v=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return p(typeof v=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",v)}}},cast:{string:{from:v=>typeof v=="number",to:(v,_)=>v.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),A.extractSignificantDigits=function(v){return v.replace(A.exponentialPartRegex,"").replace(A.dotRegex,"").replace(A.trailingZerosRegex,"").replace(A.leadingSignAndZerosRegex,"")},A.normalizeDecimal=function(v){return(v=v.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&v.endsWith("0")&&(v=v.replace(/0+$/,"")),v==="-0"?"0":v}},8966:(d,s,m)=>{let p=m(7824);d.exports=p.extend({type:"object",cast:{map:{from:w=>w&&typeof w=="object",to:(w,S)=>new Map(Object.entries(w))}}})},7417:(d,s,m)=>{let p=m(375),w=m(5380),S=m(1745),A=m(9959),v=m(6064),_=m(9926),x=m(5752),b=m(8068),M=m(8160),O={tlds:_ instanceof Set&&{tlds:{allow:_,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:A.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};d.exports=b.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(k,R){let{schema:I,state:L,prefs:P}=R,H=I.$_getRule("normalize");H&&(k=k.normalize(H.args.form));let W=I.$_getRule("case");W&&(k=W.args.direction==="upper"?k.toLocaleUpperCase():k.toLocaleLowerCase());let q=I.$_getRule("trim");if(q&&q.args.enabled&&(k=k.trim()),I.$_terms.replacements)for(let N of I.$_terms.replacements)k=k.replace(N.pattern,N.replacement);let $=I.$_getRule("hex");if($&&$.args.options.byteAligned&&k.length%2!=0&&(k=`0${k}`),I.$_getRule("isoDate")){let N=O.isoDate(k);N&&(k=N)}if(I._flags.truncate){let N=I.$_getRule("max");if(N){let e=N.args.limit;if(M.isResolvable(e)&&(e=e.resolve(k,L,P),!M.limit(e)))return{value:k,errors:I.$_createError("any.ref",e,{ref:N.args.limit,arg:"limit",reason:"must be a positive integer"},L,P)};k=k.slice(0,e)}}return{value:k}}},validate(k,R){let{schema:I,error:L}=R;if(typeof k!="string")return{value:k,errors:L("string.base")};if(k===""){let P=I.$_getRule("min");return P&&P.args.limit===0?void 0:{value:k,errors:L("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(k,R)=>/^[a-zA-Z0-9]+$/.test(k)?k:R.error("string.alphanum")},base64:{method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M.assertOptions(k,["paddingRequired","urlSafe"]),k={urlSafe:!1,paddingRequired:!0,...k},p(typeof k.paddingRequired=="boolean","paddingRequired must be boolean"),p(typeof k.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:k}})},validate(k,R,I){let{options:L}=I;return O.base64Regex[L.paddingRequired][L.urlSafe].test(k)?k:R.error("string.base64")}},case:{method(k){return p(["lower","upper"].includes(k),"Invalid case:",k),this.$_addRule({name:"case",args:{direction:k}})},validate(k,R,I){let{direction:L}=I;return L==="lower"&&k===k.toLocaleLowerCase()||L==="upper"&&k===k.toLocaleUpperCase()?k:R.error(`string.${L}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(k,R){let I=k.length,L=0,P=1;for(;I--;){let H=k.charAt(I)*P;L+=H-9*(H>9),P^=3}return L>0&&L%10==0?k:R.error("string.creditCard")}},dataUri:{method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M.assertOptions(k,["paddingRequired"]),k={paddingRequired:!0,...k},p(typeof k.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:k}})},validate(k,R,I){let{options:L}=I,P=k.match(O.dataUriRegex);return P&&(!P[2]||P[2]!=="base64"||O.base64Regex[L.paddingRequired].false.test(P[3]))?k:R.error("string.dataUri")}},domain:{method(k){k&&M.assertOptions(k,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);let R=O.addressOptions(k);return this.$_addRule({name:"domain",args:{options:k},address:R})},validate(k,R,I,L){let{address:P}=L;return w.isValid(k,P)?k:R.error("string.domain")}},email:{method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};M.assertOptions(k,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),p(k.multiple===void 0||typeof k.multiple=="boolean","multiple option must be an boolean");let R=O.addressOptions(k),I=new RegExp(`\\s*[${k.separator?v(k.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:k},regex:I,address:R})},validate(k,R,I,L){let{options:P}=I,{regex:H,address:W}=L,q=P.multiple?k.split(H):[k],$=[];for(let N of q)S.isValid(N,W)||$.push(N);return $.length?R.error("string.email",{value:k,invalids:$}):k}},guid:{alias:"uuid",method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};M.assertOptions(k,["version","separator"]);let R="";if(k.version){let P=[].concat(k.version);p(P.length>=1,"version must have at least 1 valid version specified");let H=new Set;for(let W=0;W<P.length;++W){let q=P[W];p(typeof q=="string","version at position "+W+" must be a string");let $=O.guidVersions[q.toLowerCase()];p($,"version at position "+W+" must be one of "+Object.keys(O.guidVersions).join(", ")),p(!H.has($),"version at position "+W+" must not be a duplicate"),R+=$,H.add($)}}p(O.guidSeparators.has(k.separator),'separator must be one of true, false, "-", or ":"');let I=k.separator===void 0?"[:-]?":k.separator===!0?"[:-]":k.separator===!1?"[]?":`\\${k.separator}`,L=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${I})[0-9A-F]{4}\\2?[${R||"0-9A-F"}][0-9A-F]{3}\\2?[${R?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:k},regex:L})},validate(k,R,I,L){let{regex:P}=L,H=P.exec(k);return H?O.guidBrackets[H[1]]!==H[H.length-1]?R.error("string.guid"):k:R.error("string.guid")}},hex:{method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M.assertOptions(k,["byteAligned"]),k={byteAligned:!1,...k},p(typeof k.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:k}})},validate(k,R,I){let{options:L}=I;return O.hexRegex.test(k)?L.byteAligned&&k.length%2!=0?R.error("string.hexAlign"):k:R.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(k,R)=>w.isValid(k,{minDomainSegments:1})||O.ipRegex.test(k)?k:R.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};M.assertOptions(k,["cidr","version"]);let{cidr:R,versions:I,regex:L}=A.regex(k),P=k.version?I:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:R,version:P}},regex:L})},validate(k,R,I,L){let{options:P}=I,{regex:H}=L;return H.test(k)?k:P.version?R.error("string.ipVersion",{value:k,cidr:P.cidr,version:P.version}):R.error("string.ip",{value:k,cidr:P.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(k,R){let{error:I}=R;return O.isoDate(k)?k:I("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(k,R)=>O.isoDurationRegex.test(k)?k:R.error("string.isoDuration")},length:{method(k,R){return O.length(this,"length",k,"=",R)},validate(k,R,I,L){let{limit:P,encoding:H}=I,{name:W,operator:q,args:$}=L,N=!H&&k.length;return M.compare(N,P,q)?k:R.error("string."+W,{limit:$.limit,value:k,encoding:H})},args:[{name:"limit",ref:!0,assert:M.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(k,R){return O.length(this,"max",k,"<=",R)},args:["limit","encoding"]},min:{method(k,R){return O.length(this,"min",k,">=",R)},args:["limit","encoding"]},normalize:{method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return p(O.normalizationForms.includes(k),"normalization form must be one of "+O.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:k}})},validate(k,R,I){let{error:L}=R,{form:P}=I;return k===k.normalize(P)?k:L("string.normalize",{value:k,form:P})},convert:!0},pattern:{alias:"regex",method(k){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};p(k instanceof RegExp,"regex must be a RegExp"),p(!k.flags.includes("g")&&!k.flags.includes("y"),"regex should not use global or sticky mode"),typeof R=="string"&&(R={name:R}),M.assertOptions(R,["invert","name"]);let I=["string.pattern",R.invert?".invert":"",R.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:k,options:R},errorCode:I})},validate(k,R,I,L){let{regex:P,options:H}=I,{errorCode:W}=L;return P.test(k)^H.invert?k:R.error(W,{name:H.name,regex:P,value:k})},args:["regex","options"],multi:!0},replace:{method(k,R){typeof k=="string"&&(k=new RegExp(v(k),"g")),p(k instanceof RegExp,"pattern must be a RegExp"),p(typeof R=="string","replacement must be a String");let I=this.clone();return I.$_terms.replacements||(I.$_terms.replacements=[]),I.$_terms.replacements.push({pattern:k,replacement:R}),I}},token:{method(){return this.$_addRule("token")},validate:(k,R)=>/^\w+$/.test(k)?k:R.error("string.token")},trim:{method(){let k=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return p(typeof k=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:k}})},validate(k,R,I){let{enabled:L}=I;return L&&k!==k.trim()?R.error("string.trim"):k},convert:!0},truncate:{method(){let k=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return p(typeof k=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",k)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};M.assertOptions(k,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),k.domain&&M.assertOptions(k.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);let{regex:R,scheme:I}=x.regex(k),L=k.domain?O.addressOptions(k.domain):null;return this.$_addRule({name:"uri",args:{options:k},regex:R,domain:L,scheme:I})},validate(k,R,I,L){let{options:P}=I,{regex:H,domain:W,scheme:q}=L;if(["http:/","https:/"].includes(k))return R.error("string.uri");let $=H.exec(k);if($){let N=$[1]||$[2];return!W||P.allowRelative&&!N||w.isValid(N,W)?k:R.error("string.domain",{value:N})}return P.relativeOnly?R.error("string.uriRelativeOnly"):P.scheme?R.error("string.uriCustomScheme",{scheme:q,value:k}):R.error("string.uri")}}},manifest:{build(k,R){if(R.replacements)for(let{pattern:I,replacement:L}of R.replacements)k=k.replace(I,L);return k}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),O.addressOptions=function(k){if(!k||(p(k.minDomainSegments===void 0||Number.isSafeInteger(k.minDomainSegments)&&k.minDomainSegments>0,"minDomainSegments must be a positive integer"),p(k.maxDomainSegments===void 0||Number.isSafeInteger(k.maxDomainSegments)&&k.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),k.tlds===!1))return k;if(k.tlds===!0||k.tlds===void 0)return p(O.tlds,"Built-in TLD list disabled"),Object.assign({},k,O.tlds);p(typeof k.tlds=="object","tlds must be true, false, or an object");let R=k.tlds.deny;if(R)return Array.isArray(R)&&(k=Object.assign({},k,{tlds:{deny:new Set(R)}})),p(k.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),p(!k.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),O.validateTlds(k.tlds.deny,"tlds.deny"),k;let I=k.tlds.allow;return I?I===!0?(p(O.tlds,"Built-in TLD list disabled"),Object.assign({},k,O.tlds)):(Array.isArray(I)&&(k=Object.assign({},k,{tlds:{allow:new Set(I)}})),p(k.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),O.validateTlds(k.tlds.allow,"tlds.allow"),k):k},O.validateTlds=function(k,R){for(let I of k)p(w.isValid(I,{minDomainSegments:1,maxDomainSegments:1}),`${R} must contain valid top level domain names`)},O.isoDate=function(k){if(!M.isIsoDate(k))return null;/.*T.*[+-]\d\d$/.test(k)&&(k+="00");let R=new Date(k);return isNaN(R.getTime())?null:R.toISOString()},O.length=function(k,R,I,L,P){return p(!P||!1,"Invalid encoding:",P),k.$_addRule({name:R,method:"length",args:{limit:I,encoding:P},operator:L})}},8826:(d,s,m)=>{let p=m(375),w=m(8068),S={};S.Map=class extends Map{slice(){return new S.Map(this)}},d.exports=w.extend({type:"symbol",terms:{map:{init:new S.Map}},coerce:{method(A,v){let{schema:_,error:x}=v,b=_.$_terms.map.get(A);return b&&(A=b),_._flags.only&&typeof A!="symbol"?{value:A,errors:x("symbol.map",{map:_.$_terms.map})}:{value:A}}},validate(A,v){let{error:_}=v;if(typeof A!="symbol")return{value:A,errors:_("symbol.base")}},rules:{map:{method(A){A&&!A[Symbol.iterator]&&typeof A=="object"&&(A=Object.entries(A)),p(A&&A[Symbol.iterator],"Iterable must be an iterable or object");let v=this.clone(),_=[];for(let x of A){p(x&&x[Symbol.iterator],"Entry must be an iterable");let[b,M]=x;p(typeof b!="object"&&typeof b!="function"&&typeof b!="symbol","Key must not be of type object, function, or Symbol"),p(typeof M=="symbol","Value must be a Symbol"),v.$_terms.map.set(b,M),_.push(M)}return v.valid(..._)}}},manifest:{build:(A,v)=>(v.map&&(A=A.map(v.map)),A)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(d,s,m)=>{let p=m(375),w=m(8571),S=m(738),A=m(9621),v=m(8160),_=m(6354),x=m(493),b={result:Symbol("result")};s.entry=function(M,O,k){let R=v.defaults;k&&(p(k.warnings===void 0,"Cannot override warnings preference in synchronous validation"),p(k.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),R=v.preferences(v.defaults,k));let I=b.entry(M,O,R);p(!I.mainstay.externals.length,"Schema with external rules must use validateAsync()");let L={value:I.value};return I.error&&(L.error=I.error),I.mainstay.warnings.length&&(L.warning=_.details(I.mainstay.warnings)),I.mainstay.debug&&(L.debug=I.mainstay.debug),I.mainstay.artifacts&&(L.artifacts=I.mainstay.artifacts),L},s.entryAsync=async function(M,O,k){let R=v.defaults;k&&(R=v.preferences(v.defaults,k));let I=b.entry(M,O,R),L=I.mainstay;if(I.error)throw L.debug&&(I.error.debug=L.debug),I.error;if(L.externals.length){let H=I.value,W=[];for(let q of L.externals){let $=q.state.path,N=q.schema.type==="link"?L.links.get(q.schema):null,e,o,n=H,u=$.length?[H]:[],l=$.length?A(M,$):M;if($.length){e=$[$.length-1];let g=H;for(let y of $.slice(0,-1))g=g[y],u.unshift(g);o=u[0],n=o[e]}try{let g=(c,i)=>(N||q.schema).$_createError(c,n,i,q.state,R),y=await q.method(n,{schema:q.schema,linked:N,state:q.state,prefs:k,original:l,error:g,errorsArray:b.errorsArray,warn:(c,i)=>L.warnings.push((N||q.schema).$_createError(c,n,i,q.state,R)),message:(c,i)=>(N||q.schema).$_createError("external",n,i,q.state,R,{messages:c})});if(y===void 0||y===n)continue;if(y instanceof _.Report){if(L.tracer.log(q.schema,q.state,"rule","external","error"),W.push(y),R.abortEarly)break;continue}if(Array.isArray(y)&&y[v.symbols.errors]){if(L.tracer.log(q.schema,q.state,"rule","external","error"),W.push(...y),R.abortEarly)break;continue}o?(L.tracer.value(q.state,"rule",n,y,"external"),o[e]=y):(L.tracer.value(q.state,"rule",H,y,"external"),H=y)}catch(g){throw R.errors.label&&(g.message+=` (${q.label})`),g}}if(I.value=H,W.length)throw I.error=_.process(W,M,R),L.debug&&(I.error.debug=L.debug),I.error}if(!R.warnings&&!R.debug&&!R.artifacts)return I.value;let P={value:I.value};return L.warnings.length&&(P.warning=_.details(L.warnings)),L.debug&&(P.debug=L.debug),L.artifacts&&(P.artifacts=L.artifacts),P},b.Mainstay=class{constructor(M,O,k){this.externals=[],this.warnings=[],this.tracer=M,this.debug=O,this.links=k,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){let M=this._snapshots.pop();this.externals=M.externals,this.warnings=M.warnings}commit(){this._snapshots.pop()}},b.entry=function(M,O,k){let{tracer:R,cleanup:I}=b.tracer(O,k),L=k.debug?[]:null,P=O._ids._schemaChain?new Map:null,H=new b.Mainstay(R,L,P),W=O._ids._schemaChain?[{schema:O}]:null,q=new x([],[],{mainstay:H,schemas:W}),$=s.validate(M,O,q,k);I&&O.$_root.untrace();let N=_.process($.errors,M,k);return{value:$.value,error:N,mainstay:H}},b.tracer=function(M,O){return M.$_root._tracer?{tracer:M.$_root._tracer._register(M)}:O.debug?(p(M.$_root.trace,"Debug mode not supported"),{tracer:M.$_root.trace()._register(M),cleanup:!0}):{tracer:b.ignore}},s.validate=function(M,O,k,R){let I=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(O.$_terms.whens&&(O=O._generate(M,k,R).schema),O._preferences&&(R=b.prefs(O,R)),O._cache&&R.cache){let N=O._cache.get(M);if(k.mainstay.tracer.debug(k,"validate","cached",!!N),N)return N}let L=(N,e,o)=>O.$_createError(N,M,e,o||k,R),P={original:M,prefs:R,schema:O,state:k,error:L,errorsArray:b.errorsArray,warn:(N,e,o)=>k.mainstay.warnings.push(L(N,e,o)),message:(N,e)=>O.$_createError("custom",M,e,k,R,{messages:N})};k.mainstay.tracer.entry(O,k);let H=O._definition;if(H.prepare&&M!==void 0&&R.convert){let N=H.prepare(M,P);if(N){if(k.mainstay.tracer.value(k,"prepare",M,N.value),N.errors)return b.finalize(N.value,[].concat(N.errors),P);M=N.value}}if(H.coerce&&M!==void 0&&R.convert&&(!H.coerce.from||H.coerce.from.includes(typeof M))){let N=H.coerce.method(M,P);if(N){if(k.mainstay.tracer.value(k,"coerced",M,N.value),N.errors)return b.finalize(N.value,[].concat(N.errors),P);M=N.value}}let W=O._flags.empty;W&&W.$_match(b.trim(M,O),k.nest(W),v.defaults)&&(k.mainstay.tracer.value(k,"empty",M,void 0),M=void 0);let q=I.presence||O._flags.presence||(O._flags._endedSwitch?null:R.presence);if(M===void 0){if(q==="forbidden")return b.finalize(M,null,P);if(q==="required")return b.finalize(M,[O.$_createError("any.required",M,null,k,R)],P);if(q==="optional"){if(O._flags.default!==v.symbols.deepDefault)return b.finalize(M,null,P);k.mainstay.tracer.value(k,"default",M,{}),M={}}}else if(q==="forbidden")return b.finalize(M,[O.$_createError("any.unknown",M,null,k,R)],P);let $=[];if(O._valids){let N=O._valids.get(M,k,R,O._flags.insensitive);if(N)return R.convert&&(k.mainstay.tracer.value(k,"valids",M,N.value),M=N.value),k.mainstay.tracer.filter(O,k,"valid",N),b.finalize(M,null,P);if(O._flags.only){let e=O.$_createError("any.only",M,{valids:O._valids.values({display:!0})},k,R);if(R.abortEarly)return b.finalize(M,[e],P);$.push(e)}}if(O._invalids){let N=O._invalids.get(M,k,R,O._flags.insensitive);if(N){k.mainstay.tracer.filter(O,k,"invalid",N);let e=O.$_createError("any.invalid",M,{invalids:O._invalids.values({display:!0})},k,R);if(R.abortEarly)return b.finalize(M,[e],P);$.push(e)}}if(H.validate){let N=H.validate(M,P);if(N&&(k.mainstay.tracer.value(k,"base",M,N.value),M=N.value,N.errors)){if(!Array.isArray(N.errors))return $.push(N.errors),b.finalize(M,$,P);if(N.errors.length)return $.push(...N.errors),b.finalize(M,$,P)}}return O._rules.length?b.rules(M,$,P):b.finalize(M,$,P)},b.rules=function(M,O,k){let{schema:R,state:I,prefs:L}=k;for(let P of R._rules){let H=R._definition.rules[P.method];if(H.convert&&L.convert){I.mainstay.tracer.log(R,I,"rule",P.name,"full");continue}let W,q=P.args;if(P._resolve.length){q=Object.assign({},q);for(let N of P._resolve){let e=H.argsByName.get(N),o=q[N].resolve(M,I,L),n=e.normalize?e.normalize(o):o,u=v.validateArg(n,null,e);if(u){W=R.$_createError("any.ref",o,{arg:N,ref:q[N],reason:u},I,L);break}q[N]=n}}W=W||H.validate(M,k,q,P);let $=b.rule(W,P);if($.errors){if(I.mainstay.tracer.log(R,I,"rule",P.name,"error"),P.warn){I.mainstay.warnings.push(...$.errors);continue}if(L.abortEarly)return b.finalize(M,$.errors,k);O.push(...$.errors)}else I.mainstay.tracer.log(R,I,"rule",P.name,"pass"),I.mainstay.tracer.value(I,"rule",M,$.value,P.name),M=$.value}return b.finalize(M,O,k)},b.rule=function(M,O){return M instanceof _.Report?(b.error(M,O),{errors:[M],value:null}):Array.isArray(M)&&M[v.symbols.errors]?(M.forEach(k=>b.error(k,O)),{errors:M,value:null}):{errors:null,value:M}},b.error=function(M,O){return O.message&&M._setTemplate(O.message),M},b.finalize=function(M,O,k){O=O||[];let{schema:R,state:I,prefs:L}=k;if(O.length){let H=b.default("failover",void 0,O,k);H!==void 0&&(I.mainstay.tracer.value(I,"failover",M,H),M=H,O=[])}if(O.length&&R._flags.error)if(typeof R._flags.error=="function"){O=R._flags.error(O),Array.isArray(O)||(O=[O]);for(let H of O)p(H instanceof Error||H instanceof _.Report,"error() must return an Error object")}else O=[R._flags.error];if(M===void 0){let H=b.default("default",M,O,k);I.mainstay.tracer.value(I,"default",M,H),M=H}if(R._flags.cast&&M!==void 0){let H=R._definition.cast[R._flags.cast];if(H.from(M)){let W=H.to(M,k);I.mainstay.tracer.value(I,"cast",M,W,R._flags.cast),M=W}}if(R.$_terms.externals&&L.externals&&L._externals!==!1)for(let{method:H}of R.$_terms.externals)I.mainstay.externals.push({method:H,schema:R,state:I,label:_.label(R._flags,I,L)});let P={value:M,errors:O.length?O:null};return R._flags.result&&(P.value=R._flags.result==="strip"?void 0:k.original,I.mainstay.tracer.value(I,R._flags.result,M,P.value),I.shadow(M,R._flags.result)),R._cache&&L.cache!==!1&&!R._refs.length&&R._cache.set(k.original,P),M===void 0||P.errors||R._flags.artifact===void 0||(I.mainstay.artifacts=I.mainstay.artifacts||new Map,I.mainstay.artifacts.has(R._flags.artifact)||I.mainstay.artifacts.set(R._flags.artifact,[]),I.mainstay.artifacts.get(R._flags.artifact).push(I.path)),P},b.prefs=function(M,O){let k=O===v.defaults;return k&&M._preferences[v.symbols.prefs]?M._preferences[v.symbols.prefs]:(O=v.preferences(O,M._preferences),k&&(M._preferences[v.symbols.prefs]=O),O)},b.default=function(M,O,k,R){let{schema:I,state:L,prefs:P}=R,H=I._flags[M];if(P.noDefaults||H===void 0)return O;if(L.mainstay.tracer.log(I,L,"rule",M,"full"),!H)return H;if(typeof H=="function"){let W=H.length?[w(L.ancestors[0]),R]:[];try{return H(...W)}catch(q){return void k.push(I.$_createError(`any.${M}`,null,{error:q},L,P))}}return typeof H!="object"?H:H[v.symbols.literal]?H.literal:v.isResolvable(H)?H.resolve(O,L,P):w(H)},b.trim=function(M,O){if(typeof M!="string")return M;let k=O.$_getRule("trim");return k&&k.args.enabled?M.trim():M},b.ignore={active:!1,debug:S,entry:S,filter:S,log:S,resolve:S,value:S},b.errorsArray=function(){let M=[];return M[v.symbols.errors]=!0,M}},2036:(d,s,m)=>{let p=m(375),w=m(9474),S=m(8160),A={};d.exports=A.Values=class{constructor(v,_){this._values=new Set(v),this._refs=new Set(_),this._lowercase=A.lowercases(v),this._override=!1}get length(){return this._values.size+this._refs.size}add(v,_){S.isResolvable(v)?this._refs.has(v)||(this._refs.add(v),_&&_.register(v)):this.has(v,null,null,!1)||(this._values.add(v),typeof v=="string"&&this._lowercase.set(v.toLowerCase(),v))}static merge(v,_,x){if(v=v||new A.Values,_){if(_._override)return _.clone();for(let b of[..._._values,..._._refs])v.add(b)}if(x)for(let b of[...x._values,...x._refs])v.remove(b);return v.length?v:null}remove(v){S.isResolvable(v)?this._refs.delete(v):(this._values.delete(v),typeof v=="string"&&this._lowercase.delete(v.toLowerCase()))}has(v,_,x,b){return!!this.get(v,_,x,b)}get(v,_,x,b){if(!this.length)return!1;if(this._values.has(v))return{value:v};if(typeof v=="string"&&v&&b){let M=this._lowercase.get(v.toLowerCase());if(M)return{value:M}}if(!this._refs.size&&typeof v!="object")return!1;if(typeof v=="object"){for(let M of this._values)if(w(M,v))return{value:M}}if(_)for(let M of this._refs){let O=M.resolve(v,_,x,null,{in:!0});if(O===void 0)continue;let k=M.in&&typeof O=="object"?Array.isArray(O)?O:Object.keys(O):[O];for(let R of k)if(typeof R==typeof v){if(b&&v&&typeof v=="string"){if(R.toLowerCase()===v.toLowerCase())return{value:R,ref:M}}else if(w(R,v))return{value:R,ref:M}}}return!1}override(){this._override=!0}values(v){if(v&&v.display){let _=[];for(let x of[...this._values,...this._refs])x!==void 0&&_.push(x);return _}return Array.from([...this._values,...this._refs])}clone(){let v=new A.Values(this._values,this._refs);return v._override=this._override,v}concat(v){p(!v._override,"Cannot concat override set of values");let _=new A.Values([...this._values,...v._values],[...this._refs,...v._refs]);return _._override=this._override,_}describe(){let v=[];this._override&&v.push({override:!0});for(let _ of this._values.values())v.push(_&&typeof _=="object"?{value:_}:_);for(let _ of this._refs.values())v.push(_.describe());return v}},A.Values.prototype[S.symbols.values]=!0,A.Values.prototype.slice=A.Values.prototype.clone,A.lowercases=function(v){let _=new Map;if(v)for(let x of v)typeof x=="string"&&_.set(x.toLowerCase(),x);return _}},978:(d,s,m)=>{let p=m(375),w=m(8571),S=m(1687),A=m(9621),v={};d.exports=function(_,x){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(p(_&&typeof _=="object","Invalid defaults value: must be an object"),p(!x||x===!0||typeof x=="object","Invalid source value: must be true, falsy or an object"),p(typeof b=="object","Invalid options: must be an object"),!x)return null;if(b.shallow)return v.applyToDefaultsWithShallow(_,x,b);let M=w(_);if(x===!0)return M;let O=b.nullOverride!==void 0&&b.nullOverride;return S(M,x,{nullOverride:O,mergeArrays:!1})},v.applyToDefaultsWithShallow=function(_,x,b){let M=b.shallow;p(Array.isArray(M),"Invalid keys");let O=new Map,k=x===!0?null:new Set;for(let L of M){L=Array.isArray(L)?L:L.split(".");let P=A(_,L);P&&typeof P=="object"?O.set(P,k&&A(x,L)||P):k&&k.add(L)}let R=w(_,{},O);if(!k)return R;for(let L of k)v.reachCopy(R,x,L);let I=b.nullOverride!==void 0&&b.nullOverride;return S(R,x,{nullOverride:I,mergeArrays:!1})},v.reachCopy=function(_,x,b){for(let k of b){if(!(k in x))return;let R=x[k];if(typeof R!="object"||R===null)return;x=R}let M=x,O=_;for(let k=0;k<b.length-1;++k){let R=b[k];typeof O[R]!="object"&&(O[R]={}),O=O[R]}O[b[b.length-1]]=M}},375:(d,s,m)=>{let p=m(7916);d.exports=function(w){if(!w){for(var S=arguments.length,A=new Array(S>1?S-1:0),v=1;v<S;v++)A[v-1]=arguments[v];throw A.length===1&&A[0]instanceof Error?A[0]:new p(A)}}},8571:(d,s,m)=>{let p=m(9621),w=m(4277),S=m(7043),A={needsProtoHack:new Set([w.set,w.map,w.weakSet,w.weakMap])};d.exports=A.clone=function(v){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof v!="object"||v===null)return v;let b=A.clone,M=x;if(_.shallow){if(_.shallow!==!0)return A.cloneWithShallow(v,_);b=I=>I}else if(M){let I=M.get(v);if(I)return I}else M=new Map;let O=w.getInternalProto(v);if(O===w.buffer)return!1;if(O===w.date)return new Date(v.getTime());if(O===w.regex)return new RegExp(v);let k=A.base(v,O,_);if(k===v)return v;if(M&&M.set(v,k),O===w.set)for(let I of v)k.add(b(I,_,M));else if(O===w.map)for(let[I,L]of v)k.set(I,b(L,_,M));let R=S.keys(v,_);for(let I of R){if(I==="__proto__")continue;if(O===w.array&&I==="length"){k.length=v.length;continue}let L=Object.getOwnPropertyDescriptor(v,I);L?L.get||L.set?Object.defineProperty(k,I,L):L.enumerable?k[I]=b(v[I],_,M):Object.defineProperty(k,I,{enumerable:!1,writable:!0,configurable:!0,value:b(v[I],_,M)}):Object.defineProperty(k,I,{enumerable:!0,writable:!0,configurable:!0,value:b(v[I],_,M)})}return k},A.cloneWithShallow=function(v,_){let x=_.shallow;(_=Object.assign({},_)).shallow=!1;let b=new Map;for(let M of x){let O=p(v,M);typeof O!="object"&&typeof O!="function"||b.set(O,O)}return A.clone(v,_,b)},A.base=function(v,_,x){if(x.prototype===!1)return A.needsProtoHack.has(_)?new _.constructor:_===w.array?[]:{};let b=Object.getPrototypeOf(v);if(b&&b.isImmutable)return v;if(_===w.array){let M=[];return b!==_&&Object.setPrototypeOf(M,b),M}if(A.needsProtoHack.has(_)){let M=new b.constructor;return b!==_&&Object.setPrototypeOf(M,b),M}return Object.create(b)}},9474:(d,s,m)=>{let p=m(4277),w={mismatched:null};d.exports=function(S,A,v){return v=Object.assign({prototype:!0},v),!!w.isDeepEqual(S,A,v,[])},w.isDeepEqual=function(S,A,v,_){if(S===A)return S!==0||1/S==1/A;let x=typeof S;if(x!==typeof A||S===null||A===null)return!1;if(x==="function"){if(!v.deepFunction||S.toString()!==A.toString())return!1}else if(x!=="object")return S!=S&&A!=A;let b=w.getSharedType(S,A,!!v.prototype);switch(b){case p.buffer:return!1;case p.promise:return S===A;case p.regex:return S.toString()===A.toString();case w.mismatched:return!1}for(let M=_.length-1;M>=0;--M)if(_[M].isSame(S,A))return!0;_.push(new w.SeenEntry(S,A));try{return!!w.isDeepEqualObj(b,S,A,v,_)}finally{_.pop()}},w.getSharedType=function(S,A,v){if(v)return Object.getPrototypeOf(S)!==Object.getPrototypeOf(A)?w.mismatched:p.getInternalProto(S);let _=p.getInternalProto(S);return _!==p.getInternalProto(A)?w.mismatched:_},w.valueOf=function(S){let A=S.valueOf;if(A===void 0)return S;try{return A.call(S)}catch(v){return v}},w.hasOwnEnumerableProperty=function(S,A){return Object.prototype.propertyIsEnumerable.call(S,A)},w.isSetSimpleEqual=function(S,A){for(let v of Set.prototype.values.call(S))if(!Set.prototype.has.call(A,v))return!1;return!0},w.isDeepEqualObj=function(S,A,v,_,x){let{isDeepEqual:b,valueOf:M,hasOwnEnumerableProperty:O}=w,{keys:k,getOwnPropertySymbols:R}=Object;if(S===p.array){if(!_.part){if(A.length!==v.length)return!1;for(let W=0;W<A.length;++W)if(!b(A[W],v[W],_,x))return!1;return!0}for(let W of A)for(let q of v)if(b(W,q,_,x))return!0}else if(S===p.set){if(A.size!==v.size)return!1;if(!w.isSetSimpleEqual(A,v)){let W=new Set(Set.prototype.values.call(v));for(let q of Set.prototype.values.call(A)){if(W.delete(q))continue;let $=!1;for(let N of W)if(b(q,N,_,x)){W.delete(N),$=!0;break}if(!$)return!1}}}else if(S===p.map){if(A.size!==v.size)return!1;for(let[W,q]of Map.prototype.entries.call(A))if(q===void 0&&!Map.prototype.has.call(v,W)||!b(q,Map.prototype.get.call(v,W),_,x))return!1}else if(S===p.error&&(A.name!==v.name||A.message!==v.message))return!1;let I=M(A),L=M(v);if((A!==I||v!==L)&&!b(I,L,_,x))return!1;let P=k(A);if(!_.part&&P.length!==k(v).length&&!_.skip)return!1;let H=0;for(let W of P)if(_.skip&&_.skip.includes(W))v[W]===void 0&&++H;else if(!O(v,W)||!b(A[W],v[W],_,x))return!1;if(!_.part&&P.length-H!==k(v).length)return!1;if(_.symbols!==!1){let W=R(A),q=new Set(R(v));for(let $ of W){if(!_.skip||!_.skip.includes($)){if(O(A,$)){if(!O(v,$)||!b(A[$],v[$],_,x))return!1}else if(O(v,$))return!1}q.delete($)}for(let $ of q)if(O(v,$))return!1}return!0},w.SeenEntry=class{constructor(S,A){this.obj=S,this.ref=A}isSame(S,A){return this.obj===S&&this.ref===A}}},7916:(d,s,m)=>{let p=m(8761);d.exports=class extends Error{constructor(w){super(w.filter(S=>S!=="").map(S=>typeof S=="string"?S:S instanceof Error?S.message:p(S)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s.assert)}}},5277:d=>{let s={};d.exports=function(m){if(!m)return"";let p="";for(let w=0;w<m.length;++w){let S=m.charCodeAt(w);s.isSafe(S)?p+=m[w]:p+=s.escapeHtmlChar(S)}return p},s.escapeHtmlChar=function(m){return s.namedHtml.get(m)||(m>=256?"&#"+m+";":`&#x${m.toString(16).padStart(2,"0")};`)},s.isSafe=function(m){return s.safeCharCodes.has(m)},s.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]),s.safeCharCodes=function(){let m=new Set;for(let p=32;p<123;++p)(p>=97||p>=65&&p<=90||p>=48&&p<=57||p===32||p===46||p===44||p===45||p===58||p===95)&&m.add(p);return m}()},6064:d=>{d.exports=function(s){return s.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:d=>{d.exports=function(){}},1687:(d,s,m)=>{let p=m(375),w=m(8571),S=m(7043),A={};d.exports=A.merge=function(v,_,x){if(p(v&&typeof v=="object","Invalid target value: must be an object"),p(_==null||typeof _=="object","Invalid source value: must be null, undefined, or an object"),!_)return v;if(x=Object.assign({nullOverride:!0,mergeArrays:!0},x),Array.isArray(_)){p(Array.isArray(v),"Cannot merge array onto an object"),x.mergeArrays||(v.length=0);for(let M=0;M<_.length;++M)v.push(w(_[M],{symbols:x.symbols}));return v}let b=S.keys(_,x);for(let M=0;M<b.length;++M){let O=b[M];if(O==="__proto__"||!Object.prototype.propertyIsEnumerable.call(_,O))continue;let k=_[O];if(k&&typeof k=="object"){if(v[O]===k)continue;!v[O]||typeof v[O]!="object"||Array.isArray(v[O])!==Array.isArray(k)||k instanceof Date||k instanceof RegExp?v[O]=w(k,{symbols:x.symbols}):A.merge(v[O],k,x)}else(k!=null||x.nullOverride)&&(v[O]=k)}return v}},9621:(d,s,m)=>{let p=m(375),w={};d.exports=function(S,A,v){if(A===!1||A==null)return S;typeof(v=v||{})=="string"&&(v={separator:v});let _=Array.isArray(A);p(!_||!v.separator,"Separator option is not valid for array-based chain");let x=_?A:A.split(v.separator||"."),b=S;for(let M=0;M<x.length;++M){let O=x[M],k=v.iterables&&w.iterables(b);if(Array.isArray(b)||k==="set"){let R=Number(O);Number.isInteger(R)&&(O=R<0?b.length+R:R)}if(!b||typeof b=="function"&&v.functions===!1||!k&&b[O]===void 0){p(!v.strict||M+1===x.length,"Missing segment",O,"in reach path ",A),p(typeof b=="object"||v.functions===!0||typeof b!="function","Invalid segment",O,"in reach path ",A),b=v.default;break}b=k?k==="set"?[...b][O]:b.get(O):b[O]}return b},w.iterables=function(S){return S instanceof Set?"set":S instanceof Map?"map":void 0}},8761:d=>{d.exports=function(){try{return JSON.stringify(...arguments)}catch(s){return"[Cannot display object: "+s.message+"]"}}},4277:(d,s)=>{let m={};s=d.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},m.typeMap=new Map([["[object Error]",s.error],["[object Map]",s.map],["[object Promise]",s.promise],["[object Set]",s.set],["[object WeakMap]",s.weakMap],["[object WeakSet]",s.weakSet]]),s.getInternalProto=function(p){if(Array.isArray(p))return s.array;if(p instanceof Date)return s.date;if(p instanceof RegExp)return s.regex;if(p instanceof Error)return s.error;let w=Object.prototype.toString.call(p);return m.typeMap.get(w)||s.generic}},7043:(d,s)=>{s.keys=function(m){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(m):Object.getOwnPropertyNames(m)}},3652:(d,s,m)=>{let p=m(375),w={};s.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(S,A){let v=[].concat((A=A||{}).before||[]),_=[].concat(A.after||[]),x=A.group||"?",b=A.sort||0;p(!v.includes(x),`Item cannot come before itself: ${x}`),p(!v.includes("?"),"Item cannot come before unassociated items"),p(!_.includes(x),`Item cannot come after itself: ${x}`),p(!_.includes("?"),"Item cannot come after unassociated items"),Array.isArray(S)||(S=[S]);for(let M of S){let O={seq:this._items.length,sort:b,before:v,after:_,group:x,node:M};this._items.push(O)}if(!A.manual){let M=this._sort();p(M,"item",x!=="?"?`added into group ${x}`:"","created a dependencies error")}return this.nodes}merge(S){Array.isArray(S)||(S=[S]);for(let v of S)if(v)for(let _ of v._items)this._items.push(Object.assign({},_));this._items.sort(w.mergeSort);for(let v=0;v<this._items.length;++v)this._items[v].seq=v;let A=this._sort();return p(A,"merge created a dependencies error"),this.nodes}sort(){let S=this._sort();return p(S,"sort created a dependencies error"),this.nodes}_sort(){let S={},A=Object.create(null),v=Object.create(null);for(let O of this._items){let k=O.seq,R=O.group;v[R]=v[R]||[],v[R].push(k),S[k]=O.before;for(let I of O.after)A[I]=A[I]||[],A[I].push(k)}for(let O in S){let k=[];for(let R in S[O]){let I=S[O][R];v[I]=v[I]||[],k.push(...v[I])}S[O]=k}for(let O in A)if(v[O])for(let k of v[O])S[k].push(...A[O]);let _={};for(let O in S){let k=S[O];for(let R of k)_[R]=_[R]||[],_[R].push(O)}let x={},b=[];for(let O=0;O<this._items.length;++O){let k=O;if(_[O]){k=null;for(let R=0;R<this._items.length;++R){if(x[R]===!0)continue;_[R]||(_[R]=[]);let I=_[R].length,L=0;for(let P=0;P<I;++P)x[_[R][P]]&&++L;if(L===I){k=R;break}}}k!==null&&(x[k]=!0,b.push(k))}if(b.length!==this._items.length)return!1;let M={};for(let O of this._items)M[O.seq]=O;this._items=[],this.nodes=[];for(let O of b){let k=M[O];this.nodes.push(k.node),this._items.push(k)}return!0}},w.mergeSort=(S,A)=>S.sort===A.sort?0:S.sort<A.sort?-1:1},5380:(d,s,m)=>{let p=m(443),w=m(2178),S={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:p.URL||URL};s.analyze=function(A){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return w.code("DOMAIN_NON_EMPTY_STRING");if(typeof A!="string")throw new Error("Invalid input: domain must be a string");if(A.length>256)return w.code("DOMAIN_TOO_LONG");if(S.nonAsciiRx.test(A)){if(v.allowUnicode===!1)return w.code("DOMAIN_INVALID_UNICODE_CHARS");A=A.normalize("NFC")}if(S.domainControlRx.test(A))return w.code("DOMAIN_INVALID_CHARS");A=S.punycode(A),v.allowFullyQualified&&A[A.length-1]==="."&&(A=A.slice(0,-1));let _=v.minDomainSegments||S.minDomainSegments,x=A.split(".");if(x.length<_)return w.code("DOMAIN_SEGMENTS_COUNT");if(v.maxDomainSegments&&x.length>v.maxDomainSegments)return w.code("DOMAIN_SEGMENTS_COUNT_MAX");let b=v.tlds;if(b){let M=x[x.length-1].toLowerCase();if(b.deny&&b.deny.has(M)||b.allow&&!b.allow.has(M))return w.code("DOMAIN_FORBIDDEN_TLDS")}for(let M=0;M<x.length;++M){let O=x[M];if(!O.length)return w.code("DOMAIN_EMPTY_SEGMENT");if(O.length>63)return w.code("DOMAIN_LONG_SEGMENT");if(M<x.length-1){if(!S.domainSegmentRx.test(O))return w.code("DOMAIN_INVALID_CHARS")}else if(!S.tldSegmentRx.test(O))return w.code("DOMAIN_INVALID_TLDS_CHARS")}return null},s.isValid=function(A,v){return!s.analyze(A,v)},S.punycode=function(A){A.includes("%")&&(A=A.replace(/%/g,"%25"));try{return new S.URL(`http://${A}`).host}catch{return A}}},1745:(d,s,m)=>{let p=m(9848),w=m(5380),S=m(2178),A={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(p.TextEncoder||TextEncoder)};s.analyze=function(v,_){return A.email(v,_)},s.isValid=function(v,_){return!A.email(v,_)},A.email=function(v){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof v!="string")throw new Error("Invalid input: email must be a string");if(!v)return S.code("EMPTY_STRING");let x=!A.nonAsciiRx.test(v);if(!x){if(_.allowUnicode===!1)return S.code("FORBIDDEN_UNICODE");v=v.normalize("NFC")}let b=v.split("@");if(b.length!==2)return b.length>2?S.code("MULTIPLE_AT_CHAR"):S.code("MISSING_AT_CHAR");let[M,O]=b;if(!M)return S.code("EMPTY_LOCAL");if(!_.ignoreLength){if(v.length>254)return S.code("ADDRESS_TOO_LONG");if(A.encoder.encode(M).length>64)return S.code("LOCAL_TOO_LONG")}return A.local(M,x)||w.analyze(O,_)},A.local=function(v,_){let x=v.split(".");for(let b of x){if(!b.length)return S.code("EMPTY_LOCAL_SEGMENT");if(_){if(!A.atextRx.test(b))return S.code("INVALID_LOCAL_CHARS")}else for(let M of b){if(A.atextRx.test(M))continue;let O=A.binary(M);if(!A.atomRx.test(O))return S.code("INVALID_LOCAL_CHARS")}}},A.binary=function(v){return Array.from(A.encoder.encode(v)).map(_=>String.fromCharCode(_)).join("")},A.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,A.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(d,s)=>{s.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},s.code=function(m){return{code:m,error:s.codes[m]}}},9959:(d,s,m)=>{let p=m(375),w=m(5752);s.regex=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p(S.cidr===void 0||typeof S.cidr=="string","options.cidr must be a string");let A=S.cidr?S.cidr.toLowerCase():"optional";p(["required","optional","forbidden"].includes(A),"options.cidr must be one of required, optional, forbidden"),p(S.version===void 0||typeof S.version=="string"||Array.isArray(S.version),"options.version must be a string or an array of string");let v=S.version||["ipv4","ipv6","ipvfuture"];Array.isArray(v)||(v=[v]),p(v.length>=1,"options.version must have at least 1 version specified");for(let b=0;b<v.length;++b)p(typeof v[b]=="string","options.version must only contain strings"),v[b]=v[b].toLowerCase(),p(["ipv4","ipv6","ipvfuture"].includes(v[b]),"options.version contains unknown version "+v[b]+" - must be one of ipv4, ipv6, ipvfuture");v=Array.from(new Set(v));let _=`(?:${v.map(b=>{if(A==="forbidden")return w.ip[b];let M=`\\/${b==="ipv4"?w.ip.v4Cidr:w.ip.v6Cidr}`;return A==="required"?`${w.ip[b]}${M}`:`${w.ip[b]}(?:${M})?`}).join("|")})`,x=new RegExp(`^${_}$`);return{cidr:A,versions:v,regex:x,raw:_}}},5752:(d,s,m)=>{let p=m(375),w=m(6064),S={generate:function(){let A={},v="\\dA-Fa-f",_="["+v+"]",x="\\w-\\.~",b="!\\$&'\\(\\)\\*\\+,;=",M="%"+v,O=x+M+b+":@",k="["+O+"]",R="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";A.ipv4address="(?:"+R+"\\.){3}"+R;let I=_+"{1,4}",L="(?:"+I+":"+I+"|"+A.ipv4address+")",P="(?:"+I+":){6}"+L,H="::(?:"+I+":){5}"+L,W="(?:"+I+")?::(?:"+I+":){4}"+L,q="(?:(?:"+I+":){0,1}"+I+")?::(?:"+I+":){3}"+L,$="(?:(?:"+I+":){0,2}"+I+")?::(?:"+I+":){2}"+L,N="(?:(?:"+I+":){0,3}"+I+")?::"+I+":"+L,e="(?:(?:"+I+":){0,4}"+I+")?::"+L,o="(?:(?:"+I+":){0,5}"+I+")?::"+I,n="(?:(?:"+I+":){0,6}"+I+")?::";A.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",A.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",A.ipv6address="(?:"+P+"|"+H+"|"+W+"|"+q+"|"+$+"|"+N+"|"+e+"|"+o+"|"+n+")",A.ipvFuture="v"+_+"+\\.["+x+b+":]+",A.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",A.schemeRegex=new RegExp(A.scheme);let u="["+x+M+b+":]*",l="["+x+M+b+"]{1,255}",g="(?:\\[(?:"+A.ipv6address+"|"+A.ipvFuture+")\\]|"+A.ipv4address+"|"+l+")",y="(?:"+u+"@)?"+g+"(?::\\d*)?",c="(?:"+u+"@)?("+g+")(?::\\d*)?",i=k+"*",f=k+"+",E="(?:\\/"+i+")*",j="\\/(?:"+f+E+")?",D=f+E,V="["+x+M+b+"@]+"+E,Q="(?:\\/\\/\\/"+i+E+")";return A.hierPart="(?:(?:\\/\\/"+y+E+")|"+j+"|"+D+"|"+Q+")",A.hierPartCapture="(?:(?:\\/\\/"+c+E+")|"+j+"|"+D+")",A.relativeRef="(?:(?:\\/\\/"+y+E+")|"+j+"|"+V+"|)",A.relativeRefCapture="(?:(?:\\/\\/"+c+E+")|"+j+"|"+V+"|)",A.query="["+O+"\\/\\?]*(?=#|$)",A.queryWithSquareBrackets="["+O+"\\[\\]\\/\\?]*(?=#|$)",A.fragment="["+O+"\\/\\?]*",A}};S.rfc3986=S.generate(),s.ip={v4Cidr:S.rfc3986.ipv4Cidr,v6Cidr:S.rfc3986.ipv6Cidr,ipv4:S.rfc3986.ipv4address,ipv6:S.rfc3986.ipv6address,ipvfuture:S.rfc3986.ipvFuture},S.createRegex=function(A){let v=S.rfc3986,_="(?:\\?"+(A.allowQuerySquareBrackets?v.queryWithSquareBrackets:v.query)+")?(?:#"+v.fragment+")?",x=A.domain?v.relativeRefCapture:v.relativeRef;if(A.relativeOnly)return S.wrap(x+_);let b="";if(A.scheme){p(A.scheme instanceof RegExp||typeof A.scheme=="string"||Array.isArray(A.scheme),"scheme must be a RegExp, String, or Array");let k=[].concat(A.scheme);p(k.length>=1,"scheme must have at least 1 scheme specified");let R=[];for(let I=0;I<k.length;++I){let L=k[I];p(L instanceof RegExp||typeof L=="string","scheme at position "+I+" must be a RegExp or String"),L instanceof RegExp?R.push(L.source.toString()):(p(v.schemeRegex.test(L),"scheme at position "+I+" must be a valid scheme"),R.push(w(L)))}b=R.join("|")}let M="(?:"+(b?"(?:"+b+")":v.scheme)+":"+(A.domain?v.hierPartCapture:v.hierPart)+")",O=A.allowRelative?"(?:"+M+"|"+x+")":M;return S.wrap(O+_,b)},S.wrap=function(A,v){return{raw:A=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${A}`,regex:new RegExp(`^${A}$`),scheme:v}},S.uriRegex=S.createRegex({}),s.regex=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return A.scheme||A.allowRelative||A.relativeOnly||A.allowQuerySquareBrackets||A.domain?S.createRegex(A):S.uriRegex}},1447:(d,s)=>{let m={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};s.Parser=class{constructor(p){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!w[m.settings]&&w.constants)for(let S in w.constants){let A=w.constants[S];if(A!==null&&!["boolean","number","string"].includes(typeof A))throw new Error(`Formula constant ${S} contains invalid ${typeof A} value type`)}this.settings=w[m.settings]?w:Object.assign({[m.settings]:!0,constants:{},functions:{}},w),this.single=null,this._parts=null,this._parse(p)}_parse(p){let w=[],S="",A=0,v=!1,_=b=>{if(A)throw new Error("Formula missing closing parenthesis");let M=w.length?w[w.length-1]:null;if(v||S||b){if(M&&M.type==="reference"&&b===")")return M.type="function",M.value=this._subFormula(S,M.value),void(S="");if(b===")"){let O=new s.Parser(S,this.settings);w.push({type:"segment",value:O})}else if(v){if(v==="]")return w.push({type:"reference",value:S}),void(S="");w.push({type:"literal",value:S})}else if(m.operatorCharacters.includes(S))M&&M.type==="operator"&&m.operators.includes(M.value+S)?M.value+=S:w.push({type:"operator",value:S});else if(S.match(m.numberRx))w.push({type:"constant",value:parseFloat(S)});else if(this.settings.constants[S]!==void 0)w.push({type:"constant",value:this.settings.constants[S]});else{if(!S.match(m.tokenRx))throw new Error(`Formula contains invalid token: ${S}`);w.push({type:"reference",value:S})}S=""}};for(let b of p)v?b===v?(_(),v=!1):S+=b:A?b==="("?(S+=b,++A):b===")"?(--A,A?S+=b:_(b)):S+=b:b in m.literals?v=m.literals[b]:b==="("?(_(),++A):m.operatorCharacters.includes(b)?(_(),S=b,_()):b!==" "?S+=b:_();_(),w=w.map((b,M)=>b.type!=="operator"||b.value!=="-"||M&&w[M-1].type!=="operator"?b:{type:"operator",value:"n"});let x=!1;for(let b of w){if(b.type==="operator"){if(m.operatorsPrefix.includes(b.value))continue;if(!x)throw new Error("Formula contains an operator in invalid position");if(!m.operators.includes(b.value))throw new Error(`Formula contains an unknown operator ${b.value}`)}else if(x)throw new Error("Formula missing expected operator");x=!x}if(!x)throw new Error("Formula contains invalid trailing operator");w.length===1&&["reference","literal","constant"].includes(w[0].type)&&(this.single={type:w[0].type==="reference"?"reference":"value",value:w[0].value}),this._parts=w.map(b=>{if(b.type==="operator")return m.operatorsPrefix.includes(b.value)?b:b.value;if(b.type!=="reference")return b.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(b.value))throw new Error(`Formula contains invalid reference ${b.value}`);return this.settings.reference?this.settings.reference(b.value):m.reference(b.value)})}_subFormula(p,w){let S=this.settings.functions[w];if(typeof S!="function")throw new Error(`Formula contains unknown function ${w}`);let A=[];if(p){let v="",_=0,x=!1,b=()=>{if(!v)throw new Error(`Formula contains function ${w} with invalid arguments ${p}`);A.push(v),v=""};for(let M=0;M<p.length;++M){let O=p[M];x?(v+=O,O===x&&(x=!1)):O in m.literals&&!_?(v+=O,x=m.literals[O]):O!==","||_?(v+=O,O==="("?++_:O===")"&&--_):b()}b()}return A=A.map(v=>new s.Parser(v,this.settings)),function(v){let _=[];for(let x of A)_.push(x.evaluate(v));return S.call(v,..._)}}evaluate(p){let w=this._parts.slice();for(let S=w.length-2;S>=0;--S){let A=w[S];if(A&&A.type==="operator"){let v=w[S+1];w.splice(S+1,1);let _=m.evaluate(v,p);w[S]=m.single(A.value,_)}}return m.operatorsOrder.forEach(S=>{for(let A=1;A<w.length-1;)if(S.includes(w[A])){let v=w[A],_=m.evaluate(w[A-1],p),x=m.evaluate(w[A+1],p);w.splice(A,2);let b=m.calculate(v,_,x);w[A-1]=b===0?0:b}else A+=2}),m.evaluate(w[0],p)}},s.Parser.prototype[m.symbol]=!0,m.reference=function(p){return function(w){return w&&w[p]!==void 0?w[p]:null}},m.evaluate=function(p,w){return p===null?null:typeof p=="function"?p(w):p[m.symbol]?p.evaluate(w):p},m.single=function(p,w){if(p==="!")return!w;let S=-w;return S===0?0:S},m.calculate=function(p,w,S){if(p==="??")return m.exists(w)?w:S;if(typeof w=="string"||typeof S=="string"){if(p==="+")return(w=m.exists(w)?w:"")+(m.exists(S)?S:"")}else switch(p){case"^":return Math.pow(w,S);case"*":return w*S;case"/":return w/S;case"%":return w%S;case"+":return w+S;case"-":return w-S}switch(p){case"<":return w<S;case"<=":return w<=S;case">":return w>S;case">=":return w>=S;case"==":return w===S;case"!=":return w!==S;case"&&":return w&&S;case"||":return w||S}return null},m.exists=function(p){return p!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:d=>{d.exports=JSON.parse('{"version":"17.11.0"}')}},a={},function d(s){var m=a[s];if(m!==void 0)return m.exports;var p=a[s]={exports:{}};return h[s](p,p.exports,d),p.exports}(5107);var h,a})})(xc);var Xb=xc.exports;let Nt=ke(Xb),Gb=Nt.object({currency:Nt.string().valid(...Object.values(Ln)).default(Ln.PEN).optional().insensitive().error(new Error(`El campo currency debe ser uno de los siguientes valores: ${Object.values(Ln).join(", ")}`)),amount:Nt.alternatives().try(Nt.number().integer().positive().allow(0,null,""),Nt.string().regex(/^\d+(?:\.\d+)?$/)).optional().messages({"number.base":"El monto debe ser un n\xFAmero.","number.integer":"El monto debe ser un n\xFAmero entero.","number.positive":"El monto debe ser un n\xFAmero positivo.","string.pattern.base":"El monto debe ser un valor num\xE9rico sin decimales."}),title:Nt.string().optional(),order:Nt.alternatives().try(Nt.string().empty("").regex(/^(ord_live|ord_test)_.*/).optional(),Nt.alternatives().try(Nt.number().integer().optional(),Nt.string().empty("").regex(/^\d+$/))).optional(),culqiclient:Nt.string().optional(),culqiclientversion:Nt.string().optional(),culqipluginversion:Nt.string().optional(),xculqirsaid:Nt.string().optional(),rsapublickey:Nt.string().optional(),excludencryptoperations:Nt.array().items(Nt.string().valid(...Object.values(pu))).optional().error(new Error(`El campo excludencryptoperations debe contener al menos uno de los valores v\xE1lidos: ${Object.values(pu).join(", ")}`))}).unknown(),Yb=Nt.object({lang:Nt.string().valid(...Object.values(Io)).default(Io.ES).optional().insensitive().error(new Error(`El campo lang debe ser uno de los siguientes valores: ${Object.values(Io).join(", ")}`)),installments:Nt.boolean().default(!1).optional(),modal:Nt.boolean().default(!0).optional(),isCheckout:Nt.boolean().default(!0).optional(),paymentMethods:Nt.object({tarjeta:Nt.boolean().default(!0).optional(),yape:Nt.boolean().default(!0).optional(),billetera:Nt.boolean().default(!0).optional(),bancaMovil:Nt.boolean().default(!0).optional(),agente:Nt.boolean().default(!0).optional(),cuotealo:Nt.boolean().default(!0).optional()}).unknown(),style:Nt.object({logo:Nt.string().empty("").optional(),bannerColor:Nt.string().empty("").default("").optional(),buttonBackground:Nt.string().empty("").default("").optional(),menuColor:Nt.string().empty("").default("").optional(),linksColor:Nt.string().empty("").default("").optional(),buttonText:Nt.string().empty("").default("").optional(),buttonTextColor:Nt.string().empty("").default("").optional(),priceColor:Nt.string().empty("").default("").optional()}).unknown()}).unknown(),t2=Nt.object({email:Nt.string().email({separator:"@",tlds:{allow:!1}}).empty("").messages({"string.email":"El campo email debe ser un correo electr\xF3nico v\xE1lido.","string.empty":"El campo email es obligatorio."})});var Bo,Lo,Uo;class e2{constructor(){se(this,"_isTestEnvironment",!1),se(this,"_isCheckoutEnabled",!1),se(this,"_publickey",null),se(this,"_container",null),se(this,"_settings"),se(this,"_options"),se(this,"_client"),yo(this,Bo,!1),yo(this,Lo,!0),yo(this,Uo,!1),se(this,"paymentOptionsAvailable",null),se(this,"validateConfig",()=>Fi(this,Uo)?Fi(this,Bo)?Fi(this,Lo)?!0:(nr.error("No ha ingresado las opciones o no son v\xE1lidas"),!1):(nr.error("No ha ingresado la configuraci\xF3n o no es v\xE1lida"),!1):(nr.error("No ha ingresado la llave p\xFAblica del comercio o no es v\xE1lida"),!1))}set publicKey(r){r.startsWith(Xs.LIVE)||r.startsWith(Xs.TEST)?(this._isTestEnvironment=r.startsWith(Xs.TEST),this._publickey=r,vo(this,Uo,!0)):(vo(this,Uo,!1),this._postMessageError(Ac.PUBLIC_KEY))}get publicKey(){return wc(this._publickey,!0)}set container(r){this._container=r}get getContainer(){return this._container}_postMessageError(r){window.postMessage({error:r},window.location.origin)}get getSettings(){var r,h;let a={...this._settings};return((r=a.order)!=null&&r.startsWith(du.LIVE)||(h=a.order)!=null&&h.startsWith(du.TEST))&&(a.order=wc(a.order,!0)),a}set setSettings(r){this.validationSettings(r)}settings(r){this.validationSettings(r)}get getOptions(){return this._options}set setOptions(r){this.validationOptions(r)}options(r){this.validationOptions(r)}set client(r){let{error:h}=t2.validate(r);if(h){nr.error(h);return}this._client=r}get client(){return this._client}validationSettings(r){let{error:h}=Gb.validate(r);if(h){nr.error(h),vo(this,Bo,!1);return}this._settings={title:r?.title??this._settings.title,currency:r?.currency??this._settings.currency,amount:r?.amount??this._settings.amount,order:r?.order??this._settings.order,culqiclient:r?.culqiclient??this._settings.culqiclient,culqiclientversion:r?.culqiclientversion??this._settings.culqiclientversion,culqipluginversion:r?.culqipluginversion??this._settings.culqipluginversion,xculqirsaid:r?.xculqirsaid??"",rsapublickey:r?.rsapublickey??"",excludencryptoperations:r?.excludencryptoperations??[""]},vo(this,Bo,!0)}validationOptions(r){var h,a,d,s,m,p,w;let{error:S}=Yb.validate(r);if(S){nr.error(S),vo(this,Lo,!1);return}let{lang:A,installments:v,modal:_,isCheckout:x,paymentMethods:b,style:M}=r??{},O=k=>typeof k>"u";this._options={lang:A??this._options.lang,installments:O(v)?this._options.installments:!!v,modal:O(_)?(h=this._options)==null?void 0:h.modal:!!_,isCheckout:!!x,paymentMethods:{tarjeta:O(b?.tarjeta)?(a=this._options)==null?void 0:a.paymentMethods.tarjeta:!!(b!=null&&b.tarjeta),yape:O(b?.yape)?(d=this._options)==null?void 0:d.paymentMethods.yape:!!(b!=null&&b.yape),billetera:O(b?.billetera)?(s=this._options)==null?void 0:s.paymentMethods.billetera:!!(b!=null&&b.billetera),bancaMovil:O(b?.bancaMovil)?(m=this._options)==null?void 0:m.paymentMethods.bancaMovil:!!(b!=null&&b.bancaMovil),agente:O(b?.agente)?(p=this._options)==null?void 0:p.paymentMethods.agente:!!(b!=null&&b.agente),cuotealo:O(b?.cuotealo)?(w=this._options)==null?void 0:w.paymentMethods.cuotealo:!!(b!=null&&b.cuotealo)},style:{logo:M?.logo??"",bannerColor:M?.bannerColor??"",buttonBackground:M?.buttonBackground??"",menuColor:M?.menuColor??"",linksColor:M?.linksColor??"",buttonText:M?.buttonText??"",buttonTextColor:M?.buttonTextColor??"",priceColor:M?.priceColor??""}},vo(this,Lo,!0)}}Bo=new WeakMap,Lo=new WeakMap,Uo=new WeakMap;let r2=(t,r,h,a)=>{let d=je[h],s=Number(t);if(!d)return{valid:!1};let m=d[r];if(!m)return{valid:!1};let p=s>=m.min&&s<=m.max;return a?{valid:!0,message:void 0}:{valid:p,message:p?void 0:`El monto ingresado debe ser mayor a ${bc(m.min,h)} y menor a ${bc(m.max,h)}`}},Gs=(t,r,h,a)=>{let d=h===pi.CIP?!0:t?.paymentMethods[h],s={available:!1},m=h!==pi.TARJETA;if(m&&!Tb(d))return s.message="El valor ingresado debe ser de tipo booleano",s;if(m&&!cu(r.amount))return s.message="Debe ingresar el monto en el campo 'amount'",s;if(m&&!fu(r.amount))return s.message="Debe ingresar solo n\xFAmeros enteros",s;if(h===pi.YAPE&&r.currency==="USD")return s.message="No se puede usar Yape con d\xF3lares",s;let p=r2(r.amount,h,r.currency,h===pi.TARJETA&&!cu(r.amount));return d?p.valid?(s.available=!0,s.generate=async()=>{await a()}):s.message=p.message:s.message="No habilitado",s},i2=(t,r,h)=>Gs(t,r,pi.TARJETA,h),n2=(t,r,h)=>Gs(t,r,pi.YAPE,h),o2=(t,r,h)=>Gs(t,r,pi.CUOTEALO,h),s2=(t,r,h)=>{var a,d,s;let m={available:!1};return cu(r.order)?(a=t?.paymentMethods)!=null&&a.bancaMovil||(d=t?.paymentMethods)!=null&&d.billetera||(s=t?.paymentMethods)!=null&&s.agente?Gs(t,r,pi.CIP,h):(m.message="Debe habilitar al menos un m\xE9todo de pago: bancaMovil, billetera o agente",m):(m.message="Debe ingresar el order",m)};function kc(t,r){return function(){return t.apply(r,arguments)}}let{toString:a2}=Object.prototype,{getPrototypeOf:mu}=Object,Ys=(t=>r=>{let h=a2.call(r);return t[h]||(t[h]=h.slice(8,-1).toLowerCase())})(Object.create(null)),Jr=t=>(t=t.toLowerCase(),r=>Ys(r)===t),ta=t=>r=>typeof r===t,{isArray:Un}=Array,qo=ta("undefined");function h2(t){return t!==null&&!qo(t)&&t.constructor!==null&&!qo(t.constructor)&&mr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}let Ec=Jr("ArrayBuffer");function u2(t){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(t):r=t&&t.buffer&&Ec(t.buffer),r}let l2=ta("string"),mr=ta("function"),Rc=ta("number"),ea=t=>t!==null&&typeof t=="object",f2=t=>t===!0||t===!1,ra=t=>{if(Ys(t)!=="object")return!1;let r=mu(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},c2=Jr("Date"),d2=Jr("File"),p2=Jr("Blob"),m2=Jr("FileList"),g2=t=>ea(t)&&mr(t.pipe),y2=t=>{let r;return t&&(typeof FormData=="function"&&t instanceof FormData||mr(t.append)&&((r=Ys(t))==="formdata"||r==="object"&&mr(t.toString)&&t.toString()==="[object FormData]"))},v2=Jr("URLSearchParams"),b2=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $o(t,r,{allOwnKeys:h=!1}={}){if(t===null||typeof t>"u")return;let a,d;if(typeof t!="object"&&(t=[t]),Un(t))for(a=0,d=t.length;a<d;a++)r.call(null,t[a],a,t);else{let s=h?Object.getOwnPropertyNames(t):Object.keys(t),m=s.length,p;for(a=0;a<m;a++)p=s[a],r.call(null,t[p],p,t)}}function Oc(t,r){r=r.toLowerCase();let h=Object.keys(t),a=h.length,d;for(;a-- >0;)if(d=h[a],r===d.toLowerCase())return d;return null}let jc=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:bh)(),Cc=t=>!qo(t)&&t!==jc;function gu(){let{caseless:t}=Cc(this)&&this||{},r={},h=(a,d)=>{let s=t&&Oc(r,d)||d;ra(r[s])&&ra(a)?r[s]=gu(r[s],a):ra(a)?r[s]=gu({},a):Un(a)?r[s]=a.slice():r[s]=a};for(let a=0,d=arguments.length;a<d;a++)arguments[a]&&$o(arguments[a],h);return r}let w2=(t,r,h,{allOwnKeys:a}={})=>($o(r,(d,s)=>{h&&mr(d)?t[s]=kc(d,h):t[s]=d},{allOwnKeys:a}),t),M2=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),_2=(t,r,h,a)=>{t.prototype=Object.create(r.prototype,a),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:r.prototype}),h&&Object.assign(t.prototype,h)},S2=(t,r,h,a)=>{let d,s,m,p={};if(r=r||{},t==null)return r;do{for(d=Object.getOwnPropertyNames(t),s=d.length;s-- >0;)m=d[s],(!a||a(m,t,r))&&!p[m]&&(r[m]=t[m],p[m]=!0);t=h!==!1&&mu(t)}while(t&&(!h||h(t,r))&&t!==Object.prototype);return r},A2=(t,r,h)=>{t=String(t),(h===void 0||h>t.length)&&(h=t.length),h-=r.length;let a=t.indexOf(r,h);return a!==-1&&a===h},x2=t=>{if(!t)return null;if(Un(t))return t;let r=t.length;if(!Rc(r))return null;let h=new Array(r);for(;r-- >0;)h[r]=t[r];return h},k2=(t=>r=>t&&r instanceof t)(typeof Uint8Array<"u"&&mu(Uint8Array)),E2=(t,r)=>{let h=(t&&t[Symbol.iterator]).call(t),a;for(;(a=h.next())&&!a.done;){let d=a.value;r.call(t,d[0],d[1])}},R2=(t,r)=>{let h,a=[];for(;(h=t.exec(r))!==null;)a.push(h);return a},O2=Jr("HTMLFormElement"),j2=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,h,a){return h.toUpperCase()+a}),Ic=(({hasOwnProperty:t})=>(r,h)=>t.call(r,h))(Object.prototype),C2=Jr("RegExp"),Bc=(t,r)=>{let h=Object.getOwnPropertyDescriptors(t),a={};$o(h,(d,s)=>{let m;(m=r(d,s,t))!==!1&&(a[s]=m||d)}),Object.defineProperties(t,a)},I2=t=>{Bc(t,(r,h)=>{if(mr(t)&&["arguments","caller","callee"].indexOf(h)!==-1)return!1;let a=t[h];if(mr(a)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+h+"'")})}})},B2=(t,r)=>{let h={},a=d=>{d.forEach(s=>{h[s]=!0})};return Un(t)?a(t):a(String(t).split(r)),h},L2=()=>{},U2=(t,r)=>(t=+t,Number.isFinite(t)?t:r),yu="abcdefghijklmnopqrstuvwxyz",Lc="0123456789",Uc={DIGIT:Lc,ALPHA:yu,ALPHA_DIGIT:yu+yu.toUpperCase()+Lc},q2=(t=16,r=Uc.ALPHA_DIGIT)=>{let h="",{length:a}=r;for(;t--;)h+=r[Math.random()*a|0];return h};function $2(t){return!!(t&&mr(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}let T2=t=>{let r=new Array(10),h=(a,d)=>{if(ea(a)){if(r.indexOf(a)>=0)return;if(!("toJSON"in a)){r[d]=a;let s=Un(a)?[]:{};return $o(a,(m,p)=>{let w=h(m,d+1);!qo(w)&&(s[p]=w)}),r[d]=void 0,s}}return a};return h(t,0)},D2=Jr("AsyncFunction"),P2=t=>t&&(ea(t)||mr(t))&&mr(t.then)&&mr(t.catch),jt={isArray:Un,isArrayBuffer:Ec,isBuffer:h2,isFormData:y2,isArrayBufferView:u2,isString:l2,isNumber:Rc,isBoolean:f2,isObject:ea,isPlainObject:ra,isUndefined:qo,isDate:c2,isFile:d2,isBlob:p2,isRegExp:C2,isFunction:mr,isStream:g2,isURLSearchParams:v2,isTypedArray:k2,isFileList:m2,forEach:$o,merge:gu,extend:w2,trim:b2,stripBOM:M2,inherits:_2,toFlatObject:S2,kindOf:Ys,kindOfTest:Jr,endsWith:A2,toArray:x2,forEachEntry:E2,matchAll:R2,isHTMLForm:O2,hasOwnProperty:Ic,hasOwnProp:Ic,reduceDescriptors:Bc,freezeMethods:I2,toObjectSet:B2,toCamelCase:j2,noop:L2,toFiniteNumber:U2,findKey:Oc,global:jc,isContextDefined:Cc,ALPHABET:Uc,generateString:q2,isSpecCompliantForm:$2,toJSONObject:T2,isAsyncFn:D2,isThenable:P2};function ie(t,r,h,a,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",r&&(this.code=r),h&&(this.config=h),a&&(this.request=a),d&&(this.response=d)}jt.inherits(ie,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:jt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});let qc=ie.prototype,$c={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{$c[t]={value:t}}),Object.defineProperties(ie,$c),Object.defineProperty(qc,"isAxiosError",{value:!0}),ie.from=(t,r,h,a,d,s)=>{let m=Object.create(qc);return jt.toFlatObject(t,m,function(p){return p!==Error.prototype},p=>p!=="isAxiosError"),ie.call(m,t.message,r,h,a,d),m.cause=t,m.name=t.name,s&&Object.assign(m,s),m};let N2=null;function vu(t){return jt.isPlainObject(t)||jt.isArray(t)}function Tc(t){return jt.endsWith(t,"[]")?t.slice(0,-2):t}function Dc(t,r,h){return t?t.concat(r).map(function(a,d){return a=Tc(a),!h&&d?"["+a+"]":a}).join(h?".":""):r}function z2(t){return jt.isArray(t)&&!t.some(vu)}let F2=jt.toFlatObject(jt,{},null,function(t){return/^is[A-Z]/.test(t)});function ia(t,r,h){if(!jt.isObject(t))throw new TypeError("target must be an object");r=r||new FormData,h=jt.toFlatObject(h,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,b){return!jt.isUndefined(b[x])});let a=h.metaTokens,d=h.visitor||S,s=h.dots,m=h.indexes,p=(h.Blob||typeof Blob<"u"&&Blob)&&jt.isSpecCompliantForm(r);if(!jt.isFunction(d))throw new TypeError("visitor must be a function");function w(x){if(x===null)return"";if(jt.isDate(x))return x.toISOString();if(!p&&jt.isBlob(x))throw new ie("Blob is not supported. Use a Buffer instead.");return jt.isArrayBuffer(x)||jt.isTypedArray(x)?p&&typeof Blob=="function"?new Blob([x]):Ut.Buffer.from(x):x}function S(x,b,M){let O=x;if(x&&!M&&typeof x=="object"){if(jt.endsWith(b,"{}"))b=a?b:b.slice(0,-2),x=JSON.stringify(x);else if(jt.isArray(x)&&z2(x)||(jt.isFileList(x)||jt.endsWith(b,"[]"))&&(O=jt.toArray(x)))return b=Tc(b),O.forEach(function(k,R){!(jt.isUndefined(k)||k===null)&&r.append(m===!0?Dc([b],R,s):m===null?b:b+"[]",w(k))}),!1}return vu(x)?!0:(r.append(Dc(M,b,s),w(x)),!1)}let A=[],v=Object.assign(F2,{defaultVisitor:S,convertValue:w,isVisitable:vu});function _(x,b){if(!jt.isUndefined(x)){if(A.indexOf(x)!==-1)throw Error("Circular reference detected in "+b.join("."));A.push(x),jt.forEach(x,function(M,O){(!(jt.isUndefined(M)||M===null)&&d.call(r,M,jt.isString(O)?O.trim():O,b,v))===!0&&_(M,b?b.concat(O):[O])}),A.pop()}}if(!jt.isObject(t))throw new TypeError("data must be an object");return _(t),r}function Pc(t){let r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(h){return r[h]})}function bu(t,r){this._pairs=[],t&&ia(t,this,r)}let Nc=bu.prototype;Nc.append=function(t,r){this._pairs.push([t,r])},Nc.toString=function(t){let r=t?function(h){return t.call(this,h,Pc)}:Pc;return this._pairs.map(function(h){return r(h[0])+"="+r(h[1])},"").join("&")};function V2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zc(t,r,h){if(!r)return t;let a=h&&h.encode||V2,d=h&&h.serialize,s;if(d?s=d(r,h):s=jt.isURLSearchParams(r)?r.toString():new bu(r,h).toString(a),s){let m=t.indexOf("#");m!==-1&&(t=t.slice(0,m)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class H2{constructor(){this.handlers=[]}use(r,h,a){return this.handlers.push({fulfilled:r,rejected:h,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){jt.forEach(this.handlers,function(h){h!==null&&r(h)})}}let Fc=H2,Vc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},W2=typeof URLSearchParams<"u"?URLSearchParams:bu,Z2=typeof FormData<"u"?FormData:null,K2=typeof Blob<"u"?Blob:null,J2={isBrowser:!0,classes:{URLSearchParams:W2,FormData:Z2,Blob:K2},protocols:["http","https","file","blob","url","data"]},Hc=typeof window<"u"&&typeof document<"u",Q2=(t=>Hc&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),X2=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),G2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hc,hasStandardBrowserEnv:Q2,hasStandardBrowserWebWorkerEnv:X2},Symbol.toStringTag,{value:"Module"})),Qr={...G2,...J2};function Y2(t,r){return ia(t,new Qr.classes.URLSearchParams,Object.assign({visitor:function(h,a,d,s){return Qr.isNode&&jt.isBuffer(h)?(this.append(a,h.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},r))}function t6(t){return jt.matchAll(/\w+|\[(\w*)]/g,t).map(r=>r[0]==="[]"?"":r[1]||r[0])}function e6(t){let r={},h=Object.keys(t),a,d=h.length,s;for(a=0;a<d;a++)s=h[a],r[s]=t[s];return r}function Wc(t){function r(h,a,d,s){let m=h[s++],p=Number.isFinite(+m),w=s>=h.length;return m=!m&&jt.isArray(d)?d.length:m,w?(jt.hasOwnProp(d,m)?d[m]=[d[m],a]:d[m]=a,!p):((!d[m]||!jt.isObject(d[m]))&&(d[m]=[]),r(h,a,d[m],s)&&jt.isArray(d[m])&&(d[m]=e6(d[m])),!p)}if(jt.isFormData(t)&&jt.isFunction(t.entries)){let h={};return jt.forEachEntry(t,(a,d)=>{r(t6(a),d,h,0)}),h}return null}function r6(t,r,h){if(jt.isString(t))try{return(r||JSON.parse)(t),jt.trim(t)}catch(a){if(a.name!=="SyntaxError")throw a}return(h||JSON.stringify)(t)}let wu={transitional:Vc,adapter:["xhr","http"],transformRequest:[function(t,r){let h=r.getContentType()||"",a=h.indexOf("application/json")>-1,d=jt.isObject(t);if(d&&jt.isHTMLForm(t)&&(t=new FormData(t)),jt.isFormData(t))return a&&a?JSON.stringify(Wc(t)):t;if(jt.isArrayBuffer(t)||jt.isBuffer(t)||jt.isStream(t)||jt.isFile(t)||jt.isBlob(t))return t;if(jt.isArrayBufferView(t))return t.buffer;if(jt.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(d){if(h.indexOf("application/x-www-form-urlencoded")>-1)return Y2(t,this.formSerializer).toString();if((s=jt.isFileList(t))||h.indexOf("multipart/form-data")>-1){let m=this.env&&this.env.FormData;return ia(s?{"files[]":t}:t,m&&new m,this.formSerializer)}}return d||a?(r.setContentType("application/json",!1),r6(t)):t}],transformResponse:[function(t){let r=this.transitional||wu.transitional,h=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&jt.isString(t)&&(h&&!this.responseType||a)){let d=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(d)throw s.name==="SyntaxError"?ie.from(s,ie.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qr.classes.FormData,Blob:Qr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};jt.forEach(["delete","get","head","post","put","patch"],t=>{wu.headers[t]={}});let Mu=wu,i6=jt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),n6=t=>{let r={},h,a,d;return t&&t.split(`
`).forEach(function(s){d=s.indexOf(":"),h=s.substring(0,d).trim().toLowerCase(),a=s.substring(d+1).trim(),!(!h||r[h]&&i6[h])&&(h==="set-cookie"?r[h]?r[h].push(a):r[h]=[a]:r[h]=r[h]?r[h]+", "+a:a)}),r},Zc=Symbol("internals");function To(t){return t&&String(t).trim().toLowerCase()}function na(t){return t===!1||t==null?t:jt.isArray(t)?t.map(na):String(t)}function o6(t){let r=Object.create(null),h=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,a;for(;a=h.exec(t);)r[a[1]]=a[2];return r}let s6=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function _u(t,r,h,a,d){if(jt.isFunction(a))return a.call(this,r,h);if(d&&(r=h),!!jt.isString(r)){if(jt.isString(a))return r.indexOf(a)!==-1;if(jt.isRegExp(a))return a.test(r)}}function a6(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,h,a)=>h.toUpperCase()+a)}function h6(t,r){let h=jt.toCamelCase(" "+r);["get","set","has"].forEach(a=>{Object.defineProperty(t,a+h,{value:function(d,s,m){return this[a].call(this,r,d,s,m)},configurable:!0})})}class oa{constructor(r){r&&this.set(r)}set(r,h,a){let d=this;function s(p,w,S){let A=To(w);if(!A)throw new Error("header name must be a non-empty string");let v=jt.findKey(d,A);(!v||d[v]===void 0||S===!0||S===void 0&&d[v]!==!1)&&(d[v||w]=na(p))}let m=(p,w)=>jt.forEach(p,(S,A)=>s(S,A,w));return jt.isPlainObject(r)||r instanceof this.constructor?m(r,h):jt.isString(r)&&(r=r.trim())&&!s6(r)?m(n6(r),h):r!=null&&s(h,r,a),this}get(r,h){if(r=To(r),r){let a=jt.findKey(this,r);if(a){let d=this[a];if(!h)return d;if(h===!0)return o6(d);if(jt.isFunction(h))return h.call(this,d,a);if(jt.isRegExp(h))return h.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,h){if(r=To(r),r){let a=jt.findKey(this,r);return!!(a&&this[a]!==void 0&&(!h||_u(this,this[a],a,h)))}return!1}delete(r,h){let a=this,d=!1;function s(m){if(m=To(m),m){let p=jt.findKey(a,m);p&&(!h||_u(a,a[p],p,h))&&(delete a[p],d=!0)}}return jt.isArray(r)?r.forEach(s):s(r),d}clear(r){let h=Object.keys(this),a=h.length,d=!1;for(;a--;){let s=h[a];(!r||_u(this,this[s],s,r,!0))&&(delete this[s],d=!0)}return d}normalize(r){let h=this,a={};return jt.forEach(this,(d,s)=>{let m=jt.findKey(a,s);if(m){h[m]=na(d),delete h[s];return}let p=r?a6(s):String(s).trim();p!==s&&delete h[s],h[p]=na(d),a[p]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){let h=Object.create(null);return jt.forEach(this,(a,d)=>{a!=null&&a!==!1&&(h[d]=r&&jt.isArray(a)?a.join(", "):a)}),h}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,h])=>r+": "+h).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...h){let a=new this(r);return h.forEach(d=>a.set(d)),a}static accessor(r){let h=(this[Zc]=this[Zc]={accessors:{}}).accessors,a=this.prototype;function d(s){let m=To(s);h[m]||(h6(a,s),h[m]=!0)}return jt.isArray(r)?r.forEach(d):d(r),this}}oa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),jt.reduceDescriptors(oa.prototype,({value:t},r)=>{let h=r[0].toUpperCase()+r.slice(1);return{get:()=>t,set(a){this[h]=a}}}),jt.freezeMethods(oa);let mi=oa;function Su(t,r){let h=this||Mu,a=r||h,d=mi.from(a.headers),s=a.data;return jt.forEach(t,function(m){s=m.call(h,s,d.normalize(),r?r.status:void 0)}),d.normalize(),s}function Kc(t){return!!(t&&t.__CANCEL__)}function Do(t,r,h){ie.call(this,t??"canceled",ie.ERR_CANCELED,r,h),this.name="CanceledError"}jt.inherits(Do,ie,{__CANCEL__:!0});function u6(t,r,h){let a=h.config.validateStatus;!h.status||!a||a(h.status)?t(h):r(new ie("Request failed with status code "+h.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(h.status/100)-4],h.config,h.request,h))}let l6=Qr.hasStandardBrowserEnv?{write(t,r,h,a,d,s){let m=[t+"="+encodeURIComponent(r)];jt.isNumber(h)&&m.push("expires="+new Date(h).toGMTString()),jt.isString(a)&&m.push("path="+a),jt.isString(d)&&m.push("domain="+d),s===!0&&m.push("secure"),document.cookie=m.join("; ")},read(t){let r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function f6(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function c6(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}function Jc(t,r){return t&&!f6(r)?c6(t,r):r}let d6=Qr.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),h;function a(d){let s=d;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return h=a(window.location.href),function(d){let s=jt.isString(d)?a(d):d;return s.protocol===h.protocol&&s.host===h.host}}():function(){return function(){return!0}}();function p6(t){let r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}function m6(t,r){t=t||10;let h=new Array(t),a=new Array(t),d=0,s=0,m;return r=r!==void 0?r:1e3,function(p){let w=Date.now(),S=a[s];m||(m=w),h[d]=p,a[d]=w;let A=s,v=0;for(;A!==d;)v+=h[A++],A=A%t;if(d=(d+1)%t,d===s&&(s=(s+1)%t),w-m<r)return;let _=S&&w-S;return _?Math.round(v*1e3/_):void 0}}function Qc(t,r){let h=0,a=m6(50,250);return d=>{let s=d.loaded,m=d.lengthComputable?d.total:void 0,p=s-h,w=a(p),S=s<=m;h=s;let A={loaded:s,total:m,progress:m?s/m:void 0,bytes:p,rate:w||void 0,estimated:w&&m&&S?(m-s)/w:void 0,event:d};A[r?"download":"upload"]=!0,t(A)}}let g6=typeof XMLHttpRequest<"u",y6=g6&&function(t){return new Promise(function(r,h){let a=t.data,d=mi.from(t.headers).normalize(),{responseType:s,withXSRFToken:m}=t,p;function w(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}let S;if(jt.isFormData(a)){if(Qr.hasStandardBrowserEnv||Qr.hasStandardBrowserWebWorkerEnv)d.setContentType(!1);else if((S=d.getContentType())!==!1){let[b,...M]=S?S.split(";").map(O=>O.trim()).filter(Boolean):[];d.setContentType([b||"multipart/form-data",...M].join("; "))}}let A=new XMLHttpRequest;if(t.auth){let b=t.auth.username||"",M=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";d.set("Authorization","Basic "+btoa(b+":"+M))}let v=Jc(t.baseURL,t.url);A.open(t.method.toUpperCase(),zc(v,t.params,t.paramsSerializer),!0),A.timeout=t.timeout;function _(){if(!A)return;let b=mi.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),M={data:!s||s==="text"||s==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:b,config:t,request:A};u6(function(O){r(O),w()},function(O){h(O),w()},M),A=null}if("onloadend"in A?A.onloadend=_:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout(_)},A.onabort=function(){A&&(h(new ie("Request aborted",ie.ECONNABORTED,t,A)),A=null)},A.onerror=function(){h(new ie("Network Error",ie.ERR_NETWORK,t,A)),A=null},A.ontimeout=function(){let b=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",M=t.transitional||Vc;t.timeoutErrorMessage&&(b=t.timeoutErrorMessage),h(new ie(b,M.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,t,A)),A=null},Qr.hasStandardBrowserEnv&&(m&&jt.isFunction(m)&&(m=m(t)),m||m!==!1&&d6(v))){let b=t.xsrfHeaderName&&t.xsrfCookieName&&l6.read(t.xsrfCookieName);b&&d.set(t.xsrfHeaderName,b)}a===void 0&&d.setContentType(null),"setRequestHeader"in A&&jt.forEach(d.toJSON(),function(b,M){A.setRequestHeader(M,b)}),jt.isUndefined(t.withCredentials)||(A.withCredentials=!!t.withCredentials),s&&s!=="json"&&(A.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&A.addEventListener("progress",Qc(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&A.upload&&A.upload.addEventListener("progress",Qc(t.onUploadProgress)),(t.cancelToken||t.signal)&&(p=b=>{A&&(h(!b||b.type?new Do(null,t,A):b),A.abort(),A=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p)));let x=p6(v);if(x&&Qr.protocols.indexOf(x)===-1){h(new ie("Unsupported protocol "+x+":",ie.ERR_BAD_REQUEST,t));return}A.send(a||null)})},Au={http:N2,xhr:y6};jt.forEach(Au,(t,r)=>{if(t){try{Object.defineProperty(t,"name",{value:r})}catch{}Object.defineProperty(t,"adapterName",{value:r})}});let Xc=t=>`- ${t}`,v6=t=>jt.isFunction(t)||t===null||t===!1,Gc={getAdapter:t=>{t=jt.isArray(t)?t:[t];let{length:r}=t,h,a,d={};for(let s=0;s<r;s++){h=t[s];let m;if(a=h,!v6(h)&&(a=Au[(m=String(h)).toLowerCase()],a===void 0))throw new ie(`Unknown adapter '${m}'`);if(a)break;d[m||"#"+s]=a}if(!a){let s=Object.entries(d).map(([p,w])=>`adapter ${p} `+(w===!1?"is not supported by the environment":"is not available in the build")),m=r?s.length>1?`since :
`+s.map(Xc).join(`
`):" "+Xc(s[0]):"as no adapter specified";throw new ie("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return a},adapters:Au};function xu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Do(null,t)}function Yc(t){return xu(t),t.headers=mi.from(t.headers),t.data=Su.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Gc.getAdapter(t.adapter||Mu.adapter)(t).then(function(r){return xu(t),r.data=Su.call(t,t.transformResponse,r),r.headers=mi.from(r.headers),r},function(r){return Kc(r)||(xu(t),r&&r.response&&(r.response.data=Su.call(t,t.transformResponse,r.response),r.response.headers=mi.from(r.response.headers))),Promise.reject(r)})}let td=t=>t instanceof mi?t.toJSON():t;function qn(t,r){r=r||{};let h={};function a(S,A,v){return jt.isPlainObject(S)&&jt.isPlainObject(A)?jt.merge.call({caseless:v},S,A):jt.isPlainObject(A)?jt.merge({},A):jt.isArray(A)?A.slice():A}function d(S,A,v){if(jt.isUndefined(A)){if(!jt.isUndefined(S))return a(void 0,S,v)}else return a(S,A,v)}function s(S,A){if(!jt.isUndefined(A))return a(void 0,A)}function m(S,A){if(jt.isUndefined(A)){if(!jt.isUndefined(S))return a(void 0,S)}else return a(void 0,A)}function p(S,A,v){if(v in r)return a(S,A);if(v in t)return a(void 0,S)}let w={url:s,method:s,data:s,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:p,headers:(S,A)=>d(td(S),td(A),!0)};return jt.forEach(Object.keys(Object.assign({},t,r)),function(S){let A=w[S]||d,v=A(t[S],r[S],S);jt.isUndefined(v)&&A!==p||(h[S]=v)}),h}let ed="1.6.2",ku={};["object","boolean","number","function","string","symbol"].forEach((t,r)=>{ku[t]=function(h){return typeof h===t||"a"+(r<1?"n ":" ")+t}});let rd={};ku.transitional=function(t,r,h){function a(d,s){return"[Axios v"+ed+"] Transitional option '"+d+"'"+s+(h?". "+h:"")}return(d,s,m)=>{if(t===!1)throw new ie(a(s," has been removed"+(r?" in "+r:"")),ie.ERR_DEPRECATED);return r&&!rd[s]&&(rd[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(d,s,m):!0}};function b6(t,r,h){if(typeof t!="object")throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);let a=Object.keys(t),d=a.length;for(;d-- >0;){let s=a[d],m=r[s];if(m){let p=t[s],w=p===void 0||m(p,s,t);if(w!==!0)throw new ie("option "+s+" must be "+w,ie.ERR_BAD_OPTION_VALUE);continue}if(h!==!0)throw new ie("Unknown option "+s,ie.ERR_BAD_OPTION)}}let Eu={assertOptions:b6,validators:ku},Li=Eu.validators;class sa{constructor(r){this.defaults=r,this.interceptors={request:new Fc,response:new Fc}}request(r,h){typeof r=="string"?(h=h||{},h.url=r):h=r||{},h=qn(this.defaults,h);let{transitional:a,paramsSerializer:d,headers:s}=h;a!==void 0&&Eu.assertOptions(a,{silentJSONParsing:Li.transitional(Li.boolean),forcedJSONParsing:Li.transitional(Li.boolean),clarifyTimeoutError:Li.transitional(Li.boolean)},!1),d!=null&&(jt.isFunction(d)?h.paramsSerializer={serialize:d}:Eu.assertOptions(d,{encode:Li.function,serialize:Li.function},!0)),h.method=(h.method||this.defaults.method||"get").toLowerCase();let m=s&&jt.merge(s.common,s[h.method]);s&&jt.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),h.headers=mi.concat(m,s);let p=[],w=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(h)===!1||(w=w&&b.synchronous,p.unshift(b.fulfilled,b.rejected))});let S=[];this.interceptors.response.forEach(function(b){S.push(b.fulfilled,b.rejected)});let A,v=0,_;if(!w){let b=[Yc.bind(this),void 0];for(b.unshift.apply(b,p),b.push.apply(b,S),_=b.length,A=Promise.resolve(h);v<_;)A=A.then(b[v++],b[v++]);return A}_=p.length;let x=h;for(v=0;v<_;){let b=p[v++],M=p[v++];try{x=b(x)}catch(O){M.call(this,O);break}}try{A=Yc.call(this,x)}catch(b){return Promise.reject(b)}for(v=0,_=S.length;v<_;)A=A.then(S[v++],S[v++]);return A}getUri(r){r=qn(this.defaults,r);let h=Jc(r.baseURL,r.url);return zc(h,r.params,r.paramsSerializer)}}jt.forEach(["delete","get","head","options"],function(t){sa.prototype[t]=function(r,h){return this.request(qn(h||{},{method:t,url:r,data:(h||{}).data}))}}),jt.forEach(["post","put","patch"],function(t){function r(h){return function(a,d,s){return this.request(qn(s||{},{method:t,headers:h?{"Content-Type":"multipart/form-data"}:{},url:a,data:d}))}}sa.prototype[t]=r(),sa.prototype[t+"Form"]=r(!0)});let aa=sa;class Ru{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let h;this.promise=new Promise(function(d){h=d});let a=this;this.promise.then(d=>{if(!a._listeners)return;let s=a._listeners.length;for(;s-- >0;)a._listeners[s](d);a._listeners=null}),this.promise.then=d=>{let s,m=new Promise(p=>{a.subscribe(p),s=p}).then(d);return m.cancel=function(){a.unsubscribe(s)},m},r(function(d,s,m){a.reason||(a.reason=new Do(d,s,m),h(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;let h=this._listeners.indexOf(r);h!==-1&&this._listeners.splice(h,1)}static source(){let r;return{token:new Ru(function(h){r=h}),cancel:r}}}let w6=Ru;function M6(t){return function(r){return t.apply(null,r)}}function _6(t){return jt.isObject(t)&&t.isAxiosError===!0}let Ou={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ou).forEach(([t,r])=>{Ou[r]=t});let S6=Ou;function id(t){let r=new aa(t),h=kc(aa.prototype.request,r);return jt.extend(h,aa.prototype,r,{allOwnKeys:!0}),jt.extend(h,r,null,{allOwnKeys:!0}),h.create=function(a){return id(qn(t,a))},h}let Ue=id(Mu);Ue.Axios=aa,Ue.CanceledError=Do,Ue.CancelToken=w6,Ue.isCancel=Kc,Ue.VERSION=ed,Ue.toFormData=ia,Ue.AxiosError=ie,Ue.Cancel=Ue.CanceledError,Ue.all=function(t){return Promise.all(t)},Ue.spread=M6,Ue.isAxiosError=_6,Ue.mergeConfig=qn,Ue.AxiosHeaders=mi,Ue.formToJSON=t=>Wc(jt.isHTMLForm(t)?new FormData(t):t),Ue.getAdapter=Gc.getAdapter,Ue.HttpStatusCode=S6,Ue.default=Ue;let A6=Ue;`${Ce(je.PEN.tarjeta.min)}`,`${Ce(je.PEN.yape.min)}`,`${Ce(je.PEN.yape.max)}`,`${Ce(je.PEN.cip.min)}`,`${Ce(je.PEN.cip.max)}`,`${Ce(je.USD.cip.min)}`,`${Ce(je.USD.cip.max)}`,`${Ce(je.PEN.cuotealo.min)}`,`${Ce(je.PEN.cuotealo.max)}`,`${Ce(je.USD.cuotealo.min)}`,`${Ce(je.USD.cuotealo.max)}`,`${Ce(je.PEN.tarjeta.min)}`,`${Ce(je.PEN.yape.min)}${Ce(je.PEN.yape.max)}`,`${Ce(je.PEN.cip.min)}${Ce(je.PEN.cip.max)}`,`${Ce(je.USD.cip.min)}${Ce(je.USD.cip.max)}`,`${Ce(je.PEN.cuotealo.min)}${Ce(je.PEN.cuotealo.max)}`,`${Ce(je.USD.cuotealo.min)}${Ce(je.USD.cuotealo.max)}`;let x6={object:"error",type:"error_encrypt",merchant_message:"Error al encriptar los datos",user_message:"Cont\xE1ctese con soporte"};var zt={},ju={exports:{}},Cu={exports:{}};(function(t,r){var h=Ut,a=h.Buffer;function d(m,p){for(var w in m)p[w]=m[w]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=h:(d(h,r),r.Buffer=s);function s(m,p,w){return a(m,p,w)}s.prototype=Object.create(a.prototype),d(a,s),s.from=function(m,p,w){if(typeof m=="number")throw new TypeError("Argument must not be a number");return a(m,p,w)},s.alloc=function(m,p,w){if(typeof m!="number")throw new TypeError("Argument must be a number");var S=a(m);return p!==void 0?typeof w=="string"?S.fill(p,w):S.fill(p):S.fill(0),S},s.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return a(m)},s.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return h.SlowBuffer(m)}})(Cu,Cu.exports);var Zt=Cu.exports,Iu=65536,k6=4294967295;function E6(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}var R6=Zt.Buffer,ha=Lt.crypto||Lt.msCrypto;ha&&ha.getRandomValues?ju.exports=O6:ju.exports=E6;function O6(t,r){if(t>k6)throw new RangeError("requested too many random bytes");var h=R6.allocUnsafe(t);if(t>0)if(t>Iu)for(var a=0;a<t;a+=Iu)ha.getRandomValues(h.slice(a,a+Iu));else ha.getRandomValues(h);return typeof r=="function"?Dt.nextTick(function(){r(null,h)}):h}var $n=ju.exports,Bu={exports:{}};typeof Object.create=="function"?Bu.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Bu.exports=function(t,r){if(r){t.super_=r;var h=function(){};h.prototype=r.prototype,t.prototype=new h,t.prototype.constructor=t}};var Ht=Bu.exports,Lu={exports:{}},Uu={exports:{}},Tn=typeof Reflect=="object"?Reflect:null,nd=Tn&&typeof Tn.apply=="function"?Tn.apply:function(t,r,h){return Function.prototype.apply.call(t,r,h)},ua;Tn&&typeof Tn.ownKeys=="function"?ua=Tn.ownKeys:Object.getOwnPropertySymbols?ua=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ua=function(t){return Object.getOwnPropertyNames(t)};function j6(t){console&&console.warn&&console.warn(t)}var od=Number.isNaN||function(t){return t!==t};function ae(){ae.init.call(this)}Uu.exports=ae,Uu.exports.once=L6,ae.EventEmitter=ae,ae.prototype._events=void 0,ae.prototype._eventsCount=0,ae.prototype._maxListeners=void 0;var sd=10;function la(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(ae,"defaultMaxListeners",{enumerable:!0,get:function(){return sd},set:function(t){if(typeof t!="number"||t<0||od(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");sd=t}}),ae.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},ae.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||od(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function ad(t){return t._maxListeners===void 0?ae.defaultMaxListeners:t._maxListeners}ae.prototype.getMaxListeners=function(){return ad(this)},ae.prototype.emit=function(t){for(var r=[],h=1;h<arguments.length;h++)r.push(arguments[h]);var a=t==="error",d=this._events;if(d!==void 0)a=a&&d.error===void 0;else if(!a)return!1;if(a){var s;if(r.length>0&&(s=r[0]),s instanceof Error)throw s;var m=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw m.context=s,m}var p=d[t];if(p===void 0)return!1;if(typeof p=="function")nd(p,this,r);else for(var w=p.length,S=cd(p,w),h=0;h<w;++h)nd(S[h],this,r);return!0};function hd(t,r,h,a){var d,s,m;if(la(h),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",r,h.listener?h.listener:h),s=t._events),m=s[r]),m===void 0)m=s[r]=h,++t._eventsCount;else if(typeof m=="function"?m=s[r]=a?[h,m]:[m,h]:a?m.unshift(h):m.push(h),d=ad(t),d>0&&m.length>d&&!m.warned){m.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+m.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=t,p.type=r,p.count=m.length,j6(p)}return t}ae.prototype.addListener=function(t,r){return hd(this,t,r,!1)},ae.prototype.on=ae.prototype.addListener,ae.prototype.prependListener=function(t,r){return hd(this,t,r,!0)};function C6(){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 ud(t,r,h){var a={fired:!1,wrapFn:void 0,target:t,type:r,listener:h},d=C6.bind(a);return d.listener=h,a.wrapFn=d,d}ae.prototype.once=function(t,r){return la(r),this.on(t,ud(this,t,r)),this},ae.prototype.prependOnceListener=function(t,r){return la(r),this.prependListener(t,ud(this,t,r)),this},ae.prototype.removeListener=function(t,r){var h,a,d,s,m;if(la(r),a=this._events,a===void 0)return this;if(h=a[t],h===void 0)return this;if(h===r||h.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,h.listener||r));else if(typeof h!="function"){for(d=-1,s=h.length-1;s>=0;s--)if(h[s]===r||h[s].listener===r){m=h[s].listener,d=s;break}if(d<0)return this;d===0?h.shift():I6(h,d),h.length===1&&(a[t]=h[0]),a.removeListener!==void 0&&this.emit("removeListener",t,m||r)}return this},ae.prototype.off=ae.prototype.removeListener,ae.prototype.removeAllListeners=function(t){var r,h,a;if(h=this._events,h===void 0)return this;if(h.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):h[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete h[t]),this;if(arguments.length===0){var d=Object.keys(h),s;for(a=0;a<d.length;++a)s=d[a],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=h[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(a=r.length-1;a>=0;a--)this.removeListener(t,r[a]);return this};function ld(t,r,h){var a=t._events;if(a===void 0)return[];var d=a[r];return d===void 0?[]:typeof d=="function"?h?[d.listener||d]:[d]:h?B6(d):cd(d,d.length)}ae.prototype.listeners=function(t){return ld(this,t,!0)},ae.prototype.rawListeners=function(t){return ld(this,t,!1)},ae.listenerCount=function(t,r){return typeof t.listenerCount=="function"?t.listenerCount(r):fd.call(t,r)},ae.prototype.listenerCount=fd;function fd(t){var r=this._events;if(r!==void 0){var h=r[t];if(typeof h=="function")return 1;if(h!==void 0)return h.length}return 0}ae.prototype.eventNames=function(){return this._eventsCount>0?ua(this._events):[]};function cd(t,r){for(var h=new Array(r),a=0;a<r;++a)h[a]=t[a];return h}function I6(t,r){for(;r+1<t.length;r++)t[r]=t[r+1];t.pop()}function B6(t){for(var r=new Array(t.length),h=0;h<r.length;++h)r[h]=t[h].listener||t[h];return r}function L6(t,r){return new Promise(function(h,a){function d(m){t.removeListener(r,s),a(m)}function s(){typeof t.removeListener=="function"&&t.removeListener("error",d),h([].slice.call(arguments))}dd(t,r,s,{once:!0}),r!=="error"&&U6(t,d,{once:!0})})}function U6(t,r,h){typeof t.on=="function"&&dd(t,"error",r,h)}function dd(t,r,h,a){if(typeof t.on=="function")a.once?t.once(r,h):t.on(r,h);else if(typeof t.addEventListener=="function")t.addEventListener(r,function d(s){a.once&&t.removeEventListener(r,d),h(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var qu=Uu.exports,pd=qu.EventEmitter,$u={},md={},gd=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),h=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(h)!=="[object Symbol]")return!1;var a=42;t[r]=a;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var d=Object.getOwnPropertySymbols(t);if(d.length!==1||d[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==a||s.enumerable!==!0)return!1}return!0},q6=gd,Tu=function(){return q6()&&!!Symbol.toStringTag},yd=typeof Symbol<"u"&&Symbol,$6=gd,T6=function(){return typeof yd!="function"||typeof Symbol!="function"||typeof yd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$6()},vd={foo:{}},D6=Object,P6=function(){return{__proto__:vd}.foo===vd.foo&&!({__proto__:null}instanceof D6)},N6="Function.prototype.bind called on incompatible ",z6=Object.prototype.toString,F6=Math.max,V6="[object Function]",bd=function(t,r){for(var h=[],a=0;a<t.length;a+=1)h[a]=t[a];for(var d=0;d<r.length;d+=1)h[d+t.length]=r[d];return h},H6=function(t,r){for(var h=[],a=r||0,d=0;a<t.length;a+=1,d+=1)h[d]=t[a];return h},W6=function(t,r){for(var h="",a=0;a<t.length;a+=1)h+=t[a],a+1<t.length&&(h+=r);return h},Z6=function(t){var r=this;if(typeof r!="function"||z6.apply(r)!==V6)throw new TypeError(N6+r);for(var h=H6(arguments,1),a,d=function(){if(this instanceof a){var S=r.apply(this,bd(h,arguments));return Object(S)===S?S:this}return r.apply(t,bd(h,arguments))},s=F6(0,r.length-h.length),m=[],p=0;p<s;p++)m[p]="$"+p;if(a=Function("binder","return function ("+W6(m,",")+"){ return binder.apply(this,arguments); }")(d),r.prototype){var w=function(){};w.prototype=r.prototype,a.prototype=new w,w.prototype=null}return a},K6=Z6,Du=Function.prototype.bind||K6,J6=Function.prototype.call,Q6=Object.prototype.hasOwnProperty,X6=Du,G6=X6.call(J6,Q6),re,Dn=SyntaxError,wd=Function,Pn=TypeError,Pu=function(t){try{return wd('"use strict"; return ('+t+").constructor;")()}catch{}},tn=Object.getOwnPropertyDescriptor;if(tn)try{tn({},"")}catch{tn=null}var Nu=function(){throw new Pn},Y6=tn?function(){try{return arguments.callee,Nu}catch{try{return tn(arguments,"callee").get}catch{return Nu}}}():Nu,Nn=T6(),t8=P6(),Te=Object.getPrototypeOf||(t8?function(t){return t.__proto__}:null),zn={},e8=typeof Uint8Array>"u"||!Te?re:Te(Uint8Array),en={"%AggregateError%":typeof AggregateError>"u"?re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?re:ArrayBuffer,"%ArrayIteratorPrototype%":Nn&&Te?Te([][Symbol.iterator]()):re,"%AsyncFromSyncIteratorPrototype%":re,"%AsyncFunction%":zn,"%AsyncGenerator%":zn,"%AsyncGeneratorFunction%":zn,"%AsyncIteratorPrototype%":zn,"%Atomics%":typeof Atomics>"u"?re:Atomics,"%BigInt%":typeof BigInt>"u"?re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?re:FinalizationRegistry,"%Function%":wd,"%GeneratorFunction%":zn,"%Int8Array%":typeof Int8Array>"u"?re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Nn&&Te?Te(Te([][Symbol.iterator]())):re,"%JSON%":typeof JSON=="object"?JSON:re,"%Map%":typeof Map>"u"?re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Nn||!Te?re:Te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?re:Promise,"%Proxy%":typeof Proxy>"u"?re:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Nn||!Te?re:Te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Nn&&Te?Te(""[Symbol.iterator]()):re,"%Symbol%":Nn?Symbol:re,"%SyntaxError%":Dn,"%ThrowTypeError%":Y6,"%TypedArray%":e8,"%TypeError%":Pn,"%Uint8Array%":typeof Uint8Array>"u"?re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?re:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?re:WeakSet};if(Te)try{null.error}catch(t){var r8=Te(Te(t));en["%Error.prototype%"]=r8}var i8=function t(r){var h;if(r==="%AsyncFunction%")h=Pu("async function () {}");else if(r==="%GeneratorFunction%")h=Pu("function* () {}");else if(r==="%AsyncGeneratorFunction%")h=Pu("async function* () {}");else if(r==="%AsyncGenerator%"){var a=t("%AsyncGeneratorFunction%");a&&(h=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var d=t("%AsyncGenerator%");d&&Te&&(h=Te(d.prototype))}return en[r]=h,h},Md={"%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"]},Po=Du,fa=G6,n8=Po.call(Function.call,Array.prototype.concat),o8=Po.call(Function.apply,Array.prototype.splice),_d=Po.call(Function.call,String.prototype.replace),ca=Po.call(Function.call,String.prototype.slice),s8=Po.call(Function.call,RegExp.prototype.exec),a8=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,h8=/\\(\\)?/g,u8=function(t){var r=ca(t,0,1),h=ca(t,-1);if(r==="%"&&h!=="%")throw new Dn("invalid intrinsic syntax, expected closing `%`");if(h==="%"&&r!=="%")throw new Dn("invalid intrinsic syntax, expected opening `%`");var a=[];return _d(t,a8,function(d,s,m,p){a[a.length]=m?_d(p,h8,"$1"):s||d}),a},l8=function(t,r){var h=t,a;if(fa(Md,h)&&(a=Md[h],h="%"+a[0]+"%"),fa(en,h)){var d=en[h];if(d===zn&&(d=i8(h)),typeof d>"u"&&!r)throw new Pn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:h,value:d}}throw new Dn("intrinsic "+t+" does not exist!")},Fn=function(t,r){if(typeof t!="string"||t.length===0)throw new Pn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Pn('"allowMissing" argument must be a boolean');if(s8(/^%?[^%]*%?$/,t)===null)throw new Dn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var h=u8(t),a=h.length>0?h[0]:"",d=l8("%"+a+"%",r),s=d.name,m=d.value,p=!1,w=d.alias;w&&(a=w[0],o8(h,n8([0,1],w)));for(var S=1,A=!0;S<h.length;S+=1){var v=h[S],_=ca(v,0,1),x=ca(v,-1);if((_==='"'||_==="'"||_==="`"||x==='"'||x==="'"||x==="`")&&_!==x)throw new Dn("property names with quotes must have matching quotes");if((v==="constructor"||!A)&&(p=!0),a+="."+v,s="%"+a+"%",fa(en,s))m=en[s];else if(m!=null){if(!(v in m)){if(!r)throw new Pn("base intrinsic for "+t+" exists, but the property is not available.");return}if(tn&&S+1>=h.length){var b=tn(m,v);A=!!b,A&&"get"in b&&!("originalValue"in b.get)?m=b.get:m=m[v]}else A=fa(m,v),m=m[v];A&&!p&&(en[s]=m)}}return m},Sd={exports:{}},f8=Fn,zu=f8("%Object.defineProperty%",!0),Fu=function(){if(zu)try{return zu({},"a",{value:1}),!0}catch{return!1}return!1};Fu.hasArrayLengthDefineBug=function(){if(!Fu())return null;try{return zu([],"length",{value:1}).length!==1}catch{return!0}};var Ad=Fu,c8=Fn,da=c8("%Object.getOwnPropertyDescriptor%",!0);if(da)try{da([],"length")}catch{da=null}var Vu=da,d8=Ad(),Hu=Fn,No=d8&&Hu("%Object.defineProperty%",!0);if(No)try{No({},"a",{value:1})}catch{No=!1}var p8=Hu("%SyntaxError%"),Vn=Hu("%TypeError%"),xd=Vu,m8=function(t,r,h){if(!t||typeof t!="object"&&typeof t!="function")throw new Vn("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Vn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Vn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Vn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Vn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Vn("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,d=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,m=arguments.length>6?arguments[6]:!1,p=!!xd&&xd(t,r);if(No)No(t,r,{configurable:s===null&&p?p.configurable:!s,enumerable:a===null&&p?p.enumerable:!a,value:h,writable:d===null&&p?p.writable:!d});else if(m||!a&&!d&&!s)t[r]=h;else throw new p8("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},kd=Fn,Ed=m8,g8=Ad(),Rd=Vu,Od=kd("%TypeError%"),y8=kd("%Math.floor%"),v8=function(t,r){if(typeof t!="function")throw new Od("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||y8(r)!==r)throw new Od("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],a=!0,d=!0;if("length"in t&&Rd){var s=Rd(t,"length");s&&!s.configurable&&(a=!1),s&&!s.writable&&(d=!1)}return(a||d||!h)&&(g8?Ed(t,"length",r,!0,!0):Ed(t,"length",r)),t};(function(t){var r=Du,h=Fn,a=v8,d=h("%TypeError%"),s=h("%Function.prototype.apply%"),m=h("%Function.prototype.call%"),p=h("%Reflect.apply%",!0)||r.call(m,s),w=h("%Object.defineProperty%",!0),S=h("%Math.max%");if(w)try{w({},"a",{value:1})}catch{w=null}t.exports=function(v){if(typeof v!="function")throw new d("a function is required");var _=p(r,m,arguments);return a(_,1+S(0,v.length-(arguments.length-1)),!0)};var A=function(){return p(r,s,arguments)};w?w(t.exports,"apply",{value:A}):t.exports.apply=A})(Sd);var jd=Sd.exports,Cd=Fn,Id=jd,b8=Id(Cd("String.prototype.indexOf")),Bd=function(t,r){var h=Cd(t,!!r);return typeof h=="function"&&b8(t,".prototype.")>-1?Id(h):h},w8=Tu(),M8=Bd,Wu=M8("Object.prototype.toString"),pa=function(t){return w8&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Wu(t)==="[object Arguments]"},Ld=function(t){return pa(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wu(t)!=="[object Array]"&&Wu(t.callee)==="[object Function]"},_8=function(){return pa(arguments)}();pa.isLegacyArguments=Ld;var S8=_8?pa:Ld,A8=Object.prototype.toString,x8=Function.prototype.toString,k8=/^\s*(?:function)?\*/,Ud=Tu(),Zu=Object.getPrototypeOf,E8=function(){if(!Ud)return!1;try{return Function("return function*() {}")()}catch{}},Ku,R8=function(t){if(typeof t!="function")return!1;if(k8.test(x8.call(t)))return!0;if(!Ud){var r=A8.call(t);return r==="[object GeneratorFunction]"}if(!Zu)return!1;if(typeof Ku>"u"){var h=E8();Ku=h?Zu(h):!1}return Zu(t)===Ku},qd=Function.prototype.toString,Hn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ju,ma;if(typeof Hn=="function"&&typeof Object.defineProperty=="function")try{Ju=Object.defineProperty({},"length",{get:function(){throw ma}}),ma={},Hn(function(){throw 42},null,Ju)}catch(t){t!==ma&&(Hn=null)}else Hn=null;var O8=/^\s*class\b/,Qu=function(t){try{var r=qd.call(t);return O8.test(r)}catch{return!1}},Xu=function(t){try{return Qu(t)?!1:(qd.call(t),!0)}catch{return!1}},ga=Object.prototype.toString,j8="[object Object]",C8="[object Function]",I8="[object GeneratorFunction]",B8="[object HTMLAllCollection]",L8="[object HTML document.all class]",U8="[object HTMLCollection]",q8=typeof Symbol=="function"&&!!Symbol.toStringTag,$8=!(0 in[,]),Gu=function(){return!1};if(typeof document=="object"){var T8=document.all;ga.call(T8)===ga.call(document.all)&&(Gu=function(t){if(($8||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=ga.call(t);return(r===B8||r===L8||r===U8||r===j8)&&t("")==null}catch{}return!1})}var D8=Hn?function(t){if(Gu(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Hn(t,null,Ju)}catch(r){if(r!==ma)return!1}return!Qu(t)&&Xu(t)}:function(t){if(Gu(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(q8)return Xu(t);if(Qu(t))return!1;var r=ga.call(t);return r!==C8&&r!==I8&&!/^\[object HTML/.test(r)?!1:Xu(t)},P8=D8,N8=Object.prototype.toString,$d=Object.prototype.hasOwnProperty,z8=function(t,r,h){for(var a=0,d=t.length;a<d;a++)$d.call(t,a)&&(h==null?r(t[a],a,t):r.call(h,t[a],a,t))},F8=function(t,r,h){for(var a=0,d=t.length;a<d;a++)h==null?r(t.charAt(a),a,t):r.call(h,t.charAt(a),a,t)},V8=function(t,r,h){for(var a in t)$d.call(t,a)&&(h==null?r(t[a],a,t):r.call(h,t[a],a,t))},H8=function(t,r,h){if(!P8(r))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=h),N8.call(t)==="[object Array]"?z8(t,r,a):typeof t=="string"?F8(t,r,a):V8(t,r,a)},W8=H8,Yu=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Z8=typeof globalThis>"u"?Lt:globalThis,K8=function(){for(var t=[],r=0;r<Yu.length;r++)typeof Z8[Yu[r]]=="function"&&(t[t.length]=Yu[r]);return t},ya=W8,J8=K8,Td=jd,tl=Bd,va=Vu,Q8=tl("Object.prototype.toString"),Dd=Tu(),Pd=typeof globalThis>"u"?Lt:globalThis,el=J8(),rl=tl("String.prototype.slice"),il=Object.getPrototypeOf,X8=tl("Array.prototype.indexOf",!0)||function(t,r){for(var h=0;h<t.length;h+=1)if(t[h]===r)return h;return-1},ba={__proto__:null};Dd&&va&&il?ya(el,function(t){var r=new Pd[t];if(Symbol.toStringTag in r){var h=il(r),a=va(h,Symbol.toStringTag);if(!a){var d=il(h);a=va(d,Symbol.toStringTag)}ba["$"+t]=Td(a.get)}}):ya(el,function(t){var r=new Pd[t],h=r.slice||r.set;h&&(ba["$"+t]=Td(h))});var G8=function(t){var r=!1;return ya(ba,function(h,a){if(!r)try{"$"+h(t)===a&&(r=rl(a,1))}catch{}}),r},Y8=function(t){var r=!1;return ya(ba,function(h,a){if(!r)try{h(t),r=rl(a,1)}catch{}}),r},Nd=function(t){if(!t||typeof t!="object")return!1;if(!Dd){var r=rl(Q8(t),8,-1);return X8(el,r)>-1?r:r!=="Object"?!1:Y8(t)}return va?G8(t):null},t3=Nd,e3=function(t){return!!t3(t)};(function(t){var r=S8,h=R8,a=Nd,d=e3;function s(F){return F.call.bind(F)}var m=typeof BigInt<"u",p=typeof Symbol<"u",w=s(Object.prototype.toString),S=s(Number.prototype.valueOf),A=s(String.prototype.valueOf),v=s(Boolean.prototype.valueOf);if(m)var _=s(BigInt.prototype.valueOf);if(p)var x=s(Symbol.prototype.valueOf);function b(F,K){if(typeof F!="object")return!1;try{return K(F),!0}catch{return!1}}t.isArgumentsObject=r,t.isGeneratorFunction=h,t.isTypedArray=d;function M(F){return typeof Promise<"u"&&F instanceof Promise||F!==null&&typeof F=="object"&&typeof F.then=="function"&&typeof F.catch=="function"}t.isPromise=M;function O(F){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(F):d(F)||D(F)}t.isArrayBufferView=O;function k(F){return a(F)==="Uint8Array"}t.isUint8Array=k;function R(F){return a(F)==="Uint8ClampedArray"}t.isUint8ClampedArray=R;function I(F){return a(F)==="Uint16Array"}t.isUint16Array=I;function L(F){return a(F)==="Uint32Array"}t.isUint32Array=L;function P(F){return a(F)==="Int8Array"}t.isInt8Array=P;function H(F){return a(F)==="Int16Array"}t.isInt16Array=H;function W(F){return a(F)==="Int32Array"}t.isInt32Array=W;function q(F){return a(F)==="Float32Array"}t.isFloat32Array=q;function $(F){return a(F)==="Float64Array"}t.isFloat64Array=$;function N(F){return a(F)==="BigInt64Array"}t.isBigInt64Array=N;function e(F){return a(F)==="BigUint64Array"}t.isBigUint64Array=e;function o(F){return w(F)==="[object Map]"}o.working=typeof Map<"u"&&o(new Map);function n(F){return typeof Map>"u"?!1:o.working?o(F):F instanceof Map}t.isMap=n;function u(F){return w(F)==="[object Set]"}u.working=typeof Set<"u"&&u(new Set);function l(F){return typeof Set>"u"?!1:u.working?u(F):F instanceof Set}t.isSet=l;function g(F){return w(F)==="[object WeakMap]"}g.working=typeof WeakMap<"u"&&g(new WeakMap);function y(F){return typeof WeakMap>"u"?!1:g.working?g(F):F instanceof WeakMap}t.isWeakMap=y;function c(F){return w(F)==="[object WeakSet]"}c.working=typeof WeakSet<"u"&&c(new WeakSet);function i(F){return c(F)}t.isWeakSet=i;function f(F){return w(F)==="[object ArrayBuffer]"}f.working=typeof ArrayBuffer<"u"&&f(new ArrayBuffer);function E(F){return typeof ArrayBuffer>"u"?!1:f.working?f(F):F instanceof ArrayBuffer}t.isArrayBuffer=E;function j(F){return w(F)==="[object DataView]"}j.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&j(new DataView(new ArrayBuffer(1),0,1));function D(F){return typeof DataView>"u"?!1:j.working?j(F):F instanceof DataView}t.isDataView=D;var V=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Q(F){return w(F)==="[object SharedArrayBuffer]"}function Z(F){return typeof V>"u"?!1:(typeof Q.working>"u"&&(Q.working=Q(new V)),Q.working?Q(F):F instanceof V)}t.isSharedArrayBuffer=Z;function tt(F){return w(F)==="[object AsyncFunction]"}t.isAsyncFunction=tt;function Y(F){return w(F)==="[object Map Iterator]"}t.isMapIterator=Y;function rt(F){return w(F)==="[object Set Iterator]"}t.isSetIterator=rt;function It(F){return w(F)==="[object Generator]"}t.isGeneratorObject=It;function z(F){return w(F)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=z;function U(F){return b(F,S)}t.isNumberObject=U;function G(F){return b(F,A)}t.isStringObject=G;function J(F){return b(F,v)}t.isBooleanObject=J;function et(F){return m&&b(F,_)}t.isBigIntObject=et;function C(F){return p&&b(F,x)}t.isSymbolObject=C;function B(F){return U(F)||G(F)||J(F)||et(F)||C(F)}t.isBoxedPrimitive=B;function T(F){return typeof Uint8Array<"u"&&(E(F)||Z(F))}t.isAnyArrayBuffer=T,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(F){Object.defineProperty(t,F,{enumerable:!1,value:function(){throw new Error(F+" is not supported in userland")}})})})(md);var r3=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"};(function(t){var r=Object.getOwnPropertyDescriptors||function(j){for(var D=Object.keys(j),V={},Q=0;Q<D.length;Q++)V[D[Q]]=Object.getOwnPropertyDescriptor(j,D[Q]);return V},h=/%[sdj%]/g;t.format=function(j){if(!P(j)){for(var D=[],V=0;V<arguments.length;V++)D.push(m(arguments[V]));return D.join(" ")}for(var V=1,Q=arguments,Z=Q.length,tt=String(j).replace(h,function(It){if(It==="%%")return"%";if(V>=Z)return It;switch(It){case"%s":return String(Q[V++]);case"%d":return Number(Q[V++]);case"%j":try{return JSON.stringify(Q[V++])}catch{return"[Circular]"}default:return It}}),Y=Q[V];V<Z;Y=Q[++V])R(Y)||!$(Y)?tt+=" "+Y:tt+=" "+m(Y);return tt},t.deprecate=function(j,D){if(typeof Dt<"u"&&Dt.noDeprecation===!0)return j;if(typeof Dt>"u")return function(){return t.deprecate(j,D).apply(this,arguments)};var V=!1;function Q(){if(!V){if(Dt.throwDeprecation)throw new Error(D);Dt.traceDeprecation?console.trace(D):console.error(D),V=!0}return j.apply(this,arguments)}return Q};var a={},d=/^$/;if({}.NODE_DEBUG){var s={}.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),d=new RegExp("^"+s+"$","i")}t.debuglog=function(j){if(j=j.toUpperCase(),!a[j])if(d.test(j)){var D=Dt.pid;a[j]=function(){var V=t.format.apply(t,arguments);console.error("%s %d: %s",j,D,V)}}else a[j]=function(){};return a[j]};function m(j,D){var V={seen:[],stylize:w};return arguments.length>=3&&(V.depth=arguments[2]),arguments.length>=4&&(V.colors=arguments[3]),k(D)?V.showHidden=D:D&&t._extend(V,D),W(V.showHidden)&&(V.showHidden=!1),W(V.depth)&&(V.depth=2),W(V.colors)&&(V.colors=!1),W(V.customInspect)&&(V.customInspect=!0),V.colors&&(V.stylize=p),A(V,j,V.depth)}t.inspect=m,m.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]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function p(j,D){var V=m.styles[D];return V?"\x1B["+m.colors[V][0]+"m"+j+"\x1B["+m.colors[V][1]+"m":j}function w(j,D){return j}function S(j){var D={};return j.forEach(function(V,Q){D[V]=!0}),D}function A(j,D,V){if(j.customInspect&&D&&o(D.inspect)&&D.inspect!==t.inspect&&!(D.constructor&&D.constructor.prototype===D)){var Q=D.inspect(V,j);return P(Q)||(Q=A(j,Q,V)),Q}var Z=v(j,D);if(Z)return Z;var tt=Object.keys(D),Y=S(tt);if(j.showHidden&&(tt=Object.getOwnPropertyNames(D)),e(D)&&(tt.indexOf("message")>=0||tt.indexOf("description")>=0))return _(D);if(tt.length===0){if(o(D)){var rt=D.name?": "+D.name:"";return j.stylize("[Function"+rt+"]","special")}if(q(D))return j.stylize(RegExp.prototype.toString.call(D),"regexp");if(N(D))return j.stylize(Date.prototype.toString.call(D),"date");if(e(D))return _(D)}var It="",z=!1,U=["{","}"];if(O(D)&&(z=!0,U=["[","]"]),o(D)){var G=D.name?": "+D.name:"";It=" [Function"+G+"]"}if(q(D)&&(It=" "+RegExp.prototype.toString.call(D)),N(D)&&(It=" "+Date.prototype.toUTCString.call(D)),e(D)&&(It=" "+_(D)),tt.length===0&&(!z||D.length==0))return U[0]+It+U[1];if(V<0)return q(D)?j.stylize(RegExp.prototype.toString.call(D),"regexp"):j.stylize("[Object]","special");j.seen.push(D);var J;return z?J=x(j,D,V,Y,tt):J=tt.map(function(et){return b(j,D,V,Y,et,z)}),j.seen.pop(),M(J,It,U)}function v(j,D){if(W(D))return j.stylize("undefined","undefined");if(P(D)){var V="'"+JSON.stringify(D).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(V,"string")}if(L(D))return j.stylize(""+D,"number");if(k(D))return j.stylize(""+D,"boolean");if(R(D))return j.stylize("null","null")}function _(j){return"["+Error.prototype.toString.call(j)+"]"}function x(j,D,V,Q,Z){for(var tt=[],Y=0,rt=D.length;Y<rt;++Y)c(D,String(Y))?tt.push(b(j,D,V,Q,String(Y),!0)):tt.push("");return Z.forEach(function(It){It.match(/^\d+$/)||tt.push(b(j,D,V,Q,It,!0))}),tt}function b(j,D,V,Q,Z,tt){var Y,rt,It;if(It=Object.getOwnPropertyDescriptor(D,Z)||{value:D[Z]},It.get?It.set?rt=j.stylize("[Getter/Setter]","special"):rt=j.stylize("[Getter]","special"):It.set&&(rt=j.stylize("[Setter]","special")),c(Q,Z)||(Y="["+Z+"]"),rt||(j.seen.indexOf(It.value)<0?(R(V)?rt=A(j,It.value,null):rt=A(j,It.value,V-1),rt.indexOf(`
`)>-1&&(tt?rt=rt.split(`
`).map(function(z){return"  "+z}).join(`
`).slice(2):rt=`
`+rt.split(`
`).map(function(z){return"   "+z}).join(`
`))):rt=j.stylize("[Circular]","special")),W(Y)){if(tt&&Z.match(/^\d+$/))return rt;Y=JSON.stringify(""+Z),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.slice(1,-1),Y=j.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=j.stylize(Y,"string"))}return Y+": "+rt}function M(j,D,V){var Q=j.reduce(function(Z,tt){return tt.indexOf(`
`)>=0,Z+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Q>60?V[0]+(D===""?"":D+`
 `)+" "+j.join(`,
  `)+" "+V[1]:V[0]+D+" "+j.join(", ")+" "+V[1]}t.types=md;function O(j){return Array.isArray(j)}t.isArray=O;function k(j){return typeof j=="boolean"}t.isBoolean=k;function R(j){return j===null}t.isNull=R;function I(j){return j==null}t.isNullOrUndefined=I;function L(j){return typeof j=="number"}t.isNumber=L;function P(j){return typeof j=="string"}t.isString=P;function H(j){return typeof j=="symbol"}t.isSymbol=H;function W(j){return j===void 0}t.isUndefined=W;function q(j){return $(j)&&u(j)==="[object RegExp]"}t.isRegExp=q,t.types.isRegExp=q;function $(j){return typeof j=="object"&&j!==null}t.isObject=$;function N(j){return $(j)&&u(j)==="[object Date]"}t.isDate=N,t.types.isDate=N;function e(j){return $(j)&&(u(j)==="[object Error]"||j instanceof Error)}t.isError=e,t.types.isNativeError=e;function o(j){return typeof j=="function"}t.isFunction=o;function n(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j>"u"}t.isPrimitive=n,t.isBuffer=r3;function u(j){return Object.prototype.toString.call(j)}function l(j){return j<10?"0"+j.toString(10):j.toString(10)}var g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function y(){var j=new Date,D=[l(j.getHours()),l(j.getMinutes()),l(j.getSeconds())].join(":");return[j.getDate(),g[j.getMonth()],D].join(" ")}t.log=function(){console.log("%s - %s",y(),t.format.apply(t,arguments))},t.inherits=Ht,t._extend=function(j,D){if(!D||!$(D))return j;for(var V=Object.keys(D),Q=V.length;Q--;)j[V[Q]]=D[V[Q]];return j};function c(j,D){return Object.prototype.hasOwnProperty.call(j,D)}var i=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(j){if(typeof j!="function")throw new TypeError('The "original" argument must be of type Function');if(i&&j[i]){var D=j[i];if(typeof D!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(D,i,{value:D,enumerable:!1,writable:!1,configurable:!0}),D}function D(){for(var V,Q,Z=new Promise(function(rt,It){V=rt,Q=It}),tt=[],Y=0;Y<arguments.length;Y++)tt.push(arguments[Y]);tt.push(function(rt,It){rt?Q(rt):V(It)});try{j.apply(this,tt)}catch(rt){Q(rt)}return Z}return Object.setPrototypeOf(D,Object.getPrototypeOf(j)),i&&Object.defineProperty(D,i,{value:D,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(D,r(j))},t.promisify.custom=i;function f(j,D){if(!j){var V=new Error("Promise was rejected with a falsy value");V.reason=j,j=V}return D(j)}function E(j){if(typeof j!="function")throw new TypeError('The "original" argument must be of type Function');function D(){for(var V=[],Q=0;Q<arguments.length;Q++)V.push(arguments[Q]);var Z=V.pop();if(typeof Z!="function")throw new TypeError("The last argument must be of type Function");var tt=this,Y=function(){return Z.apply(tt,arguments)};j.apply(this,V).then(function(rt){Dt.nextTick(Y.bind(null,null,rt))},function(rt){Dt.nextTick(f.bind(null,rt,Y))})}return Object.setPrototypeOf(D,Object.getPrototypeOf(j)),Object.defineProperties(D,r(j)),D}t.callbackify=E})($u);var nl,zd;function i3(){if(zd)return nl;zd=1;function t(b,M){var O=Object.keys(b);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(b);M&&(k=k.filter(function(R){return Object.getOwnPropertyDescriptor(b,R).enumerable})),O.push.apply(O,k)}return O}function r(b){for(var M=1;M<arguments.length;M++){var O=arguments[M]!=null?arguments[M]:{};M%2?t(Object(O),!0).forEach(function(k){h(b,k,O[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(O)):t(Object(O)).forEach(function(k){Object.defineProperty(b,k,Object.getOwnPropertyDescriptor(O,k))})}return b}function h(b,M,O){return M=m(M),M in b?Object.defineProperty(b,M,{value:O,enumerable:!0,configurable:!0,writable:!0}):b[M]=O,b}function a(b,M){if(!(b instanceof M))throw new TypeError("Cannot call a class as a function")}function d(b,M){for(var O=0;O<M.length;O++){var k=M[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(b,m(k.key),k)}}function s(b,M,O){return M&&d(b.prototype,M),O&&d(b,O),Object.defineProperty(b,"prototype",{writable:!1}),b}function m(b){var M=p(b,"string");return typeof M=="symbol"?M:String(M)}function p(b,M){if(typeof b!="object"||b===null)return b;var O=b[Symbol.toPrimitive];if(O!==void 0){var k=O.call(b,M||"default");if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(M==="string"?String:Number)(b)}var w=Ut,S=w.Buffer,A=$u,v=A.inspect,_=v&&v.custom||"inspect";function x(b,M,O){S.prototype.copy.call(b,M,O)}return nl=function(){function b(){a(this,b),this.head=null,this.tail=null,this.length=0}return s(b,[{key:"push",value:function(M){var O={data:M,next:null};this.length>0?this.tail.next=O:this.head=O,this.tail=O,++this.length}},{key:"unshift",value:function(M){var O={data:M,next:this.head};this.length===0&&(this.tail=O),this.head=O,++this.length}},{key:"shift",value:function(){if(this.length!==0){var M=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,M}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(M){if(this.length===0)return"";for(var O=this.head,k=""+O.data;O=O.next;)k+=M+O.data;return k}},{key:"concat",value:function(M){if(this.length===0)return S.alloc(0);for(var O=S.allocUnsafe(M>>>0),k=this.head,R=0;k;)x(k.data,O,R),R+=k.data.length,k=k.next;return O}},{key:"consume",value:function(M,O){var k;return M<this.head.data.length?(k=this.head.data.slice(0,M),this.head.data=this.head.data.slice(M)):M===this.head.data.length?k=this.shift():k=O?this._getString(M):this._getBuffer(M),k}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(M){var O=this.head,k=1,R=O.data;for(M-=R.length;O=O.next;){var I=O.data,L=M>I.length?I.length:M;if(L===I.length?R+=I:R+=I.slice(0,M),M-=L,M===0){L===I.length?(++k,O.next?this.head=O.next:this.head=this.tail=null):(this.head=O,O.data=I.slice(L));break}++k}return this.length-=k,R}},{key:"_getBuffer",value:function(M){var O=S.allocUnsafe(M),k=this.head,R=1;for(k.data.copy(O),M-=k.data.length;k=k.next;){var I=k.data,L=M>I.length?I.length:M;if(I.copy(O,O.length-M,0,L),M-=L,M===0){L===I.length?(++R,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=I.slice(L));break}++R}return this.length-=R,O}},{key:_,value:function(M,O){return v(this,r(r({},O),{},{depth:0,customInspect:!1}))}}]),b}(),nl}function n3(t,r){var h=this,a=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return a||d?(r?r(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Dt.nextTick(ol,this,t)):Dt.nextTick(ol,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!r&&s?h._writableState?h._writableState.errorEmitted?Dt.nextTick(wa,h):(h._writableState.errorEmitted=!0,Dt.nextTick(Fd,h,s)):Dt.nextTick(Fd,h,s):r?(Dt.nextTick(wa,h),r(s)):Dt.nextTick(wa,h)}),this)}function Fd(t,r){ol(t,r),wa(t)}function wa(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function o3(){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 ol(t,r){t.emit("error",r)}function s3(t,r){var h=t._readableState,a=t._writableState;h&&h.autoDestroy||a&&a.autoDestroy?t.destroy(r):t.emit("error",r)}var Vd={destroy:n3,undestroy:o3,errorOrDestroy:s3},rn={};function a3(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r}var Hd={};function gr(t,r,h){h||(h=Error);function a(s,m,p){return typeof r=="string"?r:r(s,m,p)}var d=function(s){a3(m,s);function m(p,w,S){return s.call(this,a(p,w,S))||this}return m}(h);d.prototype.name=h.name,d.prototype.code=t,Hd[t]=d}function Wd(t,r){if(Array.isArray(t)){var h=t.length;return t=t.map(function(a){return String(a)}),h>2?"one of ".concat(r," ").concat(t.slice(0,h-1).join(", "),", or ")+t[h-1]:h===2?"one of ".concat(r," ").concat(t[0]," or ").concat(t[1]):"of ".concat(r," ").concat(t[0])}else return"of ".concat(r," ").concat(String(t))}function h3(t,r,h){return t.substr(!h||h<0?0:+h,r.length)===r}function u3(t,r,h){return(h===void 0||h>t.length)&&(h=t.length),t.substring(h-r.length,h)===r}function l3(t,r,h){return typeof h!="number"&&(h=0),h+r.length>t.length?!1:t.indexOf(r,h)!==-1}gr("ERR_INVALID_OPT_VALUE",function(t,r){return'The value "'+r+'" is invalid for option "'+t+'"'},TypeError),gr("ERR_INVALID_ARG_TYPE",function(t,r,h){var a;typeof r=="string"&&h3(r,"not ")?(a="must not be",r=r.replace(/^not /,"")):a="must be";var d;if(u3(t," argument"))d="The ".concat(t," ").concat(a," ").concat(Wd(r,"type"));else{var s=l3(t,".")?"property":"argument";d='The "'.concat(t,'" ').concat(s," ").concat(a," ").concat(Wd(r,"type"))}return d+=". Received type ".concat(typeof h),d},TypeError),gr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),gr("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),gr("ERR_STREAM_PREMATURE_CLOSE","Premature close"),gr("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),gr("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),gr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),gr("ERR_STREAM_WRITE_AFTER_END","write after end"),gr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),gr("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),gr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),rn.codes=Hd;var f3=rn.codes.ERR_INVALID_OPT_VALUE;function c3(t,r,h){return t.highWaterMark!=null?t.highWaterMark:r?t[h]:null}function d3(t,r,h,a){var d=c3(r,a,h);if(d!=null){if(!(isFinite(d)&&Math.floor(d)===d)||d<0){var s=a?h:"highWaterMark";throw new f3(s,d)}return Math.floor(d)}return t.objectMode?16:16*1024}var Zd={getHighWaterMark:d3},p3=m3;function m3(t,r){if(sl("noDeprecation"))return t;var h=!1;function a(){if(!h){if(sl("throwDeprecation"))throw new Error(r);sl("traceDeprecation")?console.trace(r):console.warn(r),h=!0}return t.apply(this,arguments)}return a}function sl(t){try{if(!Lt.localStorage)return!1}catch{return!1}var r=Lt.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}var al,Kd;function hl(){if(Kd)return al;Kd=1,al=q;function t(Z){var tt=this;this.next=null,this.entry=null,this.finish=function(){Q(tt,Z)}}var r;q.WritableState=H;var h={deprecate:p3},a=pd,d=Ut.Buffer,s=(typeof Lt<"u"?Lt:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(Z){return d.from(Z)}function p(Z){return d.isBuffer(Z)||Z instanceof s}var w=Vd,S=Zd,A=S.getHighWaterMark,v=rn.codes,_=v.ERR_INVALID_ARG_TYPE,x=v.ERR_METHOD_NOT_IMPLEMENTED,b=v.ERR_MULTIPLE_CALLBACK,M=v.ERR_STREAM_CANNOT_PIPE,O=v.ERR_STREAM_DESTROYED,k=v.ERR_STREAM_NULL_VALUES,R=v.ERR_STREAM_WRITE_AFTER_END,I=v.ERR_UNKNOWN_ENCODING,L=w.errorOrDestroy;Ht(q,a);function P(){}function H(Z,tt,Y){r=r||nn(),Z=Z||{},typeof Y!="boolean"&&(Y=tt instanceof r),this.objectMode=!!Z.objectMode,Y&&(this.objectMode=this.objectMode||!!Z.writableObjectMode),this.highWaterMark=A(this,Z,"writableHighWaterMark",Y),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var rt=Z.decodeStrings===!1;this.decodeStrings=!rt,this.defaultEncoding=Z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(It){g(tt,It)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Z.emitClose!==!1,this.autoDestroy=!!Z.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}H.prototype.getBuffer=function(){for(var Z=this.bufferedRequest,tt=[];Z;)tt.push(Z),Z=Z.next;return tt},function(){try{Object.defineProperty(H.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var W;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(W=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:function(Z){return W.call(this,Z)?!0:this!==q?!1:Z&&Z._writableState instanceof H}})):W=function(Z){return Z instanceof this};function q(Z){r=r||nn();var tt=this instanceof r;if(!tt&&!W.call(q,this))return new q(Z);this._writableState=new H(Z,this,tt),this.writable=!0,Z&&(typeof Z.write=="function"&&(this._write=Z.write),typeof Z.writev=="function"&&(this._writev=Z.writev),typeof Z.destroy=="function"&&(this._destroy=Z.destroy),typeof Z.final=="function"&&(this._final=Z.final)),a.call(this)}q.prototype.pipe=function(){L(this,new M)};function $(Z,tt){var Y=new R;L(Z,Y),Dt.nextTick(tt,Y)}function N(Z,tt,Y,rt){var It;return Y===null?It=new k:typeof Y!="string"&&!tt.objectMode&&(It=new _("chunk",["string","Buffer"],Y)),It?(L(Z,It),Dt.nextTick(rt,It),!1):!0}q.prototype.write=function(Z,tt,Y){var rt=this._writableState,It=!1,z=!rt.objectMode&&p(Z);return z&&!d.isBuffer(Z)&&(Z=m(Z)),typeof tt=="function"&&(Y=tt,tt=null),z?tt="buffer":tt||(tt=rt.defaultEncoding),typeof Y!="function"&&(Y=P),rt.ending?$(this,Y):(z||N(this,rt,Z,Y))&&(rt.pendingcb++,It=o(this,rt,z,Z,tt,Y)),It},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var Z=this._writableState;Z.corked&&(Z.corked--,!Z.writing&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&i(this,Z))},q.prototype.setDefaultEncoding=function(Z){if(typeof Z=="string"&&(Z=Z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Z+"").toLowerCase())>-1))throw new I(Z);return this._writableState.defaultEncoding=Z,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function e(Z,tt,Y){return!Z.objectMode&&Z.decodeStrings!==!1&&typeof tt=="string"&&(tt=d.from(tt,Y)),tt}Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o(Z,tt,Y,rt,It,z){if(!Y){var U=e(tt,rt,It);rt!==U&&(Y=!0,It="buffer",rt=U)}var G=tt.objectMode?1:rt.length;tt.length+=G;var J=tt.length<tt.highWaterMark;if(J||(tt.needDrain=!0),tt.writing||tt.corked){var et=tt.lastBufferedRequest;tt.lastBufferedRequest={chunk:rt,encoding:It,isBuf:Y,callback:z,next:null},et?et.next=tt.lastBufferedRequest:tt.bufferedRequest=tt.lastBufferedRequest,tt.bufferedRequestCount+=1}else n(Z,tt,!1,G,rt,It,z);return J}function n(Z,tt,Y,rt,It,z,U){tt.writelen=rt,tt.writecb=U,tt.writing=!0,tt.sync=!0,tt.destroyed?tt.onwrite(new O("write")):Y?Z._writev(It,tt.onwrite):Z._write(It,z,tt.onwrite),tt.sync=!1}function u(Z,tt,Y,rt,It){--tt.pendingcb,Y?(Dt.nextTick(It,rt),Dt.nextTick(D,Z,tt),Z._writableState.errorEmitted=!0,L(Z,rt)):(It(rt),Z._writableState.errorEmitted=!0,L(Z,rt),D(Z,tt))}function l(Z){Z.writing=!1,Z.writecb=null,Z.length-=Z.writelen,Z.writelen=0}function g(Z,tt){var Y=Z._writableState,rt=Y.sync,It=Y.writecb;if(typeof It!="function")throw new b;if(l(Y),tt)u(Z,Y,rt,tt,It);else{var z=f(Y)||Z.destroyed;!z&&!Y.corked&&!Y.bufferProcessing&&Y.bufferedRequest&&i(Z,Y),rt?Dt.nextTick(y,Z,Y,z,It):y(Z,Y,z,It)}}function y(Z,tt,Y,rt){Y||c(Z,tt),tt.pendingcb--,rt(),D(Z,tt)}function c(Z,tt){tt.length===0&&tt.needDrain&&(tt.needDrain=!1,Z.emit("drain"))}function i(Z,tt){tt.bufferProcessing=!0;var Y=tt.bufferedRequest;if(Z._writev&&Y&&Y.next){var rt=tt.bufferedRequestCount,It=new Array(rt),z=tt.corkedRequestsFree;z.entry=Y;for(var U=0,G=!0;Y;)It[U]=Y,Y.isBuf||(G=!1),Y=Y.next,U+=1;It.allBuffers=G,n(Z,tt,!0,tt.length,It,"",z.finish),tt.pendingcb++,tt.lastBufferedRequest=null,z.next?(tt.corkedRequestsFree=z.next,z.next=null):tt.corkedRequestsFree=new t(tt),tt.bufferedRequestCount=0}else{for(;Y;){var J=Y.chunk,et=Y.encoding,C=Y.callback,B=tt.objectMode?1:J.length;if(n(Z,tt,!1,B,J,et,C),Y=Y.next,tt.bufferedRequestCount--,tt.writing)break}Y===null&&(tt.lastBufferedRequest=null)}tt.bufferedRequest=Y,tt.bufferProcessing=!1}q.prototype._write=function(Z,tt,Y){Y(new x("_write()"))},q.prototype._writev=null,q.prototype.end=function(Z,tt,Y){var rt=this._writableState;return typeof Z=="function"?(Y=Z,Z=null,tt=null):typeof tt=="function"&&(Y=tt,tt=null),Z!=null&&this.write(Z,tt),rt.corked&&(rt.corked=1,this.uncork()),rt.ending||V(this,rt,Y),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f(Z){return Z.ending&&Z.length===0&&Z.bufferedRequest===null&&!Z.finished&&!Z.writing}function E(Z,tt){Z._final(function(Y){tt.pendingcb--,Y&&L(Z,Y),tt.prefinished=!0,Z.emit("prefinish"),D(Z,tt)})}function j(Z,tt){!tt.prefinished&&!tt.finalCalled&&(typeof Z._final=="function"&&!tt.destroyed?(tt.pendingcb++,tt.finalCalled=!0,Dt.nextTick(E,Z,tt)):(tt.prefinished=!0,Z.emit("prefinish")))}function D(Z,tt){var Y=f(tt);if(Y&&(j(Z,tt),tt.pendingcb===0&&(tt.finished=!0,Z.emit("finish"),tt.autoDestroy))){var rt=Z._readableState;(!rt||rt.autoDestroy&&rt.endEmitted)&&Z.destroy()}return Y}function V(Z,tt,Y){tt.ending=!0,D(Z,tt),Y&&(tt.finished?Dt.nextTick(Y):Z.once("finish",Y)),tt.ended=!0,Z.writable=!1}function Q(Z,tt,Y){var rt=Z.entry;for(Z.entry=null;rt;){var It=rt.callback;tt.pendingcb--,It(Y),rt=rt.next}tt.corkedRequestsFree.next=Z}return Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Z){this._writableState&&(this._writableState.destroyed=Z)}}),q.prototype.destroy=w.destroy,q.prototype._undestroy=w.undestroy,q.prototype._destroy=function(Z,tt){tt(Z)},al}var ul,Jd;function nn(){if(Jd)return ul;Jd=1;var t=Object.keys||function(S){var A=[];for(var v in S)A.push(v);return A};ul=m;var r=pl(),h=hl();Ht(m,r);for(var a=t(h.prototype),d=0;d<a.length;d++){var s=a[d];m.prototype[s]||(m.prototype[s]=h.prototype[s])}function m(S){if(!(this instanceof m))return new m(S);r.call(this,S),h.call(this,S),this.allowHalfOpen=!0,S&&(S.readable===!1&&(this.readable=!1),S.writable===!1&&(this.writable=!1),S.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p)))}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(m.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function p(){this._writableState.ended||Dt.nextTick(w,this)}function w(S){S.end()}return Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(S){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=S,this._writableState.destroyed=S)}}),ul}var Ma={},ll=Zt.Buffer,Qd=ll.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 g3(t){if(!t)return"utf8";for(var r;;)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(r)return;t=(""+t).toLowerCase(),r=!0}}function y3(t){var r=g3(t);if(typeof r!="string"&&(ll.isEncoding===Qd||!Qd(t)))throw new Error("Unknown encoding: "+t);return r||t}Ma.StringDecoder=zo;function zo(t){this.encoding=y3(t);var r;switch(this.encoding){case"utf16le":this.text=S3,this.end=A3,r=4;break;case"utf8":this.fillLast=w3,r=4;break;case"base64":this.text=x3,this.end=k3,r=3;break;default:this.write=E3,this.end=R3;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ll.allocUnsafe(r)}zo.prototype.write=function(t){if(t.length===0)return"";var r,h;if(this.lastNeed){if(r=this.fillLast(t),r===void 0)return"";h=this.lastNeed,this.lastNeed=0}else h=0;return h<t.length?r?r+this.text(t,h):this.text(t,h):r||""},zo.prototype.end=_3,zo.prototype.text=M3,zo.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 fl(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function v3(t,r,h){var a=r.length-1;if(a<h)return 0;var d=fl(r[a]);return d>=0?(d>0&&(t.lastNeed=d-1),d):--a<h||d===-2?0:(d=fl(r[a]),d>=0?(d>0&&(t.lastNeed=d-2),d):--a<h||d===-2?0:(d=fl(r[a]),d>=0?(d>0&&(d===2?d=0:t.lastNeed=d-3),d):0))}function b3(t,r,h){if((r[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&r.length>1){if((r[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&r.length>2&&(r[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function w3(t){var r=this.lastTotal-this.lastNeed,h=b3(this,t);if(h!==void 0)return h;if(this.lastNeed<=t.length)return t.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,r,0,t.length),this.lastNeed-=t.length}function M3(t,r){var h=v3(this,t,r);if(!this.lastNeed)return t.toString("utf8",r);this.lastTotal=h;var a=t.length-(h-this.lastNeed);return t.copy(this.lastChar,0,a),t.toString("utf8",r,a)}function _3(t){var r=t&&t.length?this.write(t):"";return this.lastNeed?r+"\uFFFD":r}function S3(t,r){if((t.length-r)%2===0){var h=t.toString("utf16le",r);if(h){var a=h.charCodeAt(h.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],h.slice(0,-1)}return h}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",r,t.length-1)}function A3(t){var r=t&&t.length?this.write(t):"";if(this.lastNeed){var h=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,h)}return r}function x3(t,r){var h=(t.length-r)%3;return h===0?t.toString("base64",r):(this.lastNeed=3-h,this.lastTotal=3,h===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",r,t.length-h))}function k3(t){var r=t&&t.length?this.write(t):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function E3(t){return t.toString(this.encoding)}function R3(t){return t&&t.length?this.write(t):""}var Xd=rn.codes.ERR_STREAM_PREMATURE_CLOSE;function O3(t){var r=!1;return function(){if(!r){r=!0;for(var h=arguments.length,a=new Array(h),d=0;d<h;d++)a[d]=arguments[d];t.apply(this,a)}}}function j3(){}function C3(t){return t.setHeader&&typeof t.abort=="function"}function Gd(t,r,h){if(typeof r=="function")return Gd(t,null,r);r||(r={}),h=O3(h||j3);var a=r.readable||r.readable!==!1&&t.readable,d=r.writable||r.writable!==!1&&t.writable,s=function(){t.writable||p()},m=t._writableState&&t._writableState.finished,p=function(){d=!1,m=!0,a||h.call(t)},w=t._readableState&&t._readableState.endEmitted,S=function(){a=!1,w=!0,d||h.call(t)},A=function(x){h.call(t,x)},v=function(){var x;if(a&&!w)return(!t._readableState||!t._readableState.ended)&&(x=new Xd),h.call(t,x);if(d&&!m)return(!t._writableState||!t._writableState.ended)&&(x=new Xd),h.call(t,x)},_=function(){t.req.on("finish",p)};return C3(t)?(t.on("complete",p),t.on("abort",v),t.req?_():t.on("request",_)):d&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",S),t.on("finish",p),r.error!==!1&&t.on("error",A),t.on("close",v),function(){t.removeListener("complete",p),t.removeListener("abort",v),t.removeListener("request",_),t.req&&t.req.removeListener("finish",p),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",p),t.removeListener("end",S),t.removeListener("error",A),t.removeListener("close",v)}}var _a=Gd,cl,Yd;function I3(){if(Yd)return cl;Yd=1;var t;function r(I,L,P){return L=h(L),L in I?Object.defineProperty(I,L,{value:P,enumerable:!0,configurable:!0,writable:!0}):I[L]=P,I}function h(I){var L=a(I,"string");return typeof L=="symbol"?L:String(L)}function a(I,L){if(typeof I!="object"||I===null)return I;var P=I[Symbol.toPrimitive];if(P!==void 0){var H=P.call(I,L||"default");if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(L==="string"?String:Number)(I)}var d=_a,s=Symbol("lastResolve"),m=Symbol("lastReject"),p=Symbol("error"),w=Symbol("ended"),S=Symbol("lastPromise"),A=Symbol("handlePromise"),v=Symbol("stream");function _(I,L){return{value:I,done:L}}function x(I){var L=I[s];if(L!==null){var P=I[v].read();P!==null&&(I[S]=null,I[s]=null,I[m]=null,L(_(P,!1)))}}function b(I){Dt.nextTick(x,I)}function M(I,L){return function(P,H){I.then(function(){if(L[w]){P(_(void 0,!0));return}L[A](P,H)},H)}}var O=Object.getPrototypeOf(function(){}),k=Object.setPrototypeOf((t={get stream(){return this[v]},next:function(){var I=this,L=this[p];if(L!==null)return Promise.reject(L);if(this[w])return Promise.resolve(_(void 0,!0));if(this[v].destroyed)return new Promise(function(q,$){Dt.nextTick(function(){I[p]?$(I[p]):q(_(void 0,!0))})});var P=this[S],H;if(P)H=new Promise(M(P,this));else{var W=this[v].read();if(W!==null)return Promise.resolve(_(W,!1));H=new Promise(this[A])}return this[S]=H,H}},r(t,Symbol.asyncIterator,function(){return this}),r(t,"return",function(){var I=this;return new Promise(function(L,P){I[v].destroy(null,function(H){if(H){P(H);return}L(_(void 0,!0))})})}),t),O),R=function(I){var L,P=Object.create(k,(L={},r(L,v,{value:I,writable:!0}),r(L,s,{value:null,writable:!0}),r(L,m,{value:null,writable:!0}),r(L,p,{value:null,writable:!0}),r(L,w,{value:I._readableState.endEmitted,writable:!0}),r(L,A,{value:function(H,W){var q=P[v].read();q?(P[S]=null,P[s]=null,P[m]=null,H(_(q,!1))):(P[s]=H,P[m]=W)},writable:!0}),L));return P[S]=null,d(I,function(H){if(H&&H.code!=="ERR_STREAM_PREMATURE_CLOSE"){var W=P[m];W!==null&&(P[S]=null,P[s]=null,P[m]=null,W(H)),P[p]=H;return}var q=P[s];q!==null&&(P[S]=null,P[s]=null,P[m]=null,q(_(void 0,!0))),P[w]=!0}),I.on("readable",b.bind(null,P)),P};return cl=R,cl}var tp,ep;function B3(){return ep||(ep=1,tp=function(){throw new Error("Readable.from is not available in the browser")}),tp}var dl,rp;function pl(){if(rp)return dl;rp=1,dl=$;var t;$.ReadableState=q,qu.EventEmitter;var r=function(z,U){return z.listeners(U).length},h=pd,a=Ut.Buffer,d=(typeof Lt<"u"?Lt:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(z){return a.from(z)}function m(z){return a.isBuffer(z)||z instanceof d}var p=$u,w;p&&p.debuglog?w=p.debuglog("stream"):w=function(){};var S=i3(),A=Vd,v=Zd,_=v.getHighWaterMark,x=rn.codes,b=x.ERR_INVALID_ARG_TYPE,M=x.ERR_STREAM_PUSH_AFTER_EOF,O=x.ERR_METHOD_NOT_IMPLEMENTED,k=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,R,I,L;Ht($,h);var P=A.errorOrDestroy,H=["error","close","destroy","pause","resume"];function W(z,U,G){if(typeof z.prependListener=="function")return z.prependListener(U,G);!z._events||!z._events[U]?z.on(U,G):Array.isArray(z._events[U])?z._events[U].unshift(G):z._events[U]=[G,z._events[U]]}function q(z,U,G){t=t||nn(),z=z||{},typeof G!="boolean"&&(G=U instanceof t),this.objectMode=!!z.objectMode,G&&(this.objectMode=this.objectMode||!!z.readableObjectMode),this.highWaterMark=_(this,z,"readableHighWaterMark",G),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=z.emitClose!==!1,this.autoDestroy=!!z.autoDestroy,this.destroyed=!1,this.defaultEncoding=z.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,z.encoding&&(R||(R=Ma.StringDecoder),this.decoder=new R(z.encoding),this.encoding=z.encoding)}function $(z){if(t=t||nn(),!(this instanceof $))return new $(z);var U=this instanceof t;this._readableState=new q(z,this,U),this.readable=!0,z&&(typeof z.read=="function"&&(this._read=z.read),typeof z.destroy=="function"&&(this._destroy=z.destroy)),h.call(this)}Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(z){this._readableState&&(this._readableState.destroyed=z)}}),$.prototype.destroy=A.destroy,$.prototype._undestroy=A.undestroy,$.prototype._destroy=function(z,U){U(z)},$.prototype.push=function(z,U){var G=this._readableState,J;return G.objectMode?J=!0:typeof z=="string"&&(U=U||G.defaultEncoding,U!==G.encoding&&(z=a.from(z,U),U=""),J=!0),N(this,z,U,!1,J)},$.prototype.unshift=function(z){return N(this,z,null,!0,!1)};function N(z,U,G,J,et){w("readableAddChunk",U);var C=z._readableState;if(U===null)C.reading=!1,g(z,C);else{var B;if(et||(B=o(C,U)),B)P(z,B);else if(C.objectMode||U&&U.length>0)if(typeof U!="string"&&!C.objectMode&&Object.getPrototypeOf(U)!==a.prototype&&(U=s(U)),J)C.endEmitted?P(z,new k):e(z,C,U,!0);else if(C.ended)P(z,new M);else{if(C.destroyed)return!1;C.reading=!1,C.decoder&&!G?(U=C.decoder.write(U),C.objectMode||U.length!==0?e(z,C,U,!1):i(z,C)):e(z,C,U,!1)}else J||(C.reading=!1,i(z,C))}return!C.ended&&(C.length<C.highWaterMark||C.length===0)}function e(z,U,G,J){U.flowing&&U.length===0&&!U.sync?(U.awaitDrain=0,z.emit("data",G)):(U.length+=U.objectMode?1:G.length,J?U.buffer.unshift(G):U.buffer.push(G),U.needReadable&&y(z)),i(z,U)}function o(z,U){var G;return!m(U)&&typeof U!="string"&&U!==void 0&&!z.objectMode&&(G=new b("chunk",["string","Buffer","Uint8Array"],U)),G}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(z){R||(R=Ma.StringDecoder);var U=new R(z);this._readableState.decoder=U,this._readableState.encoding=this._readableState.decoder.encoding;for(var G=this._readableState.buffer.head,J="";G!==null;)J+=U.write(G.data),G=G.next;return this._readableState.buffer.clear(),J!==""&&this._readableState.buffer.push(J),this._readableState.length=J.length,this};var n=1073741824;function u(z){return z>=n?z=n:(z--,z|=z>>>1,z|=z>>>2,z|=z>>>4,z|=z>>>8,z|=z>>>16,z++),z}function l(z,U){return z<=0||U.length===0&&U.ended?0:U.objectMode?1:z!==z?U.flowing&&U.length?U.buffer.head.data.length:U.length:(z>U.highWaterMark&&(U.highWaterMark=u(z)),z<=U.length?z:U.ended?U.length:(U.needReadable=!0,0))}$.prototype.read=function(z){w("read",z),z=parseInt(z,10);var U=this._readableState,G=z;if(z!==0&&(U.emittedReadable=!1),z===0&&U.needReadable&&((U.highWaterMark!==0?U.length>=U.highWaterMark:U.length>0)||U.ended))return w("read: emitReadable",U.length,U.ended),U.length===0&&U.ended?Y(this):y(this),null;if(z=l(z,U),z===0&&U.ended)return U.length===0&&Y(this),null;var J=U.needReadable;w("need readable",J),(U.length===0||U.length-z<U.highWaterMark)&&(J=!0,w("length less than watermark",J)),U.ended||U.reading?(J=!1,w("reading or ended",J)):J&&(w("do read"),U.reading=!0,U.sync=!0,U.length===0&&(U.needReadable=!0),this._read(U.highWaterMark),U.sync=!1,U.reading||(z=l(G,U)));var et;return z>0?et=tt(z,U):et=null,et===null?(U.needReadable=U.length<=U.highWaterMark,z=0):(U.length-=z,U.awaitDrain=0),U.length===0&&(U.ended||(U.needReadable=!0),G!==z&&U.ended&&Y(this)),et!==null&&this.emit("data",et),et};function g(z,U){if(w("onEofChunk"),!U.ended){if(U.decoder){var G=U.decoder.end();G&&G.length&&(U.buffer.push(G),U.length+=U.objectMode?1:G.length)}U.ended=!0,U.sync?y(z):(U.needReadable=!1,U.emittedReadable||(U.emittedReadable=!0,c(z)))}}function y(z){var U=z._readableState;w("emitReadable",U.needReadable,U.emittedReadable),U.needReadable=!1,U.emittedReadable||(w("emitReadable",U.flowing),U.emittedReadable=!0,Dt.nextTick(c,z))}function c(z){var U=z._readableState;w("emitReadable_",U.destroyed,U.length,U.ended),!U.destroyed&&(U.length||U.ended)&&(z.emit("readable"),U.emittedReadable=!1),U.needReadable=!U.flowing&&!U.ended&&U.length<=U.highWaterMark,Z(z)}function i(z,U){U.readingMore||(U.readingMore=!0,Dt.nextTick(f,z,U))}function f(z,U){for(;!U.reading&&!U.ended&&(U.length<U.highWaterMark||U.flowing&&U.length===0);){var G=U.length;if(w("maybeReadMore read 0"),z.read(0),G===U.length)break}U.readingMore=!1}$.prototype._read=function(z){P(this,new O("_read()"))},$.prototype.pipe=function(z,U){var G=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=z;break;case 1:J.pipes=[J.pipes,z];break;default:J.pipes.push(z);break}J.pipesCount+=1,w("pipe count=%d opts=%j",J.pipesCount,U);var et=(!U||U.end!==!1)&&z!==Dt.stdout&&z!==Dt.stderr,C=et?T:nt;J.endEmitted?Dt.nextTick(C):G.once("end",C),z.on("unpipe",B);function B(st,Bt){w("onunpipe"),st===G&&Bt&&Bt.hasUnpiped===!1&&(Bt.hasUnpiped=!0,X())}function T(){w("onend"),z.end()}var F=E(G);z.on("drain",F);var K=!1;function X(){w("cleanup"),z.removeListener("close",ot),z.removeListener("finish",Ct),z.removeListener("drain",F),z.removeListener("error",it),z.removeListener("unpipe",B),G.removeListener("end",T),G.removeListener("end",nt),G.removeListener("data",ut),K=!0,J.awaitDrain&&(!z._writableState||z._writableState.needDrain)&&F()}G.on("data",ut);function ut(st){w("ondata");var Bt=z.write(st);w("dest.write",Bt),Bt===!1&&((J.pipesCount===1&&J.pipes===z||J.pipesCount>1&&It(J.pipes,z)!==-1)&&!K&&(w("false write response, pause",J.awaitDrain),J.awaitDrain++),G.pause())}function it(st){w("onerror",st),nt(),z.removeListener("error",it),r(z,"error")===0&&P(z,st)}W(z,"error",it);function ot(){z.removeListener("finish",Ct),nt()}z.once("close",ot);function Ct(){w("onfinish"),z.removeListener("close",ot),nt()}z.once("finish",Ct);function nt(){w("unpipe"),G.unpipe(z)}return z.emit("pipe",G),J.flowing||(w("pipe resume"),G.resume()),z};function E(z){return function(){var U=z._readableState;w("pipeOnDrain",U.awaitDrain),U.awaitDrain&&U.awaitDrain--,U.awaitDrain===0&&r(z,"data")&&(U.flowing=!0,Z(z))}}$.prototype.unpipe=function(z){var U=this._readableState,G={hasUnpiped:!1};if(U.pipesCount===0)return this;if(U.pipesCount===1)return z&&z!==U.pipes?this:(z||(z=U.pipes),U.pipes=null,U.pipesCount=0,U.flowing=!1,z&&z.emit("unpipe",this,G),this);if(!z){var J=U.pipes,et=U.pipesCount;U.pipes=null,U.pipesCount=0,U.flowing=!1;for(var C=0;C<et;C++)J[C].emit("unpipe",this,{hasUnpiped:!1});return this}var B=It(U.pipes,z);return B===-1?this:(U.pipes.splice(B,1),U.pipesCount-=1,U.pipesCount===1&&(U.pipes=U.pipes[0]),z.emit("unpipe",this,G),this)},$.prototype.on=function(z,U){var G=h.prototype.on.call(this,z,U),J=this._readableState;return z==="data"?(J.readableListening=this.listenerCount("readable")>0,J.flowing!==!1&&this.resume()):z==="readable"&&!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.flowing=!1,J.emittedReadable=!1,w("on readable",J.length,J.reading),J.length?y(this):J.reading||Dt.nextTick(D,this)),G},$.prototype.addListener=$.prototype.on,$.prototype.removeListener=function(z,U){var G=h.prototype.removeListener.call(this,z,U);return z==="readable"&&Dt.nextTick(j,this),G},$.prototype.removeAllListeners=function(z){var U=h.prototype.removeAllListeners.apply(this,arguments);return(z==="readable"||z===void 0)&&Dt.nextTick(j,this),U};function j(z){var U=z._readableState;U.readableListening=z.listenerCount("readable")>0,U.resumeScheduled&&!U.paused?U.flowing=!0:z.listenerCount("data")>0&&z.resume()}function D(z){w("readable nexttick read 0"),z.read(0)}$.prototype.resume=function(){var z=this._readableState;return z.flowing||(w("resume"),z.flowing=!z.readableListening,V(this,z)),z.paused=!1,this};function V(z,U){U.resumeScheduled||(U.resumeScheduled=!0,Dt.nextTick(Q,z,U))}function Q(z,U){w("resume",U.reading),U.reading||z.read(0),U.resumeScheduled=!1,z.emit("resume"),Z(z),U.flowing&&!U.reading&&z.read(0)}$.prototype.pause=function(){return w("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(w("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Z(z){var U=z._readableState;for(w("flow",U.flowing);U.flowing&&z.read()!==null;);}$.prototype.wrap=function(z){var U=this,G=this._readableState,J=!1;z.on("end",function(){if(w("wrapped end"),G.decoder&&!G.ended){var B=G.decoder.end();B&&B.length&&U.push(B)}U.push(null)}),z.on("data",function(B){if(w("wrapped data"),G.decoder&&(B=G.decoder.write(B)),!(G.objectMode&&B==null)&&!(!G.objectMode&&(!B||!B.length))){var T=U.push(B);T||(J=!0,z.pause())}});for(var et in z)this[et]===void 0&&typeof z[et]=="function"&&(this[et]=function(B){return function(){return z[B].apply(z,arguments)}}(et));for(var C=0;C<H.length;C++)z.on(H[C],this.emit.bind(this,H[C]));return this._read=function(B){w("wrapped _read",B),J&&(J=!1,z.resume())},this},typeof Symbol=="function"&&($.prototype[Symbol.asyncIterator]=function(){return I===void 0&&(I=I3()),I(this)}),Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty($.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty($.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(z){this._readableState&&(this._readableState.flowing=z)}}),$._fromList=tt,Object.defineProperty($.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function tt(z,U){if(U.length===0)return null;var G;return U.objectMode?G=U.buffer.shift():!z||z>=U.length?(U.decoder?G=U.buffer.join(""):U.buffer.length===1?G=U.buffer.first():G=U.buffer.concat(U.length),U.buffer.clear()):G=U.buffer.consume(z,U.decoder),G}function Y(z){var U=z._readableState;w("endReadable",U.endEmitted),U.endEmitted||(U.ended=!0,Dt.nextTick(rt,U,z))}function rt(z,U){if(w("endReadableNT",z.endEmitted,z.length),!z.endEmitted&&z.length===0&&(z.endEmitted=!0,U.readable=!1,U.emit("end"),z.autoDestroy)){var G=U._writableState;(!G||G.autoDestroy&&G.finished)&&U.destroy()}}typeof Symbol=="function"&&($.from=function(z,U){return L===void 0&&(L=B3()),L($,z,U)});function It(z,U){for(var G=0,J=z.length;G<J;G++)if(z[G]===U)return G;return-1}return dl}var ml=gi,Sa=rn.codes,L3=Sa.ERR_METHOD_NOT_IMPLEMENTED,U3=Sa.ERR_MULTIPLE_CALLBACK,q3=Sa.ERR_TRANSFORM_ALREADY_TRANSFORMING,$3=Sa.ERR_TRANSFORM_WITH_LENGTH_0,Aa=nn();Ht(gi,Aa);function T3(t,r){var h=this._transformState;h.transforming=!1;var a=h.writecb;if(a===null)return this.emit("error",new U3);h.writechunk=null,h.writecb=null,r!=null&&this.push(r),a(t);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function gi(t){if(!(this instanceof gi))return new gi(t);Aa.call(this,t),this._transformState={afterTransform:T3.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",D3)}function D3(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,h){ip(t,r,h)}):ip(this,null,null)}gi.prototype.push=function(t,r){return this._transformState.needTransform=!1,Aa.prototype.push.call(this,t,r)},gi.prototype._transform=function(t,r,h){h(new L3("_transform()"))},gi.prototype._write=function(t,r,h){var a=this._transformState;if(a.writecb=h,a.writechunk=t,a.writeencoding=r,!a.transforming){var d=this._readableState;(a.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},gi.prototype._read=function(t){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0},gi.prototype._destroy=function(t,r){Aa.prototype._destroy.call(this,t,function(h){r(h)})};function ip(t,r,h){if(r)return t.emit("error",r);if(h!=null&&t.push(h),t._writableState.length)throw new $3;if(t._transformState.transforming)throw new q3;return t.push(null)}var np=Fo,op=ml;Ht(Fo,op);function Fo(t){if(!(this instanceof Fo))return new Fo(t);op.call(this,t)}Fo.prototype._transform=function(t,r,h){h(null,t)};var gl;function P3(t){var r=!1;return function(){r||(r=!0,t.apply(void 0,arguments))}}var sp=rn.codes,N3=sp.ERR_MISSING_ARGS,z3=sp.ERR_STREAM_DESTROYED;function F3(t){if(t)throw t}function V3(t){return t.setHeader&&typeof t.abort=="function"}function H3(t,r,h,a){a=P3(a);var d=!1;t.on("close",function(){d=!0}),gl===void 0&&(gl=_a),gl(t,{readable:r,writable:h},function(m){if(m)return a(m);d=!0,a()});var s=!1;return function(m){if(!d&&!s){if(s=!0,V3(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();a(m||new z3("pipe"))}}}function ap(t){t()}function W3(t,r){return t.pipe(r)}function Z3(t){return!t.length||typeof t[t.length-1]!="function"?F3:t.pop()}function K3(){for(var t=arguments.length,r=new Array(t),h=0;h<t;h++)r[h]=arguments[h];var a=Z3(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new N3("streams");var d,s=r.map(function(m,p){var w=p<r.length-1,S=p>0;return H3(m,w,S,function(A){d||(d=A),A&&s.forEach(ap),!w&&(s.forEach(ap),a(d))})});return r.reduce(W3)}var hp=K3;(function(t,r){r=t.exports=pl(),r.Stream=r,r.Readable=r,r.Writable=hl(),r.Duplex=nn(),r.Transform=ml,r.PassThrough=np,r.finished=_a,r.pipeline=hp})(Lu,Lu.exports);var up=Lu.exports,xa=Zt.Buffer,lp=up.Transform,J3=Ht;function Q3(t,r){if(!xa.isBuffer(t)&&typeof t!="string")throw new TypeError(r+" must be a string or a buffer")}function Ui(t){lp.call(this),this._block=xa.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}J3(Ui,lp),Ui.prototype._transform=function(t,r,h){var a=null;try{this.update(t,r)}catch(d){a=d}h(a)},Ui.prototype._flush=function(t){var r=null;try{this.push(this.digest())}catch(h){r=h}t(r)},Ui.prototype.update=function(t,r){if(Q3(t,"Data"),this._finalized)throw new Error("Digest already called");xa.isBuffer(t)||(t=xa.from(t,r));for(var h=this._block,a=0;this._blockOffset+t.length-a>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)h[d++]=t[a++];this._update(),this._blockOffset=0}for(;a<t.length;)h[this._blockOffset++]=t[a++];for(var s=0,m=t.length*8;m>0;++s)this._length[s]+=m,m=this._length[s]/4294967296|0,m>0&&(this._length[s]-=4294967296*m);return this},Ui.prototype._update=function(){throw new Error("_update is not implemented")},Ui.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var r=this._digest();t!==void 0&&(r=r.toString(t)),this._block.fill(0),this._blockOffset=0;for(var h=0;h<4;++h)this._length[h]=0;return r},Ui.prototype._digest=function(){throw new Error("_digest is not implemented")};var fp=Ui,X3=Ht,cp=fp,G3=Zt.Buffer,Y3=new Array(16);function ka(){cp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}X3(ka,cp),ka.prototype._update=function(){for(var t=Y3,r=0;r<16;++r)t[r]=this._block.readInt32LE(r*4);var h=this._a,a=this._b,d=this._c,s=this._d;h=Je(h,a,d,s,t[0],3614090360,7),s=Je(s,h,a,d,t[1],3905402710,12),d=Je(d,s,h,a,t[2],606105819,17),a=Je(a,d,s,h,t[3],3250441966,22),h=Je(h,a,d,s,t[4],4118548399,7),s=Je(s,h,a,d,t[5],1200080426,12),d=Je(d,s,h,a,t[6],2821735955,17),a=Je(a,d,s,h,t[7],4249261313,22),h=Je(h,a,d,s,t[8],1770035416,7),s=Je(s,h,a,d,t[9],2336552879,12),d=Je(d,s,h,a,t[10],4294925233,17),a=Je(a,d,s,h,t[11],2304563134,22),h=Je(h,a,d,s,t[12],1804603682,7),s=Je(s,h,a,d,t[13],4254626195,12),d=Je(d,s,h,a,t[14],2792965006,17),a=Je(a,d,s,h,t[15],1236535329,22),h=Qe(h,a,d,s,t[1],4129170786,5),s=Qe(s,h,a,d,t[6],3225465664,9),d=Qe(d,s,h,a,t[11],643717713,14),a=Qe(a,d,s,h,t[0],3921069994,20),h=Qe(h,a,d,s,t[5],3593408605,5),s=Qe(s,h,a,d,t[10],38016083,9),d=Qe(d,s,h,a,t[15],3634488961,14),a=Qe(a,d,s,h,t[4],3889429448,20),h=Qe(h,a,d,s,t[9],568446438,5),s=Qe(s,h,a,d,t[14],3275163606,9),d=Qe(d,s,h,a,t[3],4107603335,14),a=Qe(a,d,s,h,t[8],1163531501,20),h=Qe(h,a,d,s,t[13],2850285829,5),s=Qe(s,h,a,d,t[2],4243563512,9),d=Qe(d,s,h,a,t[7],1735328473,14),a=Qe(a,d,s,h,t[12],2368359562,20),h=Xe(h,a,d,s,t[5],4294588738,4),s=Xe(s,h,a,d,t[8],2272392833,11),d=Xe(d,s,h,a,t[11],1839030562,16),a=Xe(a,d,s,h,t[14],4259657740,23),h=Xe(h,a,d,s,t[1],2763975236,4),s=Xe(s,h,a,d,t[4],1272893353,11),d=Xe(d,s,h,a,t[7],4139469664,16),a=Xe(a,d,s,h,t[10],3200236656,23),h=Xe(h,a,d,s,t[13],681279174,4),s=Xe(s,h,a,d,t[0],3936430074,11),d=Xe(d,s,h,a,t[3],3572445317,16),a=Xe(a,d,s,h,t[6],76029189,23),h=Xe(h,a,d,s,t[9],3654602809,4),s=Xe(s,h,a,d,t[12],3873151461,11),d=Xe(d,s,h,a,t[15],530742520,16),a=Xe(a,d,s,h,t[2],3299628645,23),h=Ge(h,a,d,s,t[0],4096336452,6),s=Ge(s,h,a,d,t[7],1126891415,10),d=Ge(d,s,h,a,t[14],2878612391,15),a=Ge(a,d,s,h,t[5],4237533241,21),h=Ge(h,a,d,s,t[12],1700485571,6),s=Ge(s,h,a,d,t[3],2399980690,10),d=Ge(d,s,h,a,t[10],4293915773,15),a=Ge(a,d,s,h,t[1],2240044497,21),h=Ge(h,a,d,s,t[8],1873313359,6),s=Ge(s,h,a,d,t[15],4264355552,10),d=Ge(d,s,h,a,t[6],2734768916,15),a=Ge(a,d,s,h,t[13],1309151649,21),h=Ge(h,a,d,s,t[4],4149444226,6),s=Ge(s,h,a,d,t[11],3174756917,10),d=Ge(d,s,h,a,t[2],718787259,15),a=Ge(a,d,s,h,t[9],3951481745,21),this._a=this._a+h|0,this._b=this._b+a|0,this._c=this._c+d|0,this._d=this._d+s|0},ka.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 t=G3.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function Ea(t,r){return t<<r|t>>>32-r}function Je(t,r,h,a,d,s,m){return Ea(t+(r&h|~r&a)+d+s|0,m)+r|0}function Qe(t,r,h,a,d,s,m){return Ea(t+(r&a|h&~a)+d+s|0,m)+r|0}function Xe(t,r,h,a,d,s,m){return Ea(t+(r^h^a)+d+s|0,m)+r|0}function Ge(t,r,h,a,d,s,m){return Ea(t+(h^(r|~a))+d+s|0,m)+r|0}var yl=ka,vl=Ut.Buffer,tw=Ht,dp=fp,ew=new Array(16),Vo=[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],Ho=[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],Wo=[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],Zo=[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],Ko=[0,1518500249,1859775393,2400959708,2840853838],Jo=[1352829926,1548603684,1836072691,2053994217,0];function Ra(){dp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}tw(Ra,dp),Ra.prototype._update=function(){for(var t=ew,r=0;r<16;++r)t[r]=this._block.readInt32LE(r*4);for(var h=this._a|0,a=this._b|0,d=this._c|0,s=this._d|0,m=this._e|0,p=this._a|0,w=this._b|0,S=this._c|0,A=this._d|0,v=this._e|0,_=0;_<80;_+=1){var x,b;_<16?(x=pp(h,a,d,s,m,t[Vo[_]],Ko[0],Wo[_]),b=vp(p,w,S,A,v,t[Ho[_]],Jo[0],Zo[_])):_<32?(x=mp(h,a,d,s,m,t[Vo[_]],Ko[1],Wo[_]),b=yp(p,w,S,A,v,t[Ho[_]],Jo[1],Zo[_])):_<48?(x=gp(h,a,d,s,m,t[Vo[_]],Ko[2],Wo[_]),b=gp(p,w,S,A,v,t[Ho[_]],Jo[2],Zo[_])):_<64?(x=yp(h,a,d,s,m,t[Vo[_]],Ko[3],Wo[_]),b=mp(p,w,S,A,v,t[Ho[_]],Jo[3],Zo[_])):(x=vp(h,a,d,s,m,t[Vo[_]],Ko[4],Wo[_]),b=pp(p,w,S,A,v,t[Ho[_]],Jo[4],Zo[_])),h=m,m=s,s=on(d,10),d=a,a=x,p=v,v=A,A=on(S,10),S=w,w=b}var M=this._b+d+A|0;this._b=this._c+s+v|0,this._c=this._d+m+p|0,this._d=this._e+h+w|0,this._e=this._a+a+S|0,this._a=M},Ra.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 t=vl.alloc?vl.alloc(20):new vl(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};function on(t,r){return t<<r|t>>>32-r}function pp(t,r,h,a,d,s,m,p){return on(t+(r^h^a)+s+m|0,p)+d|0}function mp(t,r,h,a,d,s,m,p){return on(t+(r&h|~r&a)+s+m|0,p)+d|0}function gp(t,r,h,a,d,s,m,p){return on(t+((r|~h)^a)+s+m|0,p)+d|0}function yp(t,r,h,a,d,s,m,p){return on(t+(r&a|h&~a)+s+m|0,p)+d|0}function vp(t,r,h,a,d,s,m,p){return on(t+(r^(h|~a))+s+m|0,p)+d|0}var bl=Ra,bp={exports:{}},wp=Zt.Buffer;function Oa(t,r){this._block=wp.alloc(t),this._finalSize=r,this._blockSize=t,this._len=0}Oa.prototype.update=function(t,r){typeof t=="string"&&(r=r||"utf8",t=wp.from(t,r));for(var h=this._block,a=this._blockSize,d=t.length,s=this._len,m=0;m<d;){for(var p=s%a,w=Math.min(d-m,a-p),S=0;S<w;S++)h[p+S]=t[m+S];s+=w,m+=w,s%a===0&&this._update(h)}return this._len+=d,this},Oa.prototype.digest=function(t){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var h=this._len*8;if(h<=4294967295)this._block.writeUInt32BE(h,this._blockSize-4);else{var a=(h&4294967295)>>>0,d=(h-a)/4294967296;this._block.writeUInt32BE(d,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s},Oa.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Wn=Oa,rw=Ht,Mp=Wn,iw=Zt.Buffer,nw=[1518500249,1859775393,-1894007588,-899497514],ow=new Array(80);function Qo(){this.init(),this._w=ow,Mp.call(this,64,56)}rw(Qo,Mp),Qo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function sw(t){return t<<5|t>>>27}function aw(t){return t<<30|t>>>2}function hw(t,r,h,a){return t===0?r&h|~r&a:t===2?r&h|r&a|h&a:r^h^a}Qo.prototype._update=function(t){for(var r=this._w,h=this._a|0,a=this._b|0,d=this._c|0,s=this._d|0,m=this._e|0,p=0;p<16;++p)r[p]=t.readInt32BE(p*4);for(;p<80;++p)r[p]=r[p-3]^r[p-8]^r[p-14]^r[p-16];for(var w=0;w<80;++w){var S=~~(w/20),A=sw(h)+hw(S,a,d,s)+m+r[w]+nw[S]|0;m=s,s=d,d=aw(a),a=h,h=A}this._a=h+this._a|0,this._b=a+this._b|0,this._c=d+this._c|0,this._d=s+this._d|0,this._e=m+this._e|0},Qo.prototype._hash=function(){var t=iw.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var uw=Qo,lw=Ht,_p=Wn,fw=Zt.Buffer,cw=[1518500249,1859775393,-1894007588,-899497514],dw=new Array(80);function Xo(){this.init(),this._w=dw,_p.call(this,64,56)}lw(Xo,_p),Xo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function pw(t){return t<<1|t>>>31}function mw(t){return t<<5|t>>>27}function gw(t){return t<<30|t>>>2}function yw(t,r,h,a){return t===0?r&h|~r&a:t===2?r&h|r&a|h&a:r^h^a}Xo.prototype._update=function(t){for(var r=this._w,h=this._a|0,a=this._b|0,d=this._c|0,s=this._d|0,m=this._e|0,p=0;p<16;++p)r[p]=t.readInt32BE(p*4);for(;p<80;++p)r[p]=pw(r[p-3]^r[p-8]^r[p-14]^r[p-16]);for(var w=0;w<80;++w){var S=~~(w/20),A=mw(h)+yw(S,a,d,s)+m+r[w]+cw[S]|0;m=s,s=d,d=gw(a),a=h,h=A}this._a=h+this._a|0,this._b=a+this._b|0,this._c=d+this._c|0,this._d=s+this._d|0,this._e=m+this._e|0},Xo.prototype._hash=function(){var t=fw.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var vw=Xo,bw=Ht,Sp=Wn,ww=Zt.Buffer,Mw=[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],_w=new Array(64);function Go(){this.init(),this._w=_w,Sp.call(this,64,56)}bw(Go,Sp),Go.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 Sw(t,r,h){return h^t&(r^h)}function Aw(t,r,h){return t&r|h&(t|r)}function xw(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function kw(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Ew(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function Rw(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Go.prototype._update=function(t){for(var r=this._w,h=this._a|0,a=this._b|0,d=this._c|0,s=this._d|0,m=this._e|0,p=this._f|0,w=this._g|0,S=this._h|0,A=0;A<16;++A)r[A]=t.readInt32BE(A*4);for(;A<64;++A)r[A]=Rw(r[A-2])+r[A-7]+Ew(r[A-15])+r[A-16]|0;for(var v=0;v<64;++v){var _=S+kw(m)+Sw(m,p,w)+Mw[v]+r[v]|0,x=xw(h)+Aw(h,a,d)|0;S=w,w=p,p=m,m=s+_|0,s=d,d=a,a=h,h=_+x|0}this._a=h+this._a|0,this._b=a+this._b|0,this._c=d+this._c|0,this._d=s+this._d|0,this._e=m+this._e|0,this._f=p+this._f|0,this._g=w+this._g|0,this._h=S+this._h|0},Go.prototype._hash=function(){var t=ww.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Ap=Go,Ow=Ht,jw=Ap,Cw=Wn,Iw=Zt.Buffer,Bw=new Array(64);function ja(){this.init(),this._w=Bw,Cw.call(this,64,56)}Ow(ja,jw),ja.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},ja.prototype._hash=function(){var t=Iw.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var Lw=ja,Uw=Ht,xp=Wn,qw=Zt.Buffer,kp=[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],$w=new Array(160);function Yo(){this.init(),this._w=$w,xp.call(this,128,112)}Uw(Yo,xp),Yo.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 Ep(t,r,h){return h^t&(r^h)}function Rp(t,r,h){return t&r|h&(t|r)}function Op(t,r){return(t>>>28|r<<4)^(r>>>2|t<<30)^(r>>>7|t<<25)}function jp(t,r){return(t>>>14|r<<18)^(t>>>18|r<<14)^(r>>>9|t<<23)}function Tw(t,r){return(t>>>1|r<<31)^(t>>>8|r<<24)^t>>>7}function Dw(t,r){return(t>>>1|r<<31)^(t>>>8|r<<24)^(t>>>7|r<<25)}function Pw(t,r){return(t>>>19|r<<13)^(r>>>29|t<<3)^t>>>6}function Nw(t,r){return(t>>>19|r<<13)^(r>>>29|t<<3)^(t>>>6|r<<26)}function De(t,r){return t>>>0<r>>>0?1:0}Yo.prototype._update=function(t){for(var r=this._w,h=this._ah|0,a=this._bh|0,d=this._ch|0,s=this._dh|0,m=this._eh|0,p=this._fh|0,w=this._gh|0,S=this._hh|0,A=this._al|0,v=this._bl|0,_=this._cl|0,x=this._dl|0,b=this._el|0,M=this._fl|0,O=this._gl|0,k=this._hl|0,R=0;R<32;R+=2)r[R]=t.readInt32BE(R*4),r[R+1]=t.readInt32BE(R*4+4);for(;R<160;R+=2){var I=r[R-30],L=r[R-15*2+1],P=Tw(I,L),H=Dw(L,I);I=r[R-2*2],L=r[R-2*2+1];var W=Pw(I,L),q=Nw(L,I),$=r[R-7*2],N=r[R-7*2+1],e=r[R-16*2],o=r[R-16*2+1],n=H+N|0,u=P+$+De(n,H)|0;n=n+q|0,u=u+W+De(n,q)|0,n=n+o|0,u=u+e+De(n,o)|0,r[R]=u,r[R+1]=n}for(var l=0;l<160;l+=2){u=r[l],n=r[l+1];var g=Rp(h,a,d),y=Rp(A,v,_),c=Op(h,A),i=Op(A,h),f=jp(m,b),E=jp(b,m),j=kp[l],D=kp[l+1],V=Ep(m,p,w),Q=Ep(b,M,O),Z=k+E|0,tt=S+f+De(Z,k)|0;Z=Z+Q|0,tt=tt+V+De(Z,Q)|0,Z=Z+D|0,tt=tt+j+De(Z,D)|0,Z=Z+n|0,tt=tt+u+De(Z,n)|0;var Y=i+y|0,rt=c+g+De(Y,i)|0;S=w,k=O,w=p,O=M,p=m,M=b,b=x+Z|0,m=s+tt+De(b,x)|0,s=d,x=_,d=a,_=v,a=h,v=A,A=Z+Y|0,h=tt+rt+De(A,Z)|0}this._al=this._al+A|0,this._bl=this._bl+v|0,this._cl=this._cl+_|0,this._dl=this._dl+x|0,this._el=this._el+b|0,this._fl=this._fl+M|0,this._gl=this._gl+O|0,this._hl=this._hl+k|0,this._ah=this._ah+h+De(this._al,A)|0,this._bh=this._bh+a+De(this._bl,v)|0,this._ch=this._ch+d+De(this._cl,_)|0,this._dh=this._dh+s+De(this._dl,x)|0,this._eh=this._eh+m+De(this._el,b)|0,this._fh=this._fh+p+De(this._fl,M)|0,this._gh=this._gh+w+De(this._gl,O)|0,this._hh=this._hh+S+De(this._hl,k)|0},Yo.prototype._hash=function(){var t=qw.allocUnsafe(64);function r(h,a,d){t.writeInt32BE(h,d),t.writeInt32BE(a,d+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),r(this._gh,this._gl,48),r(this._hh,this._hl,56),t};var Cp=Yo,zw=Ht,Fw=Cp,Vw=Wn,Hw=Zt.Buffer,Ww=new Array(160);function Ca(){this.init(),this._w=Ww,Vw.call(this,128,112)}zw(Ca,Fw),Ca.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},Ca.prototype._hash=function(){var t=Hw.allocUnsafe(48);function r(h,a,d){t.writeInt32BE(h,d),t.writeInt32BE(a,d+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),t};var Zw=Ca,qi=bp.exports=function(t){t=t.toLowerCase();var r=qi[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};qi.sha=uw,qi.sha1=vw,qi.sha224=Lw,qi.sha256=Ap,qi.sha384=Zw,qi.sha512=Cp;var wl=bp.exports,Kw=yr,Ml=qu.EventEmitter,Jw=Ht;Jw(yr,Ml),yr.Readable=pl(),yr.Writable=hl(),yr.Duplex=nn(),yr.Transform=ml,yr.PassThrough=np,yr.finished=_a,yr.pipeline=hp,yr.Stream=yr;function yr(){Ml.call(this)}yr.prototype.pipe=function(t,r){var h=this;function a(A){t.writable&&t.write(A)===!1&&h.pause&&h.pause()}h.on("data",a);function d(){h.readable&&h.resume&&h.resume()}t.on("drain",d),!t._isStdio&&(!r||r.end!==!1)&&(h.on("end",m),h.on("close",p));var s=!1;function m(){s||(s=!0,t.end())}function p(){s||(s=!0,typeof t.destroy=="function"&&t.destroy())}function w(A){if(S(),Ml.listenerCount(this,"error")===0)throw A}h.on("error",w),t.on("error",w);function S(){h.removeListener("data",a),t.removeListener("drain",d),h.removeListener("end",m),h.removeListener("close",p),h.removeListener("error",w),t.removeListener("error",w),h.removeListener("end",S),h.removeListener("close",S),t.removeListener("close",S)}return h.on("end",S),h.on("close",S),t.on("close",S),t.emit("pipe",h),t};var Ip=Zt.Buffer,Bp=Kw.Transform,Qw=Ma.StringDecoder,Xw=Ht;function Br(t){Bp.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Xw(Br,Bp),Br.prototype.update=function(t,r,h){typeof t=="string"&&(t=Ip.from(t,r));var a=this._update(t);return this.hashMode?this:(h&&(a=this._toString(a,h)),a)},Br.prototype.setAutoPadding=function(){},Br.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Br.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Br.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Br.prototype._transform=function(t,r,h){var a;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(d){a=d}finally{h(a)}},Br.prototype._flush=function(t){var r;try{this.push(this.__final())}catch(h){r=h}t(r)},Br.prototype._finalOrDigest=function(t){var r=this.__final()||Ip.alloc(0);return t&&(r=this._toString(r,t,!0)),r},Br.prototype._toString=function(t,r,h){if(this._decoder||(this._decoder=new Qw(r),this._encoding=r),this._encoding!==r)throw new Error("can't switch encodings");var a=this._decoder.write(t);return h&&(a+=this._decoder.end()),a};var $i=Br,Gw=Ht,Yw=yl,t4=bl,e4=wl,Lp=$i;function Ia(t){Lp.call(this,"digest"),this._hash=t}Gw(Ia,Lp),Ia.prototype._update=function(t){this._hash.update(t)},Ia.prototype._final=function(){return this._hash.digest()};var ts=function(t){return t=t.toLowerCase(),t==="md5"?new Yw:t==="rmd160"||t==="ripemd160"?new t4:new Ia(e4(t))},r4=Ht,sn=Zt.Buffer,Up=$i,i4=sn.alloc(128),Zn=64;function Ba(t,r){Up.call(this,"digest"),typeof r=="string"&&(r=sn.from(r)),this._alg=t,this._key=r,r.length>Zn?r=t(r):r.length<Zn&&(r=sn.concat([r,i4],Zn));for(var h=this._ipad=sn.allocUnsafe(Zn),a=this._opad=sn.allocUnsafe(Zn),d=0;d<Zn;d++)h[d]=r[d]^54,a[d]=r[d]^92;this._hash=[h]}r4(Ba,Up),Ba.prototype._update=function(t){this._hash.push(t)},Ba.prototype._final=function(){var t=this._alg(sn.concat(this._hash));return this._alg(sn.concat([this._opad,t]))};var n4=Ba,o4=yl,qp=function(t){return new o4().update(t).digest()},s4=Ht,a4=n4,$p=$i,es=Zt.Buffer,h4=qp,_l=bl,Sl=wl,u4=es.alloc(128);function rs(t,r){$p.call(this,"digest"),typeof r=="string"&&(r=es.from(r));var h=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=r,r.length>h){var a=t==="rmd160"?new _l:Sl(t);r=a.update(r).digest()}else r.length<h&&(r=es.concat([r,u4],h));for(var d=this._ipad=es.allocUnsafe(h),s=this._opad=es.allocUnsafe(h),m=0;m<h;m++)d[m]=r[m]^54,s[m]=r[m]^92;this._hash=t==="rmd160"?new _l:Sl(t),this._hash.update(d)}s4(rs,$p),rs.prototype._update=function(t){this._hash.update(t)},rs.prototype._final=function(){var t=this._hash.digest(),r=this._alg==="rmd160"?new _l:Sl(this._alg);return r.update(this._opad).update(t).digest()};var Tp=function(t,r){return t=t.toLowerCase(),t==="rmd160"||t==="ripemd160"?new rs("rmd160",r):t==="md5"?new a4(h4,r):new rs(t,r)};let l4={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},f4={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},c4={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},d4={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},p4={sign:"ecdsa",hash:"sha256",id:""},m4={sign:"ecdsa",hash:"sha224",id:""},g4={sign:"ecdsa",hash:"sha384",id:""},y4={sign:"ecdsa",hash:"sha512",id:""},v4={sign:"dsa",hash:"sha1",id:""},b4={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},w4={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},Dp={sha224WithRSAEncryption:l4,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:f4,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:c4,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:d4,"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:p4,sha224:m4,sha384:g4,sha512:y4,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:v4,"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:b4,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:w4,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var M4=Dp,La={},_4=Math.pow(2,30)-1,Pp=function(t,r){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if(typeof r!="number")throw new TypeError("Key length not a number");if(r<0||r>_4||r!==r)throw new TypeError("Bad key length")},Ua;if(Lt.process&&Lt.process.browser)Ua="utf-8";else if(Lt.process&&Lt.process.version){var S4=parseInt(Dt.version.split(".")[0].slice(1),10);Ua=S4>=6?"utf-8":"binary"}else Ua="utf-8";var Np=Ua,Al=Zt.Buffer,zp=function(t,r,h){if(Al.isBuffer(t))return t;if(typeof t=="string")return Al.from(t,r);if(ArrayBuffer.isView(t))return Al.from(t.buffer);throw new TypeError(h+" must be a string, a Buffer, a typed array or a DataView")},A4=qp,x4=bl,k4=wl,an=Zt.Buffer,E4=Pp,Fp=Np,Vp=zp,R4=an.alloc(128),qa={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Hp(t,r,h){var a=O4(t),d=t==="sha512"||t==="sha384"?128:64;r.length>d?r=a(r):r.length<d&&(r=an.concat([r,R4],d));for(var s=an.allocUnsafe(d+qa[t]),m=an.allocUnsafe(d+qa[t]),p=0;p<d;p++)s[p]=r[p]^54,m[p]=r[p]^92;var w=an.allocUnsafe(d+h+4);s.copy(w,0,0,d),this.ipad1=w,this.ipad2=s,this.opad=m,this.alg=t,this.blocksize=d,this.hash=a,this.size=qa[t]}Hp.prototype.run=function(t,r){t.copy(r,this.blocksize);var h=this.hash(r);return h.copy(this.opad,this.blocksize),this.hash(this.opad)};function O4(t){function r(a){return k4(t).update(a).digest()}function h(a){return new x4().update(a).digest()}return t==="rmd160"||t==="ripemd160"?h:t==="md5"?A4:r}function j4(t,r,h,a,d){E4(h,a),t=Vp(t,Fp,"Password"),r=Vp(r,Fp,"Salt"),d=d||"sha1";var s=new Hp(d,t,r.length),m=an.allocUnsafe(a),p=an.allocUnsafe(r.length+4);r.copy(p,0,0,r.length);for(var w=0,S=qa[d],A=Math.ceil(a/S),v=1;v<=A;v++){p.writeUInt32BE(v,r.length);for(var _=s.run(p,s.ipad1),x=_,b=1;b<h;b++){x=s.run(x,s.ipad2);for(var M=0;M<S;M++)_[M]^=x[M]}_.copy(m,w),w+=S}return m}var Wp=j4,Zp=Zt.Buffer,C4=Pp,Kp=Np,Jp=Wp,Qp=zp,$a,is=Lt.crypto&&Lt.crypto.subtle,I4={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"},xl=[];function B4(t){if(Lt.process&&!Lt.process.browser||!is||!is.importKey||!is.deriveBits)return Promise.resolve(!1);if(xl[t]!==void 0)return xl[t];$a=$a||Zp.alloc(8);var r=Xp($a,$a,10,128,t).then(function(){return!0}).catch(function(){return!1});return xl[t]=r,r}var Kn;function kl(){return Kn||(Lt.process&&Lt.process.nextTick?Kn=Lt.process.nextTick:Lt.queueMicrotask?Kn=Lt.queueMicrotask:Lt.setImmediate?Kn=Lt.setImmediate:Kn=Lt.setTimeout,Kn)}function Xp(t,r,h,a,d){return is.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(s){return is.deriveBits({name:"PBKDF2",salt:r,iterations:h,hash:{name:d}},s,a<<3)}).then(function(s){return Zp.from(s)})}function L4(t,r){t.then(function(h){kl()(function(){r(null,h)})},function(h){kl()(function(){r(h)})})}var U4=function(t,r,h,a,d,s){typeof d=="function"&&(s=d,d=void 0),d=d||"sha1";var m=I4[d.toLowerCase()];if(!m||typeof Lt.Promise!="function"){kl()(function(){var p;try{p=Jp(t,r,h,a,d)}catch(w){return s(w)}s(null,p)});return}if(C4(h,a),t=Qp(t,Kp,"Password"),r=Qp(r,Kp,"Salt"),typeof s!="function")throw new Error("No callback provided to pbkdf2");L4(B4(m).then(function(p){return p?Xp(t,r,h,a,m):Jp(t,r,h,a,d)}),s)};La.pbkdf2=U4,La.pbkdf2Sync=Wp;var Lr={},Jn={},ur={};ur.readUInt32BE=function(t,r){var h=t[0+r]<<24|t[1+r]<<16|t[2+r]<<8|t[3+r];return h>>>0},ur.writeUInt32BE=function(t,r,h){t[0+h]=r>>>24,t[1+h]=r>>>16&255,t[2+h]=r>>>8&255,t[3+h]=r&255},ur.ip=function(t,r,h,a){for(var d=0,s=0,m=6;m>=0;m-=2){for(var p=0;p<=24;p+=8)d<<=1,d|=r>>>p+m&1;for(var p=0;p<=24;p+=8)d<<=1,d|=t>>>p+m&1}for(var m=6;m>=0;m-=2){for(var p=1;p<=25;p+=8)s<<=1,s|=r>>>p+m&1;for(var p=1;p<=25;p+=8)s<<=1,s|=t>>>p+m&1}h[a+0]=d>>>0,h[a+1]=s>>>0},ur.rip=function(t,r,h,a){for(var d=0,s=0,m=0;m<4;m++)for(var p=24;p>=0;p-=8)d<<=1,d|=r>>>p+m&1,d<<=1,d|=t>>>p+m&1;for(var m=4;m<8;m++)for(var p=24;p>=0;p-=8)s<<=1,s|=r>>>p+m&1,s<<=1,s|=t>>>p+m&1;h[a+0]=d>>>0,h[a+1]=s>>>0},ur.pc1=function(t,r,h,a){for(var d=0,s=0,m=7;m>=5;m--){for(var p=0;p<=24;p+=8)d<<=1,d|=r>>p+m&1;for(var p=0;p<=24;p+=8)d<<=1,d|=t>>p+m&1}for(var p=0;p<=24;p+=8)d<<=1,d|=r>>p+m&1;for(var m=1;m<=3;m++){for(var p=0;p<=24;p+=8)s<<=1,s|=r>>p+m&1;for(var p=0;p<=24;p+=8)s<<=1,s|=t>>p+m&1}for(var p=0;p<=24;p+=8)s<<=1,s|=t>>p+m&1;h[a+0]=d>>>0,h[a+1]=s>>>0},ur.r28shl=function(t,r){return t<<r&268435455|t>>>28-r};var Ta=[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];ur.pc2=function(t,r,h,a){for(var d=0,s=0,m=Ta.length>>>1,p=0;p<m;p++)d<<=1,d|=t>>>Ta[p]&1;for(var p=m;p<Ta.length;p++)s<<=1,s|=r>>>Ta[p]&1;h[a+0]=d>>>0,h[a+1]=s>>>0},ur.expand=function(t,r,h){var a=0,d=0;a=(t&1)<<5|t>>>27;for(var s=23;s>=15;s-=4)a<<=6,a|=t>>>s&63;for(var s=11;s>=3;s-=4)d|=t>>>s&63,d<<=6;d|=(t&31)<<1|t>>>31,r[h+0]=a>>>0,r[h+1]=d>>>0};var Gp=[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];ur.substitute=function(t,r){for(var h=0,a=0;a<4;a++){var d=t>>>18-a*6&63,s=Gp[a*64+d];h<<=4,h|=s}for(var a=0;a<4;a++){var d=r>>>18-a*6&63,s=Gp[4*64+a*64+d];h<<=4,h|=s}return h>>>0};var Yp=[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];ur.permute=function(t){for(var r=0,h=0;h<Yp.length;h++)r<<=1,r|=t>>>Yp[h]&1;return r>>>0},ur.padSplit=function(t,r,h){for(var a=t.toString(2);a.length<r;)a="0"+a;for(var d=[],s=0;s<r;s+=h)d.push(a.slice(s,s+h));return d.join(" ")};var vr=t1;function t1(t,r){if(!t)throw new Error(r||"Assertion failed")}t1.equal=function(t,r,h){if(t!=r)throw new Error(h||"Assertion failed: "+t+" != "+r)};var q4=vr;function br(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}var El=br;br.prototype._init=function(){},br.prototype.update=function(t){return t.length===0?[]:this.type==="decrypt"?this._updateDecrypt(t):this._updateEncrypt(t)},br.prototype._buffer=function(t,r){for(var h=Math.min(this.buffer.length-this.bufferOff,t.length-r),a=0;a<h;a++)this.buffer[this.bufferOff+a]=t[r+a];return this.bufferOff+=h,h},br.prototype._flushBuffer=function(t,r){return this._update(this.buffer,0,t,r),this.bufferOff=0,this.blockSize},br.prototype._updateEncrypt=function(t){var r=0,h=0,a=(this.bufferOff+t.length)/this.blockSize|0,d=new Array(a*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(t,r),this.bufferOff===this.buffer.length&&(h+=this._flushBuffer(d,h)));for(var s=t.length-(t.length-r)%this.blockSize;r<s;r+=this.blockSize)this._update(t,r,d,h),h+=this.blockSize;for(;r<t.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=t[r];return d},br.prototype._updateDecrypt=function(t){for(var r=0,h=0,a=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,d=new Array(a*this.blockSize);a>0;a--)r+=this._buffer(t,r),h+=this._flushBuffer(d,h);return r+=this._buffer(t,r),d},br.prototype.final=function(t){var r;t&&(r=this.update(t));var h;return this.type==="encrypt"?h=this._finalEncrypt():h=this._finalDecrypt(),r?r.concat(h):h},br.prototype._pad=function(t,r){if(r===0)return!1;for(;r<t.length;)t[r++]=0;return!0},br.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},br.prototype._unpad=function(t){return t},br.prototype._finalDecrypt=function(){q4.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)};var e1=vr,$4=Ht,$e=ur,r1=El;function T4(){this.tmp=new Array(2),this.keys=null}function Xr(t){r1.call(this,t);var r=new T4;this._desState=r,this.deriveKeys(r,t.key)}$4(Xr,r1);var i1=Xr;Xr.create=function(t){return new Xr(t)};var D4=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Xr.prototype.deriveKeys=function(t,r){t.keys=new Array(16*2),e1.equal(r.length,this.blockSize,"Invalid key length");var h=$e.readUInt32BE(r,0),a=$e.readUInt32BE(r,4);$e.pc1(h,a,t.tmp,0),h=t.tmp[0],a=t.tmp[1];for(var d=0;d<t.keys.length;d+=2){var s=D4[d>>>1];h=$e.r28shl(h,s),a=$e.r28shl(a,s),$e.pc2(h,a,t.keys,d)}},Xr.prototype._update=function(t,r,h,a){var d=this._desState,s=$e.readUInt32BE(t,r),m=$e.readUInt32BE(t,r+4);$e.ip(s,m,d.tmp,0),s=d.tmp[0],m=d.tmp[1],this.type==="encrypt"?this._encrypt(d,s,m,d.tmp,0):this._decrypt(d,s,m,d.tmp,0),s=d.tmp[0],m=d.tmp[1],$e.writeUInt32BE(h,s,a),$e.writeUInt32BE(h,m,a+4)},Xr.prototype._pad=function(t,r){if(this.padding===!1)return!1;for(var h=t.length-r,a=r;a<t.length;a++)t[a]=h;return!0},Xr.prototype._unpad=function(t){if(this.padding===!1)return t;for(var r=t[t.length-1],h=t.length-r;h<t.length;h++)e1.equal(t[h],r);return t.slice(0,t.length-r)},Xr.prototype._encrypt=function(t,r,h,a,d){for(var s=r,m=h,p=0;p<t.keys.length;p+=2){var w=t.keys[p],S=t.keys[p+1];$e.expand(m,t.tmp,0),w^=t.tmp[0],S^=t.tmp[1];var A=$e.substitute(w,S),v=$e.permute(A),_=m;m=(s^v)>>>0,s=_}$e.rip(m,s,a,d)},Xr.prototype._decrypt=function(t,r,h,a,d){for(var s=h,m=r,p=t.keys.length-2;p>=0;p-=2){var w=t.keys[p],S=t.keys[p+1];$e.expand(s,t.tmp,0),w^=t.tmp[0],S^=t.tmp[1];var A=$e.substitute(w,S),v=$e.permute(A),_=s;s=(m^v)>>>0,m=_}$e.rip(s,m,a,d)};var n1={},P4=vr,N4=Ht,Da={};function z4(t){P4.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var r=0;r<this.iv.length;r++)this.iv[r]=t[r]}function F4(t){function r(s){t.call(this,s),this._cbcInit()}N4(r,t);for(var h=Object.keys(Da),a=0;a<h.length;a++){var d=h[a];r.prototype[d]=Da[d]}return r.create=function(s){return new r(s)},r}n1.instantiate=F4,Da._cbcInit=function(){var t=new z4(this.options.iv);this._cbcState=t},Da._update=function(t,r,h,a){var d=this._cbcState,s=this.constructor.super_.prototype,m=d.iv;if(this.type==="encrypt"){for(var p=0;p<this.blockSize;p++)m[p]^=t[r+p];s._update.call(this,m,0,h,a);for(var p=0;p<this.blockSize;p++)m[p]=h[a+p]}else{s._update.call(this,t,r,h,a);for(var p=0;p<this.blockSize;p++)h[a+p]^=m[p];for(var p=0;p<this.blockSize;p++)m[p]=t[r+p]}};var V4=vr,H4=Ht,o1=El,Ti=i1;function W4(t,r){V4.equal(r.length,24,"Invalid key length");var h=r.slice(0,8),a=r.slice(8,16),d=r.slice(16,24);t==="encrypt"?this.ciphers=[Ti.create({type:"encrypt",key:h}),Ti.create({type:"decrypt",key:a}),Ti.create({type:"encrypt",key:d})]:this.ciphers=[Ti.create({type:"decrypt",key:d}),Ti.create({type:"encrypt",key:a}),Ti.create({type:"decrypt",key:h})]}function hn(t){o1.call(this,t);var r=new W4(this.type,this.options.key);this._edeState=r}H4(hn,o1);var Z4=hn;hn.create=function(t){return new hn(t)},hn.prototype._update=function(t,r,h,a){var d=this._edeState;d.ciphers[0]._update(t,r,h,a),d.ciphers[1]._update(h,a,h,a),d.ciphers[2]._update(h,a,h,a)},hn.prototype._pad=Ti.prototype._pad,hn.prototype._unpad=Ti.prototype._unpad,Jn.utils=ur,Jn.Cipher=El,Jn.DES=i1,Jn.CBC=n1,Jn.EDE=Z4;var s1=$i,yi=Jn,K4=Ht,un=Zt.Buffer,ns={"des-ede3-cbc":yi.CBC.instantiate(yi.EDE),"des-ede3":yi.EDE,"des-ede-cbc":yi.CBC.instantiate(yi.EDE),"des-ede":yi.EDE,"des-cbc":yi.CBC.instantiate(yi.DES),"des-ecb":yi.DES};ns.des=ns["des-cbc"],ns.des3=ns["des-ede3-cbc"];var J4=Pa;K4(Pa,s1);function Pa(t){s1.call(this);var r=t.mode.toLowerCase(),h=ns[r],a;t.decrypt?a="decrypt":a="encrypt";var d=t.key;un.isBuffer(d)||(d=un.from(d)),(r==="des-ede"||r==="des-ede-cbc")&&(d=un.concat([d,d.slice(0,8)]));var s=t.iv;un.isBuffer(s)||(s=un.from(s)),this._des=h.create({key:d,iv:s,type:a})}Pa.prototype._update=function(t){return un.from(this._des.update(t))},Pa.prototype._final=function(){return un.from(this._des.final())};var lr={},Rl={},Ol={};Ol.encrypt=function(t,r){return t._cipher.encryptBlock(r)},Ol.decrypt=function(t,r){return t._cipher.decryptBlock(r)};var jl={},os=function(t,r){for(var h=Math.min(t.length,r.length),a=new Ut.Buffer(h),d=0;d<h;++d)a[d]=t[d]^r[d];return a},a1=os;jl.encrypt=function(t,r){var h=a1(r,t._prev);return t._prev=t._cipher.encryptBlock(h),t._prev},jl.decrypt=function(t,r){var h=t._prev;t._prev=r;var a=t._cipher.decryptBlock(r);return a1(a,h)};var h1={},ss=Zt.Buffer,Q4=os;function u1(t,r,h){var a=r.length,d=Q4(r,t._cache);return t._cache=t._cache.slice(a),t._prev=ss.concat([t._prev,h?r:d]),d}h1.encrypt=function(t,r,h){for(var a=ss.allocUnsafe(0),d;r.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=ss.allocUnsafe(0)),t._cache.length<=r.length)d=t._cache.length,a=ss.concat([a,u1(t,r.slice(0,d),h)]),r=r.slice(d);else{a=ss.concat([a,u1(t,r,h)]);break}return a};var l1={},Cl=Zt.Buffer;function X4(t,r,h){var a=t._cipher.encryptBlock(t._prev),d=a[0]^r;return t._prev=Cl.concat([t._prev.slice(1),Cl.from([h?r:d])]),d}l1.encrypt=function(t,r,h){for(var a=r.length,d=Cl.allocUnsafe(a),s=-1;++s<a;)d[s]=X4(t,r[s],h);return d};var f1={},Na=Zt.Buffer;function G4(t,r,h){for(var a,d=-1,s=8,m=0,p,w;++d<s;)a=t._cipher.encryptBlock(t._prev),p=r&1<<7-d?128:0,w=a[0]^p,m+=(w&128)>>d%8,t._prev=Y4(t._prev,h?p:w);return m}function Y4(t,r){var h=t.length,a=-1,d=Na.allocUnsafe(t.length);for(t=Na.concat([t,Na.from([r])]);++a<h;)d[a]=t[a]<<1|t[a+1]>>7;return d}f1.encrypt=function(t,r,h){for(var a=r.length,d=Na.allocUnsafe(a),s=-1;++s<a;)d[s]=G4(t,r[s],h);return d};var c1={},t7=os;function e7(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}c1.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=Ut.Buffer.concat([t._cache,e7(t)]);var h=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),t7(r,h)};var Il={};function r7(t){for(var r=t.length,h;r--;)if(h=t.readUInt8(r),h===255)t.writeUInt8(0,r);else{h++,t.writeUInt8(h,r);break}}var d1=r7,i7=os,p1=Zt.Buffer,n7=d1;function o7(t){var r=t._cipher.encryptBlockRaw(t._prev);return n7(t._prev),r}var Bl=16;Il.encrypt=function(t,r){var h=Math.ceil(r.length/Bl),a=t._cache.length;t._cache=p1.concat([t._cache,p1.allocUnsafe(h*Bl)]);for(var d=0;d<h;d++){var s=o7(t),m=a+d*Bl;t._cache.writeUInt32BE(s[0],m+0),t._cache.writeUInt32BE(s[1],m+4),t._cache.writeUInt32BE(s[2],m+8),t._cache.writeUInt32BE(s[3],m+12)}var p=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),i7(r,p)};let s7={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},a7={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},h7={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},m1={"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:s7,aes192:a7,aes256:h7,"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 u7={ECB:Ol,CBC:jl,CFB:h1,CFB8:l1,CFB1:f1,OFB:c1,CTR:Il,GCM:Il},za=m1;for(var g1 in za)za[g1].module=u7[za[g1].mode];var Ll=za,as={},Fa=Zt.Buffer;function Ul(t){Fa.isBuffer(t)||(t=Fa.from(t));for(var r=t.length/4|0,h=new Array(r),a=0;a<r;a++)h[a]=t.readUInt32BE(a*4);return h}function ql(t){for(var r=0;r<t.length;t++)t[r]=0}function y1(t,r,h,a,d){for(var s=h[0],m=h[1],p=h[2],w=h[3],S=t[0]^r[0],A=t[1]^r[1],v=t[2]^r[2],_=t[3]^r[3],x,b,M,O,k=4,R=1;R<d;R++)x=s[S>>>24]^m[A>>>16&255]^p[v>>>8&255]^w[_&255]^r[k++],b=s[A>>>24]^m[v>>>16&255]^p[_>>>8&255]^w[S&255]^r[k++],M=s[v>>>24]^m[_>>>16&255]^p[S>>>8&255]^w[A&255]^r[k++],O=s[_>>>24]^m[S>>>16&255]^p[A>>>8&255]^w[v&255]^r[k++],S=x,A=b,v=M,_=O;return x=(a[S>>>24]<<24|a[A>>>16&255]<<16|a[v>>>8&255]<<8|a[_&255])^r[k++],b=(a[A>>>24]<<24|a[v>>>16&255]<<16|a[_>>>8&255]<<8|a[S&255])^r[k++],M=(a[v>>>24]<<24|a[_>>>16&255]<<16|a[S>>>8&255]<<8|a[A&255])^r[k++],O=(a[_>>>24]<<24|a[S>>>16&255]<<16|a[A>>>8&255]<<8|a[v&255])^r[k++],x=x>>>0,b=b>>>0,M=M>>>0,O=O>>>0,[x,b,M,O]}var l7=[0,1,2,4,8,16,32,64,128,27,54],qe=function(){for(var t=new Array(256),r=0;r<256;r++)r<128?t[r]=r<<1:t[r]=r<<1^283;for(var h=[],a=[],d=[[],[],[],[]],s=[[],[],[],[]],m=0,p=0,w=0;w<256;++w){var S=p^p<<1^p<<2^p<<3^p<<4;S=S>>>8^S&255^99,h[m]=S,a[S]=m;var A=t[m],v=t[A],_=t[v],x=t[S]*257^S*16843008;d[0][m]=x<<24|x>>>8,d[1][m]=x<<16|x>>>16,d[2][m]=x<<8|x>>>24,d[3][m]=x,x=_*16843009^v*65537^A*257^m*16843008,s[0][S]=x<<24|x>>>8,s[1][S]=x<<16|x>>>16,s[2][S]=x<<8|x>>>24,s[3][S]=x,m===0?m=p=1:(m=A^t[t[t[_^A]]],p^=t[t[p]])}return{SBOX:h,INV_SBOX:a,SUB_MIX:d,INV_SUB_MIX:s}}();function wr(t){this._key=Ul(t),this._reset()}wr.blockSize=4*4,wr.keySize=256/8,wr.prototype.blockSize=wr.blockSize,wr.prototype.keySize=wr.keySize,wr.prototype._reset=function(){for(var t=this._key,r=t.length,h=r+6,a=(h+1)*4,d=[],s=0;s<r;s++)d[s]=t[s];for(s=r;s<a;s++){var m=d[s-1];s%r===0?(m=m<<8|m>>>24,m=qe.SBOX[m>>>24]<<24|qe.SBOX[m>>>16&255]<<16|qe.SBOX[m>>>8&255]<<8|qe.SBOX[m&255],m^=l7[s/r|0]<<24):r>6&&s%r===4&&(m=qe.SBOX[m>>>24]<<24|qe.SBOX[m>>>16&255]<<16|qe.SBOX[m>>>8&255]<<8|qe.SBOX[m&255]),d[s]=d[s-r]^m}for(var p=[],w=0;w<a;w++){var S=a-w,A=d[S-(w%4?0:4)];w<4||S<=4?p[w]=A:p[w]=qe.INV_SUB_MIX[0][qe.SBOX[A>>>24]]^qe.INV_SUB_MIX[1][qe.SBOX[A>>>16&255]]^qe.INV_SUB_MIX[2][qe.SBOX[A>>>8&255]]^qe.INV_SUB_MIX[3][qe.SBOX[A&255]]}this._nRounds=h,this._keySchedule=d,this._invKeySchedule=p},wr.prototype.encryptBlockRaw=function(t){return t=Ul(t),y1(t,this._keySchedule,qe.SUB_MIX,qe.SBOX,this._nRounds)},wr.prototype.encryptBlock=function(t){var r=this.encryptBlockRaw(t),h=Fa.allocUnsafe(16);return h.writeUInt32BE(r[0],0),h.writeUInt32BE(r[1],4),h.writeUInt32BE(r[2],8),h.writeUInt32BE(r[3],12),h},wr.prototype.decryptBlock=function(t){t=Ul(t);var r=t[1];t[1]=t[3],t[3]=r;var h=y1(t,this._invKeySchedule,qe.INV_SUB_MIX,qe.INV_SBOX,this._nRounds),a=Fa.allocUnsafe(16);return a.writeUInt32BE(h[0],0),a.writeUInt32BE(h[3],4),a.writeUInt32BE(h[2],8),a.writeUInt32BE(h[1],12),a},wr.prototype.scrub=function(){ql(this._keySchedule),ql(this._invKeySchedule),ql(this._key)},as.AES=wr;var Qn=Zt.Buffer,f7=Qn.alloc(16,0);function c7(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function v1(t){var r=Qn.allocUnsafe(16);return r.writeUInt32BE(t[0]>>>0,0),r.writeUInt32BE(t[1]>>>0,4),r.writeUInt32BE(t[2]>>>0,8),r.writeUInt32BE(t[3]>>>0,12),r}function hs(t){this.h=t,this.state=Qn.alloc(16,0),this.cache=Qn.allocUnsafe(0)}hs.prototype.ghash=function(t){for(var r=-1;++r<t.length;)this.state[r]^=t[r];this._multiply()},hs.prototype._multiply=function(){for(var t=c7(this.h),r=[0,0,0,0],h,a,d,s=-1;++s<128;){for(a=(this.state[~~(s/8)]&1<<7-s%8)!==0,a&&(r[0]^=t[0],r[1]^=t[1],r[2]^=t[2],r[3]^=t[3]),d=(t[3]&1)!==0,h=3;h>0;h--)t[h]=t[h]>>>1|(t[h-1]&1)<<31;t[0]=t[0]>>>1,d&&(t[0]=t[0]^225<<24)}this.state=v1(r)},hs.prototype.update=function(t){this.cache=Qn.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},hs.prototype.final=function(t,r){return this.cache.length&&this.ghash(Qn.concat([this.cache,f7],16)),this.ghash(v1([0,t,0,r])),this.state};var d7=hs,p7=as,or=Zt.Buffer,b1=$i,m7=Ht,w1=d7,g7=os,y7=d1;function v7(t,r){var h=0;t.length!==r.length&&h++;for(var a=Math.min(t.length,r.length),d=0;d<a;++d)h+=t[d]^r[d];return h}function b7(t,r,h){if(r.length===12)return t._finID=or.concat([r,or.from([0,0,0,1])]),or.concat([r,or.from([0,0,0,2])]);var a=new w1(h),d=r.length,s=d%16;a.update(r),s&&(s=16-s,a.update(or.alloc(s,0))),a.update(or.alloc(8,0));var m=d*8,p=or.alloc(8);p.writeUIntBE(m,0,8),a.update(p),t._finID=a.state;var w=or.from(t._finID);return y7(w),w}function ln(t,r,h,a){b1.call(this);var d=or.alloc(4,0);this._cipher=new p7.AES(r);var s=this._cipher.encryptBlock(d);this._ghash=new w1(s),h=b7(this,h,s),this._prev=or.from(h),this._cache=or.allocUnsafe(0),this._secCache=or.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}m7(ln,b1),ln.prototype._update=function(t){if(!this._called&&this._alen){var r=16-this._alen%16;r<16&&(r=or.alloc(r,0),this._ghash.update(r))}this._called=!0;var h=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(h),this._len+=t.length,h},ln.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=g7(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&v7(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},ln.prototype.getAuthTag=function(){if(this._decrypt||!or.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},ln.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},ln.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};var M1=ln,w7=as,$l=Zt.Buffer,_1=$i,M7=Ht;function Va(t,r,h,a){_1.call(this),this._cipher=new w7.AES(r),this._prev=$l.from(h),this._cache=$l.allocUnsafe(0),this._secCache=$l.allocUnsafe(0),this._decrypt=a,this._mode=t}M7(Va,_1),Va.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},Va.prototype._final=function(){this._cipher.scrub()};var S1=Va,fn=Zt.Buffer,_7=yl;function S7(t,r,h,a){if(fn.isBuffer(t)||(t=fn.from(t,"binary")),r&&(fn.isBuffer(r)||(r=fn.from(r,"binary")),r.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var d=h/8,s=fn.alloc(d),m=fn.alloc(a||0),p=fn.alloc(0);d>0||a>0;){var w=new _7;w.update(p),w.update(t),r&&w.update(r),p=w.digest();var S=0;if(d>0){var A=s.length-d;S=Math.min(d,p.length),p.copy(s,A,0,S),d-=S}if(S<p.length&&a>0){var v=m.length-a,_=Math.min(a,p.length-S);p.copy(m,v,S,S+_),a-=_}}return p.fill(0),{key:s,iv:m}}var Ha=S7,A1=Ll,A7=M1,vi=Zt.Buffer,x7=S1,x1=$i,k7=as,E7=Ha,R7=Ht;function us(t,r,h){x1.call(this),this._cache=new Wa,this._cipher=new k7.AES(r),this._prev=vi.from(h),this._mode=t,this._autopadding=!0}R7(us,x1),us.prototype._update=function(t){this._cache.add(t);for(var r,h,a=[];r=this._cache.get();)h=this._mode.encrypt(this,r),a.push(h);return vi.concat(a)};var O7=vi.alloc(16,16);us.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(O7))throw this._cipher.scrub(),new Error("data not multiple of block length")},us.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Wa(){this.cache=vi.allocUnsafe(0)}Wa.prototype.add=function(t){this.cache=vi.concat([this.cache,t])},Wa.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},Wa.prototype.flush=function(){for(var t=16-this.cache.length,r=vi.allocUnsafe(t),h=-1;++h<t;)r.writeUInt8(t,h);return vi.concat([this.cache,r])};function k1(t,r,h){var a=A1[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=vi.from(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(typeof h=="string"&&(h=vi.from(h)),a.mode!=="GCM"&&h.length!==a.iv)throw new TypeError("invalid iv length "+h.length);return a.type==="stream"?new x7(a.module,r,h):a.type==="auth"?new A7(a.module,r,h):new us(a.module,r,h)}function j7(t,r){var h=A1[t.toLowerCase()];if(!h)throw new TypeError("invalid suite type");var a=E7(r,!1,h.key,h.iv);return k1(t,a.key,a.iv)}Rl.createCipheriv=k1,Rl.createCipher=j7;var Tl={},C7=M1,Xn=Zt.Buffer,E1=Ll,I7=S1,R1=$i,B7=as,L7=Ha,U7=Ht;function ls(t,r,h){R1.call(this),this._cache=new Za,this._last=void 0,this._cipher=new B7.AES(r),this._prev=Xn.from(h),this._mode=t,this._autopadding=!0}U7(ls,R1),ls.prototype._update=function(t){this._cache.add(t);for(var r,h,a=[];r=this._cache.get(this._autopadding);)h=this._mode.decrypt(this,r),a.push(h);return Xn.concat(a)},ls.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return q7(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},ls.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Za(){this.cache=Xn.allocUnsafe(0)}Za.prototype.add=function(t){this.cache=Xn.concat([this.cache,t])},Za.prototype.get=function(t){var r;if(t){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},Za.prototype.flush=function(){if(this.cache.length)return this.cache};function q7(t){var r=t[15];if(r<1||r>16)throw new Error("unable to decrypt data");for(var h=-1;++h<r;)if(t[h+(16-r)]!==r)throw new Error("unable to decrypt data");if(r!==16)return t.slice(0,16-r)}function O1(t,r,h){var a=E1[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if(typeof h=="string"&&(h=Xn.from(h)),a.mode!=="GCM"&&h.length!==a.iv)throw new TypeError("invalid iv length "+h.length);if(typeof r=="string"&&(r=Xn.from(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);return a.type==="stream"?new I7(a.module,r,h,!0):a.type==="auth"?new C7(a.module,r,h,!0):new ls(a.module,r,h)}function $7(t,r){var h=E1[t.toLowerCase()];if(!h)throw new TypeError("invalid suite type");var a=L7(r,!1,h.key,h.iv);return O1(t,a.key,a.iv)}Tl.createDecipher=$7,Tl.createDecipheriv=O1;var j1=Rl,C1=Tl,T7=m1;function D7(){return Object.keys(T7)}lr.createCipher=lr.Cipher=j1.createCipher,lr.createCipheriv=lr.Cipheriv=j1.createCipheriv,lr.createDecipher=lr.Decipher=C1.createDecipher,lr.createDecipheriv=lr.Decipheriv=C1.createDecipheriv,lr.listCiphers=lr.getCiphers=D7;var I1={};(function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}})(I1);var B1=J4,Dl=lr,Di=Ll,bi=I1,L1=Ha;function P7(t,r){t=t.toLowerCase();var h,a;if(Di[t])h=Di[t].key,a=Di[t].iv;else if(bi[t])h=bi[t].key*8,a=bi[t].iv;else throw new TypeError("invalid suite type");var d=L1(r,!1,h,a);return U1(t,d.key,d.iv)}function N7(t,r){t=t.toLowerCase();var h,a;if(Di[t])h=Di[t].key,a=Di[t].iv;else if(bi[t])h=bi[t].key*8,a=bi[t].iv;else throw new TypeError("invalid suite type");var d=L1(r,!1,h,a);return q1(t,d.key,d.iv)}function U1(t,r,h){if(t=t.toLowerCase(),Di[t])return Dl.createCipheriv(t,r,h);if(bi[t])return new B1({key:r,iv:h,mode:t});throw new TypeError("invalid suite type")}function q1(t,r,h){if(t=t.toLowerCase(),Di[t])return Dl.createDecipheriv(t,r,h);if(bi[t])return new B1({key:r,iv:h,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function z7(){return Object.keys(bi).concat(Dl.getCiphers())}Lr.createCipher=Lr.Cipher=P7,Lr.createCipheriv=Lr.Cipheriv=U1,Lr.createDecipher=Lr.Decipher=N7,Lr.createDecipheriv=Lr.Decipheriv=q1,Lr.listCiphers=Lr.getCiphers=z7;var cn={},Pl={exports:{}};Pl.exports,function(t){(function(r,h){function a(e,o){if(!e)throw new Error(o||"Assertion failed")}function d(e,o){e.super_=o;var n=function(){};n.prototype=o.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,o,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((o==="le"||o==="be")&&(n=o,o=10),this._init(e||0,o||10,n||"be"))}typeof r=="object"?r.exports=s:h.BN=s,s.BN=s,s.wordSize=26;var m;try{typeof window<"u"&&typeof window.Buffer<"u"?m=window.Buffer:m=Ut.Buffer}catch{}s.isBN=function(e){return e instanceof s?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,o){return e.cmp(o)>0?e:o},s.min=function(e,o){return e.cmp(o)<0?e:o},s.prototype._init=function(e,o,n){if(typeof e=="number")return this._initNumber(e,o,n);if(typeof e=="object")return this._initArray(e,o,n);o==="hex"&&(o=16),a(o===(o|0)&&o>=2&&o<=36),e=e.toString().replace(/\s+/g,"");var u=0;e[0]==="-"&&(u++,this.negative=1),u<e.length&&(o===16?this._parseHex(e,u,n):(this._parseBase(e,o,u),n==="le"&&this._initArray(this.toArray(),o,n)))},s.prototype._initNumber=function(e,o,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):(a(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),o,n)},s.prototype._initArray=function(e,o,n){if(a(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 u=0;u<this.length;u++)this.words[u]=0;var l,g,y=0;if(n==="be")for(u=e.length-1,l=0;u>=0;u-=3)g=e[u]|e[u-1]<<8|e[u-2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);else if(n==="le")for(u=0,l=0;u<e.length;u+=3)g=e[u]|e[u+1]<<8|e[u+2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);return this.strip()};function p(e,o){var n=e.charCodeAt(o);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function w(e,o,n){var u=p(e,n);return n-1>=o&&(u|=p(e,n-1)<<4),u}s.prototype._parseHex=function(e,o,n){this.length=Math.ceil((e.length-o)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,g=0,y;if(n==="be")for(u=e.length-1;u>=o;u-=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8;else{var c=e.length-o;for(u=c%2===0?o+1:o;u<e.length;u+=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8}this.strip()};function S(e,o,n,u){for(var l=0,g=Math.min(e.length,n),y=o;y<g;y++){var c=e.charCodeAt(y)-48;l*=u,c>=49?l+=c-49+10:c>=17?l+=c-17+10:l+=c}return l}s.prototype._parseBase=function(e,o,n){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=o)u++;u--,l=l/o|0;for(var g=e.length-n,y=g%u,c=Math.min(g,g-y)+n,i=0,f=n;f<c;f+=u)i=S(e,f,f+u,o),this.imuln(l),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(y!==0){var E=1;for(i=S(e,f,e.length,o),f=0;f<y;f++)E*=o;this.imuln(E),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var o=0;o<this.length;o++)e.words[o]=this.words[o];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[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],_=[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];s.prototype.toString=function(e,o){e=e||10,o=o|0||1;var n;if(e===16||e==="hex"){n="";for(var u=0,l=0,g=0;g<this.length;g++){var y=this.words[g],c=((y<<u|l)&16777215).toString(16);l=y>>>24-u&16777215,l!==0||g!==this.length-1?n=A[6-c.length]+c+n:n=c+n,u+=2,u>=26&&(u-=26,g--)}for(l!==0&&(n=l.toString(16)+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var i=v[e],f=_[e];n="";var E=this.clone();for(E.negative=0;!E.isZero();){var j=E.modn(f).toString(e);E=E.idivn(f),E.isZero()?n=j+n:n=A[i-j.length]+j+n}for(this.isZero()&&(n="0"+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},s.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&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,o){return a(typeof m<"u"),this.toArrayLike(m,e,o)},s.prototype.toArray=function(e,o){return this.toArrayLike(Array,e,o)},s.prototype.toArrayLike=function(e,o,n){var u=this.byteLength(),l=n||Math.max(1,u);a(u<=l,"byte array longer than desired length"),a(l>0,"Requested array length <= 0"),this.strip();var g=o==="le",y=new e(l),c,i,f=this.clone();if(g){for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[i]=c;for(;i<l;i++)y[i]=0}else{for(i=0;i<l-u;i++)y[i]=0;for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[l-i-1]=c}return y},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var o=e,n=0;return o>=4096&&(n+=13,o>>>=13),o>=64&&(n+=7,o>>>=7),o>=8&&(n+=4,o>>>=4),o>=2&&(n+=2,o>>>=2),n+o},s.prototype._zeroBits=function(e){if(e===0)return 26;var o=e,n=0;return o&8191||(n+=13,o>>>=13),o&127||(n+=7,o>>>=7),o&15||(n+=4,o>>>=4),o&3||(n+=2,o>>>=2),o&1||n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],o=this._countBits(e);return(this.length-1)*26+o};function x(e){for(var o=new Array(e.bitLength()),n=0;n<o.length;n++){var u=n/26|0,l=n%26;o[n]=(e.words[u]&1<<l)>>>l}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,o=0;o<this.length;o++){var n=this._zeroBits(this.words[o]);if(e+=n,n!==26)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var o=0;o<e.length;o++)this.words[o]=this.words[o]|e.words[o];return this.strip()},s.prototype.ior=function(e){return a((this.negative|e.negative)===0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var o;this.length>e.length?o=e:o=this;for(var n=0;n<o.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=o.length,this.strip()},s.prototype.iand=function(e){return a((this.negative|e.negative)===0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var o,n;this.length>e.length?(o=this,n=e):(o=e,n=this);for(var u=0;u<n.length;u++)this.words[u]=o.words[u]^n.words[u];if(this!==o)for(;u<o.length;u++)this.words[u]=o.words[u];return this.length=o.length,this.strip()},s.prototype.ixor=function(e){return a((this.negative|e.negative)===0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){a(typeof e=="number"&&e>=0);var o=Math.ceil(e/26)|0,n=e%26;this._expand(o),n>0&&o--;for(var u=0;u<o;u++)this.words[u]=~this.words[u]&67108863;return n>0&&(this.words[u]=~this.words[u]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,o){a(typeof e=="number"&&e>=0);var n=e/26|0,u=e%26;return this._expand(n+1),o?this.words[n]=this.words[n]|1<<u:this.words[n]=this.words[n]&~(1<<u),this.strip()},s.prototype.iadd=function(e){var o;if(this.negative!==0&&e.negative===0)return this.negative=0,o=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,o=this.isub(e),e.negative=1,o._normSign();var n,u;this.length>e.length?(n=this,u=e):(n=e,u=this);for(var l=0,g=0;g<u.length;g++)o=(n.words[g]|0)+(u.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;for(;l!==0&&g<n.length;g++)o=(n.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;if(this.length=n.length,l!==0)this.words[this.length]=l,this.length++;else if(n!==this)for(;g<n.length;g++)this.words[g]=n.words[g];return this},s.prototype.add=function(e){var o;return e.negative!==0&&this.negative===0?(e.negative=0,o=this.sub(e),e.negative^=1,o):e.negative===0&&this.negative!==0?(this.negative=0,o=e.sub(this),this.negative=1,o):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var o=this.iadd(e);return e.negative=1,o._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 u,l;n>0?(u=this,l=e):(u=e,l=this);for(var g=0,y=0;y<l.length;y++)o=(u.words[y]|0)-(l.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;for(;g!==0&&y<u.length;y++)o=(u.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;if(g===0&&y<u.length&&u!==this)for(;y<u.length;y++)this.words[y]=u.words[y];return this.length=Math.max(this.length,y),u!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};function b(e,o,n){n.negative=o.negative^e.negative;var u=e.length+o.length|0;n.length=u,u=u-1|0;var l=e.words[0]|0,g=o.words[0]|0,y=l*g,c=y&67108863,i=y/67108864|0;n.words[0]=c;for(var f=1;f<u;f++){for(var E=i>>>26,j=i&67108863,D=Math.min(f,o.length-1),V=Math.max(0,f-e.length+1);V<=D;V++){var Q=f-V|0;l=e.words[Q]|0,g=o.words[V]|0,y=l*g+j,E+=y/67108864|0,j=y&67108863}n.words[f]=j|0,i=E|0}return i!==0?n.words[f]=i|0:n.length--,n.strip()}var M=function(e,o,n){var u=e.words,l=o.words,g=n.words,y=0,c,i,f,E=u[0]|0,j=E&8191,D=E>>>13,V=u[1]|0,Q=V&8191,Z=V>>>13,tt=u[2]|0,Y=tt&8191,rt=tt>>>13,It=u[3]|0,z=It&8191,U=It>>>13,G=u[4]|0,J=G&8191,et=G>>>13,C=u[5]|0,B=C&8191,T=C>>>13,F=u[6]|0,K=F&8191,X=F>>>13,ut=u[7]|0,it=ut&8191,ot=ut>>>13,Ct=u[8]|0,nt=Ct&8191,st=Ct>>>13,Bt=u[9]|0,at=Bt&8191,bt=Bt>>>13,qt=l[0]|0,lt=qt&8191,Mt=qt>>>13,Ft=l[1]|0,ht=Ft&8191,wt=Ft>>>13,Vt=l[2]|0,ft=Vt&8191,_t=Vt>>>13,Kt=l[3]|0,ct=Kt&8191,St=Kt>>>13,Jt=l[4]|0,dt=Jt&8191,At=Jt>>>13,Qt=l[5]|0,pt=Qt&8191,xt=Qt>>>13,Xt=l[6]|0,mt=Xt&8191,kt=Xt>>>13,Gt=l[7]|0,gt=Gt&8191,Et=Gt>>>13,Yt=l[8]|0,yt=Yt&8191,Rt=Yt>>>13,te=l[9]|0,vt=te&8191,Ot=te>>>13;n.negative=e.negative^o.negative,n.length=19,c=Math.imul(j,lt),i=Math.imul(j,Mt),i=i+Math.imul(D,lt)|0,f=Math.imul(D,Mt);var $t=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,c=Math.imul(Q,lt),i=Math.imul(Q,Mt),i=i+Math.imul(Z,lt)|0,f=Math.imul(Z,Mt),c=c+Math.imul(j,ht)|0,i=i+Math.imul(j,wt)|0,i=i+Math.imul(D,ht)|0,f=f+Math.imul(D,wt)|0;var Tt=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,c=Math.imul(Y,lt),i=Math.imul(Y,Mt),i=i+Math.imul(rt,lt)|0,f=Math.imul(rt,Mt),c=c+Math.imul(Q,ht)|0,i=i+Math.imul(Q,wt)|0,i=i+Math.imul(Z,ht)|0,f=f+Math.imul(Z,wt)|0,c=c+Math.imul(j,ft)|0,i=i+Math.imul(j,_t)|0,i=i+Math.imul(D,ft)|0,f=f+Math.imul(D,_t)|0;var ue=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ue>>>26)|0,ue&=67108863,c=Math.imul(z,lt),i=Math.imul(z,Mt),i=i+Math.imul(U,lt)|0,f=Math.imul(U,Mt),c=c+Math.imul(Y,ht)|0,i=i+Math.imul(Y,wt)|0,i=i+Math.imul(rt,ht)|0,f=f+Math.imul(rt,wt)|0,c=c+Math.imul(Q,ft)|0,i=i+Math.imul(Q,_t)|0,i=i+Math.imul(Z,ft)|0,f=f+Math.imul(Z,_t)|0,c=c+Math.imul(j,ct)|0,i=i+Math.imul(j,St)|0,i=i+Math.imul(D,ct)|0,f=f+Math.imul(D,St)|0;var le=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(le>>>26)|0,le&=67108863,c=Math.imul(J,lt),i=Math.imul(J,Mt),i=i+Math.imul(et,lt)|0,f=Math.imul(et,Mt),c=c+Math.imul(z,ht)|0,i=i+Math.imul(z,wt)|0,i=i+Math.imul(U,ht)|0,f=f+Math.imul(U,wt)|0,c=c+Math.imul(Y,ft)|0,i=i+Math.imul(Y,_t)|0,i=i+Math.imul(rt,ft)|0,f=f+Math.imul(rt,_t)|0,c=c+Math.imul(Q,ct)|0,i=i+Math.imul(Q,St)|0,i=i+Math.imul(Z,ct)|0,f=f+Math.imul(Z,St)|0,c=c+Math.imul(j,dt)|0,i=i+Math.imul(j,At)|0,i=i+Math.imul(D,dt)|0,f=f+Math.imul(D,At)|0;var fe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(fe>>>26)|0,fe&=67108863,c=Math.imul(B,lt),i=Math.imul(B,Mt),i=i+Math.imul(T,lt)|0,f=Math.imul(T,Mt),c=c+Math.imul(J,ht)|0,i=i+Math.imul(J,wt)|0,i=i+Math.imul(et,ht)|0,f=f+Math.imul(et,wt)|0,c=c+Math.imul(z,ft)|0,i=i+Math.imul(z,_t)|0,i=i+Math.imul(U,ft)|0,f=f+Math.imul(U,_t)|0,c=c+Math.imul(Y,ct)|0,i=i+Math.imul(Y,St)|0,i=i+Math.imul(rt,ct)|0,f=f+Math.imul(rt,St)|0,c=c+Math.imul(Q,dt)|0,i=i+Math.imul(Q,At)|0,i=i+Math.imul(Z,dt)|0,f=f+Math.imul(Z,At)|0,c=c+Math.imul(j,pt)|0,i=i+Math.imul(j,xt)|0,i=i+Math.imul(D,pt)|0,f=f+Math.imul(D,xt)|0;var ce=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ce>>>26)|0,ce&=67108863,c=Math.imul(K,lt),i=Math.imul(K,Mt),i=i+Math.imul(X,lt)|0,f=Math.imul(X,Mt),c=c+Math.imul(B,ht)|0,i=i+Math.imul(B,wt)|0,i=i+Math.imul(T,ht)|0,f=f+Math.imul(T,wt)|0,c=c+Math.imul(J,ft)|0,i=i+Math.imul(J,_t)|0,i=i+Math.imul(et,ft)|0,f=f+Math.imul(et,_t)|0,c=c+Math.imul(z,ct)|0,i=i+Math.imul(z,St)|0,i=i+Math.imul(U,ct)|0,f=f+Math.imul(U,St)|0,c=c+Math.imul(Y,dt)|0,i=i+Math.imul(Y,At)|0,i=i+Math.imul(rt,dt)|0,f=f+Math.imul(rt,At)|0,c=c+Math.imul(Q,pt)|0,i=i+Math.imul(Q,xt)|0,i=i+Math.imul(Z,pt)|0,f=f+Math.imul(Z,xt)|0,c=c+Math.imul(j,mt)|0,i=i+Math.imul(j,kt)|0,i=i+Math.imul(D,mt)|0,f=f+Math.imul(D,kt)|0;var de=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(de>>>26)|0,de&=67108863,c=Math.imul(it,lt),i=Math.imul(it,Mt),i=i+Math.imul(ot,lt)|0,f=Math.imul(ot,Mt),c=c+Math.imul(K,ht)|0,i=i+Math.imul(K,wt)|0,i=i+Math.imul(X,ht)|0,f=f+Math.imul(X,wt)|0,c=c+Math.imul(B,ft)|0,i=i+Math.imul(B,_t)|0,i=i+Math.imul(T,ft)|0,f=f+Math.imul(T,_t)|0,c=c+Math.imul(J,ct)|0,i=i+Math.imul(J,St)|0,i=i+Math.imul(et,ct)|0,f=f+Math.imul(et,St)|0,c=c+Math.imul(z,dt)|0,i=i+Math.imul(z,At)|0,i=i+Math.imul(U,dt)|0,f=f+Math.imul(U,At)|0,c=c+Math.imul(Y,pt)|0,i=i+Math.imul(Y,xt)|0,i=i+Math.imul(rt,pt)|0,f=f+Math.imul(rt,xt)|0,c=c+Math.imul(Q,mt)|0,i=i+Math.imul(Q,kt)|0,i=i+Math.imul(Z,mt)|0,f=f+Math.imul(Z,kt)|0,c=c+Math.imul(j,gt)|0,i=i+Math.imul(j,Et)|0,i=i+Math.imul(D,gt)|0,f=f+Math.imul(D,Et)|0;var pe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(pe>>>26)|0,pe&=67108863,c=Math.imul(nt,lt),i=Math.imul(nt,Mt),i=i+Math.imul(st,lt)|0,f=Math.imul(st,Mt),c=c+Math.imul(it,ht)|0,i=i+Math.imul(it,wt)|0,i=i+Math.imul(ot,ht)|0,f=f+Math.imul(ot,wt)|0,c=c+Math.imul(K,ft)|0,i=i+Math.imul(K,_t)|0,i=i+Math.imul(X,ft)|0,f=f+Math.imul(X,_t)|0,c=c+Math.imul(B,ct)|0,i=i+Math.imul(B,St)|0,i=i+Math.imul(T,ct)|0,f=f+Math.imul(T,St)|0,c=c+Math.imul(J,dt)|0,i=i+Math.imul(J,At)|0,i=i+Math.imul(et,dt)|0,f=f+Math.imul(et,At)|0,c=c+Math.imul(z,pt)|0,i=i+Math.imul(z,xt)|0,i=i+Math.imul(U,pt)|0,f=f+Math.imul(U,xt)|0,c=c+Math.imul(Y,mt)|0,i=i+Math.imul(Y,kt)|0,i=i+Math.imul(rt,mt)|0,f=f+Math.imul(rt,kt)|0,c=c+Math.imul(Q,gt)|0,i=i+Math.imul(Q,Et)|0,i=i+Math.imul(Z,gt)|0,f=f+Math.imul(Z,Et)|0,c=c+Math.imul(j,yt)|0,i=i+Math.imul(j,Rt)|0,i=i+Math.imul(D,yt)|0,f=f+Math.imul(D,Rt)|0;var me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(at,lt),i=Math.imul(at,Mt),i=i+Math.imul(bt,lt)|0,f=Math.imul(bt,Mt),c=c+Math.imul(nt,ht)|0,i=i+Math.imul(nt,wt)|0,i=i+Math.imul(st,ht)|0,f=f+Math.imul(st,wt)|0,c=c+Math.imul(it,ft)|0,i=i+Math.imul(it,_t)|0,i=i+Math.imul(ot,ft)|0,f=f+Math.imul(ot,_t)|0,c=c+Math.imul(K,ct)|0,i=i+Math.imul(K,St)|0,i=i+Math.imul(X,ct)|0,f=f+Math.imul(X,St)|0,c=c+Math.imul(B,dt)|0,i=i+Math.imul(B,At)|0,i=i+Math.imul(T,dt)|0,f=f+Math.imul(T,At)|0,c=c+Math.imul(J,pt)|0,i=i+Math.imul(J,xt)|0,i=i+Math.imul(et,pt)|0,f=f+Math.imul(et,xt)|0,c=c+Math.imul(z,mt)|0,i=i+Math.imul(z,kt)|0,i=i+Math.imul(U,mt)|0,f=f+Math.imul(U,kt)|0,c=c+Math.imul(Y,gt)|0,i=i+Math.imul(Y,Et)|0,i=i+Math.imul(rt,gt)|0,f=f+Math.imul(rt,Et)|0,c=c+Math.imul(Q,yt)|0,i=i+Math.imul(Q,Rt)|0,i=i+Math.imul(Z,yt)|0,f=f+Math.imul(Z,Rt)|0,c=c+Math.imul(j,vt)|0,i=i+Math.imul(j,Ot)|0,i=i+Math.imul(D,vt)|0,f=f+Math.imul(D,Ot)|0;var ge=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(at,ht),i=Math.imul(at,wt),i=i+Math.imul(bt,ht)|0,f=Math.imul(bt,wt),c=c+Math.imul(nt,ft)|0,i=i+Math.imul(nt,_t)|0,i=i+Math.imul(st,ft)|0,f=f+Math.imul(st,_t)|0,c=c+Math.imul(it,ct)|0,i=i+Math.imul(it,St)|0,i=i+Math.imul(ot,ct)|0,f=f+Math.imul(ot,St)|0,c=c+Math.imul(K,dt)|0,i=i+Math.imul(K,At)|0,i=i+Math.imul(X,dt)|0,f=f+Math.imul(X,At)|0,c=c+Math.imul(B,pt)|0,i=i+Math.imul(B,xt)|0,i=i+Math.imul(T,pt)|0,f=f+Math.imul(T,xt)|0,c=c+Math.imul(J,mt)|0,i=i+Math.imul(J,kt)|0,i=i+Math.imul(et,mt)|0,f=f+Math.imul(et,kt)|0,c=c+Math.imul(z,gt)|0,i=i+Math.imul(z,Et)|0,i=i+Math.imul(U,gt)|0,f=f+Math.imul(U,Et)|0,c=c+Math.imul(Y,yt)|0,i=i+Math.imul(Y,Rt)|0,i=i+Math.imul(rt,yt)|0,f=f+Math.imul(rt,Rt)|0,c=c+Math.imul(Q,vt)|0,i=i+Math.imul(Q,Ot)|0,i=i+Math.imul(Z,vt)|0,f=f+Math.imul(Z,Ot)|0;var ye=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(at,ft),i=Math.imul(at,_t),i=i+Math.imul(bt,ft)|0,f=Math.imul(bt,_t),c=c+Math.imul(nt,ct)|0,i=i+Math.imul(nt,St)|0,i=i+Math.imul(st,ct)|0,f=f+Math.imul(st,St)|0,c=c+Math.imul(it,dt)|0,i=i+Math.imul(it,At)|0,i=i+Math.imul(ot,dt)|0,f=f+Math.imul(ot,At)|0,c=c+Math.imul(K,pt)|0,i=i+Math.imul(K,xt)|0,i=i+Math.imul(X,pt)|0,f=f+Math.imul(X,xt)|0,c=c+Math.imul(B,mt)|0,i=i+Math.imul(B,kt)|0,i=i+Math.imul(T,mt)|0,f=f+Math.imul(T,kt)|0,c=c+Math.imul(J,gt)|0,i=i+Math.imul(J,Et)|0,i=i+Math.imul(et,gt)|0,f=f+Math.imul(et,Et)|0,c=c+Math.imul(z,yt)|0,i=i+Math.imul(z,Rt)|0,i=i+Math.imul(U,yt)|0,f=f+Math.imul(U,Rt)|0,c=c+Math.imul(Y,vt)|0,i=i+Math.imul(Y,Ot)|0,i=i+Math.imul(rt,vt)|0,f=f+Math.imul(rt,Ot)|0;var ve=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(at,ct),i=Math.imul(at,St),i=i+Math.imul(bt,ct)|0,f=Math.imul(bt,St),c=c+Math.imul(nt,dt)|0,i=i+Math.imul(nt,At)|0,i=i+Math.imul(st,dt)|0,f=f+Math.imul(st,At)|0,c=c+Math.imul(it,pt)|0,i=i+Math.imul(it,xt)|0,i=i+Math.imul(ot,pt)|0,f=f+Math.imul(ot,xt)|0,c=c+Math.imul(K,mt)|0,i=i+Math.imul(K,kt)|0,i=i+Math.imul(X,mt)|0,f=f+Math.imul(X,kt)|0,c=c+Math.imul(B,gt)|0,i=i+Math.imul(B,Et)|0,i=i+Math.imul(T,gt)|0,f=f+Math.imul(T,Et)|0,c=c+Math.imul(J,yt)|0,i=i+Math.imul(J,Rt)|0,i=i+Math.imul(et,yt)|0,f=f+Math.imul(et,Rt)|0,c=c+Math.imul(z,vt)|0,i=i+Math.imul(z,Ot)|0,i=i+Math.imul(U,vt)|0,f=f+Math.imul(U,Ot)|0;var be=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(be>>>26)|0,be&=67108863,c=Math.imul(at,dt),i=Math.imul(at,At),i=i+Math.imul(bt,dt)|0,f=Math.imul(bt,At),c=c+Math.imul(nt,pt)|0,i=i+Math.imul(nt,xt)|0,i=i+Math.imul(st,pt)|0,f=f+Math.imul(st,xt)|0,c=c+Math.imul(it,mt)|0,i=i+Math.imul(it,kt)|0,i=i+Math.imul(ot,mt)|0,f=f+Math.imul(ot,kt)|0,c=c+Math.imul(K,gt)|0,i=i+Math.imul(K,Et)|0,i=i+Math.imul(X,gt)|0,f=f+Math.imul(X,Et)|0,c=c+Math.imul(B,yt)|0,i=i+Math.imul(B,Rt)|0,i=i+Math.imul(T,yt)|0,f=f+Math.imul(T,Rt)|0,c=c+Math.imul(J,vt)|0,i=i+Math.imul(J,Ot)|0,i=i+Math.imul(et,vt)|0,f=f+Math.imul(et,Ot)|0;var we=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(at,pt),i=Math.imul(at,xt),i=i+Math.imul(bt,pt)|0,f=Math.imul(bt,xt),c=c+Math.imul(nt,mt)|0,i=i+Math.imul(nt,kt)|0,i=i+Math.imul(st,mt)|0,f=f+Math.imul(st,kt)|0,c=c+Math.imul(it,gt)|0,i=i+Math.imul(it,Et)|0,i=i+Math.imul(ot,gt)|0,f=f+Math.imul(ot,Et)|0,c=c+Math.imul(K,yt)|0,i=i+Math.imul(K,Rt)|0,i=i+Math.imul(X,yt)|0,f=f+Math.imul(X,Rt)|0,c=c+Math.imul(B,vt)|0,i=i+Math.imul(B,Ot)|0,i=i+Math.imul(T,vt)|0,f=f+Math.imul(T,Ot)|0;var Me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(at,mt),i=Math.imul(at,kt),i=i+Math.imul(bt,mt)|0,f=Math.imul(bt,kt),c=c+Math.imul(nt,gt)|0,i=i+Math.imul(nt,Et)|0,i=i+Math.imul(st,gt)|0,f=f+Math.imul(st,Et)|0,c=c+Math.imul(it,yt)|0,i=i+Math.imul(it,Rt)|0,i=i+Math.imul(ot,yt)|0,f=f+Math.imul(ot,Rt)|0,c=c+Math.imul(K,vt)|0,i=i+Math.imul(K,Ot)|0,i=i+Math.imul(X,vt)|0,f=f+Math.imul(X,Ot)|0;var _e=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(at,gt),i=Math.imul(at,Et),i=i+Math.imul(bt,gt)|0,f=Math.imul(bt,Et),c=c+Math.imul(nt,yt)|0,i=i+Math.imul(nt,Rt)|0,i=i+Math.imul(st,yt)|0,f=f+Math.imul(st,Rt)|0,c=c+Math.imul(it,vt)|0,i=i+Math.imul(it,Ot)|0,i=i+Math.imul(ot,vt)|0,f=f+Math.imul(ot,Ot)|0;var Se=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(at,yt),i=Math.imul(at,Rt),i=i+Math.imul(bt,yt)|0,f=Math.imul(bt,Rt),c=c+Math.imul(nt,vt)|0,i=i+Math.imul(nt,Ot)|0,i=i+Math.imul(st,vt)|0,f=f+Math.imul(st,Ot)|0;var Ae=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(at,vt),i=Math.imul(at,Ot),i=i+Math.imul(bt,vt)|0,f=Math.imul(bt,Ot);var xe=(y+c|0)+((i&8191)<<13)|0;return y=(f+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,g[0]=$t,g[1]=Tt,g[2]=ue,g[3]=le,g[4]=fe,g[5]=ce,g[6]=de,g[7]=pe,g[8]=me,g[9]=ge,g[10]=ye,g[11]=ve,g[12]=be,g[13]=we,g[14]=Me,g[15]=_e,g[16]=Se,g[17]=Ae,g[18]=xe,y!==0&&(g[19]=y,n.length++),n};Math.imul||(M=b);function O(e,o,n){n.negative=o.negative^e.negative,n.length=e.length+o.length;for(var u=0,l=0,g=0;g<n.length-1;g++){var y=l;l=0;for(var c=u&67108863,i=Math.min(g,o.length-1),f=Math.max(0,g-e.length+1);f<=i;f++){var E=g-f,j=e.words[E]|0,D=o.words[f]|0,V=j*D,Q=V&67108863;y=y+(V/67108864|0)|0,Q=Q+c|0,c=Q&67108863,y=y+(Q>>>26)|0,l+=y>>>26,y&=67108863}n.words[g]=c,u=y,y=l}return u!==0?n.words[g]=u:n.length--,n.strip()}function k(e,o,n){var u=new R;return u.mulp(e,o,n)}s.prototype.mulTo=function(e,o){var n,u=this.length+e.length;return this.length===10&&e.length===10?n=M(this,e,o):u<63?n=b(this,e,o):u<1024?n=O(this,e,o):n=k(this,e,o),n};function R(e,o){this.x=e,this.y=o}R.prototype.makeRBT=function(e){for(var o=new Array(e),n=s.prototype._countBits(e)-1,u=0;u<e;u++)o[u]=this.revBin(u,n,e);return o},R.prototype.revBin=function(e,o,n){if(e===0||e===n-1)return e;for(var u=0,l=0;l<o;l++)u|=(e&1)<<o-l-1,e>>=1;return u},R.prototype.permute=function(e,o,n,u,l,g){for(var y=0;y<g;y++)u[y]=o[e[y]],l[y]=n[e[y]]},R.prototype.transform=function(e,o,n,u,l,g){this.permute(g,e,o,n,u,l);for(var y=1;y<l;y<<=1)for(var c=y<<1,i=Math.cos(2*Math.PI/c),f=Math.sin(2*Math.PI/c),E=0;E<l;E+=c)for(var j=i,D=f,V=0;V<y;V++){var Q=n[E+V],Z=u[E+V],tt=n[E+V+y],Y=u[E+V+y],rt=j*tt-D*Y;Y=j*Y+D*tt,tt=rt,n[E+V]=Q+tt,u[E+V]=Z+Y,n[E+V+y]=Q-tt,u[E+V+y]=Z-Y,V!==c&&(rt=i*j-f*D,D=i*D+f*j,j=rt)}},R.prototype.guessLen13b=function(e,o){var n=Math.max(o,e)|1,u=n&1,l=0;for(n=n/2|0;n;n=n>>>1)l++;return 1<<l+1+u},R.prototype.conjugate=function(e,o,n){if(!(n<=1))for(var u=0;u<n/2;u++){var l=e[u];e[u]=e[n-u-1],e[n-u-1]=l,l=o[u],o[u]=-o[n-u-1],o[n-u-1]=-l}},R.prototype.normalize13b=function(e,o){for(var n=0,u=0;u<o/2;u++){var l=Math.round(e[2*u+1]/o)*8192+Math.round(e[2*u]/o)+n;e[u]=l&67108863,l<67108864?n=0:n=l/67108864|0}return e},R.prototype.convert13b=function(e,o,n,u){for(var l=0,g=0;g<o;g++)l=l+(e[g]|0),n[2*g]=l&8191,l=l>>>13,n[2*g+1]=l&8191,l=l>>>13;for(g=2*o;g<u;++g)n[g]=0;a(l===0),a((l&-8192)===0)},R.prototype.stub=function(e){for(var o=new Array(e),n=0;n<e;n++)o[n]=0;return o},R.prototype.mulp=function(e,o,n){var u=2*this.guessLen13b(e.length,o.length),l=this.makeRBT(u),g=this.stub(u),y=new Array(u),c=new Array(u),i=new Array(u),f=new Array(u),E=new Array(u),j=new Array(u),D=n.words;D.length=u,this.convert13b(e.words,e.length,y,u),this.convert13b(o.words,o.length,f,u),this.transform(y,g,c,i,u,l),this.transform(f,g,E,j,u,l);for(var V=0;V<u;V++){var Q=c[V]*E[V]-i[V]*j[V];i[V]=c[V]*j[V]+i[V]*E[V],c[V]=Q}return this.conjugate(c,i,u),this.transform(c,i,D,g,u,l),this.conjugate(D,g,u),this.normalize13b(D,u),n.negative=e.negative^o.negative,n.length=e.length+o.length,n.strip()},s.prototype.mul=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),this.mulTo(e,o)},s.prototype.mulf=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),k(this,e,o)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){a(typeof e=="number"),a(e<67108864);for(var o=0,n=0;n<this.length;n++){var u=(this.words[n]|0)*e,l=(u&67108863)+(o&67108863);o>>=26,o+=u/67108864|0,o+=l>>>26,this.words[n]=l&67108863}return o!==0&&(this.words[n]=o,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var o=x(e);if(o.length===0)return new s(1);for(var n=this,u=0;u<o.length&&o[u]===0;u++,n=n.sqr());if(++u<o.length)for(var l=n.sqr();u<o.length;u++,l=l.sqr())o[u]!==0&&(n=n.mul(l));return n},s.prototype.iushln=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=67108863>>>26-o<<26-o,l;if(o!==0){var g=0;for(l=0;l<this.length;l++){var y=this.words[l]&u,c=(this.words[l]|0)-y<<o;this.words[l]=c|g,g=y>>>26-o}g&&(this.words[l]=g,this.length++)}if(n!==0){for(l=this.length-1;l>=0;l--)this.words[l+n]=this.words[l];for(l=0;l<n;l++)this.words[l]=0;this.length+=n}return this.strip()},s.prototype.ishln=function(e){return a(this.negative===0),this.iushln(e)},s.prototype.iushrn=function(e,o,n){a(typeof e=="number"&&e>=0);var u;o?u=(o-o%26)/26:u=0;var l=e%26,g=Math.min((e-l)/26,this.length),y=67108863^67108863>>>l<<l,c=n;if(u-=g,u=Math.max(0,u),c){for(var i=0;i<g;i++)c.words[i]=this.words[i];c.length=g}if(g!==0)if(this.length>g)for(this.length-=g,i=0;i<this.length;i++)this.words[i]=this.words[i+g];else this.words[0]=0,this.length=1;var f=0;for(i=this.length-1;i>=0&&(f!==0||i>=u);i--){var E=this.words[i]|0;this.words[i]=f<<26-l|E>>>l,f=E&y}return c&&f!==0&&(c.words[c.length++]=f),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,o,n){return a(this.negative===0),this.iushrn(e,o,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return!1;var l=this.words[n];return!!(l&u)},s.prototype.imaskn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(o!==0&&n++,this.length=Math.min(n,this.length),o!==0){var u=67108863^67108863>>>o<<o;this.words[this.length-1]&=u}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return a(typeof e=="number"),a(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)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var o=0;o<this.length&&this.words[o]>=67108864;o++)this.words[o]-=67108864,o===this.length-1?this.words[o+1]=1:this.words[o+1]++;return this.length=Math.max(this.length,o+1),this},s.prototype.isubn=function(e){if(a(typeof e=="number"),a(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 o=0;o<this.length&&this.words[o]<0;o++)this.words[o]+=67108864,this.words[o+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,o,n){var u=e.length+n,l;this._expand(u);var g,y=0;for(l=0;l<e.length;l++){g=(this.words[l+n]|0)+y;var c=(e.words[l]|0)*o;g-=c&67108863,y=(g>>26)-(c/67108864|0),this.words[l+n]=g&67108863}for(;l<this.length-n;l++)g=(this.words[l+n]|0)+y,y=g>>26,this.words[l+n]=g&67108863;if(y===0)return this.strip();for(a(y===-1),y=0,l=0;l<this.length;l++)g=-(this.words[l]|0)+y,y=g>>26,this.words[l]=g&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,o){var n=this.length-e.length,u=this.clone(),l=e,g=l.words[l.length-1]|0,y=this._countBits(g);n=26-y,n!==0&&(l=l.ushln(n),u.iushln(n),g=l.words[l.length-1]|0);var c=u.length-l.length,i;if(o!=="mod"){i=new s(null),i.length=c+1,i.words=new Array(i.length);for(var f=0;f<i.length;f++)i.words[f]=0}var E=u.clone()._ishlnsubmul(l,1,c);E.negative===0&&(u=E,i&&(i.words[c]=1));for(var j=c-1;j>=0;j--){var D=(u.words[l.length+j]|0)*67108864+(u.words[l.length+j-1]|0);for(D=Math.min(D/g|0,67108863),u._ishlnsubmul(l,D,j);u.negative!==0;)D--,u.negative=0,u._ishlnsubmul(l,1,j),u.isZero()||(u.negative^=1);i&&(i.words[j]=D)}return i&&i.strip(),u.strip(),o!=="div"&&n!==0&&u.iushrn(n),{div:i||null,mod:u}},s.prototype.divmod=function(e,o,n){if(a(!e.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var u,l,g;return this.negative!==0&&e.negative===0?(g=this.neg().divmod(e,o),o!=="mod"&&(u=g.div.neg()),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.iadd(e)),{div:u,mod:l}):this.negative===0&&e.negative!==0?(g=this.divmod(e.neg(),o),o!=="mod"&&(u=g.div.neg()),{div:u,mod:g.mod}):this.negative&e.negative?(g=this.neg().divmod(e.neg(),o),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.isub(e)),{div:g.div,mod:l}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:e.length===1?o==="div"?{div:this.divn(e.words[0]),mod:null}:o==="mod"?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,o)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var o=this.divmod(e);if(o.mod.isZero())return o.div;var n=o.div.negative!==0?o.mod.isub(e):o.mod,u=e.ushrn(1),l=e.andln(1),g=n.cmp(u);return g<0||l===1&&g===0?o.div:o.div.negative!==0?o.div.isubn(1):o.div.iaddn(1)},s.prototype.modn=function(e){a(e<=67108863);for(var o=(1<<26)%e,n=0,u=this.length-1;u>=0;u--)n=(o*n+(this.words[u]|0))%e;return n},s.prototype.idivn=function(e){a(e<=67108863);for(var o=0,n=this.length-1;n>=0;n--){var u=(this.words[n]|0)+o*67108864;this.words[n]=u/e|0,o=u%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=new s(0),y=new s(1),c=0;o.isEven()&&n.isEven();)o.iushrn(1),n.iushrn(1),++c;for(var i=n.clone(),f=o.clone();!o.isZero();){for(var E=0,j=1;!(o.words[0]&j)&&E<26;++E,j<<=1);if(E>0)for(o.iushrn(E);E-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(i),l.isub(f)),u.iushrn(1),l.iushrn(1);for(var D=0,V=1;!(n.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(n.iushrn(D);D-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(i),y.isub(f)),g.iushrn(1),y.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(g),l.isub(y)):(n.isub(o),g.isub(u),y.isub(l))}return{a:g,b:y,gcd:n.iushln(c)}},s.prototype._invmp=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=n.clone();o.cmpn(1)>0&&n.cmpn(1)>0;){for(var y=0,c=1;!(o.words[0]&c)&&y<26;++y,c<<=1);if(y>0)for(o.iushrn(y);y-- >0;)u.isOdd()&&u.iadd(g),u.iushrn(1);for(var i=0,f=1;!(n.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(n.iushrn(i);i-- >0;)l.isOdd()&&l.iadd(g),l.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(l)):(n.isub(o),l.isub(u))}var E;return o.cmpn(1)===0?E=u:E=l,E.cmpn(0)<0&&E.iadd(e),E},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var o=this.clone(),n=e.clone();o.negative=0,n.negative=0;for(var u=0;o.isEven()&&n.isEven();u++)o.iushrn(1),n.iushrn(1);do{for(;o.isEven();)o.iushrn(1);for(;n.isEven();)n.iushrn(1);var l=o.cmp(n);if(l<0){var g=o;o=n,n=g}else if(l===0||n.cmpn(1)===0)break;o.isub(n)}while(!0);return n.iushln(u)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){a(typeof e=="number");var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return this._expand(n+1),this.words[n]|=u,this;for(var l=u,g=n;l!==0&&g<this.length;g++){var y=this.words[g]|0;y+=l,l=y>>>26,y&=67108863,this.words[g]=y}return l!==0&&(this.words[g]=l,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(e){var o=e<0;if(this.negative!==0&&!o)return-1;if(this.negative===0&&o)return 1;this.strip();var n;if(this.length>1)n=1;else{o&&(e=-e),a(e<=67108863,"Number is too big");var u=this.words[0]|0;n=u===e?0:u<e?-1:1}return this.negative!==0?-n|0:n},s.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var o=this.ucmp(e);return this.negative!==0?-o|0:o},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var o=0,n=this.length-1;n>=0;n--){var u=this.words[n]|0,l=e.words[n]|0;if(u!==l){u<l?o=-1:u>l&&(o=1);break}}return o},s.prototype.gtn=function(e){return this.cmpn(e)===1},s.prototype.gt=function(e){return this.cmp(e)===1},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return this.cmpn(e)===-1},s.prototype.lt=function(e){return this.cmp(e)===-1},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return this.cmpn(e)===0},s.prototype.eq=function(e){return this.cmp(e)===0},s.red=function(e){return new $(e)},s.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var I={k256:null,p224:null,p192:null,p25519:null};function L(e,o){this.name=e,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},L.prototype.ireduce=function(e){var o=e,n;do this.split(o,this.tmp),o=this.imulK(o),o=o.iadd(this.tmp),n=o.bitLength();while(n>this.n);var u=n<this.n?-1:o.ucmp(this.p);return u===0?(o.words[0]=0,o.length=1):u>0?o.isub(this.p):o.strip!==void 0?o.strip():o._strip(),o},L.prototype.split=function(e,o){e.iushrn(this.n,0,o)},L.prototype.imulK=function(e){return e.imul(this.k)};function P(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}d(P,L),P.prototype.split=function(e,o){for(var n=4194303,u=Math.min(e.length,9),l=0;l<u;l++)o.words[l]=e.words[l];if(o.length=u,e.length<=9){e.words[0]=0,e.length=1;return}var g=e.words[9];for(o.words[o.length++]=g&n,l=10;l<e.length;l++){var y=e.words[l]|0;e.words[l-10]=(y&n)<<4|g>>>22,g=y}g>>>=22,e.words[l-10]=g,g===0&&e.length>10?e.length-=10:e.length-=9},P.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var o=0,n=0;n<e.length;n++){var u=e.words[n]|0;o+=u*977,e.words[n]=o&67108863,o=u*64+(o/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function H(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}d(H,L);function W(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}d(W,L);function q(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}d(q,L),q.prototype.imulK=function(e){for(var o=0,n=0;n<e.length;n++){var u=(e.words[n]|0)*19+o,l=u&67108863;u>>>=26,e.words[n]=l,o=u}return o!==0&&(e.words[e.length++]=o),e},s._prime=function(e){if(I[e])return I[e];var o;if(e==="k256")o=new P;else if(e==="p224")o=new H;else if(e==="p192")o=new W;else if(e==="p25519")o=new q;else throw new Error("Unknown prime "+e);return I[e]=o,o};function $(e){if(typeof e=="string"){var o=s._prime(e);this.m=o.p,this.prime=o}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}$.prototype._verify1=function(e){a(e.negative===0,"red works only with positives"),a(e.red,"red works only with red numbers")},$.prototype._verify2=function(e,o){a((e.negative|o.negative)===0,"red works only with positives"),a(e.red&&e.red===o.red,"red works only with red numbers")},$.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},$.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},$.prototype.add=function(e,o){this._verify2(e,o);var n=e.add(o);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},$.prototype.iadd=function(e,o){this._verify2(e,o);var n=e.iadd(o);return n.cmp(this.m)>=0&&n.isub(this.m),n},$.prototype.sub=function(e,o){this._verify2(e,o);var n=e.sub(o);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},$.prototype.isub=function(e,o){this._verify2(e,o);var n=e.isub(o);return n.cmpn(0)<0&&n.iadd(this.m),n},$.prototype.shl=function(e,o){return this._verify1(e),this.imod(e.ushln(o))},$.prototype.imul=function(e,o){return this._verify2(e,o),this.imod(e.imul(o))},$.prototype.mul=function(e,o){return this._verify2(e,o),this.imod(e.mul(o))},$.prototype.isqr=function(e){return this.imul(e,e.clone())},$.prototype.sqr=function(e){return this.mul(e,e)},$.prototype.sqrt=function(e){if(e.isZero())return e.clone();var o=this.m.andln(3);if(a(o%2===1),o===3){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);a(!u.isZero());var g=new s(1).toRed(this),y=g.redNeg(),c=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new s(2*i*i).toRed(this);this.pow(i,c).cmp(y)!==0;)i.redIAdd(y);for(var f=this.pow(i,u),E=this.pow(e,u.addn(1).iushrn(1)),j=this.pow(e,u),D=l;j.cmp(g)!==0;){for(var V=j,Q=0;V.cmp(g)!==0;Q++)V=V.redSqr();a(Q<D);var Z=this.pow(f,new s(1).iushln(D-Q-1));E=E.redMul(Z),f=Z.redSqr(),j=j.redMul(f),D=Q}return E},$.prototype.invm=function(e){var o=e._invmp(this.m);return o.negative!==0?(o.negative=0,this.imod(o).redNeg()):this.imod(o)},$.prototype.pow=function(e,o){if(o.isZero())return new s(1).toRed(this);if(o.cmpn(1)===0)return e.clone();var n=4,u=new Array(1<<n);u[0]=new s(1).toRed(this),u[1]=e;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],e);var g=u[0],y=0,c=0,i=o.bitLength()%26;for(i===0&&(i=26),l=o.length-1;l>=0;l--){for(var f=o.words[l],E=i-1;E>=0;E--){var j=f>>E&1;if(g!==u[0]&&(g=this.sqr(g)),j===0&&y===0){c=0;continue}y<<=1,y|=j,c++,!(c!==n&&(l!==0||E!==0))&&(g=this.mul(g,u[y]),c=0,y=0)}i=26}return g},$.prototype.convertTo=function(e){var o=e.umod(this.m);return o===e?o.clone():o},$.prototype.convertFrom=function(e){var o=e.clone();return o.red=null,o},s.mont=function(e){return new N(e)};function N(e){$.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}d(N,$),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var o=this.imod(e.mul(this.rinv));return o.red=null,o},N.prototype.imul=function(e,o){if(e.isZero()||o.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.mul=function(e,o){if(e.isZero()||o.isZero())return new s(0)._forceRed(this);var n=e.mul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.invm=function(e){var o=this.imod(e._invmp(this.m).mul(this.r2));return o._forceRed(this)}})(t,Lt)}(Pl);var $1=Pl.exports,Nl={exports:{}};Nl.exports,function(t){(function(r,h){function a(e,o){if(!e)throw new Error(o||"Assertion failed")}function d(e,o){e.super_=o;var n=function(){};n.prototype=o.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,o,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((o==="le"||o==="be")&&(n=o,o=10),this._init(e||0,o||10,n||"be"))}typeof r=="object"?r.exports=s:h.BN=s,s.BN=s,s.wordSize=26;var m;try{typeof window<"u"&&typeof window.Buffer<"u"?m=window.Buffer:m=Ut.Buffer}catch{}s.isBN=function(e){return e instanceof s?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,o){return e.cmp(o)>0?e:o},s.min=function(e,o){return e.cmp(o)<0?e:o},s.prototype._init=function(e,o,n){if(typeof e=="number")return this._initNumber(e,o,n);if(typeof e=="object")return this._initArray(e,o,n);o==="hex"&&(o=16),a(o===(o|0)&&o>=2&&o<=36),e=e.toString().replace(/\s+/g,"");var u=0;e[0]==="-"&&(u++,this.negative=1),u<e.length&&(o===16?this._parseHex(e,u,n):(this._parseBase(e,o,u),n==="le"&&this._initArray(this.toArray(),o,n)))},s.prototype._initNumber=function(e,o,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):(a(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),o,n)},s.prototype._initArray=function(e,o,n){if(a(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 u=0;u<this.length;u++)this.words[u]=0;var l,g,y=0;if(n==="be")for(u=e.length-1,l=0;u>=0;u-=3)g=e[u]|e[u-1]<<8|e[u-2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);else if(n==="le")for(u=0,l=0;u<e.length;u+=3)g=e[u]|e[u+1]<<8|e[u+2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);return this.strip()};function p(e,o){var n=e.charCodeAt(o);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function w(e,o,n){var u=p(e,n);return n-1>=o&&(u|=p(e,n-1)<<4),u}s.prototype._parseHex=function(e,o,n){this.length=Math.ceil((e.length-o)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,g=0,y;if(n==="be")for(u=e.length-1;u>=o;u-=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8;else{var c=e.length-o;for(u=c%2===0?o+1:o;u<e.length;u+=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8}this.strip()};function S(e,o,n,u){for(var l=0,g=Math.min(e.length,n),y=o;y<g;y++){var c=e.charCodeAt(y)-48;l*=u,c>=49?l+=c-49+10:c>=17?l+=c-17+10:l+=c}return l}s.prototype._parseBase=function(e,o,n){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=o)u++;u--,l=l/o|0;for(var g=e.length-n,y=g%u,c=Math.min(g,g-y)+n,i=0,f=n;f<c;f+=u)i=S(e,f,f+u,o),this.imuln(l),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(y!==0){var E=1;for(i=S(e,f,e.length,o),f=0;f<y;f++)E*=o;this.imuln(E),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var o=0;o<this.length;o++)e.words[o]=this.words[o];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[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],_=[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];s.prototype.toString=function(e,o){e=e||10,o=o|0||1;var n;if(e===16||e==="hex"){n="";for(var u=0,l=0,g=0;g<this.length;g++){var y=this.words[g],c=((y<<u|l)&16777215).toString(16);l=y>>>24-u&16777215,l!==0||g!==this.length-1?n=A[6-c.length]+c+n:n=c+n,u+=2,u>=26&&(u-=26,g--)}for(l!==0&&(n=l.toString(16)+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var i=v[e],f=_[e];n="";var E=this.clone();for(E.negative=0;!E.isZero();){var j=E.modn(f).toString(e);E=E.idivn(f),E.isZero()?n=j+n:n=A[i-j.length]+j+n}for(this.isZero()&&(n="0"+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},s.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&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,o){return a(typeof m<"u"),this.toArrayLike(m,e,o)},s.prototype.toArray=function(e,o){return this.toArrayLike(Array,e,o)},s.prototype.toArrayLike=function(e,o,n){var u=this.byteLength(),l=n||Math.max(1,u);a(u<=l,"byte array longer than desired length"),a(l>0,"Requested array length <= 0"),this.strip();var g=o==="le",y=new e(l),c,i,f=this.clone();if(g){for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[i]=c;for(;i<l;i++)y[i]=0}else{for(i=0;i<l-u;i++)y[i]=0;for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[l-i-1]=c}return y},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var o=e,n=0;return o>=4096&&(n+=13,o>>>=13),o>=64&&(n+=7,o>>>=7),o>=8&&(n+=4,o>>>=4),o>=2&&(n+=2,o>>>=2),n+o},s.prototype._zeroBits=function(e){if(e===0)return 26;var o=e,n=0;return o&8191||(n+=13,o>>>=13),o&127||(n+=7,o>>>=7),o&15||(n+=4,o>>>=4),o&3||(n+=2,o>>>=2),o&1||n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],o=this._countBits(e);return(this.length-1)*26+o};function x(e){for(var o=new Array(e.bitLength()),n=0;n<o.length;n++){var u=n/26|0,l=n%26;o[n]=(e.words[u]&1<<l)>>>l}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,o=0;o<this.length;o++){var n=this._zeroBits(this.words[o]);if(e+=n,n!==26)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var o=0;o<e.length;o++)this.words[o]=this.words[o]|e.words[o];return this.strip()},s.prototype.ior=function(e){return a((this.negative|e.negative)===0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var o;this.length>e.length?o=e:o=this;for(var n=0;n<o.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=o.length,this.strip()},s.prototype.iand=function(e){return a((this.negative|e.negative)===0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var o,n;this.length>e.length?(o=this,n=e):(o=e,n=this);for(var u=0;u<n.length;u++)this.words[u]=o.words[u]^n.words[u];if(this!==o)for(;u<o.length;u++)this.words[u]=o.words[u];return this.length=o.length,this.strip()},s.prototype.ixor=function(e){return a((this.negative|e.negative)===0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){a(typeof e=="number"&&e>=0);var o=Math.ceil(e/26)|0,n=e%26;this._expand(o),n>0&&o--;for(var u=0;u<o;u++)this.words[u]=~this.words[u]&67108863;return n>0&&(this.words[u]=~this.words[u]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,o){a(typeof e=="number"&&e>=0);var n=e/26|0,u=e%26;return this._expand(n+1),o?this.words[n]=this.words[n]|1<<u:this.words[n]=this.words[n]&~(1<<u),this.strip()},s.prototype.iadd=function(e){var o;if(this.negative!==0&&e.negative===0)return this.negative=0,o=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,o=this.isub(e),e.negative=1,o._normSign();var n,u;this.length>e.length?(n=this,u=e):(n=e,u=this);for(var l=0,g=0;g<u.length;g++)o=(n.words[g]|0)+(u.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;for(;l!==0&&g<n.length;g++)o=(n.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;if(this.length=n.length,l!==0)this.words[this.length]=l,this.length++;else if(n!==this)for(;g<n.length;g++)this.words[g]=n.words[g];return this},s.prototype.add=function(e){var o;return e.negative!==0&&this.negative===0?(e.negative=0,o=this.sub(e),e.negative^=1,o):e.negative===0&&this.negative!==0?(this.negative=0,o=e.sub(this),this.negative=1,o):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var o=this.iadd(e);return e.negative=1,o._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 u,l;n>0?(u=this,l=e):(u=e,l=this);for(var g=0,y=0;y<l.length;y++)o=(u.words[y]|0)-(l.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;for(;g!==0&&y<u.length;y++)o=(u.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;if(g===0&&y<u.length&&u!==this)for(;y<u.length;y++)this.words[y]=u.words[y];return this.length=Math.max(this.length,y),u!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};function b(e,o,n){n.negative=o.negative^e.negative;var u=e.length+o.length|0;n.length=u,u=u-1|0;var l=e.words[0]|0,g=o.words[0]|0,y=l*g,c=y&67108863,i=y/67108864|0;n.words[0]=c;for(var f=1;f<u;f++){for(var E=i>>>26,j=i&67108863,D=Math.min(f,o.length-1),V=Math.max(0,f-e.length+1);V<=D;V++){var Q=f-V|0;l=e.words[Q]|0,g=o.words[V]|0,y=l*g+j,E+=y/67108864|0,j=y&67108863}n.words[f]=j|0,i=E|0}return i!==0?n.words[f]=i|0:n.length--,n.strip()}var M=function(e,o,n){var u=e.words,l=o.words,g=n.words,y=0,c,i,f,E=u[0]|0,j=E&8191,D=E>>>13,V=u[1]|0,Q=V&8191,Z=V>>>13,tt=u[2]|0,Y=tt&8191,rt=tt>>>13,It=u[3]|0,z=It&8191,U=It>>>13,G=u[4]|0,J=G&8191,et=G>>>13,C=u[5]|0,B=C&8191,T=C>>>13,F=u[6]|0,K=F&8191,X=F>>>13,ut=u[7]|0,it=ut&8191,ot=ut>>>13,Ct=u[8]|0,nt=Ct&8191,st=Ct>>>13,Bt=u[9]|0,at=Bt&8191,bt=Bt>>>13,qt=l[0]|0,lt=qt&8191,Mt=qt>>>13,Ft=l[1]|0,ht=Ft&8191,wt=Ft>>>13,Vt=l[2]|0,ft=Vt&8191,_t=Vt>>>13,Kt=l[3]|0,ct=Kt&8191,St=Kt>>>13,Jt=l[4]|0,dt=Jt&8191,At=Jt>>>13,Qt=l[5]|0,pt=Qt&8191,xt=Qt>>>13,Xt=l[6]|0,mt=Xt&8191,kt=Xt>>>13,Gt=l[7]|0,gt=Gt&8191,Et=Gt>>>13,Yt=l[8]|0,yt=Yt&8191,Rt=Yt>>>13,te=l[9]|0,vt=te&8191,Ot=te>>>13;n.negative=e.negative^o.negative,n.length=19,c=Math.imul(j,lt),i=Math.imul(j,Mt),i=i+Math.imul(D,lt)|0,f=Math.imul(D,Mt);var $t=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,c=Math.imul(Q,lt),i=Math.imul(Q,Mt),i=i+Math.imul(Z,lt)|0,f=Math.imul(Z,Mt),c=c+Math.imul(j,ht)|0,i=i+Math.imul(j,wt)|0,i=i+Math.imul(D,ht)|0,f=f+Math.imul(D,wt)|0;var Tt=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,c=Math.imul(Y,lt),i=Math.imul(Y,Mt),i=i+Math.imul(rt,lt)|0,f=Math.imul(rt,Mt),c=c+Math.imul(Q,ht)|0,i=i+Math.imul(Q,wt)|0,i=i+Math.imul(Z,ht)|0,f=f+Math.imul(Z,wt)|0,c=c+Math.imul(j,ft)|0,i=i+Math.imul(j,_t)|0,i=i+Math.imul(D,ft)|0,f=f+Math.imul(D,_t)|0;var ue=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ue>>>26)|0,ue&=67108863,c=Math.imul(z,lt),i=Math.imul(z,Mt),i=i+Math.imul(U,lt)|0,f=Math.imul(U,Mt),c=c+Math.imul(Y,ht)|0,i=i+Math.imul(Y,wt)|0,i=i+Math.imul(rt,ht)|0,f=f+Math.imul(rt,wt)|0,c=c+Math.imul(Q,ft)|0,i=i+Math.imul(Q,_t)|0,i=i+Math.imul(Z,ft)|0,f=f+Math.imul(Z,_t)|0,c=c+Math.imul(j,ct)|0,i=i+Math.imul(j,St)|0,i=i+Math.imul(D,ct)|0,f=f+Math.imul(D,St)|0;var le=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(le>>>26)|0,le&=67108863,c=Math.imul(J,lt),i=Math.imul(J,Mt),i=i+Math.imul(et,lt)|0,f=Math.imul(et,Mt),c=c+Math.imul(z,ht)|0,i=i+Math.imul(z,wt)|0,i=i+Math.imul(U,ht)|0,f=f+Math.imul(U,wt)|0,c=c+Math.imul(Y,ft)|0,i=i+Math.imul(Y,_t)|0,i=i+Math.imul(rt,ft)|0,f=f+Math.imul(rt,_t)|0,c=c+Math.imul(Q,ct)|0,i=i+Math.imul(Q,St)|0,i=i+Math.imul(Z,ct)|0,f=f+Math.imul(Z,St)|0,c=c+Math.imul(j,dt)|0,i=i+Math.imul(j,At)|0,i=i+Math.imul(D,dt)|0,f=f+Math.imul(D,At)|0;var fe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(fe>>>26)|0,fe&=67108863,c=Math.imul(B,lt),i=Math.imul(B,Mt),i=i+Math.imul(T,lt)|0,f=Math.imul(T,Mt),c=c+Math.imul(J,ht)|0,i=i+Math.imul(J,wt)|0,i=i+Math.imul(et,ht)|0,f=f+Math.imul(et,wt)|0,c=c+Math.imul(z,ft)|0,i=i+Math.imul(z,_t)|0,i=i+Math.imul(U,ft)|0,f=f+Math.imul(U,_t)|0,c=c+Math.imul(Y,ct)|0,i=i+Math.imul(Y,St)|0,i=i+Math.imul(rt,ct)|0,f=f+Math.imul(rt,St)|0,c=c+Math.imul(Q,dt)|0,i=i+Math.imul(Q,At)|0,i=i+Math.imul(Z,dt)|0,f=f+Math.imul(Z,At)|0,c=c+Math.imul(j,pt)|0,i=i+Math.imul(j,xt)|0,i=i+Math.imul(D,pt)|0,f=f+Math.imul(D,xt)|0;var ce=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ce>>>26)|0,ce&=67108863,c=Math.imul(K,lt),i=Math.imul(K,Mt),i=i+Math.imul(X,lt)|0,f=Math.imul(X,Mt),c=c+Math.imul(B,ht)|0,i=i+Math.imul(B,wt)|0,i=i+Math.imul(T,ht)|0,f=f+Math.imul(T,wt)|0,c=c+Math.imul(J,ft)|0,i=i+Math.imul(J,_t)|0,i=i+Math.imul(et,ft)|0,f=f+Math.imul(et,_t)|0,c=c+Math.imul(z,ct)|0,i=i+Math.imul(z,St)|0,i=i+Math.imul(U,ct)|0,f=f+Math.imul(U,St)|0,c=c+Math.imul(Y,dt)|0,i=i+Math.imul(Y,At)|0,i=i+Math.imul(rt,dt)|0,f=f+Math.imul(rt,At)|0,c=c+Math.imul(Q,pt)|0,i=i+Math.imul(Q,xt)|0,i=i+Math.imul(Z,pt)|0,f=f+Math.imul(Z,xt)|0,c=c+Math.imul(j,mt)|0,i=i+Math.imul(j,kt)|0,i=i+Math.imul(D,mt)|0,f=f+Math.imul(D,kt)|0;var de=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(de>>>26)|0,de&=67108863,c=Math.imul(it,lt),i=Math.imul(it,Mt),i=i+Math.imul(ot,lt)|0,f=Math.imul(ot,Mt),c=c+Math.imul(K,ht)|0,i=i+Math.imul(K,wt)|0,i=i+Math.imul(X,ht)|0,f=f+Math.imul(X,wt)|0,c=c+Math.imul(B,ft)|0,i=i+Math.imul(B,_t)|0,i=i+Math.imul(T,ft)|0,f=f+Math.imul(T,_t)|0,c=c+Math.imul(J,ct)|0,i=i+Math.imul(J,St)|0,i=i+Math.imul(et,ct)|0,f=f+Math.imul(et,St)|0,c=c+Math.imul(z,dt)|0,i=i+Math.imul(z,At)|0,i=i+Math.imul(U,dt)|0,f=f+Math.imul(U,At)|0,c=c+Math.imul(Y,pt)|0,i=i+Math.imul(Y,xt)|0,i=i+Math.imul(rt,pt)|0,f=f+Math.imul(rt,xt)|0,c=c+Math.imul(Q,mt)|0,i=i+Math.imul(Q,kt)|0,i=i+Math.imul(Z,mt)|0,f=f+Math.imul(Z,kt)|0,c=c+Math.imul(j,gt)|0,i=i+Math.imul(j,Et)|0,i=i+Math.imul(D,gt)|0,f=f+Math.imul(D,Et)|0;var pe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(pe>>>26)|0,pe&=67108863,c=Math.imul(nt,lt),i=Math.imul(nt,Mt),i=i+Math.imul(st,lt)|0,f=Math.imul(st,Mt),c=c+Math.imul(it,ht)|0,i=i+Math.imul(it,wt)|0,i=i+Math.imul(ot,ht)|0,f=f+Math.imul(ot,wt)|0,c=c+Math.imul(K,ft)|0,i=i+Math.imul(K,_t)|0,i=i+Math.imul(X,ft)|0,f=f+Math.imul(X,_t)|0,c=c+Math.imul(B,ct)|0,i=i+Math.imul(B,St)|0,i=i+Math.imul(T,ct)|0,f=f+Math.imul(T,St)|0,c=c+Math.imul(J,dt)|0,i=i+Math.imul(J,At)|0,i=i+Math.imul(et,dt)|0,f=f+Math.imul(et,At)|0,c=c+Math.imul(z,pt)|0,i=i+Math.imul(z,xt)|0,i=i+Math.imul(U,pt)|0,f=f+Math.imul(U,xt)|0,c=c+Math.imul(Y,mt)|0,i=i+Math.imul(Y,kt)|0,i=i+Math.imul(rt,mt)|0,f=f+Math.imul(rt,kt)|0,c=c+Math.imul(Q,gt)|0,i=i+Math.imul(Q,Et)|0,i=i+Math.imul(Z,gt)|0,f=f+Math.imul(Z,Et)|0,c=c+Math.imul(j,yt)|0,i=i+Math.imul(j,Rt)|0,i=i+Math.imul(D,yt)|0,f=f+Math.imul(D,Rt)|0;var me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(at,lt),i=Math.imul(at,Mt),i=i+Math.imul(bt,lt)|0,f=Math.imul(bt,Mt),c=c+Math.imul(nt,ht)|0,i=i+Math.imul(nt,wt)|0,i=i+Math.imul(st,ht)|0,f=f+Math.imul(st,wt)|0,c=c+Math.imul(it,ft)|0,i=i+Math.imul(it,_t)|0,i=i+Math.imul(ot,ft)|0,f=f+Math.imul(ot,_t)|0,c=c+Math.imul(K,ct)|0,i=i+Math.imul(K,St)|0,i=i+Math.imul(X,ct)|0,f=f+Math.imul(X,St)|0,c=c+Math.imul(B,dt)|0,i=i+Math.imul(B,At)|0,i=i+Math.imul(T,dt)|0,f=f+Math.imul(T,At)|0,c=c+Math.imul(J,pt)|0,i=i+Math.imul(J,xt)|0,i=i+Math.imul(et,pt)|0,f=f+Math.imul(et,xt)|0,c=c+Math.imul(z,mt)|0,i=i+Math.imul(z,kt)|0,i=i+Math.imul(U,mt)|0,f=f+Math.imul(U,kt)|0,c=c+Math.imul(Y,gt)|0,i=i+Math.imul(Y,Et)|0,i=i+Math.imul(rt,gt)|0,f=f+Math.imul(rt,Et)|0,c=c+Math.imul(Q,yt)|0,i=i+Math.imul(Q,Rt)|0,i=i+Math.imul(Z,yt)|0,f=f+Math.imul(Z,Rt)|0,c=c+Math.imul(j,vt)|0,i=i+Math.imul(j,Ot)|0,i=i+Math.imul(D,vt)|0,f=f+Math.imul(D,Ot)|0;var ge=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(at,ht),i=Math.imul(at,wt),i=i+Math.imul(bt,ht)|0,f=Math.imul(bt,wt),c=c+Math.imul(nt,ft)|0,i=i+Math.imul(nt,_t)|0,i=i+Math.imul(st,ft)|0,f=f+Math.imul(st,_t)|0,c=c+Math.imul(it,ct)|0,i=i+Math.imul(it,St)|0,i=i+Math.imul(ot,ct)|0,f=f+Math.imul(ot,St)|0,c=c+Math.imul(K,dt)|0,i=i+Math.imul(K,At)|0,i=i+Math.imul(X,dt)|0,f=f+Math.imul(X,At)|0,c=c+Math.imul(B,pt)|0,i=i+Math.imul(B,xt)|0,i=i+Math.imul(T,pt)|0,f=f+Math.imul(T,xt)|0,c=c+Math.imul(J,mt)|0,i=i+Math.imul(J,kt)|0,i=i+Math.imul(et,mt)|0,f=f+Math.imul(et,kt)|0,c=c+Math.imul(z,gt)|0,i=i+Math.imul(z,Et)|0,i=i+Math.imul(U,gt)|0,f=f+Math.imul(U,Et)|0,c=c+Math.imul(Y,yt)|0,i=i+Math.imul(Y,Rt)|0,i=i+Math.imul(rt,yt)|0,f=f+Math.imul(rt,Rt)|0,c=c+Math.imul(Q,vt)|0,i=i+Math.imul(Q,Ot)|0,i=i+Math.imul(Z,vt)|0,f=f+Math.imul(Z,Ot)|0;var ye=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(at,ft),i=Math.imul(at,_t),i=i+Math.imul(bt,ft)|0,f=Math.imul(bt,_t),c=c+Math.imul(nt,ct)|0,i=i+Math.imul(nt,St)|0,i=i+Math.imul(st,ct)|0,f=f+Math.imul(st,St)|0,c=c+Math.imul(it,dt)|0,i=i+Math.imul(it,At)|0,i=i+Math.imul(ot,dt)|0,f=f+Math.imul(ot,At)|0,c=c+Math.imul(K,pt)|0,i=i+Math.imul(K,xt)|0,i=i+Math.imul(X,pt)|0,f=f+Math.imul(X,xt)|0,c=c+Math.imul(B,mt)|0,i=i+Math.imul(B,kt)|0,i=i+Math.imul(T,mt)|0,f=f+Math.imul(T,kt)|0,c=c+Math.imul(J,gt)|0,i=i+Math.imul(J,Et)|0,i=i+Math.imul(et,gt)|0,f=f+Math.imul(et,Et)|0,c=c+Math.imul(z,yt)|0,i=i+Math.imul(z,Rt)|0,i=i+Math.imul(U,yt)|0,f=f+Math.imul(U,Rt)|0,c=c+Math.imul(Y,vt)|0,i=i+Math.imul(Y,Ot)|0,i=i+Math.imul(rt,vt)|0,f=f+Math.imul(rt,Ot)|0;var ve=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(at,ct),i=Math.imul(at,St),i=i+Math.imul(bt,ct)|0,f=Math.imul(bt,St),c=c+Math.imul(nt,dt)|0,i=i+Math.imul(nt,At)|0,i=i+Math.imul(st,dt)|0,f=f+Math.imul(st,At)|0,c=c+Math.imul(it,pt)|0,i=i+Math.imul(it,xt)|0,i=i+Math.imul(ot,pt)|0,f=f+Math.imul(ot,xt)|0,c=c+Math.imul(K,mt)|0,i=i+Math.imul(K,kt)|0,i=i+Math.imul(X,mt)|0,f=f+Math.imul(X,kt)|0,c=c+Math.imul(B,gt)|0,i=i+Math.imul(B,Et)|0,i=i+Math.imul(T,gt)|0,f=f+Math.imul(T,Et)|0,c=c+Math.imul(J,yt)|0,i=i+Math.imul(J,Rt)|0,i=i+Math.imul(et,yt)|0,f=f+Math.imul(et,Rt)|0,c=c+Math.imul(z,vt)|0,i=i+Math.imul(z,Ot)|0,i=i+Math.imul(U,vt)|0,f=f+Math.imul(U,Ot)|0;var be=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(be>>>26)|0,be&=67108863,c=Math.imul(at,dt),i=Math.imul(at,At),i=i+Math.imul(bt,dt)|0,f=Math.imul(bt,At),c=c+Math.imul(nt,pt)|0,i=i+Math.imul(nt,xt)|0,i=i+Math.imul(st,pt)|0,f=f+Math.imul(st,xt)|0,c=c+Math.imul(it,mt)|0,i=i+Math.imul(it,kt)|0,i=i+Math.imul(ot,mt)|0,f=f+Math.imul(ot,kt)|0,c=c+Math.imul(K,gt)|0,i=i+Math.imul(K,Et)|0,i=i+Math.imul(X,gt)|0,f=f+Math.imul(X,Et)|0,c=c+Math.imul(B,yt)|0,i=i+Math.imul(B,Rt)|0,i=i+Math.imul(T,yt)|0,f=f+Math.imul(T,Rt)|0,c=c+Math.imul(J,vt)|0,i=i+Math.imul(J,Ot)|0,i=i+Math.imul(et,vt)|0,f=f+Math.imul(et,Ot)|0;var we=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(at,pt),i=Math.imul(at,xt),i=i+Math.imul(bt,pt)|0,f=Math.imul(bt,xt),c=c+Math.imul(nt,mt)|0,i=i+Math.imul(nt,kt)|0,i=i+Math.imul(st,mt)|0,f=f+Math.imul(st,kt)|0,c=c+Math.imul(it,gt)|0,i=i+Math.imul(it,Et)|0,i=i+Math.imul(ot,gt)|0,f=f+Math.imul(ot,Et)|0,c=c+Math.imul(K,yt)|0,i=i+Math.imul(K,Rt)|0,i=i+Math.imul(X,yt)|0,f=f+Math.imul(X,Rt)|0,c=c+Math.imul(B,vt)|0,i=i+Math.imul(B,Ot)|0,i=i+Math.imul(T,vt)|0,f=f+Math.imul(T,Ot)|0;var Me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(at,mt),i=Math.imul(at,kt),i=i+Math.imul(bt,mt)|0,f=Math.imul(bt,kt),c=c+Math.imul(nt,gt)|0,i=i+Math.imul(nt,Et)|0,i=i+Math.imul(st,gt)|0,f=f+Math.imul(st,Et)|0,c=c+Math.imul(it,yt)|0,i=i+Math.imul(it,Rt)|0,i=i+Math.imul(ot,yt)|0,f=f+Math.imul(ot,Rt)|0,c=c+Math.imul(K,vt)|0,i=i+Math.imul(K,Ot)|0,i=i+Math.imul(X,vt)|0,f=f+Math.imul(X,Ot)|0;var _e=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(at,gt),i=Math.imul(at,Et),i=i+Math.imul(bt,gt)|0,f=Math.imul(bt,Et),c=c+Math.imul(nt,yt)|0,i=i+Math.imul(nt,Rt)|0,i=i+Math.imul(st,yt)|0,f=f+Math.imul(st,Rt)|0,c=c+Math.imul(it,vt)|0,i=i+Math.imul(it,Ot)|0,i=i+Math.imul(ot,vt)|0,f=f+Math.imul(ot,Ot)|0;var Se=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(at,yt),i=Math.imul(at,Rt),i=i+Math.imul(bt,yt)|0,f=Math.imul(bt,Rt),c=c+Math.imul(nt,vt)|0,i=i+Math.imul(nt,Ot)|0,i=i+Math.imul(st,vt)|0,f=f+Math.imul(st,Ot)|0;var Ae=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(at,vt),i=Math.imul(at,Ot),i=i+Math.imul(bt,vt)|0,f=Math.imul(bt,Ot);var xe=(y+c|0)+((i&8191)<<13)|0;return y=(f+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,g[0]=$t,g[1]=Tt,g[2]=ue,g[3]=le,g[4]=fe,g[5]=ce,g[6]=de,g[7]=pe,g[8]=me,g[9]=ge,g[10]=ye,g[11]=ve,g[12]=be,g[13]=we,g[14]=Me,g[15]=_e,g[16]=Se,g[17]=Ae,g[18]=xe,y!==0&&(g[19]=y,n.length++),n};Math.imul||(M=b);function O(e,o,n){n.negative=o.negative^e.negative,n.length=e.length+o.length;for(var u=0,l=0,g=0;g<n.length-1;g++){var y=l;l=0;for(var c=u&67108863,i=Math.min(g,o.length-1),f=Math.max(0,g-e.length+1);f<=i;f++){var E=g-f,j=e.words[E]|0,D=o.words[f]|0,V=j*D,Q=V&67108863;y=y+(V/67108864|0)|0,Q=Q+c|0,c=Q&67108863,y=y+(Q>>>26)|0,l+=y>>>26,y&=67108863}n.words[g]=c,u=y,y=l}return u!==0?n.words[g]=u:n.length--,n.strip()}function k(e,o,n){var u=new R;return u.mulp(e,o,n)}s.prototype.mulTo=function(e,o){var n,u=this.length+e.length;return this.length===10&&e.length===10?n=M(this,e,o):u<63?n=b(this,e,o):u<1024?n=O(this,e,o):n=k(this,e,o),n};function R(e,o){this.x=e,this.y=o}R.prototype.makeRBT=function(e){for(var o=new Array(e),n=s.prototype._countBits(e)-1,u=0;u<e;u++)o[u]=this.revBin(u,n,e);return o},R.prototype.revBin=function(e,o,n){if(e===0||e===n-1)return e;for(var u=0,l=0;l<o;l++)u|=(e&1)<<o-l-1,e>>=1;return u},R.prototype.permute=function(e,o,n,u,l,g){for(var y=0;y<g;y++)u[y]=o[e[y]],l[y]=n[e[y]]},R.prototype.transform=function(e,o,n,u,l,g){this.permute(g,e,o,n,u,l);for(var y=1;y<l;y<<=1)for(var c=y<<1,i=Math.cos(2*Math.PI/c),f=Math.sin(2*Math.PI/c),E=0;E<l;E+=c)for(var j=i,D=f,V=0;V<y;V++){var Q=n[E+V],Z=u[E+V],tt=n[E+V+y],Y=u[E+V+y],rt=j*tt-D*Y;Y=j*Y+D*tt,tt=rt,n[E+V]=Q+tt,u[E+V]=Z+Y,n[E+V+y]=Q-tt,u[E+V+y]=Z-Y,V!==c&&(rt=i*j-f*D,D=i*D+f*j,j=rt)}},R.prototype.guessLen13b=function(e,o){var n=Math.max(o,e)|1,u=n&1,l=0;for(n=n/2|0;n;n=n>>>1)l++;return 1<<l+1+u},R.prototype.conjugate=function(e,o,n){if(!(n<=1))for(var u=0;u<n/2;u++){var l=e[u];e[u]=e[n-u-1],e[n-u-1]=l,l=o[u],o[u]=-o[n-u-1],o[n-u-1]=-l}},R.prototype.normalize13b=function(e,o){for(var n=0,u=0;u<o/2;u++){var l=Math.round(e[2*u+1]/o)*8192+Math.round(e[2*u]/o)+n;e[u]=l&67108863,l<67108864?n=0:n=l/67108864|0}return e},R.prototype.convert13b=function(e,o,n,u){for(var l=0,g=0;g<o;g++)l=l+(e[g]|0),n[2*g]=l&8191,l=l>>>13,n[2*g+1]=l&8191,l=l>>>13;for(g=2*o;g<u;++g)n[g]=0;a(l===0),a((l&-8192)===0)},R.prototype.stub=function(e){for(var o=new Array(e),n=0;n<e;n++)o[n]=0;return o},R.prototype.mulp=function(e,o,n){var u=2*this.guessLen13b(e.length,o.length),l=this.makeRBT(u),g=this.stub(u),y=new Array(u),c=new Array(u),i=new Array(u),f=new Array(u),E=new Array(u),j=new Array(u),D=n.words;D.length=u,this.convert13b(e.words,e.length,y,u),this.convert13b(o.words,o.length,f,u),this.transform(y,g,c,i,u,l),this.transform(f,g,E,j,u,l);for(var V=0;V<u;V++){var Q=c[V]*E[V]-i[V]*j[V];i[V]=c[V]*j[V]+i[V]*E[V],c[V]=Q}return this.conjugate(c,i,u),this.transform(c,i,D,g,u,l),this.conjugate(D,g,u),this.normalize13b(D,u),n.negative=e.negative^o.negative,n.length=e.length+o.length,n.strip()},s.prototype.mul=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),this.mulTo(e,o)},s.prototype.mulf=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),k(this,e,o)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){a(typeof e=="number"),a(e<67108864);for(var o=0,n=0;n<this.length;n++){var u=(this.words[n]|0)*e,l=(u&67108863)+(o&67108863);o>>=26,o+=u/67108864|0,o+=l>>>26,this.words[n]=l&67108863}return o!==0&&(this.words[n]=o,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var o=x(e);if(o.length===0)return new s(1);for(var n=this,u=0;u<o.length&&o[u]===0;u++,n=n.sqr());if(++u<o.length)for(var l=n.sqr();u<o.length;u++,l=l.sqr())o[u]!==0&&(n=n.mul(l));return n},s.prototype.iushln=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=67108863>>>26-o<<26-o,l;if(o!==0){var g=0;for(l=0;l<this.length;l++){var y=this.words[l]&u,c=(this.words[l]|0)-y<<o;this.words[l]=c|g,g=y>>>26-o}g&&(this.words[l]=g,this.length++)}if(n!==0){for(l=this.length-1;l>=0;l--)this.words[l+n]=this.words[l];for(l=0;l<n;l++)this.words[l]=0;this.length+=n}return this.strip()},s.prototype.ishln=function(e){return a(this.negative===0),this.iushln(e)},s.prototype.iushrn=function(e,o,n){a(typeof e=="number"&&e>=0);var u;o?u=(o-o%26)/26:u=0;var l=e%26,g=Math.min((e-l)/26,this.length),y=67108863^67108863>>>l<<l,c=n;if(u-=g,u=Math.max(0,u),c){for(var i=0;i<g;i++)c.words[i]=this.words[i];c.length=g}if(g!==0)if(this.length>g)for(this.length-=g,i=0;i<this.length;i++)this.words[i]=this.words[i+g];else this.words[0]=0,this.length=1;var f=0;for(i=this.length-1;i>=0&&(f!==0||i>=u);i--){var E=this.words[i]|0;this.words[i]=f<<26-l|E>>>l,f=E&y}return c&&f!==0&&(c.words[c.length++]=f),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,o,n){return a(this.negative===0),this.iushrn(e,o,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return!1;var l=this.words[n];return!!(l&u)},s.prototype.imaskn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(o!==0&&n++,this.length=Math.min(n,this.length),o!==0){var u=67108863^67108863>>>o<<o;this.words[this.length-1]&=u}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return a(typeof e=="number"),a(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)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var o=0;o<this.length&&this.words[o]>=67108864;o++)this.words[o]-=67108864,o===this.length-1?this.words[o+1]=1:this.words[o+1]++;return this.length=Math.max(this.length,o+1),this},s.prototype.isubn=function(e){if(a(typeof e=="number"),a(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 o=0;o<this.length&&this.words[o]<0;o++)this.words[o]+=67108864,this.words[o+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,o,n){var u=e.length+n,l;this._expand(u);var g,y=0;for(l=0;l<e.length;l++){g=(this.words[l+n]|0)+y;var c=(e.words[l]|0)*o;g-=c&67108863,y=(g>>26)-(c/67108864|0),this.words[l+n]=g&67108863}for(;l<this.length-n;l++)g=(this.words[l+n]|0)+y,y=g>>26,this.words[l+n]=g&67108863;if(y===0)return this.strip();for(a(y===-1),y=0,l=0;l<this.length;l++)g=-(this.words[l]|0)+y,y=g>>26,this.words[l]=g&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,o){var n=this.length-e.length,u=this.clone(),l=e,g=l.words[l.length-1]|0,y=this._countBits(g);n=26-y,n!==0&&(l=l.ushln(n),u.iushln(n),g=l.words[l.length-1]|0);var c=u.length-l.length,i;if(o!=="mod"){i=new s(null),i.length=c+1,i.words=new Array(i.length);for(var f=0;f<i.length;f++)i.words[f]=0}var E=u.clone()._ishlnsubmul(l,1,c);E.negative===0&&(u=E,i&&(i.words[c]=1));for(var j=c-1;j>=0;j--){var D=(u.words[l.length+j]|0)*67108864+(u.words[l.length+j-1]|0);for(D=Math.min(D/g|0,67108863),u._ishlnsubmul(l,D,j);u.negative!==0;)D--,u.negative=0,u._ishlnsubmul(l,1,j),u.isZero()||(u.negative^=1);i&&(i.words[j]=D)}return i&&i.strip(),u.strip(),o!=="div"&&n!==0&&u.iushrn(n),{div:i||null,mod:u}},s.prototype.divmod=function(e,o,n){if(a(!e.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var u,l,g;return this.negative!==0&&e.negative===0?(g=this.neg().divmod(e,o),o!=="mod"&&(u=g.div.neg()),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.iadd(e)),{div:u,mod:l}):this.negative===0&&e.negative!==0?(g=this.divmod(e.neg(),o),o!=="mod"&&(u=g.div.neg()),{div:u,mod:g.mod}):this.negative&e.negative?(g=this.neg().divmod(e.neg(),o),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.isub(e)),{div:g.div,mod:l}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:e.length===1?o==="div"?{div:this.divn(e.words[0]),mod:null}:o==="mod"?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,o)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var o=this.divmod(e);if(o.mod.isZero())return o.div;var n=o.div.negative!==0?o.mod.isub(e):o.mod,u=e.ushrn(1),l=e.andln(1),g=n.cmp(u);return g<0||l===1&&g===0?o.div:o.div.negative!==0?o.div.isubn(1):o.div.iaddn(1)},s.prototype.modn=function(e){a(e<=67108863);for(var o=(1<<26)%e,n=0,u=this.length-1;u>=0;u--)n=(o*n+(this.words[u]|0))%e;return n},s.prototype.idivn=function(e){a(e<=67108863);for(var o=0,n=this.length-1;n>=0;n--){var u=(this.words[n]|0)+o*67108864;this.words[n]=u/e|0,o=u%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=new s(0),y=new s(1),c=0;o.isEven()&&n.isEven();)o.iushrn(1),n.iushrn(1),++c;for(var i=n.clone(),f=o.clone();!o.isZero();){for(var E=0,j=1;!(o.words[0]&j)&&E<26;++E,j<<=1);if(E>0)for(o.iushrn(E);E-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(i),l.isub(f)),u.iushrn(1),l.iushrn(1);for(var D=0,V=1;!(n.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(n.iushrn(D);D-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(i),y.isub(f)),g.iushrn(1),y.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(g),l.isub(y)):(n.isub(o),g.isub(u),y.isub(l))}return{a:g,b:y,gcd:n.iushln(c)}},s.prototype._invmp=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=n.clone();o.cmpn(1)>0&&n.cmpn(1)>0;){for(var y=0,c=1;!(o.words[0]&c)&&y<26;++y,c<<=1);if(y>0)for(o.iushrn(y);y-- >0;)u.isOdd()&&u.iadd(g),u.iushrn(1);for(var i=0,f=1;!(n.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(n.iushrn(i);i-- >0;)l.isOdd()&&l.iadd(g),l.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(l)):(n.isub(o),l.isub(u))}var E;return o.cmpn(1)===0?E=u:E=l,E.cmpn(0)<0&&E.iadd(e),E},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var o=this.clone(),n=e.clone();o.negative=0,n.negative=0;for(var u=0;o.isEven()&&n.isEven();u++)o.iushrn(1),n.iushrn(1);do{for(;o.isEven();)o.iushrn(1);for(;n.isEven();)n.iushrn(1);var l=o.cmp(n);if(l<0){var g=o;o=n,n=g}else if(l===0||n.cmpn(1)===0)break;o.isub(n)}while(!0);return n.iushln(u)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){a(typeof e=="number");var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return this._expand(n+1),this.words[n]|=u,this;for(var l=u,g=n;l!==0&&g<this.length;g++){var y=this.words[g]|0;y+=l,l=y>>>26,y&=67108863,this.words[g]=y}return l!==0&&(this.words[g]=l,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(e){var o=e<0;if(this.negative!==0&&!o)return-1;if(this.negative===0&&o)return 1;this.strip();var n;if(this.length>1)n=1;else{o&&(e=-e),a(e<=67108863,"Number is too big");var u=this.words[0]|0;n=u===e?0:u<e?-1:1}return this.negative!==0?-n|0:n},s.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var o=this.ucmp(e);return this.negative!==0?-o|0:o},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var o=0,n=this.length-1;n>=0;n--){var u=this.words[n]|0,l=e.words[n]|0;if(u!==l){u<l?o=-1:u>l&&(o=1);break}}return o},s.prototype.gtn=function(e){return this.cmpn(e)===1},s.prototype.gt=function(e){return this.cmp(e)===1},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return this.cmpn(e)===-1},s.prototype.lt=function(e){return this.cmp(e)===-1},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return this.cmpn(e)===0},s.prototype.eq=function(e){return this.cmp(e)===0},s.red=function(e){return new $(e)},s.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var I={k256:null,p224:null,p192:null,p25519:null};function L(e,o){this.name=e,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},L.prototype.ireduce=function(e){var o=e,n;do this.split(o,this.tmp),o=this.imulK(o),o=o.iadd(this.tmp),n=o.bitLength();while(n>this.n);var u=n<this.n?-1:o.ucmp(this.p);return u===0?(o.words[0]=0,o.length=1):u>0?o.isub(this.p):o.strip!==void 0?o.strip():o._strip(),o},L.prototype.split=function(e,o){e.iushrn(this.n,0,o)},L.prototype.imulK=function(e){return e.imul(this.k)};function P(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}d(P,L),P.prototype.split=function(e,o){for(var n=4194303,u=Math.min(e.length,9),l=0;l<u;l++)o.words[l]=e.words[l];if(o.length=u,e.length<=9){e.words[0]=0,e.length=1;return}var g=e.words[9];for(o.words[o.length++]=g&n,l=10;l<e.length;l++){var y=e.words[l]|0;e.words[l-10]=(y&n)<<4|g>>>22,g=y}g>>>=22,e.words[l-10]=g,g===0&&e.length>10?e.length-=10:e.length-=9},P.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var o=0,n=0;n<e.length;n++){var u=e.words[n]|0;o+=u*977,e.words[n]=o&67108863,o=u*64+(o/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function H(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}d(H,L);function W(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}d(W,L);function q(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}d(q,L),q.prototype.imulK=function(e){for(var o=0,n=0;n<e.length;n++){var u=(e.words[n]|0)*19+o,l=u&67108863;u>>>=26,e.words[n]=l,o=u}return o!==0&&(e.words[e.length++]=o),e},s._prime=function(e){if(I[e])return I[e];var o;if(e==="k256")o=new P;else if(e==="p224")o=new H;else if(e==="p192")o=new W;else if(e==="p25519")o=new q;else throw new Error("Unknown prime "+e);return I[e]=o,o};function $(e){if(typeof e=="string"){var o=s._prime(e);this.m=o.p,this.prime=o}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}$.prototype._verify1=function(e){a(e.negative===0,"red works only with positives"),a(e.red,"red works only with red numbers")},$.prototype._verify2=function(e,o){a((e.negative|o.negative)===0,"red works only with positives"),a(e.red&&e.red===o.red,"red works only with red numbers")},$.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},$.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},$.prototype.add=function(e,o){this._verify2(e,o);var n=e.add(o);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},$.prototype.iadd=function(e,o){this._verify2(e,o);var n=e.iadd(o);return n.cmp(this.m)>=0&&n.isub(this.m),n},$.prototype.sub=function(e,o){this._verify2(e,o);var n=e.sub(o);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},$.prototype.isub=function(e,o){this._verify2(e,o);var n=e.isub(o);return n.cmpn(0)<0&&n.iadd(this.m),n},$.prototype.shl=function(e,o){return this._verify1(e),this.imod(e.ushln(o))},$.prototype.imul=function(e,o){return this._verify2(e,o),this.imod(e.imul(o))},$.prototype.mul=function(e,o){return this._verify2(e,o),this.imod(e.mul(o))},$.prototype.isqr=function(e){return this.imul(e,e.clone())},$.prototype.sqr=function(e){return this.mul(e,e)},$.prototype.sqrt=function(e){if(e.isZero())return e.clone();var o=this.m.andln(3);if(a(o%2===1),o===3){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);a(!u.isZero());var g=new s(1).toRed(this),y=g.redNeg(),c=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new s(2*i*i).toRed(this);this.pow(i,c).cmp(y)!==0;)i.redIAdd(y);for(var f=this.pow(i,u),E=this.pow(e,u.addn(1).iushrn(1)),j=this.pow(e,u),D=l;j.cmp(g)!==0;){for(var V=j,Q=0;V.cmp(g)!==0;Q++)V=V.redSqr();a(Q<D);var Z=this.pow(f,new s(1).iushln(D-Q-1));E=E.redMul(Z),f=Z.redSqr(),j=j.redMul(f),D=Q}return E},$.prototype.invm=function(e){var o=e._invmp(this.m);return o.negative!==0?(o.negative=0,this.imod(o).redNeg()):this.imod(o)},$.prototype.pow=function(e,o){if(o.isZero())return new s(1).toRed(this);if(o.cmpn(1)===0)return e.clone();var n=4,u=new Array(1<<n);u[0]=new s(1).toRed(this),u[1]=e;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],e);var g=u[0],y=0,c=0,i=o.bitLength()%26;for(i===0&&(i=26),l=o.length-1;l>=0;l--){for(var f=o.words[l],E=i-1;E>=0;E--){var j=f>>E&1;if(g!==u[0]&&(g=this.sqr(g)),j===0&&y===0){c=0;continue}y<<=1,y|=j,c++,!(c!==n&&(l!==0||E!==0))&&(g=this.mul(g,u[y]),c=0,y=0)}i=26}return g},$.prototype.convertTo=function(e){var o=e.umod(this.m);return o===e?o.clone():o},$.prototype.convertFrom=function(e){var o=e.clone();return o.red=null,o},s.mont=function(e){return new N(e)};function N(e){$.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}d(N,$),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var o=this.imod(e.mul(this.rinv));return o.red=null,o},N.prototype.imul=function(e,o){if(e.isZero()||o.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.mul=function(e,o){if(e.isZero()||o.isZero())return new s(0)._forceRed(this);var n=e.mul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.invm=function(e){var o=this.imod(e._invmp(this.m).mul(this.r2));return o._forceRed(this)}})(t,Lt)}(Nl);var F7=Nl.exports,Ka={exports:{}},T1;function zl(){if(T1)return Ka.exports;T1=1;var t;Ka.exports=function(a){return t||(t=new r(null)),t.generate(a)};function r(a){this.rand=a}if(Ka.exports.Rand=r,r.prototype.generate=function(a){return this._rand(a)},r.prototype._rand=function(a){if(this.rand.getBytes)return this.rand.getBytes(a);for(var d=new Uint8Array(a),s=0;s<d.length;s++)d[s]=this.rand.getByte();return d},typeof self=="object")self.crypto&&self.crypto.getRandomValues?r.prototype._rand=function(a){var d=new Uint8Array(a);return self.crypto.getRandomValues(d),d}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(a){var d=new Uint8Array(a);return self.msCrypto.getRandomValues(d),d}:typeof window=="object"&&(r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var h=yg();if(typeof h.randomBytes!="function")throw new Error("Not supported");r.prototype._rand=function(a){return h.randomBytes(a)}}catch{}return Ka.exports}var Fl,D1;function P1(){if(D1)return Fl;D1=1;var t=F7,r=zl();function h(a){this.rand=a||new r.Rand}return Fl=h,h.create=function(a){return new h(a)},h.prototype._randbelow=function(a){var d=a.bitLength(),s=Math.ceil(d/8);do var m=new t(this.rand.generate(s));while(m.cmp(a)>=0);return m},h.prototype._randrange=function(a,d){var s=d.sub(a);return a.add(this._randbelow(s))},h.prototype.test=function(a,d,s){var m=a.bitLength(),p=t.mont(a),w=new t(1).toRed(p);d||(d=Math.max(1,m/48|0));for(var S=a.subn(1),A=0;!S.testn(A);A++);for(var v=a.shrn(A),_=S.toRed(p),x=!0;d>0;d--){var b=this._randrange(new t(2),S);s&&s(b);var M=b.toRed(p).redPow(v);if(!(M.cmp(w)===0||M.cmp(_)===0)){for(var O=1;O<A;O++){if(M=M.redSqr(),M.cmp(w)===0)return!1;if(M.cmp(_)===0)break}if(O===A)return!1}}return x},h.prototype.getDivisor=function(a,d){var s=a.bitLength(),m=t.mont(a),p=new t(1).toRed(m);d||(d=Math.max(1,s/48|0));for(var w=a.subn(1),S=0;!w.testn(S);S++);for(var A=a.shrn(S),v=w.toRed(m);d>0;d--){var _=this._randrange(new t(2),w),x=a.gcd(_);if(x.cmpn(1)!==0)return x;var b=_.toRed(m).redPow(A);if(!(b.cmp(p)===0||b.cmp(v)===0)){for(var M=1;M<S;M++){if(b=b.redSqr(),b.cmp(p)===0)return b.fromRed().subn(1).gcd(a);if(b.cmp(v)===0)break}if(M===S)return b=b.redSqr(),b.fromRed().subn(1).gcd(a)}}return!1},Fl}var Vl,N1;function z1(){if(N1)return Vl;N1=1;var t=$n;Vl=O,O.simpleSieve=b,O.fermatTest=M;var r=$1,h=new r(24),a=P1(),d=new a,s=new r(1),m=new r(2),p=new r(5);new r(16),new r(8);var w=new r(10),S=new r(3);new r(7);var A=new r(11),v=new r(4);new r(12);var _=null;function x(){if(_!==null)return _;var k=1048576,R=[];R[0]=2;for(var I=1,L=3;L<k;L+=2){for(var P=Math.ceil(Math.sqrt(L)),H=0;H<I&&R[H]<=P&&L%R[H]!==0;H++);I!==H&&R[H]<=P||(R[I++]=L)}return _=R,R}function b(k){for(var R=x(),I=0;I<R.length;I++)if(k.modn(R[I])===0)return k.cmpn(R[I])===0;return!0}function M(k){var R=r.mont(k);return m.toRed(R).redPow(k.subn(1)).fromRed().cmpn(1)===0}function O(k,R){if(k<16)return R===2||R===5?new r([140,123]):new r([140,39]);R=new r(R);for(var I,L;;){for(I=new r(t(Math.ceil(k/8)));I.bitLength()>k;)I.ishrn(1);if(I.isEven()&&I.iadd(s),I.testn(1)||I.iadd(m),R.cmp(m)){if(!R.cmp(p))for(;I.mod(w).cmp(S);)I.iadd(v)}else for(;I.mod(h).cmp(A);)I.iadd(v);if(L=I.shrn(1),b(L)&&b(I)&&M(L)&&M(I)&&d.test(L)&&d.test(I))return I}}return Vl}let V7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},H7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},W7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},Z7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},K7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},J7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},Q7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},X7={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},G7={modp1:V7,modp2:H7,modp5:W7,modp14:Z7,modp15:K7,modp16:J7,modp17:Q7,modp18:X7};var Hl,F1;function Y7(){if(F1)return Hl;F1=1;var t=$1,r=P1(),h=new r,a=new t(24),d=new t(11),s=new t(10),m=new t(3),p=new t(7),w=z1(),S=$n;Hl=b;function A(O,k){return k=k||"utf8",Ut.Buffer.isBuffer(O)||(O=new Ut.Buffer(O,k)),this._pub=new t(O),this}function v(O,k){return k=k||"utf8",Ut.Buffer.isBuffer(O)||(O=new Ut.Buffer(O,k)),this._priv=new t(O),this}var _={};function x(O,k){var R=k.toString("hex"),I=[R,O.toString(16)].join("_");if(I in _)return _[I];var L=0;if(O.isEven()||!w.simpleSieve||!w.fermatTest(O)||!h.test(O))return L+=1,R==="02"||R==="05"?L+=8:L+=4,_[I]=L,L;h.test(O.shrn(1))||(L+=2);var P;switch(R){case"02":O.mod(a).cmp(d)&&(L+=8);break;case"05":P=O.mod(s),P.cmp(m)&&P.cmp(p)&&(L+=8);break;default:L+=4}return _[I]=L,L}function b(O,k,R){this.setGenerator(k),this.__prime=new t(O),this._prime=t.mont(this.__prime),this._primeLen=O.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,R?(this.setPublicKey=A,this.setPrivateKey=v):this._primeCode=8}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=x(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new t(S(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(O){O=new t(O),O=O.toRed(this._prime);var k=O.redPow(this._priv).fromRed(),R=new Ut.Buffer(k.toArray()),I=this.getPrime();if(R.length<I.length){var L=new Ut.Buffer(I.length-R.length);L.fill(0),R=Ut.Buffer.concat([L,R])}return R},b.prototype.getPublicKey=function(O){return M(this._pub,O)},b.prototype.getPrivateKey=function(O){return M(this._priv,O)},b.prototype.getPrime=function(O){return M(this.__prime,O)},b.prototype.getGenerator=function(O){return M(this._gen,O)},b.prototype.setGenerator=function(O,k){return k=k||"utf8",Ut.Buffer.isBuffer(O)||(O=new Ut.Buffer(O,k)),this.__gen=O,this._gen=new t(O),this};function M(O,k){var R=new Ut.Buffer(O.toArray());return k?R.toString(k):R}return Hl}var V1;function t5(){if(V1)return cn;V1=1;var t=z1(),r=G7,h=Y7();function a(m){var p=new Ut.Buffer(r[m].prime,"hex"),w=new Ut.Buffer(r[m].gen,"hex");return new h(p,w)}var d={binary:!0,hex:!0,base64:!0};function s(m,p,w,S){return Ut.Buffer.isBuffer(p)||d[p]===void 0?s(m,"binary",p,w):(p=p||"binary",S=S||"binary",w=w||new Ut.Buffer([2]),Ut.Buffer.isBuffer(w)||(w=new Ut.Buffer(w,S)),typeof m=="number"?new h(t(m,w),w,!0):(Ut.Buffer.isBuffer(m)||(m=new Ut.Buffer(m,p)),new h(m,w,!0)))}return cn.DiffieHellmanGroup=cn.createDiffieHellmanGroup=cn.getDiffieHellman=a,cn.createDiffieHellman=cn.DiffieHellman=s,cn}var fs={exports:{}},Wl={exports:{}};Wl.exports,function(t){(function(r,h){function a(n,u){if(!n)throw new Error(u||"Assertion failed")}function d(n,u){n.super_=u;var l=function(){};l.prototype=u.prototype,n.prototype=new l,n.prototype.constructor=n}function s(n,u,l){if(s.isBN(n))return n;this.negative=0,this.words=null,this.length=0,this.red=null,n!==null&&((u==="le"||u==="be")&&(l=u,u=10),this._init(n||0,u||10,l||"be"))}typeof r=="object"?r.exports=s:h.BN=s,s.BN=s,s.wordSize=26;var m;try{typeof window<"u"&&typeof window.Buffer<"u"?m=window.Buffer:m=Ut.Buffer}catch{}s.isBN=function(n){return n instanceof s?!0:n!==null&&typeof n=="object"&&n.constructor.wordSize===s.wordSize&&Array.isArray(n.words)},s.max=function(n,u){return n.cmp(u)>0?n:u},s.min=function(n,u){return n.cmp(u)<0?n:u},s.prototype._init=function(n,u,l){if(typeof n=="number")return this._initNumber(n,u,l);if(typeof n=="object")return this._initArray(n,u,l);u==="hex"&&(u=16),a(u===(u|0)&&u>=2&&u<=36),n=n.toString().replace(/\s+/g,"");var g=0;n[0]==="-"&&(g++,this.negative=1),g<n.length&&(u===16?this._parseHex(n,g,l):(this._parseBase(n,u,g),l==="le"&&this._initArray(this.toArray(),u,l)))},s.prototype._initNumber=function(n,u,l){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):(a(n<9007199254740992),this.words=[n&67108863,n/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),u,l)},s.prototype._initArray=function(n,u,l){if(a(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 g=0;g<this.length;g++)this.words[g]=0;var y,c,i=0;if(l==="be")for(g=n.length-1,y=0;g>=0;g-=3)c=n[g]|n[g-1]<<8|n[g-2]<<16,this.words[y]|=c<<i&67108863,this.words[y+1]=c>>>26-i&67108863,i+=24,i>=26&&(i-=26,y++);else if(l==="le")for(g=0,y=0;g<n.length;g+=3)c=n[g]|n[g+1]<<8|n[g+2]<<16,this.words[y]|=c<<i&67108863,this.words[y+1]=c>>>26-i&67108863,i+=24,i>=26&&(i-=26,y++);return this._strip()};function p(n,u){var l=n.charCodeAt(u);if(l>=48&&l<=57)return l-48;if(l>=65&&l<=70)return l-55;if(l>=97&&l<=102)return l-87;a(!1,"Invalid character in "+n)}function w(n,u,l){var g=p(n,l);return l-1>=u&&(g|=p(n,l-1)<<4),g}s.prototype._parseHex=function(n,u,l){this.length=Math.ceil((n.length-u)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var y=0,c=0,i;if(l==="be")for(g=n.length-1;g>=u;g-=2)i=w(n,u,g)<<y,this.words[c]|=i&67108863,y>=18?(y-=18,c+=1,this.words[c]|=i>>>26):y+=8;else{var f=n.length-u;for(g=f%2===0?u+1:u;g<n.length;g+=2)i=w(n,u,g)<<y,this.words[c]|=i&67108863,y>=18?(y-=18,c+=1,this.words[c]|=i>>>26):y+=8}this._strip()};function S(n,u,l,g){for(var y=0,c=0,i=Math.min(n.length,l),f=u;f<i;f++){var E=n.charCodeAt(f)-48;y*=g,E>=49?c=E-49+10:E>=17?c=E-17+10:c=E,a(E>=0&&c<g,"Invalid character"),y+=c}return y}s.prototype._parseBase=function(n,u,l){this.words=[0],this.length=1;for(var g=0,y=1;y<=67108863;y*=u)g++;g--,y=y/u|0;for(var c=n.length-l,i=c%g,f=Math.min(c,c-i)+l,E=0,j=l;j<f;j+=g)E=S(n,j,j+g,u),this.imuln(y),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(i!==0){var D=1;for(E=S(n,j,n.length,u),j=0;j<i;j++)D*=u;this.imuln(D),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},s.prototype.copy=function(n){n.words=new Array(this.length);for(var u=0;u<this.length;u++)n.words[u]=this.words[u];n.length=this.length,n.negative=this.negative,n.red=this.red};function A(n,u){n.words=u.words,n.length=u.length,n.negative=u.negative,n.red=u.red}if(s.prototype._move=function(n){A(n,this)},s.prototype.clone=function(){var n=new s(null);return this.copy(n),n},s.prototype._expand=function(n){for(;this.length<n;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch{s.prototype.inspect=v}else s.prototype.inspect=v;function v(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(n,u){n=n||10,u=u|0||1;var l;if(n===16||n==="hex"){l="";for(var g=0,y=0,c=0;c<this.length;c++){var i=this.words[c],f=((i<<g|y)&16777215).toString(16);y=i>>>24-g&16777215,g+=2,g>=26&&(g-=26,c--),y!==0||c!==this.length-1?l=_[6-f.length]+f+l:l=f+l}for(y!==0&&(l=y.toString(16)+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(n===(n|0)&&n>=2&&n<=36){var E=x[n],j=b[n];l="";var D=this.clone();for(D.negative=0;!D.isZero();){var V=D.modrn(j).toString(n);D=D.idivn(j),D.isZero()?l=V+l:l=_[E-V.length]+V+l}for(this.isZero()&&(l="0"+l);l.length%u!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}a(!1,"Base should be between 2 and 36")},s.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&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-n:n},s.prototype.toJSON=function(){return this.toString(16,2)},m&&(s.prototype.toBuffer=function(n,u){return this.toArrayLike(m,n,u)}),s.prototype.toArray=function(n,u){return this.toArrayLike(Array,n,u)};var M=function(n,u){return n.allocUnsafe?n.allocUnsafe(u):new n(u)};s.prototype.toArrayLike=function(n,u,l){this._strip();var g=this.byteLength(),y=l||Math.max(1,g);a(g<=y,"byte array longer than desired length"),a(y>0,"Requested array length <= 0");var c=M(n,y),i=u==="le"?"LE":"BE";return this["_toArrayLike"+i](c,g),c},s.prototype._toArrayLikeLE=function(n,u){for(var l=0,g=0,y=0,c=0;y<this.length;y++){var i=this.words[y]<<c|g;n[l++]=i&255,l<n.length&&(n[l++]=i>>8&255),l<n.length&&(n[l++]=i>>16&255),c===6?(l<n.length&&(n[l++]=i>>24&255),g=0,c=0):(g=i>>>24,c+=2)}if(l<n.length)for(n[l++]=g;l<n.length;)n[l++]=0},s.prototype._toArrayLikeBE=function(n,u){for(var l=n.length-1,g=0,y=0,c=0;y<this.length;y++){var i=this.words[y]<<c|g;n[l--]=i&255,l>=0&&(n[l--]=i>>8&255),l>=0&&(n[l--]=i>>16&255),c===6?(l>=0&&(n[l--]=i>>24&255),g=0,c=0):(g=i>>>24,c+=2)}if(l>=0)for(n[l--]=g;l>=0;)n[l--]=0},Math.clz32?s.prototype._countBits=function(n){return 32-Math.clz32(n)}:s.prototype._countBits=function(n){var u=n,l=0;return u>=4096&&(l+=13,u>>>=13),u>=64&&(l+=7,u>>>=7),u>=8&&(l+=4,u>>>=4),u>=2&&(l+=2,u>>>=2),l+u},s.prototype._zeroBits=function(n){if(n===0)return 26;var u=n,l=0;return u&8191||(l+=13,u>>>=13),u&127||(l+=7,u>>>=7),u&15||(l+=4,u>>>=4),u&3||(l+=2,u>>>=2),u&1||l++,l},s.prototype.bitLength=function(){var n=this.words[this.length-1],u=this._countBits(n);return(this.length-1)*26+u};function O(n){for(var u=new Array(n.bitLength()),l=0;l<u.length;l++){var g=l/26|0,y=l%26;u[l]=n.words[g]>>>y&1}return u}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,u=0;u<this.length;u++){var l=this._zeroBits(this.words[u]);if(n+=l,l!==26)break}return n},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(n){return this.negative!==0?this.abs().inotn(n).iaddn(1):this.clone()},s.prototype.fromTwos=function(n){return this.testn(n-1)?this.notn(n).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(n){for(;this.length<n.length;)this.words[this.length++]=0;for(var u=0;u<n.length;u++)this.words[u]=this.words[u]|n.words[u];return this._strip()},s.prototype.ior=function(n){return a((this.negative|n.negative)===0),this.iuor(n)},s.prototype.or=function(n){return this.length>n.length?this.clone().ior(n):n.clone().ior(this)},s.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},s.prototype.iuand=function(n){var u;this.length>n.length?u=n:u=this;for(var l=0;l<u.length;l++)this.words[l]=this.words[l]&n.words[l];return this.length=u.length,this._strip()},s.prototype.iand=function(n){return a((this.negative|n.negative)===0),this.iuand(n)},s.prototype.and=function(n){return this.length>n.length?this.clone().iand(n):n.clone().iand(this)},s.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},s.prototype.iuxor=function(n){var u,l;this.length>n.length?(u=this,l=n):(u=n,l=this);for(var g=0;g<l.length;g++)this.words[g]=u.words[g]^l.words[g];if(this!==u)for(;g<u.length;g++)this.words[g]=u.words[g];return this.length=u.length,this._strip()},s.prototype.ixor=function(n){return a((this.negative|n.negative)===0),this.iuxor(n)},s.prototype.xor=function(n){return this.length>n.length?this.clone().ixor(n):n.clone().ixor(this)},s.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},s.prototype.inotn=function(n){a(typeof n=="number"&&n>=0);var u=Math.ceil(n/26)|0,l=n%26;this._expand(u),l>0&&u--;for(var g=0;g<u;g++)this.words[g]=~this.words[g]&67108863;return l>0&&(this.words[g]=~this.words[g]&67108863>>26-l),this._strip()},s.prototype.notn=function(n){return this.clone().inotn(n)},s.prototype.setn=function(n,u){a(typeof n=="number"&&n>=0);var l=n/26|0,g=n%26;return this._expand(l+1),u?this.words[l]=this.words[l]|1<<g:this.words[l]=this.words[l]&~(1<<g),this._strip()},s.prototype.iadd=function(n){var u;if(this.negative!==0&&n.negative===0)return this.negative=0,u=this.isub(n),this.negative^=1,this._normSign();if(this.negative===0&&n.negative!==0)return n.negative=0,u=this.isub(n),n.negative=1,u._normSign();var l,g;this.length>n.length?(l=this,g=n):(l=n,g=this);for(var y=0,c=0;c<g.length;c++)u=(l.words[c]|0)+(g.words[c]|0)+y,this.words[c]=u&67108863,y=u>>>26;for(;y!==0&&c<l.length;c++)u=(l.words[c]|0)+y,this.words[c]=u&67108863,y=u>>>26;if(this.length=l.length,y!==0)this.words[this.length]=y,this.length++;else if(l!==this)for(;c<l.length;c++)this.words[c]=l.words[c];return this},s.prototype.add=function(n){var u;return n.negative!==0&&this.negative===0?(n.negative=0,u=this.sub(n),n.negative^=1,u):n.negative===0&&this.negative!==0?(this.negative=0,u=n.sub(this),this.negative=1,u):this.length>n.length?this.clone().iadd(n):n.clone().iadd(this)},s.prototype.isub=function(n){if(n.negative!==0){n.negative=0;var u=this.iadd(n);return n.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var l=this.cmp(n);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,y;l>0?(g=this,y=n):(g=n,y=this);for(var c=0,i=0;i<y.length;i++)u=(g.words[i]|0)-(y.words[i]|0)+c,c=u>>26,this.words[i]=u&67108863;for(;c!==0&&i<g.length;i++)u=(g.words[i]|0)+c,c=u>>26,this.words[i]=u&67108863;if(c===0&&i<g.length&&g!==this)for(;i<g.length;i++)this.words[i]=g.words[i];return this.length=Math.max(this.length,i),g!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(n){return this.clone().isub(n)};function k(n,u,l){l.negative=u.negative^n.negative;var g=n.length+u.length|0;l.length=g,g=g-1|0;var y=n.words[0]|0,c=u.words[0]|0,i=y*c,f=i&67108863,E=i/67108864|0;l.words[0]=f;for(var j=1;j<g;j++){for(var D=E>>>26,V=E&67108863,Q=Math.min(j,u.length-1),Z=Math.max(0,j-n.length+1);Z<=Q;Z++){var tt=j-Z|0;y=n.words[tt]|0,c=u.words[Z]|0,i=y*c+V,D+=i/67108864|0,V=i&67108863}l.words[j]=V|0,E=D|0}return E!==0?l.words[j]=E|0:l.length--,l._strip()}var R=function(n,u,l){var g=n.words,y=u.words,c=l.words,i=0,f,E,j,D=g[0]|0,V=D&8191,Q=D>>>13,Z=g[1]|0,tt=Z&8191,Y=Z>>>13,rt=g[2]|0,It=rt&8191,z=rt>>>13,U=g[3]|0,G=U&8191,J=U>>>13,et=g[4]|0,C=et&8191,B=et>>>13,T=g[5]|0,F=T&8191,K=T>>>13,X=g[6]|0,ut=X&8191,it=X>>>13,ot=g[7]|0,Ct=ot&8191,nt=ot>>>13,st=g[8]|0,Bt=st&8191,at=st>>>13,bt=g[9]|0,qt=bt&8191,lt=bt>>>13,Mt=y[0]|0,Ft=Mt&8191,ht=Mt>>>13,wt=y[1]|0,Vt=wt&8191,ft=wt>>>13,_t=y[2]|0,Kt=_t&8191,ct=_t>>>13,St=y[3]|0,Jt=St&8191,dt=St>>>13,At=y[4]|0,Qt=At&8191,pt=At>>>13,xt=y[5]|0,Xt=xt&8191,mt=xt>>>13,kt=y[6]|0,Gt=kt&8191,gt=kt>>>13,Et=y[7]|0,Yt=Et&8191,yt=Et>>>13,Rt=y[8]|0,te=Rt&8191,vt=Rt>>>13,Ot=y[9]|0,$t=Ot&8191,Tt=Ot>>>13;l.negative=n.negative^u.negative,l.length=19,f=Math.imul(V,Ft),E=Math.imul(V,ht),E=E+Math.imul(Q,Ft)|0,j=Math.imul(Q,ht);var ue=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(ue>>>26)|0,ue&=67108863,f=Math.imul(tt,Ft),E=Math.imul(tt,ht),E=E+Math.imul(Y,Ft)|0,j=Math.imul(Y,ht),f=f+Math.imul(V,Vt)|0,E=E+Math.imul(V,ft)|0,E=E+Math.imul(Q,Vt)|0,j=j+Math.imul(Q,ft)|0;var le=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(le>>>26)|0,le&=67108863,f=Math.imul(It,Ft),E=Math.imul(It,ht),E=E+Math.imul(z,Ft)|0,j=Math.imul(z,ht),f=f+Math.imul(tt,Vt)|0,E=E+Math.imul(tt,ft)|0,E=E+Math.imul(Y,Vt)|0,j=j+Math.imul(Y,ft)|0,f=f+Math.imul(V,Kt)|0,E=E+Math.imul(V,ct)|0,E=E+Math.imul(Q,Kt)|0,j=j+Math.imul(Q,ct)|0;var fe=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(fe>>>26)|0,fe&=67108863,f=Math.imul(G,Ft),E=Math.imul(G,ht),E=E+Math.imul(J,Ft)|0,j=Math.imul(J,ht),f=f+Math.imul(It,Vt)|0,E=E+Math.imul(It,ft)|0,E=E+Math.imul(z,Vt)|0,j=j+Math.imul(z,ft)|0,f=f+Math.imul(tt,Kt)|0,E=E+Math.imul(tt,ct)|0,E=E+Math.imul(Y,Kt)|0,j=j+Math.imul(Y,ct)|0,f=f+Math.imul(V,Jt)|0,E=E+Math.imul(V,dt)|0,E=E+Math.imul(Q,Jt)|0,j=j+Math.imul(Q,dt)|0;var ce=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(ce>>>26)|0,ce&=67108863,f=Math.imul(C,Ft),E=Math.imul(C,ht),E=E+Math.imul(B,Ft)|0,j=Math.imul(B,ht),f=f+Math.imul(G,Vt)|0,E=E+Math.imul(G,ft)|0,E=E+Math.imul(J,Vt)|0,j=j+Math.imul(J,ft)|0,f=f+Math.imul(It,Kt)|0,E=E+Math.imul(It,ct)|0,E=E+Math.imul(z,Kt)|0,j=j+Math.imul(z,ct)|0,f=f+Math.imul(tt,Jt)|0,E=E+Math.imul(tt,dt)|0,E=E+Math.imul(Y,Jt)|0,j=j+Math.imul(Y,dt)|0,f=f+Math.imul(V,Qt)|0,E=E+Math.imul(V,pt)|0,E=E+Math.imul(Q,Qt)|0,j=j+Math.imul(Q,pt)|0;var de=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(de>>>26)|0,de&=67108863,f=Math.imul(F,Ft),E=Math.imul(F,ht),E=E+Math.imul(K,Ft)|0,j=Math.imul(K,ht),f=f+Math.imul(C,Vt)|0,E=E+Math.imul(C,ft)|0,E=E+Math.imul(B,Vt)|0,j=j+Math.imul(B,ft)|0,f=f+Math.imul(G,Kt)|0,E=E+Math.imul(G,ct)|0,E=E+Math.imul(J,Kt)|0,j=j+Math.imul(J,ct)|0,f=f+Math.imul(It,Jt)|0,E=E+Math.imul(It,dt)|0,E=E+Math.imul(z,Jt)|0,j=j+Math.imul(z,dt)|0,f=f+Math.imul(tt,Qt)|0,E=E+Math.imul(tt,pt)|0,E=E+Math.imul(Y,Qt)|0,j=j+Math.imul(Y,pt)|0,f=f+Math.imul(V,Xt)|0,E=E+Math.imul(V,mt)|0,E=E+Math.imul(Q,Xt)|0,j=j+Math.imul(Q,mt)|0;var pe=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(pe>>>26)|0,pe&=67108863,f=Math.imul(ut,Ft),E=Math.imul(ut,ht),E=E+Math.imul(it,Ft)|0,j=Math.imul(it,ht),f=f+Math.imul(F,Vt)|0,E=E+Math.imul(F,ft)|0,E=E+Math.imul(K,Vt)|0,j=j+Math.imul(K,ft)|0,f=f+Math.imul(C,Kt)|0,E=E+Math.imul(C,ct)|0,E=E+Math.imul(B,Kt)|0,j=j+Math.imul(B,ct)|0,f=f+Math.imul(G,Jt)|0,E=E+Math.imul(G,dt)|0,E=E+Math.imul(J,Jt)|0,j=j+Math.imul(J,dt)|0,f=f+Math.imul(It,Qt)|0,E=E+Math.imul(It,pt)|0,E=E+Math.imul(z,Qt)|0,j=j+Math.imul(z,pt)|0,f=f+Math.imul(tt,Xt)|0,E=E+Math.imul(tt,mt)|0,E=E+Math.imul(Y,Xt)|0,j=j+Math.imul(Y,mt)|0,f=f+Math.imul(V,Gt)|0,E=E+Math.imul(V,gt)|0,E=E+Math.imul(Q,Gt)|0,j=j+Math.imul(Q,gt)|0;var me=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(me>>>26)|0,me&=67108863,f=Math.imul(Ct,Ft),E=Math.imul(Ct,ht),E=E+Math.imul(nt,Ft)|0,j=Math.imul(nt,ht),f=f+Math.imul(ut,Vt)|0,E=E+Math.imul(ut,ft)|0,E=E+Math.imul(it,Vt)|0,j=j+Math.imul(it,ft)|0,f=f+Math.imul(F,Kt)|0,E=E+Math.imul(F,ct)|0,E=E+Math.imul(K,Kt)|0,j=j+Math.imul(K,ct)|0,f=f+Math.imul(C,Jt)|0,E=E+Math.imul(C,dt)|0,E=E+Math.imul(B,Jt)|0,j=j+Math.imul(B,dt)|0,f=f+Math.imul(G,Qt)|0,E=E+Math.imul(G,pt)|0,E=E+Math.imul(J,Qt)|0,j=j+Math.imul(J,pt)|0,f=f+Math.imul(It,Xt)|0,E=E+Math.imul(It,mt)|0,E=E+Math.imul(z,Xt)|0,j=j+Math.imul(z,mt)|0,f=f+Math.imul(tt,Gt)|0,E=E+Math.imul(tt,gt)|0,E=E+Math.imul(Y,Gt)|0,j=j+Math.imul(Y,gt)|0,f=f+Math.imul(V,Yt)|0,E=E+Math.imul(V,yt)|0,E=E+Math.imul(Q,Yt)|0,j=j+Math.imul(Q,yt)|0;var ge=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(ge>>>26)|0,ge&=67108863,f=Math.imul(Bt,Ft),E=Math.imul(Bt,ht),E=E+Math.imul(at,Ft)|0,j=Math.imul(at,ht),f=f+Math.imul(Ct,Vt)|0,E=E+Math.imul(Ct,ft)|0,E=E+Math.imul(nt,Vt)|0,j=j+Math.imul(nt,ft)|0,f=f+Math.imul(ut,Kt)|0,E=E+Math.imul(ut,ct)|0,E=E+Math.imul(it,Kt)|0,j=j+Math.imul(it,ct)|0,f=f+Math.imul(F,Jt)|0,E=E+Math.imul(F,dt)|0,E=E+Math.imul(K,Jt)|0,j=j+Math.imul(K,dt)|0,f=f+Math.imul(C,Qt)|0,E=E+Math.imul(C,pt)|0,E=E+Math.imul(B,Qt)|0,j=j+Math.imul(B,pt)|0,f=f+Math.imul(G,Xt)|0,E=E+Math.imul(G,mt)|0,E=E+Math.imul(J,Xt)|0,j=j+Math.imul(J,mt)|0,f=f+Math.imul(It,Gt)|0,E=E+Math.imul(It,gt)|0,E=E+Math.imul(z,Gt)|0,j=j+Math.imul(z,gt)|0,f=f+Math.imul(tt,Yt)|0,E=E+Math.imul(tt,yt)|0,E=E+Math.imul(Y,Yt)|0,j=j+Math.imul(Y,yt)|0,f=f+Math.imul(V,te)|0,E=E+Math.imul(V,vt)|0,E=E+Math.imul(Q,te)|0,j=j+Math.imul(Q,vt)|0;var ye=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(ye>>>26)|0,ye&=67108863,f=Math.imul(qt,Ft),E=Math.imul(qt,ht),E=E+Math.imul(lt,Ft)|0,j=Math.imul(lt,ht),f=f+Math.imul(Bt,Vt)|0,E=E+Math.imul(Bt,ft)|0,E=E+Math.imul(at,Vt)|0,j=j+Math.imul(at,ft)|0,f=f+Math.imul(Ct,Kt)|0,E=E+Math.imul(Ct,ct)|0,E=E+Math.imul(nt,Kt)|0,j=j+Math.imul(nt,ct)|0,f=f+Math.imul(ut,Jt)|0,E=E+Math.imul(ut,dt)|0,E=E+Math.imul(it,Jt)|0,j=j+Math.imul(it,dt)|0,f=f+Math.imul(F,Qt)|0,E=E+Math.imul(F,pt)|0,E=E+Math.imul(K,Qt)|0,j=j+Math.imul(K,pt)|0,f=f+Math.imul(C,Xt)|0,E=E+Math.imul(C,mt)|0,E=E+Math.imul(B,Xt)|0,j=j+Math.imul(B,mt)|0,f=f+Math.imul(G,Gt)|0,E=E+Math.imul(G,gt)|0,E=E+Math.imul(J,Gt)|0,j=j+Math.imul(J,gt)|0,f=f+Math.imul(It,Yt)|0,E=E+Math.imul(It,yt)|0,E=E+Math.imul(z,Yt)|0,j=j+Math.imul(z,yt)|0,f=f+Math.imul(tt,te)|0,E=E+Math.imul(tt,vt)|0,E=E+Math.imul(Y,te)|0,j=j+Math.imul(Y,vt)|0,f=f+Math.imul(V,$t)|0,E=E+Math.imul(V,Tt)|0,E=E+Math.imul(Q,$t)|0,j=j+Math.imul(Q,Tt)|0;var ve=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(ve>>>26)|0,ve&=67108863,f=Math.imul(qt,Vt),E=Math.imul(qt,ft),E=E+Math.imul(lt,Vt)|0,j=Math.imul(lt,ft),f=f+Math.imul(Bt,Kt)|0,E=E+Math.imul(Bt,ct)|0,E=E+Math.imul(at,Kt)|0,j=j+Math.imul(at,ct)|0,f=f+Math.imul(Ct,Jt)|0,E=E+Math.imul(Ct,dt)|0,E=E+Math.imul(nt,Jt)|0,j=j+Math.imul(nt,dt)|0,f=f+Math.imul(ut,Qt)|0,E=E+Math.imul(ut,pt)|0,E=E+Math.imul(it,Qt)|0,j=j+Math.imul(it,pt)|0,f=f+Math.imul(F,Xt)|0,E=E+Math.imul(F,mt)|0,E=E+Math.imul(K,Xt)|0,j=j+Math.imul(K,mt)|0,f=f+Math.imul(C,Gt)|0,E=E+Math.imul(C,gt)|0,E=E+Math.imul(B,Gt)|0,j=j+Math.imul(B,gt)|0,f=f+Math.imul(G,Yt)|0,E=E+Math.imul(G,yt)|0,E=E+Math.imul(J,Yt)|0,j=j+Math.imul(J,yt)|0,f=f+Math.imul(It,te)|0,E=E+Math.imul(It,vt)|0,E=E+Math.imul(z,te)|0,j=j+Math.imul(z,vt)|0,f=f+Math.imul(tt,$t)|0,E=E+Math.imul(tt,Tt)|0,E=E+Math.imul(Y,$t)|0,j=j+Math.imul(Y,Tt)|0;var be=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(be>>>26)|0,be&=67108863,f=Math.imul(qt,Kt),E=Math.imul(qt,ct),E=E+Math.imul(lt,Kt)|0,j=Math.imul(lt,ct),f=f+Math.imul(Bt,Jt)|0,E=E+Math.imul(Bt,dt)|0,E=E+Math.imul(at,Jt)|0,j=j+Math.imul(at,dt)|0,f=f+Math.imul(Ct,Qt)|0,E=E+Math.imul(Ct,pt)|0,E=E+Math.imul(nt,Qt)|0,j=j+Math.imul(nt,pt)|0,f=f+Math.imul(ut,Xt)|0,E=E+Math.imul(ut,mt)|0,E=E+Math.imul(it,Xt)|0,j=j+Math.imul(it,mt)|0,f=f+Math.imul(F,Gt)|0,E=E+Math.imul(F,gt)|0,E=E+Math.imul(K,Gt)|0,j=j+Math.imul(K,gt)|0,f=f+Math.imul(C,Yt)|0,E=E+Math.imul(C,yt)|0,E=E+Math.imul(B,Yt)|0,j=j+Math.imul(B,yt)|0,f=f+Math.imul(G,te)|0,E=E+Math.imul(G,vt)|0,E=E+Math.imul(J,te)|0,j=j+Math.imul(J,vt)|0,f=f+Math.imul(It,$t)|0,E=E+Math.imul(It,Tt)|0,E=E+Math.imul(z,$t)|0,j=j+Math.imul(z,Tt)|0;var we=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(we>>>26)|0,we&=67108863,f=Math.imul(qt,Jt),E=Math.imul(qt,dt),E=E+Math.imul(lt,Jt)|0,j=Math.imul(lt,dt),f=f+Math.imul(Bt,Qt)|0,E=E+Math.imul(Bt,pt)|0,E=E+Math.imul(at,Qt)|0,j=j+Math.imul(at,pt)|0,f=f+Math.imul(Ct,Xt)|0,E=E+Math.imul(Ct,mt)|0,E=E+Math.imul(nt,Xt)|0,j=j+Math.imul(nt,mt)|0,f=f+Math.imul(ut,Gt)|0,E=E+Math.imul(ut,gt)|0,E=E+Math.imul(it,Gt)|0,j=j+Math.imul(it,gt)|0,f=f+Math.imul(F,Yt)|0,E=E+Math.imul(F,yt)|0,E=E+Math.imul(K,Yt)|0,j=j+Math.imul(K,yt)|0,f=f+Math.imul(C,te)|0,E=E+Math.imul(C,vt)|0,E=E+Math.imul(B,te)|0,j=j+Math.imul(B,vt)|0,f=f+Math.imul(G,$t)|0,E=E+Math.imul(G,Tt)|0,E=E+Math.imul(J,$t)|0,j=j+Math.imul(J,Tt)|0;var Me=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(Me>>>26)|0,Me&=67108863,f=Math.imul(qt,Qt),E=Math.imul(qt,pt),E=E+Math.imul(lt,Qt)|0,j=Math.imul(lt,pt),f=f+Math.imul(Bt,Xt)|0,E=E+Math.imul(Bt,mt)|0,E=E+Math.imul(at,Xt)|0,j=j+Math.imul(at,mt)|0,f=f+Math.imul(Ct,Gt)|0,E=E+Math.imul(Ct,gt)|0,E=E+Math.imul(nt,Gt)|0,j=j+Math.imul(nt,gt)|0,f=f+Math.imul(ut,Yt)|0,E=E+Math.imul(ut,yt)|0,E=E+Math.imul(it,Yt)|0,j=j+Math.imul(it,yt)|0,f=f+Math.imul(F,te)|0,E=E+Math.imul(F,vt)|0,E=E+Math.imul(K,te)|0,j=j+Math.imul(K,vt)|0,f=f+Math.imul(C,$t)|0,E=E+Math.imul(C,Tt)|0,E=E+Math.imul(B,$t)|0,j=j+Math.imul(B,Tt)|0;var _e=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(_e>>>26)|0,_e&=67108863,f=Math.imul(qt,Xt),E=Math.imul(qt,mt),E=E+Math.imul(lt,Xt)|0,j=Math.imul(lt,mt),f=f+Math.imul(Bt,Gt)|0,E=E+Math.imul(Bt,gt)|0,E=E+Math.imul(at,Gt)|0,j=j+Math.imul(at,gt)|0,f=f+Math.imul(Ct,Yt)|0,E=E+Math.imul(Ct,yt)|0,E=E+Math.imul(nt,Yt)|0,j=j+Math.imul(nt,yt)|0,f=f+Math.imul(ut,te)|0,E=E+Math.imul(ut,vt)|0,E=E+Math.imul(it,te)|0,j=j+Math.imul(it,vt)|0,f=f+Math.imul(F,$t)|0,E=E+Math.imul(F,Tt)|0,E=E+Math.imul(K,$t)|0,j=j+Math.imul(K,Tt)|0;var Se=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(Se>>>26)|0,Se&=67108863,f=Math.imul(qt,Gt),E=Math.imul(qt,gt),E=E+Math.imul(lt,Gt)|0,j=Math.imul(lt,gt),f=f+Math.imul(Bt,Yt)|0,E=E+Math.imul(Bt,yt)|0,E=E+Math.imul(at,Yt)|0,j=j+Math.imul(at,yt)|0,f=f+Math.imul(Ct,te)|0,E=E+Math.imul(Ct,vt)|0,E=E+Math.imul(nt,te)|0,j=j+Math.imul(nt,vt)|0,f=f+Math.imul(ut,$t)|0,E=E+Math.imul(ut,Tt)|0,E=E+Math.imul(it,$t)|0,j=j+Math.imul(it,Tt)|0;var Ae=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,f=Math.imul(qt,Yt),E=Math.imul(qt,yt),E=E+Math.imul(lt,Yt)|0,j=Math.imul(lt,yt),f=f+Math.imul(Bt,te)|0,E=E+Math.imul(Bt,vt)|0,E=E+Math.imul(at,te)|0,j=j+Math.imul(at,vt)|0,f=f+Math.imul(Ct,$t)|0,E=E+Math.imul(Ct,Tt)|0,E=E+Math.imul(nt,$t)|0,j=j+Math.imul(nt,Tt)|0;var xe=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(xe>>>26)|0,xe&=67108863,f=Math.imul(qt,te),E=Math.imul(qt,vt),E=E+Math.imul(lt,te)|0,j=Math.imul(lt,vt),f=f+Math.imul(Bt,$t)|0,E=E+Math.imul(Bt,Tt)|0,E=E+Math.imul(at,$t)|0,j=j+Math.imul(at,Tt)|0;var T0=(i+f|0)+((E&8191)<<13)|0;i=(j+(E>>>13)|0)+(T0>>>26)|0,T0&=67108863,f=Math.imul(qt,$t),E=Math.imul(qt,Tt),E=E+Math.imul(lt,$t)|0,j=Math.imul(lt,Tt);var D0=(i+f|0)+((E&8191)<<13)|0;return i=(j+(E>>>13)|0)+(D0>>>26)|0,D0&=67108863,c[0]=ue,c[1]=le,c[2]=fe,c[3]=ce,c[4]=de,c[5]=pe,c[6]=me,c[7]=ge,c[8]=ye,c[9]=ve,c[10]=be,c[11]=we,c[12]=Me,c[13]=_e,c[14]=Se,c[15]=Ae,c[16]=xe,c[17]=T0,c[18]=D0,i!==0&&(c[19]=i,l.length++),l};Math.imul||(R=k);function I(n,u,l){l.negative=u.negative^n.negative,l.length=n.length+u.length;for(var g=0,y=0,c=0;c<l.length-1;c++){var i=y;y=0;for(var f=g&67108863,E=Math.min(c,u.length-1),j=Math.max(0,c-n.length+1);j<=E;j++){var D=c-j,V=n.words[D]|0,Q=u.words[j]|0,Z=V*Q,tt=Z&67108863;i=i+(Z/67108864|0)|0,tt=tt+f|0,f=tt&67108863,i=i+(tt>>>26)|0,y+=i>>>26,i&=67108863}l.words[c]=f,g=i,i=y}return g!==0?l.words[c]=g:l.length--,l._strip()}function L(n,u,l){return I(n,u,l)}s.prototype.mulTo=function(n,u){var l,g=this.length+n.length;return this.length===10&&n.length===10?l=R(this,n,u):g<63?l=k(this,n,u):g<1024?l=I(this,n,u):l=L(this,n,u),l},s.prototype.mul=function(n){var u=new s(null);return u.words=new Array(this.length+n.length),this.mulTo(n,u)},s.prototype.mulf=function(n){var u=new s(null);return u.words=new Array(this.length+n.length),L(this,n,u)},s.prototype.imul=function(n){return this.clone().mulTo(n,this)},s.prototype.imuln=function(n){var u=n<0;u&&(n=-n),a(typeof n=="number"),a(n<67108864);for(var l=0,g=0;g<this.length;g++){var y=(this.words[g]|0)*n,c=(y&67108863)+(l&67108863);l>>=26,l+=y/67108864|0,l+=c>>>26,this.words[g]=c&67108863}return l!==0&&(this.words[g]=l,this.length++),u?this.ineg():this},s.prototype.muln=function(n){return this.clone().imuln(n)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(n){var u=O(n);if(u.length===0)return new s(1);for(var l=this,g=0;g<u.length&&u[g]===0;g++,l=l.sqr());if(++g<u.length)for(var y=l.sqr();g<u.length;g++,y=y.sqr())u[g]!==0&&(l=l.mul(y));return l},s.prototype.iushln=function(n){a(typeof n=="number"&&n>=0);var u=n%26,l=(n-u)/26,g=67108863>>>26-u<<26-u,y;if(u!==0){var c=0;for(y=0;y<this.length;y++){var i=this.words[y]&g,f=(this.words[y]|0)-i<<u;this.words[y]=f|c,c=i>>>26-u}c&&(this.words[y]=c,this.length++)}if(l!==0){for(y=this.length-1;y>=0;y--)this.words[y+l]=this.words[y];for(y=0;y<l;y++)this.words[y]=0;this.length+=l}return this._strip()},s.prototype.ishln=function(n){return a(this.negative===0),this.iushln(n)},s.prototype.iushrn=function(n,u,l){a(typeof n=="number"&&n>=0);var g;u?g=(u-u%26)/26:g=0;var y=n%26,c=Math.min((n-y)/26,this.length),i=67108863^67108863>>>y<<y,f=l;if(g-=c,g=Math.max(0,g),f){for(var E=0;E<c;E++)f.words[E]=this.words[E];f.length=c}if(c!==0)if(this.length>c)for(this.length-=c,E=0;E<this.length;E++)this.words[E]=this.words[E+c];else this.words[0]=0,this.length=1;var j=0;for(E=this.length-1;E>=0&&(j!==0||E>=g);E--){var D=this.words[E]|0;this.words[E]=j<<26-y|D>>>y,j=D&i}return f&&j!==0&&(f.words[f.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(n,u,l){return a(this.negative===0),this.iushrn(n,u,l)},s.prototype.shln=function(n){return this.clone().ishln(n)},s.prototype.ushln=function(n){return this.clone().iushln(n)},s.prototype.shrn=function(n){return this.clone().ishrn(n)},s.prototype.ushrn=function(n){return this.clone().iushrn(n)},s.prototype.testn=function(n){a(typeof n=="number"&&n>=0);var u=n%26,l=(n-u)/26,g=1<<u;if(this.length<=l)return!1;var y=this.words[l];return!!(y&g)},s.prototype.imaskn=function(n){a(typeof n=="number"&&n>=0);var u=n%26,l=(n-u)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(u!==0&&l++,this.length=Math.min(l,this.length),u!==0){var g=67108863^67108863>>>u<<u;this.words[this.length-1]&=g}return this._strip()},s.prototype.maskn=function(n){return this.clone().imaskn(n)},s.prototype.iaddn=function(n){return a(typeof n=="number"),a(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)},s.prototype._iaddn=function(n){this.words[0]+=n;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},s.prototype.isubn=function(n){if(a(typeof n=="number"),a(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 u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this._strip()},s.prototype.addn=function(n){return this.clone().iaddn(n)},s.prototype.subn=function(n){return this.clone().isubn(n)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(n,u,l){var g=n.length+l,y;this._expand(g);var c,i=0;for(y=0;y<n.length;y++){c=(this.words[y+l]|0)+i;var f=(n.words[y]|0)*u;c-=f&67108863,i=(c>>26)-(f/67108864|0),this.words[y+l]=c&67108863}for(;y<this.length-l;y++)c=(this.words[y+l]|0)+i,i=c>>26,this.words[y+l]=c&67108863;if(i===0)return this._strip();for(a(i===-1),i=0,y=0;y<this.length;y++)c=-(this.words[y]|0)+i,i=c>>26,this.words[y]=c&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(n,u){var l=this.length-n.length,g=this.clone(),y=n,c=y.words[y.length-1]|0,i=this._countBits(c);l=26-i,l!==0&&(y=y.ushln(l),g.iushln(l),c=y.words[y.length-1]|0);var f=g.length-y.length,E;if(u!=="mod"){E=new s(null),E.length=f+1,E.words=new Array(E.length);for(var j=0;j<E.length;j++)E.words[j]=0}var D=g.clone()._ishlnsubmul(y,1,f);D.negative===0&&(g=D,E&&(E.words[f]=1));for(var V=f-1;V>=0;V--){var Q=(g.words[y.length+V]|0)*67108864+(g.words[y.length+V-1]|0);for(Q=Math.min(Q/c|0,67108863),g._ishlnsubmul(y,Q,V);g.negative!==0;)Q--,g.negative=0,g._ishlnsubmul(y,1,V),g.isZero()||(g.negative^=1);E&&(E.words[V]=Q)}return E&&E._strip(),g._strip(),u!=="div"&&l!==0&&g.iushrn(l),{div:E||null,mod:g}},s.prototype.divmod=function(n,u,l){if(a(!n.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var g,y,c;return this.negative!==0&&n.negative===0?(c=this.neg().divmod(n,u),u!=="mod"&&(g=c.div.neg()),u!=="div"&&(y=c.mod.neg(),l&&y.negative!==0&&y.iadd(n)),{div:g,mod:y}):this.negative===0&&n.negative!==0?(c=this.divmod(n.neg(),u),u!=="mod"&&(g=c.div.neg()),{div:g,mod:c.mod}):this.negative&n.negative?(c=this.neg().divmod(n.neg(),u),u!=="div"&&(y=c.mod.neg(),l&&y.negative!==0&&y.isub(n)),{div:c.div,mod:y}):n.length>this.length||this.cmp(n)<0?{div:new s(0),mod:this}:n.length===1?u==="div"?{div:this.divn(n.words[0]),mod:null}:u==="mod"?{div:null,mod:new s(this.modrn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new s(this.modrn(n.words[0]))}:this._wordDiv(n,u)},s.prototype.div=function(n){return this.divmod(n,"div",!1).div},s.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},s.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},s.prototype.divRound=function(n){var u=this.divmod(n);if(u.mod.isZero())return u.div;var l=u.div.negative!==0?u.mod.isub(n):u.mod,g=n.ushrn(1),y=n.andln(1),c=l.cmp(g);return c<0||y===1&&c===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},s.prototype.modrn=function(n){var u=n<0;u&&(n=-n),a(n<=67108863);for(var l=(1<<26)%n,g=0,y=this.length-1;y>=0;y--)g=(l*g+(this.words[y]|0))%n;return u?-g:g},s.prototype.modn=function(n){return this.modrn(n)},s.prototype.idivn=function(n){var u=n<0;u&&(n=-n),a(n<=67108863);for(var l=0,g=this.length-1;g>=0;g--){var y=(this.words[g]|0)+l*67108864;this.words[g]=y/n|0,l=y%n}return this._strip(),u?this.ineg():this},s.prototype.divn=function(n){return this.clone().idivn(n)},s.prototype.egcd=function(n){a(n.negative===0),a(!n.isZero());var u=this,l=n.clone();u.negative!==0?u=u.umod(n):u=u.clone();for(var g=new s(1),y=new s(0),c=new s(0),i=new s(1),f=0;u.isEven()&&l.isEven();)u.iushrn(1),l.iushrn(1),++f;for(var E=l.clone(),j=u.clone();!u.isZero();){for(var D=0,V=1;!(u.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(u.iushrn(D);D-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(E),y.isub(j)),g.iushrn(1),y.iushrn(1);for(var Q=0,Z=1;!(l.words[0]&Z)&&Q<26;++Q,Z<<=1);if(Q>0)for(l.iushrn(Q);Q-- >0;)(c.isOdd()||i.isOdd())&&(c.iadd(E),i.isub(j)),c.iushrn(1),i.iushrn(1);u.cmp(l)>=0?(u.isub(l),g.isub(c),y.isub(i)):(l.isub(u),c.isub(g),i.isub(y))}return{a:c,b:i,gcd:l.iushln(f)}},s.prototype._invmp=function(n){a(n.negative===0),a(!n.isZero());var u=this,l=n.clone();u.negative!==0?u=u.umod(n):u=u.clone();for(var g=new s(1),y=new s(0),c=l.clone();u.cmpn(1)>0&&l.cmpn(1)>0;){for(var i=0,f=1;!(u.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(u.iushrn(i);i-- >0;)g.isOdd()&&g.iadd(c),g.iushrn(1);for(var E=0,j=1;!(l.words[0]&j)&&E<26;++E,j<<=1);if(E>0)for(l.iushrn(E);E-- >0;)y.isOdd()&&y.iadd(c),y.iushrn(1);u.cmp(l)>=0?(u.isub(l),g.isub(y)):(l.isub(u),y.isub(g))}var D;return u.cmpn(1)===0?D=g:D=y,D.cmpn(0)<0&&D.iadd(n),D},s.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var u=this.clone(),l=n.clone();u.negative=0,l.negative=0;for(var g=0;u.isEven()&&l.isEven();g++)u.iushrn(1),l.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;l.isEven();)l.iushrn(1);var y=u.cmp(l);if(y<0){var c=u;u=l,l=c}else if(y===0||l.cmpn(1)===0)break;u.isub(l)}while(!0);return l.iushln(g)},s.prototype.invm=function(n){return this.egcd(n).a.umod(n)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(n){return this.words[0]&n},s.prototype.bincn=function(n){a(typeof n=="number");var u=n%26,l=(n-u)/26,g=1<<u;if(this.length<=l)return this._expand(l+1),this.words[l]|=g,this;for(var y=g,c=l;y!==0&&c<this.length;c++){var i=this.words[c]|0;i+=y,y=i>>>26,i&=67108863,this.words[c]=i}return y!==0&&(this.words[c]=y,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(n){var u=n<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this._strip();var l;if(this.length>1)l=1;else{u&&(n=-n),a(n<=67108863,"Number is too big");var g=this.words[0]|0;l=g===n?0:g<n?-1:1}return this.negative!==0?-l|0:l},s.prototype.cmp=function(n){if(this.negative!==0&&n.negative===0)return-1;if(this.negative===0&&n.negative!==0)return 1;var u=this.ucmp(n);return this.negative!==0?-u|0:u},s.prototype.ucmp=function(n){if(this.length>n.length)return 1;if(this.length<n.length)return-1;for(var u=0,l=this.length-1;l>=0;l--){var g=this.words[l]|0,y=n.words[l]|0;if(g!==y){g<y?u=-1:g>y&&(u=1);break}}return u},s.prototype.gtn=function(n){return this.cmpn(n)===1},s.prototype.gt=function(n){return this.cmp(n)===1},s.prototype.gten=function(n){return this.cmpn(n)>=0},s.prototype.gte=function(n){return this.cmp(n)>=0},s.prototype.ltn=function(n){return this.cmpn(n)===-1},s.prototype.lt=function(n){return this.cmp(n)===-1},s.prototype.lten=function(n){return this.cmpn(n)<=0},s.prototype.lte=function(n){return this.cmp(n)<=0},s.prototype.eqn=function(n){return this.cmpn(n)===0},s.prototype.eq=function(n){return this.cmp(n)===0},s.red=function(n){return new e(n)},s.prototype.toRed=function(n){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),n.convertTo(this)._forceRed(n)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(n){return this.red=n,this},s.prototype.forceRed=function(n){return a(!this.red,"Already a number in reduction context"),this._forceRed(n)},s.prototype.redAdd=function(n){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},s.prototype.redIAdd=function(n){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},s.prototype.redSub=function(n){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},s.prototype.redISub=function(n){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},s.prototype.redShl=function(n){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},s.prototype.redMul=function(n){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},s.prototype.redIMul=function(n){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(n){return a(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var P={k256:null,p224:null,p192:null,p25519:null};function H(n,u){this.name=n,this.p=new s(u,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var n=new s(null);return n.words=new Array(Math.ceil(this.n/13)),n},H.prototype.ireduce=function(n){var u=n,l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),l=u.bitLength();while(l>this.n);var g=l<this.n?-1:u.ucmp(this.p);return g===0?(u.words[0]=0,u.length=1):g>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},H.prototype.split=function(n,u){n.iushrn(this.n,0,u)},H.prototype.imulK=function(n){return n.imul(this.k)};function W(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}d(W,H),W.prototype.split=function(n,u){for(var l=4194303,g=Math.min(n.length,9),y=0;y<g;y++)u.words[y]=n.words[y];if(u.length=g,n.length<=9){n.words[0]=0,n.length=1;return}var c=n.words[9];for(u.words[u.length++]=c&l,y=10;y<n.length;y++){var i=n.words[y]|0;n.words[y-10]=(i&l)<<4|c>>>22,c=i}c>>>=22,n.words[y-10]=c,c===0&&n.length>10?n.length-=10:n.length-=9},W.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var u=0,l=0;l<n.length;l++){var g=n.words[l]|0;u+=g*977,n.words[l]=u&67108863,u=g*64+(u/67108864|0)}return n.words[n.length-1]===0&&(n.length--,n.words[n.length-1]===0&&n.length--),n};function q(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}d(q,H);function $(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}d($,H);function N(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}d(N,H),N.prototype.imulK=function(n){for(var u=0,l=0;l<n.length;l++){var g=(n.words[l]|0)*19+u,y=g&67108863;g>>>=26,n.words[l]=y,u=g}return u!==0&&(n.words[n.length++]=u),n},s._prime=function(n){if(P[n])return P[n];var u;if(n==="k256")u=new W;else if(n==="p224")u=new q;else if(n==="p192")u=new $;else if(n==="p25519")u=new N;else throw new Error("Unknown prime "+n);return P[n]=u,u};function e(n){if(typeof n=="string"){var u=s._prime(n);this.m=u.p,this.prime=u}else a(n.gtn(1),"modulus must be greater than 1"),this.m=n,this.prime=null}e.prototype._verify1=function(n){a(n.negative===0,"red works only with positives"),a(n.red,"red works only with red numbers")},e.prototype._verify2=function(n,u){a((n.negative|u.negative)===0,"red works only with positives"),a(n.red&&n.red===u.red,"red works only with red numbers")},e.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):(A(n,n.umod(this.m)._forceRed(this)),n)},e.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},e.prototype.add=function(n,u){this._verify2(n,u);var l=n.add(u);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},e.prototype.iadd=function(n,u){this._verify2(n,u);var l=n.iadd(u);return l.cmp(this.m)>=0&&l.isub(this.m),l},e.prototype.sub=function(n,u){this._verify2(n,u);var l=n.sub(u);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},e.prototype.isub=function(n,u){this._verify2(n,u);var l=n.isub(u);return l.cmpn(0)<0&&l.iadd(this.m),l},e.prototype.shl=function(n,u){return this._verify1(n),this.imod(n.ushln(u))},e.prototype.imul=function(n,u){return this._verify2(n,u),this.imod(n.imul(u))},e.prototype.mul=function(n,u){return this._verify2(n,u),this.imod(n.mul(u))},e.prototype.isqr=function(n){return this.imul(n,n.clone())},e.prototype.sqr=function(n){return this.mul(n,n)},e.prototype.sqrt=function(n){if(n.isZero())return n.clone();var u=this.m.andln(3);if(a(u%2===1),u===3){var l=this.m.add(new s(1)).iushrn(2);return this.pow(n,l)}for(var g=this.m.subn(1),y=0;!g.isZero()&&g.andln(1)===0;)y++,g.iushrn(1);a(!g.isZero());var c=new s(1).toRed(this),i=c.redNeg(),f=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,f).cmp(i)!==0;)E.redIAdd(i);for(var j=this.pow(E,g),D=this.pow(n,g.addn(1).iushrn(1)),V=this.pow(n,g),Q=y;V.cmp(c)!==0;){for(var Z=V,tt=0;Z.cmp(c)!==0;tt++)Z=Z.redSqr();a(tt<Q);var Y=this.pow(j,new s(1).iushln(Q-tt-1));D=D.redMul(Y),j=Y.redSqr(),V=V.redMul(j),Q=tt}return D},e.prototype.invm=function(n){var u=n._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},e.prototype.pow=function(n,u){if(u.isZero())return new s(1).toRed(this);if(u.cmpn(1)===0)return n.clone();var l=4,g=new Array(1<<l);g[0]=new s(1).toRed(this),g[1]=n;for(var y=2;y<g.length;y++)g[y]=this.mul(g[y-1],n);var c=g[0],i=0,f=0,E=u.bitLength()%26;for(E===0&&(E=26),y=u.length-1;y>=0;y--){for(var j=u.words[y],D=E-1;D>=0;D--){var V=j>>D&1;if(c!==g[0]&&(c=this.sqr(c)),V===0&&i===0){f=0;continue}i<<=1,i|=V,f++,!(f!==l&&(y!==0||D!==0))&&(c=this.mul(c,g[i]),f=0,i=0)}E=26}return c},e.prototype.convertTo=function(n){var u=n.umod(this.m);return u===n?u.clone():u},e.prototype.convertFrom=function(n){var u=n.clone();return u.red=null,u},s.mont=function(n){return new o(n)};function o(n){e.call(this,n),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}d(o,e),o.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},o.prototype.convertFrom=function(n){var u=this.imod(n.mul(this.rinv));return u.red=null,u},o.prototype.imul=function(n,u){if(n.isZero()||u.isZero())return n.words[0]=0,n.length=1,n;var l=n.imul(u),g=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=l.isub(g).iushrn(this.shift),c=y;return y.cmp(this.m)>=0?c=y.isub(this.m):y.cmpn(0)<0&&(c=y.iadd(this.m)),c._forceRed(this)},o.prototype.mul=function(n,u){if(n.isZero()||u.isZero())return new s(0)._forceRed(this);var l=n.mul(u),g=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=l.isub(g).iushrn(this.shift),c=y;return y.cmp(this.m)>=0?c=y.isub(this.m):y.cmpn(0)<0&&(c=y.iadd(this.m)),c._forceRed(this)},o.prototype.invm=function(n){var u=this.imod(n._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,Lt)}(Wl);var Zl=Wl.exports,Gn=Zl,e5=$n;function r5(t){var r=H1(t),h=r.toRed(Gn.mont(t.modulus)).redPow(new Gn(t.publicExponent)).fromRed();return{blinder:h,unblinder:r.invm(t.modulus)}}function H1(t){var r=t.modulus.byteLength(),h;do h=new Gn(e5(r));while(h.cmp(t.modulus)>=0||!h.umod(t.prime1)||!h.umod(t.prime2));return h}function W1(t,r){var h=r5(r),a=r.modulus.byteLength(),d=new Gn(t).mul(h.blinder).umod(r.modulus),s=d.toRed(Gn.mont(r.prime1)),m=d.toRed(Gn.mont(r.prime2)),p=r.coefficient,w=r.prime1,S=r.prime2,A=s.redPow(r.exponent1).fromRed(),v=m.redPow(r.exponent2).fromRed(),_=A.isub(v).imul(p).umod(w).imul(S);return v.iadd(_).imul(h.unblinder).umod(r.modulus).toArrayLike(Ut.Buffer,"be",a)}W1.getr=H1;var Kl=W1,Z1={};let i5="elliptic",n5="6.5.4",o5="EC cryptography",s5="lib/elliptic.js",a5=["lib"],h5={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},u5={type:"git",url:"git@github.com:indutny/elliptic"},l5=["EC","Elliptic","curve","Cryptography"],f5="Fedor Indutny <fedor@indutny.com>",c5="MIT",d5={url:"https://github.com/indutny/elliptic/issues"},p5="https://github.com/indutny/elliptic",m5={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},g5={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},y5={name:i5,version:n5,description:o5,main:s5,files:a5,scripts:h5,repository:u5,keywords:l5,author:f5,license:c5,bugs:d5,homepage:p5,devDependencies:m5,dependencies:g5};var fr={},Jl={exports:{}};Jl.exports,function(t){(function(r,h){function a(e,o){if(!e)throw new Error(o||"Assertion failed")}function d(e,o){e.super_=o;var n=function(){};n.prototype=o.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,o,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((o==="le"||o==="be")&&(n=o,o=10),this._init(e||0,o||10,n||"be"))}typeof r=="object"?r.exports=s:h.BN=s,s.BN=s,s.wordSize=26;var m;try{typeof window<"u"&&typeof window.Buffer<"u"?m=window.Buffer:m=Ut.Buffer}catch{}s.isBN=function(e){return e instanceof s?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,o){return e.cmp(o)>0?e:o},s.min=function(e,o){return e.cmp(o)<0?e:o},s.prototype._init=function(e,o,n){if(typeof e=="number")return this._initNumber(e,o,n);if(typeof e=="object")return this._initArray(e,o,n);o==="hex"&&(o=16),a(o===(o|0)&&o>=2&&o<=36),e=e.toString().replace(/\s+/g,"");var u=0;e[0]==="-"&&(u++,this.negative=1),u<e.length&&(o===16?this._parseHex(e,u,n):(this._parseBase(e,o,u),n==="le"&&this._initArray(this.toArray(),o,n)))},s.prototype._initNumber=function(e,o,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):(a(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),o,n)},s.prototype._initArray=function(e,o,n){if(a(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 u=0;u<this.length;u++)this.words[u]=0;var l,g,y=0;if(n==="be")for(u=e.length-1,l=0;u>=0;u-=3)g=e[u]|e[u-1]<<8|e[u-2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);else if(n==="le")for(u=0,l=0;u<e.length;u+=3)g=e[u]|e[u+1]<<8|e[u+2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);return this.strip()};function p(e,o){var n=e.charCodeAt(o);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function w(e,o,n){var u=p(e,n);return n-1>=o&&(u|=p(e,n-1)<<4),u}s.prototype._parseHex=function(e,o,n){this.length=Math.ceil((e.length-o)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,g=0,y;if(n==="be")for(u=e.length-1;u>=o;u-=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8;else{var c=e.length-o;for(u=c%2===0?o+1:o;u<e.length;u+=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8}this.strip()};function S(e,o,n,u){for(var l=0,g=Math.min(e.length,n),y=o;y<g;y++){var c=e.charCodeAt(y)-48;l*=u,c>=49?l+=c-49+10:c>=17?l+=c-17+10:l+=c}return l}s.prototype._parseBase=function(e,o,n){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=o)u++;u--,l=l/o|0;for(var g=e.length-n,y=g%u,c=Math.min(g,g-y)+n,i=0,f=n;f<c;f+=u)i=S(e,f,f+u,o),this.imuln(l),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(y!==0){var E=1;for(i=S(e,f,e.length,o),f=0;f<y;f++)E*=o;this.imuln(E),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var o=0;o<this.length;o++)e.words[o]=this.words[o];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[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],_=[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];s.prototype.toString=function(e,o){e=e||10,o=o|0||1;var n;if(e===16||e==="hex"){n="";for(var u=0,l=0,g=0;g<this.length;g++){var y=this.words[g],c=((y<<u|l)&16777215).toString(16);l=y>>>24-u&16777215,l!==0||g!==this.length-1?n=A[6-c.length]+c+n:n=c+n,u+=2,u>=26&&(u-=26,g--)}for(l!==0&&(n=l.toString(16)+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var i=v[e],f=_[e];n="";var E=this.clone();for(E.negative=0;!E.isZero();){var j=E.modn(f).toString(e);E=E.idivn(f),E.isZero()?n=j+n:n=A[i-j.length]+j+n}for(this.isZero()&&(n="0"+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},s.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&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,o){return a(typeof m<"u"),this.toArrayLike(m,e,o)},s.prototype.toArray=function(e,o){return this.toArrayLike(Array,e,o)},s.prototype.toArrayLike=function(e,o,n){var u=this.byteLength(),l=n||Math.max(1,u);a(u<=l,"byte array longer than desired length"),a(l>0,"Requested array length <= 0"),this.strip();var g=o==="le",y=new e(l),c,i,f=this.clone();if(g){for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[i]=c;for(;i<l;i++)y[i]=0}else{for(i=0;i<l-u;i++)y[i]=0;for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[l-i-1]=c}return y},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var o=e,n=0;return o>=4096&&(n+=13,o>>>=13),o>=64&&(n+=7,o>>>=7),o>=8&&(n+=4,o>>>=4),o>=2&&(n+=2,o>>>=2),n+o},s.prototype._zeroBits=function(e){if(e===0)return 26;var o=e,n=0;return o&8191||(n+=13,o>>>=13),o&127||(n+=7,o>>>=7),o&15||(n+=4,o>>>=4),o&3||(n+=2,o>>>=2),o&1||n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],o=this._countBits(e);return(this.length-1)*26+o};function x(e){for(var o=new Array(e.bitLength()),n=0;n<o.length;n++){var u=n/26|0,l=n%26;o[n]=(e.words[u]&1<<l)>>>l}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,o=0;o<this.length;o++){var n=this._zeroBits(this.words[o]);if(e+=n,n!==26)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var o=0;o<e.length;o++)this.words[o]=this.words[o]|e.words[o];return this.strip()},s.prototype.ior=function(e){return a((this.negative|e.negative)===0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var o;this.length>e.length?o=e:o=this;for(var n=0;n<o.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=o.length,this.strip()},s.prototype.iand=function(e){return a((this.negative|e.negative)===0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var o,n;this.length>e.length?(o=this,n=e):(o=e,n=this);for(var u=0;u<n.length;u++)this.words[u]=o.words[u]^n.words[u];if(this!==o)for(;u<o.length;u++)this.words[u]=o.words[u];return this.length=o.length,this.strip()},s.prototype.ixor=function(e){return a((this.negative|e.negative)===0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){a(typeof e=="number"&&e>=0);var o=Math.ceil(e/26)|0,n=e%26;this._expand(o),n>0&&o--;for(var u=0;u<o;u++)this.words[u]=~this.words[u]&67108863;return n>0&&(this.words[u]=~this.words[u]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,o){a(typeof e=="number"&&e>=0);var n=e/26|0,u=e%26;return this._expand(n+1),o?this.words[n]=this.words[n]|1<<u:this.words[n]=this.words[n]&~(1<<u),this.strip()},s.prototype.iadd=function(e){var o;if(this.negative!==0&&e.negative===0)return this.negative=0,o=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,o=this.isub(e),e.negative=1,o._normSign();var n,u;this.length>e.length?(n=this,u=e):(n=e,u=this);for(var l=0,g=0;g<u.length;g++)o=(n.words[g]|0)+(u.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;for(;l!==0&&g<n.length;g++)o=(n.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;if(this.length=n.length,l!==0)this.words[this.length]=l,this.length++;else if(n!==this)for(;g<n.length;g++)this.words[g]=n.words[g];return this},s.prototype.add=function(e){var o;return e.negative!==0&&this.negative===0?(e.negative=0,o=this.sub(e),e.negative^=1,o):e.negative===0&&this.negative!==0?(this.negative=0,o=e.sub(this),this.negative=1,o):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var o=this.iadd(e);return e.negative=1,o._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 u,l;n>0?(u=this,l=e):(u=e,l=this);for(var g=0,y=0;y<l.length;y++)o=(u.words[y]|0)-(l.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;for(;g!==0&&y<u.length;y++)o=(u.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;if(g===0&&y<u.length&&u!==this)for(;y<u.length;y++)this.words[y]=u.words[y];return this.length=Math.max(this.length,y),u!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};function b(e,o,n){n.negative=o.negative^e.negative;var u=e.length+o.length|0;n.length=u,u=u-1|0;var l=e.words[0]|0,g=o.words[0]|0,y=l*g,c=y&67108863,i=y/67108864|0;n.words[0]=c;for(var f=1;f<u;f++){for(var E=i>>>26,j=i&67108863,D=Math.min(f,o.length-1),V=Math.max(0,f-e.length+1);V<=D;V++){var Q=f-V|0;l=e.words[Q]|0,g=o.words[V]|0,y=l*g+j,E+=y/67108864|0,j=y&67108863}n.words[f]=j|0,i=E|0}return i!==0?n.words[f]=i|0:n.length--,n.strip()}var M=function(e,o,n){var u=e.words,l=o.words,g=n.words,y=0,c,i,f,E=u[0]|0,j=E&8191,D=E>>>13,V=u[1]|0,Q=V&8191,Z=V>>>13,tt=u[2]|0,Y=tt&8191,rt=tt>>>13,It=u[3]|0,z=It&8191,U=It>>>13,G=u[4]|0,J=G&8191,et=G>>>13,C=u[5]|0,B=C&8191,T=C>>>13,F=u[6]|0,K=F&8191,X=F>>>13,ut=u[7]|0,it=ut&8191,ot=ut>>>13,Ct=u[8]|0,nt=Ct&8191,st=Ct>>>13,Bt=u[9]|0,at=Bt&8191,bt=Bt>>>13,qt=l[0]|0,lt=qt&8191,Mt=qt>>>13,Ft=l[1]|0,ht=Ft&8191,wt=Ft>>>13,Vt=l[2]|0,ft=Vt&8191,_t=Vt>>>13,Kt=l[3]|0,ct=Kt&8191,St=Kt>>>13,Jt=l[4]|0,dt=Jt&8191,At=Jt>>>13,Qt=l[5]|0,pt=Qt&8191,xt=Qt>>>13,Xt=l[6]|0,mt=Xt&8191,kt=Xt>>>13,Gt=l[7]|0,gt=Gt&8191,Et=Gt>>>13,Yt=l[8]|0,yt=Yt&8191,Rt=Yt>>>13,te=l[9]|0,vt=te&8191,Ot=te>>>13;n.negative=e.negative^o.negative,n.length=19,c=Math.imul(j,lt),i=Math.imul(j,Mt),i=i+Math.imul(D,lt)|0,f=Math.imul(D,Mt);var $t=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,c=Math.imul(Q,lt),i=Math.imul(Q,Mt),i=i+Math.imul(Z,lt)|0,f=Math.imul(Z,Mt),c=c+Math.imul(j,ht)|0,i=i+Math.imul(j,wt)|0,i=i+Math.imul(D,ht)|0,f=f+Math.imul(D,wt)|0;var Tt=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,c=Math.imul(Y,lt),i=Math.imul(Y,Mt),i=i+Math.imul(rt,lt)|0,f=Math.imul(rt,Mt),c=c+Math.imul(Q,ht)|0,i=i+Math.imul(Q,wt)|0,i=i+Math.imul(Z,ht)|0,f=f+Math.imul(Z,wt)|0,c=c+Math.imul(j,ft)|0,i=i+Math.imul(j,_t)|0,i=i+Math.imul(D,ft)|0,f=f+Math.imul(D,_t)|0;var ue=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ue>>>26)|0,ue&=67108863,c=Math.imul(z,lt),i=Math.imul(z,Mt),i=i+Math.imul(U,lt)|0,f=Math.imul(U,Mt),c=c+Math.imul(Y,ht)|0,i=i+Math.imul(Y,wt)|0,i=i+Math.imul(rt,ht)|0,f=f+Math.imul(rt,wt)|0,c=c+Math.imul(Q,ft)|0,i=i+Math.imul(Q,_t)|0,i=i+Math.imul(Z,ft)|0,f=f+Math.imul(Z,_t)|0,c=c+Math.imul(j,ct)|0,i=i+Math.imul(j,St)|0,i=i+Math.imul(D,ct)|0,f=f+Math.imul(D,St)|0;var le=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(le>>>26)|0,le&=67108863,c=Math.imul(J,lt),i=Math.imul(J,Mt),i=i+Math.imul(et,lt)|0,f=Math.imul(et,Mt),c=c+Math.imul(z,ht)|0,i=i+Math.imul(z,wt)|0,i=i+Math.imul(U,ht)|0,f=f+Math.imul(U,wt)|0,c=c+Math.imul(Y,ft)|0,i=i+Math.imul(Y,_t)|0,i=i+Math.imul(rt,ft)|0,f=f+Math.imul(rt,_t)|0,c=c+Math.imul(Q,ct)|0,i=i+Math.imul(Q,St)|0,i=i+Math.imul(Z,ct)|0,f=f+Math.imul(Z,St)|0,c=c+Math.imul(j,dt)|0,i=i+Math.imul(j,At)|0,i=i+Math.imul(D,dt)|0,f=f+Math.imul(D,At)|0;var fe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(fe>>>26)|0,fe&=67108863,c=Math.imul(B,lt),i=Math.imul(B,Mt),i=i+Math.imul(T,lt)|0,f=Math.imul(T,Mt),c=c+Math.imul(J,ht)|0,i=i+Math.imul(J,wt)|0,i=i+Math.imul(et,ht)|0,f=f+Math.imul(et,wt)|0,c=c+Math.imul(z,ft)|0,i=i+Math.imul(z,_t)|0,i=i+Math.imul(U,ft)|0,f=f+Math.imul(U,_t)|0,c=c+Math.imul(Y,ct)|0,i=i+Math.imul(Y,St)|0,i=i+Math.imul(rt,ct)|0,f=f+Math.imul(rt,St)|0,c=c+Math.imul(Q,dt)|0,i=i+Math.imul(Q,At)|0,i=i+Math.imul(Z,dt)|0,f=f+Math.imul(Z,At)|0,c=c+Math.imul(j,pt)|0,i=i+Math.imul(j,xt)|0,i=i+Math.imul(D,pt)|0,f=f+Math.imul(D,xt)|0;var ce=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ce>>>26)|0,ce&=67108863,c=Math.imul(K,lt),i=Math.imul(K,Mt),i=i+Math.imul(X,lt)|0,f=Math.imul(X,Mt),c=c+Math.imul(B,ht)|0,i=i+Math.imul(B,wt)|0,i=i+Math.imul(T,ht)|0,f=f+Math.imul(T,wt)|0,c=c+Math.imul(J,ft)|0,i=i+Math.imul(J,_t)|0,i=i+Math.imul(et,ft)|0,f=f+Math.imul(et,_t)|0,c=c+Math.imul(z,ct)|0,i=i+Math.imul(z,St)|0,i=i+Math.imul(U,ct)|0,f=f+Math.imul(U,St)|0,c=c+Math.imul(Y,dt)|0,i=i+Math.imul(Y,At)|0,i=i+Math.imul(rt,dt)|0,f=f+Math.imul(rt,At)|0,c=c+Math.imul(Q,pt)|0,i=i+Math.imul(Q,xt)|0,i=i+Math.imul(Z,pt)|0,f=f+Math.imul(Z,xt)|0,c=c+Math.imul(j,mt)|0,i=i+Math.imul(j,kt)|0,i=i+Math.imul(D,mt)|0,f=f+Math.imul(D,kt)|0;var de=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(de>>>26)|0,de&=67108863,c=Math.imul(it,lt),i=Math.imul(it,Mt),i=i+Math.imul(ot,lt)|0,f=Math.imul(ot,Mt),c=c+Math.imul(K,ht)|0,i=i+Math.imul(K,wt)|0,i=i+Math.imul(X,ht)|0,f=f+Math.imul(X,wt)|0,c=c+Math.imul(B,ft)|0,i=i+Math.imul(B,_t)|0,i=i+Math.imul(T,ft)|0,f=f+Math.imul(T,_t)|0,c=c+Math.imul(J,ct)|0,i=i+Math.imul(J,St)|0,i=i+Math.imul(et,ct)|0,f=f+Math.imul(et,St)|0,c=c+Math.imul(z,dt)|0,i=i+Math.imul(z,At)|0,i=i+Math.imul(U,dt)|0,f=f+Math.imul(U,At)|0,c=c+Math.imul(Y,pt)|0,i=i+Math.imul(Y,xt)|0,i=i+Math.imul(rt,pt)|0,f=f+Math.imul(rt,xt)|0,c=c+Math.imul(Q,mt)|0,i=i+Math.imul(Q,kt)|0,i=i+Math.imul(Z,mt)|0,f=f+Math.imul(Z,kt)|0,c=c+Math.imul(j,gt)|0,i=i+Math.imul(j,Et)|0,i=i+Math.imul(D,gt)|0,f=f+Math.imul(D,Et)|0;var pe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(pe>>>26)|0,pe&=67108863,c=Math.imul(nt,lt),i=Math.imul(nt,Mt),i=i+Math.imul(st,lt)|0,f=Math.imul(st,Mt),c=c+Math.imul(it,ht)|0,i=i+Math.imul(it,wt)|0,i=i+Math.imul(ot,ht)|0,f=f+Math.imul(ot,wt)|0,c=c+Math.imul(K,ft)|0,i=i+Math.imul(K,_t)|0,i=i+Math.imul(X,ft)|0,f=f+Math.imul(X,_t)|0,c=c+Math.imul(B,ct)|0,i=i+Math.imul(B,St)|0,i=i+Math.imul(T,ct)|0,f=f+Math.imul(T,St)|0,c=c+Math.imul(J,dt)|0,i=i+Math.imul(J,At)|0,i=i+Math.imul(et,dt)|0,f=f+Math.imul(et,At)|0,c=c+Math.imul(z,pt)|0,i=i+Math.imul(z,xt)|0,i=i+Math.imul(U,pt)|0,f=f+Math.imul(U,xt)|0,c=c+Math.imul(Y,mt)|0,i=i+Math.imul(Y,kt)|0,i=i+Math.imul(rt,mt)|0,f=f+Math.imul(rt,kt)|0,c=c+Math.imul(Q,gt)|0,i=i+Math.imul(Q,Et)|0,i=i+Math.imul(Z,gt)|0,f=f+Math.imul(Z,Et)|0,c=c+Math.imul(j,yt)|0,i=i+Math.imul(j,Rt)|0,i=i+Math.imul(D,yt)|0,f=f+Math.imul(D,Rt)|0;var me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(at,lt),i=Math.imul(at,Mt),i=i+Math.imul(bt,lt)|0,f=Math.imul(bt,Mt),c=c+Math.imul(nt,ht)|0,i=i+Math.imul(nt,wt)|0,i=i+Math.imul(st,ht)|0,f=f+Math.imul(st,wt)|0,c=c+Math.imul(it,ft)|0,i=i+Math.imul(it,_t)|0,i=i+Math.imul(ot,ft)|0,f=f+Math.imul(ot,_t)|0,c=c+Math.imul(K,ct)|0,i=i+Math.imul(K,St)|0,i=i+Math.imul(X,ct)|0,f=f+Math.imul(X,St)|0,c=c+Math.imul(B,dt)|0,i=i+Math.imul(B,At)|0,i=i+Math.imul(T,dt)|0,f=f+Math.imul(T,At)|0,c=c+Math.imul(J,pt)|0,i=i+Math.imul(J,xt)|0,i=i+Math.imul(et,pt)|0,f=f+Math.imul(et,xt)|0,c=c+Math.imul(z,mt)|0,i=i+Math.imul(z,kt)|0,i=i+Math.imul(U,mt)|0,f=f+Math.imul(U,kt)|0,c=c+Math.imul(Y,gt)|0,i=i+Math.imul(Y,Et)|0,i=i+Math.imul(rt,gt)|0,f=f+Math.imul(rt,Et)|0,c=c+Math.imul(Q,yt)|0,i=i+Math.imul(Q,Rt)|0,i=i+Math.imul(Z,yt)|0,f=f+Math.imul(Z,Rt)|0,c=c+Math.imul(j,vt)|0,i=i+Math.imul(j,Ot)|0,i=i+Math.imul(D,vt)|0,f=f+Math.imul(D,Ot)|0;var ge=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(at,ht),i=Math.imul(at,wt),i=i+Math.imul(bt,ht)|0,f=Math.imul(bt,wt),c=c+Math.imul(nt,ft)|0,i=i+Math.imul(nt,_t)|0,i=i+Math.imul(st,ft)|0,f=f+Math.imul(st,_t)|0,c=c+Math.imul(it,ct)|0,i=i+Math.imul(it,St)|0,i=i+Math.imul(ot,ct)|0,f=f+Math.imul(ot,St)|0,c=c+Math.imul(K,dt)|0,i=i+Math.imul(K,At)|0,i=i+Math.imul(X,dt)|0,f=f+Math.imul(X,At)|0,c=c+Math.imul(B,pt)|0,i=i+Math.imul(B,xt)|0,i=i+Math.imul(T,pt)|0,f=f+Math.imul(T,xt)|0,c=c+Math.imul(J,mt)|0,i=i+Math.imul(J,kt)|0,i=i+Math.imul(et,mt)|0,f=f+Math.imul(et,kt)|0,c=c+Math.imul(z,gt)|0,i=i+Math.imul(z,Et)|0,i=i+Math.imul(U,gt)|0,f=f+Math.imul(U,Et)|0,c=c+Math.imul(Y,yt)|0,i=i+Math.imul(Y,Rt)|0,i=i+Math.imul(rt,yt)|0,f=f+Math.imul(rt,Rt)|0,c=c+Math.imul(Q,vt)|0,i=i+Math.imul(Q,Ot)|0,i=i+Math.imul(Z,vt)|0,f=f+Math.imul(Z,Ot)|0;var ye=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(at,ft),i=Math.imul(at,_t),i=i+Math.imul(bt,ft)|0,f=Math.imul(bt,_t),c=c+Math.imul(nt,ct)|0,i=i+Math.imul(nt,St)|0,i=i+Math.imul(st,ct)|0,f=f+Math.imul(st,St)|0,c=c+Math.imul(it,dt)|0,i=i+Math.imul(it,At)|0,i=i+Math.imul(ot,dt)|0,f=f+Math.imul(ot,At)|0,c=c+Math.imul(K,pt)|0,i=i+Math.imul(K,xt)|0,i=i+Math.imul(X,pt)|0,f=f+Math.imul(X,xt)|0,c=c+Math.imul(B,mt)|0,i=i+Math.imul(B,kt)|0,i=i+Math.imul(T,mt)|0,f=f+Math.imul(T,kt)|0,c=c+Math.imul(J,gt)|0,i=i+Math.imul(J,Et)|0,i=i+Math.imul(et,gt)|0,f=f+Math.imul(et,Et)|0,c=c+Math.imul(z,yt)|0,i=i+Math.imul(z,Rt)|0,i=i+Math.imul(U,yt)|0,f=f+Math.imul(U,Rt)|0,c=c+Math.imul(Y,vt)|0,i=i+Math.imul(Y,Ot)|0,i=i+Math.imul(rt,vt)|0,f=f+Math.imul(rt,Ot)|0;var ve=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(at,ct),i=Math.imul(at,St),i=i+Math.imul(bt,ct)|0,f=Math.imul(bt,St),c=c+Math.imul(nt,dt)|0,i=i+Math.imul(nt,At)|0,i=i+Math.imul(st,dt)|0,f=f+Math.imul(st,At)|0,c=c+Math.imul(it,pt)|0,i=i+Math.imul(it,xt)|0,i=i+Math.imul(ot,pt)|0,f=f+Math.imul(ot,xt)|0,c=c+Math.imul(K,mt)|0,i=i+Math.imul(K,kt)|0,i=i+Math.imul(X,mt)|0,f=f+Math.imul(X,kt)|0,c=c+Math.imul(B,gt)|0,i=i+Math.imul(B,Et)|0,i=i+Math.imul(T,gt)|0,f=f+Math.imul(T,Et)|0,c=c+Math.imul(J,yt)|0,i=i+Math.imul(J,Rt)|0,i=i+Math.imul(et,yt)|0,f=f+Math.imul(et,Rt)|0,c=c+Math.imul(z,vt)|0,i=i+Math.imul(z,Ot)|0,i=i+Math.imul(U,vt)|0,f=f+Math.imul(U,Ot)|0;var be=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(be>>>26)|0,be&=67108863,c=Math.imul(at,dt),i=Math.imul(at,At),i=i+Math.imul(bt,dt)|0,f=Math.imul(bt,At),c=c+Math.imul(nt,pt)|0,i=i+Math.imul(nt,xt)|0,i=i+Math.imul(st,pt)|0,f=f+Math.imul(st,xt)|0,c=c+Math.imul(it,mt)|0,i=i+Math.imul(it,kt)|0,i=i+Math.imul(ot,mt)|0,f=f+Math.imul(ot,kt)|0,c=c+Math.imul(K,gt)|0,i=i+Math.imul(K,Et)|0,i=i+Math.imul(X,gt)|0,f=f+Math.imul(X,Et)|0,c=c+Math.imul(B,yt)|0,i=i+Math.imul(B,Rt)|0,i=i+Math.imul(T,yt)|0,f=f+Math.imul(T,Rt)|0,c=c+Math.imul(J,vt)|0,i=i+Math.imul(J,Ot)|0,i=i+Math.imul(et,vt)|0,f=f+Math.imul(et,Ot)|0;var we=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(at,pt),i=Math.imul(at,xt),i=i+Math.imul(bt,pt)|0,f=Math.imul(bt,xt),c=c+Math.imul(nt,mt)|0,i=i+Math.imul(nt,kt)|0,i=i+Math.imul(st,mt)|0,f=f+Math.imul(st,kt)|0,c=c+Math.imul(it,gt)|0,i=i+Math.imul(it,Et)|0,i=i+Math.imul(ot,gt)|0,f=f+Math.imul(ot,Et)|0,c=c+Math.imul(K,yt)|0,i=i+Math.imul(K,Rt)|0,i=i+Math.imul(X,yt)|0,f=f+Math.imul(X,Rt)|0,c=c+Math.imul(B,vt)|0,i=i+Math.imul(B,Ot)|0,i=i+Math.imul(T,vt)|0,f=f+Math.imul(T,Ot)|0;var Me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(at,mt),i=Math.imul(at,kt),i=i+Math.imul(bt,mt)|0,f=Math.imul(bt,kt),c=c+Math.imul(nt,gt)|0,i=i+Math.imul(nt,Et)|0,i=i+Math.imul(st,gt)|0,f=f+Math.imul(st,Et)|0,c=c+Math.imul(it,yt)|0,i=i+Math.imul(it,Rt)|0,i=i+Math.imul(ot,yt)|0,f=f+Math.imul(ot,Rt)|0,c=c+Math.imul(K,vt)|0,i=i+Math.imul(K,Ot)|0,i=i+Math.imul(X,vt)|0,f=f+Math.imul(X,Ot)|0;var _e=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(at,gt),i=Math.imul(at,Et),i=i+Math.imul(bt,gt)|0,f=Math.imul(bt,Et),c=c+Math.imul(nt,yt)|0,i=i+Math.imul(nt,Rt)|0,i=i+Math.imul(st,yt)|0,f=f+Math.imul(st,Rt)|0,c=c+Math.imul(it,vt)|0,i=i+Math.imul(it,Ot)|0,i=i+Math.imul(ot,vt)|0,f=f+Math.imul(ot,Ot)|0;var Se=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(at,yt),i=Math.imul(at,Rt),i=i+Math.imul(bt,yt)|0,f=Math.imul(bt,Rt),c=c+Math.imul(nt,vt)|0,i=i+Math.imul(nt,Ot)|0,i=i+Math.imul(st,vt)|0,f=f+Math.imul(st,Ot)|0;var Ae=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(at,vt),i=Math.imul(at,Ot),i=i+Math.imul(bt,vt)|0,f=Math.imul(bt,Ot);var xe=(y+c|0)+((i&8191)<<13)|0;return y=(f+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,g[0]=$t,g[1]=Tt,g[2]=ue,g[3]=le,g[4]=fe,g[5]=ce,g[6]=de,g[7]=pe,g[8]=me,g[9]=ge,g[10]=ye,g[11]=ve,g[12]=be,g[13]=we,g[14]=Me,g[15]=_e,g[16]=Se,g[17]=Ae,g[18]=xe,y!==0&&(g[19]=y,n.length++),n};Math.imul||(M=b);function O(e,o,n){n.negative=o.negative^e.negative,n.length=e.length+o.length;for(var u=0,l=0,g=0;g<n.length-1;g++){var y=l;l=0;for(var c=u&67108863,i=Math.min(g,o.length-1),f=Math.max(0,g-e.length+1);f<=i;f++){var E=g-f,j=e.words[E]|0,D=o.words[f]|0,V=j*D,Q=V&67108863;y=y+(V/67108864|0)|0,Q=Q+c|0,c=Q&67108863,y=y+(Q>>>26)|0,l+=y>>>26,y&=67108863}n.words[g]=c,u=y,y=l}return u!==0?n.words[g]=u:n.length--,n.strip()}function k(e,o,n){var u=new R;return u.mulp(e,o,n)}s.prototype.mulTo=function(e,o){var n,u=this.length+e.length;return this.length===10&&e.length===10?n=M(this,e,o):u<63?n=b(this,e,o):u<1024?n=O(this,e,o):n=k(this,e,o),n};function R(e,o){this.x=e,this.y=o}R.prototype.makeRBT=function(e){for(var o=new Array(e),n=s.prototype._countBits(e)-1,u=0;u<e;u++)o[u]=this.revBin(u,n,e);return o},R.prototype.revBin=function(e,o,n){if(e===0||e===n-1)return e;for(var u=0,l=0;l<o;l++)u|=(e&1)<<o-l-1,e>>=1;return u},R.prototype.permute=function(e,o,n,u,l,g){for(var y=0;y<g;y++)u[y]=o[e[y]],l[y]=n[e[y]]},R.prototype.transform=function(e,o,n,u,l,g){this.permute(g,e,o,n,u,l);for(var y=1;y<l;y<<=1)for(var c=y<<1,i=Math.cos(2*Math.PI/c),f=Math.sin(2*Math.PI/c),E=0;E<l;E+=c)for(var j=i,D=f,V=0;V<y;V++){var Q=n[E+V],Z=u[E+V],tt=n[E+V+y],Y=u[E+V+y],rt=j*tt-D*Y;Y=j*Y+D*tt,tt=rt,n[E+V]=Q+tt,u[E+V]=Z+Y,n[E+V+y]=Q-tt,u[E+V+y]=Z-Y,V!==c&&(rt=i*j-f*D,D=i*D+f*j,j=rt)}},R.prototype.guessLen13b=function(e,o){var n=Math.max(o,e)|1,u=n&1,l=0;for(n=n/2|0;n;n=n>>>1)l++;return 1<<l+1+u},R.prototype.conjugate=function(e,o,n){if(!(n<=1))for(var u=0;u<n/2;u++){var l=e[u];e[u]=e[n-u-1],e[n-u-1]=l,l=o[u],o[u]=-o[n-u-1],o[n-u-1]=-l}},R.prototype.normalize13b=function(e,o){for(var n=0,u=0;u<o/2;u++){var l=Math.round(e[2*u+1]/o)*8192+Math.round(e[2*u]/o)+n;e[u]=l&67108863,l<67108864?n=0:n=l/67108864|0}return e},R.prototype.convert13b=function(e,o,n,u){for(var l=0,g=0;g<o;g++)l=l+(e[g]|0),n[2*g]=l&8191,l=l>>>13,n[2*g+1]=l&8191,l=l>>>13;for(g=2*o;g<u;++g)n[g]=0;a(l===0),a((l&-8192)===0)},R.prototype.stub=function(e){for(var o=new Array(e),n=0;n<e;n++)o[n]=0;return o},R.prototype.mulp=function(e,o,n){var u=2*this.guessLen13b(e.length,o.length),l=this.makeRBT(u),g=this.stub(u),y=new Array(u),c=new Array(u),i=new Array(u),f=new Array(u),E=new Array(u),j=new Array(u),D=n.words;D.length=u,this.convert13b(e.words,e.length,y,u),this.convert13b(o.words,o.length,f,u),this.transform(y,g,c,i,u,l),this.transform(f,g,E,j,u,l);for(var V=0;V<u;V++){var Q=c[V]*E[V]-i[V]*j[V];i[V]=c[V]*j[V]+i[V]*E[V],c[V]=Q}return this.conjugate(c,i,u),this.transform(c,i,D,g,u,l),this.conjugate(D,g,u),this.normalize13b(D,u),n.negative=e.negative^o.negative,n.length=e.length+o.length,n.strip()},s.prototype.mul=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),this.mulTo(e,o)},s.prototype.mulf=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),k(this,e,o)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){a(typeof e=="number"),a(e<67108864);for(var o=0,n=0;n<this.length;n++){var u=(this.words[n]|0)*e,l=(u&67108863)+(o&67108863);o>>=26,o+=u/67108864|0,o+=l>>>26,this.words[n]=l&67108863}return o!==0&&(this.words[n]=o,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var o=x(e);if(o.length===0)return new s(1);for(var n=this,u=0;u<o.length&&o[u]===0;u++,n=n.sqr());if(++u<o.length)for(var l=n.sqr();u<o.length;u++,l=l.sqr())o[u]!==0&&(n=n.mul(l));return n},s.prototype.iushln=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=67108863>>>26-o<<26-o,l;if(o!==0){var g=0;for(l=0;l<this.length;l++){var y=this.words[l]&u,c=(this.words[l]|0)-y<<o;this.words[l]=c|g,g=y>>>26-o}g&&(this.words[l]=g,this.length++)}if(n!==0){for(l=this.length-1;l>=0;l--)this.words[l+n]=this.words[l];for(l=0;l<n;l++)this.words[l]=0;this.length+=n}return this.strip()},s.prototype.ishln=function(e){return a(this.negative===0),this.iushln(e)},s.prototype.iushrn=function(e,o,n){a(typeof e=="number"&&e>=0);var u;o?u=(o-o%26)/26:u=0;var l=e%26,g=Math.min((e-l)/26,this.length),y=67108863^67108863>>>l<<l,c=n;if(u-=g,u=Math.max(0,u),c){for(var i=0;i<g;i++)c.words[i]=this.words[i];c.length=g}if(g!==0)if(this.length>g)for(this.length-=g,i=0;i<this.length;i++)this.words[i]=this.words[i+g];else this.words[0]=0,this.length=1;var f=0;for(i=this.length-1;i>=0&&(f!==0||i>=u);i--){var E=this.words[i]|0;this.words[i]=f<<26-l|E>>>l,f=E&y}return c&&f!==0&&(c.words[c.length++]=f),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,o,n){return a(this.negative===0),this.iushrn(e,o,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return!1;var l=this.words[n];return!!(l&u)},s.prototype.imaskn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(o!==0&&n++,this.length=Math.min(n,this.length),o!==0){var u=67108863^67108863>>>o<<o;this.words[this.length-1]&=u}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return a(typeof e=="number"),a(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)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var o=0;o<this.length&&this.words[o]>=67108864;o++)this.words[o]-=67108864,o===this.length-1?this.words[o+1]=1:this.words[o+1]++;return this.length=Math.max(this.length,o+1),this},s.prototype.isubn=function(e){if(a(typeof e=="number"),a(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 o=0;o<this.length&&this.words[o]<0;o++)this.words[o]+=67108864,this.words[o+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,o,n){var u=e.length+n,l;this._expand(u);var g,y=0;for(l=0;l<e.length;l++){g=(this.words[l+n]|0)+y;var c=(e.words[l]|0)*o;g-=c&67108863,y=(g>>26)-(c/67108864|0),this.words[l+n]=g&67108863}for(;l<this.length-n;l++)g=(this.words[l+n]|0)+y,y=g>>26,this.words[l+n]=g&67108863;if(y===0)return this.strip();for(a(y===-1),y=0,l=0;l<this.length;l++)g=-(this.words[l]|0)+y,y=g>>26,this.words[l]=g&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,o){var n=this.length-e.length,u=this.clone(),l=e,g=l.words[l.length-1]|0,y=this._countBits(g);n=26-y,n!==0&&(l=l.ushln(n),u.iushln(n),g=l.words[l.length-1]|0);var c=u.length-l.length,i;if(o!=="mod"){i=new s(null),i.length=c+1,i.words=new Array(i.length);for(var f=0;f<i.length;f++)i.words[f]=0}var E=u.clone()._ishlnsubmul(l,1,c);E.negative===0&&(u=E,i&&(i.words[c]=1));for(var j=c-1;j>=0;j--){var D=(u.words[l.length+j]|0)*67108864+(u.words[l.length+j-1]|0);for(D=Math.min(D/g|0,67108863),u._ishlnsubmul(l,D,j);u.negative!==0;)D--,u.negative=0,u._ishlnsubmul(l,1,j),u.isZero()||(u.negative^=1);i&&(i.words[j]=D)}return i&&i.strip(),u.strip(),o!=="div"&&n!==0&&u.iushrn(n),{div:i||null,mod:u}},s.prototype.divmod=function(e,o,n){if(a(!e.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var u,l,g;return this.negative!==0&&e.negative===0?(g=this.neg().divmod(e,o),o!=="mod"&&(u=g.div.neg()),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.iadd(e)),{div:u,mod:l}):this.negative===0&&e.negative!==0?(g=this.divmod(e.neg(),o),o!=="mod"&&(u=g.div.neg()),{div:u,mod:g.mod}):this.negative&e.negative?(g=this.neg().divmod(e.neg(),o),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.isub(e)),{div:g.div,mod:l}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:e.length===1?o==="div"?{div:this.divn(e.words[0]),mod:null}:o==="mod"?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,o)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var o=this.divmod(e);if(o.mod.isZero())return o.div;var n=o.div.negative!==0?o.mod.isub(e):o.mod,u=e.ushrn(1),l=e.andln(1),g=n.cmp(u);return g<0||l===1&&g===0?o.div:o.div.negative!==0?o.div.isubn(1):o.div.iaddn(1)},s.prototype.modn=function(e){a(e<=67108863);for(var o=(1<<26)%e,n=0,u=this.length-1;u>=0;u--)n=(o*n+(this.words[u]|0))%e;return n},s.prototype.idivn=function(e){a(e<=67108863);for(var o=0,n=this.length-1;n>=0;n--){var u=(this.words[n]|0)+o*67108864;this.words[n]=u/e|0,o=u%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=new s(0),y=new s(1),c=0;o.isEven()&&n.isEven();)o.iushrn(1),n.iushrn(1),++c;for(var i=n.clone(),f=o.clone();!o.isZero();){for(var E=0,j=1;!(o.words[0]&j)&&E<26;++E,j<<=1);if(E>0)for(o.iushrn(E);E-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(i),l.isub(f)),u.iushrn(1),l.iushrn(1);for(var D=0,V=1;!(n.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(n.iushrn(D);D-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(i),y.isub(f)),g.iushrn(1),y.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(g),l.isub(y)):(n.isub(o),g.isub(u),y.isub(l))}return{a:g,b:y,gcd:n.iushln(c)}},s.prototype._invmp=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=n.clone();o.cmpn(1)>0&&n.cmpn(1)>0;){for(var y=0,c=1;!(o.words[0]&c)&&y<26;++y,c<<=1);if(y>0)for(o.iushrn(y);y-- >0;)u.isOdd()&&u.iadd(g),u.iushrn(1);for(var i=0,f=1;!(n.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(n.iushrn(i);i-- >0;)l.isOdd()&&l.iadd(g),l.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(l)):(n.isub(o),l.isub(u))}var E;return o.cmpn(1)===0?E=u:E=l,E.cmpn(0)<0&&E.iadd(e),E},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var o=this.clone(),n=e.clone();o.negative=0,n.negative=0;for(var u=0;o.isEven()&&n.isEven();u++)o.iushrn(1),n.iushrn(1);do{for(;o.isEven();)o.iushrn(1);for(;n.isEven();)n.iushrn(1);var l=o.cmp(n);if(l<0){var g=o;o=n,n=g}else if(l===0||n.cmpn(1)===0)break;o.isub(n)}while(!0);return n.iushln(u)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){a(typeof e=="number");var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return this._expand(n+1),this.words[n]|=u,this;for(var l=u,g=n;l!==0&&g<this.length;g++){var y=this.words[g]|0;y+=l,l=y>>>26,y&=67108863,this.words[g]=y}return l!==0&&(this.words[g]=l,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(e){var o=e<0;if(this.negative!==0&&!o)return-1;if(this.negative===0&&o)return 1;this.strip();var n;if(this.length>1)n=1;else{o&&(e=-e),a(e<=67108863,"Number is too big");var u=this.words[0]|0;n=u===e?0:u<e?-1:1}return this.negative!==0?-n|0:n},s.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var o=this.ucmp(e);return this.negative!==0?-o|0:o},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var o=0,n=this.length-1;n>=0;n--){var u=this.words[n]|0,l=e.words[n]|0;if(u!==l){u<l?o=-1:u>l&&(o=1);break}}return o},s.prototype.gtn=function(e){return this.cmpn(e)===1},s.prototype.gt=function(e){return this.cmp(e)===1},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return this.cmpn(e)===-1},s.prototype.lt=function(e){return this.cmp(e)===-1},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return this.cmpn(e)===0},s.prototype.eq=function(e){return this.cmp(e)===0},s.red=function(e){return new $(e)},s.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var I={k256:null,p224:null,p192:null,p25519:null};function L(e,o){this.name=e,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},L.prototype.ireduce=function(e){var o=e,n;do this.split(o,this.tmp),o=this.imulK(o),o=o.iadd(this.tmp),n=o.bitLength();while(n>this.n);var u=n<this.n?-1:o.ucmp(this.p);return u===0?(o.words[0]=0,o.length=1):u>0?o.isub(this.p):o.strip!==void 0?o.strip():o._strip(),o},L.prototype.split=function(e,o){e.iushrn(this.n,0,o)},L.prototype.imulK=function(e){return e.imul(this.k)};function P(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}d(P,L),P.prototype.split=function(e,o){for(var n=4194303,u=Math.min(e.length,9),l=0;l<u;l++)o.words[l]=e.words[l];if(o.length=u,e.length<=9){e.words[0]=0,e.length=1;return}var g=e.words[9];for(o.words[o.length++]=g&n,l=10;l<e.length;l++){var y=e.words[l]|0;e.words[l-10]=(y&n)<<4|g>>>22,g=y}g>>>=22,e.words[l-10]=g,g===0&&e.length>10?e.length-=10:e.length-=9},P.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var o=0,n=0;n<e.length;n++){var u=e.words[n]|0;o+=u*977,e.words[n]=o&67108863,o=u*64+(o/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function H(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}d(H,L);function W(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}d(W,L);function q(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}d(q,L),q.prototype.imulK=function(e){for(var o=0,n=0;n<e.length;n++){var u=(e.words[n]|0)*19+o,l=u&67108863;u>>>=26,e.words[n]=l,o=u}return o!==0&&(e.words[e.length++]=o),e},s._prime=function(e){if(I[e])return I[e];var o;if(e==="k256")o=new P;else if(e==="p224")o=new H;else if(e==="p192")o=new W;else if(e==="p25519")o=new q;else throw new Error("Unknown prime "+e);return I[e]=o,o};function $(e){if(typeof e=="string"){var o=s._prime(e);this.m=o.p,this.prime=o}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}$.prototype._verify1=function(e){a(e.negative===0,"red works only with positives"),a(e.red,"red works only with red numbers")},$.prototype._verify2=function(e,o){a((e.negative|o.negative)===0,"red works only with positives"),a(e.red&&e.red===o.red,"red works only with red numbers")},$.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},$.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},$.prototype.add=function(e,o){this._verify2(e,o);var n=e.add(o);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},$.prototype.iadd=function(e,o){this._verify2(e,o);var n=e.iadd(o);return n.cmp(this.m)>=0&&n.isub(this.m),n},$.prototype.sub=function(e,o){this._verify2(e,o);var n=e.sub(o);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},$.prototype.isub=function(e,o){this._verify2(e,o);var n=e.isub(o);return n.cmpn(0)<0&&n.iadd(this.m),n},$.prototype.shl=function(e,o){return this._verify1(e),this.imod(e.ushln(o))},$.prototype.imul=function(e,o){return this._verify2(e,o),this.imod(e.imul(o))},$.prototype.mul=function(e,o){return this._verify2(e,o),this.imod(e.mul(o))},$.prototype.isqr=function(e){return this.imul(e,e.clone())},$.prototype.sqr=function(e){return this.mul(e,e)},$.prototype.sqrt=function(e){if(e.isZero())return e.clone();var o=this.m.andln(3);if(a(o%2===1),o===3){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);a(!u.isZero());var g=new s(1).toRed(this),y=g.redNeg(),c=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new s(2*i*i).toRed(this);this.pow(i,c).cmp(y)!==0;)i.redIAdd(y);for(var f=this.pow(i,u),E=this.pow(e,u.addn(1).iushrn(1)),j=this.pow(e,u),D=l;j.cmp(g)!==0;){for(var V=j,Q=0;V.cmp(g)!==0;Q++)V=V.redSqr();a(Q<D);var Z=this.pow(f,new s(1).iushln(D-Q-1));E=E.redMul(Z),f=Z.redSqr(),j=j.redMul(f),D=Q}return E},$.prototype.invm=function(e){var o=e._invmp(this.m);return o.negative!==0?(o.negative=0,this.imod(o).redNeg()):this.imod(o)},$.prototype.pow=function(e,o){if(o.isZero())return new s(1).toRed(this);if(o.cmpn(1)===0)return e.clone();var n=4,u=new Array(1<<n);u[0]=new s(1).toRed(this),u[1]=e;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],e);var g=u[0],y=0,c=0,i=o.bitLength()%26;for(i===0&&(i=26),l=o.length-1;l>=0;l--){for(var f=o.words[l],E=i-1;E>=0;E--){var j=f>>E&1;if(g!==u[0]&&(g=this.sqr(g)),j===0&&y===0){c=0;continue}y<<=1,y|=j,c++,!(c!==n&&(l!==0||E!==0))&&(g=this.mul(g,u[y]),c=0,y=0)}i=26}return g},$.prototype.convertTo=function(e){var o=e.umod(this.m);return o===e?o.clone():o},$.prototype.convertFrom=function(e){var o=e.clone();return o.red=null,o},s.mont=function(e){return new N(e)};function N(e){$.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}d(N,$),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var o=this.imod(e.mul(this.rinv));return o.red=null,o},N.prototype.imul=function(e,o){if(e.isZero()||o.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.mul=function(e,o){if(e.isZero()||o.isZero())return new s(0)._forceRed(this);var n=e.mul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.invm=function(e){var o=this.imod(e._invmp(this.m).mul(this.r2));return o._forceRed(this)}})(t,Lt)}(Jl);var wi=Jl.exports,Ql={};(function(t){var r=t;function h(s,m){if(Array.isArray(s))return s.slice();if(!s)return[];var p=[];if(typeof s!="string"){for(var w=0;w<s.length;w++)p[w]=s[w]|0;return p}if(m==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var w=0;w<s.length;w+=2)p.push(parseInt(s[w]+s[w+1],16))}else for(var w=0;w<s.length;w++){var S=s.charCodeAt(w),A=S>>8,v=S&255;A?p.push(A,v):p.push(v)}return p}r.toArray=h;function a(s){return s.length===1?"0"+s:s}r.zero2=a;function d(s){for(var m="",p=0;p<s.length;p++)m+=a(s[p].toString(16));return m}r.toHex=d,r.encode=function(s,m){return m==="hex"?d(s):s}})(Ql),function(t){var r=t,h=wi,a=vr,d=Ql;r.assert=a,r.toArray=d.toArray,r.zero2=d.zero2,r.toHex=d.toHex,r.encode=d.encode;function s(A,v,_){var x=new Array(Math.max(A.bitLength(),_)+1);x.fill(0);for(var b=1<<v+1,M=A.clone(),O=0;O<x.length;O++){var k,R=M.andln(b-1);M.isOdd()?(R>(b>>1)-1?k=(b>>1)-R:k=R,M.isubn(k)):k=0,x[O]=k,M.iushrn(1)}return x}r.getNAF=s;function m(A,v){var _=[[],[]];A=A.clone(),v=v.clone();for(var x=0,b=0,M;A.cmpn(-x)>0||v.cmpn(-b)>0;){var O=A.andln(3)+x&3,k=v.andln(3)+b&3;O===3&&(O=-1),k===3&&(k=-1);var R;O&1?(M=A.andln(7)+x&7,(M===3||M===5)&&k===2?R=-O:R=O):R=0,_[0].push(R);var I;k&1?(M=v.andln(7)+b&7,(M===3||M===5)&&O===2?I=-k:I=k):I=0,_[1].push(I),2*x===R+1&&(x=1-x),2*b===I+1&&(b=1-b),A.iushrn(1),v.iushrn(1)}return _}r.getJSF=m;function p(A,v,_){var x="_"+v;A.prototype[v]=function(){return this[x]!==void 0?this[x]:this[x]=_.call(this)}}r.cachedProperty=p;function w(A){return typeof A=="string"?r.toArray(A,"hex"):A}r.parseBytes=w;function S(A){return new h(A,"hex","le")}r.intFromLE=S}(fr);var Xl={},dn=wi,cs=fr,Ja=cs.getNAF,v5=cs.getJSF,Qa=cs.assert;function Pi(t,r){this.type=t,this.p=new dn(r.p,16),this.red=r.prime?dn.red(r.prime):dn.mont(this.p),this.zero=new dn(0).toRed(this.red),this.one=new dn(1).toRed(this.red),this.two=new dn(2).toRed(this.red),this.n=r.n&&new dn(r.n,16),this.g=r.g&&this.pointFromJSON(r.g,r.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 h=this.n&&this.p.div(this.n);!h||h.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Xa=Pi;Pi.prototype.point=function(){throw new Error("Not implemented")},Pi.prototype.validate=function(){throw new Error("Not implemented")},Pi.prototype._fixedNafMul=function(t,r){Qa(t.precomputed);var h=t._getDoubles(),a=Ja(r,1,this._bitLength),d=(1<<h.step+1)-(h.step%2===0?2:1);d/=3;var s=[],m,p;for(m=0;m<a.length;m+=h.step){p=0;for(var w=m+h.step-1;w>=m;w--)p=(p<<1)+a[w];s.push(p)}for(var S=this.jpoint(null,null,null),A=this.jpoint(null,null,null),v=d;v>0;v--){for(m=0;m<s.length;m++)p=s[m],p===v?A=A.mixedAdd(h.points[m]):p===-v&&(A=A.mixedAdd(h.points[m].neg()));S=S.add(A)}return S.toP()},Pi.prototype._wnafMul=function(t,r){var h=4,a=t._getNAFPoints(h);h=a.wnd;for(var d=a.points,s=Ja(r,h,this._bitLength),m=this.jpoint(null,null,null),p=s.length-1;p>=0;p--){for(var w=0;p>=0&&s[p]===0;p--)w++;if(p>=0&&w++,m=m.dblp(w),p<0)break;var S=s[p];Qa(S!==0),t.type==="affine"?S>0?m=m.mixedAdd(d[S-1>>1]):m=m.mixedAdd(d[-S-1>>1].neg()):S>0?m=m.add(d[S-1>>1]):m=m.add(d[-S-1>>1].neg())}return t.type==="affine"?m.toP():m},Pi.prototype._wnafMulAdd=function(t,r,h,a,d){var s=this._wnafT1,m=this._wnafT2,p=this._wnafT3,w=0,S,A,v;for(S=0;S<a;S++){v=r[S];var _=v._getNAFPoints(t);s[S]=_.wnd,m[S]=_.points}for(S=a-1;S>=1;S-=2){var x=S-1,b=S;if(s[x]!==1||s[b]!==1){p[x]=Ja(h[x],s[x],this._bitLength),p[b]=Ja(h[b],s[b],this._bitLength),w=Math.max(p[x].length,w),w=Math.max(p[b].length,w);continue}var M=[r[x],null,null,r[b]];r[x].y.cmp(r[b].y)===0?(M[1]=r[x].add(r[b]),M[2]=r[x].toJ().mixedAdd(r[b].neg())):r[x].y.cmp(r[b].y.redNeg())===0?(M[1]=r[x].toJ().mixedAdd(r[b]),M[2]=r[x].add(r[b].neg())):(M[1]=r[x].toJ().mixedAdd(r[b]),M[2]=r[x].toJ().mixedAdd(r[b].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],k=v5(h[x],h[b]);for(w=Math.max(k[0].length,w),p[x]=new Array(w),p[b]=new Array(w),A=0;A<w;A++){var R=k[0][A]|0,I=k[1][A]|0;p[x][A]=O[(R+1)*3+(I+1)],p[b][A]=0,m[x]=M}}var L=this.jpoint(null,null,null),P=this._wnafT4;for(S=w;S>=0;S--){for(var H=0;S>=0;){var W=!0;for(A=0;A<a;A++)P[A]=p[A][S]|0,P[A]!==0&&(W=!1);if(!W)break;H++,S--}if(S>=0&&H++,L=L.dblp(H),S<0)break;for(A=0;A<a;A++){var q=P[A];q!==0&&(q>0?v=m[A][q-1>>1]:q<0&&(v=m[A][-q-1>>1].neg()),v.type==="affine"?L=L.mixedAdd(v):L=L.add(v))}}for(S=0;S<a;S++)m[S]=null;return d?L:L.toP()};function Mr(t,r){this.curve=t,this.type=r,this.precomputed=null}Pi.BasePoint=Mr,Mr.prototype.eq=function(){throw new Error("Not implemented")},Mr.prototype.validate=function(){return this.curve.validate(this)},Pi.prototype.decodePoint=function(t,r){t=cs.toArray(t,r);var h=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*h){t[0]===6?Qa(t[t.length-1]%2===0):t[0]===7&&Qa(t[t.length-1]%2===1);var a=this.point(t.slice(1,1+h),t.slice(1+h,1+2*h));return a}else if((t[0]===2||t[0]===3)&&t.length-1===h)return this.pointFromX(t.slice(1,1+h),t[0]===3);throw new Error("Unknown point format")},Mr.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Mr.prototype._encode=function(t){var r=this.curve.p.byteLength(),h=this.getX().toArray("be",r);return t?[this.getY().isEven()?2:3].concat(h):[4].concat(h,this.getY().toArray("be",r))},Mr.prototype.encode=function(t,r){return cs.encode(this._encode(r),t)},Mr.prototype.precompute=function(t){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,t),r.beta=this._getBeta(),this.precomputed=r,this},Mr.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((t.bitLength()+1)/r.step):!1},Mr.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var h=[this],a=this,d=0;d<r;d+=t){for(var s=0;s<t;s++)a=a.dbl();h.push(a)}return{step:t,points:h}},Mr.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],h=(1<<t)-1,a=h===1?null:this.dbl(),d=1;d<h;d++)r[d]=r[d-1].add(a);return{wnd:t,points:r}},Mr.prototype._getBeta=function(){return null},Mr.prototype.dblp=function(t){for(var r=this,h=0;h<t;h++)r=r.dbl();return r};var b5=fr,Ie=wi,Gl=Ht,Yn=Xa,w5=b5.assert;function _r(t){Yn.call(this,"short",t),this.a=new Ie(t.a,16).toRed(this.red),this.b=new Ie(t.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(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Gl(_r,Yn);var M5=_r;_r.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,h;if(t.beta)r=new Ie(t.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);r=a[0].cmp(a[1])<0?a[0]:a[1],r=r.toRed(this.red)}if(t.lambda)h=new Ie(t.lambda,16);else{var d=this._getEndoRoots(this.n);this.g.mul(d[0]).x.cmp(this.g.x.redMul(r))===0?h=d[0]:(h=d[1],w5(this.g.mul(h).x.cmp(this.g.x.redMul(r))===0))}var s;return t.basis?s=t.basis.map(function(m){return{a:new Ie(m.a,16),b:new Ie(m.b,16)}}):s=this._getEndoBasis(h),{beta:r,lambda:h,basis:s}}},_r.prototype._getEndoRoots=function(t){var r=t===this.p?this.red:Ie.mont(t),h=new Ie(2).toRed(r).redInvm(),a=h.redNeg(),d=new Ie(3).toRed(r).redNeg().redSqrt().redMul(h),s=a.redAdd(d).fromRed(),m=a.redSub(d).fromRed();return[s,m]},_r.prototype._getEndoBasis=function(t){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,a=this.n.clone(),d=new Ie(1),s=new Ie(0),m=new Ie(0),p=new Ie(1),w,S,A,v,_,x,b,M=0,O,k;h.cmpn(0)!==0;){var R=a.div(h);O=a.sub(R.mul(h)),k=m.sub(R.mul(d));var I=p.sub(R.mul(s));if(!A&&O.cmp(r)<0)w=b.neg(),S=d,A=O.neg(),v=k;else if(A&&++M===2)break;b=O,a=h,h=O,m=d,d=k,p=s,s=I}_=O.neg(),x=k;var L=A.sqr().add(v.sqr()),P=_.sqr().add(x.sqr());return P.cmp(L)>=0&&(_=w,x=S),A.negative&&(A=A.neg(),v=v.neg()),_.negative&&(_=_.neg(),x=x.neg()),[{a:A,b:v},{a:_,b:x}]},_r.prototype._endoSplit=function(t){var r=this.endo.basis,h=r[0],a=r[1],d=a.b.mul(t).divRound(this.n),s=h.b.neg().mul(t).divRound(this.n),m=d.mul(h.a),p=s.mul(a.a),w=d.mul(h.b),S=s.mul(a.b),A=t.sub(m).sub(p),v=w.add(S).neg();return{k1:A,k2:v}},_r.prototype.pointFromX=function(t,r){t=new Ie(t,16),t.red||(t=t.toRed(this.red));var h=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),a=h.redSqrt();if(a.redSqr().redSub(h).cmp(this.zero)!==0)throw new Error("invalid point");var d=a.fromRed().isOdd();return(r&&!d||!r&&d)&&(a=a.redNeg()),this.point(t,a)},_r.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,h=t.y,a=this.a.redMul(r),d=r.redSqr().redMul(r).redIAdd(a).redIAdd(this.b);return h.redSqr().redISub(d).cmpn(0)===0},_r.prototype._endoWnafMulAdd=function(t,r,h){for(var a=this._endoWnafT1,d=this._endoWnafT2,s=0;s<t.length;s++){var m=this._endoSplit(r[s]),p=t[s],w=p._getBeta();m.k1.negative&&(m.k1.ineg(),p=p.neg(!0)),m.k2.negative&&(m.k2.ineg(),w=w.neg(!0)),a[s*2]=p,a[s*2+1]=w,d[s*2]=m.k1,d[s*2+1]=m.k2}for(var S=this._wnafMulAdd(1,a,d,s*2,h),A=0;A<s*2;A++)a[A]=null,d[A]=null;return S};function Pe(t,r,h,a){Yn.BasePoint.call(this,t,"affine"),r===null&&h===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new Ie(r,16),this.y=new Ie(h,16),a&&(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)}Gl(Pe,Yn.BasePoint),_r.prototype.point=function(t,r,h){return new Pe(this,t,r,h)},_r.prototype.pointFromJSON=function(t,r){return Pe.fromJSON(this,t,r)},Pe.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var h=this.curve,a=function(d){return h.point(d.x.redMul(h.endo.beta),d.y)};t.beta=r,r.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(a)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(a)}}}return r}},Pe.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]},Pe.fromJSON=function(t,r,h){typeof r=="string"&&(r=JSON.parse(r));var a=t.point(r[0],r[1],h);if(!r[2])return a;function d(m){return t.point(m[0],m[1],h)}var s=r[2];return a.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[a].concat(s.doubles.points.map(d))},naf:s.naf&&{wnd:s.naf.wnd,points:[a].concat(s.naf.points.map(d))}},a},Pe.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)+">"},Pe.prototype.isInfinity=function(){return this.inf},Pe.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var h=r.redSqr().redISub(this.x).redISub(t.x),a=r.redMul(this.x.redSub(h)).redISub(this.y);return this.curve.point(h,a)},Pe.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,h=this.x.redSqr(),a=t.redInvm(),d=h.redAdd(h).redIAdd(h).redIAdd(r).redMul(a),s=d.redSqr().redISub(this.x.redAdd(this.x)),m=d.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,m)},Pe.prototype.getX=function(){return this.x.fromRed()},Pe.prototype.getY=function(){return this.y.fromRed()},Pe.prototype.mul=function(t){return t=new Ie(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},Pe.prototype.mulAdd=function(t,r,h){var a=[this,r],d=[t,h];return this.curve.endo?this.curve._endoWnafMulAdd(a,d):this.curve._wnafMulAdd(1,a,d,2)},Pe.prototype.jmulAdd=function(t,r,h){var a=[this,r],d=[t,h];return this.curve.endo?this.curve._endoWnafMulAdd(a,d,!0):this.curve._wnafMulAdd(1,a,d,2,!0)},Pe.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)},Pe.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var h=this.precomputed,a=function(d){return d.neg()};r.precomputed={naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(a)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(a)}}}return r},Pe.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function He(t,r,h,a){Yn.BasePoint.call(this,t,"jacobian"),r===null&&h===null&&a===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ie(0)):(this.x=new Ie(r,16),this.y=new Ie(h,16),this.z=new Ie(a,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}Gl(He,Yn.BasePoint),_r.prototype.jpoint=function(t,r,h){return new He(this,t,r,h)},He.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),h=this.x.redMul(r),a=this.y.redMul(r).redMul(t);return this.curve.point(h,a)},He.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},He.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),h=this.z.redSqr(),a=this.x.redMul(r),d=t.x.redMul(h),s=this.y.redMul(r.redMul(t.z)),m=t.y.redMul(h.redMul(this.z)),p=a.redSub(d),w=s.redSub(m);if(p.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var S=p.redSqr(),A=S.redMul(p),v=a.redMul(S),_=w.redSqr().redIAdd(A).redISub(v).redISub(v),x=w.redMul(v.redISub(_)).redISub(s.redMul(A)),b=this.z.redMul(t.z).redMul(p);return this.curve.jpoint(_,x,b)},He.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),h=this.x,a=t.x.redMul(r),d=this.y,s=t.y.redMul(r).redMul(this.z),m=h.redSub(a),p=d.redSub(s);if(m.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=m.redSqr(),S=w.redMul(m),A=h.redMul(w),v=p.redSqr().redIAdd(S).redISub(A).redISub(A),_=p.redMul(A.redISub(v)).redISub(d.redMul(S)),x=this.z.redMul(m);return this.curve.jpoint(v,_,x)},He.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var h=this;for(r=0;r<t;r++)h=h.dbl();return h}var a=this.curve.a,d=this.curve.tinv,s=this.x,m=this.y,p=this.z,w=p.redSqr().redSqr(),S=m.redAdd(m);for(r=0;r<t;r++){var A=s.redSqr(),v=S.redSqr(),_=v.redSqr(),x=A.redAdd(A).redIAdd(A).redIAdd(a.redMul(w)),b=s.redMul(v),M=x.redSqr().redISub(b.redAdd(b)),O=b.redISub(M),k=x.redMul(O);k=k.redIAdd(k).redISub(_);var R=S.redMul(p);r+1<t&&(w=w.redMul(_)),s=M,p=R,S=k}return this.curve.jpoint(s,S.redMul(d),p)},He.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},He.prototype._zeroDbl=function(){var t,r,h;if(this.zOne){var a=this.x.redSqr(),d=this.y.redSqr(),s=d.redSqr(),m=this.x.redAdd(d).redSqr().redISub(a).redISub(s);m=m.redIAdd(m);var p=a.redAdd(a).redIAdd(a),w=p.redSqr().redISub(m).redISub(m),S=s.redIAdd(s);S=S.redIAdd(S),S=S.redIAdd(S),t=w,r=p.redMul(m.redISub(w)).redISub(S),h=this.y.redAdd(this.y)}else{var A=this.x.redSqr(),v=this.y.redSqr(),_=v.redSqr(),x=this.x.redAdd(v).redSqr().redISub(A).redISub(_);x=x.redIAdd(x);var b=A.redAdd(A).redIAdd(A),M=b.redSqr(),O=_.redIAdd(_);O=O.redIAdd(O),O=O.redIAdd(O),t=M.redISub(x).redISub(x),r=b.redMul(x.redISub(t)).redISub(O),h=this.y.redMul(this.z),h=h.redIAdd(h)}return this.curve.jpoint(t,r,h)},He.prototype._threeDbl=function(){var t,r,h;if(this.zOne){var a=this.x.redSqr(),d=this.y.redSqr(),s=d.redSqr(),m=this.x.redAdd(d).redSqr().redISub(a).redISub(s);m=m.redIAdd(m);var p=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),w=p.redSqr().redISub(m).redISub(m);t=w;var S=s.redIAdd(s);S=S.redIAdd(S),S=S.redIAdd(S),r=p.redMul(m.redISub(w)).redISub(S),h=this.y.redAdd(this.y)}else{var A=this.z.redSqr(),v=this.y.redSqr(),_=this.x.redMul(v),x=this.x.redSub(A).redMul(this.x.redAdd(A));x=x.redAdd(x).redIAdd(x);var b=_.redIAdd(_);b=b.redIAdd(b);var M=b.redAdd(b);t=x.redSqr().redISub(M),h=this.y.redAdd(this.z).redSqr().redISub(v).redISub(A);var O=v.redSqr();O=O.redIAdd(O),O=O.redIAdd(O),O=O.redIAdd(O),r=x.redMul(b.redISub(t)).redISub(O)}return this.curve.jpoint(t,r,h)},He.prototype._dbl=function(){var t=this.curve.a,r=this.x,h=this.y,a=this.z,d=a.redSqr().redSqr(),s=r.redSqr(),m=h.redSqr(),p=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(d)),w=r.redAdd(r);w=w.redIAdd(w);var S=w.redMul(m),A=p.redSqr().redISub(S.redAdd(S)),v=S.redISub(A),_=m.redSqr();_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var x=p.redMul(v).redISub(_),b=h.redAdd(h).redMul(a);return this.curve.jpoint(A,x,b)},He.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),r=this.y.redSqr(),h=this.z.redSqr(),a=r.redSqr(),d=t.redAdd(t).redIAdd(t),s=d.redSqr(),m=this.x.redAdd(r).redSqr().redISub(t).redISub(a);m=m.redIAdd(m),m=m.redAdd(m).redIAdd(m),m=m.redISub(s);var p=m.redSqr(),w=a.redIAdd(a);w=w.redIAdd(w),w=w.redIAdd(w),w=w.redIAdd(w);var S=d.redIAdd(m).redSqr().redISub(s).redISub(p).redISub(w),A=r.redMul(S);A=A.redIAdd(A),A=A.redIAdd(A);var v=this.x.redMul(p).redISub(A);v=v.redIAdd(v),v=v.redIAdd(v);var _=this.y.redMul(S.redMul(w.redISub(S)).redISub(m.redMul(p)));_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var x=this.z.redAdd(m).redSqr().redISub(h).redISub(p);return this.curve.jpoint(v,_,x)},He.prototype.mul=function(t,r){return t=new Ie(t,r),this.curve._wnafMul(this,t)},He.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var r=this.z.redSqr(),h=t.z.redSqr();if(this.x.redMul(h).redISub(t.x.redMul(r)).cmpn(0)!==0)return!1;var a=r.redMul(this.z),d=h.redMul(t.z);return this.y.redMul(d).redISub(t.y.redMul(a)).cmpn(0)===0},He.prototype.eqXToP=function(t){var r=this.z.redSqr(),h=t.toRed(this.curve.red).redMul(r);if(this.x.cmp(h)===0)return!0;for(var a=t.clone(),d=this.curve.redN.redMul(r);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(h.redIAdd(d),this.x.cmp(h)===0)return!0}},He.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)+">"},He.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var to=wi,K1=Ht,Ga=Xa,_5=fr;function eo(t){Ga.call(this,"mont",t),this.a=new to(t.a,16).toRed(this.red),this.b=new to(t.b,16).toRed(this.red),this.i4=new to(4).toRed(this.red).redInvm(),this.two=new to(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}K1(eo,Ga);var S5=eo;eo.prototype.validate=function(t){var r=t.normalize().x,h=r.redSqr(),a=h.redMul(r).redAdd(h.redMul(this.a)).redAdd(r),d=a.redSqrt();return d.redSqr().cmp(a)===0};function Ne(t,r,h){Ga.BasePoint.call(this,t,"projective"),r===null&&h===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new to(r,16),this.z=new to(h,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}K1(Ne,Ga.BasePoint),eo.prototype.decodePoint=function(t,r){return this.point(_5.toArray(t,r),1)},eo.prototype.point=function(t,r){return new Ne(this,t,r)},eo.prototype.pointFromJSON=function(t){return Ne.fromJSON(this,t)},Ne.prototype.precompute=function(){},Ne.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Ne.fromJSON=function(t,r){return new Ne(t,r[0],r[1]||t.one)},Ne.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)+">"},Ne.prototype.isInfinity=function(){return this.z.cmpn(0)===0},Ne.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),h=this.x.redSub(this.z),a=h.redSqr(),d=r.redSub(a),s=r.redMul(a),m=d.redMul(a.redAdd(this.curve.a24.redMul(d)));return this.curve.point(s,m)},Ne.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Ne.prototype.diffAdd=function(t,r){var h=this.x.redAdd(this.z),a=this.x.redSub(this.z),d=t.x.redAdd(t.z),s=t.x.redSub(t.z),m=s.redMul(h),p=d.redMul(a),w=r.z.redMul(m.redAdd(p).redSqr()),S=r.x.redMul(m.redISub(p).redSqr());return this.curve.point(w,S)},Ne.prototype.mul=function(t){for(var r=t.clone(),h=this,a=this.curve.point(null,null),d=this,s=[];r.cmpn(0)!==0;r.iushrn(1))s.push(r.andln(1));for(var m=s.length-1;m>=0;m--)s[m]===0?(h=h.diffAdd(a,d),a=a.dbl()):(a=h.diffAdd(a,d),h=h.dbl());return a},Ne.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Ne.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Ne.prototype.eq=function(t){return this.getX().cmp(t.getX())===0},Ne.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Ne.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var A5=fr,Mi=wi,J1=Ht,Ya=Xa,x5=A5.assert;function Gr(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Ya.call(this,"edwards",t),this.a=new Mi(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Mi(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Mi(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),x5(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}J1(Gr,Ya);var k5=Gr;Gr.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},Gr.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},Gr.prototype.jpoint=function(t,r,h,a){return this.point(t,r,h,a)},Gr.prototype.pointFromX=function(t,r){t=new Mi(t,16),t.red||(t=t.toRed(this.red));var h=t.redSqr(),a=this.c2.redSub(this.a.redMul(h)),d=this.one.redSub(this.c2.redMul(this.d).redMul(h)),s=a.redMul(d.redInvm()),m=s.redSqrt();if(m.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");var p=m.fromRed().isOdd();return(r&&!p||!r&&p)&&(m=m.redNeg()),this.point(t,m)},Gr.prototype.pointFromY=function(t,r){t=new Mi(t,16),t.red||(t=t.toRed(this.red));var h=t.redSqr(),a=h.redSub(this.c2),d=h.redMul(this.d).redMul(this.c2).redSub(this.a),s=a.redMul(d.redInvm());if(s.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var m=s.redSqrt();if(m.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");return m.fromRed().isOdd()!==r&&(m=m.redNeg()),this.point(m,t)},Gr.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),h=t.y.redSqr(),a=r.redMul(this.a).redAdd(h),d=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(h)));return a.cmp(d)===0};function Ee(t,r,h,a,d){Ya.BasePoint.call(this,t,"projective"),r===null&&h===null&&a===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 Mi(r,16),this.y=new Mi(h,16),this.z=a?new Mi(a,16):this.curve.one,this.t=d&&new Mi(d,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()))))}J1(Ee,Ya.BasePoint),Gr.prototype.pointFromJSON=function(t){return Ee.fromJSON(this,t)},Gr.prototype.point=function(t,r,h,a){return new Ee(this,t,r,h,a)},Ee.fromJSON=function(t,r){return new Ee(t,r[0],r[1],r[2])},Ee.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)+">"},Ee.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},Ee.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),h=this.z.redSqr();h=h.redIAdd(h);var a=this.curve._mulA(t),d=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),s=a.redAdd(r),m=s.redSub(h),p=a.redSub(r),w=d.redMul(m),S=s.redMul(p),A=d.redMul(p),v=m.redMul(s);return this.curve.point(w,S,v,A)},Ee.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),h=this.y.redSqr(),a,d,s,m,p,w;if(this.curve.twisted){m=this.curve._mulA(r);var S=m.redAdd(h);this.zOne?(a=t.redSub(r).redSub(h).redMul(S.redSub(this.curve.two)),d=S.redMul(m.redSub(h)),s=S.redSqr().redSub(S).redSub(S)):(p=this.z.redSqr(),w=S.redSub(p).redISub(p),a=t.redSub(r).redISub(h).redMul(w),d=S.redMul(m.redSub(h)),s=S.redMul(w))}else m=r.redAdd(h),p=this.curve._mulC(this.z).redSqr(),w=m.redSub(p).redSub(p),a=this.curve._mulC(t.redISub(m)).redMul(w),d=this.curve._mulC(m).redMul(r.redISub(h)),s=m.redMul(w);return this.curve.point(a,d,s)},Ee.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},Ee.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),h=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),a=this.t.redMul(this.curve.dd).redMul(t.t),d=this.z.redMul(t.z.redAdd(t.z)),s=h.redSub(r),m=d.redSub(a),p=d.redAdd(a),w=h.redAdd(r),S=s.redMul(m),A=p.redMul(w),v=s.redMul(w),_=m.redMul(p);return this.curve.point(S,A,_,v)},Ee.prototype._projAdd=function(t){var r=this.z.redMul(t.z),h=r.redSqr(),a=this.x.redMul(t.x),d=this.y.redMul(t.y),s=this.curve.d.redMul(a).redMul(d),m=h.redSub(s),p=h.redAdd(s),w=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(d),S=r.redMul(m).redMul(w),A,v;return this.curve.twisted?(A=r.redMul(p).redMul(d.redSub(this.curve._mulA(a))),v=m.redMul(p)):(A=r.redMul(p).redMul(d.redSub(a)),v=this.curve._mulC(m).redMul(p)),this.curve.point(S,A,v)},Ee.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},Ee.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},Ee.prototype.mulAdd=function(t,r,h){return this.curve._wnafMulAdd(1,[this,r],[t,h],2,!1)},Ee.prototype.jmulAdd=function(t,r,h){return this.curve._wnafMulAdd(1,[this,r],[t,h],2,!0)},Ee.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},Ee.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},Ee.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Ee.prototype.getY=function(){return this.normalize(),this.y.fromRed()},Ee.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0},Ee.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var h=t.clone(),a=this.curve.redN.redMul(this.z);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(a),this.x.cmp(r)===0)return!0}},Ee.prototype.toP=Ee.prototype.normalize,Ee.prototype.mixedAdd=Ee.prototype.add,function(t){var r=t;r.base=Xa,r.short=M5,r.mont=S5,r.edwards=k5}(Xl);var th={},eh={},ee={},E5=vr,R5=Ht;ee.inherits=R5;function O5(t,r){return(t.charCodeAt(r)&64512)!==55296||r<0||r+1>=t.length?!1:(t.charCodeAt(r+1)&64512)===56320}function j5(t,r){if(Array.isArray(t))return t.slice();if(!t)return[];var h=[];if(typeof t=="string")if(r){if(r==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),d=0;d<t.length;d+=2)h.push(parseInt(t[d]+t[d+1],16))}else for(var a=0,d=0;d<t.length;d++){var s=t.charCodeAt(d);s<128?h[a++]=s:s<2048?(h[a++]=s>>6|192,h[a++]=s&63|128):O5(t,d)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++d)&1023),h[a++]=s>>18|240,h[a++]=s>>12&63|128,h[a++]=s>>6&63|128,h[a++]=s&63|128):(h[a++]=s>>12|224,h[a++]=s>>6&63|128,h[a++]=s&63|128)}else for(d=0;d<t.length;d++)h[d]=t[d]|0;return h}ee.toArray=j5;function C5(t){for(var r="",h=0;h<t.length;h++)r+=X1(t[h].toString(16));return r}ee.toHex=C5;function Q1(t){var r=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return r>>>0}ee.htonl=Q1;function I5(t,r){for(var h="",a=0;a<t.length;a++){var d=t[a];r==="little"&&(d=Q1(d)),h+=G1(d.toString(16))}return h}ee.toHex32=I5;function X1(t){return t.length===1?"0"+t:t}ee.zero2=X1;function G1(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}ee.zero8=G1;function B5(t,r,h,a){var d=h-r;E5(d%4===0);for(var s=new Array(d/4),m=0,p=r;m<s.length;m++,p+=4){var w;a==="big"?w=t[p]<<24|t[p+1]<<16|t[p+2]<<8|t[p+3]:w=t[p+3]<<24|t[p+2]<<16|t[p+1]<<8|t[p],s[m]=w>>>0}return s}ee.join32=B5;function L5(t,r){for(var h=new Array(t.length*4),a=0,d=0;a<t.length;a++,d+=4){var s=t[a];r==="big"?(h[d]=s>>>24,h[d+1]=s>>>16&255,h[d+2]=s>>>8&255,h[d+3]=s&255):(h[d+3]=s>>>24,h[d+2]=s>>>16&255,h[d+1]=s>>>8&255,h[d]=s&255)}return h}ee.split32=L5;function U5(t,r){return t>>>r|t<<32-r}ee.rotr32=U5;function q5(t,r){return t<<r|t>>>32-r}ee.rotl32=q5;function $5(t,r){return t+r>>>0}ee.sum32=$5;function T5(t,r,h){return t+r+h>>>0}ee.sum32_3=T5;function D5(t,r,h,a){return t+r+h+a>>>0}ee.sum32_4=D5;function P5(t,r,h,a,d){return t+r+h+a+d>>>0}ee.sum32_5=P5;function N5(t,r,h,a){var d=t[r],s=t[r+1],m=a+s>>>0,p=(m<a?1:0)+h+d;t[r]=p>>>0,t[r+1]=m}ee.sum64=N5;function z5(t,r,h,a){var d=r+a>>>0,s=(d<r?1:0)+t+h;return s>>>0}ee.sum64_hi=z5;function F5(t,r,h,a){var d=r+a;return d>>>0}ee.sum64_lo=F5;function V5(t,r,h,a,d,s,m,p){var w=0,S=r;S=S+a>>>0,w+=S<r?1:0,S=S+s>>>0,w+=S<s?1:0,S=S+p>>>0,w+=S<p?1:0;var A=t+h+d+m+w;return A>>>0}ee.sum64_4_hi=V5;function H5(t,r,h,a,d,s,m,p){var w=r+a+s+p;return w>>>0}ee.sum64_4_lo=H5;function W5(t,r,h,a,d,s,m,p,w,S){var A=0,v=r;v=v+a>>>0,A+=v<r?1:0,v=v+s>>>0,A+=v<s?1:0,v=v+p>>>0,A+=v<p?1:0,v=v+S>>>0,A+=v<S?1:0;var _=t+h+d+m+w+A;return _>>>0}ee.sum64_5_hi=W5;function Z5(t,r,h,a,d,s,m,p,w,S){var A=r+a+s+p+S;return A>>>0}ee.sum64_5_lo=Z5;function K5(t,r,h){var a=r<<32-h|t>>>h;return a>>>0}ee.rotr64_hi=K5;function J5(t,r,h){var a=t<<32-h|r>>>h;return a>>>0}ee.rotr64_lo=J5;function Q5(t,r,h){return t>>>h}ee.shr64_hi=Q5;function X5(t,r,h){var a=t<<32-h|r>>>h;return a>>>0}ee.shr64_lo=X5;var ro={},Y1=ee,G5=vr;function rh(){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}ro.BlockHash=rh,rh.prototype.update=function(t,r){if(t=Y1.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var h=t.length%this._delta8;this.pending=t.slice(t.length-h,t.length),this.pending.length===0&&(this.pending=null),t=Y1.join32(t,0,t.length-h,this.endian);for(var a=0;a<t.length;a+=this._delta32)this._update(t,a,a+this._delta32)}return this},rh.prototype.digest=function(t){return this.update(this._pad()),G5(this.pending===null),this._digest(t)},rh.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,h=r-(t+this.padLength)%r,a=new Array(h+this.padLength);a[0]=128;for(var d=1;d<h;d++)a[d]=0;if(t<<=3,this.endian==="big"){for(var s=8;s<this.padLength;s++)a[d++]=0;a[d++]=0,a[d++]=0,a[d++]=0,a[d++]=0,a[d++]=t>>>24&255,a[d++]=t>>>16&255,a[d++]=t>>>8&255,a[d++]=t&255}else for(a[d++]=t&255,a[d++]=t>>>8&255,a[d++]=t>>>16&255,a[d++]=t>>>24&255,a[d++]=0,a[d++]=0,a[d++]=0,a[d++]=0,s=8;s<this.padLength;s++)a[d++]=0;return a};var io={},Yr={},Y5=ee,ti=Y5.rotr32;function t9(t,r,h,a){if(t===0)return tm(r,h,a);if(t===1||t===3)return rm(r,h,a);if(t===2)return em(r,h,a)}Yr.ft_1=t9;function tm(t,r,h){return t&r^~t&h}Yr.ch32=tm;function em(t,r,h){return t&r^t&h^r&h}Yr.maj32=em;function rm(t,r,h){return t^r^h}Yr.p32=rm;function e9(t){return ti(t,2)^ti(t,13)^ti(t,22)}Yr.s0_256=e9;function r9(t){return ti(t,6)^ti(t,11)^ti(t,25)}Yr.s1_256=r9;function i9(t){return ti(t,7)^ti(t,18)^t>>>3}Yr.g0_256=i9;function n9(t){return ti(t,17)^ti(t,19)^t>>>10}Yr.g1_256=n9;var no=ee,o9=ro,s9=Yr,Yl=no.rotl32,ds=no.sum32,a9=no.sum32_5,h9=s9.ft_1,im=o9.BlockHash,u9=[1518500249,1859775393,2400959708,3395469782];function ei(){if(!(this instanceof ei))return new ei;im.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}no.inherits(ei,im);var l9=ei;ei.blockSize=512,ei.outSize=160,ei.hmacStrength=80,ei.padLength=64,ei.prototype._update=function(t,r){for(var h=this.W,a=0;a<16;a++)h[a]=t[r+a];for(;a<h.length;a++)h[a]=Yl(h[a-3]^h[a-8]^h[a-14]^h[a-16],1);var d=this.h[0],s=this.h[1],m=this.h[2],p=this.h[3],w=this.h[4];for(a=0;a<h.length;a++){var S=~~(a/20),A=a9(Yl(d,5),h9(S,s,m,p),w,h[a],u9[S]);w=p,p=m,m=Yl(s,30),s=d,d=A}this.h[0]=ds(this.h[0],d),this.h[1]=ds(this.h[1],s),this.h[2]=ds(this.h[2],m),this.h[3]=ds(this.h[3],p),this.h[4]=ds(this.h[4],w)},ei.prototype._digest=function(t){return t==="hex"?no.toHex32(this.h,"big"):no.split32(this.h,"big")};var oo=ee,f9=ro,so=Yr,c9=vr,Ur=oo.sum32,d9=oo.sum32_4,p9=oo.sum32_5,m9=so.ch32,g9=so.maj32,y9=so.s0_256,v9=so.s1_256,b9=so.g0_256,w9=so.g1_256,nm=f9.BlockHash,M9=[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 ri(){if(!(this instanceof ri))return new ri;nm.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=M9,this.W=new Array(64)}oo.inherits(ri,nm);var om=ri;ri.blockSize=512,ri.outSize=256,ri.hmacStrength=192,ri.padLength=64,ri.prototype._update=function(t,r){for(var h=this.W,a=0;a<16;a++)h[a]=t[r+a];for(;a<h.length;a++)h[a]=d9(w9(h[a-2]),h[a-7],b9(h[a-15]),h[a-16]);var d=this.h[0],s=this.h[1],m=this.h[2],p=this.h[3],w=this.h[4],S=this.h[5],A=this.h[6],v=this.h[7];for(c9(this.k.length===h.length),a=0;a<h.length;a++){var _=p9(v,v9(w),m9(w,S,A),this.k[a],h[a]),x=Ur(y9(d),g9(d,s,m));v=A,A=S,S=w,w=Ur(p,_),p=m,m=s,s=d,d=Ur(_,x)}this.h[0]=Ur(this.h[0],d),this.h[1]=Ur(this.h[1],s),this.h[2]=Ur(this.h[2],m),this.h[3]=Ur(this.h[3],p),this.h[4]=Ur(this.h[4],w),this.h[5]=Ur(this.h[5],S),this.h[6]=Ur(this.h[6],A),this.h[7]=Ur(this.h[7],v)},ri.prototype._digest=function(t){return t==="hex"?oo.toHex32(this.h,"big"):oo.split32(this.h,"big")};var t0=ee,sm=om;function _i(){if(!(this instanceof _i))return new _i;sm.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}t0.inherits(_i,sm);var _9=_i;_i.blockSize=512,_i.outSize=224,_i.hmacStrength=192,_i.padLength=64,_i.prototype._digest=function(t){return t==="hex"?t0.toHex32(this.h.slice(0,7),"big"):t0.split32(this.h.slice(0,7),"big")};var sr=ee,S9=ro,A9=vr,ii=sr.rotr64_hi,ni=sr.rotr64_lo,am=sr.shr64_hi,hm=sr.shr64_lo,Ni=sr.sum64,e0=sr.sum64_hi,r0=sr.sum64_lo,x9=sr.sum64_4_hi,k9=sr.sum64_4_lo,E9=sr.sum64_5_hi,R9=sr.sum64_5_lo,um=S9.BlockHash,O9=[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 qr(){if(!(this instanceof qr))return new qr;um.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=O9,this.W=new Array(160)}sr.inherits(qr,um);var lm=qr;qr.blockSize=1024,qr.outSize=512,qr.hmacStrength=192,qr.padLength=128,qr.prototype._prepareBlock=function(t,r){for(var h=this.W,a=0;a<32;a++)h[a]=t[r+a];for(;a<h.length;a+=2){var d=P9(h[a-4],h[a-3]),s=N9(h[a-4],h[a-3]),m=h[a-14],p=h[a-13],w=T9(h[a-30],h[a-29]),S=D9(h[a-30],h[a-29]),A=h[a-32],v=h[a-31];h[a]=x9(d,s,m,p,w,S,A,v),h[a+1]=k9(d,s,m,p,w,S,A,v)}},qr.prototype._update=function(t,r){this._prepareBlock(t,r);var h=this.W,a=this.h[0],d=this.h[1],s=this.h[2],m=this.h[3],p=this.h[4],w=this.h[5],S=this.h[6],A=this.h[7],v=this.h[8],_=this.h[9],x=this.h[10],b=this.h[11],M=this.h[12],O=this.h[13],k=this.h[14],R=this.h[15];A9(this.k.length===h.length);for(var I=0;I<h.length;I+=2){var L=k,P=R,H=q9(v,_),W=$9(v,_),q=j9(v,_,x,b,M),$=C9(v,_,x,b,M,O),N=this.k[I],e=this.k[I+1],o=h[I],n=h[I+1],u=E9(L,P,H,W,q,$,N,e,o,n),l=R9(L,P,H,W,q,$,N,e,o,n);L=L9(a,d),P=U9(a,d),H=I9(a,d,s,m,p),W=B9(a,d,s,m,p,w);var g=e0(L,P,H,W),y=r0(L,P,H,W);k=M,R=O,M=x,O=b,x=v,b=_,v=e0(S,A,u,l),_=r0(A,A,u,l),S=p,A=w,p=s,w=m,s=a,m=d,a=e0(u,l,g,y),d=r0(u,l,g,y)}Ni(this.h,0,a,d),Ni(this.h,2,s,m),Ni(this.h,4,p,w),Ni(this.h,6,S,A),Ni(this.h,8,v,_),Ni(this.h,10,x,b),Ni(this.h,12,M,O),Ni(this.h,14,k,R)},qr.prototype._digest=function(t){return t==="hex"?sr.toHex32(this.h,"big"):sr.split32(this.h,"big")};function j9(t,r,h,a,d){var s=t&h^~t&d;return s<0&&(s+=4294967296),s}function C9(t,r,h,a,d,s){var m=r&a^~r&s;return m<0&&(m+=4294967296),m}function I9(t,r,h,a,d){var s=t&h^t&d^h&d;return s<0&&(s+=4294967296),s}function B9(t,r,h,a,d,s){var m=r&a^r&s^a&s;return m<0&&(m+=4294967296),m}function L9(t,r){var h=ii(t,r,28),a=ii(r,t,2),d=ii(r,t,7),s=h^a^d;return s<0&&(s+=4294967296),s}function U9(t,r){var h=ni(t,r,28),a=ni(r,t,2),d=ni(r,t,7),s=h^a^d;return s<0&&(s+=4294967296),s}function q9(t,r){var h=ii(t,r,14),a=ii(t,r,18),d=ii(r,t,9),s=h^a^d;return s<0&&(s+=4294967296),s}function $9(t,r){var h=ni(t,r,14),a=ni(t,r,18),d=ni(r,t,9),s=h^a^d;return s<0&&(s+=4294967296),s}function T9(t,r){var h=ii(t,r,1),a=ii(t,r,8),d=am(t,r,7),s=h^a^d;return s<0&&(s+=4294967296),s}function D9(t,r){var h=ni(t,r,1),a=ni(t,r,8),d=hm(t,r,7),s=h^a^d;return s<0&&(s+=4294967296),s}function P9(t,r){var h=ii(t,r,19),a=ii(r,t,29),d=am(t,r,6),s=h^a^d;return s<0&&(s+=4294967296),s}function N9(t,r){var h=ni(t,r,19),a=ni(r,t,29),d=hm(t,r,6),s=h^a^d;return s<0&&(s+=4294967296),s}var i0=ee,fm=lm;function Si(){if(!(this instanceof Si))return new Si;fm.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i0.inherits(Si,fm);var z9=Si;Si.blockSize=1024,Si.outSize=384,Si.hmacStrength=192,Si.padLength=128,Si.prototype._digest=function(t){return t==="hex"?i0.toHex32(this.h.slice(0,12),"big"):i0.split32(this.h.slice(0,12),"big")},io.sha1=l9,io.sha224=_9,io.sha256=om,io.sha384=z9,io.sha512=lm;var cm={},pn=ee,F9=ro,ih=pn.rotl32,dm=pn.sum32,ps=pn.sum32_3,pm=pn.sum32_4,mm=F9.BlockHash;function oi(){if(!(this instanceof oi))return new oi;mm.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}pn.inherits(oi,mm),cm.ripemd160=oi,oi.blockSize=512,oi.outSize=160,oi.hmacStrength=192,oi.padLength=64,oi.prototype._update=function(t,r){for(var h=this.h[0],a=this.h[1],d=this.h[2],s=this.h[3],m=this.h[4],p=h,w=a,S=d,A=s,v=m,_=0;_<80;_++){var x=dm(ih(pm(h,gm(_,a,d,s),t[W9[_]+r],V9(_)),K9[_]),m);h=m,m=s,s=ih(d,10),d=a,a=x,x=dm(ih(pm(p,gm(79-_,w,S,A),t[Z9[_]+r],H9(_)),J9[_]),v),p=v,v=A,A=ih(S,10),S=w,w=x}x=ps(this.h[1],d,A),this.h[1]=ps(this.h[2],s,v),this.h[2]=ps(this.h[3],m,p),this.h[3]=ps(this.h[4],h,w),this.h[4]=ps(this.h[0],a,S),this.h[0]=x},oi.prototype._digest=function(t){return t==="hex"?pn.toHex32(this.h,"little"):pn.split32(this.h,"little")};function gm(t,r,h,a){return t<=15?r^h^a:t<=31?r&h|~r&a:t<=47?(r|~h)^a:t<=63?r&a|h&~a:r^(h|~a)}function V9(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function H9(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var W9=[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],Z9=[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],K9=[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],J9=[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],Q9=ee,X9=vr;function ao(t,r,h){if(!(this instanceof ao))return new ao(t,r,h);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(Q9.toArray(r,h))}var G9=ao;ao.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),X9(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)},ao.prototype.update=function(t,r){return this.inner.update(t,r),this},ao.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var r=t;r.utils=ee,r.common=ro,r.sha=io,r.ripemd=cm,r.hmac=G9,r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160}(eh);var ym,vm;function Y9(){return vm||(vm=1,ym={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"]]}}),ym}(function(t){var r=t,h=eh,a=Xl,d=fr,s=d.assert;function m(S){S.type==="short"?this.curve=new a.short(S):S.type==="edwards"?this.curve=new a.edwards(S):this.curve=new a.mont(S),this.g=this.curve.g,this.n=this.curve.n,this.hash=S.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=m;function p(S,A){Object.defineProperty(r,S,{configurable:!0,enumerable:!0,get:function(){var v=new m(A);return Object.defineProperty(r,S,{configurable:!0,enumerable:!0,value:v}),v}})}p("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:h.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),p("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:h.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),p("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:h.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),p("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:h.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"]}),p("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:h.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"]}),p("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:h.sha256,gRed:!1,g:["9"]}),p("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:h.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var w;try{w=Y9()}catch{w=void 0}p("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:h.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",w]})})(th);var tM=eh,mn=Ql,bm=vr;function zi(t){if(!(this instanceof zi))return new zi(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var r=mn.toArray(t.entropy,t.entropyEnc||"hex"),h=mn.toArray(t.nonce,t.nonceEnc||"hex"),a=mn.toArray(t.pers,t.persEnc||"hex");bm(r.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(r,h,a)}var eM=zi;zi.prototype._init=function(t,r,h){var a=t.concat(r).concat(h);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var d=0;d<this.V.length;d++)this.K[d]=0,this.V[d]=1;this._update(a),this._reseed=1,this.reseedInterval=281474976710656},zi.prototype._hmac=function(){return new tM.hmac(this.hash,this.K)},zi.prototype._update=function(t){var r=this._hmac().update(this.V).update([0]);t&&(r=r.update(t)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},zi.prototype.reseed=function(t,r,h,a){typeof r!="string"&&(a=h,h=r,r=null),t=mn.toArray(t,r),h=mn.toArray(h,a),bm(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(h||[])),this._reseed=1},zi.prototype.generate=function(t,r,h,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(a=h,h=r,r=null),h&&(h=mn.toArray(h,a||"hex"),this._update(h));for(var d=[];d.length<t;)this.V=this._hmac().update(this.V).digest(),d=d.concat(this.V);var s=d.slice(0,t);return this._update(h),this._reseed++,mn.encode(s,r)};var rM=wi,iM=fr,n0=iM.assert;function Ye(t,r){this.ec=t,this.priv=null,this.pub=null,r.priv&&this._importPrivate(r.priv,r.privEnc),r.pub&&this._importPublic(r.pub,r.pubEnc)}var nM=Ye;Ye.fromPublic=function(t,r,h){return r instanceof Ye?r:new Ye(t,{pub:r,pubEnc:h})},Ye.fromPrivate=function(t,r,h){return r instanceof Ye?r:new Ye(t,{priv:r,privEnc:h})},Ye.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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"}},Ye.prototype.getPublic=function(t,r){return typeof t=="string"&&(r=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,t):this.pub},Ye.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv},Ye.prototype._importPrivate=function(t,r){this.priv=new rM(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)},Ye.prototype._importPublic=function(t,r){if(t.x||t.y){this.ec.curve.type==="mont"?n0(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&n0(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,r)},Ye.prototype.derive=function(t){return t.validate()||n0(t.validate(),"public point not validated"),t.mul(this.priv).getX()},Ye.prototype.sign=function(t,r,h){return this.ec.sign(t,this,r,h)},Ye.prototype.verify=function(t,r){return this.ec.verify(t,r,this)},Ye.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var nh=wi,o0=fr,oM=o0.assert;function oh(t,r){if(t instanceof oh)return t;this._importDER(t,r)||(oM(t.r&&t.s,"Signature without r or s"),this.r=new nh(t.r,16),this.s=new nh(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var sM=oh;function aM(){this.place=0}function s0(t,r){var h=t[r.place++];if(!(h&128))return h;var a=h&15;if(a===0||a>4)return!1;for(var d=0,s=0,m=r.place;s<a;s++,m++)d<<=8,d|=t[m],d>>>=0;return d<=127?!1:(r.place=m,d)}function wm(t){for(var r=0,h=t.length-1;!t[r]&&!(t[r+1]&128)&&r<h;)r++;return r===0?t:t.slice(r)}oh.prototype._importDER=function(t,r){t=o0.toArray(t,r);var h=new aM;if(t[h.place++]!==48)return!1;var a=s0(t,h);if(a===!1||a+h.place!==t.length||t[h.place++]!==2)return!1;var d=s0(t,h);if(d===!1)return!1;var s=t.slice(h.place,d+h.place);if(h.place+=d,t[h.place++]!==2)return!1;var m=s0(t,h);if(m===!1||t.length!==m+h.place)return!1;var p=t.slice(h.place,m+h.place);if(s[0]===0)if(s[1]&128)s=s.slice(1);else return!1;if(p[0]===0)if(p[1]&128)p=p.slice(1);else return!1;return this.r=new nh(s),this.s=new nh(p),this.recoveryParam=null,!0};function a0(t,r){if(r<128){t.push(r);return}var h=1+(Math.log(r)/Math.LN2>>>3);for(t.push(h|128);--h;)t.push(r>>>(h<<3)&255);t.push(r)}oh.prototype.toDER=function(t){var r=this.r.toArray(),h=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),h[0]&128&&(h=[0].concat(h)),r=wm(r),h=wm(h);!h[0]&&!(h[1]&128);)h=h.slice(1);var a=[2];a0(a,r.length),a=a.concat(r),a.push(2),a0(a,h.length);var d=a.concat(h),s=[48];return a0(s,d.length),s=s.concat(d),o0.encode(s,t)};var h0,Mm;function hM(){if(Mm)return h0;Mm=1;var t=wi,r=eM,h=fr,a=th,d=zl(),s=h.assert,m=nM,p=sM;function w(S){if(!(this instanceof w))return new w(S);typeof S=="string"&&(s(Object.prototype.hasOwnProperty.call(a,S),"Unknown curve "+S),S=a[S]),S instanceof a.PresetCurve&&(S={curve:S}),this.curve=S.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=S.curve.g,this.g.precompute(S.curve.n.bitLength()+1),this.hash=S.hash||S.curve.hash}return h0=w,w.prototype.keyPair=function(S){return new m(this,S)},w.prototype.keyFromPrivate=function(S,A){return m.fromPrivate(this,S,A)},w.prototype.keyFromPublic=function(S,A){return m.fromPublic(this,S,A)},w.prototype.genKeyPair=function(S){S||(S={});for(var A=new r({hash:this.hash,pers:S.pers,persEnc:S.persEnc||"utf8",entropy:S.entropy||d(this.hash.hmacStrength),entropyEnc:S.entropy&&S.entropyEnc||"utf8",nonce:this.n.toArray()}),v=this.n.byteLength(),_=this.n.sub(new t(2));;){var x=new t(A.generate(v));if(!(x.cmp(_)>0))return x.iaddn(1),this.keyFromPrivate(x)}},w.prototype._truncateToN=function(S,A){var v=S.byteLength()*8-this.n.bitLength();return v>0&&(S=S.ushrn(v)),!A&&S.cmp(this.n)>=0?S.sub(this.n):S},w.prototype.sign=function(S,A,v,_){typeof v=="object"&&(_=v,v=null),_||(_={}),A=this.keyFromPrivate(A,v),S=this._truncateToN(new t(S,16));for(var x=this.n.byteLength(),b=A.getPrivate().toArray("be",x),M=S.toArray("be",x),O=new r({hash:this.hash,entropy:b,nonce:M,pers:_.pers,persEnc:_.persEnc||"utf8"}),k=this.n.sub(new t(1)),R=0;;R++){var I=_.k?_.k(R):new t(O.generate(this.n.byteLength()));if(I=this._truncateToN(I,!0),!(I.cmpn(1)<=0||I.cmp(k)>=0)){var L=this.g.mul(I);if(!L.isInfinity()){var P=L.getX(),H=P.umod(this.n);if(H.cmpn(0)!==0){var W=I.invm(this.n).mul(H.mul(A.getPrivate()).iadd(S));if(W=W.umod(this.n),W.cmpn(0)!==0){var q=(L.getY().isOdd()?1:0)|(P.cmp(H)!==0?2:0);return _.canonical&&W.cmp(this.nh)>0&&(W=this.n.sub(W),q^=1),new p({r:H,s:W,recoveryParam:q})}}}}}},w.prototype.verify=function(S,A,v,_){S=this._truncateToN(new t(S,16)),v=this.keyFromPublic(v,_),A=new p(A,"hex");var x=A.r,b=A.s;if(x.cmpn(1)<0||x.cmp(this.n)>=0||b.cmpn(1)<0||b.cmp(this.n)>=0)return!1;var M=b.invm(this.n),O=M.mul(S).umod(this.n),k=M.mul(x).umod(this.n),R;return this.curve._maxwellTrick?(R=this.g.jmulAdd(O,v.getPublic(),k),R.isInfinity()?!1:R.eqXToP(x)):(R=this.g.mulAdd(O,v.getPublic(),k),R.isInfinity()?!1:R.getX().umod(this.n).cmp(x)===0)},w.prototype.recoverPubKey=function(S,A,v,_){s((3&v)===v,"The recovery param is more than two bits"),A=new p(A,_);var x=this.n,b=new t(S),M=A.r,O=A.s,k=v&1,R=v>>1;if(M.cmp(this.curve.p.umod(this.curve.n))>=0&&R)throw new Error("Unable to find sencond key candinate");R?M=this.curve.pointFromX(M.add(this.curve.n),k):M=this.curve.pointFromX(M,k);var I=A.r.invm(x),L=x.sub(b).mul(I).umod(x),P=O.mul(I).umod(x);return this.g.mulAdd(L,M,P)},w.prototype.getKeyRecoveryParam=function(S,A,v,_){if(A=new p(A,_),A.recoveryParam!==null)return A.recoveryParam;for(var x=0;x<4;x++){var b;try{b=this.recoverPubKey(S,A,x)}catch{continue}if(b.eq(v))return x}throw new Error("Unable to find valid recovery factor")},h0}var ms=fr,_m=ms.assert,Sm=ms.parseBytes,ho=ms.cachedProperty;function ze(t,r){this.eddsa=t,this._secret=Sm(r.secret),t.isPoint(r.pub)?this._pub=r.pub:this._pubBytes=Sm(r.pub)}ze.fromPublic=function(t,r){return r instanceof ze?r:new ze(t,{pub:r})},ze.fromSecret=function(t,r){return r instanceof ze?r:new ze(t,{secret:r})},ze.prototype.secret=function(){return this._secret},ho(ze,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),ho(ze,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),ho(ze,"privBytes",function(){var t=this.eddsa,r=this.hash(),h=t.encodingLength-1,a=r.slice(0,t.encodingLength);return a[0]&=248,a[h]&=127,a[h]|=64,a}),ho(ze,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),ho(ze,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),ho(ze,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),ze.prototype.sign=function(t){return _m(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},ze.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)},ze.prototype.getSecret=function(t){return _m(this._secret,"KeyPair is public only"),ms.encode(this.secret(),t)},ze.prototype.getPublic=function(t){return ms.encode(this.pubBytes(),t)};var uM=ze,lM=wi,sh=fr,fM=sh.assert,ah=sh.cachedProperty,cM=sh.parseBytes;function gn(t,r){this.eddsa=t,typeof r!="object"&&(r=cM(r)),Array.isArray(r)&&(r={R:r.slice(0,t.encodingLength),S:r.slice(t.encodingLength)}),fM(r.R&&r.S,"Signature without R or S"),t.isPoint(r.R)&&(this._R=r.R),r.S instanceof lM&&(this._S=r.S),this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded,this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}ah(gn,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),ah(gn,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),ah(gn,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),ah(gn,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),gn.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},gn.prototype.toHex=function(){return sh.encode(this.toBytes(),"hex").toUpperCase()};var dM=gn,pM=eh,mM=th,uo=fr,gM=uo.assert,Am=uo.parseBytes,xm=uM,km=dM;function ar(t){if(gM(t==="ed25519","only tested with ed25519 so far"),!(this instanceof ar))return new ar(t);t=mM[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=pM.sha512}var yM=ar;ar.prototype.sign=function(t,r){t=Am(t);var h=this.keyFromSecret(r),a=this.hashInt(h.messagePrefix(),t),d=this.g.mul(a),s=this.encodePoint(d),m=this.hashInt(s,h.pubBytes(),t).mul(h.priv()),p=a.add(m).umod(this.curve.n);return this.makeSignature({R:d,S:p,Rencoded:s})},ar.prototype.verify=function(t,r,h){t=Am(t),r=this.makeSignature(r);var a=this.keyFromPublic(h),d=this.hashInt(r.Rencoded(),a.pubBytes(),t),s=this.g.mul(r.S()),m=r.R().add(a.pub().mul(d));return m.eq(s)},ar.prototype.hashInt=function(){for(var t=this.hash(),r=0;r<arguments.length;r++)t.update(arguments[r]);return uo.intFromLE(t.digest()).umod(this.curve.n)},ar.prototype.keyFromPublic=function(t){return xm.fromPublic(this,t)},ar.prototype.keyFromSecret=function(t){return xm.fromSecret(this,t)},ar.prototype.makeSignature=function(t){return t instanceof km?t:new km(this,t)},ar.prototype.encodePoint=function(t){var r=t.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=t.getX().isOdd()?128:0,r},ar.prototype.decodePoint=function(t){t=uo.parseBytes(t);var r=t.length-1,h=t.slice(0,r).concat(t[r]&-129),a=(t[r]&128)!==0,d=uo.intFromLE(h);return this.curve.pointFromY(d,a)},ar.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},ar.prototype.decodeInt=function(t){return uo.intFromLE(t)},ar.prototype.isPoint=function(t){return t instanceof this.pointClass};var Em;function u0(){return Em||(Em=1,function(t){var r=t;r.version=y5.version,r.utils=fr,r.rand=zl(),r.curve=Xl,r.curves=th,r.ec=hM(),r.eddsa=yM}(Z1)),Z1}var $r={},l0={},f0={exports:{}};f0.exports,function(t){(function(r,h){function a(e,o){if(!e)throw new Error(o||"Assertion failed")}function d(e,o){e.super_=o;var n=function(){};n.prototype=o.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,o,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((o==="le"||o==="be")&&(n=o,o=10),this._init(e||0,o||10,n||"be"))}typeof r=="object"?r.exports=s:h.BN=s,s.BN=s,s.wordSize=26;var m;try{typeof window<"u"&&typeof window.Buffer<"u"?m=window.Buffer:m=Ut.Buffer}catch{}s.isBN=function(e){return e instanceof s?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,o){return e.cmp(o)>0?e:o},s.min=function(e,o){return e.cmp(o)<0?e:o},s.prototype._init=function(e,o,n){if(typeof e=="number")return this._initNumber(e,o,n);if(typeof e=="object")return this._initArray(e,o,n);o==="hex"&&(o=16),a(o===(o|0)&&o>=2&&o<=36),e=e.toString().replace(/\s+/g,"");var u=0;e[0]==="-"&&(u++,this.negative=1),u<e.length&&(o===16?this._parseHex(e,u,n):(this._parseBase(e,o,u),n==="le"&&this._initArray(this.toArray(),o,n)))},s.prototype._initNumber=function(e,o,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):(a(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),o,n)},s.prototype._initArray=function(e,o,n){if(a(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 u=0;u<this.length;u++)this.words[u]=0;var l,g,y=0;if(n==="be")for(u=e.length-1,l=0;u>=0;u-=3)g=e[u]|e[u-1]<<8|e[u-2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);else if(n==="le")for(u=0,l=0;u<e.length;u+=3)g=e[u]|e[u+1]<<8|e[u+2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);return this.strip()};function p(e,o){var n=e.charCodeAt(o);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function w(e,o,n){var u=p(e,n);return n-1>=o&&(u|=p(e,n-1)<<4),u}s.prototype._parseHex=function(e,o,n){this.length=Math.ceil((e.length-o)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,g=0,y;if(n==="be")for(u=e.length-1;u>=o;u-=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8;else{var c=e.length-o;for(u=c%2===0?o+1:o;u<e.length;u+=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8}this.strip()};function S(e,o,n,u){for(var l=0,g=Math.min(e.length,n),y=o;y<g;y++){var c=e.charCodeAt(y)-48;l*=u,c>=49?l+=c-49+10:c>=17?l+=c-17+10:l+=c}return l}s.prototype._parseBase=function(e,o,n){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=o)u++;u--,l=l/o|0;for(var g=e.length-n,y=g%u,c=Math.min(g,g-y)+n,i=0,f=n;f<c;f+=u)i=S(e,f,f+u,o),this.imuln(l),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(y!==0){var E=1;for(i=S(e,f,e.length,o),f=0;f<y;f++)E*=o;this.imuln(E),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var o=0;o<this.length;o++)e.words[o]=this.words[o];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[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],_=[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];s.prototype.toString=function(e,o){e=e||10,o=o|0||1;var n;if(e===16||e==="hex"){n="";for(var u=0,l=0,g=0;g<this.length;g++){var y=this.words[g],c=((y<<u|l)&16777215).toString(16);l=y>>>24-u&16777215,l!==0||g!==this.length-1?n=A[6-c.length]+c+n:n=c+n,u+=2,u>=26&&(u-=26,g--)}for(l!==0&&(n=l.toString(16)+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var i=v[e],f=_[e];n="";var E=this.clone();for(E.negative=0;!E.isZero();){var j=E.modn(f).toString(e);E=E.idivn(f),E.isZero()?n=j+n:n=A[i-j.length]+j+n}for(this.isZero()&&(n="0"+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},s.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&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,o){return a(typeof m<"u"),this.toArrayLike(m,e,o)},s.prototype.toArray=function(e,o){return this.toArrayLike(Array,e,o)},s.prototype.toArrayLike=function(e,o,n){var u=this.byteLength(),l=n||Math.max(1,u);a(u<=l,"byte array longer than desired length"),a(l>0,"Requested array length <= 0"),this.strip();var g=o==="le",y=new e(l),c,i,f=this.clone();if(g){for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[i]=c;for(;i<l;i++)y[i]=0}else{for(i=0;i<l-u;i++)y[i]=0;for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[l-i-1]=c}return y},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var o=e,n=0;return o>=4096&&(n+=13,o>>>=13),o>=64&&(n+=7,o>>>=7),o>=8&&(n+=4,o>>>=4),o>=2&&(n+=2,o>>>=2),n+o},s.prototype._zeroBits=function(e){if(e===0)return 26;var o=e,n=0;return o&8191||(n+=13,o>>>=13),o&127||(n+=7,o>>>=7),o&15||(n+=4,o>>>=4),o&3||(n+=2,o>>>=2),o&1||n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],o=this._countBits(e);return(this.length-1)*26+o};function x(e){for(var o=new Array(e.bitLength()),n=0;n<o.length;n++){var u=n/26|0,l=n%26;o[n]=(e.words[u]&1<<l)>>>l}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,o=0;o<this.length;o++){var n=this._zeroBits(this.words[o]);if(e+=n,n!==26)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var o=0;o<e.length;o++)this.words[o]=this.words[o]|e.words[o];return this.strip()},s.prototype.ior=function(e){return a((this.negative|e.negative)===0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var o;this.length>e.length?o=e:o=this;for(var n=0;n<o.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=o.length,this.strip()},s.prototype.iand=function(e){return a((this.negative|e.negative)===0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var o,n;this.length>e.length?(o=this,n=e):(o=e,n=this);for(var u=0;u<n.length;u++)this.words[u]=o.words[u]^n.words[u];if(this!==o)for(;u<o.length;u++)this.words[u]=o.words[u];return this.length=o.length,this.strip()},s.prototype.ixor=function(e){return a((this.negative|e.negative)===0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){a(typeof e=="number"&&e>=0);var o=Math.ceil(e/26)|0,n=e%26;this._expand(o),n>0&&o--;for(var u=0;u<o;u++)this.words[u]=~this.words[u]&67108863;return n>0&&(this.words[u]=~this.words[u]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,o){a(typeof e=="number"&&e>=0);var n=e/26|0,u=e%26;return this._expand(n+1),o?this.words[n]=this.words[n]|1<<u:this.words[n]=this.words[n]&~(1<<u),this.strip()},s.prototype.iadd=function(e){var o;if(this.negative!==0&&e.negative===0)return this.negative=0,o=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,o=this.isub(e),e.negative=1,o._normSign();var n,u;this.length>e.length?(n=this,u=e):(n=e,u=this);for(var l=0,g=0;g<u.length;g++)o=(n.words[g]|0)+(u.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;for(;l!==0&&g<n.length;g++)o=(n.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;if(this.length=n.length,l!==0)this.words[this.length]=l,this.length++;else if(n!==this)for(;g<n.length;g++)this.words[g]=n.words[g];return this},s.prototype.add=function(e){var o;return e.negative!==0&&this.negative===0?(e.negative=0,o=this.sub(e),e.negative^=1,o):e.negative===0&&this.negative!==0?(this.negative=0,o=e.sub(this),this.negative=1,o):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var o=this.iadd(e);return e.negative=1,o._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 u,l;n>0?(u=this,l=e):(u=e,l=this);for(var g=0,y=0;y<l.length;y++)o=(u.words[y]|0)-(l.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;for(;g!==0&&y<u.length;y++)o=(u.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;if(g===0&&y<u.length&&u!==this)for(;y<u.length;y++)this.words[y]=u.words[y];return this.length=Math.max(this.length,y),u!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};function b(e,o,n){n.negative=o.negative^e.negative;var u=e.length+o.length|0;n.length=u,u=u-1|0;var l=e.words[0]|0,g=o.words[0]|0,y=l*g,c=y&67108863,i=y/67108864|0;n.words[0]=c;for(var f=1;f<u;f++){for(var E=i>>>26,j=i&67108863,D=Math.min(f,o.length-1),V=Math.max(0,f-e.length+1);V<=D;V++){var Q=f-V|0;l=e.words[Q]|0,g=o.words[V]|0,y=l*g+j,E+=y/67108864|0,j=y&67108863}n.words[f]=j|0,i=E|0}return i!==0?n.words[f]=i|0:n.length--,n.strip()}var M=function(e,o,n){var u=e.words,l=o.words,g=n.words,y=0,c,i,f,E=u[0]|0,j=E&8191,D=E>>>13,V=u[1]|0,Q=V&8191,Z=V>>>13,tt=u[2]|0,Y=tt&8191,rt=tt>>>13,It=u[3]|0,z=It&8191,U=It>>>13,G=u[4]|0,J=G&8191,et=G>>>13,C=u[5]|0,B=C&8191,T=C>>>13,F=u[6]|0,K=F&8191,X=F>>>13,ut=u[7]|0,it=ut&8191,ot=ut>>>13,Ct=u[8]|0,nt=Ct&8191,st=Ct>>>13,Bt=u[9]|0,at=Bt&8191,bt=Bt>>>13,qt=l[0]|0,lt=qt&8191,Mt=qt>>>13,Ft=l[1]|0,ht=Ft&8191,wt=Ft>>>13,Vt=l[2]|0,ft=Vt&8191,_t=Vt>>>13,Kt=l[3]|0,ct=Kt&8191,St=Kt>>>13,Jt=l[4]|0,dt=Jt&8191,At=Jt>>>13,Qt=l[5]|0,pt=Qt&8191,xt=Qt>>>13,Xt=l[6]|0,mt=Xt&8191,kt=Xt>>>13,Gt=l[7]|0,gt=Gt&8191,Et=Gt>>>13,Yt=l[8]|0,yt=Yt&8191,Rt=Yt>>>13,te=l[9]|0,vt=te&8191,Ot=te>>>13;n.negative=e.negative^o.negative,n.length=19,c=Math.imul(j,lt),i=Math.imul(j,Mt),i=i+Math.imul(D,lt)|0,f=Math.imul(D,Mt);var $t=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,c=Math.imul(Q,lt),i=Math.imul(Q,Mt),i=i+Math.imul(Z,lt)|0,f=Math.imul(Z,Mt),c=c+Math.imul(j,ht)|0,i=i+Math.imul(j,wt)|0,i=i+Math.imul(D,ht)|0,f=f+Math.imul(D,wt)|0;var Tt=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,c=Math.imul(Y,lt),i=Math.imul(Y,Mt),i=i+Math.imul(rt,lt)|0,f=Math.imul(rt,Mt),c=c+Math.imul(Q,ht)|0,i=i+Math.imul(Q,wt)|0,i=i+Math.imul(Z,ht)|0,f=f+Math.imul(Z,wt)|0,c=c+Math.imul(j,ft)|0,i=i+Math.imul(j,_t)|0,i=i+Math.imul(D,ft)|0,f=f+Math.imul(D,_t)|0;var ue=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ue>>>26)|0,ue&=67108863,c=Math.imul(z,lt),i=Math.imul(z,Mt),i=i+Math.imul(U,lt)|0,f=Math.imul(U,Mt),c=c+Math.imul(Y,ht)|0,i=i+Math.imul(Y,wt)|0,i=i+Math.imul(rt,ht)|0,f=f+Math.imul(rt,wt)|0,c=c+Math.imul(Q,ft)|0,i=i+Math.imul(Q,_t)|0,i=i+Math.imul(Z,ft)|0,f=f+Math.imul(Z,_t)|0,c=c+Math.imul(j,ct)|0,i=i+Math.imul(j,St)|0,i=i+Math.imul(D,ct)|0,f=f+Math.imul(D,St)|0;var le=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(le>>>26)|0,le&=67108863,c=Math.imul(J,lt),i=Math.imul(J,Mt),i=i+Math.imul(et,lt)|0,f=Math.imul(et,Mt),c=c+Math.imul(z,ht)|0,i=i+Math.imul(z,wt)|0,i=i+Math.imul(U,ht)|0,f=f+Math.imul(U,wt)|0,c=c+Math.imul(Y,ft)|0,i=i+Math.imul(Y,_t)|0,i=i+Math.imul(rt,ft)|0,f=f+Math.imul(rt,_t)|0,c=c+Math.imul(Q,ct)|0,i=i+Math.imul(Q,St)|0,i=i+Math.imul(Z,ct)|0,f=f+Math.imul(Z,St)|0,c=c+Math.imul(j,dt)|0,i=i+Math.imul(j,At)|0,i=i+Math.imul(D,dt)|0,f=f+Math.imul(D,At)|0;var fe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(fe>>>26)|0,fe&=67108863,c=Math.imul(B,lt),i=Math.imul(B,Mt),i=i+Math.imul(T,lt)|0,f=Math.imul(T,Mt),c=c+Math.imul(J,ht)|0,i=i+Math.imul(J,wt)|0,i=i+Math.imul(et,ht)|0,f=f+Math.imul(et,wt)|0,c=c+Math.imul(z,ft)|0,i=i+Math.imul(z,_t)|0,i=i+Math.imul(U,ft)|0,f=f+Math.imul(U,_t)|0,c=c+Math.imul(Y,ct)|0,i=i+Math.imul(Y,St)|0,i=i+Math.imul(rt,ct)|0,f=f+Math.imul(rt,St)|0,c=c+Math.imul(Q,dt)|0,i=i+Math.imul(Q,At)|0,i=i+Math.imul(Z,dt)|0,f=f+Math.imul(Z,At)|0,c=c+Math.imul(j,pt)|0,i=i+Math.imul(j,xt)|0,i=i+Math.imul(D,pt)|0,f=f+Math.imul(D,xt)|0;var ce=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ce>>>26)|0,ce&=67108863,c=Math.imul(K,lt),i=Math.imul(K,Mt),i=i+Math.imul(X,lt)|0,f=Math.imul(X,Mt),c=c+Math.imul(B,ht)|0,i=i+Math.imul(B,wt)|0,i=i+Math.imul(T,ht)|0,f=f+Math.imul(T,wt)|0,c=c+Math.imul(J,ft)|0,i=i+Math.imul(J,_t)|0,i=i+Math.imul(et,ft)|0,f=f+Math.imul(et,_t)|0,c=c+Math.imul(z,ct)|0,i=i+Math.imul(z,St)|0,i=i+Math.imul(U,ct)|0,f=f+Math.imul(U,St)|0,c=c+Math.imul(Y,dt)|0,i=i+Math.imul(Y,At)|0,i=i+Math.imul(rt,dt)|0,f=f+Math.imul(rt,At)|0,c=c+Math.imul(Q,pt)|0,i=i+Math.imul(Q,xt)|0,i=i+Math.imul(Z,pt)|0,f=f+Math.imul(Z,xt)|0,c=c+Math.imul(j,mt)|0,i=i+Math.imul(j,kt)|0,i=i+Math.imul(D,mt)|0,f=f+Math.imul(D,kt)|0;var de=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(de>>>26)|0,de&=67108863,c=Math.imul(it,lt),i=Math.imul(it,Mt),i=i+Math.imul(ot,lt)|0,f=Math.imul(ot,Mt),c=c+Math.imul(K,ht)|0,i=i+Math.imul(K,wt)|0,i=i+Math.imul(X,ht)|0,f=f+Math.imul(X,wt)|0,c=c+Math.imul(B,ft)|0,i=i+Math.imul(B,_t)|0,i=i+Math.imul(T,ft)|0,f=f+Math.imul(T,_t)|0,c=c+Math.imul(J,ct)|0,i=i+Math.imul(J,St)|0,i=i+Math.imul(et,ct)|0,f=f+Math.imul(et,St)|0,c=c+Math.imul(z,dt)|0,i=i+Math.imul(z,At)|0,i=i+Math.imul(U,dt)|0,f=f+Math.imul(U,At)|0,c=c+Math.imul(Y,pt)|0,i=i+Math.imul(Y,xt)|0,i=i+Math.imul(rt,pt)|0,f=f+Math.imul(rt,xt)|0,c=c+Math.imul(Q,mt)|0,i=i+Math.imul(Q,kt)|0,i=i+Math.imul(Z,mt)|0,f=f+Math.imul(Z,kt)|0,c=c+Math.imul(j,gt)|0,i=i+Math.imul(j,Et)|0,i=i+Math.imul(D,gt)|0,f=f+Math.imul(D,Et)|0;var pe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(pe>>>26)|0,pe&=67108863,c=Math.imul(nt,lt),i=Math.imul(nt,Mt),i=i+Math.imul(st,lt)|0,f=Math.imul(st,Mt),c=c+Math.imul(it,ht)|0,i=i+Math.imul(it,wt)|0,i=i+Math.imul(ot,ht)|0,f=f+Math.imul(ot,wt)|0,c=c+Math.imul(K,ft)|0,i=i+Math.imul(K,_t)|0,i=i+Math.imul(X,ft)|0,f=f+Math.imul(X,_t)|0,c=c+Math.imul(B,ct)|0,i=i+Math.imul(B,St)|0,i=i+Math.imul(T,ct)|0,f=f+Math.imul(T,St)|0,c=c+Math.imul(J,dt)|0,i=i+Math.imul(J,At)|0,i=i+Math.imul(et,dt)|0,f=f+Math.imul(et,At)|0,c=c+Math.imul(z,pt)|0,i=i+Math.imul(z,xt)|0,i=i+Math.imul(U,pt)|0,f=f+Math.imul(U,xt)|0,c=c+Math.imul(Y,mt)|0,i=i+Math.imul(Y,kt)|0,i=i+Math.imul(rt,mt)|0,f=f+Math.imul(rt,kt)|0,c=c+Math.imul(Q,gt)|0,i=i+Math.imul(Q,Et)|0,i=i+Math.imul(Z,gt)|0,f=f+Math.imul(Z,Et)|0,c=c+Math.imul(j,yt)|0,i=i+Math.imul(j,Rt)|0,i=i+Math.imul(D,yt)|0,f=f+Math.imul(D,Rt)|0;var me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(at,lt),i=Math.imul(at,Mt),i=i+Math.imul(bt,lt)|0,f=Math.imul(bt,Mt),c=c+Math.imul(nt,ht)|0,i=i+Math.imul(nt,wt)|0,i=i+Math.imul(st,ht)|0,f=f+Math.imul(st,wt)|0,c=c+Math.imul(it,ft)|0,i=i+Math.imul(it,_t)|0,i=i+Math.imul(ot,ft)|0,f=f+Math.imul(ot,_t)|0,c=c+Math.imul(K,ct)|0,i=i+Math.imul(K,St)|0,i=i+Math.imul(X,ct)|0,f=f+Math.imul(X,St)|0,c=c+Math.imul(B,dt)|0,i=i+Math.imul(B,At)|0,i=i+Math.imul(T,dt)|0,f=f+Math.imul(T,At)|0,c=c+Math.imul(J,pt)|0,i=i+Math.imul(J,xt)|0,i=i+Math.imul(et,pt)|0,f=f+Math.imul(et,xt)|0,c=c+Math.imul(z,mt)|0,i=i+Math.imul(z,kt)|0,i=i+Math.imul(U,mt)|0,f=f+Math.imul(U,kt)|0,c=c+Math.imul(Y,gt)|0,i=i+Math.imul(Y,Et)|0,i=i+Math.imul(rt,gt)|0,f=f+Math.imul(rt,Et)|0,c=c+Math.imul(Q,yt)|0,i=i+Math.imul(Q,Rt)|0,i=i+Math.imul(Z,yt)|0,f=f+Math.imul(Z,Rt)|0,c=c+Math.imul(j,vt)|0,i=i+Math.imul(j,Ot)|0,i=i+Math.imul(D,vt)|0,f=f+Math.imul(D,Ot)|0;var ge=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(at,ht),i=Math.imul(at,wt),i=i+Math.imul(bt,ht)|0,f=Math.imul(bt,wt),c=c+Math.imul(nt,ft)|0,i=i+Math.imul(nt,_t)|0,i=i+Math.imul(st,ft)|0,f=f+Math.imul(st,_t)|0,c=c+Math.imul(it,ct)|0,i=i+Math.imul(it,St)|0,i=i+Math.imul(ot,ct)|0,f=f+Math.imul(ot,St)|0,c=c+Math.imul(K,dt)|0,i=i+Math.imul(K,At)|0,i=i+Math.imul(X,dt)|0,f=f+Math.imul(X,At)|0,c=c+Math.imul(B,pt)|0,i=i+Math.imul(B,xt)|0,i=i+Math.imul(T,pt)|0,f=f+Math.imul(T,xt)|0,c=c+Math.imul(J,mt)|0,i=i+Math.imul(J,kt)|0,i=i+Math.imul(et,mt)|0,f=f+Math.imul(et,kt)|0,c=c+Math.imul(z,gt)|0,i=i+Math.imul(z,Et)|0,i=i+Math.imul(U,gt)|0,f=f+Math.imul(U,Et)|0,c=c+Math.imul(Y,yt)|0,i=i+Math.imul(Y,Rt)|0,i=i+Math.imul(rt,yt)|0,f=f+Math.imul(rt,Rt)|0,c=c+Math.imul(Q,vt)|0,i=i+Math.imul(Q,Ot)|0,i=i+Math.imul(Z,vt)|0,f=f+Math.imul(Z,Ot)|0;var ye=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(at,ft),i=Math.imul(at,_t),i=i+Math.imul(bt,ft)|0,f=Math.imul(bt,_t),c=c+Math.imul(nt,ct)|0,i=i+Math.imul(nt,St)|0,i=i+Math.imul(st,ct)|0,f=f+Math.imul(st,St)|0,c=c+Math.imul(it,dt)|0,i=i+Math.imul(it,At)|0,i=i+Math.imul(ot,dt)|0,f=f+Math.imul(ot,At)|0,c=c+Math.imul(K,pt)|0,i=i+Math.imul(K,xt)|0,i=i+Math.imul(X,pt)|0,f=f+Math.imul(X,xt)|0,c=c+Math.imul(B,mt)|0,i=i+Math.imul(B,kt)|0,i=i+Math.imul(T,mt)|0,f=f+Math.imul(T,kt)|0,c=c+Math.imul(J,gt)|0,i=i+Math.imul(J,Et)|0,i=i+Math.imul(et,gt)|0,f=f+Math.imul(et,Et)|0,c=c+Math.imul(z,yt)|0,i=i+Math.imul(z,Rt)|0,i=i+Math.imul(U,yt)|0,f=f+Math.imul(U,Rt)|0,c=c+Math.imul(Y,vt)|0,i=i+Math.imul(Y,Ot)|0,i=i+Math.imul(rt,vt)|0,f=f+Math.imul(rt,Ot)|0;var ve=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(at,ct),i=Math.imul(at,St),i=i+Math.imul(bt,ct)|0,f=Math.imul(bt,St),c=c+Math.imul(nt,dt)|0,i=i+Math.imul(nt,At)|0,i=i+Math.imul(st,dt)|0,f=f+Math.imul(st,At)|0,c=c+Math.imul(it,pt)|0,i=i+Math.imul(it,xt)|0,i=i+Math.imul(ot,pt)|0,f=f+Math.imul(ot,xt)|0,c=c+Math.imul(K,mt)|0,i=i+Math.imul(K,kt)|0,i=i+Math.imul(X,mt)|0,f=f+Math.imul(X,kt)|0,c=c+Math.imul(B,gt)|0,i=i+Math.imul(B,Et)|0,i=i+Math.imul(T,gt)|0,f=f+Math.imul(T,Et)|0,c=c+Math.imul(J,yt)|0,i=i+Math.imul(J,Rt)|0,i=i+Math.imul(et,yt)|0,f=f+Math.imul(et,Rt)|0,c=c+Math.imul(z,vt)|0,i=i+Math.imul(z,Ot)|0,i=i+Math.imul(U,vt)|0,f=f+Math.imul(U,Ot)|0;var be=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(be>>>26)|0,be&=67108863,c=Math.imul(at,dt),i=Math.imul(at,At),i=i+Math.imul(bt,dt)|0,f=Math.imul(bt,At),c=c+Math.imul(nt,pt)|0,i=i+Math.imul(nt,xt)|0,i=i+Math.imul(st,pt)|0,f=f+Math.imul(st,xt)|0,c=c+Math.imul(it,mt)|0,i=i+Math.imul(it,kt)|0,i=i+Math.imul(ot,mt)|0,f=f+Math.imul(ot,kt)|0,c=c+Math.imul(K,gt)|0,i=i+Math.imul(K,Et)|0,i=i+Math.imul(X,gt)|0,f=f+Math.imul(X,Et)|0,c=c+Math.imul(B,yt)|0,i=i+Math.imul(B,Rt)|0,i=i+Math.imul(T,yt)|0,f=f+Math.imul(T,Rt)|0,c=c+Math.imul(J,vt)|0,i=i+Math.imul(J,Ot)|0,i=i+Math.imul(et,vt)|0,f=f+Math.imul(et,Ot)|0;var we=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(at,pt),i=Math.imul(at,xt),i=i+Math.imul(bt,pt)|0,f=Math.imul(bt,xt),c=c+Math.imul(nt,mt)|0,i=i+Math.imul(nt,kt)|0,i=i+Math.imul(st,mt)|0,f=f+Math.imul(st,kt)|0,c=c+Math.imul(it,gt)|0,i=i+Math.imul(it,Et)|0,i=i+Math.imul(ot,gt)|0,f=f+Math.imul(ot,Et)|0,c=c+Math.imul(K,yt)|0,i=i+Math.imul(K,Rt)|0,i=i+Math.imul(X,yt)|0,f=f+Math.imul(X,Rt)|0,c=c+Math.imul(B,vt)|0,i=i+Math.imul(B,Ot)|0,i=i+Math.imul(T,vt)|0,f=f+Math.imul(T,Ot)|0;var Me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(at,mt),i=Math.imul(at,kt),i=i+Math.imul(bt,mt)|0,f=Math.imul(bt,kt),c=c+Math.imul(nt,gt)|0,i=i+Math.imul(nt,Et)|0,i=i+Math.imul(st,gt)|0,f=f+Math.imul(st,Et)|0,c=c+Math.imul(it,yt)|0,i=i+Math.imul(it,Rt)|0,i=i+Math.imul(ot,yt)|0,f=f+Math.imul(ot,Rt)|0,c=c+Math.imul(K,vt)|0,i=i+Math.imul(K,Ot)|0,i=i+Math.imul(X,vt)|0,f=f+Math.imul(X,Ot)|0;var _e=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(at,gt),i=Math.imul(at,Et),i=i+Math.imul(bt,gt)|0,f=Math.imul(bt,Et),c=c+Math.imul(nt,yt)|0,i=i+Math.imul(nt,Rt)|0,i=i+Math.imul(st,yt)|0,f=f+Math.imul(st,Rt)|0,c=c+Math.imul(it,vt)|0,i=i+Math.imul(it,Ot)|0,i=i+Math.imul(ot,vt)|0,f=f+Math.imul(ot,Ot)|0;var Se=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(at,yt),i=Math.imul(at,Rt),i=i+Math.imul(bt,yt)|0,f=Math.imul(bt,Rt),c=c+Math.imul(nt,vt)|0,i=i+Math.imul(nt,Ot)|0,i=i+Math.imul(st,vt)|0,f=f+Math.imul(st,Ot)|0;var Ae=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(at,vt),i=Math.imul(at,Ot),i=i+Math.imul(bt,vt)|0,f=Math.imul(bt,Ot);var xe=(y+c|0)+((i&8191)<<13)|0;return y=(f+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,g[0]=$t,g[1]=Tt,g[2]=ue,g[3]=le,g[4]=fe,g[5]=ce,g[6]=de,g[7]=pe,g[8]=me,g[9]=ge,g[10]=ye,g[11]=ve,g[12]=be,g[13]=we,g[14]=Me,g[15]=_e,g[16]=Se,g[17]=Ae,g[18]=xe,y!==0&&(g[19]=y,n.length++),n};Math.imul||(M=b);function O(e,o,n){n.negative=o.negative^e.negative,n.length=e.length+o.length;for(var u=0,l=0,g=0;g<n.length-1;g++){var y=l;l=0;for(var c=u&67108863,i=Math.min(g,o.length-1),f=Math.max(0,g-e.length+1);f<=i;f++){var E=g-f,j=e.words[E]|0,D=o.words[f]|0,V=j*D,Q=V&67108863;y=y+(V/67108864|0)|0,Q=Q+c|0,c=Q&67108863,y=y+(Q>>>26)|0,l+=y>>>26,y&=67108863}n.words[g]=c,u=y,y=l}return u!==0?n.words[g]=u:n.length--,n.strip()}function k(e,o,n){var u=new R;return u.mulp(e,o,n)}s.prototype.mulTo=function(e,o){var n,u=this.length+e.length;return this.length===10&&e.length===10?n=M(this,e,o):u<63?n=b(this,e,o):u<1024?n=O(this,e,o):n=k(this,e,o),n};function R(e,o){this.x=e,this.y=o}R.prototype.makeRBT=function(e){for(var o=new Array(e),n=s.prototype._countBits(e)-1,u=0;u<e;u++)o[u]=this.revBin(u,n,e);return o},R.prototype.revBin=function(e,o,n){if(e===0||e===n-1)return e;for(var u=0,l=0;l<o;l++)u|=(e&1)<<o-l-1,e>>=1;return u},R.prototype.permute=function(e,o,n,u,l,g){for(var y=0;y<g;y++)u[y]=o[e[y]],l[y]=n[e[y]]},R.prototype.transform=function(e,o,n,u,l,g){this.permute(g,e,o,n,u,l);for(var y=1;y<l;y<<=1)for(var c=y<<1,i=Math.cos(2*Math.PI/c),f=Math.sin(2*Math.PI/c),E=0;E<l;E+=c)for(var j=i,D=f,V=0;V<y;V++){var Q=n[E+V],Z=u[E+V],tt=n[E+V+y],Y=u[E+V+y],rt=j*tt-D*Y;Y=j*Y+D*tt,tt=rt,n[E+V]=Q+tt,u[E+V]=Z+Y,n[E+V+y]=Q-tt,u[E+V+y]=Z-Y,V!==c&&(rt=i*j-f*D,D=i*D+f*j,j=rt)}},R.prototype.guessLen13b=function(e,o){var n=Math.max(o,e)|1,u=n&1,l=0;for(n=n/2|0;n;n=n>>>1)l++;return 1<<l+1+u},R.prototype.conjugate=function(e,o,n){if(!(n<=1))for(var u=0;u<n/2;u++){var l=e[u];e[u]=e[n-u-1],e[n-u-1]=l,l=o[u],o[u]=-o[n-u-1],o[n-u-1]=-l}},R.prototype.normalize13b=function(e,o){for(var n=0,u=0;u<o/2;u++){var l=Math.round(e[2*u+1]/o)*8192+Math.round(e[2*u]/o)+n;e[u]=l&67108863,l<67108864?n=0:n=l/67108864|0}return e},R.prototype.convert13b=function(e,o,n,u){for(var l=0,g=0;g<o;g++)l=l+(e[g]|0),n[2*g]=l&8191,l=l>>>13,n[2*g+1]=l&8191,l=l>>>13;for(g=2*o;g<u;++g)n[g]=0;a(l===0),a((l&-8192)===0)},R.prototype.stub=function(e){for(var o=new Array(e),n=0;n<e;n++)o[n]=0;return o},R.prototype.mulp=function(e,o,n){var u=2*this.guessLen13b(e.length,o.length),l=this.makeRBT(u),g=this.stub(u),y=new Array(u),c=new Array(u),i=new Array(u),f=new Array(u),E=new Array(u),j=new Array(u),D=n.words;D.length=u,this.convert13b(e.words,e.length,y,u),this.convert13b(o.words,o.length,f,u),this.transform(y,g,c,i,u,l),this.transform(f,g,E,j,u,l);for(var V=0;V<u;V++){var Q=c[V]*E[V]-i[V]*j[V];i[V]=c[V]*j[V]+i[V]*E[V],c[V]=Q}return this.conjugate(c,i,u),this.transform(c,i,D,g,u,l),this.conjugate(D,g,u),this.normalize13b(D,u),n.negative=e.negative^o.negative,n.length=e.length+o.length,n.strip()},s.prototype.mul=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),this.mulTo(e,o)},s.prototype.mulf=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),k(this,e,o)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){a(typeof e=="number"),a(e<67108864);for(var o=0,n=0;n<this.length;n++){var u=(this.words[n]|0)*e,l=(u&67108863)+(o&67108863);o>>=26,o+=u/67108864|0,o+=l>>>26,this.words[n]=l&67108863}return o!==0&&(this.words[n]=o,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var o=x(e);if(o.length===0)return new s(1);for(var n=this,u=0;u<o.length&&o[u]===0;u++,n=n.sqr());if(++u<o.length)for(var l=n.sqr();u<o.length;u++,l=l.sqr())o[u]!==0&&(n=n.mul(l));return n},s.prototype.iushln=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=67108863>>>26-o<<26-o,l;if(o!==0){var g=0;for(l=0;l<this.length;l++){var y=this.words[l]&u,c=(this.words[l]|0)-y<<o;this.words[l]=c|g,g=y>>>26-o}g&&(this.words[l]=g,this.length++)}if(n!==0){for(l=this.length-1;l>=0;l--)this.words[l+n]=this.words[l];for(l=0;l<n;l++)this.words[l]=0;this.length+=n}return this.strip()},s.prototype.ishln=function(e){return a(this.negative===0),this.iushln(e)},s.prototype.iushrn=function(e,o,n){a(typeof e=="number"&&e>=0);var u;o?u=(o-o%26)/26:u=0;var l=e%26,g=Math.min((e-l)/26,this.length),y=67108863^67108863>>>l<<l,c=n;if(u-=g,u=Math.max(0,u),c){for(var i=0;i<g;i++)c.words[i]=this.words[i];c.length=g}if(g!==0)if(this.length>g)for(this.length-=g,i=0;i<this.length;i++)this.words[i]=this.words[i+g];else this.words[0]=0,this.length=1;var f=0;for(i=this.length-1;i>=0&&(f!==0||i>=u);i--){var E=this.words[i]|0;this.words[i]=f<<26-l|E>>>l,f=E&y}return c&&f!==0&&(c.words[c.length++]=f),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,o,n){return a(this.negative===0),this.iushrn(e,o,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return!1;var l=this.words[n];return!!(l&u)},s.prototype.imaskn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(o!==0&&n++,this.length=Math.min(n,this.length),o!==0){var u=67108863^67108863>>>o<<o;this.words[this.length-1]&=u}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return a(typeof e=="number"),a(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)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var o=0;o<this.length&&this.words[o]>=67108864;o++)this.words[o]-=67108864,o===this.length-1?this.words[o+1]=1:this.words[o+1]++;return this.length=Math.max(this.length,o+1),this},s.prototype.isubn=function(e){if(a(typeof e=="number"),a(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 o=0;o<this.length&&this.words[o]<0;o++)this.words[o]+=67108864,this.words[o+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,o,n){var u=e.length+n,l;this._expand(u);var g,y=0;for(l=0;l<e.length;l++){g=(this.words[l+n]|0)+y;var c=(e.words[l]|0)*o;g-=c&67108863,y=(g>>26)-(c/67108864|0),this.words[l+n]=g&67108863}for(;l<this.length-n;l++)g=(this.words[l+n]|0)+y,y=g>>26,this.words[l+n]=g&67108863;if(y===0)return this.strip();for(a(y===-1),y=0,l=0;l<this.length;l++)g=-(this.words[l]|0)+y,y=g>>26,this.words[l]=g&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,o){var n=this.length-e.length,u=this.clone(),l=e,g=l.words[l.length-1]|0,y=this._countBits(g);n=26-y,n!==0&&(l=l.ushln(n),u.iushln(n),g=l.words[l.length-1]|0);var c=u.length-l.length,i;if(o!=="mod"){i=new s(null),i.length=c+1,i.words=new Array(i.length);for(var f=0;f<i.length;f++)i.words[f]=0}var E=u.clone()._ishlnsubmul(l,1,c);E.negative===0&&(u=E,i&&(i.words[c]=1));for(var j=c-1;j>=0;j--){var D=(u.words[l.length+j]|0)*67108864+(u.words[l.length+j-1]|0);for(D=Math.min(D/g|0,67108863),u._ishlnsubmul(l,D,j);u.negative!==0;)D--,u.negative=0,u._ishlnsubmul(l,1,j),u.isZero()||(u.negative^=1);i&&(i.words[j]=D)}return i&&i.strip(),u.strip(),o!=="div"&&n!==0&&u.iushrn(n),{div:i||null,mod:u}},s.prototype.divmod=function(e,o,n){if(a(!e.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var u,l,g;return this.negative!==0&&e.negative===0?(g=this.neg().divmod(e,o),o!=="mod"&&(u=g.div.neg()),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.iadd(e)),{div:u,mod:l}):this.negative===0&&e.negative!==0?(g=this.divmod(e.neg(),o),o!=="mod"&&(u=g.div.neg()),{div:u,mod:g.mod}):this.negative&e.negative?(g=this.neg().divmod(e.neg(),o),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.isub(e)),{div:g.div,mod:l}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:e.length===1?o==="div"?{div:this.divn(e.words[0]),mod:null}:o==="mod"?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,o)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var o=this.divmod(e);if(o.mod.isZero())return o.div;var n=o.div.negative!==0?o.mod.isub(e):o.mod,u=e.ushrn(1),l=e.andln(1),g=n.cmp(u);return g<0||l===1&&g===0?o.div:o.div.negative!==0?o.div.isubn(1):o.div.iaddn(1)},s.prototype.modn=function(e){a(e<=67108863);for(var o=(1<<26)%e,n=0,u=this.length-1;u>=0;u--)n=(o*n+(this.words[u]|0))%e;return n},s.prototype.idivn=function(e){a(e<=67108863);for(var o=0,n=this.length-1;n>=0;n--){var u=(this.words[n]|0)+o*67108864;this.words[n]=u/e|0,o=u%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=new s(0),y=new s(1),c=0;o.isEven()&&n.isEven();)o.iushrn(1),n.iushrn(1),++c;for(var i=n.clone(),f=o.clone();!o.isZero();){for(var E=0,j=1;!(o.words[0]&j)&&E<26;++E,j<<=1);if(E>0)for(o.iushrn(E);E-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(i),l.isub(f)),u.iushrn(1),l.iushrn(1);for(var D=0,V=1;!(n.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(n.iushrn(D);D-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(i),y.isub(f)),g.iushrn(1),y.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(g),l.isub(y)):(n.isub(o),g.isub(u),y.isub(l))}return{a:g,b:y,gcd:n.iushln(c)}},s.prototype._invmp=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=n.clone();o.cmpn(1)>0&&n.cmpn(1)>0;){for(var y=0,c=1;!(o.words[0]&c)&&y<26;++y,c<<=1);if(y>0)for(o.iushrn(y);y-- >0;)u.isOdd()&&u.iadd(g),u.iushrn(1);for(var i=0,f=1;!(n.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(n.iushrn(i);i-- >0;)l.isOdd()&&l.iadd(g),l.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(l)):(n.isub(o),l.isub(u))}var E;return o.cmpn(1)===0?E=u:E=l,E.cmpn(0)<0&&E.iadd(e),E},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var o=this.clone(),n=e.clone();o.negative=0,n.negative=0;for(var u=0;o.isEven()&&n.isEven();u++)o.iushrn(1),n.iushrn(1);do{for(;o.isEven();)o.iushrn(1);for(;n.isEven();)n.iushrn(1);var l=o.cmp(n);if(l<0){var g=o;o=n,n=g}else if(l===0||n.cmpn(1)===0)break;o.isub(n)}while(!0);return n.iushln(u)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){a(typeof e=="number");var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return this._expand(n+1),this.words[n]|=u,this;for(var l=u,g=n;l!==0&&g<this.length;g++){var y=this.words[g]|0;y+=l,l=y>>>26,y&=67108863,this.words[g]=y}return l!==0&&(this.words[g]=l,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(e){var o=e<0;if(this.negative!==0&&!o)return-1;if(this.negative===0&&o)return 1;this.strip();var n;if(this.length>1)n=1;else{o&&(e=-e),a(e<=67108863,"Number is too big");var u=this.words[0]|0;n=u===e?0:u<e?-1:1}return this.negative!==0?-n|0:n},s.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var o=this.ucmp(e);return this.negative!==0?-o|0:o},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var o=0,n=this.length-1;n>=0;n--){var u=this.words[n]|0,l=e.words[n]|0;if(u!==l){u<l?o=-1:u>l&&(o=1);break}}return o},s.prototype.gtn=function(e){return this.cmpn(e)===1},s.prototype.gt=function(e){return this.cmp(e)===1},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return this.cmpn(e)===-1},s.prototype.lt=function(e){return this.cmp(e)===-1},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return this.cmpn(e)===0},s.prototype.eq=function(e){return this.cmp(e)===0},s.red=function(e){return new $(e)},s.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var I={k256:null,p224:null,p192:null,p25519:null};function L(e,o){this.name=e,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},L.prototype.ireduce=function(e){var o=e,n;do this.split(o,this.tmp),o=this.imulK(o),o=o.iadd(this.tmp),n=o.bitLength();while(n>this.n);var u=n<this.n?-1:o.ucmp(this.p);return u===0?(o.words[0]=0,o.length=1):u>0?o.isub(this.p):o.strip!==void 0?o.strip():o._strip(),o},L.prototype.split=function(e,o){e.iushrn(this.n,0,o)},L.prototype.imulK=function(e){return e.imul(this.k)};function P(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}d(P,L),P.prototype.split=function(e,o){for(var n=4194303,u=Math.min(e.length,9),l=0;l<u;l++)o.words[l]=e.words[l];if(o.length=u,e.length<=9){e.words[0]=0,e.length=1;return}var g=e.words[9];for(o.words[o.length++]=g&n,l=10;l<e.length;l++){var y=e.words[l]|0;e.words[l-10]=(y&n)<<4|g>>>22,g=y}g>>>=22,e.words[l-10]=g,g===0&&e.length>10?e.length-=10:e.length-=9},P.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var o=0,n=0;n<e.length;n++){var u=e.words[n]|0;o+=u*977,e.words[n]=o&67108863,o=u*64+(o/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function H(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}d(H,L);function W(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}d(W,L);function q(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}d(q,L),q.prototype.imulK=function(e){for(var o=0,n=0;n<e.length;n++){var u=(e.words[n]|0)*19+o,l=u&67108863;u>>>=26,e.words[n]=l,o=u}return o!==0&&(e.words[e.length++]=o),e},s._prime=function(e){if(I[e])return I[e];var o;if(e==="k256")o=new P;else if(e==="p224")o=new H;else if(e==="p192")o=new W;else if(e==="p25519")o=new q;else throw new Error("Unknown prime "+e);return I[e]=o,o};function $(e){if(typeof e=="string"){var o=s._prime(e);this.m=o.p,this.prime=o}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}$.prototype._verify1=function(e){a(e.negative===0,"red works only with positives"),a(e.red,"red works only with red numbers")},$.prototype._verify2=function(e,o){a((e.negative|o.negative)===0,"red works only with positives"),a(e.red&&e.red===o.red,"red works only with red numbers")},$.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},$.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},$.prototype.add=function(e,o){this._verify2(e,o);var n=e.add(o);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},$.prototype.iadd=function(e,o){this._verify2(e,o);var n=e.iadd(o);return n.cmp(this.m)>=0&&n.isub(this.m),n},$.prototype.sub=function(e,o){this._verify2(e,o);var n=e.sub(o);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},$.prototype.isub=function(e,o){this._verify2(e,o);var n=e.isub(o);return n.cmpn(0)<0&&n.iadd(this.m),n},$.prototype.shl=function(e,o){return this._verify1(e),this.imod(e.ushln(o))},$.prototype.imul=function(e,o){return this._verify2(e,o),this.imod(e.imul(o))},$.prototype.mul=function(e,o){return this._verify2(e,o),this.imod(e.mul(o))},$.prototype.isqr=function(e){return this.imul(e,e.clone())},$.prototype.sqr=function(e){return this.mul(e,e)},$.prototype.sqrt=function(e){if(e.isZero())return e.clone();var o=this.m.andln(3);if(a(o%2===1),o===3){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);a(!u.isZero());var g=new s(1).toRed(this),y=g.redNeg(),c=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new s(2*i*i).toRed(this);this.pow(i,c).cmp(y)!==0;)i.redIAdd(y);for(var f=this.pow(i,u),E=this.pow(e,u.addn(1).iushrn(1)),j=this.pow(e,u),D=l;j.cmp(g)!==0;){for(var V=j,Q=0;V.cmp(g)!==0;Q++)V=V.redSqr();a(Q<D);var Z=this.pow(f,new s(1).iushln(D-Q-1));E=E.redMul(Z),f=Z.redSqr(),j=j.redMul(f),D=Q}return E},$.prototype.invm=function(e){var o=e._invmp(this.m);return o.negative!==0?(o.negative=0,this.imod(o).redNeg()):this.imod(o)},$.prototype.pow=function(e,o){if(o.isZero())return new s(1).toRed(this);if(o.cmpn(1)===0)return e.clone();var n=4,u=new Array(1<<n);u[0]=new s(1).toRed(this),u[1]=e;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],e);var g=u[0],y=0,c=0,i=o.bitLength()%26;for(i===0&&(i=26),l=o.length-1;l>=0;l--){for(var f=o.words[l],E=i-1;E>=0;E--){var j=f>>E&1;if(g!==u[0]&&(g=this.sqr(g)),j===0&&y===0){c=0;continue}y<<=1,y|=j,c++,!(c!==n&&(l!==0||E!==0))&&(g=this.mul(g,u[y]),c=0,y=0)}i=26}return g},$.prototype.convertTo=function(e){var o=e.umod(this.m);return o===e?o.clone():o},$.prototype.convertFrom=function(e){var o=e.clone();return o.red=null,o},s.mont=function(e){return new N(e)};function N(e){$.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}d(N,$),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var o=this.imod(e.mul(this.rinv));return o.red=null,o},N.prototype.imul=function(e,o){if(e.isZero()||o.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.mul=function(e,o){if(e.isZero()||o.isZero())return new s(0)._forceRed(this);var n=e.mul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.invm=function(e){var o=this.imod(e._invmp(this.m).mul(this.r2));return o._forceRed(this)}})(t,Lt)}(f0);var Rm=f0.exports,Om={},c0={},hh=Ut,lo=hh.Buffer,Sr={},Ar;for(Ar in hh)hh.hasOwnProperty(Ar)&&(Ar==="SlowBuffer"||Ar==="Buffer"||(Sr[Ar]=hh[Ar]));var fo=Sr.Buffer={};for(Ar in lo)lo.hasOwnProperty(Ar)&&(Ar==="allocUnsafe"||Ar==="allocUnsafeSlow"||(fo[Ar]=lo[Ar]));if(Sr.Buffer.prototype=lo.prototype,(!fo.from||fo.from===Uint8Array.from)&&(fo.from=function(t,r,h){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return lo(t,r,h)}),fo.alloc||(fo.alloc=function(t,r,h){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var a=lo(t);return!r||r.length===0?a.fill(0):typeof h=="string"?a.fill(r,h):a.fill(r),a}),!Sr.kStringMaxLength)try{Sr.kStringMaxLength=Dt.binding("buffer").kStringMaxLength}catch{}Sr.constants||(Sr.constants={MAX_LENGTH:Sr.kMaxLength},Sr.kStringMaxLength&&(Sr.constants.MAX_STRING_LENGTH=Sr.kStringMaxLength));var d0=Sr,uh={};let vM=Ht;function xr(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}uh.Reporter=xr,xr.prototype.isError=function(t){return t instanceof co},xr.prototype.save=function(){let t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},xr.prototype.restore=function(t){let r=this._reporterState;r.obj=t.obj,r.path=r.path.slice(0,t.pathLen)},xr.prototype.enterKey=function(t){return this._reporterState.path.push(t)},xr.prototype.exitKey=function(t){let r=this._reporterState;r.path=r.path.slice(0,t-1)},xr.prototype.leaveKey=function(t,r,h){let a=this._reporterState;this.exitKey(t),a.obj!==null&&(a.obj[r]=h)},xr.prototype.path=function(){return this._reporterState.path.join("/")},xr.prototype.enterObject=function(){let t=this._reporterState,r=t.obj;return t.obj={},r},xr.prototype.leaveObject=function(t){let r=this._reporterState,h=r.obj;return r.obj=t,h},xr.prototype.error=function(t){let r,h=this._reporterState,a=t instanceof co;if(a?r=t:r=new co(h.path.map(function(d){return"["+JSON.stringify(d)+"]"}).join(""),t.message||t,t.stack),!h.options.partial)throw r;return a||h.errors.push(r),r},xr.prototype.wrapResult=function(t){let r=this._reporterState;return r.options.partial?{result:this.isError(t)?null:t,errors:r.errors}:t};function co(t,r){this.path=t,this.rethrow(r)}vM(co,Error),co.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,co),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this};var yn={};let bM=Ht,lh=uh.Reporter,po=d0.Buffer;function kr(t,r){if(lh.call(this,r),!po.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}bM(kr,lh),yn.DecoderBuffer=kr,kr.isDecoderBuffer=function(t){return t instanceof kr?!0:typeof t=="object"&&po.isBuffer(t.base)&&t.constructor.name==="DecoderBuffer"&&typeof t.offset=="number"&&typeof t.length=="number"&&typeof t.save=="function"&&typeof t.restore=="function"&&typeof t.isEmpty=="function"&&typeof t.readUInt8=="function"&&typeof t.skip=="function"&&typeof t.raw=="function"},kr.prototype.save=function(){return{offset:this.offset,reporter:lh.prototype.save.call(this)}},kr.prototype.restore=function(t){let r=new kr(this.base);return r.offset=t.offset,r.length=this.offset,this.offset=t.offset,lh.prototype.restore.call(this,t.reporter),r},kr.prototype.isEmpty=function(){return this.offset===this.length},kr.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},kr.prototype.skip=function(t,r){if(!(this.offset+t<=this.length))return this.error(r||"DecoderBuffer overrun");let h=new kr(this.base);return h._reporterState=this._reporterState,h.offset=this.offset,h.length=this.offset+t,this.offset+=t,h},kr.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)};function mo(t,r){if(Array.isArray(t))this.length=0,this.value=t.map(function(h){return mo.isEncoderBuffer(h)||(h=new mo(h,r)),this.length+=h.length,h},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return r.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=po.byteLength(t);else if(po.isBuffer(t))this.value=t,this.length=t.length;else return r.error("Unsupported type: "+typeof t)}yn.EncoderBuffer=mo,mo.isEncoderBuffer=function(t){return t instanceof mo?!0:typeof t=="object"&&t.constructor.name==="EncoderBuffer"&&typeof t.length=="number"&&typeof t.join=="function"},mo.prototype.join=function(t,r){return t||(t=po.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(h){h.join(t,r),r+=h.length}):(typeof this.value=="number"?t[r]=this.value:typeof this.value=="string"?t.write(this.value,r):po.isBuffer(this.value)&&this.value.copy(t,r),r+=this.length)),t};let wM=uh.Reporter,MM=yn.EncoderBuffer,_M=yn.DecoderBuffer,er=vr,jm=["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"],SM=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(jm),AM=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function he(t,r,h){let a={};this._baseState=a,a.name=h,a.enc=t,a.parent=r||null,a.children=null,a.tag=null,a.args=null,a.reverseArgs=null,a.choice=null,a.optional=!1,a.any=!1,a.obj=!1,a.use=null,a.useDecoder=null,a.key=null,a.default=null,a.explicit=null,a.implicit=null,a.contains=null,a.parent||(a.children=[],this._wrap())}var p0=he;let xM=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];he.prototype.clone=function(){let t=this._baseState,r={};xM.forEach(function(a){r[a]=t[a]});let h=new this.constructor(r.parent);return h._baseState=r,h},he.prototype._wrap=function(){let t=this._baseState;SM.forEach(function(r){this[r]=function(){let h=new this.constructor(this);return t.children.push(h),h[r].apply(h,arguments)}},this)},he.prototype._init=function(t){let r=this._baseState;er(r.parent===null),t.call(this),r.children=r.children.filter(function(h){return h._baseState.parent===this},this),er.equal(r.children.length,1,"Root node can have only one child")},he.prototype._useArgs=function(t){let r=this._baseState,h=t.filter(function(a){return a instanceof this.constructor},this);t=t.filter(function(a){return!(a instanceof this.constructor)},this),h.length!==0&&(er(r.children===null),r.children=h,h.forEach(function(a){a._baseState.parent=this},this)),t.length!==0&&(er(r.args===null),r.args=t,r.reverseArgs=t.map(function(a){if(typeof a!="object"||a.constructor!==Object)return a;let d={};return Object.keys(a).forEach(function(s){s==(s|0)&&(s|=0);let m=a[s];d[m]=s}),d}))},AM.forEach(function(t){he.prototype[t]=function(){let r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}}),jm.forEach(function(t){he.prototype[t]=function(){let r=this._baseState,h=Array.prototype.slice.call(arguments);return er(r.tag===null),r.tag=t,this._useArgs(h),this}}),he.prototype.use=function(t){er(t);let r=this._baseState;return er(r.use===null),r.use=t,this},he.prototype.optional=function(){let t=this._baseState;return t.optional=!0,this},he.prototype.def=function(t){let r=this._baseState;return er(r.default===null),r.default=t,r.optional=!0,this},he.prototype.explicit=function(t){let r=this._baseState;return er(r.explicit===null&&r.implicit===null),r.explicit=t,this},he.prototype.implicit=function(t){let r=this._baseState;return er(r.explicit===null&&r.implicit===null),r.implicit=t,this},he.prototype.obj=function(){let t=this._baseState,r=Array.prototype.slice.call(arguments);return t.obj=!0,r.length!==0&&this._useArgs(r),this},he.prototype.key=function(t){let r=this._baseState;return er(r.key===null),r.key=t,this},he.prototype.any=function(){let t=this._baseState;return t.any=!0,this},he.prototype.choice=function(t){let r=this._baseState;return er(r.choice===null),r.choice=t,this._useArgs(Object.keys(t).map(function(h){return t[h]})),this},he.prototype.contains=function(t){let r=this._baseState;return er(r.use===null),r.contains=t,this},he.prototype._decode=function(t,r){let h=this._baseState;if(h.parent===null)return t.wrapResult(h.children[0]._decode(t,r));let a=h.default,d=!0,s=null;if(h.key!==null&&(s=t.enterKey(h.key)),h.optional){let p=null;if(h.explicit!==null?p=h.explicit:h.implicit!==null?p=h.implicit:h.tag!==null&&(p=h.tag),p===null&&!h.any){let w=t.save();try{h.choice===null?this._decodeGeneric(h.tag,t,r):this._decodeChoice(t,r),d=!0}catch{d=!1}t.restore(w)}else if(d=this._peekTag(t,p,h.any),t.isError(d))return d}let m;if(h.obj&&d&&(m=t.enterObject()),d){if(h.explicit!==null){let w=this._decodeTag(t,h.explicit);if(t.isError(w))return w;t=w}let p=t.offset;if(h.use===null&&h.choice===null){let w;h.any&&(w=t.save());let S=this._decodeTag(t,h.implicit!==null?h.implicit:h.tag,h.any);if(t.isError(S))return S;h.any?a=t.raw(w):t=S}if(r&&r.track&&h.tag!==null&&r.track(t.path(),p,t.length,"tagged"),r&&r.track&&h.tag!==null&&r.track(t.path(),t.offset,t.length,"content"),h.any||(h.choice===null?a=this._decodeGeneric(h.tag,t,r):a=this._decodeChoice(t,r)),t.isError(a))return a;if(!h.any&&h.choice===null&&h.children!==null&&h.children.forEach(function(w){w._decode(t,r)}),h.contains&&(h.tag==="octstr"||h.tag==="bitstr")){let w=new _M(a);a=this._getUse(h.contains,t._reporterState.obj)._decode(w,r)}}return h.obj&&d&&(a=t.leaveObject(m)),h.key!==null&&(a!==null||d===!0)?t.leaveKey(s,h.key,a):s!==null&&t.exitKey(s),a},he.prototype._decodeGeneric=function(t,r,h){let a=this._baseState;return t==="seq"||t==="set"?null:t==="seqof"||t==="setof"?this._decodeList(r,t,a.args[0],h):/str$/.test(t)?this._decodeStr(r,t,h):t==="objid"&&a.args?this._decodeObjid(r,a.args[0],a.args[1],h):t==="objid"?this._decodeObjid(r,null,null,h):t==="gentime"||t==="utctime"?this._decodeTime(r,t,h):t==="null_"?this._decodeNull(r,h):t==="bool"?this._decodeBool(r,h):t==="objDesc"?this._decodeStr(r,t,h):t==="int"||t==="enum"?this._decodeInt(r,a.args&&a.args[0],h):a.use!==null?this._getUse(a.use,r._reporterState.obj)._decode(r,h):r.error("unknown tag: "+t)},he.prototype._getUse=function(t,r){let h=this._baseState;return h.useDecoder=this._use(t,r),er(h.useDecoder._baseState.parent===null),h.useDecoder=h.useDecoder._baseState.children[0],h.implicit!==h.useDecoder._baseState.implicit&&(h.useDecoder=h.useDecoder.clone(),h.useDecoder._baseState.implicit=h.implicit),h.useDecoder},he.prototype._decodeChoice=function(t,r){let h=this._baseState,a=null,d=!1;return Object.keys(h.choice).some(function(s){let m=t.save(),p=h.choice[s];try{let w=p._decode(t,r);if(t.isError(w))return!1;a={type:s,value:w},d=!0}catch{return t.restore(m),!1}return!0},this),d?a:t.error("Choice not matched")},he.prototype._createEncoderBuffer=function(t){return new MM(t,this.reporter)},he.prototype._encode=function(t,r,h){let a=this._baseState;if(a.default!==null&&a.default===t)return;let d=this._encodeValue(t,r,h);if(d!==void 0&&!this._skipDefault(d,r,h))return d},he.prototype._encodeValue=function(t,r,h){let a=this._baseState;if(a.parent===null)return a.children[0]._encode(t,r||new wM);let d=null;if(this.reporter=r,a.optional&&t===void 0)if(a.default!==null)t=a.default;else return;let s=null,m=!1;if(a.any)d=this._createEncoderBuffer(t);else if(a.choice)d=this._encodeChoice(t,r);else if(a.contains)s=this._getUse(a.contains,h)._encode(t,r),m=!0;else if(a.children)s=a.children.map(function(p){if(p._baseState.tag==="null_")return p._encode(null,r,t);if(p._baseState.key===null)return r.error("Child should have a key");let w=r.enterKey(p._baseState.key);if(typeof t!="object")return r.error("Child expected, but input is not object");let S=p._encode(t[p._baseState.key],r,t);return r.leaveKey(w),S},this).filter(function(p){return p}),s=this._createEncoderBuffer(s);else if(a.tag==="seqof"||a.tag==="setof"){if(!(a.args&&a.args.length===1))return r.error("Too many args for : "+a.tag);if(!Array.isArray(t))return r.error("seqof/setof, but data is not Array");let p=this.clone();p._baseState.implicit=null,s=this._createEncoderBuffer(t.map(function(w){let S=this._baseState;return this._getUse(S.args[0],t)._encode(w,r)},p))}else a.use!==null?d=this._getUse(a.use,h)._encode(t,r):(s=this._encodePrimitive(a.tag,t),m=!0);if(!a.any&&a.choice===null){let p=a.implicit!==null?a.implicit:a.tag,w=a.implicit===null?"universal":"context";p===null?a.use===null&&r.error("Tag could be omitted only for .use()"):a.use===null&&(d=this._encodeComposite(p,m,w,s))}return a.explicit!==null&&(d=this._encodeComposite(a.explicit,!1,"context",d)),d},he.prototype._encodeChoice=function(t,r){let h=this._baseState,a=h.choice[t.type];return a||er(!1,t.type+" not found in "+JSON.stringify(Object.keys(h.choice))),a._encode(t.value,r)},he.prototype._encodePrimitive=function(t,r){let h=this._baseState;if(/str$/.test(t))return this._encodeStr(r,t);if(t==="objid"&&h.args)return this._encodeObjid(r,h.reverseArgs[0],h.args[1]);if(t==="objid")return this._encodeObjid(r,null,null);if(t==="gentime"||t==="utctime")return this._encodeTime(r,t);if(t==="null_")return this._encodeNull();if(t==="int"||t==="enum")return this._encodeInt(r,h.args&&h.reverseArgs[0]);if(t==="bool")return this._encodeBool(r);if(t==="objDesc")return this._encodeStr(r,t);throw new Error("Unsupported tag: "+t)},he.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},he.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)};var fh={};(function(t){function r(h){let a={};return Object.keys(h).forEach(function(d){(d|0)==d&&(d=d|0);let s=h[d];a[s]=d}),a}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.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"},t.tagByName=r(t.tag)})(fh);let kM=Ht,Ai=d0.Buffer,Cm=p0,m0=fh;function Im(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Tr,this.tree._init(t.body)}var Bm=Im;Im.prototype.encode=function(t,r){return this.tree._encode(t,r).join()};function Tr(t){Cm.call(this,"der",t)}kM(Tr,Cm),Tr.prototype._encodeComposite=function(t,r,h,a){let d=EM(t,r,h,this.reporter);if(a.length<128){let p=Ai.alloc(2);return p[0]=d,p[1]=a.length,this._createEncoderBuffer([p,a])}let s=1;for(let p=a.length;p>=256;p>>=8)s++;let m=Ai.alloc(1+1+s);m[0]=d,m[1]=128|s;for(let p=1+s,w=a.length;w>0;p--,w>>=8)m[p]=w&255;return this._createEncoderBuffer([m,a])},Tr.prototype._encodeStr=function(t,r){if(r==="bitstr")return this._createEncoderBuffer([t.unused|0,t.data]);if(r==="bmpstr"){let h=Ai.alloc(t.length*2);for(let a=0;a<t.length;a++)h.writeUInt16BE(t.charCodeAt(a),a*2);return this._createEncoderBuffer(h)}else return r==="numstr"?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(t)?this._createEncoderBuffer(t):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(r)?this._createEncoderBuffer(t):r==="objDesc"?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+r+" unsupported")},Tr.prototype._encodeObjid=function(t,r,h){if(typeof t=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=r[t].split(/[\s.]+/g);for(let m=0;m<t.length;m++)t[m]|=0}else if(Array.isArray(t)){t=t.slice();for(let m=0;m<t.length;m++)t[m]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!h){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,t[0]*40+t[1])}let a=0;for(let m=0;m<t.length;m++){let p=t[m];for(a++;p>=128;p>>=7)a++}let d=Ai.alloc(a),s=d.length-1;for(let m=t.length-1;m>=0;m--){let p=t[m];for(d[s--]=p&127;(p>>=7)>0;)d[s--]=128|p&127}return this._createEncoderBuffer(d)};function Er(t){return t<10?"0"+t:t}Tr.prototype._encodeTime=function(t,r){let h,a=new Date(t);return r==="gentime"?h=[Er(a.getUTCFullYear()),Er(a.getUTCMonth()+1),Er(a.getUTCDate()),Er(a.getUTCHours()),Er(a.getUTCMinutes()),Er(a.getUTCSeconds()),"Z"].join(""):r==="utctime"?h=[Er(a.getUTCFullYear()%100),Er(a.getUTCMonth()+1),Er(a.getUTCDate()),Er(a.getUTCHours()),Er(a.getUTCMinutes()),Er(a.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(h,"octstr")},Tr.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Tr.prototype._encodeInt=function(t,r){if(typeof t=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=r[t]}if(typeof t!="number"&&!Ai.isBuffer(t)){let d=t.toArray();!t.sign&&d[0]&128&&d.unshift(0),t=Ai.from(d)}if(Ai.isBuffer(t)){let d=t.length;t.length===0&&d++;let s=Ai.alloc(d);return t.copy(s),t.length===0&&(s[0]=0),this._createEncoderBuffer(s)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let h=1;for(let d=t;d>=256;d>>=8)h++;let a=new Array(h);for(let d=a.length-1;d>=0;d--)a[d]=t&255,t>>=8;return a[0]&128&&a.unshift(0),this._createEncoderBuffer(Ai.from(a))},Tr.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},Tr.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getEncoder("der").tree},Tr.prototype._skipDefault=function(t,r,h){let a=this._baseState,d;if(a.default===null)return!1;let s=t.join();if(a.defaultBuffer===void 0&&(a.defaultBuffer=this._encodeValue(a.default,r,h).join()),s.length!==a.defaultBuffer.length)return!1;for(d=0;d<s.length;d++)if(s[d]!==a.defaultBuffer[d])return!1;return!0};function EM(t,r,h,a){let d;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),m0.tagByName.hasOwnProperty(t))d=m0.tagByName[t];else if(typeof t=="number"&&(t|0)===t)d=t;else return a.error("Unknown tag: "+t);return d>=31?a.error("Multi-octet tag encoding unsupported"):(r||(d|=32),d|=m0.tagClassByName[h||"universal"]<<6,d)}let RM=Ht,g0=Bm;function y0(t){g0.call(this,t),this.enc="pem"}RM(y0,g0);var OM=y0;y0.prototype.encode=function(t,r){let h=g0.prototype.encode.call(this,t).toString("base64"),a=["-----BEGIN "+r.label+"-----"];for(let d=0;d<h.length;d+=64)a.push(h.slice(d,d+64));return a.push("-----END "+r.label+"-----"),a.join(`
`)},function(t){let r=t;r.der=Bm,r.pem=OM}(c0);var v0={};let jM=Ht,CM=Rm,Lm=yn.DecoderBuffer,Um=p0,qm=fh;function $m(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new cr,this.tree._init(t.body)}var Tm=$m;$m.prototype.decode=function(t,r){return Lm.isDecoderBuffer(t)||(t=new Lm(t,r)),this.tree._decode(t,r)};function cr(t){Um.call(this,"der",t)}jM(cr,Um),cr.prototype._peekTag=function(t,r,h){if(t.isEmpty())return!1;let a=t.save(),d=b0(t,'Failed to peek tag: "'+r+'"');return t.isError(d)?d:(t.restore(a),d.tag===r||d.tagStr===r||d.tagStr+"of"===r||h)},cr.prototype._decodeTag=function(t,r,h){let a=b0(t,'Failed to decode tag of "'+r+'"');if(t.isError(a))return a;let d=Dm(t,a.primitive,'Failed to get length of "'+r+'"');if(t.isError(d))return d;if(!h&&a.tag!==r&&a.tagStr!==r&&a.tagStr+"of"!==r)return t.error('Failed to match tag: "'+r+'"');if(a.primitive||d!==null)return t.skip(d,'Failed to match body of: "'+r+'"');let s=t.save(),m=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(m)?m:(d=t.offset-s.offset,t.restore(s),t.skip(d,'Failed to match body of: "'+r+'"'))},cr.prototype._skipUntilEnd=function(t,r){for(;;){let h=b0(t,r);if(t.isError(h))return h;let a=Dm(t,h.primitive,r);if(t.isError(a))return a;let d;if(h.primitive||a!==null?d=t.skip(a):d=this._skipUntilEnd(t,r),t.isError(d))return d;if(h.tagStr==="end")break}},cr.prototype._decodeList=function(t,r,h,a){let d=[];for(;!t.isEmpty();){let s=this._peekTag(t,"end");if(t.isError(s))return s;let m=h.decode(t,"der",a);if(t.isError(m)&&s)break;d.push(m)}return d},cr.prototype._decodeStr=function(t,r){if(r==="bitstr"){let h=t.readUInt8();return t.isError(h)?h:{unused:h,data:t.raw()}}else if(r==="bmpstr"){let h=t.raw();if(h.length%2===1)return t.error("Decoding of string type: bmpstr length mismatch");let a="";for(let d=0;d<h.length/2;d++)a+=String.fromCharCode(h.readUInt16BE(d*2));return a}else if(r==="numstr"){let h=t.raw().toString("ascii");return this._isNumstr(h)?h:t.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr"||r==="objDesc")return t.raw();if(r==="printstr"){let h=t.raw().toString("ascii");return this._isPrintstr(h)?h:t.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?t.raw().toString():t.error("Decoding of string type: "+r+" unsupported")}},cr.prototype._decodeObjid=function(t,r,h){let a,d=[],s=0,m=0;for(;!t.isEmpty();)m=t.readUInt8(),s<<=7,s|=m&127,m&128||(d.push(s),s=0);m&128&&d.push(s);let p=d[0]/40|0,w=d[0]%40;if(h?a=d:a=[p,w].concat(d.slice(1)),r){let S=r[a.join(" ")];S===void 0&&(S=r[a.join(".")]),S!==void 0&&(a=S)}return a},cr.prototype._decodeTime=function(t,r){let h=t.raw().toString(),a,d,s,m,p,w;if(r==="gentime")a=h.slice(0,4)|0,d=h.slice(4,6)|0,s=h.slice(6,8)|0,m=h.slice(8,10)|0,p=h.slice(10,12)|0,w=h.slice(12,14)|0;else if(r==="utctime")a=h.slice(0,2)|0,d=h.slice(2,4)|0,s=h.slice(4,6)|0,m=h.slice(6,8)|0,p=h.slice(8,10)|0,w=h.slice(10,12)|0,a<70?a=2e3+a:a=1900+a;else return t.error("Decoding "+r+" time is not supported yet");return Date.UTC(a,d-1,s,m,p,w,0)},cr.prototype._decodeNull=function(){return null},cr.prototype._decodeBool=function(t){let r=t.readUInt8();return t.isError(r)?r:r!==0},cr.prototype._decodeInt=function(t,r){let h=t.raw(),a=new CM(h);return r&&(a=r[a.toString(10)]||a),a},cr.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getDecoder("der").tree};function b0(t,r){let h=t.readUInt8(r);if(t.isError(h))return h;let a=qm.tagClass[h>>6],d=(h&32)===0;if((h&31)===31){let m=h;for(h=0;(m&128)===128;){if(m=t.readUInt8(r),t.isError(m))return m;h<<=7,h|=m&127}}else h&=31;let s=qm.tag[h];return{cls:a,primitive:d,tag:h,tagStr:s}}function Dm(t,r,h){let a=t.readUInt8(h);if(t.isError(a))return a;if(!r&&a===128)return null;if(!(a&128))return a;let d=a&127;if(d>4)return t.error("length octect is too long");a=0;for(let s=0;s<d;s++){a<<=8;let m=t.readUInt8(h);if(t.isError(m))return m;a|=m}return a}let IM=Ht,BM=d0.Buffer,w0=Tm;function M0(t){w0.call(this,t),this.enc="pem"}IM(M0,w0);var LM=M0;M0.prototype.decode=function(t,r){let h=t.toString().split(/[\r\n]+/g),a=r.label.toUpperCase(),d=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,m=-1;for(let S=0;S<h.length;S++){let A=h[S].match(d);if(A!==null&&A[2]===a)if(s===-1){if(A[1]!=="BEGIN")break;s=S}else{if(A[1]!=="END")break;m=S;break}}if(s===-1||m===-1)throw new Error("PEM section not found for: "+a);let p=h.slice(s+1,m).join("");p.replace(/[^a-z0-9+/=]+/gi,"");let w=BM.from(p,"base64");return w0.prototype.decode.call(this,w,r)},function(t){let r=t;r.der=Tm,r.pem=LM}(v0),function(t){let r=c0,h=v0,a=Ht,d=t;d.define=function(m,p){return new s(m,p)};function s(m,p){this.name=m,this.body=p,this.decoders={},this.encoders={}}s.prototype._createNamed=function(m){let p=this.name;function w(S){this._initNamed(S,p)}return a(w,m),w.prototype._initNamed=function(S,A){m.call(this,S,A)},new w(this)},s.prototype._getDecoder=function(m){return m=m||"der",this.decoders.hasOwnProperty(m)||(this.decoders[m]=this._createNamed(h[m])),this.decoders[m]},s.prototype.decode=function(m,p,w){return this._getDecoder(p).decode(m,w)},s.prototype._getEncoder=function(m){return m=m||"der",this.encoders.hasOwnProperty(m)||(this.encoders[m]=this._createNamed(r[m])),this.encoders[m]},s.prototype.encode=function(m,p,w){return this._getEncoder(p).encode(m,w)}}(Om);var Pm={};(function(t){let r=t;r.Reporter=uh.Reporter,r.DecoderBuffer=yn.DecoderBuffer,r.EncoderBuffer=yn.EncoderBuffer,r.Node=p0})(Pm);var Nm={};(function(t){let r=t;r._reverse=function(h){let a={};return Object.keys(h).forEach(function(d){(d|0)==d&&(d=d|0);let s=h[d];a[s]=d}),a},r.der=fh})(Nm),function(t){let r=t;r.bignum=Rm,r.define=Om.define,r.base=Pm,r.constants=Nm,r.decoders=v0,r.encoders=c0}(l0);var Dr=l0,zm=Dr.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),UM=Dr.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),_0=Dr.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),qM=Dr.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(_0),this.key("subjectPublicKey").bitstr())}),$M=Dr.define("RelativeDistinguishedName",function(){this.setof(UM)}),TM=Dr.define("RDNSequence",function(){this.seqof($M)}),Fm=Dr.define("Name",function(){this.choice({rdnSequence:this.use(TM)})}),DM=Dr.define("Validity",function(){this.seq().obj(this.key("notBefore").use(zm),this.key("notAfter").use(zm))}),PM=Dr.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),NM=Dr.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(_0),this.key("issuer").use(Fm),this.key("validity").use(DM),this.key("subject").use(Fm),this.key("subjectPublicKeyInfo").use(qM),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(PM).optional())}),zM=Dr.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(NM),this.key("signatureAlgorithm").use(_0),this.key("signatureValue").bitstr())}),FM=zM,Pr=l0;$r.certificate=FM;var VM=Pr.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())});$r.RSAPrivateKey=VM;var HM=Pr.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});$r.RSAPublicKey=HM;var WM=Pr.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Vm),this.key("subjectPublicKey").bitstr())});$r.PublicKey=WM;var Vm=Pr.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())}),ZM=Pr.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(Vm),this.key("subjectPrivateKey").octstr())});$r.PrivateKey=ZM;var KM=Pr.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())});$r.EncryptedPrivateKey=KM;var JM=Pr.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())});$r.DSAPrivateKey=JM,$r.DSAparam=Pr.define("DSAparam",function(){this.int()});var QM=Pr.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(XM),this.key("publicKey").optional().explicit(1).bitstr())});$r.ECPrivateKey=QM;var XM=Pr.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});$r.signature=Pr.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())});let GM={"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 YM=/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,t_=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,e_=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,r_=Ha,i_=lr,ch=Zt.Buffer,n_=function(t,r){var h=t.toString(),a=h.match(YM),d;if(a){var s="aes"+a[1],m=ch.from(a[2],"hex"),p=ch.from(a[3].replace(/[\r\n]/g,""),"base64"),w=r_(r,m.slice(0,8),parseInt(a[1],10)).key,S=[],A=i_.createDecipheriv(s,w,m);S.push(A.update(p)),S.push(A.final()),d=ch.concat(S)}else{var v=h.match(e_);d=ch.from(v[2].replace(/[\r\n]/g,""),"base64")}var _=h.match(t_)[1];return{tag:_,data:d}},hr=$r,o_=GM,s_=n_,a_=lr,h_=La,S0=Zt.Buffer,dh=Hm;function Hm(t){var r;typeof t=="object"&&!S0.isBuffer(t)&&(r=t.passphrase,t=t.key),typeof t=="string"&&(t=S0.from(t));var h=s_(t,r),a=h.tag,d=h.data,s,m;switch(a){case"CERTIFICATE":m=hr.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(m||(m=hr.PublicKey.decode(d,"der")),s=m.algorithm.algorithm.join("."),s){case"1.2.840.113549.1.1.1":return hr.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=hr.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw new Error("unknown key id "+s)}case"ENCRYPTED PRIVATE KEY":d=hr.EncryptedPrivateKey.decode(d,"der"),d=u_(d,r);case"PRIVATE KEY":switch(m=hr.PrivateKey.decode(d,"der"),s=m.algorithm.algorithm.join("."),s){case"1.2.840.113549.1.1.1":return hr.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:hr.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=hr.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw new Error("unknown key id "+s)}case"RSA PUBLIC KEY":return hr.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return hr.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:hr.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return d=hr.ECPrivateKey.decode(d,"der"),{curve:d.parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+a)}}Hm.signature=hr.signature;function u_(t,r){var h=t.algorithm.decrypt.kde.kdeparams.salt,a=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),d=o_[t.algorithm.decrypt.cipher.algo.join(".")],s=t.algorithm.decrypt.cipher.iv,m=t.subjectPrivateKey,p=parseInt(d.split("-")[1],10)/8,w=h_.pbkdf2Sync(r,h,a,p,"sha1"),S=a_.createDecipheriv(d,w,s),A=[];return A.push(S.update(m)),A.push(S.final()),S0.concat(A)}let Wm={"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 Zm;function l_(){if(Zm)return fs.exports;Zm=1;var t=Zt.Buffer,r=Tp,h=Kl,a=u0().ec,d=Zl,s=dh,m=Wm,p=1;function w(k,R,I,L,P){var H=s(R);if(H.curve){if(L!=="ecdsa"&&L!=="ecdsa/rsa")throw new Error("wrong private key type");return S(k,H)}else if(H.type==="dsa"){if(L!=="dsa")throw new Error("wrong private key type");return A(k,H,I)}if(L!=="rsa"&&L!=="ecdsa/rsa")throw new Error("wrong private key type");if(R.padding!==void 0&&R.padding!==p)throw new Error("illegal or unsupported padding mode");k=t.concat([P,k]);for(var W=H.modulus.byteLength(),q=[0,1];k.length+q.length+1<W;)q.push(255);q.push(0);for(var $=-1;++$<k.length;)q.push(k[$]);var N=h(q,H);return N}function S(k,R){var I=m[R.curve.join(".")];if(!I)throw new Error("unknown curve "+R.curve.join("."));var L=new a(I),P=L.keyFromPrivate(R.privateKey),H=P.sign(k);return t.from(H.toDER())}function A(k,R,I){for(var L=R.params.priv_key,P=R.params.p,H=R.params.q,W=R.params.g,q=new d(0),$,N=x(k,H).mod(H),e=!1,o=_(L,H,k,I);e===!1;)$=M(H,o,I),q=O(W,$,P,H),e=$.invm(H).imul(N.add(L.mul(q))).mod(H),e.cmpn(0)===0&&(e=!1,q=new d(0));return v(q,e)}function v(k,R){k=k.toArray(),R=R.toArray(),k[0]&128&&(k=[0].concat(k)),R[0]&128&&(R=[0].concat(R));var I=k.length+R.length+4,L=[48,I,2,k.length];return L=L.concat(k,[2,R.length],R),t.from(L)}function _(k,R,I,L){if(k=t.from(k.toArray()),k.length<R.byteLength()){var P=t.alloc(R.byteLength()-k.length);k=t.concat([P,k])}var H=I.length,W=b(I,R),q=t.alloc(H);q.fill(1);var $=t.alloc(H);return $=r(L,$).update(q).update(t.from([0])).update(k).update(W).digest(),q=r(L,$).update(q).digest(),$=r(L,$).update(q).update(t.from([1])).update(k).update(W).digest(),q=r(L,$).update(q).digest(),{k:$,v:q}}function x(k,R){var I=new d(k),L=(k.length<<3)-R.bitLength();return L>0&&I.ishrn(L),I}function b(k,R){k=x(k,R),k=k.mod(R);var I=t.from(k.toArray());if(I.length<R.byteLength()){var L=t.alloc(R.byteLength()-I.length);I=t.concat([L,I])}return I}function M(k,R,I){var L,P;do{for(L=t.alloc(0);L.length*8<k.bitLength();)R.v=r(I,R.k).update(R.v).digest(),L=t.concat([L,R.v]);P=x(L,k),R.k=r(I,R.k).update(R.v).update(t.from([0])).digest(),R.v=r(I,R.k).update(R.v).digest()}while(P.cmp(k)!==-1);return P}function O(k,R,I,L){return k.toRed(d.mont(I)).redPow(R).fromRed().mod(L)}return fs.exports=w,fs.exports.getKey=_,fs.exports.makeKey=M,fs.exports}var A0,Km;function f_(){if(Km)return A0;Km=1;var t=Zt.Buffer,r=Zl,h=u0().ec,a=dh,d=Wm;function s(S,A,v,_,x){var b=a(v);if(b.type==="ec"){if(_!=="ecdsa"&&_!=="ecdsa/rsa")throw new Error("wrong public key type");return m(S,A,b)}else if(b.type==="dsa"){if(_!=="dsa")throw new Error("wrong public key type");return p(S,A,b)}if(_!=="rsa"&&_!=="ecdsa/rsa")throw new Error("wrong public key type");A=t.concat([x,A]);for(var M=b.modulus.byteLength(),O=[1],k=0;A.length+O.length+2<M;)O.push(255),k+=1;O.push(0);for(var R=-1;++R<A.length;)O.push(A[R]);O=t.from(O);var I=r.mont(b.modulus);S=new r(S).toRed(I),S=S.redPow(new r(b.publicExponent)),S=t.from(S.fromRed().toArray());var L=k<8?1:0;for(M=Math.min(S.length,O.length),S.length!==O.length&&(L=1),R=-1;++R<M;)L|=S[R]^O[R];return L===0}function m(S,A,v){var _=d[v.data.algorithm.curve.join(".")];if(!_)throw new Error("unknown curve "+v.data.algorithm.curve.join("."));var x=new h(_),b=v.data.subjectPrivateKey.data;return x.verify(A,S,b)}function p(S,A,v){var _=v.data.p,x=v.data.q,b=v.data.g,M=v.data.pub_key,O=a.signature.decode(S,"der"),k=O.s,R=O.r;w(k,x),w(R,x);var I=r.mont(_),L=k.invm(x),P=b.toRed(I).redPow(new r(A).mul(L).mod(x)).fromRed().mul(M.toRed(I).redPow(R.mul(L).mod(x)).fromRed()).mod(_).mod(x);return P.cmp(R)===0}function w(S,A){if(S.cmpn(0)<=0)throw new Error("invalid sig");if(S.cmp(A)>=0)throw new Error("invalid sig")}return A0=s,A0}var x0,Jm;function c_(){if(Jm)return x0;Jm=1;var t=Zt.Buffer,r=ts,h=up,a=Ht,d=l_(),s=f_(),m=Dp;Object.keys(m).forEach(function(v){m[v].id=t.from(m[v].id,"hex"),m[v.toLowerCase()]=m[v]});function p(v){h.Writable.call(this);var _=m[v];if(!_)throw new Error("Unknown message digest");this._hashType=_.hash,this._hash=r(_.hash),this._tag=_.id,this._signType=_.sign}a(p,h.Writable),p.prototype._write=function(v,_,x){this._hash.update(v),x()},p.prototype.update=function(v,_){return this._hash.update(typeof v=="string"?t.from(v,_):v),this},p.prototype.sign=function(v,_){this.end();var x=this._hash.digest(),b=d(x,v,this._hashType,this._signType,this._tag);return _?b.toString(_):b};function w(v){h.Writable.call(this);var _=m[v];if(!_)throw new Error("Unknown message digest");this._hash=r(_.hash),this._tag=_.id,this._signType=_.sign}a(w,h.Writable),w.prototype._write=function(v,_,x){this._hash.update(v),x()},w.prototype.update=function(v,_){return this._hash.update(typeof v=="string"?t.from(v,_):v),this},w.prototype.verify=function(v,_,x){var b=typeof _=="string"?t.from(_,x):_;this.end();var M=this._hash.digest();return s(b,M,v,this._signType,this._tag)};function S(v){return new p(v)}function A(v){return new w(v)}return x0={Sign:S,Verify:A,createSign:S,createVerify:A},x0}var k0={exports:{}};k0.exports,function(t){(function(r,h){function a(e,o){if(!e)throw new Error(o||"Assertion failed")}function d(e,o){e.super_=o;var n=function(){};n.prototype=o.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,o,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((o==="le"||o==="be")&&(n=o,o=10),this._init(e||0,o||10,n||"be"))}typeof r=="object"?r.exports=s:h.BN=s,s.BN=s,s.wordSize=26;var m;try{typeof window<"u"&&typeof window.Buffer<"u"?m=window.Buffer:m=Ut.Buffer}catch{}s.isBN=function(e){return e instanceof s?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,o){return e.cmp(o)>0?e:o},s.min=function(e,o){return e.cmp(o)<0?e:o},s.prototype._init=function(e,o,n){if(typeof e=="number")return this._initNumber(e,o,n);if(typeof e=="object")return this._initArray(e,o,n);o==="hex"&&(o=16),a(o===(o|0)&&o>=2&&o<=36),e=e.toString().replace(/\s+/g,"");var u=0;e[0]==="-"&&(u++,this.negative=1),u<e.length&&(o===16?this._parseHex(e,u,n):(this._parseBase(e,o,u),n==="le"&&this._initArray(this.toArray(),o,n)))},s.prototype._initNumber=function(e,o,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):(a(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),o,n)},s.prototype._initArray=function(e,o,n){if(a(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 u=0;u<this.length;u++)this.words[u]=0;var l,g,y=0;if(n==="be")for(u=e.length-1,l=0;u>=0;u-=3)g=e[u]|e[u-1]<<8|e[u-2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);else if(n==="le")for(u=0,l=0;u<e.length;u+=3)g=e[u]|e[u+1]<<8|e[u+2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);return this.strip()};function p(e,o){var n=e.charCodeAt(o);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function w(e,o,n){var u=p(e,n);return n-1>=o&&(u|=p(e,n-1)<<4),u}s.prototype._parseHex=function(e,o,n){this.length=Math.ceil((e.length-o)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,g=0,y;if(n==="be")for(u=e.length-1;u>=o;u-=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8;else{var c=e.length-o;for(u=c%2===0?o+1:o;u<e.length;u+=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8}this.strip()};function S(e,o,n,u){for(var l=0,g=Math.min(e.length,n),y=o;y<g;y++){var c=e.charCodeAt(y)-48;l*=u,c>=49?l+=c-49+10:c>=17?l+=c-17+10:l+=c}return l}s.prototype._parseBase=function(e,o,n){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=o)u++;u--,l=l/o|0;for(var g=e.length-n,y=g%u,c=Math.min(g,g-y)+n,i=0,f=n;f<c;f+=u)i=S(e,f,f+u,o),this.imuln(l),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(y!==0){var E=1;for(i=S(e,f,e.length,o),f=0;f<y;f++)E*=o;this.imuln(E),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var o=0;o<this.length;o++)e.words[o]=this.words[o];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[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],_=[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];s.prototype.toString=function(e,o){e=e||10,o=o|0||1;var n;if(e===16||e==="hex"){n="";for(var u=0,l=0,g=0;g<this.length;g++){var y=this.words[g],c=((y<<u|l)&16777215).toString(16);l=y>>>24-u&16777215,l!==0||g!==this.length-1?n=A[6-c.length]+c+n:n=c+n,u+=2,u>=26&&(u-=26,g--)}for(l!==0&&(n=l.toString(16)+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var i=v[e],f=_[e];n="";var E=this.clone();for(E.negative=0;!E.isZero();){var j=E.modn(f).toString(e);E=E.idivn(f),E.isZero()?n=j+n:n=A[i-j.length]+j+n}for(this.isZero()&&(n="0"+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},s.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&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,o){return a(typeof m<"u"),this.toArrayLike(m,e,o)},s.prototype.toArray=function(e,o){return this.toArrayLike(Array,e,o)},s.prototype.toArrayLike=function(e,o,n){var u=this.byteLength(),l=n||Math.max(1,u);a(u<=l,"byte array longer than desired length"),a(l>0,"Requested array length <= 0"),this.strip();var g=o==="le",y=new e(l),c,i,f=this.clone();if(g){for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[i]=c;for(;i<l;i++)y[i]=0}else{for(i=0;i<l-u;i++)y[i]=0;for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[l-i-1]=c}return y},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var o=e,n=0;return o>=4096&&(n+=13,o>>>=13),o>=64&&(n+=7,o>>>=7),o>=8&&(n+=4,o>>>=4),o>=2&&(n+=2,o>>>=2),n+o},s.prototype._zeroBits=function(e){if(e===0)return 26;var o=e,n=0;return o&8191||(n+=13,o>>>=13),o&127||(n+=7,o>>>=7),o&15||(n+=4,o>>>=4),o&3||(n+=2,o>>>=2),o&1||n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],o=this._countBits(e);return(this.length-1)*26+o};function x(e){for(var o=new Array(e.bitLength()),n=0;n<o.length;n++){var u=n/26|0,l=n%26;o[n]=(e.words[u]&1<<l)>>>l}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,o=0;o<this.length;o++){var n=this._zeroBits(this.words[o]);if(e+=n,n!==26)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var o=0;o<e.length;o++)this.words[o]=this.words[o]|e.words[o];return this.strip()},s.prototype.ior=function(e){return a((this.negative|e.negative)===0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var o;this.length>e.length?o=e:o=this;for(var n=0;n<o.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=o.length,this.strip()},s.prototype.iand=function(e){return a((this.negative|e.negative)===0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var o,n;this.length>e.length?(o=this,n=e):(o=e,n=this);for(var u=0;u<n.length;u++)this.words[u]=o.words[u]^n.words[u];if(this!==o)for(;u<o.length;u++)this.words[u]=o.words[u];return this.length=o.length,this.strip()},s.prototype.ixor=function(e){return a((this.negative|e.negative)===0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){a(typeof e=="number"&&e>=0);var o=Math.ceil(e/26)|0,n=e%26;this._expand(o),n>0&&o--;for(var u=0;u<o;u++)this.words[u]=~this.words[u]&67108863;return n>0&&(this.words[u]=~this.words[u]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,o){a(typeof e=="number"&&e>=0);var n=e/26|0,u=e%26;return this._expand(n+1),o?this.words[n]=this.words[n]|1<<u:this.words[n]=this.words[n]&~(1<<u),this.strip()},s.prototype.iadd=function(e){var o;if(this.negative!==0&&e.negative===0)return this.negative=0,o=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,o=this.isub(e),e.negative=1,o._normSign();var n,u;this.length>e.length?(n=this,u=e):(n=e,u=this);for(var l=0,g=0;g<u.length;g++)o=(n.words[g]|0)+(u.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;for(;l!==0&&g<n.length;g++)o=(n.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;if(this.length=n.length,l!==0)this.words[this.length]=l,this.length++;else if(n!==this)for(;g<n.length;g++)this.words[g]=n.words[g];return this},s.prototype.add=function(e){var o;return e.negative!==0&&this.negative===0?(e.negative=0,o=this.sub(e),e.negative^=1,o):e.negative===0&&this.negative!==0?(this.negative=0,o=e.sub(this),this.negative=1,o):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var o=this.iadd(e);return e.negative=1,o._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 u,l;n>0?(u=this,l=e):(u=e,l=this);for(var g=0,y=0;y<l.length;y++)o=(u.words[y]|0)-(l.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;for(;g!==0&&y<u.length;y++)o=(u.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;if(g===0&&y<u.length&&u!==this)for(;y<u.length;y++)this.words[y]=u.words[y];return this.length=Math.max(this.length,y),u!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};function b(e,o,n){n.negative=o.negative^e.negative;var u=e.length+o.length|0;n.length=u,u=u-1|0;var l=e.words[0]|0,g=o.words[0]|0,y=l*g,c=y&67108863,i=y/67108864|0;n.words[0]=c;for(var f=1;f<u;f++){for(var E=i>>>26,j=i&67108863,D=Math.min(f,o.length-1),V=Math.max(0,f-e.length+1);V<=D;V++){var Q=f-V|0;l=e.words[Q]|0,g=o.words[V]|0,y=l*g+j,E+=y/67108864|0,j=y&67108863}n.words[f]=j|0,i=E|0}return i!==0?n.words[f]=i|0:n.length--,n.strip()}var M=function(e,o,n){var u=e.words,l=o.words,g=n.words,y=0,c,i,f,E=u[0]|0,j=E&8191,D=E>>>13,V=u[1]|0,Q=V&8191,Z=V>>>13,tt=u[2]|0,Y=tt&8191,rt=tt>>>13,It=u[3]|0,z=It&8191,U=It>>>13,G=u[4]|0,J=G&8191,et=G>>>13,C=u[5]|0,B=C&8191,T=C>>>13,F=u[6]|0,K=F&8191,X=F>>>13,ut=u[7]|0,it=ut&8191,ot=ut>>>13,Ct=u[8]|0,nt=Ct&8191,st=Ct>>>13,Bt=u[9]|0,at=Bt&8191,bt=Bt>>>13,qt=l[0]|0,lt=qt&8191,Mt=qt>>>13,Ft=l[1]|0,ht=Ft&8191,wt=Ft>>>13,Vt=l[2]|0,ft=Vt&8191,_t=Vt>>>13,Kt=l[3]|0,ct=Kt&8191,St=Kt>>>13,Jt=l[4]|0,dt=Jt&8191,At=Jt>>>13,Qt=l[5]|0,pt=Qt&8191,xt=Qt>>>13,Xt=l[6]|0,mt=Xt&8191,kt=Xt>>>13,Gt=l[7]|0,gt=Gt&8191,Et=Gt>>>13,Yt=l[8]|0,yt=Yt&8191,Rt=Yt>>>13,te=l[9]|0,vt=te&8191,Ot=te>>>13;n.negative=e.negative^o.negative,n.length=19,c=Math.imul(j,lt),i=Math.imul(j,Mt),i=i+Math.imul(D,lt)|0,f=Math.imul(D,Mt);var $t=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,c=Math.imul(Q,lt),i=Math.imul(Q,Mt),i=i+Math.imul(Z,lt)|0,f=Math.imul(Z,Mt),c=c+Math.imul(j,ht)|0,i=i+Math.imul(j,wt)|0,i=i+Math.imul(D,ht)|0,f=f+Math.imul(D,wt)|0;var Tt=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,c=Math.imul(Y,lt),i=Math.imul(Y,Mt),i=i+Math.imul(rt,lt)|0,f=Math.imul(rt,Mt),c=c+Math.imul(Q,ht)|0,i=i+Math.imul(Q,wt)|0,i=i+Math.imul(Z,ht)|0,f=f+Math.imul(Z,wt)|0,c=c+Math.imul(j,ft)|0,i=i+Math.imul(j,_t)|0,i=i+Math.imul(D,ft)|0,f=f+Math.imul(D,_t)|0;var ue=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ue>>>26)|0,ue&=67108863,c=Math.imul(z,lt),i=Math.imul(z,Mt),i=i+Math.imul(U,lt)|0,f=Math.imul(U,Mt),c=c+Math.imul(Y,ht)|0,i=i+Math.imul(Y,wt)|0,i=i+Math.imul(rt,ht)|0,f=f+Math.imul(rt,wt)|0,c=c+Math.imul(Q,ft)|0,i=i+Math.imul(Q,_t)|0,i=i+Math.imul(Z,ft)|0,f=f+Math.imul(Z,_t)|0,c=c+Math.imul(j,ct)|0,i=i+Math.imul(j,St)|0,i=i+Math.imul(D,ct)|0,f=f+Math.imul(D,St)|0;var le=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(le>>>26)|0,le&=67108863,c=Math.imul(J,lt),i=Math.imul(J,Mt),i=i+Math.imul(et,lt)|0,f=Math.imul(et,Mt),c=c+Math.imul(z,ht)|0,i=i+Math.imul(z,wt)|0,i=i+Math.imul(U,ht)|0,f=f+Math.imul(U,wt)|0,c=c+Math.imul(Y,ft)|0,i=i+Math.imul(Y,_t)|0,i=i+Math.imul(rt,ft)|0,f=f+Math.imul(rt,_t)|0,c=c+Math.imul(Q,ct)|0,i=i+Math.imul(Q,St)|0,i=i+Math.imul(Z,ct)|0,f=f+Math.imul(Z,St)|0,c=c+Math.imul(j,dt)|0,i=i+Math.imul(j,At)|0,i=i+Math.imul(D,dt)|0,f=f+Math.imul(D,At)|0;var fe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(fe>>>26)|0,fe&=67108863,c=Math.imul(B,lt),i=Math.imul(B,Mt),i=i+Math.imul(T,lt)|0,f=Math.imul(T,Mt),c=c+Math.imul(J,ht)|0,i=i+Math.imul(J,wt)|0,i=i+Math.imul(et,ht)|0,f=f+Math.imul(et,wt)|0,c=c+Math.imul(z,ft)|0,i=i+Math.imul(z,_t)|0,i=i+Math.imul(U,ft)|0,f=f+Math.imul(U,_t)|0,c=c+Math.imul(Y,ct)|0,i=i+Math.imul(Y,St)|0,i=i+Math.imul(rt,ct)|0,f=f+Math.imul(rt,St)|0,c=c+Math.imul(Q,dt)|0,i=i+Math.imul(Q,At)|0,i=i+Math.imul(Z,dt)|0,f=f+Math.imul(Z,At)|0,c=c+Math.imul(j,pt)|0,i=i+Math.imul(j,xt)|0,i=i+Math.imul(D,pt)|0,f=f+Math.imul(D,xt)|0;var ce=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ce>>>26)|0,ce&=67108863,c=Math.imul(K,lt),i=Math.imul(K,Mt),i=i+Math.imul(X,lt)|0,f=Math.imul(X,Mt),c=c+Math.imul(B,ht)|0,i=i+Math.imul(B,wt)|0,i=i+Math.imul(T,ht)|0,f=f+Math.imul(T,wt)|0,c=c+Math.imul(J,ft)|0,i=i+Math.imul(J,_t)|0,i=i+Math.imul(et,ft)|0,f=f+Math.imul(et,_t)|0,c=c+Math.imul(z,ct)|0,i=i+Math.imul(z,St)|0,i=i+Math.imul(U,ct)|0,f=f+Math.imul(U,St)|0,c=c+Math.imul(Y,dt)|0,i=i+Math.imul(Y,At)|0,i=i+Math.imul(rt,dt)|0,f=f+Math.imul(rt,At)|0,c=c+Math.imul(Q,pt)|0,i=i+Math.imul(Q,xt)|0,i=i+Math.imul(Z,pt)|0,f=f+Math.imul(Z,xt)|0,c=c+Math.imul(j,mt)|0,i=i+Math.imul(j,kt)|0,i=i+Math.imul(D,mt)|0,f=f+Math.imul(D,kt)|0;var de=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(de>>>26)|0,de&=67108863,c=Math.imul(it,lt),i=Math.imul(it,Mt),i=i+Math.imul(ot,lt)|0,f=Math.imul(ot,Mt),c=c+Math.imul(K,ht)|0,i=i+Math.imul(K,wt)|0,i=i+Math.imul(X,ht)|0,f=f+Math.imul(X,wt)|0,c=c+Math.imul(B,ft)|0,i=i+Math.imul(B,_t)|0,i=i+Math.imul(T,ft)|0,f=f+Math.imul(T,_t)|0,c=c+Math.imul(J,ct)|0,i=i+Math.imul(J,St)|0,i=i+Math.imul(et,ct)|0,f=f+Math.imul(et,St)|0,c=c+Math.imul(z,dt)|0,i=i+Math.imul(z,At)|0,i=i+Math.imul(U,dt)|0,f=f+Math.imul(U,At)|0,c=c+Math.imul(Y,pt)|0,i=i+Math.imul(Y,xt)|0,i=i+Math.imul(rt,pt)|0,f=f+Math.imul(rt,xt)|0,c=c+Math.imul(Q,mt)|0,i=i+Math.imul(Q,kt)|0,i=i+Math.imul(Z,mt)|0,f=f+Math.imul(Z,kt)|0,c=c+Math.imul(j,gt)|0,i=i+Math.imul(j,Et)|0,i=i+Math.imul(D,gt)|0,f=f+Math.imul(D,Et)|0;var pe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(pe>>>26)|0,pe&=67108863,c=Math.imul(nt,lt),i=Math.imul(nt,Mt),i=i+Math.imul(st,lt)|0,f=Math.imul(st,Mt),c=c+Math.imul(it,ht)|0,i=i+Math.imul(it,wt)|0,i=i+Math.imul(ot,ht)|0,f=f+Math.imul(ot,wt)|0,c=c+Math.imul(K,ft)|0,i=i+Math.imul(K,_t)|0,i=i+Math.imul(X,ft)|0,f=f+Math.imul(X,_t)|0,c=c+Math.imul(B,ct)|0,i=i+Math.imul(B,St)|0,i=i+Math.imul(T,ct)|0,f=f+Math.imul(T,St)|0,c=c+Math.imul(J,dt)|0,i=i+Math.imul(J,At)|0,i=i+Math.imul(et,dt)|0,f=f+Math.imul(et,At)|0,c=c+Math.imul(z,pt)|0,i=i+Math.imul(z,xt)|0,i=i+Math.imul(U,pt)|0,f=f+Math.imul(U,xt)|0,c=c+Math.imul(Y,mt)|0,i=i+Math.imul(Y,kt)|0,i=i+Math.imul(rt,mt)|0,f=f+Math.imul(rt,kt)|0,c=c+Math.imul(Q,gt)|0,i=i+Math.imul(Q,Et)|0,i=i+Math.imul(Z,gt)|0,f=f+Math.imul(Z,Et)|0,c=c+Math.imul(j,yt)|0,i=i+Math.imul(j,Rt)|0,i=i+Math.imul(D,yt)|0,f=f+Math.imul(D,Rt)|0;var me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(at,lt),i=Math.imul(at,Mt),i=i+Math.imul(bt,lt)|0,f=Math.imul(bt,Mt),c=c+Math.imul(nt,ht)|0,i=i+Math.imul(nt,wt)|0,i=i+Math.imul(st,ht)|0,f=f+Math.imul(st,wt)|0,c=c+Math.imul(it,ft)|0,i=i+Math.imul(it,_t)|0,i=i+Math.imul(ot,ft)|0,f=f+Math.imul(ot,_t)|0,c=c+Math.imul(K,ct)|0,i=i+Math.imul(K,St)|0,i=i+Math.imul(X,ct)|0,f=f+Math.imul(X,St)|0,c=c+Math.imul(B,dt)|0,i=i+Math.imul(B,At)|0,i=i+Math.imul(T,dt)|0,f=f+Math.imul(T,At)|0,c=c+Math.imul(J,pt)|0,i=i+Math.imul(J,xt)|0,i=i+Math.imul(et,pt)|0,f=f+Math.imul(et,xt)|0,c=c+Math.imul(z,mt)|0,i=i+Math.imul(z,kt)|0,i=i+Math.imul(U,mt)|0,f=f+Math.imul(U,kt)|0,c=c+Math.imul(Y,gt)|0,i=i+Math.imul(Y,Et)|0,i=i+Math.imul(rt,gt)|0,f=f+Math.imul(rt,Et)|0,c=c+Math.imul(Q,yt)|0,i=i+Math.imul(Q,Rt)|0,i=i+Math.imul(Z,yt)|0,f=f+Math.imul(Z,Rt)|0,c=c+Math.imul(j,vt)|0,i=i+Math.imul(j,Ot)|0,i=i+Math.imul(D,vt)|0,f=f+Math.imul(D,Ot)|0;var ge=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(at,ht),i=Math.imul(at,wt),i=i+Math.imul(bt,ht)|0,f=Math.imul(bt,wt),c=c+Math.imul(nt,ft)|0,i=i+Math.imul(nt,_t)|0,i=i+Math.imul(st,ft)|0,f=f+Math.imul(st,_t)|0,c=c+Math.imul(it,ct)|0,i=i+Math.imul(it,St)|0,i=i+Math.imul(ot,ct)|0,f=f+Math.imul(ot,St)|0,c=c+Math.imul(K,dt)|0,i=i+Math.imul(K,At)|0,i=i+Math.imul(X,dt)|0,f=f+Math.imul(X,At)|0,c=c+Math.imul(B,pt)|0,i=i+Math.imul(B,xt)|0,i=i+Math.imul(T,pt)|0,f=f+Math.imul(T,xt)|0,c=c+Math.imul(J,mt)|0,i=i+Math.imul(J,kt)|0,i=i+Math.imul(et,mt)|0,f=f+Math.imul(et,kt)|0,c=c+Math.imul(z,gt)|0,i=i+Math.imul(z,Et)|0,i=i+Math.imul(U,gt)|0,f=f+Math.imul(U,Et)|0,c=c+Math.imul(Y,yt)|0,i=i+Math.imul(Y,Rt)|0,i=i+Math.imul(rt,yt)|0,f=f+Math.imul(rt,Rt)|0,c=c+Math.imul(Q,vt)|0,i=i+Math.imul(Q,Ot)|0,i=i+Math.imul(Z,vt)|0,f=f+Math.imul(Z,Ot)|0;var ye=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(at,ft),i=Math.imul(at,_t),i=i+Math.imul(bt,ft)|0,f=Math.imul(bt,_t),c=c+Math.imul(nt,ct)|0,i=i+Math.imul(nt,St)|0,i=i+Math.imul(st,ct)|0,f=f+Math.imul(st,St)|0,c=c+Math.imul(it,dt)|0,i=i+Math.imul(it,At)|0,i=i+Math.imul(ot,dt)|0,f=f+Math.imul(ot,At)|0,c=c+Math.imul(K,pt)|0,i=i+Math.imul(K,xt)|0,i=i+Math.imul(X,pt)|0,f=f+Math.imul(X,xt)|0,c=c+Math.imul(B,mt)|0,i=i+Math.imul(B,kt)|0,i=i+Math.imul(T,mt)|0,f=f+Math.imul(T,kt)|0,c=c+Math.imul(J,gt)|0,i=i+Math.imul(J,Et)|0,i=i+Math.imul(et,gt)|0,f=f+Math.imul(et,Et)|0,c=c+Math.imul(z,yt)|0,i=i+Math.imul(z,Rt)|0,i=i+Math.imul(U,yt)|0,f=f+Math.imul(U,Rt)|0,c=c+Math.imul(Y,vt)|0,i=i+Math.imul(Y,Ot)|0,i=i+Math.imul(rt,vt)|0,f=f+Math.imul(rt,Ot)|0;var ve=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(at,ct),i=Math.imul(at,St),i=i+Math.imul(bt,ct)|0,f=Math.imul(bt,St),c=c+Math.imul(nt,dt)|0,i=i+Math.imul(nt,At)|0,i=i+Math.imul(st,dt)|0,f=f+Math.imul(st,At)|0,c=c+Math.imul(it,pt)|0,i=i+Math.imul(it,xt)|0,i=i+Math.imul(ot,pt)|0,f=f+Math.imul(ot,xt)|0,c=c+Math.imul(K,mt)|0,i=i+Math.imul(K,kt)|0,i=i+Math.imul(X,mt)|0,f=f+Math.imul(X,kt)|0,c=c+Math.imul(B,gt)|0,i=i+Math.imul(B,Et)|0,i=i+Math.imul(T,gt)|0,f=f+Math.imul(T,Et)|0,c=c+Math.imul(J,yt)|0,i=i+Math.imul(J,Rt)|0,i=i+Math.imul(et,yt)|0,f=f+Math.imul(et,Rt)|0,c=c+Math.imul(z,vt)|0,i=i+Math.imul(z,Ot)|0,i=i+Math.imul(U,vt)|0,f=f+Math.imul(U,Ot)|0;var be=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(be>>>26)|0,be&=67108863,c=Math.imul(at,dt),i=Math.imul(at,At),i=i+Math.imul(bt,dt)|0,f=Math.imul(bt,At),c=c+Math.imul(nt,pt)|0,i=i+Math.imul(nt,xt)|0,i=i+Math.imul(st,pt)|0,f=f+Math.imul(st,xt)|0,c=c+Math.imul(it,mt)|0,i=i+Math.imul(it,kt)|0,i=i+Math.imul(ot,mt)|0,f=f+Math.imul(ot,kt)|0,c=c+Math.imul(K,gt)|0,i=i+Math.imul(K,Et)|0,i=i+Math.imul(X,gt)|0,f=f+Math.imul(X,Et)|0,c=c+Math.imul(B,yt)|0,i=i+Math.imul(B,Rt)|0,i=i+Math.imul(T,yt)|0,f=f+Math.imul(T,Rt)|0,c=c+Math.imul(J,vt)|0,i=i+Math.imul(J,Ot)|0,i=i+Math.imul(et,vt)|0,f=f+Math.imul(et,Ot)|0;var we=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(at,pt),i=Math.imul(at,xt),i=i+Math.imul(bt,pt)|0,f=Math.imul(bt,xt),c=c+Math.imul(nt,mt)|0,i=i+Math.imul(nt,kt)|0,i=i+Math.imul(st,mt)|0,f=f+Math.imul(st,kt)|0,c=c+Math.imul(it,gt)|0,i=i+Math.imul(it,Et)|0,i=i+Math.imul(ot,gt)|0,f=f+Math.imul(ot,Et)|0,c=c+Math.imul(K,yt)|0,i=i+Math.imul(K,Rt)|0,i=i+Math.imul(X,yt)|0,f=f+Math.imul(X,Rt)|0,c=c+Math.imul(B,vt)|0,i=i+Math.imul(B,Ot)|0,i=i+Math.imul(T,vt)|0,f=f+Math.imul(T,Ot)|0;var Me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(at,mt),i=Math.imul(at,kt),i=i+Math.imul(bt,mt)|0,f=Math.imul(bt,kt),c=c+Math.imul(nt,gt)|0,i=i+Math.imul(nt,Et)|0,i=i+Math.imul(st,gt)|0,f=f+Math.imul(st,Et)|0,c=c+Math.imul(it,yt)|0,i=i+Math.imul(it,Rt)|0,i=i+Math.imul(ot,yt)|0,f=f+Math.imul(ot,Rt)|0,c=c+Math.imul(K,vt)|0,i=i+Math.imul(K,Ot)|0,i=i+Math.imul(X,vt)|0,f=f+Math.imul(X,Ot)|0;var _e=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(at,gt),i=Math.imul(at,Et),i=i+Math.imul(bt,gt)|0,f=Math.imul(bt,Et),c=c+Math.imul(nt,yt)|0,i=i+Math.imul(nt,Rt)|0,i=i+Math.imul(st,yt)|0,f=f+Math.imul(st,Rt)|0,c=c+Math.imul(it,vt)|0,i=i+Math.imul(it,Ot)|0,i=i+Math.imul(ot,vt)|0,f=f+Math.imul(ot,Ot)|0;var Se=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(at,yt),i=Math.imul(at,Rt),i=i+Math.imul(bt,yt)|0,f=Math.imul(bt,Rt),c=c+Math.imul(nt,vt)|0,i=i+Math.imul(nt,Ot)|0,i=i+Math.imul(st,vt)|0,f=f+Math.imul(st,Ot)|0;var Ae=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(at,vt),i=Math.imul(at,Ot),i=i+Math.imul(bt,vt)|0,f=Math.imul(bt,Ot);var xe=(y+c|0)+((i&8191)<<13)|0;return y=(f+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,g[0]=$t,g[1]=Tt,g[2]=ue,g[3]=le,g[4]=fe,g[5]=ce,g[6]=de,g[7]=pe,g[8]=me,g[9]=ge,g[10]=ye,g[11]=ve,g[12]=be,g[13]=we,g[14]=Me,g[15]=_e,g[16]=Se,g[17]=Ae,g[18]=xe,y!==0&&(g[19]=y,n.length++),n};Math.imul||(M=b);function O(e,o,n){n.negative=o.negative^e.negative,n.length=e.length+o.length;for(var u=0,l=0,g=0;g<n.length-1;g++){var y=l;l=0;for(var c=u&67108863,i=Math.min(g,o.length-1),f=Math.max(0,g-e.length+1);f<=i;f++){var E=g-f,j=e.words[E]|0,D=o.words[f]|0,V=j*D,Q=V&67108863;y=y+(V/67108864|0)|0,Q=Q+c|0,c=Q&67108863,y=y+(Q>>>26)|0,l+=y>>>26,y&=67108863}n.words[g]=c,u=y,y=l}return u!==0?n.words[g]=u:n.length--,n.strip()}function k(e,o,n){var u=new R;return u.mulp(e,o,n)}s.prototype.mulTo=function(e,o){var n,u=this.length+e.length;return this.length===10&&e.length===10?n=M(this,e,o):u<63?n=b(this,e,o):u<1024?n=O(this,e,o):n=k(this,e,o),n};function R(e,o){this.x=e,this.y=o}R.prototype.makeRBT=function(e){for(var o=new Array(e),n=s.prototype._countBits(e)-1,u=0;u<e;u++)o[u]=this.revBin(u,n,e);return o},R.prototype.revBin=function(e,o,n){if(e===0||e===n-1)return e;for(var u=0,l=0;l<o;l++)u|=(e&1)<<o-l-1,e>>=1;return u},R.prototype.permute=function(e,o,n,u,l,g){for(var y=0;y<g;y++)u[y]=o[e[y]],l[y]=n[e[y]]},R.prototype.transform=function(e,o,n,u,l,g){this.permute(g,e,o,n,u,l);for(var y=1;y<l;y<<=1)for(var c=y<<1,i=Math.cos(2*Math.PI/c),f=Math.sin(2*Math.PI/c),E=0;E<l;E+=c)for(var j=i,D=f,V=0;V<y;V++){var Q=n[E+V],Z=u[E+V],tt=n[E+V+y],Y=u[E+V+y],rt=j*tt-D*Y;Y=j*Y+D*tt,tt=rt,n[E+V]=Q+tt,u[E+V]=Z+Y,n[E+V+y]=Q-tt,u[E+V+y]=Z-Y,V!==c&&(rt=i*j-f*D,D=i*D+f*j,j=rt)}},R.prototype.guessLen13b=function(e,o){var n=Math.max(o,e)|1,u=n&1,l=0;for(n=n/2|0;n;n=n>>>1)l++;return 1<<l+1+u},R.prototype.conjugate=function(e,o,n){if(!(n<=1))for(var u=0;u<n/2;u++){var l=e[u];e[u]=e[n-u-1],e[n-u-1]=l,l=o[u],o[u]=-o[n-u-1],o[n-u-1]=-l}},R.prototype.normalize13b=function(e,o){for(var n=0,u=0;u<o/2;u++){var l=Math.round(e[2*u+1]/o)*8192+Math.round(e[2*u]/o)+n;e[u]=l&67108863,l<67108864?n=0:n=l/67108864|0}return e},R.prototype.convert13b=function(e,o,n,u){for(var l=0,g=0;g<o;g++)l=l+(e[g]|0),n[2*g]=l&8191,l=l>>>13,n[2*g+1]=l&8191,l=l>>>13;for(g=2*o;g<u;++g)n[g]=0;a(l===0),a((l&-8192)===0)},R.prototype.stub=function(e){for(var o=new Array(e),n=0;n<e;n++)o[n]=0;return o},R.prototype.mulp=function(e,o,n){var u=2*this.guessLen13b(e.length,o.length),l=this.makeRBT(u),g=this.stub(u),y=new Array(u),c=new Array(u),i=new Array(u),f=new Array(u),E=new Array(u),j=new Array(u),D=n.words;D.length=u,this.convert13b(e.words,e.length,y,u),this.convert13b(o.words,o.length,f,u),this.transform(y,g,c,i,u,l),this.transform(f,g,E,j,u,l);for(var V=0;V<u;V++){var Q=c[V]*E[V]-i[V]*j[V];i[V]=c[V]*j[V]+i[V]*E[V],c[V]=Q}return this.conjugate(c,i,u),this.transform(c,i,D,g,u,l),this.conjugate(D,g,u),this.normalize13b(D,u),n.negative=e.negative^o.negative,n.length=e.length+o.length,n.strip()},s.prototype.mul=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),this.mulTo(e,o)},s.prototype.mulf=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),k(this,e,o)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){a(typeof e=="number"),a(e<67108864);for(var o=0,n=0;n<this.length;n++){var u=(this.words[n]|0)*e,l=(u&67108863)+(o&67108863);o>>=26,o+=u/67108864|0,o+=l>>>26,this.words[n]=l&67108863}return o!==0&&(this.words[n]=o,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var o=x(e);if(o.length===0)return new s(1);for(var n=this,u=0;u<o.length&&o[u]===0;u++,n=n.sqr());if(++u<o.length)for(var l=n.sqr();u<o.length;u++,l=l.sqr())o[u]!==0&&(n=n.mul(l));return n},s.prototype.iushln=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=67108863>>>26-o<<26-o,l;if(o!==0){var g=0;for(l=0;l<this.length;l++){var y=this.words[l]&u,c=(this.words[l]|0)-y<<o;this.words[l]=c|g,g=y>>>26-o}g&&(this.words[l]=g,this.length++)}if(n!==0){for(l=this.length-1;l>=0;l--)this.words[l+n]=this.words[l];for(l=0;l<n;l++)this.words[l]=0;this.length+=n}return this.strip()},s.prototype.ishln=function(e){return a(this.negative===0),this.iushln(e)},s.prototype.iushrn=function(e,o,n){a(typeof e=="number"&&e>=0);var u;o?u=(o-o%26)/26:u=0;var l=e%26,g=Math.min((e-l)/26,this.length),y=67108863^67108863>>>l<<l,c=n;if(u-=g,u=Math.max(0,u),c){for(var i=0;i<g;i++)c.words[i]=this.words[i];c.length=g}if(g!==0)if(this.length>g)for(this.length-=g,i=0;i<this.length;i++)this.words[i]=this.words[i+g];else this.words[0]=0,this.length=1;var f=0;for(i=this.length-1;i>=0&&(f!==0||i>=u);i--){var E=this.words[i]|0;this.words[i]=f<<26-l|E>>>l,f=E&y}return c&&f!==0&&(c.words[c.length++]=f),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,o,n){return a(this.negative===0),this.iushrn(e,o,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return!1;var l=this.words[n];return!!(l&u)},s.prototype.imaskn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(o!==0&&n++,this.length=Math.min(n,this.length),o!==0){var u=67108863^67108863>>>o<<o;this.words[this.length-1]&=u}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return a(typeof e=="number"),a(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)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var o=0;o<this.length&&this.words[o]>=67108864;o++)this.words[o]-=67108864,o===this.length-1?this.words[o+1]=1:this.words[o+1]++;return this.length=Math.max(this.length,o+1),this},s.prototype.isubn=function(e){if(a(typeof e=="number"),a(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 o=0;o<this.length&&this.words[o]<0;o++)this.words[o]+=67108864,this.words[o+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,o,n){var u=e.length+n,l;this._expand(u);var g,y=0;for(l=0;l<e.length;l++){g=(this.words[l+n]|0)+y;var c=(e.words[l]|0)*o;g-=c&67108863,y=(g>>26)-(c/67108864|0),this.words[l+n]=g&67108863}for(;l<this.length-n;l++)g=(this.words[l+n]|0)+y,y=g>>26,this.words[l+n]=g&67108863;if(y===0)return this.strip();for(a(y===-1),y=0,l=0;l<this.length;l++)g=-(this.words[l]|0)+y,y=g>>26,this.words[l]=g&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,o){var n=this.length-e.length,u=this.clone(),l=e,g=l.words[l.length-1]|0,y=this._countBits(g);n=26-y,n!==0&&(l=l.ushln(n),u.iushln(n),g=l.words[l.length-1]|0);var c=u.length-l.length,i;if(o!=="mod"){i=new s(null),i.length=c+1,i.words=new Array(i.length);for(var f=0;f<i.length;f++)i.words[f]=0}var E=u.clone()._ishlnsubmul(l,1,c);E.negative===0&&(u=E,i&&(i.words[c]=1));for(var j=c-1;j>=0;j--){var D=(u.words[l.length+j]|0)*67108864+(u.words[l.length+j-1]|0);for(D=Math.min(D/g|0,67108863),u._ishlnsubmul(l,D,j);u.negative!==0;)D--,u.negative=0,u._ishlnsubmul(l,1,j),u.isZero()||(u.negative^=1);i&&(i.words[j]=D)}return i&&i.strip(),u.strip(),o!=="div"&&n!==0&&u.iushrn(n),{div:i||null,mod:u}},s.prototype.divmod=function(e,o,n){if(a(!e.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var u,l,g;return this.negative!==0&&e.negative===0?(g=this.neg().divmod(e,o),o!=="mod"&&(u=g.div.neg()),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.iadd(e)),{div:u,mod:l}):this.negative===0&&e.negative!==0?(g=this.divmod(e.neg(),o),o!=="mod"&&(u=g.div.neg()),{div:u,mod:g.mod}):this.negative&e.negative?(g=this.neg().divmod(e.neg(),o),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.isub(e)),{div:g.div,mod:l}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:e.length===1?o==="div"?{div:this.divn(e.words[0]),mod:null}:o==="mod"?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,o)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var o=this.divmod(e);if(o.mod.isZero())return o.div;var n=o.div.negative!==0?o.mod.isub(e):o.mod,u=e.ushrn(1),l=e.andln(1),g=n.cmp(u);return g<0||l===1&&g===0?o.div:o.div.negative!==0?o.div.isubn(1):o.div.iaddn(1)},s.prototype.modn=function(e){a(e<=67108863);for(var o=(1<<26)%e,n=0,u=this.length-1;u>=0;u--)n=(o*n+(this.words[u]|0))%e;return n},s.prototype.idivn=function(e){a(e<=67108863);for(var o=0,n=this.length-1;n>=0;n--){var u=(this.words[n]|0)+o*67108864;this.words[n]=u/e|0,o=u%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=new s(0),y=new s(1),c=0;o.isEven()&&n.isEven();)o.iushrn(1),n.iushrn(1),++c;for(var i=n.clone(),f=o.clone();!o.isZero();){for(var E=0,j=1;!(o.words[0]&j)&&E<26;++E,j<<=1);if(E>0)for(o.iushrn(E);E-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(i),l.isub(f)),u.iushrn(1),l.iushrn(1);for(var D=0,V=1;!(n.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(n.iushrn(D);D-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(i),y.isub(f)),g.iushrn(1),y.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(g),l.isub(y)):(n.isub(o),g.isub(u),y.isub(l))}return{a:g,b:y,gcd:n.iushln(c)}},s.prototype._invmp=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=n.clone();o.cmpn(1)>0&&n.cmpn(1)>0;){for(var y=0,c=1;!(o.words[0]&c)&&y<26;++y,c<<=1);if(y>0)for(o.iushrn(y);y-- >0;)u.isOdd()&&u.iadd(g),u.iushrn(1);for(var i=0,f=1;!(n.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(n.iushrn(i);i-- >0;)l.isOdd()&&l.iadd(g),l.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(l)):(n.isub(o),l.isub(u))}var E;return o.cmpn(1)===0?E=u:E=l,E.cmpn(0)<0&&E.iadd(e),E},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var o=this.clone(),n=e.clone();o.negative=0,n.negative=0;for(var u=0;o.isEven()&&n.isEven();u++)o.iushrn(1),n.iushrn(1);do{for(;o.isEven();)o.iushrn(1);for(;n.isEven();)n.iushrn(1);var l=o.cmp(n);if(l<0){var g=o;o=n,n=g}else if(l===0||n.cmpn(1)===0)break;o.isub(n)}while(!0);return n.iushln(u)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){a(typeof e=="number");var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return this._expand(n+1),this.words[n]|=u,this;for(var l=u,g=n;l!==0&&g<this.length;g++){var y=this.words[g]|0;y+=l,l=y>>>26,y&=67108863,this.words[g]=y}return l!==0&&(this.words[g]=l,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(e){var o=e<0;if(this.negative!==0&&!o)return-1;if(this.negative===0&&o)return 1;this.strip();var n;if(this.length>1)n=1;else{o&&(e=-e),a(e<=67108863,"Number is too big");var u=this.words[0]|0;n=u===e?0:u<e?-1:1}return this.negative!==0?-n|0:n},s.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var o=this.ucmp(e);return this.negative!==0?-o|0:o},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var o=0,n=this.length-1;n>=0;n--){var u=this.words[n]|0,l=e.words[n]|0;if(u!==l){u<l?o=-1:u>l&&(o=1);break}}return o},s.prototype.gtn=function(e){return this.cmpn(e)===1},s.prototype.gt=function(e){return this.cmp(e)===1},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return this.cmpn(e)===-1},s.prototype.lt=function(e){return this.cmp(e)===-1},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return this.cmpn(e)===0},s.prototype.eq=function(e){return this.cmp(e)===0},s.red=function(e){return new $(e)},s.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var I={k256:null,p224:null,p192:null,p25519:null};function L(e,o){this.name=e,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},L.prototype.ireduce=function(e){var o=e,n;do this.split(o,this.tmp),o=this.imulK(o),o=o.iadd(this.tmp),n=o.bitLength();while(n>this.n);var u=n<this.n?-1:o.ucmp(this.p);return u===0?(o.words[0]=0,o.length=1):u>0?o.isub(this.p):o.strip!==void 0?o.strip():o._strip(),o},L.prototype.split=function(e,o){e.iushrn(this.n,0,o)},L.prototype.imulK=function(e){return e.imul(this.k)};function P(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}d(P,L),P.prototype.split=function(e,o){for(var n=4194303,u=Math.min(e.length,9),l=0;l<u;l++)o.words[l]=e.words[l];if(o.length=u,e.length<=9){e.words[0]=0,e.length=1;return}var g=e.words[9];for(o.words[o.length++]=g&n,l=10;l<e.length;l++){var y=e.words[l]|0;e.words[l-10]=(y&n)<<4|g>>>22,g=y}g>>>=22,e.words[l-10]=g,g===0&&e.length>10?e.length-=10:e.length-=9},P.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var o=0,n=0;n<e.length;n++){var u=e.words[n]|0;o+=u*977,e.words[n]=o&67108863,o=u*64+(o/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function H(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}d(H,L);function W(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}d(W,L);function q(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}d(q,L),q.prototype.imulK=function(e){for(var o=0,n=0;n<e.length;n++){var u=(e.words[n]|0)*19+o,l=u&67108863;u>>>=26,e.words[n]=l,o=u}return o!==0&&(e.words[e.length++]=o),e},s._prime=function(e){if(I[e])return I[e];var o;if(e==="k256")o=new P;else if(e==="p224")o=new H;else if(e==="p192")o=new W;else if(e==="p25519")o=new q;else throw new Error("Unknown prime "+e);return I[e]=o,o};function $(e){if(typeof e=="string"){var o=s._prime(e);this.m=o.p,this.prime=o}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}$.prototype._verify1=function(e){a(e.negative===0,"red works only with positives"),a(e.red,"red works only with red numbers")},$.prototype._verify2=function(e,o){a((e.negative|o.negative)===0,"red works only with positives"),a(e.red&&e.red===o.red,"red works only with red numbers")},$.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},$.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},$.prototype.add=function(e,o){this._verify2(e,o);var n=e.add(o);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},$.prototype.iadd=function(e,o){this._verify2(e,o);var n=e.iadd(o);return n.cmp(this.m)>=0&&n.isub(this.m),n},$.prototype.sub=function(e,o){this._verify2(e,o);var n=e.sub(o);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},$.prototype.isub=function(e,o){this._verify2(e,o);var n=e.isub(o);return n.cmpn(0)<0&&n.iadd(this.m),n},$.prototype.shl=function(e,o){return this._verify1(e),this.imod(e.ushln(o))},$.prototype.imul=function(e,o){return this._verify2(e,o),this.imod(e.imul(o))},$.prototype.mul=function(e,o){return this._verify2(e,o),this.imod(e.mul(o))},$.prototype.isqr=function(e){return this.imul(e,e.clone())},$.prototype.sqr=function(e){return this.mul(e,e)},$.prototype.sqrt=function(e){if(e.isZero())return e.clone();var o=this.m.andln(3);if(a(o%2===1),o===3){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);a(!u.isZero());var g=new s(1).toRed(this),y=g.redNeg(),c=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new s(2*i*i).toRed(this);this.pow(i,c).cmp(y)!==0;)i.redIAdd(y);for(var f=this.pow(i,u),E=this.pow(e,u.addn(1).iushrn(1)),j=this.pow(e,u),D=l;j.cmp(g)!==0;){for(var V=j,Q=0;V.cmp(g)!==0;Q++)V=V.redSqr();a(Q<D);var Z=this.pow(f,new s(1).iushln(D-Q-1));E=E.redMul(Z),f=Z.redSqr(),j=j.redMul(f),D=Q}return E},$.prototype.invm=function(e){var o=e._invmp(this.m);return o.negative!==0?(o.negative=0,this.imod(o).redNeg()):this.imod(o)},$.prototype.pow=function(e,o){if(o.isZero())return new s(1).toRed(this);if(o.cmpn(1)===0)return e.clone();var n=4,u=new Array(1<<n);u[0]=new s(1).toRed(this),u[1]=e;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],e);var g=u[0],y=0,c=0,i=o.bitLength()%26;for(i===0&&(i=26),l=o.length-1;l>=0;l--){for(var f=o.words[l],E=i-1;E>=0;E--){var j=f>>E&1;if(g!==u[0]&&(g=this.sqr(g)),j===0&&y===0){c=0;continue}y<<=1,y|=j,c++,!(c!==n&&(l!==0||E!==0))&&(g=this.mul(g,u[y]),c=0,y=0)}i=26}return g},$.prototype.convertTo=function(e){var o=e.umod(this.m);return o===e?o.clone():o},$.prototype.convertFrom=function(e){var o=e.clone();return o.red=null,o},s.mont=function(e){return new N(e)};function N(e){$.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}d(N,$),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var o=this.imod(e.mul(this.rinv));return o.red=null,o},N.prototype.imul=function(e,o){if(e.isZero()||o.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.mul=function(e,o){if(e.isZero()||o.isZero())return new s(0)._forceRed(this);var n=e.mul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.invm=function(e){var o=this.imod(e._invmp(this.m).mul(this.r2));return o._forceRed(this)}})(t,Lt)}(k0);var d_=k0.exports,E0,Qm;function p_(){if(Qm)return E0;Qm=1;var t=u0(),r=d_;E0=function(s){return new a(s)};var h={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}};h.p224=h.secp224r1,h.p256=h.secp256r1=h.prime256v1,h.p192=h.secp192r1=h.prime192v1,h.p384=h.secp384r1,h.p521=h.secp521r1;function a(s){this.curveType=h[s],this.curveType||(this.curveType={name:s}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}a.prototype.generateKeys=function(s,m){return this.keys=this.curve.genKeyPair(),this.getPublicKey(s,m)},a.prototype.computeSecret=function(s,m,p){m=m||"utf8",Ut.Buffer.isBuffer(s)||(s=new Ut.Buffer(s,m));var w=this.curve.keyFromPublic(s).getPublic(),S=w.mul(this.keys.getPrivate()).getX();return d(S,p,this.curveType.byteLength)},a.prototype.getPublicKey=function(s,m){var p=this.keys.getPublic(m==="compressed",!0);return m==="hybrid"&&(p[p.length-1]%2?p[0]=7:p[0]=6),d(p,s)},a.prototype.getPrivateKey=function(s){return d(this.keys.getPrivate(),s)},a.prototype.setPublicKey=function(s,m){return m=m||"utf8",Ut.Buffer.isBuffer(s)||(s=new Ut.Buffer(s,m)),this.keys._importPublic(s),this},a.prototype.setPrivateKey=function(s,m){m=m||"utf8",Ut.Buffer.isBuffer(s)||(s=new Ut.Buffer(s,m));var p=new r(s);return p=p.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(p),this};function d(s,m,p){Array.isArray(s)||(s=s.toArray());var w=new Ut.Buffer(s);if(p&&w.length<p){var S=new Ut.Buffer(p-w.length);S.fill(0),w=Ut.Buffer.concat([S,w])}return m?w.toString(m):w}return E0}var Xm={},m_=ts,R0=Zt.Buffer,Gm=function(t,r){for(var h=R0.alloc(0),a=0,d;h.length<r;)d=g_(a++),h=R0.concat([h,m_("sha1").update(t).update(d).digest()]);return h.slice(0,r)};function g_(t){var r=R0.allocUnsafe(4);return r.writeUInt32BE(t,0),r}var Ym=function(t,r){for(var h=t.length,a=-1;++a<h;)t[a]^=r[a];return t},O0={exports:{}};O0.exports,function(t){(function(r,h){function a(e,o){if(!e)throw new Error(o||"Assertion failed")}function d(e,o){e.super_=o;var n=function(){};n.prototype=o.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,o,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((o==="le"||o==="be")&&(n=o,o=10),this._init(e||0,o||10,n||"be"))}typeof r=="object"?r.exports=s:h.BN=s,s.BN=s,s.wordSize=26;var m;try{typeof window<"u"&&typeof window.Buffer<"u"?m=window.Buffer:m=Ut.Buffer}catch{}s.isBN=function(e){return e instanceof s?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,o){return e.cmp(o)>0?e:o},s.min=function(e,o){return e.cmp(o)<0?e:o},s.prototype._init=function(e,o,n){if(typeof e=="number")return this._initNumber(e,o,n);if(typeof e=="object")return this._initArray(e,o,n);o==="hex"&&(o=16),a(o===(o|0)&&o>=2&&o<=36),e=e.toString().replace(/\s+/g,"");var u=0;e[0]==="-"&&(u++,this.negative=1),u<e.length&&(o===16?this._parseHex(e,u,n):(this._parseBase(e,o,u),n==="le"&&this._initArray(this.toArray(),o,n)))},s.prototype._initNumber=function(e,o,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):(a(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),o,n)},s.prototype._initArray=function(e,o,n){if(a(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 u=0;u<this.length;u++)this.words[u]=0;var l,g,y=0;if(n==="be")for(u=e.length-1,l=0;u>=0;u-=3)g=e[u]|e[u-1]<<8|e[u-2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);else if(n==="le")for(u=0,l=0;u<e.length;u+=3)g=e[u]|e[u+1]<<8|e[u+2]<<16,this.words[l]|=g<<y&67108863,this.words[l+1]=g>>>26-y&67108863,y+=24,y>=26&&(y-=26,l++);return this.strip()};function p(e,o){var n=e.charCodeAt(o);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function w(e,o,n){var u=p(e,n);return n-1>=o&&(u|=p(e,n-1)<<4),u}s.prototype._parseHex=function(e,o,n){this.length=Math.ceil((e.length-o)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,g=0,y;if(n==="be")for(u=e.length-1;u>=o;u-=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8;else{var c=e.length-o;for(u=c%2===0?o+1:o;u<e.length;u+=2)y=w(e,o,u)<<l,this.words[g]|=y&67108863,l>=18?(l-=18,g+=1,this.words[g]|=y>>>26):l+=8}this.strip()};function S(e,o,n,u){for(var l=0,g=Math.min(e.length,n),y=o;y<g;y++){var c=e.charCodeAt(y)-48;l*=u,c>=49?l+=c-49+10:c>=17?l+=c-17+10:l+=c}return l}s.prototype._parseBase=function(e,o,n){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=o)u++;u--,l=l/o|0;for(var g=e.length-n,y=g%u,c=Math.min(g,g-y)+n,i=0,f=n;f<c;f+=u)i=S(e,f,f+u,o),this.imuln(l),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(y!==0){var E=1;for(i=S(e,f,e.length,o),f=0;f<y;f++)E*=o;this.imuln(E),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var o=0;o<this.length;o++)e.words[o]=this.words[o];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[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],_=[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];s.prototype.toString=function(e,o){e=e||10,o=o|0||1;var n;if(e===16||e==="hex"){n="";for(var u=0,l=0,g=0;g<this.length;g++){var y=this.words[g],c=((y<<u|l)&16777215).toString(16);l=y>>>24-u&16777215,l!==0||g!==this.length-1?n=A[6-c.length]+c+n:n=c+n,u+=2,u>=26&&(u-=26,g--)}for(l!==0&&(n=l.toString(16)+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var i=v[e],f=_[e];n="";var E=this.clone();for(E.negative=0;!E.isZero();){var j=E.modn(f).toString(e);E=E.idivn(f),E.isZero()?n=j+n:n=A[i-j.length]+j+n}for(this.isZero()&&(n="0"+n);n.length%o!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}a(!1,"Base should be between 2 and 36")},s.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&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,o){return a(typeof m<"u"),this.toArrayLike(m,e,o)},s.prototype.toArray=function(e,o){return this.toArrayLike(Array,e,o)},s.prototype.toArrayLike=function(e,o,n){var u=this.byteLength(),l=n||Math.max(1,u);a(u<=l,"byte array longer than desired length"),a(l>0,"Requested array length <= 0"),this.strip();var g=o==="le",y=new e(l),c,i,f=this.clone();if(g){for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[i]=c;for(;i<l;i++)y[i]=0}else{for(i=0;i<l-u;i++)y[i]=0;for(i=0;!f.isZero();i++)c=f.andln(255),f.iushrn(8),y[l-i-1]=c}return y},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var o=e,n=0;return o>=4096&&(n+=13,o>>>=13),o>=64&&(n+=7,o>>>=7),o>=8&&(n+=4,o>>>=4),o>=2&&(n+=2,o>>>=2),n+o},s.prototype._zeroBits=function(e){if(e===0)return 26;var o=e,n=0;return o&8191||(n+=13,o>>>=13),o&127||(n+=7,o>>>=7),o&15||(n+=4,o>>>=4),o&3||(n+=2,o>>>=2),o&1||n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],o=this._countBits(e);return(this.length-1)*26+o};function x(e){for(var o=new Array(e.bitLength()),n=0;n<o.length;n++){var u=n/26|0,l=n%26;o[n]=(e.words[u]&1<<l)>>>l}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,o=0;o<this.length;o++){var n=this._zeroBits(this.words[o]);if(e+=n,n!==26)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var o=0;o<e.length;o++)this.words[o]=this.words[o]|e.words[o];return this.strip()},s.prototype.ior=function(e){return a((this.negative|e.negative)===0),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var o;this.length>e.length?o=e:o=this;for(var n=0;n<o.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=o.length,this.strip()},s.prototype.iand=function(e){return a((this.negative|e.negative)===0),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var o,n;this.length>e.length?(o=this,n=e):(o=e,n=this);for(var u=0;u<n.length;u++)this.words[u]=o.words[u]^n.words[u];if(this!==o)for(;u<o.length;u++)this.words[u]=o.words[u];return this.length=o.length,this.strip()},s.prototype.ixor=function(e){return a((this.negative|e.negative)===0),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){a(typeof e=="number"&&e>=0);var o=Math.ceil(e/26)|0,n=e%26;this._expand(o),n>0&&o--;for(var u=0;u<o;u++)this.words[u]=~this.words[u]&67108863;return n>0&&(this.words[u]=~this.words[u]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,o){a(typeof e=="number"&&e>=0);var n=e/26|0,u=e%26;return this._expand(n+1),o?this.words[n]=this.words[n]|1<<u:this.words[n]=this.words[n]&~(1<<u),this.strip()},s.prototype.iadd=function(e){var o;if(this.negative!==0&&e.negative===0)return this.negative=0,o=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,o=this.isub(e),e.negative=1,o._normSign();var n,u;this.length>e.length?(n=this,u=e):(n=e,u=this);for(var l=0,g=0;g<u.length;g++)o=(n.words[g]|0)+(u.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;for(;l!==0&&g<n.length;g++)o=(n.words[g]|0)+l,this.words[g]=o&67108863,l=o>>>26;if(this.length=n.length,l!==0)this.words[this.length]=l,this.length++;else if(n!==this)for(;g<n.length;g++)this.words[g]=n.words[g];return this},s.prototype.add=function(e){var o;return e.negative!==0&&this.negative===0?(e.negative=0,o=this.sub(e),e.negative^=1,o):e.negative===0&&this.negative!==0?(this.negative=0,o=e.sub(this),this.negative=1,o):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var o=this.iadd(e);return e.negative=1,o._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 u,l;n>0?(u=this,l=e):(u=e,l=this);for(var g=0,y=0;y<l.length;y++)o=(u.words[y]|0)-(l.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;for(;g!==0&&y<u.length;y++)o=(u.words[y]|0)+g,g=o>>26,this.words[y]=o&67108863;if(g===0&&y<u.length&&u!==this)for(;y<u.length;y++)this.words[y]=u.words[y];return this.length=Math.max(this.length,y),u!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};function b(e,o,n){n.negative=o.negative^e.negative;var u=e.length+o.length|0;n.length=u,u=u-1|0;var l=e.words[0]|0,g=o.words[0]|0,y=l*g,c=y&67108863,i=y/67108864|0;n.words[0]=c;for(var f=1;f<u;f++){for(var E=i>>>26,j=i&67108863,D=Math.min(f,o.length-1),V=Math.max(0,f-e.length+1);V<=D;V++){var Q=f-V|0;l=e.words[Q]|0,g=o.words[V]|0,y=l*g+j,E+=y/67108864|0,j=y&67108863}n.words[f]=j|0,i=E|0}return i!==0?n.words[f]=i|0:n.length--,n.strip()}var M=function(e,o,n){var u=e.words,l=o.words,g=n.words,y=0,c,i,f,E=u[0]|0,j=E&8191,D=E>>>13,V=u[1]|0,Q=V&8191,Z=V>>>13,tt=u[2]|0,Y=tt&8191,rt=tt>>>13,It=u[3]|0,z=It&8191,U=It>>>13,G=u[4]|0,J=G&8191,et=G>>>13,C=u[5]|0,B=C&8191,T=C>>>13,F=u[6]|0,K=F&8191,X=F>>>13,ut=u[7]|0,it=ut&8191,ot=ut>>>13,Ct=u[8]|0,nt=Ct&8191,st=Ct>>>13,Bt=u[9]|0,at=Bt&8191,bt=Bt>>>13,qt=l[0]|0,lt=qt&8191,Mt=qt>>>13,Ft=l[1]|0,ht=Ft&8191,wt=Ft>>>13,Vt=l[2]|0,ft=Vt&8191,_t=Vt>>>13,Kt=l[3]|0,ct=Kt&8191,St=Kt>>>13,Jt=l[4]|0,dt=Jt&8191,At=Jt>>>13,Qt=l[5]|0,pt=Qt&8191,xt=Qt>>>13,Xt=l[6]|0,mt=Xt&8191,kt=Xt>>>13,Gt=l[7]|0,gt=Gt&8191,Et=Gt>>>13,Yt=l[8]|0,yt=Yt&8191,Rt=Yt>>>13,te=l[9]|0,vt=te&8191,Ot=te>>>13;n.negative=e.negative^o.negative,n.length=19,c=Math.imul(j,lt),i=Math.imul(j,Mt),i=i+Math.imul(D,lt)|0,f=Math.imul(D,Mt);var $t=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,c=Math.imul(Q,lt),i=Math.imul(Q,Mt),i=i+Math.imul(Z,lt)|0,f=Math.imul(Z,Mt),c=c+Math.imul(j,ht)|0,i=i+Math.imul(j,wt)|0,i=i+Math.imul(D,ht)|0,f=f+Math.imul(D,wt)|0;var Tt=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,c=Math.imul(Y,lt),i=Math.imul(Y,Mt),i=i+Math.imul(rt,lt)|0,f=Math.imul(rt,Mt),c=c+Math.imul(Q,ht)|0,i=i+Math.imul(Q,wt)|0,i=i+Math.imul(Z,ht)|0,f=f+Math.imul(Z,wt)|0,c=c+Math.imul(j,ft)|0,i=i+Math.imul(j,_t)|0,i=i+Math.imul(D,ft)|0,f=f+Math.imul(D,_t)|0;var ue=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ue>>>26)|0,ue&=67108863,c=Math.imul(z,lt),i=Math.imul(z,Mt),i=i+Math.imul(U,lt)|0,f=Math.imul(U,Mt),c=c+Math.imul(Y,ht)|0,i=i+Math.imul(Y,wt)|0,i=i+Math.imul(rt,ht)|0,f=f+Math.imul(rt,wt)|0,c=c+Math.imul(Q,ft)|0,i=i+Math.imul(Q,_t)|0,i=i+Math.imul(Z,ft)|0,f=f+Math.imul(Z,_t)|0,c=c+Math.imul(j,ct)|0,i=i+Math.imul(j,St)|0,i=i+Math.imul(D,ct)|0,f=f+Math.imul(D,St)|0;var le=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(le>>>26)|0,le&=67108863,c=Math.imul(J,lt),i=Math.imul(J,Mt),i=i+Math.imul(et,lt)|0,f=Math.imul(et,Mt),c=c+Math.imul(z,ht)|0,i=i+Math.imul(z,wt)|0,i=i+Math.imul(U,ht)|0,f=f+Math.imul(U,wt)|0,c=c+Math.imul(Y,ft)|0,i=i+Math.imul(Y,_t)|0,i=i+Math.imul(rt,ft)|0,f=f+Math.imul(rt,_t)|0,c=c+Math.imul(Q,ct)|0,i=i+Math.imul(Q,St)|0,i=i+Math.imul(Z,ct)|0,f=f+Math.imul(Z,St)|0,c=c+Math.imul(j,dt)|0,i=i+Math.imul(j,At)|0,i=i+Math.imul(D,dt)|0,f=f+Math.imul(D,At)|0;var fe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(fe>>>26)|0,fe&=67108863,c=Math.imul(B,lt),i=Math.imul(B,Mt),i=i+Math.imul(T,lt)|0,f=Math.imul(T,Mt),c=c+Math.imul(J,ht)|0,i=i+Math.imul(J,wt)|0,i=i+Math.imul(et,ht)|0,f=f+Math.imul(et,wt)|0,c=c+Math.imul(z,ft)|0,i=i+Math.imul(z,_t)|0,i=i+Math.imul(U,ft)|0,f=f+Math.imul(U,_t)|0,c=c+Math.imul(Y,ct)|0,i=i+Math.imul(Y,St)|0,i=i+Math.imul(rt,ct)|0,f=f+Math.imul(rt,St)|0,c=c+Math.imul(Q,dt)|0,i=i+Math.imul(Q,At)|0,i=i+Math.imul(Z,dt)|0,f=f+Math.imul(Z,At)|0,c=c+Math.imul(j,pt)|0,i=i+Math.imul(j,xt)|0,i=i+Math.imul(D,pt)|0,f=f+Math.imul(D,xt)|0;var ce=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ce>>>26)|0,ce&=67108863,c=Math.imul(K,lt),i=Math.imul(K,Mt),i=i+Math.imul(X,lt)|0,f=Math.imul(X,Mt),c=c+Math.imul(B,ht)|0,i=i+Math.imul(B,wt)|0,i=i+Math.imul(T,ht)|0,f=f+Math.imul(T,wt)|0,c=c+Math.imul(J,ft)|0,i=i+Math.imul(J,_t)|0,i=i+Math.imul(et,ft)|0,f=f+Math.imul(et,_t)|0,c=c+Math.imul(z,ct)|0,i=i+Math.imul(z,St)|0,i=i+Math.imul(U,ct)|0,f=f+Math.imul(U,St)|0,c=c+Math.imul(Y,dt)|0,i=i+Math.imul(Y,At)|0,i=i+Math.imul(rt,dt)|0,f=f+Math.imul(rt,At)|0,c=c+Math.imul(Q,pt)|0,i=i+Math.imul(Q,xt)|0,i=i+Math.imul(Z,pt)|0,f=f+Math.imul(Z,xt)|0,c=c+Math.imul(j,mt)|0,i=i+Math.imul(j,kt)|0,i=i+Math.imul(D,mt)|0,f=f+Math.imul(D,kt)|0;var de=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(de>>>26)|0,de&=67108863,c=Math.imul(it,lt),i=Math.imul(it,Mt),i=i+Math.imul(ot,lt)|0,f=Math.imul(ot,Mt),c=c+Math.imul(K,ht)|0,i=i+Math.imul(K,wt)|0,i=i+Math.imul(X,ht)|0,f=f+Math.imul(X,wt)|0,c=c+Math.imul(B,ft)|0,i=i+Math.imul(B,_t)|0,i=i+Math.imul(T,ft)|0,f=f+Math.imul(T,_t)|0,c=c+Math.imul(J,ct)|0,i=i+Math.imul(J,St)|0,i=i+Math.imul(et,ct)|0,f=f+Math.imul(et,St)|0,c=c+Math.imul(z,dt)|0,i=i+Math.imul(z,At)|0,i=i+Math.imul(U,dt)|0,f=f+Math.imul(U,At)|0,c=c+Math.imul(Y,pt)|0,i=i+Math.imul(Y,xt)|0,i=i+Math.imul(rt,pt)|0,f=f+Math.imul(rt,xt)|0,c=c+Math.imul(Q,mt)|0,i=i+Math.imul(Q,kt)|0,i=i+Math.imul(Z,mt)|0,f=f+Math.imul(Z,kt)|0,c=c+Math.imul(j,gt)|0,i=i+Math.imul(j,Et)|0,i=i+Math.imul(D,gt)|0,f=f+Math.imul(D,Et)|0;var pe=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(pe>>>26)|0,pe&=67108863,c=Math.imul(nt,lt),i=Math.imul(nt,Mt),i=i+Math.imul(st,lt)|0,f=Math.imul(st,Mt),c=c+Math.imul(it,ht)|0,i=i+Math.imul(it,wt)|0,i=i+Math.imul(ot,ht)|0,f=f+Math.imul(ot,wt)|0,c=c+Math.imul(K,ft)|0,i=i+Math.imul(K,_t)|0,i=i+Math.imul(X,ft)|0,f=f+Math.imul(X,_t)|0,c=c+Math.imul(B,ct)|0,i=i+Math.imul(B,St)|0,i=i+Math.imul(T,ct)|0,f=f+Math.imul(T,St)|0,c=c+Math.imul(J,dt)|0,i=i+Math.imul(J,At)|0,i=i+Math.imul(et,dt)|0,f=f+Math.imul(et,At)|0,c=c+Math.imul(z,pt)|0,i=i+Math.imul(z,xt)|0,i=i+Math.imul(U,pt)|0,f=f+Math.imul(U,xt)|0,c=c+Math.imul(Y,mt)|0,i=i+Math.imul(Y,kt)|0,i=i+Math.imul(rt,mt)|0,f=f+Math.imul(rt,kt)|0,c=c+Math.imul(Q,gt)|0,i=i+Math.imul(Q,Et)|0,i=i+Math.imul(Z,gt)|0,f=f+Math.imul(Z,Et)|0,c=c+Math.imul(j,yt)|0,i=i+Math.imul(j,Rt)|0,i=i+Math.imul(D,yt)|0,f=f+Math.imul(D,Rt)|0;var me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(at,lt),i=Math.imul(at,Mt),i=i+Math.imul(bt,lt)|0,f=Math.imul(bt,Mt),c=c+Math.imul(nt,ht)|0,i=i+Math.imul(nt,wt)|0,i=i+Math.imul(st,ht)|0,f=f+Math.imul(st,wt)|0,c=c+Math.imul(it,ft)|0,i=i+Math.imul(it,_t)|0,i=i+Math.imul(ot,ft)|0,f=f+Math.imul(ot,_t)|0,c=c+Math.imul(K,ct)|0,i=i+Math.imul(K,St)|0,i=i+Math.imul(X,ct)|0,f=f+Math.imul(X,St)|0,c=c+Math.imul(B,dt)|0,i=i+Math.imul(B,At)|0,i=i+Math.imul(T,dt)|0,f=f+Math.imul(T,At)|0,c=c+Math.imul(J,pt)|0,i=i+Math.imul(J,xt)|0,i=i+Math.imul(et,pt)|0,f=f+Math.imul(et,xt)|0,c=c+Math.imul(z,mt)|0,i=i+Math.imul(z,kt)|0,i=i+Math.imul(U,mt)|0,f=f+Math.imul(U,kt)|0,c=c+Math.imul(Y,gt)|0,i=i+Math.imul(Y,Et)|0,i=i+Math.imul(rt,gt)|0,f=f+Math.imul(rt,Et)|0,c=c+Math.imul(Q,yt)|0,i=i+Math.imul(Q,Rt)|0,i=i+Math.imul(Z,yt)|0,f=f+Math.imul(Z,Rt)|0,c=c+Math.imul(j,vt)|0,i=i+Math.imul(j,Ot)|0,i=i+Math.imul(D,vt)|0,f=f+Math.imul(D,Ot)|0;var ge=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(at,ht),i=Math.imul(at,wt),i=i+Math.imul(bt,ht)|0,f=Math.imul(bt,wt),c=c+Math.imul(nt,ft)|0,i=i+Math.imul(nt,_t)|0,i=i+Math.imul(st,ft)|0,f=f+Math.imul(st,_t)|0,c=c+Math.imul(it,ct)|0,i=i+Math.imul(it,St)|0,i=i+Math.imul(ot,ct)|0,f=f+Math.imul(ot,St)|0,c=c+Math.imul(K,dt)|0,i=i+Math.imul(K,At)|0,i=i+Math.imul(X,dt)|0,f=f+Math.imul(X,At)|0,c=c+Math.imul(B,pt)|0,i=i+Math.imul(B,xt)|0,i=i+Math.imul(T,pt)|0,f=f+Math.imul(T,xt)|0,c=c+Math.imul(J,mt)|0,i=i+Math.imul(J,kt)|0,i=i+Math.imul(et,mt)|0,f=f+Math.imul(et,kt)|0,c=c+Math.imul(z,gt)|0,i=i+Math.imul(z,Et)|0,i=i+Math.imul(U,gt)|0,f=f+Math.imul(U,Et)|0,c=c+Math.imul(Y,yt)|0,i=i+Math.imul(Y,Rt)|0,i=i+Math.imul(rt,yt)|0,f=f+Math.imul(rt,Rt)|0,c=c+Math.imul(Q,vt)|0,i=i+Math.imul(Q,Ot)|0,i=i+Math.imul(Z,vt)|0,f=f+Math.imul(Z,Ot)|0;var ye=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(at,ft),i=Math.imul(at,_t),i=i+Math.imul(bt,ft)|0,f=Math.imul(bt,_t),c=c+Math.imul(nt,ct)|0,i=i+Math.imul(nt,St)|0,i=i+Math.imul(st,ct)|0,f=f+Math.imul(st,St)|0,c=c+Math.imul(it,dt)|0,i=i+Math.imul(it,At)|0,i=i+Math.imul(ot,dt)|0,f=f+Math.imul(ot,At)|0,c=c+Math.imul(K,pt)|0,i=i+Math.imul(K,xt)|0,i=i+Math.imul(X,pt)|0,f=f+Math.imul(X,xt)|0,c=c+Math.imul(B,mt)|0,i=i+Math.imul(B,kt)|0,i=i+Math.imul(T,mt)|0,f=f+Math.imul(T,kt)|0,c=c+Math.imul(J,gt)|0,i=i+Math.imul(J,Et)|0,i=i+Math.imul(et,gt)|0,f=f+Math.imul(et,Et)|0,c=c+Math.imul(z,yt)|0,i=i+Math.imul(z,Rt)|0,i=i+Math.imul(U,yt)|0,f=f+Math.imul(U,Rt)|0,c=c+Math.imul(Y,vt)|0,i=i+Math.imul(Y,Ot)|0,i=i+Math.imul(rt,vt)|0,f=f+Math.imul(rt,Ot)|0;var ve=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(at,ct),i=Math.imul(at,St),i=i+Math.imul(bt,ct)|0,f=Math.imul(bt,St),c=c+Math.imul(nt,dt)|0,i=i+Math.imul(nt,At)|0,i=i+Math.imul(st,dt)|0,f=f+Math.imul(st,At)|0,c=c+Math.imul(it,pt)|0,i=i+Math.imul(it,xt)|0,i=i+Math.imul(ot,pt)|0,f=f+Math.imul(ot,xt)|0,c=c+Math.imul(K,mt)|0,i=i+Math.imul(K,kt)|0,i=i+Math.imul(X,mt)|0,f=f+Math.imul(X,kt)|0,c=c+Math.imul(B,gt)|0,i=i+Math.imul(B,Et)|0,i=i+Math.imul(T,gt)|0,f=f+Math.imul(T,Et)|0,c=c+Math.imul(J,yt)|0,i=i+Math.imul(J,Rt)|0,i=i+Math.imul(et,yt)|0,f=f+Math.imul(et,Rt)|0,c=c+Math.imul(z,vt)|0,i=i+Math.imul(z,Ot)|0,i=i+Math.imul(U,vt)|0,f=f+Math.imul(U,Ot)|0;var be=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(be>>>26)|0,be&=67108863,c=Math.imul(at,dt),i=Math.imul(at,At),i=i+Math.imul(bt,dt)|0,f=Math.imul(bt,At),c=c+Math.imul(nt,pt)|0,i=i+Math.imul(nt,xt)|0,i=i+Math.imul(st,pt)|0,f=f+Math.imul(st,xt)|0,c=c+Math.imul(it,mt)|0,i=i+Math.imul(it,kt)|0,i=i+Math.imul(ot,mt)|0,f=f+Math.imul(ot,kt)|0,c=c+Math.imul(K,gt)|0,i=i+Math.imul(K,Et)|0,i=i+Math.imul(X,gt)|0,f=f+Math.imul(X,Et)|0,c=c+Math.imul(B,yt)|0,i=i+Math.imul(B,Rt)|0,i=i+Math.imul(T,yt)|0,f=f+Math.imul(T,Rt)|0,c=c+Math.imul(J,vt)|0,i=i+Math.imul(J,Ot)|0,i=i+Math.imul(et,vt)|0,f=f+Math.imul(et,Ot)|0;var we=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(at,pt),i=Math.imul(at,xt),i=i+Math.imul(bt,pt)|0,f=Math.imul(bt,xt),c=c+Math.imul(nt,mt)|0,i=i+Math.imul(nt,kt)|0,i=i+Math.imul(st,mt)|0,f=f+Math.imul(st,kt)|0,c=c+Math.imul(it,gt)|0,i=i+Math.imul(it,Et)|0,i=i+Math.imul(ot,gt)|0,f=f+Math.imul(ot,Et)|0,c=c+Math.imul(K,yt)|0,i=i+Math.imul(K,Rt)|0,i=i+Math.imul(X,yt)|0,f=f+Math.imul(X,Rt)|0,c=c+Math.imul(B,vt)|0,i=i+Math.imul(B,Ot)|0,i=i+Math.imul(T,vt)|0,f=f+Math.imul(T,Ot)|0;var Me=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(at,mt),i=Math.imul(at,kt),i=i+Math.imul(bt,mt)|0,f=Math.imul(bt,kt),c=c+Math.imul(nt,gt)|0,i=i+Math.imul(nt,Et)|0,i=i+Math.imul(st,gt)|0,f=f+Math.imul(st,Et)|0,c=c+Math.imul(it,yt)|0,i=i+Math.imul(it,Rt)|0,i=i+Math.imul(ot,yt)|0,f=f+Math.imul(ot,Rt)|0,c=c+Math.imul(K,vt)|0,i=i+Math.imul(K,Ot)|0,i=i+Math.imul(X,vt)|0,f=f+Math.imul(X,Ot)|0;var _e=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(at,gt),i=Math.imul(at,Et),i=i+Math.imul(bt,gt)|0,f=Math.imul(bt,Et),c=c+Math.imul(nt,yt)|0,i=i+Math.imul(nt,Rt)|0,i=i+Math.imul(st,yt)|0,f=f+Math.imul(st,Rt)|0,c=c+Math.imul(it,vt)|0,i=i+Math.imul(it,Ot)|0,i=i+Math.imul(ot,vt)|0,f=f+Math.imul(ot,Ot)|0;var Se=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(at,yt),i=Math.imul(at,Rt),i=i+Math.imul(bt,yt)|0,f=Math.imul(bt,Rt),c=c+Math.imul(nt,vt)|0,i=i+Math.imul(nt,Ot)|0,i=i+Math.imul(st,vt)|0,f=f+Math.imul(st,Ot)|0;var Ae=(y+c|0)+((i&8191)<<13)|0;y=(f+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(at,vt),i=Math.imul(at,Ot),i=i+Math.imul(bt,vt)|0,f=Math.imul(bt,Ot);var xe=(y+c|0)+((i&8191)<<13)|0;return y=(f+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,g[0]=$t,g[1]=Tt,g[2]=ue,g[3]=le,g[4]=fe,g[5]=ce,g[6]=de,g[7]=pe,g[8]=me,g[9]=ge,g[10]=ye,g[11]=ve,g[12]=be,g[13]=we,g[14]=Me,g[15]=_e,g[16]=Se,g[17]=Ae,g[18]=xe,y!==0&&(g[19]=y,n.length++),n};Math.imul||(M=b);function O(e,o,n){n.negative=o.negative^e.negative,n.length=e.length+o.length;for(var u=0,l=0,g=0;g<n.length-1;g++){var y=l;l=0;for(var c=u&67108863,i=Math.min(g,o.length-1),f=Math.max(0,g-e.length+1);f<=i;f++){var E=g-f,j=e.words[E]|0,D=o.words[f]|0,V=j*D,Q=V&67108863;y=y+(V/67108864|0)|0,Q=Q+c|0,c=Q&67108863,y=y+(Q>>>26)|0,l+=y>>>26,y&=67108863}n.words[g]=c,u=y,y=l}return u!==0?n.words[g]=u:n.length--,n.strip()}function k(e,o,n){var u=new R;return u.mulp(e,o,n)}s.prototype.mulTo=function(e,o){var n,u=this.length+e.length;return this.length===10&&e.length===10?n=M(this,e,o):u<63?n=b(this,e,o):u<1024?n=O(this,e,o):n=k(this,e,o),n};function R(e,o){this.x=e,this.y=o}R.prototype.makeRBT=function(e){for(var o=new Array(e),n=s.prototype._countBits(e)-1,u=0;u<e;u++)o[u]=this.revBin(u,n,e);return o},R.prototype.revBin=function(e,o,n){if(e===0||e===n-1)return e;for(var u=0,l=0;l<o;l++)u|=(e&1)<<o-l-1,e>>=1;return u},R.prototype.permute=function(e,o,n,u,l,g){for(var y=0;y<g;y++)u[y]=o[e[y]],l[y]=n[e[y]]},R.prototype.transform=function(e,o,n,u,l,g){this.permute(g,e,o,n,u,l);for(var y=1;y<l;y<<=1)for(var c=y<<1,i=Math.cos(2*Math.PI/c),f=Math.sin(2*Math.PI/c),E=0;E<l;E+=c)for(var j=i,D=f,V=0;V<y;V++){var Q=n[E+V],Z=u[E+V],tt=n[E+V+y],Y=u[E+V+y],rt=j*tt-D*Y;Y=j*Y+D*tt,tt=rt,n[E+V]=Q+tt,u[E+V]=Z+Y,n[E+V+y]=Q-tt,u[E+V+y]=Z-Y,V!==c&&(rt=i*j-f*D,D=i*D+f*j,j=rt)}},R.prototype.guessLen13b=function(e,o){var n=Math.max(o,e)|1,u=n&1,l=0;for(n=n/2|0;n;n=n>>>1)l++;return 1<<l+1+u},R.prototype.conjugate=function(e,o,n){if(!(n<=1))for(var u=0;u<n/2;u++){var l=e[u];e[u]=e[n-u-1],e[n-u-1]=l,l=o[u],o[u]=-o[n-u-1],o[n-u-1]=-l}},R.prototype.normalize13b=function(e,o){for(var n=0,u=0;u<o/2;u++){var l=Math.round(e[2*u+1]/o)*8192+Math.round(e[2*u]/o)+n;e[u]=l&67108863,l<67108864?n=0:n=l/67108864|0}return e},R.prototype.convert13b=function(e,o,n,u){for(var l=0,g=0;g<o;g++)l=l+(e[g]|0),n[2*g]=l&8191,l=l>>>13,n[2*g+1]=l&8191,l=l>>>13;for(g=2*o;g<u;++g)n[g]=0;a(l===0),a((l&-8192)===0)},R.prototype.stub=function(e){for(var o=new Array(e),n=0;n<e;n++)o[n]=0;return o},R.prototype.mulp=function(e,o,n){var u=2*this.guessLen13b(e.length,o.length),l=this.makeRBT(u),g=this.stub(u),y=new Array(u),c=new Array(u),i=new Array(u),f=new Array(u),E=new Array(u),j=new Array(u),D=n.words;D.length=u,this.convert13b(e.words,e.length,y,u),this.convert13b(o.words,o.length,f,u),this.transform(y,g,c,i,u,l),this.transform(f,g,E,j,u,l);for(var V=0;V<u;V++){var Q=c[V]*E[V]-i[V]*j[V];i[V]=c[V]*j[V]+i[V]*E[V],c[V]=Q}return this.conjugate(c,i,u),this.transform(c,i,D,g,u,l),this.conjugate(D,g,u),this.normalize13b(D,u),n.negative=e.negative^o.negative,n.length=e.length+o.length,n.strip()},s.prototype.mul=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),this.mulTo(e,o)},s.prototype.mulf=function(e){var o=new s(null);return o.words=new Array(this.length+e.length),k(this,e,o)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){a(typeof e=="number"),a(e<67108864);for(var o=0,n=0;n<this.length;n++){var u=(this.words[n]|0)*e,l=(u&67108863)+(o&67108863);o>>=26,o+=u/67108864|0,o+=l>>>26,this.words[n]=l&67108863}return o!==0&&(this.words[n]=o,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var o=x(e);if(o.length===0)return new s(1);for(var n=this,u=0;u<o.length&&o[u]===0;u++,n=n.sqr());if(++u<o.length)for(var l=n.sqr();u<o.length;u++,l=l.sqr())o[u]!==0&&(n=n.mul(l));return n},s.prototype.iushln=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=67108863>>>26-o<<26-o,l;if(o!==0){var g=0;for(l=0;l<this.length;l++){var y=this.words[l]&u,c=(this.words[l]|0)-y<<o;this.words[l]=c|g,g=y>>>26-o}g&&(this.words[l]=g,this.length++)}if(n!==0){for(l=this.length-1;l>=0;l--)this.words[l+n]=this.words[l];for(l=0;l<n;l++)this.words[l]=0;this.length+=n}return this.strip()},s.prototype.ishln=function(e){return a(this.negative===0),this.iushln(e)},s.prototype.iushrn=function(e,o,n){a(typeof e=="number"&&e>=0);var u;o?u=(o-o%26)/26:u=0;var l=e%26,g=Math.min((e-l)/26,this.length),y=67108863^67108863>>>l<<l,c=n;if(u-=g,u=Math.max(0,u),c){for(var i=0;i<g;i++)c.words[i]=this.words[i];c.length=g}if(g!==0)if(this.length>g)for(this.length-=g,i=0;i<this.length;i++)this.words[i]=this.words[i+g];else this.words[0]=0,this.length=1;var f=0;for(i=this.length-1;i>=0&&(f!==0||i>=u);i--){var E=this.words[i]|0;this.words[i]=f<<26-l|E>>>l,f=E&y}return c&&f!==0&&(c.words[c.length++]=f),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,o,n){return a(this.negative===0),this.iushrn(e,o,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return!1;var l=this.words[n];return!!(l&u)},s.prototype.imaskn=function(e){a(typeof e=="number"&&e>=0);var o=e%26,n=(e-o)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(o!==0&&n++,this.length=Math.min(n,this.length),o!==0){var u=67108863^67108863>>>o<<o;this.words[this.length-1]&=u}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return a(typeof e=="number"),a(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)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var o=0;o<this.length&&this.words[o]>=67108864;o++)this.words[o]-=67108864,o===this.length-1?this.words[o+1]=1:this.words[o+1]++;return this.length=Math.max(this.length,o+1),this},s.prototype.isubn=function(e){if(a(typeof e=="number"),a(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 o=0;o<this.length&&this.words[o]<0;o++)this.words[o]+=67108864,this.words[o+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,o,n){var u=e.length+n,l;this._expand(u);var g,y=0;for(l=0;l<e.length;l++){g=(this.words[l+n]|0)+y;var c=(e.words[l]|0)*o;g-=c&67108863,y=(g>>26)-(c/67108864|0),this.words[l+n]=g&67108863}for(;l<this.length-n;l++)g=(this.words[l+n]|0)+y,y=g>>26,this.words[l+n]=g&67108863;if(y===0)return this.strip();for(a(y===-1),y=0,l=0;l<this.length;l++)g=-(this.words[l]|0)+y,y=g>>26,this.words[l]=g&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,o){var n=this.length-e.length,u=this.clone(),l=e,g=l.words[l.length-1]|0,y=this._countBits(g);n=26-y,n!==0&&(l=l.ushln(n),u.iushln(n),g=l.words[l.length-1]|0);var c=u.length-l.length,i;if(o!=="mod"){i=new s(null),i.length=c+1,i.words=new Array(i.length);for(var f=0;f<i.length;f++)i.words[f]=0}var E=u.clone()._ishlnsubmul(l,1,c);E.negative===0&&(u=E,i&&(i.words[c]=1));for(var j=c-1;j>=0;j--){var D=(u.words[l.length+j]|0)*67108864+(u.words[l.length+j-1]|0);for(D=Math.min(D/g|0,67108863),u._ishlnsubmul(l,D,j);u.negative!==0;)D--,u.negative=0,u._ishlnsubmul(l,1,j),u.isZero()||(u.negative^=1);i&&(i.words[j]=D)}return i&&i.strip(),u.strip(),o!=="div"&&n!==0&&u.iushrn(n),{div:i||null,mod:u}},s.prototype.divmod=function(e,o,n){if(a(!e.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var u,l,g;return this.negative!==0&&e.negative===0?(g=this.neg().divmod(e,o),o!=="mod"&&(u=g.div.neg()),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.iadd(e)),{div:u,mod:l}):this.negative===0&&e.negative!==0?(g=this.divmod(e.neg(),o),o!=="mod"&&(u=g.div.neg()),{div:u,mod:g.mod}):this.negative&e.negative?(g=this.neg().divmod(e.neg(),o),o!=="div"&&(l=g.mod.neg(),n&&l.negative!==0&&l.isub(e)),{div:g.div,mod:l}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:e.length===1?o==="div"?{div:this.divn(e.words[0]),mod:null}:o==="mod"?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,o)},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var o=this.divmod(e);if(o.mod.isZero())return o.div;var n=o.div.negative!==0?o.mod.isub(e):o.mod,u=e.ushrn(1),l=e.andln(1),g=n.cmp(u);return g<0||l===1&&g===0?o.div:o.div.negative!==0?o.div.isubn(1):o.div.iaddn(1)},s.prototype.modn=function(e){a(e<=67108863);for(var o=(1<<26)%e,n=0,u=this.length-1;u>=0;u--)n=(o*n+(this.words[u]|0))%e;return n},s.prototype.idivn=function(e){a(e<=67108863);for(var o=0,n=this.length-1;n>=0;n--){var u=(this.words[n]|0)+o*67108864;this.words[n]=u/e|0,o=u%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=new s(0),y=new s(1),c=0;o.isEven()&&n.isEven();)o.iushrn(1),n.iushrn(1),++c;for(var i=n.clone(),f=o.clone();!o.isZero();){for(var E=0,j=1;!(o.words[0]&j)&&E<26;++E,j<<=1);if(E>0)for(o.iushrn(E);E-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(i),l.isub(f)),u.iushrn(1),l.iushrn(1);for(var D=0,V=1;!(n.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(n.iushrn(D);D-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(i),y.isub(f)),g.iushrn(1),y.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(g),l.isub(y)):(n.isub(o),g.isub(u),y.isub(l))}return{a:g,b:y,gcd:n.iushln(c)}},s.prototype._invmp=function(e){a(e.negative===0),a(!e.isZero());var o=this,n=e.clone();o.negative!==0?o=o.umod(e):o=o.clone();for(var u=new s(1),l=new s(0),g=n.clone();o.cmpn(1)>0&&n.cmpn(1)>0;){for(var y=0,c=1;!(o.words[0]&c)&&y<26;++y,c<<=1);if(y>0)for(o.iushrn(y);y-- >0;)u.isOdd()&&u.iadd(g),u.iushrn(1);for(var i=0,f=1;!(n.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(n.iushrn(i);i-- >0;)l.isOdd()&&l.iadd(g),l.iushrn(1);o.cmp(n)>=0?(o.isub(n),u.isub(l)):(n.isub(o),l.isub(u))}var E;return o.cmpn(1)===0?E=u:E=l,E.cmpn(0)<0&&E.iadd(e),E},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var o=this.clone(),n=e.clone();o.negative=0,n.negative=0;for(var u=0;o.isEven()&&n.isEven();u++)o.iushrn(1),n.iushrn(1);do{for(;o.isEven();)o.iushrn(1);for(;n.isEven();)n.iushrn(1);var l=o.cmp(n);if(l<0){var g=o;o=n,n=g}else if(l===0||n.cmpn(1)===0)break;o.isub(n)}while(!0);return n.iushln(u)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){a(typeof e=="number");var o=e%26,n=(e-o)/26,u=1<<o;if(this.length<=n)return this._expand(n+1),this.words[n]|=u,this;for(var l=u,g=n;l!==0&&g<this.length;g++){var y=this.words[g]|0;y+=l,l=y>>>26,y&=67108863,this.words[g]=y}return l!==0&&(this.words[g]=l,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(e){var o=e<0;if(this.negative!==0&&!o)return-1;if(this.negative===0&&o)return 1;this.strip();var n;if(this.length>1)n=1;else{o&&(e=-e),a(e<=67108863,"Number is too big");var u=this.words[0]|0;n=u===e?0:u<e?-1:1}return this.negative!==0?-n|0:n},s.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var o=this.ucmp(e);return this.negative!==0?-o|0:o},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var o=0,n=this.length-1;n>=0;n--){var u=this.words[n]|0,l=e.words[n]|0;if(u!==l){u<l?o=-1:u>l&&(o=1);break}}return o},s.prototype.gtn=function(e){return this.cmpn(e)===1},s.prototype.gt=function(e){return this.cmp(e)===1},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return this.cmpn(e)===-1},s.prototype.lt=function(e){return this.cmp(e)===-1},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return this.cmpn(e)===0},s.prototype.eq=function(e){return this.cmp(e)===0},s.red=function(e){return new $(e)},s.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var I={k256:null,p224:null,p192:null,p25519:null};function L(e,o){this.name=e,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},L.prototype.ireduce=function(e){var o=e,n;do this.split(o,this.tmp),o=this.imulK(o),o=o.iadd(this.tmp),n=o.bitLength();while(n>this.n);var u=n<this.n?-1:o.ucmp(this.p);return u===0?(o.words[0]=0,o.length=1):u>0?o.isub(this.p):o.strip!==void 0?o.strip():o._strip(),o},L.prototype.split=function(e,o){e.iushrn(this.n,0,o)},L.prototype.imulK=function(e){return e.imul(this.k)};function P(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}d(P,L),P.prototype.split=function(e,o){for(var n=4194303,u=Math.min(e.length,9),l=0;l<u;l++)o.words[l]=e.words[l];if(o.length=u,e.length<=9){e.words[0]=0,e.length=1;return}var g=e.words[9];for(o.words[o.length++]=g&n,l=10;l<e.length;l++){var y=e.words[l]|0;e.words[l-10]=(y&n)<<4|g>>>22,g=y}g>>>=22,e.words[l-10]=g,g===0&&e.length>10?e.length-=10:e.length-=9},P.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var o=0,n=0;n<e.length;n++){var u=e.words[n]|0;o+=u*977,e.words[n]=o&67108863,o=u*64+(o/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function H(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}d(H,L);function W(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}d(W,L);function q(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}d(q,L),q.prototype.imulK=function(e){for(var o=0,n=0;n<e.length;n++){var u=(e.words[n]|0)*19+o,l=u&67108863;u>>>=26,e.words[n]=l,o=u}return o!==0&&(e.words[e.length++]=o),e},s._prime=function(e){if(I[e])return I[e];var o;if(e==="k256")o=new P;else if(e==="p224")o=new H;else if(e==="p192")o=new W;else if(e==="p25519")o=new q;else throw new Error("Unknown prime "+e);return I[e]=o,o};function $(e){if(typeof e=="string"){var o=s._prime(e);this.m=o.p,this.prime=o}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}$.prototype._verify1=function(e){a(e.negative===0,"red works only with positives"),a(e.red,"red works only with red numbers")},$.prototype._verify2=function(e,o){a((e.negative|o.negative)===0,"red works only with positives"),a(e.red&&e.red===o.red,"red works only with red numbers")},$.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},$.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},$.prototype.add=function(e,o){this._verify2(e,o);var n=e.add(o);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},$.prototype.iadd=function(e,o){this._verify2(e,o);var n=e.iadd(o);return n.cmp(this.m)>=0&&n.isub(this.m),n},$.prototype.sub=function(e,o){this._verify2(e,o);var n=e.sub(o);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},$.prototype.isub=function(e,o){this._verify2(e,o);var n=e.isub(o);return n.cmpn(0)<0&&n.iadd(this.m),n},$.prototype.shl=function(e,o){return this._verify1(e),this.imod(e.ushln(o))},$.prototype.imul=function(e,o){return this._verify2(e,o),this.imod(e.imul(o))},$.prototype.mul=function(e,o){return this._verify2(e,o),this.imod(e.mul(o))},$.prototype.isqr=function(e){return this.imul(e,e.clone())},$.prototype.sqr=function(e){return this.mul(e,e)},$.prototype.sqrt=function(e){if(e.isZero())return e.clone();var o=this.m.andln(3);if(a(o%2===1),o===3){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);a(!u.isZero());var g=new s(1).toRed(this),y=g.redNeg(),c=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new s(2*i*i).toRed(this);this.pow(i,c).cmp(y)!==0;)i.redIAdd(y);for(var f=this.pow(i,u),E=this.pow(e,u.addn(1).iushrn(1)),j=this.pow(e,u),D=l;j.cmp(g)!==0;){for(var V=j,Q=0;V.cmp(g)!==0;Q++)V=V.redSqr();a(Q<D);var Z=this.pow(f,new s(1).iushln(D-Q-1));E=E.redMul(Z),f=Z.redSqr(),j=j.redMul(f),D=Q}return E},$.prototype.invm=function(e){var o=e._invmp(this.m);return o.negative!==0?(o.negative=0,this.imod(o).redNeg()):this.imod(o)},$.prototype.pow=function(e,o){if(o.isZero())return new s(1).toRed(this);if(o.cmpn(1)===0)return e.clone();var n=4,u=new Array(1<<n);u[0]=new s(1).toRed(this),u[1]=e;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],e);var g=u[0],y=0,c=0,i=o.bitLength()%26;for(i===0&&(i=26),l=o.length-1;l>=0;l--){for(var f=o.words[l],E=i-1;E>=0;E--){var j=f>>E&1;if(g!==u[0]&&(g=this.sqr(g)),j===0&&y===0){c=0;continue}y<<=1,y|=j,c++,!(c!==n&&(l!==0||E!==0))&&(g=this.mul(g,u[y]),c=0,y=0)}i=26}return g},$.prototype.convertTo=function(e){var o=e.umod(this.m);return o===e?o.clone():o},$.prototype.convertFrom=function(e){var o=e.clone();return o.red=null,o},s.mont=function(e){return new N(e)};function N(e){$.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}d(N,$),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var o=this.imod(e.mul(this.rinv));return o.red=null,o},N.prototype.imul=function(e,o){if(e.isZero()||o.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.mul=function(e,o){if(e.isZero()||o.isZero())return new s(0)._forceRed(this);var n=e.mul(o),u=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=n.isub(u).iushrn(this.shift),g=l;return l.cmp(this.m)>=0?g=l.isub(this.m):l.cmpn(0)<0&&(g=l.iadd(this.m)),g._forceRed(this)},N.prototype.invm=function(e){var o=this.imod(e._invmp(this.m).mul(this.r2));return o._forceRed(this)}})(t,Lt)}(O0);var j0=O0.exports,tg=j0,y_=Zt.Buffer;function v_(t,r){return y_.from(t.toRed(tg.mont(r.modulus)).redPow(new tg(r.publicExponent)).fromRed().toArray())}var eg=v_,b_=dh,C0=$n,w_=ts,rg=Gm,ig=Ym,I0=j0,M_=eg,__=Kl,Nr=Zt.Buffer,S_=function(t,r,h){var a;t.padding?a=t.padding:h?a=1:a=4;var d=b_(t),s;if(a===4)s=A_(d,r);else if(a===1)s=x_(d,r,h);else if(a===3){if(s=new I0(r),s.cmp(d.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return h?__(s,d):M_(s,d)};function A_(t,r){var h=t.modulus.byteLength(),a=r.length,d=w_("sha1").update(Nr.alloc(0)).digest(),s=d.length,m=2*s;if(a>h-m-2)throw new Error("message too long");var p=Nr.alloc(h-a-m-2),w=h-s-1,S=C0(s),A=ig(Nr.concat([d,p,Nr.alloc(1,1),r],w),rg(S,w)),v=ig(S,rg(A,s));return new I0(Nr.concat([Nr.alloc(1),v,A],h))}function x_(t,r,h){var a=r.length,d=t.modulus.byteLength();if(a>d-11)throw new Error("message too long");var s;return h?s=Nr.alloc(d-a-3,255):s=k_(d-a-3),new I0(Nr.concat([Nr.from([0,h?1:2]),s,Nr.alloc(1),r],d))}function k_(t){for(var r=Nr.allocUnsafe(t),h=0,a=C0(t*2),d=0,s;h<t;)d===a.length&&(a=C0(t*2),d=0),s=a[d++],s&&(r[h++]=s);return r}var E_=dh,ng=Gm,og=Ym,sg=j0,R_=Kl,O_=ts,j_=eg,gs=Zt.Buffer,C_=function(t,r,h){var a;t.padding?a=t.padding:h?a=1:a=4;var d=E_(t),s=d.modulus.byteLength();if(r.length>s||new sg(r).cmp(d.modulus)>=0)throw new Error("decryption error");var m;h?m=j_(new sg(r),d):m=R_(r,d);var p=gs.alloc(s-m.length);if(m=gs.concat([p,m],s),a===4)return I_(d,m);if(a===1)return B_(d,m,h);if(a===3)return m;throw new Error("unknown padding")};function I_(t,r){var h=t.modulus.byteLength(),a=O_("sha1").update(gs.alloc(0)).digest(),d=a.length;if(r[0]!==0)throw new Error("decryption error");var s=r.slice(1,d+1),m=r.slice(d+1),p=og(s,ng(m,d)),w=og(m,ng(p,h-d-1));if(L_(a,w.slice(0,d)))throw new Error("decryption error");for(var S=d;w[S]===0;)S++;if(w[S++]!==1)throw new Error("decryption error");return w.slice(S)}function B_(t,r,h){for(var a=r.slice(0,2),d=2,s=0;r[d++]!==0;)if(d>=r.length){s++;break}var m=r.slice(2,d-1);if((a.toString("hex")!=="0002"&&!h||a.toString("hex")!=="0001"&&h)&&s++,m.length<8&&s++,s)throw new Error("decryption error");return r.slice(d)}function L_(t,r){t=gs.from(t),r=gs.from(r);var h=0,a=t.length;t.length!==r.length&&(h++,a=Math.min(t.length,r.length));for(var d=-1;++d<a;)h+=t[d]^r[d];return h}(function(t){t.publicEncrypt=S_,t.privateDecrypt=C_,t.privateEncrypt=function(r,h){return t.publicEncrypt(r,h,!0)},t.publicDecrypt=function(r,h){return t.privateDecrypt(r,h,!0)}})(Xm);var ys={};function ag(){throw new Error(`secure random number generation not supported by this browser
use chrome, FireFox or Internet Explorer 11`)}var hg=Zt,ug=$n,lg=hg.Buffer,fg=hg.kMaxLength,B0=Lt.crypto||Lt.msCrypto,cg=Math.pow(2,32)-1;function dg(t,r){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>cg||t<0)throw new TypeError("offset must be a uint32");if(t>fg||t>r)throw new RangeError("offset out of range")}function pg(t,r,h){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>cg||t<0)throw new TypeError("size must be a uint32");if(t+r>h||t>fg)throw new RangeError("buffer too small")}B0&&B0.getRandomValues||!Dt.browser?(ys.randomFill=U_,ys.randomFillSync=q_):(ys.randomFill=ag,ys.randomFillSync=ag);function U_(t,r,h,a){if(!lg.isBuffer(t)&&!(t instanceof Lt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof r=="function")a=r,r=0,h=t.length;else if(typeof h=="function")a=h,h=t.length-r;else if(typeof a!="function")throw new TypeError('"cb" argument must be a function');return dg(r,t.length),pg(h,r,t.length),mg(t,r,h,a)}function mg(t,r,h,a){if(Dt.browser){var d=t.buffer,s=new Uint8Array(d,r,h);if(B0.getRandomValues(s),a){Dt.nextTick(function(){a(null,t)});return}return t}if(a){ug(h,function(p,w){if(p)return a(p);w.copy(t,r),a(null,t)});return}var m=ug(h);return m.copy(t,r),t}function q_(t,r,h){if(typeof r>"u"&&(r=0),!lg.isBuffer(t)&&!(t instanceof Lt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return dg(r,t.length),h===void 0&&(h=t.length-r),pg(h,r,t.length),mg(t,r,h)}var gg;function yg(){if(gg)return zt;gg=1,zt.randomBytes=zt.rng=zt.pseudoRandomBytes=zt.prng=$n,zt.createHash=zt.Hash=ts,zt.createHmac=zt.Hmac=Tp;var t=M4,r=Object.keys(t),h=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);zt.getHashes=function(){return h};var a=La;zt.pbkdf2=a.pbkdf2,zt.pbkdf2Sync=a.pbkdf2Sync;var d=Lr;zt.Cipher=d.Cipher,zt.createCipher=d.createCipher,zt.Cipheriv=d.Cipheriv,zt.createCipheriv=d.createCipheriv,zt.Decipher=d.Decipher,zt.createDecipher=d.createDecipher,zt.Decipheriv=d.Decipheriv,zt.createDecipheriv=d.createDecipheriv,zt.getCiphers=d.getCiphers,zt.listCiphers=d.listCiphers;var s=t5();zt.DiffieHellmanGroup=s.DiffieHellmanGroup,zt.createDiffieHellmanGroup=s.createDiffieHellmanGroup,zt.getDiffieHellman=s.getDiffieHellman,zt.createDiffieHellman=s.createDiffieHellman,zt.DiffieHellman=s.DiffieHellman;var m=c_();zt.createSign=m.createSign,zt.Sign=m.Sign,zt.createVerify=m.createVerify,zt.Verify=m.Verify,zt.createECDH=p_();var p=Xm;zt.publicEncrypt=p.publicEncrypt,zt.privateEncrypt=p.privateEncrypt,zt.publicDecrypt=p.publicDecrypt,zt.privateDecrypt=p.privateDecrypt;var w=ys;return zt.randomFill=w.randomFill,zt.randomFillSync=w.randomFillSync,zt.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
`))},zt.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},zt}var $_=yg();let L0=ke($_),T_=t=>new Uint8Array([...t].map(r=>r.charCodeAt(0))).buffer,vg=t=>String.fromCharCode.apply(null,new Uint8Array(t)),D_=async t=>{let r=pr.pem.header,h=pr.pem.footer,a=t.substring(r.length,t.length-h.length),d=window.atob(a),s=T_(d);return window.crypto.subtle.importKey(pr.format,s,{name:pr.name,hash:pr.hash},!1,pr.keyUsasge)},bg=async(t,r)=>window.crypto.subtle.encrypt({name:pr.name,hash:pr.hash},t,r),P_=async(t,r)=>{let h=await D_(r),a=L0.randomBytes(32),d=L0.randomBytes(16),s=L0.createCipheriv(pr.algorithm,a,d),m;m=s.update(JSON.stringify(t),pr.inputEncoding,pr.outputEncoding),m+=s.final(pr.outputEncoding);let p=await bg(h,a),w=await bg(h,d),S=window.btoa(vg(p)),A=window.btoa(vg(w));return{encryptedData:m,encryptedKey:S,encryptedIv:A}},N_=async(t,r)=>{let{encryptedData:h,encryptedKey:a,encryptedIv:d}=await P_(t,r);return JSON.stringify({encrypted_data:h,encrypted_key:a,encrypted_iv:d})};class U0{constructor(r){se(this,"api"),this.api=A6.create({baseURL:r})}async get(r,h){try{return(await this.api.get(r,{headers:{Authorization:`Bearer ${h}`}})).data}catch(a){return this.handleRequestError(a)}}async post(r,h,a,d,s,m,p){let w={"Content-Type":"application/json",Authorization:`Bearer ${a}`,"X-API-KEY":a,"X-CULQI-CLIENT":"culqiJS_v4","X-CULQI-PRODUCT":"online","X-CULQI-SPONSOR":d?.culqiclient??"","X-CULQI-SPONSOR-VERSION":d?.culqiclientversion??"","X-API-VERSION":2,"X-CULQI-PLUGIN-VERSION":d?.culqipluginversion??"","X-CULQI-ENV":m?"test":"live","X-CULQI-RSA-ID":d?.xculqirsaid??"",...p},S=h;if(s)try{S=await N_(h,d.rsapublickey)}catch{return nr.error("Error al encriptar los datos: "),x6}try{return(await this.api.post(r,S,{headers:w})).data}catch(A){return this.handleRequestError(A)}}handleRequestError(r){var h;return r.request?nr.error("No se recibi\xF3 respuesta del servidor..."):nr.error("Error al configurar la solicitud:",r.message),(h=r.response)==null?void 0:h.data}}class z_{constructor(){se(this,"_culqiApiSecure","https://secure.culqi.com"),se(this,"service",new U0(this._culqiApiSecure))}async generateToken(r,h,a,d,s,m){return this.service.post("/tokens",r,h,a,d,s,m)}async generateTokenYape(r,h,a,d,s,m){return this.service.post("/v2/tokens/yape",r,h,a,d,s,m)}}let wg=new z_;class F_{constructor(){se(this,"_culqiApiPublic","https://api.culqi.com"),se(this,"service",new U0(this._culqiApiPublic))}async confirmCip(r,h,a,d,s,m){return this.service.post("/v2/orders/confirm",{order_id:r,order_types:["cip"]},h,a,d,s,m)}async confirmCuotealo(r,h,a,d,s,m){return this.service.post("/v2/orders/confirm",{order_id:r,order_types:["cuotealo"]},h,a,d,s,m)}}let Mg=new F_;var q0,go;class V_ extends e2{constructor(){super(...arguments),se(this,"token",null),se(this,"order",null),se(this,"_tokenOption",null),se(this,"error",null),yo(this,q0,()=>zb(this._settings.xculqirsaid,this._settings.rsapublickey)),yo(this,go,r=>{var h;return((h=this._settings)==null?void 0:h.excludencryptoperations)===void 0||!this._settings.excludencryptoperations.includes(r)}),se(this,"validationPaymentMethods",()=>{let r=Fi(this,q0).call(this),h=i2(this._options,this._settings,async()=>{var m,p,w,S,A;let v=()=>{let k=Qs("card","installments");return k&&fu(k.value)?parseInt(k.value,10):1},_={email:((m=Bi("card","email"))==null?void 0:m.value)??"",card_number:((p=Bi("card","number"))==null?void 0:p.value.replace(/\s/g,""))??"",cvv:((w=Bi("card","cvv"))==null?void 0:w.value)??"",expiration_month:((S=Bi("card","exp_month"))==null?void 0:S.value)??"",expiration_year:((A=Bi("card","exp_year"))==null?void 0:A.value)??"",metadata:{installments:v()}},{isValid:x,emptyFields:b}=Mc(_);if(!x){nr.warning(`No se puede generar el token, faltan datos: ${b}`);return}let M=Fi(this,go).call(this,"token")&&r,O=await wg.generateToken(_,this._publickey,this._settings,M,this._isTestEnvironment);O.object==="error"?this.error=O:this.token=O,culqi()}),a=n2(this._options,this._settings,async()=>{var m,p;let w={otp:((m=Bi("yape","code"))==null?void 0:m.value)??"",number_phone:((p=Bi("yape","phone"))==null?void 0:p.value)??"",amount:this._settings.amount},{isValid:S,emptyFields:A}=Mc(w);if(!S){nr.warning(`No se puede generar el token yape, faltan datos: ${A}`);return}let v=Fi(this,go).call(this,"yape")&&r,_=await wg.generateTokenYape(w,this._publickey,this._settings,v,this._isTestEnvironment);_.object==="error"?this.error=_:this.token=_,culqi()}),d=o2(this._options,this._settings,async()=>{let m=Fi(this,go).call(this,"confirm_order")&&r,p=await Mg.confirmCuotealo(this._settings.order,this._publickey,this._settings,m,this._isTestEnvironment);p.object==="error"?this.error=p:this.order=p,culqi()}),s=s2(this._options,this._settings,async()=>{let m=Fi(this,go).call(this,"cuotealo")&&r,p=await Mg.confirmCip(this._settings.order,this._publickey,this._settings,m,this._isTestEnvironment);p.object==="error"?this.error=p:this.order=p,culqi()});this.paymentOptionsAvailable={token:h,yape:a,cuotealo:d,cip:s}})}}q0=new WeakMap,go=new WeakMap;class H_{constructor(){se(this,"_culqiApiPublic","https://api.culqi.com"),se(this,"service",new U0(this._culqiApiPublic))}async getIins(r,h,a,d){let s=a===Ln.PEN?1:2,m=d&&fu(d)?`&monto=${d}`:"";return this.service.get(`/v2/validate-iin?iin=${r}&moneda=${s}${m}`,h)}}let W_=new H_;var $0,_g;class Z_ extends V_{constructor(r,h,a){super(),yo(this,$0),se(this,"_culqiCheckoutUrl","https://checkout.culqi.com/v4"),se(this,"urlParams"),se(this,"domine"),se(this,"_methodValue"),se(this,"_wasObjectCreated",!1),se(this,"_isOpen"),se(this,"_isCheckout"),se(this,"_urlCheckout"),se(this,"_closeEvent"),se(this,"_isOpenModal",!1),this._settings={currency:Ln.PEN,title:"Culqi Store"},this._isOpen=r,this._isCheckout=h,this._urlCheckout=a,this._isOpen=xn(this._isOpen),this._isCheckout=xn(this._isCheckout),this._urlCheckout=xn(this._urlCheckout),Y_(this,$0,_g).call(this),this._options={lang:Io.DEFAULT,installments:!1,modal:!0,paymentMethods:{tarjeta:!0,yape:!0,billetera:!1,bancaMovil:!1,agente:!1,cuotealo:!1},style:{logo:"",bannerColor:"",buttonBackground:"",menuColor:"",linksColor:"",buttonText:"",buttonTextColor:"",priceColor:""}}}init(){nr.info("CulqiJS inicializado")}open(){this.validateConfig()&&(this._isOpenModal=!0,this._isOpen.value=!0)}close(){this._isOpenModal=!1,this._isOpen.value=!1}get isOpen(){return this._isOpenModal}get methodValue(){return this._methodValue}set methodValue(r){this._methodValue=r}get wasObjectCreated(){return this._wasObjectCreated}set wasObjectCreated(r){this._wasObjectCreated=r}get closeEvent(){return this._closeEvent}set closeEvent(r){this._closeEvent=r}initCheckout(){if(this.validateConfig()){if(this._options.modal){nr.warning("No se puede inicializar el checkout en modo modal");return}this._isOpenModal=!0,this.open()}}urlParameters(){var r,h;this.urlParams=$b({publicKey:this._publickey,title:this._settings.title,currency:this._settings.currency,description:this._settings.title,amount:this._settings.amount,logo:((h=(r=this._options)==null?void 0:r.style)==null?void 0:h.logo)??"",installments:this._options.installments,order:this._settings.order,client:this._client??{}})}getUrlParameters(){return this._urlCheckout.value.queryString=`${this._culqiCheckoutUrl}${this.urlParams}`,`${this._culqiCheckoutUrl}${this.urlParams}`}}$0=new WeakSet,_g=function(){Nb(async t=>{var r;let h=t.substring(0,8);return W_.getIins(h,this._publickey,this.getSettings.currency,(r=this._settings)==null?void 0:r.amount)})};let ph=Rn(!1),Sg=Rn(!1),Ag=Rn({queryString:""}),vs=new Z_(ph,Sg,Ag);window.Culqi=vs;let K_=Rn(ph.value),xg={culqiInstance:vs,mdIsOpen:K_,mdIsCheckoutEnabled:Sg.value,mdUrlCheckout:Ag},xi=null,J_=()=>{let t=document.createElement("div");t.id="culqi-js",document.body.appendChild(t),xi=dc(Sc,xg),xi.mount("#culqi-js")},kg=()=>{xi&&(xi.unmount(),xi._container.innerHTML="",xi=null)};$s(ph,()=>{var t;if(ph.value){if(!xi)if(!((t=vs.getOptions)!=null&&t.modal)&&vs.getContainer){let r=document.querySelector(vs.getContainer);r&&(kg(),xi=dc(Sc,xg),xi.mount(r))}else J_()}else{kg();let r=document.getElementById("culqi-js");r&&r.remove()}})}),eS=tS();
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*!
* The buffer module from node.js, for the browser.
*
* @author   Feross Aboukhadijeh <https://feross.org>
* @license  MIT
*/
/*! #__NO_SIDE_EFFECTS__ */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
